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

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

parent ab1bb0b7
......@@ -12,7 +12,8 @@ module.exports = {
assetsPublicPath: '/',
proxyTable: {
'/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.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 routerMode='history';
let backToken = "back";
let ProUrl = ""
getBaseUrl();
function getBaseUrl(){
$.ajax({
url: "./static/json/api.json",
async: false,
success: function(data){
ProUrl = data.baseUrl || (window.location.protocol + '//' + window.location.host + '/');
}
})
}
if(process.env.NODE_ENV === 'development'){
baseUrl=ProUrl
}else if(process.env.NODE_ENV === 'production'){
baseUrl=ProUrl
}
export {
baseUrl,
backToken,
routerMode
}
// process.env 是读取系统环境变量,在node命令窗口启动时设置相关的环境变量,NODE_ENV=development node来启动命令窗口
/**
* Created by supervisor on 2018/2/28.
*/
let baseUrl="/mall/";
// let baseUrl="http://wdzc.digitalfod.com/wdzcfwpt/mall/"; // 阿里云
let routerMode='history';
let backToken = "back";
let ProUrl = ""
getBaseUrl();
function getBaseUrl(){
$.ajax({
url: "./static/json/api.json",
async: false,
success: function(data){
ProUrl = data.baseUrl || (window.location.protocol + '//' + window.location.host + '/');
}
})
}
if(process.env.NODE_ENV === 'development'){
baseUrl=ProUrl
}else if(process.env.NODE_ENV === 'production'){
baseUrl=ProUrl
}
export {
baseUrl,
backToken,
routerMode
}
// process.env 是读取系统环境变量,在node命令窗口启动时设置相关的环境变量,NODE_ENV=development node来启动命令窗口
......@@ -77,7 +77,7 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="展板备选清单" class="w100" prop="exhibitionBoardIdList">
<div class="party-table">
<el-table
......@@ -146,7 +146,7 @@
</div>
</el-form-item>
</el-form>
<!--新增弹框-->
<el-dialog
custom-class="party-dialog"
......@@ -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,35 +375,45 @@ 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) {
_this.$refs.multipleTable.toggleRowSelection(v);
if (arr.includes(v.id)) {
_this.$refs.multipleTable.toggleRowSelection(v);
tempNum++;
if(tempNum === arr.length){
this.tableInitFlag=true
}
});
}
});
await this.getTableParam1()
},
setSelctTable1() {
// console.log(this.multipleSelection1)
// console.log(this.multipleSelection1)
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) {
_this.$refs.multipleTable1.toggleRowSelection(v);
}
});
if (arr.includes(v.id)) {
_this.$refs.multipleTable1.toggleRowSelection(v);
}
});
},
// 获取展板类别列表
......@@ -422,12 +435,14 @@ export default {
}else{
this.$message.warning("请先选择展板版权方!")
}
},
getSelect() {
this.getAssetTypeData2()
this.ruleForm.copyrightOwnerIdList = []
this.ruleForm.exhibitionBoardCatIdList = []
this.tableData = []
this.tableData1 = []
},
// 获取版权方列表
getAssetTypeData2() {
......@@ -487,13 +502,24 @@ export default {
},
// 展板多选赋值
handleSelectionChange(val) {
this.multipleSelection = val;
let newArray = val.map(item => {
return item.id;
});
this.ruleForm.exhibitionBoardIdList = newArray;
if(this.type === 'add') {
this.getTableParam1()
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,index) => {
newArray.push(item.id)
this.ruleForm.exhibitionBoardIdList = newArray;
// console.info(index === (val.length-1))
if(index === (val.length-1)){
this.getTableParam1()
}
});
}
},
// 展板资料多选赋值
......@@ -529,7 +555,7 @@ export default {
}else{
this.$message({ type: "error", message: res.data.message });
}
})
.catch(function(err) {
console.log(err);
......@@ -560,7 +586,7 @@ export default {
}else{
this.$message({ type: "success", message: "修改成功!" });
}
history.go(-1);
}else{
this.$message({ type: "error", message: res.data.message });
......@@ -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,25 +670,24 @@ 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);
}
setTimeout(() => {
vm.setSelctTable1();
}, 1000);
})
.catch(function(err) {
console.log(err);
});
}
},
// 根据展板类别,版权方获取展板备选清单
async getTableData(param, type) {
let vm = this;
vm.$https(
{
......@@ -686,7 +715,7 @@ export default {
},
selectAllThing() {
// debugger
this.ruleForm.exhibitionBoardCatIdList = [];
if (this.checkedThing) {
this.videoContentCat.map(item => {
......
This diff is collapsed.
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