Commit 094290d5 authored by 胡冲's avatar 胡冲

修改学习学习内容展板资料不联动

parent ab1bb0b7
......@@ -13,6 +13,7 @@ module.exports = {
proxyTable: {
'/mall': {
target: "http://111.203.232.175:8088/mall",
// target: "http://wdzc.digitalfod.com/wdzcfwpt/mall",// 阿里云
// target: "http://192.168.0.106:8088/mall",
// target: "http://192.168.204.66:8088/mall",
changeOrigin: true,
......@@ -34,7 +35,7 @@ module.exports = {
// Various Dev Server settings
// host: 'localhost', // can be overwritten by process.env.HOST
host: '0.0.0.0', // can be overwritten by process.env.HOST
port: 3000, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
port: 3001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
......@@ -63,7 +64,7 @@ module.exports = {
// Paths
assetsRoot: path.resolve(__dirname, '../plat'),
assetsSubDirectory: 'static',
assetsPublicPath: './',
assetsPublicPath: '/wdzcfwpt/',
/**
* Source Maps
......
/**
* Created by supervisor on 2018/2/28.
*/
let baseUrl="";
let baseUrl="/mall/";
// let baseUrl="http://wdzc.digitalfod.com/wdzcfwpt/mall/"; // 阿里云
let routerMode='history';
let backToken = "back";
......
......@@ -121,7 +121,7 @@ export default {
this.$message({ type: "success", message: "新建视频版权方成功!" });
this.dialogVisible = false
}else{
this.$message({ type: "error", message: res.message });
this.$message({ type: "error", message: res.data.message });
}
......
......@@ -296,7 +296,8 @@ export default {
},
multipleSelection: [],
multipleSelection1:[],
userType: ""
userType: "",
tableInitFlag:false
};
},
mounted() {
......@@ -325,6 +326,8 @@ export default {
async init() {
if (this.$route.query.type === "Update") {
await this.getInfo(this.$route.query.id);
}else{
this.tableInitFlag=true;
}
await this.getLearnProject();
// this.getAssetTypeData();
......@@ -372,18 +375,27 @@ export default {
this.getTableData(param, "update");
},
async setSelctTable() {
// console.info(this.multipleSelection)
// console.info(this.tableData)
if (!this.multipleSelection.length) {
return false;
}
let arr =[]
this.multipleSelection.map(item=>{
arr.push(item.id)
})
// console.info(arr)
let _this = this;
let tableData = this.tableData;
let multipleSelection = this.multipleSelection;
let tempNum=0;
tableData.forEach(v => {
multipleSelection.forEach(m => {
if (v.id == m.id) {
if (arr.includes(v.id)) {
_this.$refs.multipleTable.toggleRowSelection(v);
tempNum++;
if(tempNum === arr.length){
this.tableInitFlag=true
}
}
});
});
await this.getTableParam1()
},
......@@ -392,16 +404,17 @@ export default {
if (!this.multipleSelection1.length) {
return false;
}
let arr =[]
this.multipleSelection1.map(item=>{
arr.push(item.id)
})
let _this = this;
let tableData1 = this.tableData1;
let multipleSelection1 = this.multipleSelection1;
tableData1.forEach(v => {
multipleSelection1.forEach(m => {
if (v.id == m.id) {
if (arr.includes(v.id)) {
_this.$refs.multipleTable1.toggleRowSelection(v);
}
});
});
},
// 获取展板类别列表
getAssetTypeData() {
......@@ -428,6 +441,8 @@ export default {
this.getAssetTypeData2()
this.ruleForm.copyrightOwnerIdList = []
this.ruleForm.exhibitionBoardCatIdList = []
this.tableData = []
this.tableData1 = []
},
// 获取版权方列表
getAssetTypeData2() {
......@@ -487,14 +502,25 @@ export default {
},
// 展板多选赋值
handleSelectionChange(val) {
if(this.tableInitFlag){
// console.info(this.tableData.length)
// this.getTableParam1()
if(val.length === 0){
this.multipleSelection1 = []
this.tableData1 = []
}
// console.info('tableInitFlag='+this.tableInitFlag)
this.multipleSelection = val;
let newArray = val.map(item => {
return item.id;
});
let newArray=[]
val.map((item,index) => {
newArray.push(item.id)
this.ruleForm.exhibitionBoardIdList = newArray;
if(this.type === 'add') {
// console.info(index === (val.length-1))
if(index === (val.length-1)){
this.getTableParam1()
}
});
}
},
// 展板资料多选赋值
handleSelectionChange1(val) {
......@@ -624,6 +650,10 @@ export default {
},
getTableData1 () {
let vm = this;
// console.log(vm.ruleForm.exhibitionBoardIdList.length+1)
if(vm.ruleForm.exhibitionBoardIdList.length === 0){
vm.tableData1 = []
}else{
vm.$https(
{
url: "asset/getAssetByBoard",
......@@ -640,21 +670,20 @@ export default {
// 选中表格数据
// console.log(this.type)
if(this.type === 'add'){
vm.multipleSelection1 = res.data.data
setTimeout(() => {
vm.setSelctTable1();
}, 1000);
vm.multipleSelection1 = data
}else{
// console.log(this.multipleSelection1)
vm.multipleSelection1 = this.multipleSelection1
}
setTimeout(() => {
vm.setSelctTable1();
}, 1000);
}
})
.catch(function(err) {
console.log(err);
});
}
},
// 根据展板类别,版权方获取展板备选清单
async getTableData(param, type) {
......
This diff is collapsed.
......@@ -3,4 +3,3 @@
"baseUrl": "/mall/",
"directory": "/plat"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment