|
@@ -24,7 +24,7 @@
|
|
<el-checkbox
|
|
<el-checkbox
|
|
:true-label="1"
|
|
:true-label="1"
|
|
:false-label="0"
|
|
:false-label="0"
|
|
- @change="(val) => changeStatus(props.scope.row.tpId, val)"
|
|
|
|
|
|
+ @change="(val) => changeStatus(props.scope.row, val)"
|
|
v-model="props.scope.row.defaultStatus"
|
|
v-model="props.scope.row.defaultStatus"
|
|
>
|
|
>
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
@@ -133,18 +133,17 @@ export default {
|
|
this.type = type;
|
|
this.type = type;
|
|
this.tpId = tpId;
|
|
this.tpId = tpId;
|
|
},
|
|
},
|
|
- changeStatus(tpId, defaultStatus) {
|
|
|
|
- editDefaultStatus({ tpId, defaultStatus }).then((res) => {
|
|
|
|
|
|
+ changeStatus({ tpId, tenantId }, defaultStatus) {
|
|
|
|
+ editDefaultStatus({ tpId, tenantId, defaultStatus }).then((res) => {
|
|
this.$message.success("状态修改成功");
|
|
this.$message.success("状态修改成功");
|
|
this.search();
|
|
this.search();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
batchDel() {
|
|
batchDel() {
|
|
- let len = this.$refs.tableList.allCheckData.length;
|
|
|
|
- if (!len) {
|
|
|
|
|
|
+ const ids = this.$refs.tableList.allCheckData.map((item) => item.tpId);
|
|
|
|
+ if (!ids.length) {
|
|
return this.$message.warning("请先勾选模板");
|
|
return this.$message.warning("请先勾选模板");
|
|
}
|
|
}
|
|
- const ids = this.$refs.tableList.allCheckData.map((item) => item.tpId);
|
|
|
|
this.handelDel(ids, 1);
|
|
this.handelDel(ids, 1);
|
|
},
|
|
},
|
|
handelDel(tpId, type = 0) {
|
|
handelDel(tpId, type = 0) {
|