Commit d0c20200 by 唐玉峰

兼容问题

parent f46cb409
...@@ -679,11 +679,7 @@ ...@@ -679,11 +679,7 @@
<el-row> <el-row>
<el-table :data="ops" border :header-cell-class-name="headerRowStyle"> <el-table :data="ops" border :header-cell-class-name="headerRowStyle">
<el-table-column prop="opS_CODE" label="手术及操作编码"></el-table-column> <el-table-column prop="opS_CODE" label="手术及操作编码"></el-table-column>
<el-table-column prop="opS_TIME" label="手术及操作日期"> <el-table-column prop="opS_TIME" label="手术及操作日期"> </el-table-column>
<template #default="scope">
{{ scope.row.opS_TIME ? transformTimestamp(scope.row.opS_TIME) : "" }}
</template>
</el-table-column>
<el-table-column prop="opS_LEVEL" label="手术级别"></el-table-column> <el-table-column prop="opS_LEVEL" label="手术级别"></el-table-column>
<el-table-column prop="opS_NAME" label="手术及操作名称"></el-table-column> <el-table-column prop="opS_NAME" label="手术及操作名称"></el-table-column>
<el-table-column label="手术及操作医师"> <el-table-column label="手术及操作医师">
......
...@@ -12,8 +12,6 @@ import { getItem, clear } from "@/utils/auth"; ...@@ -12,8 +12,6 @@ import { getItem, clear } from "@/utils/auth";
import outseeQualityControl from "@/views/outseeQualityControl.vue"; import outseeQualityControl from "@/views/outseeQualityControl.vue";
import outpatientDetails from "@/views/outpatientDetails.vue"; import outpatientDetails from "@/views/outpatientDetails.vue";
import outHistorygrouping from "@/views/outHistorygrouping.vue"; import outHistorygrouping from "@/views/outHistorygrouping.vue";
import outClinicalpathway from "@/views/outClinicalpathway.vue";
import Entrypath from "@/views/Entrypath.vue";
Vue.use(Router); Vue.use(Router);
// const baseUrl = '/his/' // const baseUrl = '/his/'
...@@ -43,18 +41,6 @@ const router = new Router({ ...@@ -43,18 +41,6 @@ const router = new Router({
name: "outHistorygrouping", name: "outHistorygrouping",
component: outHistorygrouping, component: outHistorygrouping,
}, },
//进入路径
{
path: "/Entrypath",
name: "Entrypath",
component: Entrypath,
},
//临床路径外放页面
{
path: "/outClinicalpathway",
name: "outClinicalpathway",
component: outClinicalpathway,
},
//临床路径外放页面 //临床路径外放页面
{ {
......
...@@ -6,17 +6,16 @@ import "element-ui/lib/theme-chalk/index.css"; ...@@ -6,17 +6,16 @@ import "element-ui/lib/theme-chalk/index.css";
import { getItem } from "@/utils/auth"; import { getItem } from "@/utils/auth";
axios.defaults.timeout = 120000; // 响应时间
axios.defaults.timeout = 300 * 1000;
axios.defaults.retry = 1;
axios.defaults.retryDelay = 1000;
axios.defaults.headers.post["Content-Type"] = "application/json;charset=utf-8"; axios.defaults.headers.post["Content-Type"] = "application/json;charset=utf-8";
var domain = "/api/api"; var domain = "/api/api";
function createHeader() { function createHeader() {
const token = getItem("svToken"); const token = getItem("svToken");
return token ? { Authorization: `Bearer ${token}` } : {}; return token ? { Authorization: `Bearer ${token}` } : {};
} }
function errorMsg(d) { function errorMsg(d) {
console.log(d.response); console.log(d.response);
if (d.response.status == "401") { if (d.response.status == "401") {
...@@ -40,7 +39,6 @@ function errorMsg(d) { ...@@ -40,7 +39,6 @@ function errorMsg(d) {
} }
} }
let loadingInstance; let loadingInstance;
let loadingOption = { let loadingOption = {
//加载loading //加载loading
fullscreen: true, fullscreen: true,
...@@ -48,6 +46,19 @@ let loadingOption = { ...@@ -48,6 +46,19 @@ let loadingOption = {
spinner: "el-icon-loading", spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.5)", background: "rgba(0, 0, 0, 0.5)",
}; };
axios.interceptors.request.use(
(config) => {
// 每次发送请求之前判断vuex中是否存在token
// 如果存在,则统一在http请求的header都加上token,这样后台根据token判断你的登录情况
// 即使本地存在token,也有可能token是过期的,所以在响应拦截器中要对返回状态进行判断
const token = getItem("svToken") || undefined;
token && (config.headers.Authorization = `Bearer ${token}`);
return config;
},
(error) => {
return Promise.error(error);
}
);
axios.interceptors.response.use( axios.interceptors.response.use(
(response) => { (response) => {
if (response.status === 200) { if (response.status === 200) {
...@@ -67,12 +78,11 @@ axios.interceptors.response.use( ...@@ -67,12 +78,11 @@ axios.interceptors.response.use(
); );
export default { export default {
post(url, params, option) { post(url, params) {
loadingInstance = Vue.prototype.$loading(loadingOption); loadingInstance = Vue.prototype.$loading(loadingOption);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
axios axios
.post(domain + url, params, { ...{ headers: createHeader() }, ...option }) .post(domain + url, params)
.then((res) => { .then((res) => {
if (res.status !== 200) { if (res.status !== 200) {
errorMsg(res.data); errorMsg(res.data);
...@@ -92,35 +102,12 @@ export default { ...@@ -92,35 +102,12 @@ export default {
}); });
}); });
}, },
//医院的接口数据用
postFn(url, params, option) {
loadingInstance = Vue.prototype.$loading(loadingOption);
return new Promise((resolve, reject) => {
axios
.post(url, params, { ...{ headers: createHeader() }, ...option })
.then((res) => {
console.log(res);
if (res.status !== 200) {
errorMsg(res.data);
reject(res.data);
return;
}
loadingInstance.close();
resolve(res.data);
})
.catch((error) => {
loadingInstance.close();
errorMsg(error);
reject(error);
});
});
},
get(url, option) { get(url, option) {
loadingInstance = Vue.prototype.$loading(loadingOption); loadingInstance = Vue.prototype.$loading(loadingOption);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
axios axios
.get(domain + url, { ...{ headers: createHeader() }, ...option }) .get(domain + url, option)
.then((res) => { .then((res) => {
if (res.status !== 200) { if (res.status !== 200) {
errorMsg(res.data); errorMsg(res.data);
......
...@@ -743,6 +743,8 @@ export default { ...@@ -743,6 +743,8 @@ export default {
// initEcharts(categoryChart11("其他", this.addCorePercents[i].otherPercent, "#C05EF3"), `indexChart11file${i}`); // initEcharts(categoryChart11("其他", this.addCorePercents[i].otherPercent, "#C05EF3"), `indexChart11file${i}`);
// (this.diagList = []), (this.opsList = []); // (this.diagList = []), (this.opsList = []);
// } // }
this.diagList = [];
this.opsList = [];
}) })
.catch((error) => {}); .catch((error) => {});
}, },
......
...@@ -716,6 +716,8 @@ export default { ...@@ -716,6 +716,8 @@ export default {
// initEcharts(categoryChart11("其他", this.addCorePercents[i].otherPercent, "#C05EF3"), `indexChart11file${i}`); // initEcharts(categoryChart11("其他", this.addCorePercents[i].otherPercent, "#C05EF3"), `indexChart11file${i}`);
// (this.diagList = []), (this.opsList = []); // (this.diagList = []), (this.opsList = []);
// } // }
this.diagList = [];
this.opsList = [];
}) })
.catch((error) => {}); .catch((error) => {});
}, },
......
...@@ -716,6 +716,8 @@ export default { ...@@ -716,6 +716,8 @@ export default {
// initEcharts(categoryChart11("其他", this.addCorePercents[i].otherPercent, "#C05EF3"), `indexChart11file${i}`); // initEcharts(categoryChart11("其他", this.addCorePercents[i].otherPercent, "#C05EF3"), `indexChart11file${i}`);
// (this.diagList = []), (this.opsList = []); // (this.diagList = []), (this.opsList = []);
// } // }
this.diagList = [];
this.opsList = [];
}) })
.catch((error) => {}); .catch((error) => {});
}, },
......
...@@ -15,6 +15,9 @@ module.exports = { ...@@ -15,6 +15,9 @@ module.exports = {
publicPath: "./", //导出路径 publicPath: "./", //导出路径
assetsDir: "web", //静态资源文件夹 assetsDir: "web", //静态资源文件夹
productionSourceMap: false, productionSourceMap: false,
configureWebpack: {
devtool: "source-map",
},
devServer: { devServer: {
//测试环境代理 //测试环境代理
port: 8066, //测试端口 port: 8066, //测试端口
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment