From 4c5f0d81db1534e01ec9a8aa9fb49136a6ca31bd Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 14 May 2024 17:07:44 +0800 Subject: [PATCH] fix --- public/favicon.ico | Bin 4286 -> 0 bytes src/utils/http.js | 17 +++++++---------- src/views/Transaction.vue | 34 +++++----------------------------- 3 files changed, 12 insertions(+), 39 deletions(-) delete mode 100644 public/favicon.ico diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index df36fcfb72584e00488330b560ebcf34a41c64c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4286 zcmds*O-Phc6o&64GDVCEQHxsW(p4>LW*W<827=Unuo8sGpRux(DN@jWP-e29Wl%wj zY84_aq9}^Am9-cWTD5GGEo#+5Fi2wX_P*bo+xO!)p*7B;iKlbFd(U~_d(U?#hLj56 zPhFkj-|A6~Qk#@g^#D^U0XT1cu=c-vu1+SElX9NR;kzAUV(q0|dl0|%h|dI$%VICy zJnu2^L*Te9JrJMGh%-P79CL0}dq92RGU6gI{v2~|)p}sG5x0U*z<8U;Ij*hB9z?ei z@g6Xq-pDoPl=MANPiR7%172VA%r)kevtV-_5H*QJKFmd;8yA$98zCxBZYXTNZ#QFk2(TX0;Y2dt&WitL#$96|gJY=3xX zpCoi|YNzgO3R`f@IiEeSmKrPSf#h#Qd<$%Ej^RIeeYfsxhPMOG`S`Pz8q``=511zm zAm)MX5AV^5xIWPyEu7u>qYs?pn$I4nL9J!=K=SGlKLXpE<5x+2cDTXq?brj?n6sp= zphe9;_JHf40^9~}9i08r{XM$7HB!`{Ys~TK0kx<}ZQng`UPvH*11|q7&l9?@FQz;8 zx!=3<4seY*%=OlbCbcae?5^V_}*K>Uo6ZWV8mTyE^B=DKy7-sdLYkR5Z?paTgK-zyIkKjIcpyO z{+uIt&YSa_$QnN_@t~L014dyK(fOOo+W*MIxbA6Ndgr=Y!f#Tokqv}n<7-9qfHkc3 z=>a|HWqcX8fzQCT=dqVbogRq!-S>H%yA{1w#2Pn;=e>JiEj7Hl;zdt-2f+j2%DeVD zsW0Ab)ZK@0cIW%W7z}H{&~yGhn~D;aiP4=;m-HCo`BEI+Kd6 z={Xwx{TKxD#iCLfl2vQGDitKtN>z|-AdCN|$jTFDg0m3O`WLD4_s#$S diff --git a/src/utils/http.js b/src/utils/http.js index 5641223..6da8171 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -1,6 +1,4 @@ import axios from 'axios'; -import QS from 'qs'; -// import store from '../store/index' import { Message } from 'element-ui' import router from '../router/index' import store from '@/store' @@ -18,7 +16,7 @@ if(isKd){ host = 'http://124.71.12.62:9000'; // 巢湖版 } else if (dev) { host = 'http://121.37.12.51'; - host = 'http://192.168.31.217:9000'; + host = 'http://192.168.31.51:9000'; } } @@ -33,6 +31,7 @@ service.defaults.timeout = 1000000000; // post请求头 service.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'; +let logouted = 0; // 请求拦截器 service.interceptors.request.use(config => { // 存在将token写入 request header @@ -70,9 +69,12 @@ service.interceptors.request.use(config => { // 未登录则跳转登录页面,并携带当前页面的路径 // 在登录成功后返回当前页面,这一步需要在登录页操作。 case 401: - Message.error("登录过期,请重新登录"); + if (!logouted) { + Message.error("登录过期,请重新登录"); setTimeout(logouts,1500) - break; + logouted = 1 + } + break; case 500: Message.error("网络错误"); break; @@ -104,17 +106,12 @@ service.interceptors.request.use(config => { function logouts(){ let referrer = store.state.referrer store.replaceState({}) - sessionStorage.removeItem('kd_client_username') if (referrer) { location.href = referrer } else { window.history.back() } } -let tokenStatus = { - 0: '用户未登录,请登录后操作!', - 1: 'token错误,请重新登录!' -} function get(url, params) { return new Promise((resolve, reject) => { diff --git a/src/views/Transaction.vue b/src/views/Transaction.vue index 71051a6..7fb198d 100644 --- a/src/views/Transaction.vue +++ b/src/views/Transaction.vue @@ -122,7 +122,6 @@ @@ -553,7 +552,6 @@ export default { tableData: [], // 规则表格数据 tableDataCopy: [], // 规则表格数据备份 isAddRule: false, // 是否禁用新增规则按钮 - itemkey: '', judgePoints: false,//判断是否点了编辑 configVisible: false, SelectedObj: [], @@ -671,9 +669,6 @@ export default { this.businessList = lcRecords }).catch(res => { }) } - // this.$post(`${this.api[this.isSt ? 'getAllBusinessSt' : 'getAllBusiness']}?systemId=${this.systemId}`).then(({ stRecords, lcRecords }) => { - // this.businessList = this.isSt ? stRecords : lcRecords - // }).catch(res => { }) }, handleSelectionChange (val) { this.multipleSelection = val @@ -921,15 +916,6 @@ export default { } }, getTreeData () { // 获取树结构数据 - // if(this.treeDataStore.length) { - // const tmp = deepCopy(this.treeDataStore) - // this.treeData = this.toTreeId(tmp); - // if (this.$route.query.lcId) { - // this.lcId = this.$route.query.lcId; - // this.getInfoData(this.$route.query.lcId); - // } - // this.loading = false - // }else { this.$post(`${this.api[this.isSt ? 'getProcessSt' : 'getProcess']}?systemId=${this.systemId}`).then(({ process, status, message }) => { if (status == 200) { if (process.length) { @@ -947,7 +933,6 @@ export default { }).catch(err => { this.loading = false }); - // } }, toTreeId (data, parentId) { // id重新串连成(父+子+孙),已便达到树节点需要的key唯一性,且后面提交数据,需要传这个id串到后台 const name = this.isSt ? 'recordChildren' : 'children' @@ -1257,19 +1242,10 @@ export default { type: "warning", center: true }).then(() => { - if (index + 1 == this.tableData.length) { - this.tableData.splice(index - 1, 2) - } else { - this.tableData.splice(index, 2); - } - this.itemkey = Math.random() + this.tableData.splice(index + 1 == this.tableData.length ? index - 1 : index, 2) + let i = 0 this.tableData.forEach(async (item, index) => { - // 勾选树节点 - if (item.operationIds) { - this.$nextTick(() => { - // this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]); - }); - } + if (item.isSubject) item.index = i++ // 根据题目id,获取题目信息 if (item.isSubject && item.type && item.type != 4 && item.emptyOne) { await this.getSubjectData(item.emptyOne, index); @@ -1297,9 +1273,9 @@ export default { this.tableData.splice(index === this.tableData.length - 1 ? index - 1 : index, 2) } }) - this.setIndex() - this.itemkey = Math.random() + let i = 0 this.tableData.forEach(async (item, index) => { + if (item.isSubject) item.index = i++ // 根据题目id,获取题目信息 if (item.isSubject && item.type && item.type != 4 && item.emptyOne) { await this.getSubjectData(item.emptyOne, index);