|
@@ -110,6 +110,7 @@ export default { |
|
@@ -110,6 +110,7 @@ export default { |
|
110
|
event: 'cancel',
|
110
|
event: 'cancel',
|
|
111
|
}],
|
111
|
}],
|
|
112
|
currentUserId: '',
|
112
|
currentUserId: '',
|
|
|
|
113
|
+ createById: '',
|
|
113
|
}
|
114
|
}
|
|
114
|
},
|
115
|
},
|
|
115
|
computed: {
|
116
|
computed: {
|
|
@@ -120,12 +121,14 @@ export default { |
|
@@ -120,12 +121,14 @@ export default { |
|
120
|
const isAudit = status === 'AUDIT';
|
121
|
const isAudit = status === 'AUDIT';
|
|
121
|
const isPass = status === 'PASS';
|
122
|
const isPass = status === 'PASS';
|
|
122
|
const isRefuse = status === 'REFUSE';
|
123
|
const isRefuse = status === 'REFUSE';
|
|
|
|
124
|
+ console.log('displayButtons__', row);
|
|
|
|
125
|
+ console.log('this.currentUserId', this.currentUserId);
|
|
123
|
return [
|
126
|
return [
|
|
124
|
{ ...this.buttons[0], visible: (isAudit || isPass)&& this.form?.showExamineDetail === true && this.$auth.hasPermi('agreement-manage:domestic-agreement:view') },
|
127
|
{ ...this.buttons[0], visible: (isAudit || isPass)&& this.form?.showExamineDetail === true && this.$auth.hasPermi('agreement-manage:domestic-agreement:view') },
|
|
125
|
{ ...this.buttons[1], visible: isAudit && this.form?.showExamine === true && this.$auth.hasPermi('agreement-manage:domestic-agreement:approve') },
|
128
|
{ ...this.buttons[1], visible: isAudit && this.form?.showExamine === true && this.$auth.hasPermi('agreement-manage:domestic-agreement:approve') },
|
|
126
|
{ ...this.buttons[2], visible: this.$auth.hasPermi('agreement-manage:domestic-agreement:modify') },
|
129
|
{ ...this.buttons[2], visible: this.$auth.hasPermi('agreement-manage:domestic-agreement:modify') },
|
|
127
|
- { ...this.buttons[3], visible: (isDraft || isRefuse) && row.createById === this.currentUserId&& this.$auth.hasPermi('agreement-manage:domestic-agreement:submit') },
|
|
|
|
128
|
- { ...this.buttons[4], visible:(isRefuse || !status) && this.currentUserId === row?.createById && this.$auth.hasPermi('agreement-manage:domestic-agreement:cancel') },
|
130
|
+ { ...this.buttons[3], visible: (isDraft || isRefuse) && this.createById === this.currentUserId && this.$auth.hasPermi('agreement-manage:domestic-agreement:submit') },
|
|
|
|
131
|
+ { ...this.buttons[4], visible:(isRefuse || !status) && this.currentUserId === this.createById && this.$auth.hasPermi('agreement-manage:domestic-agreement:cancel') },
|
|
129
|
]
|
132
|
]
|
|
130
|
},
|
133
|
},
|
|
131
|
approvalStatusVisible() {
|
134
|
approvalStatusVisible() {
|
|
@@ -134,6 +137,7 @@ export default { |
|
@@ -134,6 +137,7 @@ export default { |
|
134
|
},
|
137
|
},
|
|
135
|
onLoad(query) {
|
138
|
onLoad(query) {
|
|
136
|
this.id = (query && query.id) || ''
|
139
|
this.id = (query && query.id) || ''
|
|
|
|
140
|
+ this.createById = (query && query.createById) || ''
|
|
137
|
this.loadDicData()
|
141
|
this.loadDicData()
|
|
138
|
this.loadDetail()
|
142
|
this.loadDetail()
|
|
139
|
this.getUserInfo()
|
143
|
this.getUserInfo()
|
|
@@ -241,7 +245,8 @@ export default { |
|
@@ -241,7 +245,8 @@ export default { |
|
241
|
async getUserInfo() {
|
245
|
async getUserInfo() {
|
|
242
|
try {
|
246
|
try {
|
|
243
|
var res = await getInfo()
|
247
|
var res = await getInfo()
|
|
244
|
- this.currentUserId = (res && res.id) ? res.id : ''
|
248
|
+ console.log('getUserInfo__', res);
|
|
|
|
249
|
+ this.currentUserId = res.data.id || ''
|
|
245
|
} catch (e) {
|
250
|
} catch (e) {
|
|
246
|
this.currentUserId = ''
|
251
|
this.currentUserId = ''
|
|
247
|
}
|
252
|
}
|