课程添加关联书籍
This commit is contained in:
@@ -339,8 +339,17 @@
|
||||
<add-or-update
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
:relationProducts = relationProducts
|
||||
@pclose = "pclose"
|
||||
@showProTable = "showProTable"
|
||||
@refreshDataList="getDataList"
|
||||
></add-or-update>
|
||||
<commonShopTable
|
||||
ref="commonShopTable"
|
||||
:currentId="courseId"
|
||||
currentType="courseLinkPro"
|
||||
@linkList="linkList"
|
||||
></commonShopTable>
|
||||
<el-dialog
|
||||
title="课程引用一览"
|
||||
:visible.sync="resListVisible"
|
||||
@@ -383,6 +392,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import commonShopTable from "./shopproductTable.vue";
|
||||
import AddOrUpdate from "./course-add-or-update";
|
||||
export default {
|
||||
data() {
|
||||
@@ -405,9 +415,11 @@ export default {
|
||||
children: []
|
||||
}
|
||||
],
|
||||
courseId:"0",
|
||||
dataForm: {
|
||||
key: ""
|
||||
key: "",
|
||||
},
|
||||
relationProducts:[],
|
||||
query: {
|
||||
type: "",
|
||||
categoryId: "",
|
||||
@@ -431,7 +443,8 @@ export default {
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate
|
||||
AddOrUpdate,
|
||||
commonShopTable
|
||||
},
|
||||
activated() {
|
||||
if (this.$route.query.upPageInde != null) {
|
||||
@@ -443,6 +456,32 @@ export default {
|
||||
this.getTreeList(this.urlList.sociologyList, 2);
|
||||
},
|
||||
methods: {
|
||||
delPro(val){
|
||||
console.log(val,this.relationProducts)
|
||||
let list = this.relationProducts
|
||||
|
||||
|
||||
this.relationProducts = list.slice(1,1)
|
||||
|
||||
|
||||
},
|
||||
pclose(){
|
||||
this.relationProducts = []
|
||||
this.courseId = null
|
||||
console.log('关闭了 ')
|
||||
},
|
||||
linkList(data){
|
||||
console.log('父级',data)
|
||||
if(data && data.length > 0){
|
||||
this.relationProducts = data
|
||||
}
|
||||
},
|
||||
showProTable(data){
|
||||
console.log('data',data)
|
||||
this.$nextTick(() => {
|
||||
this.$refs.commonShopTable.open();
|
||||
});
|
||||
},
|
||||
closeLink() {
|
||||
this.resListVisible = false;
|
||||
this.resList = [];
|
||||
@@ -493,6 +532,7 @@ export default {
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.relationProducts = []
|
||||
var data = {
|
||||
page: this.pageIndex,
|
||||
limit: this.pageSize,
|
||||
@@ -554,7 +594,9 @@ export default {
|
||||
},
|
||||
// 新增 / 修改
|
||||
addOrUpdateHandle(row) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateVisible = true;
|
||||
row ? this.courseId = row.id : ''
|
||||
// this.courseId = row.id
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(row);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user