Sfoglia il codice sorgente

网点管理页面样式改版

linwenxin 1 anno fa
parent
commit
735834c17a
1 ha cambiato i file con 7 aggiunte e 7 eliminazioni
  1. 7 7
      src/views/setting/departmentManage/index.vue

+ 7 - 7
src/views/setting/departmentManage/index.vue

@@ -97,8 +97,8 @@
             </el-form-item>
           </el-form>
           <div slot="footer" class="dialog-footer">
-            <el-button @click="data.removeTab">取 消</el-button>
-            <el-button type="primary" @click="submitMainForm">确 定</el-button>
+            <el-button @click="data.removeTab()">取 消</el-button>
+            <el-button type="primary" @click="submitMainForm(data.removeTab)">确 定</el-button>
           </div>
         </div>
       </div>
@@ -254,7 +254,7 @@ export default {
         // 打开时事件
         triggerEvent: () => {
           this.cancelMainForm()
-          this.$nextTick(()=>{
+          this.$nextTick(() => {
             this.mainFormType = type
             this.mainFormVisible = true
             if (type == 'add') {
@@ -279,7 +279,7 @@ export default {
         },
         // 关闭时事件
         closeEvent: () => {
-          
+
         }
       })
     },
@@ -292,7 +292,7 @@ export default {
     },
 
     // 提交 网点表单
-    submitMainForm() {
+    submitMainForm(removeTab) {
       this.$refs.mainForm.validate(valid => {
         if (valid) {
           let parentId = null
@@ -315,15 +315,15 @@ export default {
           if (this.mainFormType == 'edit') {
             params.websitId = this.editId
             editDepartment(params).then(res => {
-              this.cancelMainForm()
               this.getList()
               this.$successMsg('编辑成功')
+              removeTab('list')
             })
           } else {
             addDepartment(params).then(res => {
-              this.cancelMainForm()
               this.getList()
               this.$successMsg('添加成功')
+              removeTab('list')
             })
           }
         }