yujialong 6 months ago
parent a6040e5cad
commit 4c5f0d81db
  1. BIN
      public/favicon.ico
  2. 17
      src/utils/http.js
  3. 34
      src/views/Transaction.vue

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

@ -1,6 +1,4 @@
import axios from 'axios'; import axios from 'axios';
import QS from 'qs';
// import store from '../store/index'
import { Message } from 'element-ui' import { Message } from 'element-ui'
import router from '../router/index' import router from '../router/index'
import store from '@/store' import store from '@/store'
@ -18,7 +16,7 @@ if(isKd){
host = 'http://124.71.12.62:9000'; // 巢湖版 host = 'http://124.71.12.62:9000'; // 巢湖版
} else if (dev) { } else if (dev) {
host = 'http://121.37.12.51'; 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请求头 // post请求头
service.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'; service.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';
let logouted = 0;
// 请求拦截器 // 请求拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
// 存在将token写入 request header // 存在将token写入 request header
@ -70,9 +69,12 @@ service.interceptors.request.use(config => {
// 未登录则跳转登录页面,并携带当前页面的路径 // 未登录则跳转登录页面,并携带当前页面的路径
// 在登录成功后返回当前页面,这一步需要在登录页操作。 // 在登录成功后返回当前页面,这一步需要在登录页操作。
case 401: case 401:
Message.error("登录过期,请重新登录"); if (!logouted) {
Message.error("登录过期,请重新登录");
setTimeout(logouts,1500) setTimeout(logouts,1500)
break; logouted = 1
}
break;
case 500: case 500:
Message.error("网络错误"); Message.error("网络错误");
break; break;
@ -104,17 +106,12 @@ service.interceptors.request.use(config => {
function logouts(){ function logouts(){
let referrer = store.state.referrer let referrer = store.state.referrer
store.replaceState({}) store.replaceState({})
sessionStorage.removeItem('kd_client_username')
if (referrer) { if (referrer) {
location.href = referrer location.href = referrer
} else { } else {
window.history.back() window.history.back()
} }
} }
let tokenStatus = {
0: '用户未登录,请登录后操作!',
1: 'token错误,请重新登录!'
}
function get(url, params) { function get(url, params) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {

@ -122,7 +122,6 @@
<el-table class="lc-table" <el-table class="lc-table"
:data="tableData" :data="tableData"
:stripe="true" :stripe="true"
:key="itemkey"
row-key="i" row-key="i"
header-align="center" header-align="center"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
@ -553,7 +552,6 @@ export default {
tableData: [], // tableData: [], //
tableDataCopy: [], // tableDataCopy: [], //
isAddRule: false, // isAddRule: false, //
itemkey: '',
judgePoints: false,// judgePoints: false,//
configVisible: false, configVisible: false,
SelectedObj: [], SelectedObj: [],
@ -671,9 +669,6 @@ export default {
this.businessList = lcRecords this.businessList = lcRecords
}).catch(res => { }) }).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) { handleSelectionChange (val) {
this.multipleSelection = val this.multipleSelection = val
@ -921,15 +916,6 @@ export default {
} }
}, },
getTreeData () { // 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 }) => { this.$post(`${this.api[this.isSt ? 'getProcessSt' : 'getProcess']}?systemId=${this.systemId}`).then(({ process, status, message }) => {
if (status == 200) { if (status == 200) {
if (process.length) { if (process.length) {
@ -947,7 +933,6 @@ export default {
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
}); });
// }
}, },
toTreeId (data, parentId) { // id++,便key,id toTreeId (data, parentId) { // id++,便key,id
const name = this.isSt ? 'recordChildren' : 'children' const name = this.isSt ? 'recordChildren' : 'children'
@ -1257,19 +1242,10 @@ export default {
type: "warning", type: "warning",
center: true center: true
}).then(() => { }).then(() => {
if (index + 1 == this.tableData.length) { this.tableData.splice(index + 1 == this.tableData.length ? index - 1 : index, 2)
this.tableData.splice(index - 1, 2) let i = 0
} else {
this.tableData.splice(index, 2);
}
this.itemkey = Math.random()
this.tableData.forEach(async (item, index) => { this.tableData.forEach(async (item, index) => {
// if (item.isSubject) item.index = i++
if (item.operationIds) {
this.$nextTick(() => {
// this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]);
});
}
// id, // id,
if (item.isSubject && item.type && item.type != 4 && item.emptyOne) { if (item.isSubject && item.type && item.type != 4 && item.emptyOne) {
await this.getSubjectData(item.emptyOne, index); 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.tableData.splice(index === this.tableData.length - 1 ? index - 1 : index, 2)
} }
}) })
this.setIndex() let i = 0
this.itemkey = Math.random()
this.tableData.forEach(async (item, index) => { this.tableData.forEach(async (item, index) => {
if (item.isSubject) item.index = i++
// id, // id,
if (item.isSubject && item.type && item.type != 4 && item.emptyOne) { if (item.isSubject && item.type && item.type != 4 && item.emptyOne) {
await this.getSubjectData(item.emptyOne, index); await this.getSubjectData(item.emptyOne, index);

Loading…
Cancel
Save