master
xy 1 year ago
parent 28751ccbfd
commit 0f6ce25211

@ -4,10 +4,10 @@ NODE_ENV = production
ENV = 'staging'
# base api
VUE_APP_BASE_API='https://cz-hjjc.115.langye.net'
VUE_APP_UPLOAD_API='https://cz-hjjc.115.langye.net/api/upload-file'
VUE_APP_BASE_API=''
VUE_APP_UPLOAD_API='/api/upload-file'
VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview
VUE_APP_OUT_OLD=https://cz-hjjc.115.langye.net/oa
VUE_APP_OUT_URL=https://cz-hjjc.115.langye.net/oa
VUE_APP_OUT_OLD = /oa
VUE_APP_OUT_URL = /oa
VUE_APP_MODULE_NAME=ht

@ -61,6 +61,10 @@ import { setToken,getToken } from "@/utils/auth"
if(window.top !== window.self) {
// 当前页面在iframe中
window._IN_IFRAME = true;
Vue.config.errorHandler = (err, vm, info) => {
parent?._addError(err.message, err.stack)
console.error(err)
}
}
if (window.__POWERED_BY_WUJIE__) {
let instance;

@ -14,7 +14,7 @@ let loading;
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
timeout: 500000 // request timeout
timeout: 50000 // request timeout
})
// request interceptor
@ -42,6 +42,7 @@ service.interceptors.request.use(
error => {
// do something with request error
console.log(error) // for debug
parent?._addError(error, 'axios-request', error.config.params||error.config.data)
return Promise.reject(error)
}
)
@ -86,8 +87,12 @@ service.interceptors.response.use(
store.dispatch('user/resetToken').then(() => {
location.reload()
})
if (window._IN_IFRAME) {
parent?._logout()
}
})
}
parent?._addError(res.msg, `axios-response ${response.config.url}`, response.config.params || response.config.data)
return Promise.reject(new Error(res.msg || 'Error'))
} else {
return res.data
@ -97,10 +102,11 @@ service.interceptors.response.use(
loading?.close()
console.error('err' + error) // for debug
Message({
message: /Network Error/g.test(error) ? "网络错误" : "系统错误",
message: /Network Error/g.test(error) ? "网络错误" : (/timeout/g.test(error) ? "网络超时" : "系统错误"),
type: 'error',
duration: 5 * 1000
})
parent?._addError(error.toString(), `axios-request ${error.config.url}`, error.config.params || error.config.data)
return Promise.reject(error)
}
)

@ -51,7 +51,7 @@
<div>
<Button
type="primary"
@click="$router.push('/contract/away/addAway')">新增</Button>
@click="$router.push('/away/addAway')">新增</Button>
</div>
<div>
<Button type="primary" @click="getList"></Button>
@ -405,17 +405,10 @@ export default {
},
methods: {
printFlow (row) {
let id;
if (row.away_flow_id) {
id = row.away_flow_id;
} else if (row.expense_flow_id) {
id = row.expense_flow_id
} else {}
if (!id) {
this.$message.warning("未找到流程");
return
}
window.open(`${process.env.VUE_APP_OUT_URL}/flow/print-relate-flow?id=${id}&except_self=0&auth_token=${this.$store.getters.oa_token}`,"_blank")
let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=`
url += row.away_flow_id
this.oaUrl = url
this.isShowOaModal = true
},
async toOaDetail (tbname,row) {

@ -2474,8 +2474,9 @@ export default {
this.select.is_myself = this.$route.path.split('_')[1] ? Number(this.$route.path.split('_')[1]) : 0;
if (/contractLedger/g.test(this.$route.path)) {
this.select.is_contract = 1;
this.select.purchase_status = 3;
this.select.invite_status = 3;
// TODO:
/// this.select.purchase_status = 3;
// this.select.invite_status = 3;
}
if (/contractAll/g.test(this.$route.path)) {
this.select.is_simple = "";

@ -132,7 +132,7 @@
width="160"
header-align="center"
>
<template slot-scope="scope" v-if="scope.row.flow_status === 3">
<template slot-scope="scope" v-if="authOa(scope.row)">
<template v-if="scope.row.status === 0">
<Button
size="small"
@ -537,6 +537,13 @@ export default {
});
},
},
computed: {
authOa () {
return function (row) {
return row.flow_list.find(i => i.tag === 'pay')?.status === 1
}
}
},
mounted() {
this.getMoneyWay();
this.getFundLogs();

Loading…
Cancel
Save