Browse Source

【ID1006964】bug修复

chenrui 4 năm trước cách đây
mục cha
commit
9a82fe02b4
2 tập tin đã thay đổi với 4 bổ sung37 xóa
  1. 2 17
      src/views/power/role/roleModal.vue
  2. 2 20
      src/views/power/user/userModal.vue

+ 2 - 17
src/views/power/role/roleModal.vue

@@ -47,7 +47,7 @@
           <a-button type="primary" @click="handleSubmit()">
             保存
           </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button :style="{ marginLeft: '8px' }" @click="cancel">
             取消
           </a-button>
         </a-form-item>
@@ -92,11 +92,10 @@ export default {
     }
   },
   methods: {
-    cancel (e) {
+    cancel () {
       this.clear()
       this.$emit('close')
     },
-
     // 保存提交
     handleSubmit () {
       const _this = this
@@ -118,19 +117,6 @@ export default {
         }
       })
     },
-    // 取消
-    handleCancel () {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定取消吗?',
-        centered: true,
-        onOk () {
-          _this.clear()
-          _this.cancel()
-        }
-      })
-    },
     clear () {
       this.form.resetFields()
       delete this.formData.id
@@ -138,7 +124,6 @@ export default {
       this.formData.isEnable = ''
       this.formData.remarks = ''
     }
-
   },
   mounted () {
   },

+ 2 - 20
src/views/power/user/userModal.vue

@@ -118,7 +118,7 @@
           <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '8px' }">
             保存
           </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button :style="{ marginLeft: '8px' }" @click="cancel">
             取消
           </a-button>
         </a-form-item>
@@ -167,11 +167,10 @@ export default {
     }
   },
   methods: {
-    cancel (e) {
+    cancel () {
       this.clear()
       this.$emit('close')
     },
-
     // 保存提交
     handleSubmit () {
       const _this = this
@@ -179,7 +178,6 @@ export default {
         console.log(values, 'values222')
         if (!err) {
           values.formData.roleNames = values.formData.roleNames.join(',')
-
           console.log(values.formData, ' formData.type222222222')
           console.log(Object.assign({ id: this.data.id ? this.data.id : '' }, values.formData))
           saveUserPower(Object.assign({ id: this.data.id ? this.data.id : '' }, values.formData)).then(res => {
@@ -195,19 +193,6 @@ export default {
         }
       })
     },
-    // 取消
-    handleCancel () {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定取消吗?',
-        centered: true,
-        onOk () {
-          _this.clear()
-          _this.cancel()
-        }
-      })
-    },
     clear () {
       this.form.resetFields()
       delete this.formData.id
@@ -218,11 +203,9 @@ export default {
       this.formData.sex = ''
       this.formData.remarks = ''
     },
-
     // 获取角色列表接口
     getRoleList () {
       getRoleList().then(res => {
-        console.log(res, 'res--role')
         if (res.status + '' === '200') {
           this.roleList = res.data
         } else {
@@ -230,7 +213,6 @@ export default {
         }
       })
     }
-
   },
   mounted () {
     this.getRoleList()