前端改成统一对接一个后端

阳光采购平台基础信息界面
master
hongtianzai 3 years ago
parent f60a634160
commit a3c43a9989

@ -1,4 +1,3 @@
{
"BASE_URL":"https://www.udims.com/UDIC_UDI_Server",
"Download_URL": "http://localhost:9994/"
"BASE_URL":"http://localhost:9995"
}

@ -0,0 +1,9 @@
import request from "@/utils/request";
export function GetList(param){
return request({
url: "/udplat/distributor/list",
method: "post",
data: param
});
}

@ -0,0 +1,9 @@
import request from "@/utils/request";
export function GetList(param){
return request({
url: "/udplat/goods/list",
method: "post",
data: param
});
}

@ -0,0 +1,9 @@
import request from "@/utils/request";
export function GetList(param){
return request({
url: "/udplat/hospital/list",
method: "post",
data: param
});
}

@ -0,0 +1,9 @@
import request from "@/utils/request";
export function GetList(param){
return request({
url: "/udplat/log/list",
method: "post",
data: param
});
}

@ -0,0 +1,9 @@
import request from "@/utils/request";
export function GetList(param){
return request({
url: "/udplat/manufacture/list",
method: "post",
data: param
});
}

@ -34,7 +34,7 @@ let startApp = function () {
// 基础地址
getUrl = res.data.BASE_URL;
myReq.defaults.baseURL = getUrl;
request.defaults.baseURL = res.data.Download_URL;
request.defaults.baseURL = getUrl;//res.data.Download_URL;
console.log(res.data);
new Vue({
router,

@ -102,7 +102,7 @@ router.beforeEach((to, from, next) => {
// accessedRouters[1].children.splice(5,1); //删除admin里面不显示的客户用户管理
// accessedRouters[3].children.splice(8,1);//删除admin里面不显示的用户信息管理
// }
// 生成可访问的路由表
router.addRoutes(accessedRouters); // 动态添加可访问路由表
next({ ...to }); // hack方法 确保addRoutes已完成

@ -74,6 +74,11 @@ import facidentcode from "../views/basic/facidentcode.vue"
import jobLog from"../views/UDIDownload/jobLog"
import fileInfo from "../views/UDIDownload/fielInfo"
import udiSingle from "../views/UDIDownload/udiSingle";
import udplatDistributor from '../views/udplat/udplatDistributor';
import udplatHospital from '../views/udplat/udplatHospital';
import udplatManufacture from '../views/udplat/udplatManufacture';
import udplatGoods from '../views/udplat/udplatGoods';
import udplatLog from '../views/udplat/udplatLog';
const err401 = r =>
require.ensure([], () => r(require("../views/error/err401.vue")), "home");
@ -641,7 +646,7 @@ export const asyncRouterMap = [
},
children: [
{
name: "同步日志",
name: "UDI日志",
path: "jobLog",
component: jobLog,
@ -665,8 +670,49 @@ export const asyncRouterMap = [
meta: {
authRule: ["UDIDownload/udiSingle"]
},
},
{
name: "配送企业",
path: "udplatDistributor",
component: udplatDistributor,
meta: {
authRule: ["UDIDownload/udplatDistributor"]
},
},
{
name: "医疗机构",
path: "udplatHospital",
component: udplatHospital,
meta: {
authRule: ["UDIDownload/udplatHospital"]
},
},
{
name: "生产企业",
path: "udplatManufacture",
component: udplatManufacture,
meta: {
authRule: ["UDIDownload/udplatManufacture"]
},
},
{
name: "可选目录",
path: "udplatGoods",
component: udplatGoods,
meta: {
authRule: ["UDIDownload/udplatGoods"]
},
},
{
name: "阳光平台日志",
path: "udplatLog",
component: udplatLog,
meta: {
authRule: ["UDIDownload/udplatLog"]
},
}
]
}
];

@ -1,7 +1,7 @@
import axios from "axios";
import { Message } from "element-ui";
import store from "../store/index";
import { BASE_URL } from "../config/app";
//import { BASE_URL } from "../config/app";
import router from "../router/index";
import "../../public/config";
// axios.defaults.baseURL = '/api'

@ -1,5 +1,7 @@
import axios from 'axios'
import {Message} from 'element-ui'
import store from "../store";
import router from "../router";
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
@ -9,9 +11,24 @@ const service = axios.create({
// 超时
timeout: 30000
})
// request拦截器
service.interceptors.request.use(
config => {
if (store.getters.adminId && store.getters.token) {
config.headers={
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
}
return config;
},
error => {
Promise.reject(error);
}
);
service.interceptors.response.use(res=>{
const status = Number(res.status) || 200;
console.log(res);
const data = res.data;
if (status !== 200) {
Message({
message: res.statusText,
@ -19,8 +36,21 @@ service.interceptors.response.use(res=>{
})
return Promise.reject(new Error(res.statusText))
} else {
console.log(res.data);
return res.data
if (data.code) {
if (data.code === 2) {
store.dispatch("fedLogout").then(() => {
Message.error("验证失败,请重新登录");
router.push({
path: "/login",
query: { redirect: router.currentRoute.fullPath } // 从哪个页面跳转过来
});
});
}
if( data.code != 20000){
Message.error(data.message);
}
}
return data
}
})
export default service

@ -110,6 +110,7 @@
</el-table>
<el-pagination
:current-page="queryParams.page"
:page-size="queryParams.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"

@ -0,0 +1,72 @@
export default {
data(){
return{
dateRange: [],
loading: false,
list: [],
total: 0,
queryParams: {
page: 1,
limit: 10,
name: ""
},
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
}
},
created() {
this.getList();
},
methods:{
handleCurrentChange(val) {
this.queryParams.page = val;
this.getList();
},
onReset() {
this.$router.push({
path: "",
});
this.queryParams = {
page: 1,
limit: 10,
name: ""
};
this.dateRange = [];
this.getList();
},
onSubmit() {
this.queryParams.page = 1;
this.getList();
},
}
}

@ -0,0 +1,163 @@
<template>
<div>
<el-card class="el-card">
<el-form
:inline="true"
:model="queryParams"
size="mini"
>
<el-form-item label="名称">
<el-input
v-model="queryParams.name"
size="mini"
placeholder="请输入名称"
></el-input>
</el-form-item>
<el-form-item>
<span style="color: #000; margin-left: 10px; margin-right: 6px"
>日期:</span
>
<el-date-picker
:picker-options="pickerOptions"
v-model="dateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="onSubmit"
>查询
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
>
<el-table-column label="序号" type="index"/>
<el-table-column label="ID" prop="distributorId"/>
<el-table-column label="企业编码" prop="distributorCode"/>
<el-table-column label="企业名称" prop="distributorName"/>
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
<el-table-column label="更新时间" align="center" prop="updateTime" :show-overflow-tooltip="true"/>
</el-table>
<el-pagination
:current-page="queryParams.page"
:page-size="queryParams.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
</div>
</template>
<script>
import {GetList} from "@/api/udplat/udplatDistributor";
import myMinix from './minixs/commMinixs';
export default {
name: "udplatDistributor",
/* data(){
return{
dateRange: [],
loading: false,
list: [],
total: 0,
queryParams: {
page: 1,
limit: 10,
name: ""
},
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
}
},
created() {
this.getList();
},*/
mixins:[myMinix],
methods:{
getList() {
this.loading = true;
GetList(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.loading = false;
this.list = res.data.list || [];
this.total = res.data.total || 0;
}).catch(error => {
this.$message.error(error);
this.loading = false;
})
},
/* handleCurrentChange(val) {
this.queryParams.page = val;
this.getList();
},
onReset() {
this.$router.push({
path: "",
});
this.queryParams = {
page: 1,
limit: 10,
name: ""
};
this.dateRange = [];
this.getList();
},
onSubmit() {
this.queryParams.page = 1;
this.getList();
},*/
}
}
</script>
<style scoped>
</style>

@ -0,0 +1,101 @@
<template>
<div>
<el-card class="el-card">
<el-form
:inline="true"
:model="queryParams"
size="mini"
>
<el-form-item label="名称">
<el-input
v-model="queryParams.name"
size="mini"
placeholder="请输入名称"
></el-input>
</el-form-item>
<el-form-item>
<span style="color: #000; margin-left: 10px; margin-right: 6px"
>日期:</span
>
<el-date-picker
:picker-options="pickerOptions"
v-model="dateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="onSubmit"
>查询
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
>
<el-table-column label="序号" type="index"/>
<el-table-column label="ID" prop="deliveryGoodId"/>
<el-table-column label="目录编码" prop="deliveryGoodsCode"/>
<el-table-column label="生产企业" prop="manufactureName"/>
<el-table-column label="配送企业" prop="distributorName"/>
<el-table-column label="产品名称" prop="productName"/>
<!-- <el-table-column label="型号" prop="model"/>
<el-table-column label="规格" prop="spec"/>-->
<el-table-column label="医保编码" prop="medicalCode"/>
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
<el-table-column label="更新时间" align="center" prop="updateTime" :show-overflow-tooltip="true"/>
</el-table>
<el-pagination
:current-page="queryParams.page"
:page-size="queryParams.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
</div>
</template>
<script>
import {GetList} from "@/api/udplat/udplatGoods";
import myMinix from './minixs/commMinixs';
export default {
name: "udplatGoods",
mixins:[myMinix],
methods:{
getList() {
this.loading = true;
GetList(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.loading = false;
this.list = res.data.list || [];
this.total = res.data.total || 0;
}).catch(error => {
this.$message.error(error);
this.loading = false;
})
},
}
}
</script>
<style scoped>
</style>

@ -0,0 +1,98 @@
<template>
<div>
<el-card class="el-card">
<el-form
:inline="true"
:model="queryParams"
size="mini"
>
<el-form-item label="名称">
<el-input
v-model="queryParams.name"
size="mini"
placeholder="请输入名称"
></el-input>
</el-form-item>
<el-form-item>
<span style="color: #000; margin-left: 10px; margin-right: 6px"
>日期:</span
>
<el-date-picker
:picker-options="pickerOptions"
v-model="dateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="onSubmit"
>查询
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
>
<el-table-column label="序号" type="index"/>
<el-table-column label="ID" prop="purchaseId"/>
<el-table-column label="医疗机构编码" prop="purchaseCode"/>
<el-table-column label="医疗机构名称" prop="purchaseName"/>
<el-table-column label="医疗机构区域ID" prop="purchaseAreaId"/>
<el-table-column label="医疗机构区域名称" prop="purchaseArea"/>
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
<el-table-column label="更新时间" align="center" prop="updateTime" :show-overflow-tooltip="true"/>
</el-table>
<el-pagination
:current-page="queryParams.page"
:page-size="queryParams.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
</div>
</template>
<script>
import {GetList} from "@/api/udplat/udplatHospital";
import myMinix from './minixs/commMinixs';
export default {
name: "udplatHospital",
mixins:[myMinix],
methods:{
getList() {
this.loading = true;
GetList(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.loading = false;
this.list = res.data.list || [];
this.total = res.data.total || 0;
}).catch(error => {
this.$message.error(error);
this.loading = false;
})
},
}
}
</script>
<style scoped>
</style>

@ -0,0 +1,201 @@
<template>
<div>
<el-card class="el-card">
<el-form
:inline="true"
:model="queryParams"
size="mini"
>
<el-form-item class="query-form-item" label="类型">
<el-select
v-model="queryParams.type"
placeholder="类型"
>
<el-option
v-for="item in typeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<el-select
v-model="queryParams.downloadType"
placeholder="类型"
>
<el-option
v-for="item in downloadTypeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<span style="color: #000; margin-left: 10px; margin-right: 6px"
>创建日期:</span
>
<el-date-picker
:picker-options="pickerOptions"
v-model="dateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="onSubmit"
>查询
</el-button
>
</el-button-group>
</el-form-item>
<el-form-item>
<el-button @click="dialog2.visible = true">按时间段下载</el-button>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
:row-style="rowStyle"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="类型" prop="type">
<template slot-scope="scope">
<span>{{ getType(scope.row.type) }}</span>
</template>
</el-table-column>
<el-table-column label="下载类型" prop="downloadType">
<template slot-scope="scope">
<span>{{ getDownloadType(scope.row.downloadType) }}</span>
</template>
</el-table-column>
<el-table-column label="表名" prop="tbName"/>
<el-table-column label="日期" prop="actionDate"/>
<el-table-column label="提示行数" prop="totalCount"/>
<el-table-column label="实际行数" prop="realCount"/>
<el-table-column label="插入行数" prop="insertCount"/>
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
<el-table-column label="操作" fixed="right" width="130">
<template slot-scope="scope">
<el-button
v-if="scope.row.downloadType != 'import'"
type="text"
size="small"
@click.native.s.stop="downloadData(scope.row.downloadDate)">
重新下载
</el-button>
<el-button
type="text"
size="small"
@click.native.stop="showContent(scope.row)"
>详情
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="queryParams.page"
:page-size="queryParams.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
<el-dialog
title="提示"
:visible.sync="dialog.visible"
width="70%">
<span>类型</span><span>{{dialog.type}}</span>
<el-divider></el-divider>
<span>消息</span><span>{{dialog.msg}}</span>
<el-divider></el-divider>
<span>详情</span><span>{{ dialog.content }}</span>
</el-dialog>
</div>
</template>
<script>
import {GetList} from "@/api/udplat/udplatLog";
import myMinix from './minixs/commMinixs';
export default {
name: "udplatLog",
mixins: [myMinix],
data() {
return {
typeOptions: [{value: "", label: "全部"}, {value: "error", label: "错误信息"}, {value: "warning",label: "警告信息"}, {value: "info", label: "正常信息"}],
downloadTypeOptions: [{value: "", label: "全部"}, {value: "auto", label: "自动"}, {value: "manual",label: "手动"},{value: "import",label: "导入"}],
queryParams: {
page: 1,
limit: 10,
type: "",
downloadType: ''
},
dialog: {
visible: false,
type:"",
msg:"",
content: ""
},
}
},
methods:{
getList() {
this.loading = true;
GetList(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.loading = false;
this.list = res.data.list || [];
this.total = res.data.total || 0;
}).catch(error => {
this.$message.error(error);
this.loading = false;
})
},
getType(type) {
return this.selectDictLabel(this.typeOptions,type);
},
getDownloadType(type){
return this.selectDictLabel(this.downloadTypeOptions,type);
},
rowStyle({row,rowIndex}){
let rowBackground={};
if(row.type == 'error'){
//rowBackground.background="#f6f5ee";
rowBackground.color='#f60303';
}
return rowBackground;
},
showContent(row) {
console.log(JSON.stringify(row));
this.dialog.type = row.type;
this.dialog.msg = row.msg;
this.dialog.content = row.content;
this.dialog.visible = true;
},
downloadData(fdate){
}
}
}
</script>
<style scoped>
</style>

@ -0,0 +1,96 @@
<template>
<div>
<el-card class="el-card">
<el-form
:inline="true"
:model="queryParams"
size="mini"
>
<el-form-item label="名称">
<el-input
v-model="queryParams.name"
size="mini"
placeholder="请输入名称"
></el-input>
</el-form-item>
<el-form-item>
<span style="color: #000; margin-left: 10px; margin-right: 6px"
>日期:</span
>
<el-date-picker
:picker-options="pickerOptions"
v-model="dateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="onSubmit"
>查询
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
>
<el-table-column label="序号" type="index"/>
<el-table-column label="生产企业id" prop="manufactureId"/>
<el-table-column label="生产企业编码" prop="manufactureCode"/>
<el-table-column label="生产企业名称" prop="manufactureName"/>
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
<el-table-column label="更新时间" align="center" prop="updateTime" :show-overflow-tooltip="true"/>
</el-table>
<el-pagination
:current-page="queryParams.page"
:page-size="queryParams.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
</div>
</template>
<script>
import {GetList} from "@/api/udplat/udplatManufacture";
import myMinix from './minixs/commMinixs';
export default {
name: "udplatManufacture",
mixins:[myMinix],
methods:{
getList() {
this.loading = true;
GetList(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.loading = false;
this.list = res.data.list || [];
this.total = res.data.total || 0;
}).catch(error => {
this.$message.error(error);
this.loading = false;
})
}
}
}
</script>
<style scoped>
</style>

@ -1,6 +1,7 @@
module.exports = {
baseUrl: process.env.NODE_ENV === "production" ? "./" : "/",
outputDir: process.env.outputDir,
//assetsDir: 'static',
configureWebpack: config => {
if (process.env.NODE_ENV === "production") {
// 为生产环境修改配置...
@ -15,7 +16,14 @@ module.exports = {
// 为开发环境修改配置...
'source-map'
}
/*config.performance={
hints:'warning',
maxEntrypointSize:500000000,
maxAssetSize:50000000,
assetFilter:function (assetFilename){
return assetFilename.endsWith('.js');
}
}*/
},
chainWebpack: config => {
config.plugin("html").tap(args => {

Loading…
Cancel
Save