国学医学营销标签

This commit is contained in:
2024-05-22 15:16:31 +08:00
parent 3c2c1ee281
commit 555c0cb6b0
2 changed files with 93 additions and 34 deletions

View File

@@ -95,7 +95,7 @@
:isNoSearch="true" :isNoSearch="true"
:otherInfo="{ :otherInfo="{
httpType: 'raw', httpType: 'raw',
httpDataValueName: 'courseList' httpDataValueName: 'list'
}" }"
:defaultForm="{ :defaultForm="{
marketId: addForm.id marketId: addForm.id
@@ -150,13 +150,13 @@
</el-form-item> --> </el-form-item> -->
</template> </template>
<template slot="tableItem" slot-scope="slotProps"> <template slot="tableItem" slot-scope="slotProps">
<el-table-column label="课程ID" width="70" align="center" prop="id"> <el-table-column label="课程ID" width="70" align="center" prop="courseEntity.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="title" prop="courseEntity.title"
header-align="center" header-align="center"
align="center" align="center"
label="课程名称" label="课程名称"
@@ -171,14 +171,23 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<img <img
v-if="scope.row.image != ''" v-if="scope.row.courseEntity.image != ''"
:src="scope.row.image" :src="scope.row.courseEntity.image"
width="25" width="25"
height="35" height="35"
class="tableImg" class="tableImg"
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="sort"
header-align="center"
align="center"
width="100"
label="排序"
>
</el-table-column>
</template> <template slot="operation" slot-scope="slotProps"> </template> <template slot="operation" slot-scope="slotProps">
<el-button <el-button
type="text" type="text"
@@ -336,8 +345,8 @@
class="form_item" class="form_item"
style="width: 100% !important" style="width: 100% !important"
> >
<el-input <el-input :min="0"
v-model="dataForm.toSociologySort" v-model="dataForm.sort"
type="number" type="number"
></el-input> ></el-input>
</el-form-item> </el-form-item>
@@ -378,10 +387,8 @@ export default {
hasBindProductList: hasBindProductList:
"/master/courseSociologyMarket/getCourseListByMarketId", "/master/courseSociologyMarket/getCourseListByMarketId",
CanBindProductList: "/master/courseSociologyMarket/getNotToMarketList" CanBindProductList: "/master/courseSociologyMarket/getNotToMarketList"
, editSort: "/master/courseSociology/updateCourseToSociologySort", , editSort: "/master/courseSociologyMarket/editMarketSort",
}, dataForm: { },
key: ""
},
addForm: {}, addForm: {},
isFresh: false, isFresh: false,
dataRule: { dataRule: {
@@ -478,9 +485,50 @@ export default {
}, },
UpNumber(e) { UpNumber(e) {
e.target.value = e.target.value.replace(/[^\d]/g, ""); e.target.value = e.target.value.replace(/[^\d]/g, "");
}, }, handleSubmitDataForm: debounce(async function() {
var that = this;
this.$http
.request({
url: this.$http.adornUrl(`${this.urlList.editSort}`),
method: "POST",
data: {
marketId: this.dataForm.marketId,
courseId: this.dataForm.courseId,
sort: Number(this.dataForm.sort)
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json"
}
})
.then(async ({ data }) => {
if (data && data.code === 0) {
this.$message.success(data.msg);
if (this.$refs.commonShop) {
this.$refs.commonShop.getAssociatedGoodsList({
courseId: this.addForm.id
});
}
} else {
this.$message.error(data.msg);
}
that.dialogVisible = false;
});
that.$forceUpdate();
}, 200),
dataFormEdit(row) { dataFormEdit(row) {
this.dataForm = { ...row }; console.log('row at line 523:', row)
this.dataForm = {
marketId: row.sociologyMarketId,
courseId: row.courseId,
sort: row.sort,
title: row.courseEntity.title
};
this.dialogVisible = true; this.dialogVisible = true;
}, },
handleCheckAllChange(val) { handleCheckAllChange(val) {
@@ -632,7 +680,7 @@ export default {
) )
.then(async () => { .then(async () => {
// var lableIds = row[0].bookLabelId; // var lableIds = row[0].bookLabelId;
var productIds = row[0].id; var productIds = row[0].courseId;
// // return false // // return false
// var selectShopArr = this.$refs.commonShop.selectShopArr; // var selectShopArr = this.$refs.commonShop.selectShopArr;

View File

@@ -150,13 +150,18 @@
</el-form-item> --> </el-form-item> -->
</template> </template>
<template slot="tableItem" slot-scope="slotProps"> <template slot="tableItem" slot-scope="slotProps">
<el-table-column label="课程ID" width="70" align="center" prop="id"> <el-table-column
label="课程ID"
width="70"
align="center"
prop="courseEntity.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="title" prop="courseEntity.title"
header-align="center" header-align="center"
align="center" align="center"
label="课程名称" label="课程名称"
@@ -171,14 +176,22 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<img <img
v-if="scope.row.image != ''" v-if="scope.row.courseEntity.image != ''"
:src="scope.row.image" :src="scope.row.courseEntity.image"
width="25" width="25"
height="35" height="35"
class="tableImg" class="tableImg"
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="sort"
header-align="center"
align="center"
width="100"
label="排序"
>
</el-table-column>
</template> </template>
<template slot="operation" slot-scope="slotProps"> <template slot="operation" slot-scope="slotProps">
<el-button <el-button
@@ -281,13 +294,6 @@
label="课程名称" label="课程名称"
> >
</el-table-column> </el-table-column>
<el-table-column
prop="sort"
header-align="center"
align="center"
label="排序"
>
</el-table-column>
<el-table-column <el-table-column
header-align="center" header-align="center"
@@ -343,10 +349,7 @@
class="form_item" class="form_item"
style="width: 100% !important" style="width: 100% !important"
> >
<el-input <el-input :min="0" v-model="dataForm.sort" type="number"></el-input>
v-model="dataForm.toSociologySort"
type="number"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@@ -384,7 +387,7 @@ export default {
edit: "/master/courseMedicineMarket/editSociologyMarket", edit: "/master/courseMedicineMarket/editSociologyMarket",
hasBindProductList: "/master/courseMedicineMarket/getCourseByMarketId", hasBindProductList: "/master/courseMedicineMarket/getCourseByMarketId",
CanBindProductList: "/master/courseMedicineMarket/getNotToMarketList", CanBindProductList: "/master/courseMedicineMarket/getNotToMarketList",
editSort: "/master/courseSociology/updateCourseToSociologySort" editSort: "/master/courseMedicineMarket/editMarketSort"
}, },
addForm: {}, addForm: {},
isFresh: false, isFresh: false,
@@ -488,8 +491,10 @@ export default {
url: this.$http.adornUrl(`${this.urlList.editSort}`), url: this.$http.adornUrl(`${this.urlList.editSort}`),
method: "POST", method: "POST",
data: { data: {
id: this.dataForm.bindId, marketId: this.dataForm.marketId,
sort: Number(this.dataForm.toSociologySort) courseId: this.dataForm.courseId,
sort: Number(this.dataForm.sort)
}, },
header: { header: {
//默认 无 说明:请求头 //默认 无 说明:请求头
@@ -518,7 +523,13 @@ export default {
e.target.value = e.target.value.replace(/[^\d]/g, ""); e.target.value = e.target.value.replace(/[^\d]/g, "");
}, },
dataFormEdit(row) { dataFormEdit(row) {
this.dataForm = { ...row }; this.dataForm = {
marketId: row.medicineMarketId,
courseId: row.courseId,
sort: row.sort,
title: row.courseEntity.title
};
this.dialogVisible = true; this.dialogVisible = true;
}, },
handleCheckAllChange(val) { handleCheckAllChange(val) {
@@ -670,7 +681,7 @@ export default {
) )
.then(async () => { .then(async () => {
// var lableIds = row[0].bookLabelId; // var lableIds = row[0].bookLabelId;
var productIds = row[0].id; var productIds = row[0].courseId;
// // return false // // return false
// var selectShopArr = this.$refs.commonShop.selectShopArr; // var selectShopArr = this.$refs.commonShop.selectShopArr;