zhuliu 9 months ago
parent
commit
44b917ed9f

+ 5 - 1
src/views/report/InvalidResponse/components/IPREmail/components/dialog/addOrEditIPREmail.vue

@@ -34,7 +34,7 @@ const defaultForm={
   name:null,
   email:null,
   ifDefault:false,
-  reportType:7,
+  reportTypes:[7],
 }
 export default {
   components: {},
@@ -92,10 +92,14 @@ export default {
               if(this.model == "edit"){
                   a = '修改'
               }
+              if(!this.form.ifDefault){
+                this.form.reportTypes = null
+              }
               this.$api[api](this.form).then(response => {
                   if (response.code === 200) {
                       this.btnLoading = false
                       this.$message.success( a + '成功');
+                      this.$emit('close')
                       this.handleClose()
                   }
               })

+ 5 - 2
src/views/report/components/index.vue

@@ -32,7 +32,7 @@
               </el-dropdown-menu>
             </el-dropdown>
             <el-button type="primary" class="margin-left_10 margin-right_10" size="small" @click="showField">显示栏位管理</el-button>
-            <el-button v-if="componentType == 2" type="primary" class="margin-right_10" size="small" @click="IPREmail">IPR邮箱</el-button>
+            <el-button v-if="userinfo.roleType == 1 || userinfo.roleType == 2" type="primary" class="margin-right_10" size="small" @click="IPREmail">IPR邮箱</el-button>
           </div>
 
         </div>
@@ -243,7 +243,10 @@ export default {
         obj.options = a
       }
       return this.$store.state.dictMessage.matter || []
-    }
+    },
+    userinfo(){
+      return this.$s.getObj('userinfo')
+    },
   },
   created() { },
   async mounted() {