Forráskód Böngészése

问题重启权限

董玉雪 7 hónapja
szülő
commit
4b259fb8a4

+ 0 - 1
src_product/iam/audit/question/_import-components/audit-question-list-import.js

@@ -27,4 +27,3 @@ export default {
   SdGroupPicker,
   SdSelect,
 }
-console.warn('文件名 audit-question-list.vue 不符合命名规则,应该以 iam 开头')

+ 30 - 16
src_product/iam/audit/question/audit-question-list.vue

@@ -628,7 +628,9 @@ export default {
             if (
               record.endType === '5' &&
               record.problemNature === 'wt' &&
-              record.auditedContactsAccount === getUserInfo().account
+              (record.auditedContactsAccount === getUserInfo().account ||
+                record.resppersonsAccount === getUserInfo().account ||
+                this.isQuestionRestarterAcmin)
             ) {
               return (
                 <span>
@@ -707,11 +709,18 @@ export default {
       rectTypeOpinions: [],
       cancellStatusOptions: [],
       confirmStatusOptions: [],
+      isQuestionRestarterAcmin: false,
     }
   },
   mounted() {
     // 初始化数据字典信息
     this.initDictionaryInfo()
+
+    const adminRole = getUserInfo().roles.find((item) => {
+      return item.code === 'G-1_Question_restart'
+    })
+    console.log(adminRole)
+    this.isQuestionRestarterAcmin = adminRole
   },
   methods: {
     yearChange(value) {
@@ -842,22 +851,27 @@ export default {
 
     // 问题重启
     questionReboot(record) {
-      axios({
-        url: 'api/xcoa-mobile/v1/spic-common/restart-feedback?id=' + record.questionId,
-        method: 'get',
-      }).then((res) => {
-        if (res.data) {
-          Modal.info({
-            title: '提示',
-            content: '重启成功!',
-          })
-          this.refresh()
-        } else {
-          Modal.warning({
-            title: '提示',
-            content: '重启失败,请联系管理员!',
+      Modal.confirm({
+        title: '确认重启问题吗?',
+        onOk: () => {
+          axios({
+            url: 'api/xcoa-mobile/v1/spic-common/restart-feedback?id=' + record.questionId,
+            method: 'get',
+          }).then((res) => {
+            if (res.data) {
+              Modal.info({
+                title: '提示',
+                content: '重启成功!',
+              })
+              this.refresh()
+            } else {
+              Modal.warning({
+                title: '提示',
+                content: '重启失败,请联系管理员!',
+              })
+            }
           })
-        }
+        },
       })
     },