Compare commits
12 Commits
smallShop
...
martekSort
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e8e5cf7e4 | ||
|
|
83987414aa | ||
|
|
2620d1bbbb | ||
|
|
71d4b2782c | ||
| 53697d0582 | |||
| 918ecfa47a | |||
|
|
292ce24ba0 | ||
|
|
3c0e7ec342 | ||
|
|
78b8a4b49e | ||
|
|
5f8b12a9ec | ||
|
|
2869e2528c | ||
|
|
dfdeab9283 |
@@ -372,6 +372,8 @@ export default {
|
||||
var bookIDS = this.getBookIds();
|
||||
// console.log(this.dataForm.productImageList)
|
||||
if (valid) {
|
||||
|
||||
console.log('this.dataForm.hDprice at line 375:', this.dataForm.hDprice)
|
||||
if (!this.dataForm.hDprice || this.dataForm.hDprice == 0) {
|
||||
// console.log('没有值')
|
||||
this.dataForm.hDprice = 0;
|
||||
|
||||
@@ -265,7 +265,7 @@ export default {
|
||||
data: {}
|
||||
};
|
||||
}
|
||||
this.currentNode = newNodeData;
|
||||
this.currentNode = newNodeData;
|
||||
this.$forceUpdate();
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tree.setCurrentKey(id);
|
||||
@@ -387,7 +387,7 @@ export default {
|
||||
);
|
||||
this.addForm = {};
|
||||
// console.log(this.$refs.tree.handleClickNodes(), "当前选中节点");
|
||||
console.log(node, data, "当前选中节点");
|
||||
console.log(node, data, "当前选中节点-----------");
|
||||
this.currentNode = node;
|
||||
this.isFresh = false;
|
||||
this.isFresh = true;
|
||||
@@ -436,6 +436,7 @@ export default {
|
||||
children: [],
|
||||
delFlag: 0,
|
||||
isLast: 0,
|
||||
content:'',
|
||||
pid: 0,
|
||||
sort: 0,
|
||||
title: ""
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
:inactive-value="0"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
@@ -91,8 +90,46 @@
|
||||
>
|
||||
</quill-editor>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="sort" label-width="0"> -->
|
||||
<div v-if="this.dataForm.id">
|
||||
<div
|
||||
class="flexbox videoBox"
|
||||
v-for="(item, index) in video_audio_url"
|
||||
:key="index"
|
||||
|
||||
>
|
||||
<div style="width:120px">视频/音频ID</div>
|
||||
<div style="width:300px; margin-right:10px; margin-left:10px">
|
||||
<el-input
|
||||
style=""
|
||||
v-model="item.video"
|
||||
placeholder="请输入视频/音频ID"
|
||||
></el-input>
|
||||
</div>
|
||||
<div style="margin-right:10px; height:38px">
|
||||
<el-form-item label="加密类型" prop="type">
|
||||
<el-select
|
||||
v-model="item.type"
|
||||
filterable
|
||||
placeholder="请选择类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.dictType"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictType"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
|
||||
<el-button @click="delItem(index)" plain type="danger" size="mini">删除</el-button>
|
||||
</div>
|
||||
<!-- </el-form-item> -->
|
||||
<div style="text-align:center" >
|
||||
<el-button @click="addItem">添加一条音/视频</el-button>
|
||||
</div></div>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handlereset">取消</el-button>
|
||||
@@ -169,6 +206,18 @@ export default {
|
||||
dictType: "",
|
||||
dictValue: ""
|
||||
},
|
||||
typeList: [
|
||||
//类型0普通1加密
|
||||
|
||||
{
|
||||
dictType: 0,
|
||||
dictValue: "普通"
|
||||
},
|
||||
{
|
||||
dictType: 1,
|
||||
dictValue: "加密"
|
||||
}
|
||||
],
|
||||
gushuList: [],
|
||||
authorList: [],
|
||||
restaurants: [],
|
||||
@@ -185,10 +234,18 @@ export default {
|
||||
title: "",
|
||||
imgUrl: "",
|
||||
content: "",
|
||||
sort: 1
|
||||
},
|
||||
sort: 1,
|
||||
// video_audio_url: [
|
||||
// {url:'454545',type:0}
|
||||
// ]
|
||||
},
|
||||
video_audio_url: [
|
||||
{ video: "" ,type:0,id:0}
|
||||
],
|
||||
obj:{ video: "" ,type:0,id:0},
|
||||
splitsTypeList: [],
|
||||
dataRule: {}
|
||||
dataRule: {},
|
||||
chapterId:null,
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@@ -197,6 +254,16 @@ export default {
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
delItem(index){
|
||||
this.video_audio_url.splice(index, 1)
|
||||
// console.log(this.video_audio_url,'删除后的')
|
||||
},
|
||||
addItem() {
|
||||
// var jj = {...this.obj}
|
||||
console.log(this.video_audio_url.length,'this.dataForm.video_audio_url--------')
|
||||
this.video_audio_url.push({'chapterId':this.chapterId, ...this.obj});
|
||||
console.log(this.video_audio_url,'this.dataForm.video_audio_url')
|
||||
},
|
||||
contentUploadSuccess(res, file) {
|
||||
// console.log(res)
|
||||
let quill = this.$refs.myQuillEditor.quill;
|
||||
@@ -231,6 +298,12 @@ export default {
|
||||
this.dataForm.courseId = courseid ? courseid : "";
|
||||
this.dataForm.catalogueId = catalogue_id ? catalogue_id : "";
|
||||
this.visible = true;
|
||||
this.chapterId = this.dataForm.id
|
||||
if(this.dataForm.videoList && this.dataForm.videoList.length > 0){
|
||||
this.video_audio_url = [...this.dataForm.videoList]
|
||||
}else{
|
||||
// this.video_audio_url = []
|
||||
}
|
||||
if (this.dataForm.imgUrl && this.dataForm.imgUrl != "") {
|
||||
var img = {
|
||||
name: "",
|
||||
@@ -265,9 +338,11 @@ export default {
|
||||
content: this.dataForm.content,
|
||||
sort: this.dataForm.sort,
|
||||
isAudition: this.dataForm.isAudition,
|
||||
videoList:this.video_audio_url,
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
// this.video_audio_url = []
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
@@ -303,7 +378,8 @@ export default {
|
||||
console.log(file);
|
||||
},
|
||||
handlereset() {
|
||||
(this.fileList = []), (this.fileListNovel = []), (this.visible = false);
|
||||
// this.video_audio_url = []
|
||||
(this.fileList = []), (this.fileListNovel = []), (this.visible = false),(this.video_audio_url = []);
|
||||
},
|
||||
handlePreview(file) {
|
||||
console.log(file);
|
||||
@@ -343,3 +419,11 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
.videoBox { width: 100%;
|
||||
margin-bottom: 15px; align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -77,7 +77,14 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="buyPeoples"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="购买人数"
|
||||
width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="sort"
|
||||
header-align="center"
|
||||
@@ -142,6 +149,9 @@
|
||||
@click.native="handleCreateProduct(scope.row.id)"
|
||||
>创建商品</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item @click.native="migrate(scope.row)"
|
||||
>迁移本部</el-dropdown-item
|
||||
>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
@@ -158,6 +168,11 @@
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getDataList"
|
||||
></add-or-update>
|
||||
<move-course
|
||||
v-if="drawerVisible" :catalogueId="catalogueId" :catalogueTitle = "catalogueTitle"
|
||||
ref="moveCourse"
|
||||
@mycloseDrawer="mycloseDrawer"
|
||||
></move-course>
|
||||
<price
|
||||
v-if="priceVisible"
|
||||
ref="priceUpdate"
|
||||
@@ -167,6 +182,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moveCourse from "./moveCourse.vue";
|
||||
import AddOrUpdate from "./catalogue-add-or-update";
|
||||
import price from "./catalogue-price";
|
||||
export default {
|
||||
@@ -181,6 +197,7 @@ export default {
|
||||
sociologyId: "",
|
||||
keywords: ""
|
||||
},
|
||||
drawerVisible: false,
|
||||
dataList: [],
|
||||
delFlag: false,
|
||||
pageIndex: 1,
|
||||
@@ -192,12 +209,16 @@ export default {
|
||||
priceVisible: false,
|
||||
urlList: {
|
||||
createProduct: "/master/course/createProductForCatalogue"
|
||||
}
|
||||
},
|
||||
catalogueId:null, // 操作的目录id,
|
||||
courseId:null, // 勾选的课程id,
|
||||
catalogueTitle:'' //迁移的课程名称
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
price
|
||||
price,
|
||||
moveCourse
|
||||
},
|
||||
activated() {
|
||||
this.courseid = this.$route.query.id;
|
||||
@@ -234,6 +255,30 @@ export default {
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
mycloseDrawer(val) {
|
||||
console.log("999999", val);
|
||||
this.drawerVisible = false;
|
||||
this.getDataList();
|
||||
},
|
||||
migrate(item) {
|
||||
// 课程迁移
|
||||
// console.log(item);
|
||||
|
||||
// this.$confirm("您正在进行课程迁移操作, 是否继续?", "提示", {
|
||||
// confirmButtonText: "确定",
|
||||
// cancelButtonText: "取消",
|
||||
// type: "warning"
|
||||
// })
|
||||
// .then(() => {
|
||||
this.catalogueId = item.id
|
||||
this.catalogueTitle = item.title
|
||||
this.drawerVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["moveCourse"].getDataList();
|
||||
});
|
||||
// })
|
||||
// .catch(() => {});
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle(val) {
|
||||
this.pageSize = val;
|
||||
@@ -258,7 +303,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleCreateProduct(id) {
|
||||
console.log('id at line 260:', id)
|
||||
console.log("id at line 260:", id);
|
||||
this.$http
|
||||
.request({
|
||||
url: this.$http.adornUrl(`${this.urlList.createProduct}`),
|
||||
|
||||
@@ -67,6 +67,11 @@
|
||||
align="center"
|
||||
label="课程名"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<span>{{ scope.row.title }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column prop="authorName" header-align="center" align="center" label="作者姓名">
|
||||
@@ -163,10 +168,7 @@
|
||||
width="600"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
style=" "
|
||||
v-if="scope.row.courseCatalogueEntityList.length == 0"
|
||||
>
|
||||
<div style=" " v-if="scope.row.courseCatalogueEntityList.length == 0">
|
||||
该课程还未添加目录
|
||||
</div>
|
||||
<div
|
||||
@@ -183,7 +185,6 @@
|
||||
>
|
||||
<div
|
||||
style="width: 90px;float: left;font-weight: 800;border: 1px solid #bbbb; border-radius: 4px;line-height: 30px;"
|
||||
|
||||
>
|
||||
<!-- <el-tag type="success" > -->
|
||||
{{ v.title }}
|
||||
@@ -198,10 +199,13 @@
|
||||
}px);float: right;`
|
||||
"
|
||||
>
|
||||
<div v-if="v.productList.length==0">
|
||||
暂未关联商品
|
||||
</div>
|
||||
<div v-for="(item, i) in v.productList" v-if="v.productList.length>0">
|
||||
<div v-if="v.productList.length == 0">
|
||||
暂未关联商品
|
||||
</div>
|
||||
<div
|
||||
v-for="(item, i) in v.productList"
|
||||
v-if="v.productList.length > 0"
|
||||
>
|
||||
{{ item.productName }}
|
||||
<span style="color: #ff5b36;"
|
||||
>¥{{
|
||||
@@ -252,7 +256,7 @@
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="160"
|
||||
width="240"
|
||||
label="操作"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
@@ -306,6 +310,9 @@
|
||||
@click="addOrUpdateHandle(scope.row)"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button type="text" size="small" @click="showLinkTags(scope.row)"
|
||||
>查看引用</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@@ -333,6 +340,44 @@
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getDataList"
|
||||
></add-or-update>
|
||||
<el-dialog
|
||||
title="课程引用一览"
|
||||
:visible.sync="resListVisible"
|
||||
width="60%"
|
||||
@close="closeLink"
|
||||
>
|
||||
<div>
|
||||
<div v-if="resList.length > 0">
|
||||
<div style="margin-bottom:20px">当前课程共有 {{resList.length}} 个标签引用</div>
|
||||
<div v-for="(item, index) in resList" :key="index">
|
||||
{{index + 1}}、 {{ item.title }}
|
||||
<span v-if="item.isLast != 1">
|
||||
<span v-for="(item1, index1) in item.children" :key="index1"
|
||||
> > {{ item1.title }}
|
||||
<span v-if="item1.isLast != 1">
|
||||
<span
|
||||
v-for="(item2, index2) in item1.children"
|
||||
:key="index2"
|
||||
> > {{ item2.title }}
|
||||
<span v-if="item2.isLast != 1">
|
||||
<span
|
||||
v-for="(item3, index3) in item2.children"
|
||||
:key="index3"
|
||||
> > {{ item3.title }}</span
|
||||
>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>这门课程还没有被标签引用哦~</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="closeLink">好 的</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -379,7 +424,9 @@ export default {
|
||||
urlList: {
|
||||
medicalList: "/master/courseMedical/getCourseMedicalList", //医学
|
||||
sociologyList: "/master/courseSociology/getCourseSociologyList" //国学
|
||||
}
|
||||
},
|
||||
resList: [],
|
||||
resListVisible: false
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@@ -395,6 +442,27 @@ export default {
|
||||
this.getTreeList(this.urlList.sociologyList, 2);
|
||||
},
|
||||
methods: {
|
||||
closeLink() {
|
||||
this.resListVisible = false;
|
||||
this.resList = [];
|
||||
},
|
||||
showLinkTags(row) {
|
||||
|
||||
this.$http({
|
||||
url: this.$http.adornUrl("/master/course/getCourseLableLinkList"),
|
||||
method: "post",
|
||||
data: this.$http.adornData({
|
||||
courseId: row.id
|
||||
})
|
||||
}).then(res => {
|
||||
this.resListVisible = true;
|
||||
if (res.data.code == 0 && res.data.resList.length > 0) {
|
||||
this.resList = res.data.resList;
|
||||
|
||||
}
|
||||
// console.log(row, "row" , res.data.resList,this.resList);
|
||||
});
|
||||
},
|
||||
handleChange(value) {
|
||||
console.log(value, "989999999");
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<span v-else>普通</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column prop="createTime" header-align="center" align="center" label="上传时间">
|
||||
</el-table-column>
|
||||
<el-table-column prop="video" header-align="center" align="center" label="视频">
|
||||
@@ -25,6 +25,23 @@
|
||||
<img v-if="scope.row.imgUrl != ''" :src="scope.row.imgUrl" width="70" height="100" class="tableImg" />
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="sort"
|
||||
width="130"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="排序( 双击修改 )"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div class="paixu" @dblclick="myDbClick(scope.row)">
|
||||
<span v-show="!scope.row.isEdit">{{scope.row.sort}}</span>
|
||||
<div class="inputBox" v-show="scope.row.isEdit">
|
||||
<el-input @keyup.enter.native="changeSort(scope.row)" min="0" @blur="changeSort(scope.row)" v-model.number="scope.row.sort" ></el-input>
|
||||
<el-tag type="danger" size="mini" @click="cancelBtn(scope.row)">×</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="content" header-align="center" align="center" label="内容">
|
||||
</el-table-column> -->
|
||||
|
||||
@@ -71,7 +88,8 @@ export default {
|
||||
totalPage: 0,
|
||||
dataListLoading: false,
|
||||
dataListSelections: [],
|
||||
addOrUpdateVisible: false
|
||||
addOrUpdateVisible: false,
|
||||
oldSort:0,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -90,6 +108,43 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
cancelBtn(row){
|
||||
row.isEdit = false
|
||||
this.oldSort = 0
|
||||
if(row.sort == ""){row.sort = 0}
|
||||
},
|
||||
changeSort(row){ // 确认排序
|
||||
if(this.oldSort == row.sort) {return}
|
||||
if(row.sort == ""){row.sort = 0}
|
||||
row.isEdit = false
|
||||
// console.log(row)
|
||||
// return false
|
||||
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/master/course/editCourseCatalogueChapterVideo'),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
"id": row.id,
|
||||
'chapterId': row.chapterId,
|
||||
'type': row.type,
|
||||
"video": row.video,
|
||||
// "content": this.dataForm.content,
|
||||
"sort": row.sort,
|
||||
})
|
||||
})
|
||||
.then(({ data }) => {
|
||||
if(data.code == 0 && data.msg == "success"){
|
||||
this.getDataList()
|
||||
this.oldSort = 0
|
||||
// console.log(this.oldSort,'复原')
|
||||
}
|
||||
});
|
||||
},
|
||||
myDbClick(row){ // 双击修改排序
|
||||
this.oldSort = row.sort
|
||||
console.log(this.oldSort,88888888)
|
||||
row.isEdit = true
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
@@ -107,6 +162,10 @@ export default {
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0 && data.page && data.page.records) {
|
||||
var list = data.page.records
|
||||
list.forEach(item => {
|
||||
item.isEdit = false
|
||||
});
|
||||
this.dataList = data.page.records
|
||||
this.totalPage = data.page.total
|
||||
} else {
|
||||
@@ -255,3 +314,9 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.paixu{cursor: pointer;}
|
||||
.inputBox{display: flex; align-items:center;
|
||||
.el-input{margin-right: 5px;}
|
||||
}
|
||||
</style>
|
||||
@@ -14,10 +14,10 @@
|
||||
<div
|
||||
v-if="isFresh"
|
||||
v-loading="!isFresh"
|
||||
style="width: calc(100% - 360px); height: 100%; float: right; border: 1px solid #bababa; border-top:none; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); border-radius: 10px;position: relative;"
|
||||
style="width: calc(100% - 360px); height: 100%; overflow-y: scroll; float: right; border: 1px solid #bababa; border-top:none; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); border-radius: 10px;position: relative;"
|
||||
>
|
||||
<el-tabs type="card">
|
||||
<el-tab-pane label="基本标签信息">
|
||||
<el-tabs type="card" v-model="activeName">
|
||||
<el-tab-pane label="基本标签信息" name="first">
|
||||
<div class="border_box info_box">
|
||||
<div class="title_box">
|
||||
<div class="title"><span class="line"></span>基本标签信息</div>
|
||||
@@ -102,15 +102,15 @@
|
||||
|
||||
<div style="">
|
||||
<div class="dataType flexBox" >
|
||||
<el-radio v-model="addForm.dataType" :label="1"
|
||||
<el-radio v-model="addForm.mediaType" :label="1"
|
||||
>加密视频</el-radio
|
||||
>
|
||||
<el-radio v-model="addForm.dataType" :label="2"
|
||||
<el-radio v-model="addForm.mediaType" :label="2"
|
||||
>上传音频</el-radio
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<div v-if="addForm.dataType == 2" style="margin:20px auto; margin-top:20px ; width: 50%; ">
|
||||
<div>
|
||||
<div v-if="addForm.mediaType == 2" style="margin:20px auto; margin-top:20px ; width: 50%; ">
|
||||
<el-upload
|
||||
class="upload-demo audioUpload"
|
||||
:action="baseUrl + '/oss/fileoss'"
|
||||
@@ -144,12 +144,7 @@
|
||||
class="avatar-uploader11"
|
||||
:action="baseUrl + '/oss/fileoss'"
|
||||
accept=".jpeg,.jpg,.gif,.png"
|
||||
:show-file-list="false"
|
||||
:before-upload="
|
||||
res => {
|
||||
return beforeImgUpload(res, 'f2');
|
||||
}
|
||||
"
|
||||
:show-file-list="false"
|
||||
:on-success="contentUploadSuccess"
|
||||
>
|
||||
</el-upload>
|
||||
@@ -197,7 +192,7 @@
|
||||
</div> -->
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
label="已关联课程列表"
|
||||
label="已关联课程列表" name="second"
|
||||
v-if="currentNode && currentNode.data.isLast == 1"
|
||||
>
|
||||
<div
|
||||
@@ -497,6 +492,7 @@ export default {
|
||||
CanBindProductList: "/master/courseMedical/getCourseListCanMedical",
|
||||
editCourse: "/master/courseMedical/updateCourseToMedicalSort"
|
||||
},
|
||||
activeName:'first',
|
||||
addForm: {},
|
||||
audioFileList: [],
|
||||
isFresh: false,
|
||||
@@ -618,8 +614,10 @@ export default {
|
||||
audioHandleRemove(file, fileList) {
|
||||
console.log(file, fileList);
|
||||
this.audioFileList = []
|
||||
this.addForm.media = ''
|
||||
},
|
||||
audioUploadSuccess(res, file) {
|
||||
this.audioFileList = []
|
||||
this.audioFileList.push(file)
|
||||
console.log(this.audioFileList,res, "上传成功");
|
||||
this.addForm.media = res.url
|
||||
@@ -729,9 +727,19 @@ export default {
|
||||
this.isEdit = false;
|
||||
this.isFresh = true;
|
||||
console.log("🚀 ~ getCommonShopDataList ~ type, id:", type, id);
|
||||
|
||||
this.currentNode = { data: { ...form } };
|
||||
this.addForm = form;
|
||||
if(this.addForm.isLast == 0){
|
||||
this.activeName = 'first'}
|
||||
this.fimages = this.addForm.icon;
|
||||
this.audioFileList = []
|
||||
if(this.addForm.mediaType == 2 && this.addForm.media != ''){
|
||||
this.audioFileList.push({
|
||||
url:this.addForm.media,
|
||||
name:'audio--'
|
||||
})
|
||||
}
|
||||
|
||||
await this.getDataList();
|
||||
// this.$refs.commonTree.setCurrentNodeShow();
|
||||
@@ -772,8 +780,11 @@ export default {
|
||||
this.$message.error("请输入标签名称");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!this.addForm.content){
|
||||
this.addForm.content = ''
|
||||
}
|
||||
console.log(this.addForm, "this.addForm-----------");
|
||||
|
||||
await this.$refs[formName].validate(async valid => {
|
||||
if (valid) {
|
||||
await this.$http({
|
||||
@@ -802,7 +813,15 @@ export default {
|
||||
if (data.Medical.icon && data.Medical.icon != "") {
|
||||
this.fimages = data.Medical.icon;
|
||||
}
|
||||
|
||||
this.addForm = data.Medical;
|
||||
this.audioFileList = []
|
||||
if(this.addForm.mediaType == 2 && this.addForm.media != ''){
|
||||
this.audioFileList.push({
|
||||
url:this.addForm.media,
|
||||
name:'audio'
|
||||
})
|
||||
}
|
||||
/// this.currentNode = { data: { ...data.Medical } };
|
||||
});
|
||||
} else {
|
||||
@@ -894,6 +913,7 @@ export default {
|
||||
// console.log(this.$refs.tree.handleClickNodes(), "当前选中节点");
|
||||
console.log(node, data, "当前选中节点");
|
||||
this.currentNode = node ? node : {};
|
||||
|
||||
this.isFresh = false;
|
||||
this.isFresh = true;
|
||||
|
||||
@@ -911,14 +931,14 @@ export default {
|
||||
delFlag: 0,
|
||||
isLast: 0,
|
||||
icon: "",
|
||||
content:'',
|
||||
pid: data.id,
|
||||
sort: 0,
|
||||
title: ""
|
||||
};
|
||||
break;
|
||||
}
|
||||
this.addForm = { ...form };
|
||||
|
||||
this.addForm = { ...form };
|
||||
this.$nextTick(() => {
|
||||
this.$refs.commonShop.clear();
|
||||
// this.$refs.commonShop.bookMarketId = null;
|
||||
@@ -1461,10 +1481,10 @@ p {
|
||||
}
|
||||
|
||||
.shopFormBox {
|
||||
min-width: auto !important;
|
||||
min-width: auto !important;
|
||||
}
|
||||
.ql-container {
|
||||
height: 300px; overflow-y: scroll;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
/deep/ .quill-editor{min-height: 200px !important;}
|
||||
|
||||
288
src/views/modules/course/moveCourse.vue
Normal file
288
src/views/modules/course/moveCourse.vue
Normal file
@@ -0,0 +1,288 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
ref="drawer"
|
||||
title="课程迁移"
|
||||
:visible.sync="drawerVisible"
|
||||
direction="rtl"
|
||||
:before-close="drawerHandleClose"
|
||||
>
|
||||
<!-- ------------------------- -->
|
||||
<div style="padding:15px">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="dataForm"
|
||||
@keyup.enter.native="getDataList()"
|
||||
>
|
||||
<div style="display:flex;align-items:end">
|
||||
<el-form-item label="课程名称">
|
||||
<el-input
|
||||
v-model="query.courseName"
|
||||
placeholder="课程名称"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="平台分类">
|
||||
<el-cascader
|
||||
clearable
|
||||
:props="{
|
||||
label: 'title',
|
||||
value: 'id',
|
||||
checkStrictly: true
|
||||
}"
|
||||
v-model="selectType"
|
||||
:options="options"
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label=" ">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="
|
||||
pageIndex = 1;
|
||||
getDataList();
|
||||
"
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- <el-button type="primary" @click="addOrUpdateHandle()"
|
||||
>新增</el-button
|
||||
> -->
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
v-loading="dataListLoading"
|
||||
style="width: 100%;"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column
|
||||
prop="title"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="课程名"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<span>{{ scope.row.title }}</span>
|
||||
<!-- <el-tooltip placement="bottom" effect="light">
|
||||
<div slot="content">多行信息<br />第二行信息多行信息<br />第二行信息多行信息<br />第二行信息多行信息第二行信息多行信息第二行信息</div>
|
||||
<i
|
||||
class="el-icon-paperclip"
|
||||
style=" color:#17B3A3; margin-left:15px"
|
||||
></i>
|
||||
</el-tooltip> -->
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
:current-page="pageIndex"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="totalPage"
|
||||
style="padding: 30px 0; text-align: center;"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
>
|
||||
</el-pagination>
|
||||
<div style="text-align:center">
|
||||
<el-button type="primary" @click="moveCourseBtn">确 定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ----------------------------- -->
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ["catalogueId","catalogueTitle"],
|
||||
data() {
|
||||
|
||||
return {
|
||||
drawerVisible: true,
|
||||
selectType: [],
|
||||
options: [
|
||||
{
|
||||
id: "all",
|
||||
title: "全部",
|
||||
children: undefined
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
title: "医学",
|
||||
children: []
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: "国学",
|
||||
children: []
|
||||
}
|
||||
],
|
||||
dataForm: {
|
||||
key: ""
|
||||
},
|
||||
multipleSelection: [],
|
||||
query: {
|
||||
type: "",
|
||||
categoryId: "",
|
||||
sociologyId: "",
|
||||
courseName: ""
|
||||
},
|
||||
dataList: [],
|
||||
delFlag: false,
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
totalPage: 0,
|
||||
dataListLoading: false,
|
||||
dataListSelections: [],
|
||||
addOrUpdateVisible: false,
|
||||
urlList: {
|
||||
medicalList: "/master/courseMedical/getCourseMedicalList", //医学
|
||||
sociologyList: "/master/courseSociology/getCourseSociologyList" //国学
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {},
|
||||
drawerHandleClose() {
|
||||
this.$emit("mycloseDrawer", "drawer");
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
if (val.length > 1) {
|
||||
this.$message.error("只可以选择一门课程进行迁移哦~");
|
||||
} else {
|
||||
this.multipleSelection = val;
|
||||
}
|
||||
|
||||
console.log(22, this.multipleSelection);
|
||||
},
|
||||
moveCourseBtn() {
|
||||
if (this.multipleSelection.length == 0) {
|
||||
this.$message.error("请选择您要迁移的目标课程!");
|
||||
} else if (this.multipleSelection.length > 1) {
|
||||
this.$message.error("只可以选择一门课程进行迁移哦~");
|
||||
} else {
|
||||
this.$confirm(
|
||||
`${this.catalogueTitle}目录 即将迁移到 ${this.multipleSelection[0].title}课程内, 是否继续?`,
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}
|
||||
).then(() => {
|
||||
|
||||
if(!this.catalogueId){
|
||||
this.$message.error('请重新选择您要转移的课程目录')
|
||||
return
|
||||
}
|
||||
// console.log(this.catalogueId, this.multipleSelection[0].id)
|
||||
// 走接口 并关闭
|
||||
this.$http
|
||||
.request({
|
||||
url: this.$http.adornUrl(
|
||||
`/master/course/courseCatalogueTransfer`
|
||||
),
|
||||
method: "POST",
|
||||
data: {
|
||||
courseId: this.multipleSelection[0].id, //新课程id
|
||||
catalogueId: this.catalogueId //目录id
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
console.log("********:", res);
|
||||
this.$message.success('操作成功')
|
||||
this.drawerHandleClose()
|
||||
}).catch(()=>{
|
||||
this.$message.error('操作失败')
|
||||
});
|
||||
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs["moveCourse"].getDataList();
|
||||
// });
|
||||
});
|
||||
}
|
||||
},
|
||||
// checkSelectable(row){
|
||||
// return row.auditStatus === '0'
|
||||
// console.log(row,'row')
|
||||
// },
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
var data = {
|
||||
page: this.pageIndex,
|
||||
limit: this.pageSize,
|
||||
courseName: this.query.courseName //关键字
|
||||
};
|
||||
|
||||
if (this.selectType.length == 0) {
|
||||
data.type = 0;
|
||||
data.medicalId = "";
|
||||
data.sociologyId = "";
|
||||
} else if (this.selectType.length >= 1) {
|
||||
data.type = this.selectType[0] == "all" ? 0 : this.selectType[0];
|
||||
if (this.selectType.length == 1) {
|
||||
data.medicalId = "";
|
||||
data.sociologyId = "";
|
||||
}
|
||||
if (this.selectType.length > 1) {
|
||||
if (this.selectType[0] == 1) {
|
||||
data.medicalId = this.selectType[this.selectType.length - 1];
|
||||
data.sociologyId = "";
|
||||
}
|
||||
if (this.selectType[0] == 2) {
|
||||
data.medicalId = "";
|
||||
data.sociologyId = this.selectType[this.selectType.length - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.dataListLoading = true;
|
||||
this.$http({
|
||||
url: this.$http.adornUrl("/master/course/getCourseList"),
|
||||
method: "post",
|
||||
data: this.$http.adornData(data)
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataList = data.page.records;
|
||||
this.totalPage = data.page.total;
|
||||
} else {
|
||||
this.dataList = [];
|
||||
this.totalPage = 0;
|
||||
}
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle(val) {
|
||||
this.pageSize = val;
|
||||
this.pageIndex = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
// 当前页
|
||||
currentChangeHandle(val) {
|
||||
this.pageIndex = val;
|
||||
this.getDataList();
|
||||
},
|
||||
// 多选
|
||||
selectionChangeHandle(val) {
|
||||
this.dataListSelections = val;
|
||||
}
|
||||
// 新增 / 修改
|
||||
// addOrUpdateHandle(row) {
|
||||
// this.addOrUpdateVisible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(row);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
@@ -404,6 +404,7 @@ export default {
|
||||
this.$message.error("请输入标签名称");
|
||||
return false;
|
||||
}
|
||||
this.addForm.content = ''
|
||||
await this.$refs[formName].validate(async valid => {
|
||||
if (valid) {
|
||||
await this.$http({
|
||||
|
||||
@@ -550,7 +550,8 @@ export default {
|
||||
method: "POST",
|
||||
data: {
|
||||
...this.dataForm,
|
||||
product_details: this.dataForm.productDetails
|
||||
product_details: this.dataForm.productDetails,
|
||||
activityPrice: this.dataForm.hDprice,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
|
||||
Reference in New Issue
Block a user