Commit 613c81be authored by YangAo's avatar YangAo 🇨🇳

58279 bug 解决

parent 2f61722a
...@@ -378,6 +378,8 @@ export default { ...@@ -378,6 +378,8 @@ export default {
policyId: 0, policyId: 0,
// 当前用户id // 当前用户id
userId: 0, userId: 0,
// 用户当前关联企业id
currentEnterpriseId: 0,
// 当前用户有关企业 // 当前用户有关企业
enterpriseWithUser: [], enterpriseWithUser: [],
// 政策发文部门 // 政策发文部门
...@@ -413,13 +415,16 @@ export default { ...@@ -413,13 +415,16 @@ export default {
// 申报按钮是否禁用 // 申报按钮是否禁用
declareButtonDisable() { declareButtonDisable() {
const enterpriseWithUser = this.enterpriseWithUser const enterpriseWithUser = this.enterpriseWithUser
// 获取当前用户已申报 // 用户未登录时不进行按钮禁用
return this.otherInfo.disableDeclareButton || return this.userId !== null && (
// 获取当前用户已申报
this.otherInfo.disableDeclareButton ||
// 当前用户未绑定企业 // 当前用户未绑定企业
enterpriseWithUser.length <= 0 || enterpriseWithUser.length <= 0 ||
// 当前用户只绑定一个企业 并且不满足申报要求 // 当前用户只绑定一个企业 并且不满足申报要求
enterpriseWithUser.length === 1 && !enterpriseWithUser[0].canDeclare || enterpriseWithUser.length === 1 && !enterpriseWithUser[0].canDeclare ||
!this.info.onTheDeadline !this.info.onTheDeadline
)
}, },
...mapGetters('policyDirect', ['getLabel']) ...mapGetters('policyDirect', ['getLabel'])
}, },
...@@ -448,7 +453,15 @@ export default { ...@@ -448,7 +453,15 @@ export default {
this.detailType = type this.detailType = type
}, },
handleAddDeclare() { handleAddDeclare() {
if (this.otherInfo.disableDeclareButton === null) { if (this.userId === null) {
// 未登录
this.$router.replace({ path: '/login/index', query: { redirect: this.$route.fullPath }})
return
} else if (this.enterpriseWithUser.length === 0) {
// 未绑定企业
this.$message.warning(`请绑定企业后进行申报`)
return
} else if (this.otherInfo.disableDeclareButton === null) {
// 未判断是否收藏 // 未判断是否收藏
this.$message.warning('请等待数据加载后进行操作') this.$message.warning('请等待数据加载后进行操作')
return return
...@@ -649,9 +662,9 @@ export default { ...@@ -649,9 +662,9 @@ export default {
// 高频操作拦截 // 高频操作拦截
if (this.mask.changeStar) return if (this.mask.changeStar) return
this.mask.changeStar = true this.mask.changeStar = true
// 验证是否登录, 未登录弹窗提示 // 验证是否登录, 未登录路由跳转
if (this.userId === null && !getToken()) { if (this.userId === null && !getToken()) {
this.MessageTipsForLogin() this.$router.replace({ path: '/login/index', query: { redirect: this.$route.fullPath }})
// 延时取消遮罩 // 延时取消遮罩
setTimeout(() => { setTimeout(() => {
this.mask.changeStar = false this.mask.changeStar = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment