diff --git a/src/App.vue b/src/App.vue
index ca9fb64..27bfe88 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -19,7 +19,7 @@ export default {
watch: {
$route(to, from) {
const locationHash = window.location.hash
-
+ console.log("locationHash",locationHash)
this.$matomo.setCustomUrl(locationHash.replace(/#/g, ''))
this.$matomo.trackPageView(to.meta.title) // 设置页面名称
}
diff --git a/src/permission.js b/src/permission.js
index 1b9b37a..a799196 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -68,7 +68,7 @@ router.beforeEach(async(to, from, next) => {
// remove token and go to login page to re-login
await store.dispatch('user/resetToken')
Message.error(error || 'Has Error')
- next(`/login?redirect=${to.path}`)
+ next(`/login?redirect=${to.fullPath}`)
NProgress.done()
}
}
@@ -91,6 +91,17 @@ router.beforeEach(async(to, from, next) => {
} catch (e) {
next('/login')
}
+ }else if(to.query.auth_token && to.query.oaType==='contractSign' && to.query.contractId){
+ try {
+ await store.dispatch('user/loginskip', {
+ token: to.query.auth_token,
+ tp: 'inner'
+ })
+ next(to.fullPath?to.fullPath.slice(1): '/')
+ } catch (e) {
+ console.log("e",e)
+ next('/login')
+ }
} else {
// other pages that do not have permission to access are redirected to the login page.
next(`/login?redirect=${to.path}`)
diff --git a/src/views/contract/components/contractSign.vue b/src/views/contract/components/contractSign.vue
index ad990c6..3d6c7db 100644
--- a/src/views/contract/components/contractSign.vue
+++ b/src/views/contract/components/contractSign.vue
@@ -286,13 +286,12 @@
label: '付款日期',
width: 160,
customFn: row => {
- return ( <
- el - date - picker style = 'width: 130px;'
+ return ( < /el-date-picker>
+ value-format = 'yyyy-MM-dd' >
)
}
},
@@ -301,8 +300,7 @@
label: '金额',
width: 180,
customFn: row => {
- return ( <
- el - input - number size = 'mini'
+ return ( < /el-input-number>
+ } >
)
}
},
@@ -321,8 +319,7 @@
customFn: (row, {
$index
}) => {
- return ( <
- Button type = 'error'
+ return (
)
}
}
@@ -512,7 +509,8 @@
type: 'success',
message: '操作成功'
})
- this.$emit('signSuccess')
+ this.$emit('signSuccess')
+ this.handleOperationSuccess()
})
},
// 假设这是子页面的操作完成函数(如提交成功后)
@@ -523,6 +521,7 @@
data: {
status: 'success',
result: '合同签署成功',
+
}
};
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index f10d45d..ffdb0f9 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -107,7 +107,8 @@ export default {
},
watch: {
$route: {
- handler: function(route) {
+ handler: function(route) {
+ console.log("route12",route)
this.redirect = route.query && route.query.redirect
},
immediate: true
@@ -138,6 +139,28 @@ export default {
console.log(error)
this.loading = false
})
+ }
+ // 从oa来的
+ // var url = "http://192.168.60.99:8003/admin/#/contract/contractList?oaType=contractSign&contractId="+
+ // out_contract_id+'&auth_token='+"{{$oatoken}}"
+ console.log("query.auth_token",query)
+ console.log("query.auth_token",query.auth_token)
+ console.log("oa跳转来的",this.redirect)
+ if(query.auth_token && query.oaType==='contractSign' && query.contractId){
+ console.log("oa跳转来的",this.redirect)
+ this.loading = true
+ this.$store.dispatch('user/loginskip', {
+ token: query.auth_token,
+ tp: 'inner'
+ }).then(() => {
+ this.$router.push({
+ path: this.redirect || '/'
+ })
+ this.loading = false
+ }).catch((error) => {
+ console.log(error)
+ this.loading = false
+ })
}
},
methods: {