课程营销标签

This commit is contained in:
2024-05-22 10:24:14 +08:00
parent 11a259cc0b
commit 3c2c1ee281
7 changed files with 1379 additions and 38 deletions

View File

@@ -68,6 +68,7 @@
style="width: 100%"
>
<slot name="tableItem"></slot>
<!-- <el-table-column
:reserve-selection="true"
type="selection"
@@ -82,9 +83,11 @@
header-align="center"
align="center"
label="操作"
width="80"
width="120"
>
<template slot-scope="scope">
<template slot-scope="scope">
<slot name="operation" :row="scope.row"></slot>
<el-button
type="text"
style="color: red;"
@@ -322,12 +325,36 @@ export default {
this.dataListLoading = true;
if (this.otherInfo.httpType == "raw") {
if (this.otherInfo.httpType == "raw"&&this.otherInfo.isNoPaging ) {
this.$http
.request({
url: this.$http.adornUrl(`${this.urlList.hasBindProductList}`),
method: "POST",
data: { current: 1,
limit: 99999999,
...form
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json"
}
})
.then(async ({ data }) => {
if (data && data.code === 0) {
this.associatedGoodsList = [...data.result.records];
this.dataListLoading = false;
}
});
}
else if (this.otherInfo.httpType == "raw") {
this.$http
.request({
url: this.$http.adornUrl(`${this.urlList.hasBindProductList}`),
method: "POST",
data: {
...form
},
header: {

View File

@@ -248,6 +248,7 @@ export default {
this.clear();
if (this.otherInfo.httpType == "raw") {
form.page = this.pageIndex;
form.current = this.pageIndex;
this.$http
.request({
url: this.$http.adornUrl(`${this.urlList.CanBindProductList}`),

File diff suppressed because it is too large Load Diff

View File

@@ -179,6 +179,14 @@
/>
</template>
</el-table-column>
</template> <template slot="operation" slot-scope="slotProps">
<el-button
type="text"
@click="dataFormEdit(slotProps.row)"
size="mini"
>修改排序</el-button
>
</template>
</commonShop>
@@ -297,6 +305,51 @@
ref="addOrUpdate"
@refreshDataList="getDataList"
></add-or-update>
<el-dialog
:append-to-body="true"
:modal-append-to-body="false"
title="修改排序"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
>
<div class="addFormBox selectTimeBox">
<el-form ref="addForm" :model="dataForm" label-width="80px">
<slot name="searchFormItem" :dataForm="dataForm"></slot>
<el-form-item
label="课程名称:"
class="form_item"
style="width: 100% !important"
>
<p class="input_item">
{{ dataForm.title }}
</p>
<!-- selectCourse -->
<!-- <el-input
v-model="selectCourse.courseCatalogueTitle"
readonly
></el-input> -->
</el-form-item>
<el-form-item
label="排序:"
class="form_item"
style="width: 100% !important"
>
<el-input
v-model="dataForm.toSociologySort"
type="number"
></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="handleSubmitDataForm"
> </el-button
>
</span>
</el-dialog>
</div>
</template>
@@ -310,6 +363,7 @@ import commonTree from "@/views/components/commonBookTags/tags.vue";
export default {
data() {
return {
dialogVisible: false,
isEdit: false,
checkAll: false,
isIndeterminate: true,
@@ -324,6 +378,9 @@ export default {
hasBindProductList:
"/master/courseSociologyMarket/getCourseListByMarketId",
CanBindProductList: "/master/courseSociologyMarket/getNotToMarketList"
, editSort: "/master/courseSociology/updateCourseToSociologySort",
}, dataForm: {
key: ""
},
addForm: {},
isFresh: false,
@@ -415,13 +472,16 @@ export default {
this.isEdit = false;
this.getDataList();
},
methods: {
methods: { handleClose() {
this.dataForm = {};
this.dialogVisible = false;
},
UpNumber(e) {
e.target.value = e.target.value.replace(/[^\d]/g, "");
},
dataFormEdit() {
this.checkAll = false;
this.isEdit = !this.isEdit;
dataFormEdit(row) {
this.dataForm = { ...row };
this.dialogVisible = true;
},
handleCheckAllChange(val) {
this.$nextTick(() => {

View File

@@ -2,7 +2,7 @@
<div class="mod-config">
<commonTree
source="tags"
axiosType="raw"
axiosResultKey="market"
@changeCurrentNode="changeCurrentNode"
ref="commonTree"
@@ -94,8 +94,8 @@
<commonShop
:isNoSearch="true"
:otherInfo="{
httpDataValueName: 'courseList'
httpType: 'raw',
httpDataValueName: 'list'
}"
:defaultForm="{
marketId: addForm.id
@@ -180,6 +180,14 @@
</template>
</el-table-column>
</template>
<template slot="operation" slot-scope="slotProps">
<el-button
type="text"
@click="dataFormEdit(slotProps.row)"
size="mini"
>修改排序</el-button
>
</template>
</commonShop>
<div class="submitButton submitButtonBox">
@@ -224,13 +232,13 @@
<commonShopTable
title="课程"
:otherInfo="{
httpType:'raw',
httpType: 'raw',
httpDataValueName: 'records',
httpDataTotalName: 'total'
}"
:defaultForm="{
title: '',
marketId: addForm.id
keywords: '',
id: addForm.id
}"
:urlList="urlList"
:tableColumnList="tableColumnList"
@@ -241,12 +249,12 @@
@submit="handleSubmitShopTable"
>
<template slot="searchFormItem" slot-scope="slotProps">
<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="slotProps.dataForm.title"
v-model="slotProps.dataForm.keywords"
clearable
>
</el-input>
@@ -273,6 +281,13 @@
label="课程名称"
>
</el-table-column>
<el-table-column
prop="sort"
header-align="center"
align="center"
label="排序"
>
</el-table-column>
<el-table-column
header-align="center"
@@ -297,6 +312,51 @@
ref="addOrUpdate"
@refreshDataList="getDataList"
></add-or-update>
<el-dialog
:append-to-body="true"
:modal-append-to-body="false"
title="修改排序"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
>
<div class="addFormBox selectTimeBox">
<el-form ref="addForm" :model="dataForm" label-width="80px">
<slot name="searchFormItem" :dataForm="dataForm"></slot>
<el-form-item
label="课程名称:"
class="form_item"
style="width: 100% !important"
>
<p class="input_item">
{{ dataForm.title }}
</p>
<!-- selectCourse -->
<!-- <el-input
v-model="selectCourse.courseCatalogueTitle"
readonly
></el-input> -->
</el-form-item>
<el-form-item
label="排序:"
class="form_item"
style="width: 100% !important"
>
<el-input
v-model="dataForm.toSociologySort"
type="number"
></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="handleSubmitDataForm"
> </el-button
>
</span>
</el-dialog>
</div>
</template>
@@ -310,6 +370,7 @@ import commonTree from "@/views/components/commonBookTags/tags.vue";
export default {
data() {
return {
dialogVisible: false,
isEdit: false,
checkAll: false,
isIndeterminate: true,
@@ -317,13 +378,13 @@ export default {
treeList: "/master/courseMedicineMarket/marketTree",
delete: "/master/courseMedicineMarket/delMarket",
deleteShop:
"/master/courseMedicineMarket/delToMarket",
saveShop: "/master/courseMedicineMarket/saveToMarket",
add: "/master/courseMedicineMarket/saveOrUpdateMarket",
edit: "/master/courseMedicineMarket/saveOrUpdateMarket",
getAssociatedGoodsList:
"/master/courseMedicineMarket/getCourseByMarketId",
getNotToLabelList: "/master/courseMedicineMarket/getNotToMarketList"
"/master/courseMedicineMarket/unbindCourseAndMedicineMarket",
saveShop: "/master/courseMedicineMarket/bindCourseAndMedicineMarket",
add: "/master/courseMedicineMarket/addSociologyMarket",
edit: "/master/courseMedicineMarket/editSociologyMarket",
hasBindProductList: "/master/courseMedicineMarket/getCourseByMarketId",
CanBindProductList: "/master/courseMedicineMarket/getNotToMarketList",
editSort: "/master/courseSociology/updateCourseToSociologySort"
},
addForm: {},
isFresh: false,
@@ -416,12 +477,49 @@ export default {
this.getDataList();
},
methods: {
handleClose() {
this.dataForm = {};
this.dialogVisible = false;
},
handleSubmitDataForm: debounce(async function() {
var that = this;
this.$http
.request({
url: this.$http.adornUrl(`${this.urlList.editSort}`),
method: "POST",
data: {
id: this.dataForm.bindId,
sort: Number(this.dataForm.toSociologySort)
},
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),
UpNumber(e) {
e.target.value = e.target.value.replace(/[^\d]/g, "");
},
dataFormEdit() {
this.checkAll = false;
this.isEdit = !this.isEdit;
dataFormEdit(row) {
this.dataForm = { ...row };
this.dialogVisible = true;
},
handleCheckAllChange(val) {
this.$nextTick(() => {
@@ -532,10 +630,10 @@ export default {
await this.getDataList();
this.$nextTick(async () => {
this.$refs.commonTree.setCurrentNodeShow(data.result.id);
this.$refs.commonTree.setCurrentNodeShow(data.market.id);
this.addForm = data.result;
this.currentNode = { data: { ...data.result } };
this.addForm = data.market;
this.currentNode = { data: { ...data.market } };
this.$message({
message: "操作成功",
type: "success",
@@ -547,10 +645,10 @@ export default {
});
} else {
this.$message.error(data.msg);
setTimeout(()=>{
this.addForm = { ...this.currentNode.data };
},500)
setTimeout(() => {
this.addForm = { ...this.currentNode.data };
}, 500);
// console.log('this.addForm at line 550:', this.addForm)
// console.log('this.addForm at line 550:', this.currentNode)
}

View File

@@ -72,7 +72,7 @@
>
<div class="title_box" style="margin-bottom: 10px; height: 40px">
<div class="title">
<span class="line"></span>绑定课程列表
<span class="line"></span>关联课程列表
<el-button
plain
type="primary"
@@ -289,10 +289,10 @@ export default {
UpNumber(e) {
e.target.value = e.target.value.replace(/[^\d]/g, "");
},
dataFormEdit() {
this.checkAll = false;
this.isEdit = !this.isEdit;
},
// dataFormEdit() {
// this.checkAll = false;
// this.isEdit = !this.isEdit;
// },
handleCheckAllChange(val) {
this.$nextTick(() => {
this.$refs.commonShop.handleCheckAllChange(val);

View File

@@ -9,7 +9,7 @@
// 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://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://192.168.110.100:9200/pb';