Browse Source

Merge branch 'develop' of jianguan-web/jg-ocs-html into master

陈瑞 3 years ago
parent
commit
9065bda37b
2 changed files with 7 additions and 1 deletions
  1. 5 1
      src/views/power/user/userList.vue
  2. 2 0
      src/views/power/user/userModal.vue

+ 5 - 1
src/views/power/user/userList.vue

@@ -76,7 +76,7 @@
         </span>
       </s-table>
     </a-spin>
-    <userModal :visible="showModal" @refresh="$refs.table.refresh(true)" :nowData="itemData" @close="showModal = false"></userModal>
+    <userModal :visible="showModal" @refresh="$refs.table.refresh(true)" :nowData="itemData" @close="closeModal"></userModal>
     <!-- 分区设置 -->
     <UpdateArea ref="UpdateArea" :openUdModal="openUdModal" @ok="$refs.table.refresh(true)" @close="openUdModal=false"></UpdateArea>
   </a-card>
@@ -140,6 +140,10 @@ export default {
       this.showModal = true
       this.itemData = null
     },
+    closeModal () {
+      this.showModal = false
+      this.itemData = null
+    },
     // 重置
     reset () {
       this.queryParam.name = ''

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

@@ -172,6 +172,8 @@ export default {
           params.roleNames = _this.form.roleNames.join(',')
           if (_this.nowData && _this.nowData.id) {
             params.id = _this.nowData.id
+          } else {
+            delete params.id
           }
           _this.spinning = true
           saveUserPower(params).then(res => {