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

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

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