提交 daf19ee6 authored 作者: 王腾飞's avatar 王腾飞

1230

上级 89d852bb
......@@ -90,7 +90,7 @@
</el-cascader>
</div>
</el-form-item>
<el-form-item label="资源标签:" prop="label">
<el-form-item label="资源标签:" :model="formData" prop="label">
<!-- <el-select v-model="resourceLabel" multiple placeholder="指定资源所属专题与内容特征,相关标签需提前在“资源标签”功能中设置。" style="width:100%;" @change="selectOpt">
<el-option
v-for="item in resourceLabelList"
......@@ -99,7 +99,7 @@
:value="item.id">
</el-option>
</el-select> -->
<!-- <el-input v-model="resourceLabel" multiple placeholder="指定资源所属专题与内容特征,相关标签需提前在“资源标签”功能中设置。" @focus="showLableDia"></el-input> -->
<!-- <el-input></el-input> -->
<div style="display:flex;">
<div class="entityDataCon">
<span v-for="(item, key) in resourceLabel" :key="key" class="entitySpan" @click="deleteLableItem(item, key)">{{ item.name }}<i class="el-icon-error" style="padding-left:5px;"></i></span>
......@@ -628,6 +628,7 @@ export default {
}
},
getLookContent() {//查看
let _this = this;
if(this.$route.query.oid && this.$route.query.flag) {
this.isShowSavaBtn1 = true;
this.isShowSavaBtn = false;
......@@ -657,9 +658,25 @@ export default {
if (res.data.data.longitude) {
this.location = '经度:' + res.data.data.longitude + ',' + '维度:' + res.data.data.latitude + ',' + res.data.data.address;
}
res.data.data.label.map((item, index) => {
this.$set(item, 'value', item.labelId);
this.resourceLabel.push(item)
console.log(this.gridData, '123OP')
_this.$nextTick(() => {
res.data.data.label.map((item, index) => {
_this.$set(item, 'value', item.labelId);
_this.resourceLabel.push(item)
})
console.log(_this.resourceLabel, 'KLlll')
_this.resourceLabel.map(itemX => {
console.log(itemX, "123")
_this.gridData.map((itemY, index) => {
console.log(itemY, 'HJHJHj')
if (itemX.labelId == itemY.id) {
_this.$nextTick(function () {
// DOM 更新了
_this.$refs.multipleTable.toggleRowSelection(_this.gridData[index], true);
})
}
})
})
})
res.data.data.diyType.map((item, index) => {
this.$set(item, 'value', item.dtId);
......@@ -794,6 +811,7 @@ export default {
},
handleSelectionChange (val) {
// multipleSelection
console.log(val, '123123')
this.multipleSelection = val;
// let arr = [...this.multipleSelection, ...val];
// console.log(arr,123)
......@@ -804,15 +822,14 @@ export default {
// return cur;
// },[]) //设置cur默认类型为数组,并且初始值为空的数组
// this.multipleSelection = peon;
let optIdArr = [];
this.multipleSelection.map((item, index) => {
var obj = {
labelId: item.id
}
optIdArr.push(obj)
})
this.formData.label = optIdArr;
//this.resourceLabel = val
// let optIdArr = [];
// this.multipleSelection.map((item, index) => {
// var obj = {
// labelId: item.id
// }
// optIdArr.push(obj)
// })
// this.formData.label = optIdArr;
},
sureLable () {
// this.multipleSelection.map((item, index) => {
......@@ -821,6 +838,15 @@ export default {
// }
// })
this.resourceLabel = this.multipleSelection;
let optIdArr = [];
this.resourceLabel.map((item, index) => {
var obj = {
labelId: item.id
}
optIdArr.push(obj)
})
this.formData.label = optIdArr;
console.log(optIdArr, '312312312')
this.dialogTableVisible = false;
},
cancleSureLable () {
......@@ -835,18 +861,30 @@ export default {
this.getSearchPageLable();
},
closeLableDia() {
console.log(this.searchPageLableForm.pageNum,'88888')
console.log(this.resourceLabel,'88888')
this.$refs.multipleTable.clearSelection();
this.delArr = [];
},
deleteLableItem (item, key) {
//this.delArr.push(item);
this.resourceLabel.splice(key, 1);//删除便签
let optIdArr = [];
this.resourceLabel.map((item, index) => {
var obj = {
labelId: item.labelId
}
optIdArr.push(obj)
})
this.formData.label = optIdArr;
console.log(optIdArr, '312312312')
},
setDelData(){
console.log(this.resourceLabel, '55555566')
console.log(this.gridData, '5555556688')
let Vue=this;
this.resourceLabel.forEach((list,index)=>{
let ID=list.id;let INDEX=index;
let ID=list.id;
let INDEX=index;
this.gridData.forEach((item2, index) => {
if (ID == item2.id) {
Vue.$nextTick(function () {
......@@ -855,7 +893,6 @@ export default {
})
}
})
})
// this.multipleSelection.forEach((item1, index) => {
// console.log(item1 + index, '1233')
......@@ -871,6 +908,7 @@ export default {
optIdArr.push(obj)
})
this.formData.label = optIdArr;
console.log(optIdArr, '312312312')
},
querySearch (queryString, cb) {
var restaurants = this.gridData;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论