diff --git a/.env.development b/.env.development index 4eedb91..9a19918 100644 --- a/.env.development +++ b/.env.development @@ -2,8 +2,8 @@ ENV = 'development' # base api -VUE_APP_BASE_API='http://192.167.20.118:8080/' -#VUE_APP_BASE_API='https://cz-hjjc-test.115.langye.net' +#VUE_APP_BASE_API='http://192.167.20.118:8080/' +VUE_APP_BASE_API='https://cz-hjjc-test.115.langye.net' VUE_APP_UPLOAD_API='https://cz-hjjc-test.115.langye.net/api/upload-file' VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview VUE_APP_OUT_OLD=https://cz-hjjc-test.115.langye.net/oa diff --git a/src/api/away/index.js b/src/api/away/index.js index 76f549a..1d3a146 100644 --- a/src/api/away/index.js +++ b/src/api/away/index.js @@ -1,11 +1,36 @@ import request from '@/utils/request'; +function customParamsSerializer(params) { + let result = ''; + for (let key in params) { + if (params.hasOwnProperty(key)) { + if (Array.isArray(params[key]) && params[key].length > 0) { + params[key].forEach((item,index) => { + if (item instanceof Array) { + item.forEach((item1, index1) => { + result += `${key}[${index}][${index1}]=${item1}&` + }) + } else if (typeof item === 'object') { + for (let key1 in item) { + result += `${key}[${index}][${key1}]=${item[key1]}&` + } + } + // result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`; + }); + } else { + result += `${key}=${params[key]}&`; + } + } + } + return result.slice(0, -1); +} export function index(params,noloading=false) { return request({ method: "get", url: "/api/ht/away/index", params, - noloading + noloading, + paramsSerializer: customParamsSerializer }) } diff --git a/src/api/contract/contract.js b/src/api/contract/contract.js index 30a8907..92c9c44 100644 --- a/src/api/contract/contract.js +++ b/src/api/contract/contract.js @@ -1,11 +1,35 @@ import request from "@/utils/request"; - +function customParamsSerializer(params) { + let result = ''; + for (let key in params) { + if (params.hasOwnProperty(key)) { + if (Array.isArray(params[key])) { + params[key].forEach((item,index) => { + if (item instanceof Array) { + item.forEach((item1, index1) => { + result += `${key}[${index}][${index1}]=${item1}&` + }) + } else if (typeof item === 'object') { + for (let key1 in item) { + result += `${key}[${index}][${key1}]=${item[key1]}&` + } + } + // result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`; + }); + } else { + result += `${key}=${params[key]}&`; + } + } + } + return result.slice(0, -1); +} export function getContract(params,noloading = false){ return request({ method:'get', url:'/api/ht/contract/index', params, - noloading + noloading, + paramsSerializer: customParamsSerializer }) } diff --git a/src/views/away/component/examineAway.vue b/src/views/away/component/examineAway.vue index 6dedbc6..edb74c6 100644 --- a/src/views/away/component/examineAway.vue +++ b/src/views/away/component/examineAway.vue @@ -541,7 +541,7 @@ export default { async getOutAway() { try { - let oaId = this.contract.flow_list.find(i => i.tag === 'chuchaibaoxiao')?.flow_id + let oaId = this.contract.away_flow_links.find(i => i.tag === 'chuchaibaoxiao')?.flow_id const response = await axios.get(`${process.env.VUE_APP_BASE_API}/api/oa/flow/view/${oaId}`,{ headers: { Authorization: `Bearer ${getToken()}` diff --git a/src/views/away/index.vue b/src/views/away/index.vue index 17b2606..fb0656b 100644 --- a/src/views/away/index.vue +++ b/src/views/away/index.vue @@ -52,12 +52,38 @@ 数据类型 + + +
+ 流程状态 +
+