国学标签修改
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// const baseUrl = "http://192.168.110.100:9200/pb"; //张川川后端
|
// const baseUrl = "http://168.110.100:9200/pb"; //张川川后端
|
||||||
// const baseUrl = 'http://59.110.212.44:9100/pb'
|
// const baseUrl = 'http://59.110.212.44:9100/pb'
|
||||||
const baseUrl = 'https://testapi.nuttyreading.com'
|
const baseUrl = 'https://testapi.nuttyreading.com'
|
||||||
// const baseUrl = 'https://api.nuttyreading.com'
|
// const baseUrl = 'https://api.nuttyreading.com'
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
style="width: 100%; height: 100%; margin-top: -50px"
|
style="width: 100%; height: 100%;"
|
||||||
|
|
||||||
>
|
>
|
||||||
<!-- <el-form
|
<!-- <el-form
|
||||||
:inline="true"
|
:inline="true"
|
||||||
:model="dataForm"
|
:model="dataForm"
|
||||||
@keyup.enter.native="getDataList()"
|
|
||||||
style="float: right"
|
style="float: right"
|
||||||
>
|
>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.key"
|
v-model="dataForm.keywords"
|
||||||
placeholder="商品名称"
|
placeholder="课程名称"
|
||||||
clearable
|
clearable
|
||||||
size="small"
|
size="small"
|
||||||
></el-input>
|
></el-input>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
@click="
|
@click="
|
||||||
pageIndex = 1;
|
pageIndex = 1;
|
||||||
getDataList(bookMarketId);
|
getDataList();
|
||||||
"
|
"
|
||||||
size="small"
|
size="small"
|
||||||
>查询</el-button
|
>查询</el-button
|
||||||
@@ -29,19 +29,19 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form> -->
|
</el-form> -->
|
||||||
<div class="search_form">
|
<div class="search_form">
|
||||||
<div class="addFormBox shopFormBox">
|
<!-- <div class="addFormBox shopFormBox">
|
||||||
<el-form ref="addForm" label-width="80px" :model="dataForm">
|
<el-form ref="addForm" label-width="80px" :model="dataForm">
|
||||||
<!-- <el-form-item label="商品名称" prop="title" class="form_item">
|
<el-form-item label="课程名称" prop="title" class="form_item">
|
||||||
<el-input
|
<el-input
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请输入商品名称"
|
placeholder="请输入商品名称"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="dataForm.productName"
|
v-model="dataForm.keywords"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item> -->
|
</el-form-item>
|
||||||
<!-- <el-form-item label="商品类型" prop="goodsType" class="form_item">
|
<el-form-item label="商品类型" prop="goodsType" class="form_item">
|
||||||
<el-select
|
<el-select
|
||||||
size="small"
|
size="small"
|
||||||
v-model="dataForm.goodsType"
|
v-model="dataForm.goodsType"
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label=""
|
label=""
|
||||||
@@ -69,12 +69,10 @@
|
|||||||
<el-button @click="getAssociatedGoodsList(dataForm)" size="mini"
|
<el-button @click="getAssociatedGoodsList(dataForm)" size="mini"
|
||||||
>查询</el-button
|
>查询</el-button
|
||||||
>
|
>
|
||||||
<!-- <el-button @click="handleCommonShopReset()" size="mini"
|
|
||||||
>重置</el-button
|
|
||||||
> -->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="shop_box">
|
<div class="shop_box">
|
||||||
@@ -103,14 +101,14 @@
|
|||||||
label="课程ID"
|
label="课程ID"
|
||||||
width="70"
|
width="70"
|
||||||
align="center"
|
align="center"
|
||||||
prop="productId"
|
prop="id"
|
||||||
>
|
>
|
||||||
<!-- <template slot-scope="scope">
|
<!-- <template slot-scope="scope">
|
||||||
{{ (pageIndex - 1) * pageSize + scope.$index + 1 }}
|
{{ (pageIndex - 1) * pageSize + scope.$index + 1 }}
|
||||||
</template> -->
|
</template> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="product.productName"
|
prop="title"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
align="center"
|
align="center"
|
||||||
label="课程名称"
|
label="课程名称"
|
||||||
@@ -262,7 +260,7 @@ export default {
|
|||||||
bookIds: [],
|
bookIds: [],
|
||||||
selectShopArr: [],
|
selectShopArr: [],
|
||||||
dataForm: {
|
dataForm: {
|
||||||
productName: "",
|
keywords: "",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -290,7 +288,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
shopDelete(row){
|
shopDelete(row){
|
||||||
this.$emit('delete',[row])
|
this.$emit('delete',row)
|
||||||
},
|
},
|
||||||
// 获取商品类型
|
// 获取商品类型
|
||||||
getGoodsTypeList() {
|
getGoodsTypeList() {
|
||||||
@@ -350,8 +348,8 @@ this.$emit('delete',[row])
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
async getDataList(bookMarketId) {
|
async getDataList() {
|
||||||
this.bookMarketId = bookMarketId;
|
// this.bookMarketId = bookMarketId;
|
||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
this.getDataList = [];
|
this.getDataList = [];
|
||||||
this.clear();
|
this.clear();
|
||||||
@@ -365,16 +363,18 @@ this.$emit('delete',[row])
|
|||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
page: this.pageIndex,
|
page: this.pageIndex,
|
||||||
limit: this.pageSize,
|
limit: this.pageSize,
|
||||||
key: this.dataForm.key,
|
keywords: this.dataForm.keywords,
|
||||||
}),
|
}),
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.dataList = data.page.list;
|
this.dataList = data.page.list;
|
||||||
this.totalPage = data.page.totalCount;
|
console.log('this.dataList at line 372:', this.dataList)
|
||||||
|
this.totalPage = data.page.totalPage;
|
||||||
} else {
|
} else {
|
||||||
this.dataList = [];
|
this.dataList = [];
|
||||||
this.totalPage = 0;
|
this.totalPage = 0;
|
||||||
}
|
}
|
||||||
|
this.$forceUpdate()
|
||||||
// setTimeout(async () => {
|
// setTimeout(async () => {
|
||||||
// await this.setSelectRow();
|
// await this.setSelectRow();
|
||||||
// }, 200);
|
// }, 200);
|
||||||
@@ -408,10 +408,10 @@ this.$emit('delete',[row])
|
|||||||
url: this.$http.adornUrl(`${this.urlList.getAssociatedGoodsList}`),
|
url: this.$http.adornUrl(`${this.urlList.getAssociatedGoodsList}`),
|
||||||
method: "post",
|
method: "post",
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
current: 1,
|
page: 1,
|
||||||
limit: 99999999,
|
limit: 99999999,
|
||||||
// productName: "",
|
|
||||||
productId: "",
|
|
||||||
...form,
|
...form,
|
||||||
// bookLabelId: bookLabelId,
|
// bookLabelId: bookLabelId,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<!-- <el-drawer title="新增关联商品" v-if="drawer" :wrapperClosable="false" :visible.sync="drawer" destroy-on-close
|
<el-drawer title="新增关联课程" v-show="drawer" :wrapperClosable="false" :visible.sync="drawer" destroy-on-close
|
||||||
direction="rtl" size="70%"> -->
|
direction="rtl" size="70%">
|
||||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="drawer"
|
<!-- <el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="drawer"
|
||||||
@close="handlereset">
|
@close="handlereset"> -->
|
||||||
<div class="shop_drawer_box demo-drawer__content">
|
<div class="shop_drawer_box demo-drawer__content">
|
||||||
<!-- <div class="addFormBox">
|
<div class="addFormBox">
|
||||||
<el-form ref="addForm" label-width="80px" :model="dataForm">
|
<el-form ref="addForm" label-width="80px" :model="dataForm">
|
||||||
<el-form-item label="商品名称" prop="title" class="form_item">
|
<el-form-item label="课程名称" prop="keywords" class="form_item">
|
||||||
<el-input size="small" placeholder="请输入商品名称" style="width: 100%" v-model="dataForm.productName" clearable>
|
<el-input size="small" placeholder="请输入商品名称" style="width: 100%" v-model="dataForm.keywords" clearable>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品类型" prop="goodsType" class="form_item">
|
<!-- <el-form-item label="商品类型" prop="goodsType" class="form_item">
|
||||||
<el-select size="small" v-model="dataForm.goodsType" placeholder="请选择" style="width: 100%" clearable>
|
<el-select size="small" v-model="dataForm.goodsType" placeholder="请选择" style="width: 100%" clearable>
|
||||||
<el-option v-for="item in goodsTypeList" :key="item.dictType" :label="item.dictValue"
|
<el-option v-for="item in goodsTypeList" :key="item.dictType" :label="item.dictValue"
|
||||||
:value="item.dictType">
|
:value="item.dictType">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
|
|
||||||
<el-form-item label="" class="form_item" label-width="20px" style="width: 160px !important">
|
<el-form-item label="" class="form_item" label-width="20px" style="width: 160px !important">
|
||||||
<el-button type="primary" plain @click="
|
<el-button type="primary" plain @click="
|
||||||
@@ -27,19 +27,28 @@
|
|||||||
<el-button @click="handleReset()" size="small" plain>重置</el-button>
|
<el-button @click="handleReset()" size="small" plain>重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div> -->
|
</div>
|
||||||
|
|
||||||
<el-table ref="table" height="80%" :data="dataList" :row-key="getRowKeys" border size="mini"
|
<el-table ref="table" height="80%" :data="dataList" :row-key="getRowKeys" border size="mini" highlight-current-row
|
||||||
v-loading="dataListLoading" @selection-change="handleSelectionChange" style="width: 100%">
|
v-loading="dataListLoading" @selection-change="handleSelectionChange" @current-change="handleCurrentChange" style="width: 100%">
|
||||||
<el-table-column :reserve-selection="true" type="selection" header-align="center" align="center" width="50">
|
<!-- <el-table-column :reserve-selection="true" type="selection" header-align="center" align="center" width="50">
|
||||||
|
</el-table-column> -->
|
||||||
|
|
||||||
|
<el-table-column align="center" width="40px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-radio v-model="currentRow" :label="scope.row"> </el-radio>
|
||||||
|
<!-- //或者是<el-radio v-model="currentRow" :label="scope.row"><i></i></el-radio> -->
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<el-table-column label="课程ID" width="70" align="center" prop="productId">
|
<el-table-column label="课程ID" width="70" align="center" prop="id">
|
||||||
<!-- <template slot-scope="scope">
|
<!-- <template slot-scope="scope">
|
||||||
{{ (pageIndex - 1) * pageSize + scope.$index + 1 }}
|
{{ (pageIndex - 1) * pageSize + scope.$index + 1 }}
|
||||||
</template> -->
|
</template> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="productName" header-align="center" align="center" label="课程名称">
|
<el-table-column prop="title" header-align="center" align="center" label="课程名称">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="price" width="120" header-align="center" align="center" sortable label="价格">
|
<!-- <el-table-column prop="price" width="120" header-align="center" align="center" sortable label="价格">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -60,18 +69,18 @@
|
|||||||
</el-pagination>
|
</el-pagination>
|
||||||
|
|
||||||
<div class="demo-drawer__footer">
|
<div class="demo-drawer__footer">
|
||||||
<div style="float: right; margin-top: 20px">
|
<!-- <div style="float: right; margin-top: 20px">
|
||||||
<el-button @click="close" size="small">取 消</el-button>
|
<el-button @click="close" size="small">取 消</el-button>
|
||||||
<el-button type="primary" @click="submit" :loading="loading" size="small">{{ loading ? "提交中 ..." : "确 定"
|
<el-button type="primary" @click="submit" :loading="loading" size="small">{{ loading ? "提交中 ..." : "确 定"
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @showchooseBookf = "showchooseBookf"></add-or-update>
|
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @showchooseBookf = "showchooseBookf"></add-or-update>
|
||||||
<choose-book v-if="chooseBookVisible" :bookIds = bookIds ref="chooseBook" :chooseBookVisible = chooseBookVisible @closeBookf = "closeBookf"></choose-book> -->
|
<choose-book v-if="chooseBookVisible" :bookIds = bookIds ref="chooseBook" :chooseBookVisible = chooseBookVisible @closeBookf = "closeBookf"></choose-book> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- </el-drawer> -->
|
</el-drawer>
|
||||||
</el-dialog>
|
<!-- </el-dialog> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -91,6 +100,7 @@ export default {
|
|||||||
dataForm: {
|
dataForm: {
|
||||||
productName: "",
|
productName: "",
|
||||||
},
|
},
|
||||||
|
currentRow:null,
|
||||||
bookMarketId: null,
|
bookMarketId: null,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
publishStatus: false,
|
publishStatus: false,
|
||||||
@@ -119,7 +129,7 @@ export default {
|
|||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
var ids = this.multipleSelection.map((e) => e.productId).toString(",");
|
var ids = this.multipleSelection.map((e) => e.id).toString(",");
|
||||||
this.$emit("submit", ids);
|
this.$emit("submit", ids);
|
||||||
console.log(
|
console.log(
|
||||||
"🚀 ~ submit ~ this.multipleSelection:",
|
"🚀 ~ submit ~ this.multipleSelection:",
|
||||||
@@ -158,6 +168,18 @@ export default {
|
|||||||
getRowKeys(row) {
|
getRowKeys(row) {
|
||||||
return row.productId;
|
return row.productId;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
console.log("🚀 ~ handleSelectionChange ~ val:", val);
|
||||||
|
|
||||||
|
this.$emit("submit", val.id);
|
||||||
|
|
||||||
|
|
||||||
|
// table组件选中事件,记得加上@selection-change="handleSelectionChange"
|
||||||
|
// this.multipleSelection = val;
|
||||||
|
// this.changePageCoreRecordData();
|
||||||
|
},
|
||||||
|
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
console.log("🚀 ~ handleSelectionChange ~ val:", val);
|
console.log("🚀 ~ handleSelectionChange ~ val:", val);
|
||||||
// table组件选中事件,记得加上@selection-change="handleSelectionChange"
|
// table组件选中事件,记得加上@selection-change="handleSelectionChange"
|
||||||
@@ -188,8 +210,8 @@ export default {
|
|||||||
};
|
};
|
||||||
// this.multipleSelection=[]
|
// this.multipleSelection=[]
|
||||||
// if (this.currentType == "bookLabelId") {
|
// if (this.currentType == "bookLabelId") {
|
||||||
form.id = this.currentId;
|
form.id = this.currentId;
|
||||||
console.log("🚀 ~ getAssociatedGoodsList ~ form:", form);
|
console.log("🚀 ~ getAssociatedGoodsList ~ form:", form);
|
||||||
// } else if (this.currentType == "bookMarketId") {
|
// } else if (this.currentType == "bookMarketId") {
|
||||||
// form.bookMarketId = this.currentId;
|
// form.bookMarketId = this.currentId;
|
||||||
// console.log("🚀 ~ getAssociatedGoodsList ~ form:", form);
|
// console.log("🚀 ~ getAssociatedGoodsList ~ form:", form);
|
||||||
@@ -203,8 +225,8 @@ export default {
|
|||||||
data: this.$http.adornData(form),
|
data: this.$http.adornData(form),
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.dataList = data.result.records;
|
this.dataList = data.page.records;
|
||||||
this.totalPage = data.result.total;
|
this.totalPage = data.page.total;
|
||||||
} else {
|
} else {
|
||||||
this.dataList = [];
|
this.dataList = [];
|
||||||
this.totalPage = 0;
|
this.totalPage = 0;
|
||||||
|
|||||||
@@ -30,7 +30,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style=" border: 1px dashed #bababa;" v-if="currentNode && currentNode.data.isLast == 1"></div>
|
<div style=" border: 1px dashed #bababa;" v-if="currentNode && currentNode.data.isLast == 1"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="border_box tree_content_box" v-if="currentNode && currentNode.data.isLast == 1">
|
<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_box" style="margin-bottom: 10px; height: 40px">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span class="line"></span>已绑定课程列表
|
<span class="line"></span>已绑定课程列表
|
||||||
@@ -38,7 +40,7 @@
|
|||||||
size="mini">新增</el-button>
|
size="mini">新增</el-button>
|
||||||
|
|
||||||
<!-- <div style="" class="button_box"> -->
|
<!-- <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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -178,19 +180,22 @@ export default {
|
|||||||
url: this.$http.adornUrl(`${this.urlList.saveShop}`),
|
url: this.$http.adornUrl(`${this.urlList.saveShop}`),
|
||||||
method: "post",
|
method: "post",
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
productId: ids,
|
courseId: ids,
|
||||||
bookLabelId: this.addForm.id,
|
sociologyId: this.addForm.id,
|
||||||
}),
|
}),
|
||||||
}).then(async ({ data }) => {
|
}).then(async ({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.$message.success(data.msg);
|
this.$message.success(data.msg);
|
||||||
if (this.$refs.commonShop) {
|
if (this.$refs.commonShop) {
|
||||||
this.$refs.commonShop.getAssociatedGoodsList({
|
this.$refs.commonShop.getAssociatedGoodsList({
|
||||||
bookLabelId: this.addForm.id,
|
courseId: this.addForm.id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.$refs.commonShopTable) {
|
if (this.$refs.commonShopTable) {
|
||||||
|
|
||||||
this.$refs.commonShopTable.close();
|
this.$refs.commonShopTable.close();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -202,7 +207,7 @@ export default {
|
|||||||
this.isEdit = false;
|
this.isEdit = false;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.commonShopTable.open(this.addForm.id);
|
this.$refs.commonShopTable.open(this.addForm.id);
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleChangeIsLast(e) {
|
handleChangeIsLast(e) {
|
||||||
@@ -255,7 +260,7 @@ export default {
|
|||||||
await this.$refs[formName].validate(async (valid) => {
|
await this.$refs[formName].validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
await this.$http({
|
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",
|
method: "post",
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
...this.addForm,
|
...this.addForm,
|
||||||
@@ -264,9 +269,9 @@ export default {
|
|||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
await this.getDataList();
|
await this.getDataList();
|
||||||
this.$nextTick(async () => {
|
this.$nextTick(async () => {
|
||||||
this.$refs.commonTree.setCurrentNodeShow(data.result.id);
|
this.$refs.commonTree.setCurrentNodeShow(data.sociology.id);
|
||||||
this.addForm = data.result;
|
this.addForm = data.sociology;
|
||||||
this.currentNode = { data: { ...data.result } }
|
this.currentNode = { data: { ...data.sociology } }
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "操作成功",
|
message: "操作成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
@@ -285,14 +290,15 @@ export default {
|
|||||||
}, 200),
|
}, 200),
|
||||||
//删除关联图书
|
//删除关联图书
|
||||||
dataFormDelete: debounce(async function (row, deleteType) {
|
dataFormDelete: debounce(async function (row, deleteType) {
|
||||||
this.$confirm(`确定要删除${deleteType != 'all' ? '该' : '所有'}关联商品嘛?`, "提示", {
|
console.log('row at line 292:', row)
|
||||||
|
this.$confirm(`确定要删除${deleteType != 'all' ? '该' : '所有'}关联课程吗?`, "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
var lableIds = row[0].bookLabelId
|
// var lableIds = row[0].bookLabelId
|
||||||
var productIds = row.map(e => e.productId)
|
var bindId = row.bindId
|
||||||
|
|
||||||
// // return false
|
// // return false
|
||||||
// var selectShopArr = this.$refs.commonShop.selectShopArr;
|
// var selectShopArr = this.$refs.commonShop.selectShopArr;
|
||||||
@@ -305,24 +311,29 @@ export default {
|
|||||||
this.$refs.commonShop.dataListLoading = true;
|
this.$refs.commonShop.dataListLoading = true;
|
||||||
await this.$http({
|
await this.$http({
|
||||||
url: this.$http.adornUrl(
|
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",
|
method: "post",
|
||||||
|
data: this.$http.adornData({
|
||||||
|
id: bindId
|
||||||
|
}),
|
||||||
}).then(async ({ data }) => {
|
}).then(async ({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.$message.success("删除成功");
|
this.$message.success("删除成功");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(data.msg);
|
this.$message.error(data.msg);
|
||||||
}this.$nextTick(() => {
|
} this.$nextTick(() => {
|
||||||
// this.$refs.commonShop.selectShopArr = [];
|
// this.$refs.commonShop.selectShopArr = [];
|
||||||
if (this.$refs.commonShop) {
|
if (this.$refs.commonShop) {
|
||||||
this.$refs.commonShop.getAssociatedGoodsList({
|
this.$refs.commonShop.getAssociatedGoodsList({
|
||||||
bookLabelId: this.addForm.id,
|
bookLabelId: this.addForm.id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => { });
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
// api接口请求地址
|
// api接口请求地址
|
||||||
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';//张川川
|
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';//张川川
|
||||||
// window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb';
|
// window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb';
|
||||||
window.SITE_CONFIG['baseUrl'] = 'https://testapi.nuttyreading.com'; // 线上测试环境11
|
// window.SITE_CONFIG['baseUrl'] = 'https://testapi.nuttyreading.com'; // 线上测试环境11
|
||||||
// window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境
|
// window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境
|
||||||
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb';
|
window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb';
|
||||||
// window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb';
|
// window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb';
|
||||||
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';
|
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user