国学标签修改
This commit is contained in:
@@ -30,7 +30,9 @@
|
||||
</div>
|
||||
<div style=" border: 1px dashed #bababa;" v-if="currentNode && currentNode.data.isLast == 1"></div>
|
||||
</div>
|
||||
|
||||
<div class="border_box tree_content_box" v-if="currentNode && currentNode.data.isLast == 1">
|
||||
|
||||
<div class="title_box" style="margin-bottom: 10px; height: 40px">
|
||||
<div class="title">
|
||||
<span class="line"></span>已绑定课程列表
|
||||
@@ -38,7 +40,7 @@
|
||||
size="mini">新增</el-button>
|
||||
|
||||
<!-- <div style="" class="button_box"> -->
|
||||
<el-button plain type="danger" @click="handleCheckAllChange(true)" size="mini">清空</el-button>
|
||||
<!-- <el-button plain type="danger" @click="handleCheckAllChange(true)" size="mini">清空</el-button> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -178,19 +180,22 @@ export default {
|
||||
url: this.$http.adornUrl(`${this.urlList.saveShop}`),
|
||||
method: "post",
|
||||
data: this.$http.adornData({
|
||||
productId: ids,
|
||||
bookLabelId: this.addForm.id,
|
||||
courseId: ids,
|
||||
sociologyId: this.addForm.id,
|
||||
}),
|
||||
}).then(async ({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message.success(data.msg);
|
||||
if (this.$refs.commonShop) {
|
||||
this.$refs.commonShop.getAssociatedGoodsList({
|
||||
bookLabelId: this.addForm.id,
|
||||
courseId: this.addForm.id,
|
||||
});
|
||||
}
|
||||
if (this.$refs.commonShopTable) {
|
||||
|
||||
this.$refs.commonShopTable.close();
|
||||
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -202,7 +207,7 @@ export default {
|
||||
this.isEdit = false;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.commonShopTable.open(this.addForm.id);
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
handleChangeIsLast(e) {
|
||||
@@ -255,7 +260,7 @@ export default {
|
||||
await this.$refs[formName].validate(async (valid) => {
|
||||
if (valid) {
|
||||
await this.$http({
|
||||
url: this.$http.adornUrl(`${this.addForm.id?this.urlList.edit:this.urlList.add}`),
|
||||
url: this.$http.adornUrl(`${this.addForm.id ? this.urlList.edit : this.urlList.add}`),
|
||||
method: "post",
|
||||
data: this.$http.adornData({
|
||||
...this.addForm,
|
||||
@@ -264,9 +269,9 @@ export default {
|
||||
if (data && data.code === 0) {
|
||||
await this.getDataList();
|
||||
this.$nextTick(async () => {
|
||||
this.$refs.commonTree.setCurrentNodeShow(data.result.id);
|
||||
this.addForm = data.result;
|
||||
this.currentNode = { data: { ...data.result } }
|
||||
this.$refs.commonTree.setCurrentNodeShow(data.sociology.id);
|
||||
this.addForm = data.sociology;
|
||||
this.currentNode = { data: { ...data.sociology } }
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
@@ -285,14 +290,15 @@ export default {
|
||||
}, 200),
|
||||
//删除关联图书
|
||||
dataFormDelete: debounce(async function (row, deleteType) {
|
||||
this.$confirm(`确定要删除${deleteType != 'all' ? '该' : '所有'}关联商品嘛?`, "提示", {
|
||||
console.log('row at line 292:', row)
|
||||
this.$confirm(`确定要删除${deleteType != 'all' ? '该' : '所有'}关联课程吗?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(async () => {
|
||||
var lableIds = row[0].bookLabelId
|
||||
var productIds = row.map(e => e.productId)
|
||||
// var lableIds = row[0].bookLabelId
|
||||
var bindId = row.bindId
|
||||
|
||||
// // return false
|
||||
// var selectShopArr = this.$refs.commonShop.selectShopArr;
|
||||
@@ -305,24 +311,29 @@ export default {
|
||||
this.$refs.commonShop.dataListLoading = true;
|
||||
await this.$http({
|
||||
url: this.$http.adornUrl(
|
||||
`${this.urlList.deleteShop}?lableId=${this.addForm.id}&productId=${productIds.toString(",")}`
|
||||
// `${this.urlList.deleteShop}?id=${this.addForm.id}&sociologyId=${sociologyId.toString(",")}`
|
||||
`${this.urlList.deleteShop}`
|
||||
|
||||
),
|
||||
method: "post",
|
||||
data: this.$http.adornData({
|
||||
id: bindId
|
||||
}),
|
||||
}).then(async ({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message.success("删除成功");
|
||||
|
||||
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}this.$nextTick(() => {
|
||||
// this.$refs.commonShop.selectShopArr = [];
|
||||
if (this.$refs.commonShop) {
|
||||
this.$refs.commonShop.getAssociatedGoodsList({
|
||||
bookLabelId: this.addForm.id,
|
||||
});
|
||||
}
|
||||
} this.$nextTick(() => {
|
||||
// this.$refs.commonShop.selectShopArr = [];
|
||||
if (this.$refs.commonShop) {
|
||||
this.$refs.commonShop.getAssociatedGoodsList({
|
||||
bookLabelId: this.addForm.id,
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
|
||||
Reference in New Issue
Block a user