Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
K
knowledgeServiceAdmin
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
quanlili
knowledgeServiceAdmin
Commits
1353103f
提交
1353103f
authored
1月 09, 2020
作者:
quanlili
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改复选框
上级
ea51578c
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
21 行增加
和
64 行删除
+21
-64
index.vue
src/views/submission/resourcecommit/index.vue
+21
-64
没有找到文件。
src/views/submission/resourcecommit/index.vue
浏览文件 @
1353103f
...
@@ -190,7 +190,9 @@
...
@@ -190,7 +190,9 @@
</
template
>
</
template
>
</el-autocomplete>
</el-autocomplete>
<!-- @select="selectItem" -->
<!-- @select="selectItem" -->
<el-table
:data=
"gridData"
@
filter-method=
"filterChange"
:row-key=
"getRowKeys"
@
selection-change=
"handleSelectionChange"
ref=
"multipleTable"
>
<el-table
:data=
"gridData"
@
filter-method=
"filterChange"
:row-key=
"getRowKeys"
@
selection-change=
"handleSelectionChange"
@
select=
"selectHandler"
ref=
"multipleTable"
>
<el-table-column
<el-table-column
type=
"selection"
type=
"selection"
:reserve-selection=
"true"
:reserve-selection=
"true"
...
@@ -627,27 +629,6 @@ export default {
...
@@ -627,27 +629,6 @@ export default {
_this
.
$set
(
item
,
'value'
,
item
.
labelId
);
_this
.
$set
(
item
,
'value'
,
item
.
labelId
);
_this
.
resourceLabel
.
push
(
item
)
_this
.
resourceLabel
.
push
(
item
)
})
})
// console.log(this.gridData, '123OP')
// _this.$nextTick(function() {
// 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 更新了
// console.log(_this.$refs.multipleTable, '123456789')
// _this.$refs.multipleTable.toggleRowSelection(_this.gridData[index], true);
// })
// }
// })
// })
// })
res
.
data
.
data
.
diyType
.
map
((
item
,
index
)
=>
{
res
.
data
.
data
.
diyType
.
map
((
item
,
index
)
=>
{
this
.
$set
(
item
,
'value'
,
item
.
dtId
);
this
.
$set
(
item
,
'value'
,
item
.
dtId
);
this
.
$set
(
item
,
'label'
,
item
.
typeName
);
this
.
$set
(
item
,
'label'
,
item
.
typeName
);
...
@@ -786,9 +767,10 @@ export default {
...
@@ -786,9 +767,10 @@ export default {
})
})
},
},
showLableDia
()
{
showLableDia
()
{
this
.
searchPageLableForm
.
pageNum
=
1
;
//
this.searchPageLableForm.pageNum = 1;
console
.
log
(
this
.
multipleSelection
,
"点击选择选择资源标签"
)
console
.
log
(
this
.
multipleSelection
,
"点击选择选择资源标签"
)
this
.
getSearchPageLable
();
//this.getSearchPageLable();
this
.
setDelData
();
let
_this
=
this
;
let
_this
=
this
;
this
.
dialogTableVisible
=
true
;
this
.
dialogTableVisible
=
true
;
if
(
this
.
$route
.
query
.
flag
===
'look'
)
{
if
(
this
.
$route
.
query
.
flag
===
'look'
)
{
...
@@ -807,9 +789,7 @@ export default {
...
@@ -807,9 +789,7 @@ export default {
}
}
//this.setDelData();
//this.setDelData();
},
},
handleSelectionChange
(
val
)
{
selectHandler
(
val
,
row
){
// multipleSelection
val
.
map
(
item
=>
{
val
.
map
(
item
=>
{
this
.
$set
(
item
,
'labelId'
,
item
.
id
)
this
.
$set
(
item
,
'labelId'
,
item
.
id
)
})
})
...
@@ -817,44 +797,21 @@ export default {
...
@@ -817,44 +797,21 @@ export default {
console
.
log
(
this
.
multipleSelection
,
'呵呵呵呵呵呵呵呵'
)
console
.
log
(
this
.
multipleSelection
,
'呵呵呵呵呵呵呵呵'
)
if
(
this
.
$route
.
query
.
flag
===
'look'
)
{
if
(
this
.
$route
.
query
.
flag
===
'look'
)
{
console
.
log
(
this
.
resourceLabel
,
"&*&*&*"
)
console
.
log
(
this
.
resourceLabel
,
"&*&*&*"
)
//val.length = 0;
//this.multipleSelection = this.resourceLabel;
// this.multipleSelection = [...this.multipleSelection, ...val];//需要去重
// //数组对象去重
// let obj = {};
// let peon = this.multipleSelection.reduce((cur,next) => {
// obj[next.labelId] ? "" : obj[next.labelId] = true && cur.push(next);
// return cur;
// },[]) //设置cur默认类型为数组,并且初始值为空的数组
// this.multipleSelection = peon;
// console.log(val, '123123ttttttttttt')
}
}
// let arr = [...this.multipleSelection, ...val];
//console.log(selection, row,'selectHandlerselectHandler')
// console.log(arr,123)
},
// //数组对象去重
handleSelectionChange
(
val
)
{
// let obj = {};
// multipleSelection
// let peon = arr.reduce((cur,next) => {
// obj[next.id] ? "" : obj[next.id] = true && cur.push(next);
// val.map(item => {
// return cur;
// this.$set(item, 'labelId', item.id)
// },[]) //设置cur默认类型为数组,并且初始值为空的数组
// this.multipleSelection = peon;
// let optIdArr = [];
// this.multipleSelection.map((item, index) => {
// var obj = {
// labelId: item.id
// }
// optIdArr.push(obj)
// })
// })
// this.formData.label = optIdArr;
// this.multipleSelection = val;
// console.log(this.multipleSelection, '呵呵呵呵呵呵呵呵')
// if (this.$route.query.flag === 'look') {
// console.log(this.resourceLabel, "&*&*&*")
// }
},
},
// selectAll(selection) {
// if (selection.length != 0) {
// this.multipleSelection = [...this.multipleSelection, ...selection];
// }
// },
selectItem
(
selection
,
row
)
{
selectItem
(
selection
,
row
)
{
let
ids
=
[];
let
ids
=
[];
this
.
resourceLabel
.
map
(
item
=>
{
this
.
resourceLabel
.
map
(
item
=>
{
...
@@ -939,7 +896,7 @@ export default {
...
@@ -939,7 +896,7 @@ export default {
let
_this
=
this
;
let
_this
=
this
;
this
.
searchPageLableForm
.
pageNum
=
val
this
.
searchPageLableForm
.
pageNum
=
val
this
.
getSearchPageLable
();
this
.
getSearchPageLable
();
this
.
setDelData
()
//
this.setDelData()
console
.
log
(
_this
.
resourceLabel
,
'_this.resourceLabel_this.resourceLabel6666666'
);
console
.
log
(
_this
.
resourceLabel
,
'_this.resourceLabel_this.resourceLabel6666666'
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -986,10 +943,10 @@ export default {
...
@@ -986,10 +943,10 @@ export default {
},
},
setDelData
(){
setDelData
(){
let
Vue
=
this
;
let
Vue
=
this
;
//this.$refs.multipleTable.clearSelection();
this
.
resourceLabel
.
forEach
((
list
,
index
)
=>
{
this
.
resourceLabel
.
forEach
((
list
,
index
)
=>
{
let
ID
=
list
.
id
;
let
ID
=
list
.
id
;
let
INDEX
=
index
;
let
INDEX
=
index
;
//this.$refs.multipleTable.clearSelection();
this
.
gridData
.
forEach
((
item2
,
index
)
=>
{
this
.
gridData
.
forEach
((
item2
,
index
)
=>
{
if
(
ID
==
item2
.
id
)
{
if
(
ID
==
item2
.
id
)
{
Vue
.
$nextTick
(
function
()
{
Vue
.
$nextTick
(
function
()
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论