zhuangyunsheng 1 år sedan
förälder
incheckning
52649b9dc1
2 ändrade filer med 8 tillägg och 2 borttagningar
  1. 3 1
      src/components/scTable/index.vue
  2. 5 1
      src/views/system/orgPerson/index.vue

+ 3 - 1
src/components/scTable/index.vue

@@ -19,7 +19,9 @@
 						</template>
 					</el-table-column>
 				</template>
-				<slot name="behind"></slot>
+				<template v-if="$slots.behind">
+					<slot name="behind"></slot>
+				</template>
 				<el-table-column class-name="placeholder-cell" min-width="1"></el-table-column>
 				<template #empty>
 					<el-empty description="暂无数据" :image-size="100"></el-empty>

+ 5 - 1
src/views/system/orgPerson/index.vue

@@ -232,9 +232,13 @@
 					type: "warning",
 					confirmButtonText: "删除"
 				}).then(() => {
-					this.$API.system.dept.del({ ids: [deptId] }).then(() => {
+					this.$API.system.dept.del({ deptId }).then(() => {
 						this.$message.success("操作成功");
 						this.getAsideNode();
+						if (this.table.params.deptId == deptId) {
+							this.table.params.deptId = null;
+							this.table.deptName = null;
+						}
 					}).catch(() => {});
 				}).catch(() => {});
 			},