Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
K
knowledgeServiceAdmin
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
quanlili
knowledgeServiceAdmin
Commits
e4687ddb
提交
e4687ddb
authored
12月 16, 2019
作者:
王腾飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1216
上级
48da870f
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
116 行增加
和
25 行删除
+116
-25
index.js
src/router/index.js
+10
-10
index.vue
src/views/submission/resourcecommit/index.vue
+106
-15
没有找到文件。
src/router/index.js
浏览文件 @
e4687ddb
...
...
@@ -145,15 +145,15 @@ export const asyncRouterMap = [{
},
hidden
:
true
},{
path
:
'/submission/infoview'
,
redirect
:
'/submission/infoview/mycommit'
,
component
:
_import
(
'submission/infoview/index'
),
alwaysShow
:
true
,
meta
:
{
title
:
'提交信息包概览'
,
routerIds
:
[
'2403'
]
},
children
:
[{
//
path: '/submission/infoview',
//
redirect: '/submission/infoview/mycommit',
//
component: _import('submission/infoview/index'),
//
alwaysShow: true,
//
meta: {
//
title: '提交信息包概览',
//
routerIds: ['2403']
//
},
//
children: [{
path
:
'mycommit'
,
component
:
_import
(
'submission/infoview/mycommit'
),
name
:
'mycommit'
,
...
...
@@ -241,7 +241,7 @@ export const asyncRouterMap = [{
routerIds
:
[
'240305'
]
},
hidden
:
true
}]
//
}]
},{
path
:
'/submission/metadatamange'
,
redirect
:
'/submission/metadatamange/metadataplan'
,
...
...
src/views/submission/resourcecommit/index.vue
浏览文件 @
e4687ddb
...
...
@@ -178,6 +178,17 @@
</div>
</div>
<el-dialog
title=
"标签资源"
:visible
.
sync=
"dialogTableVisible"
class=
"lableDia"
>
<el-autocomplete
popper-class=
"my-autocomplete"
v-model=
"searchPageLableForm.search"
:fetch-suggestions=
"querySearch"
placeholder=
"请输入内容"
@
select=
"handleSelect"
>
<i
slot=
"append"
class=
"el-icon-search"
@
click=
"searchLable"
>
检索标签
</i>
<template
slot-scope=
"
{ item }">
<div
class=
"name"
>
{{
item
.
value
}}
</div>
</
template
>
</el-autocomplete>
<el-table
:data=
"gridData"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
...
...
@@ -188,6 +199,7 @@
<el-table-column
property=
"createrName"
label=
"创建者"
></el-table-column>
<el-table-column
property=
"createTime"
label=
"创建时间"
></el-table-column>
</el-table>
<pagination
v-if=
"totalCount>0"
:total=
"totalCount"
:page-size=
"searchPageLableForm.pageSize"
:page-sizes=
"[6, 12, 18, 24, 30]"
@
pagesize=
"pagesizeFun"
@
currentPage=
"currentPageFun"
></pagination>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogTableVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sureLable"
>
确 定
</el-button>
...
...
@@ -204,6 +216,7 @@ import linkentity from '../linkentity'
import
{
uploadUrl
,
uploadPath
,
requestPath
}
from
"@/utils/global"
;
import
{
debounce
}
from
"@/utils/publicFunctions"
;
import
_
from
'lodash'
import
pagination
from
'@/components/pagination/pagination'
import
{
resourceCommitAPI
,
resourceDiyTypeAPI
,
...
...
@@ -219,17 +232,20 @@ export default {
name
:
'resourcecommit'
,
components
:
{
mapmark
,
linkentity
linkentity
,
pagination
},
data
()
{
return
{
restaurants
:
[],
totalCount
:
0
,
gridData
:
[],
multipleSelection
:
[],
dialogTableVisible
:
false
,
searchPageLableForm
:
{
search
:
null
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
6
,
orderBy
:
null
},
domain
:
process
.
env
.
BASE_API
,
...
...
@@ -353,6 +369,11 @@ export default {
]
}
},
computed
:
{
searchWord
()
{
return
this
.
searchPageLableForm
.
search
}
},
mounted
()
{
this
.
getresourceDiyTypeList
();
this
.
resourceLabelListAPI
();
...
...
@@ -372,6 +393,15 @@ export default {
},
deep
:
true
},
searchWord
:
{
handler
(
newVal
,
oldVal
)
{
console
.
log
(
newVal
)
this
.
searchPageLableForm
.
search
=
newVal
;
this
.
getSearchPageLable
();
},
deep
:
true
,
immediate
:
true
}
},
methods
:
{
showMark
()
{
...
...
@@ -605,8 +635,8 @@ export default {
if
(
res
.
data
.
code
===
0
)
{
this
.
formData
=
res
.
data
.
data
;
this
.
$nextTick
(()
=>
this
.
$refs
.
formOne
.
clearValidate
())
this
.
$nextTick
(()
=>
this
.
$refs
.
formTwo
.
clearValidate
())
this
.
$nextTick
(()
=>
this
.
$refs
.
formThree
.
clearValidate
())
this
.
$nextTick
(()
=>
this
.
$refs
.
formTwo
.
clearValidate
())
this
.
$nextTick
(()
=>
this
.
$refs
.
formThree
.
clearValidate
())
if
(
res
.
data
.
data
.
moduleId
)
{
this
.
changeMetaDataVal1
(
res
.
data
.
data
.
moduleId
);
setTimeout
(()
=>
{
...
...
@@ -621,7 +651,7 @@ export default {
}
res
.
data
.
data
.
label
.
map
((
item
,
index
)
=>
{
this
.
$set
(
item
,
'value'
,
item
.
labelId
);
this
.
resourceLabel
.
push
(
item
.
valu
e
)
this
.
resourceLabel
.
push
(
item
.
nam
e
)
})
res
.
data
.
data
.
diyType
.
map
((
item
,
index
)
=>
{
this
.
$set
(
item
,
'value'
,
item
.
dtId
);
...
...
@@ -736,17 +766,24 @@ export default {
//}
console
.
log
(
this
.
processLength
,
'22211aa'
)
},
showLableDia
()
{
this
.
dialogTableVisible
=
true
;
getSearchPageLable
()
{
searchPageLableAPI
(
this
.
searchPageLableForm
)
.
then
(
res
=>
{
console
.
log
(
res
,
'21312'
)
if
(
res
.
data
.
code
===
0
)
{
this
.
gridData
=
res
.
data
.
data
.
list
this
.
totalCount
=
res
.
data
.
data
.
total
for
(
let
[
index
,
ele
]
of
this
.
gridData
.
entries
()
)
{
this
.
$set
(
ele
,
'value'
,
ele
.
name
)
}
}
})
},
handleSelectionChange
(
val
)
{
showLableDia
()
{
this
.
dialogTableVisible
=
true
;
this
.
getSearchPageLable
();
},
handleSelectionChange
(
val
)
{
// multipleSelection
console
.
log
(
val
,
'123val'
)
this
.
multipleSelection
=
val
;
...
...
@@ -756,20 +793,49 @@ export default {
labelId
:
item
.
id
}
optIdArr
.
push
(
obj
)
})
this
.
formData
.
label
=
optIdArr
;
},
sureLable
()
{
this
.
multipleSelection
.
map
((
item
,
index
)
=>
{
if
(
!
this
.
resourceLabel
.
includes
(
item
.
name
))
{
this
.
resourceLabel
.
push
(
item
.
name
)
}
})
this
.
formData
.
label
=
optIdArr
;
},
sureLable
()
{
// this.multipleSelection.map((item, index) => {
// if (!this.resourceLabel.includes(item.name)) {
// this.resourceLabel.push(item.name)
// }
// })
this
.
dialogTableVisible
=
false
},
deleteLableItem
(
key
)
{
deleteLableItem
(
key
)
{
this
.
resourceLabel
.
splice
(
key
,
1
)
}
},
querySearch
(
queryString
,
cb
)
{
var
restaurants
=
this
.
gridData
;
console
.
log
(
restaurants
,
'1231rr'
)
var
results
=
queryString
?
restaurants
.
filter
(
this
.
createFilter
(
queryString
))
:
restaurants
;
cb
(
results
);
},
createFilter
(
queryString
)
{
return
(
restaurant
)
=>
{
return
(
restaurant
.
value
.
toLowerCase
().
indexOf
(
queryString
.
toLowerCase
())
===
0
);
};
},
handleSelect
(
item
)
{
console
.
log
(
item
);
this
.
searchPageLableForm
.
search
=
item
.
value
;
},
searchLable
()
{
this
.
getSearchPageLable
()
},
pagesizeFun
(
val
){
this
.
searchPageLableForm
.
pageSize
=
val
;
this
.
getSearchPageLable
()
},
currentPageFun
(
val
){
this
.
searchPageLableForm
.
pageNum
=
val
;
this
.
getSearchPageLable
()
},
},
beforeRouteLeave
(
to
,
from
,
next
)
{
from
.
meta
.
keepAlive
=
false
;
...
...
@@ -915,6 +981,31 @@ export default {
height:5px;
}
}
.el-autocomplete {
width:50%;
margin-bottom:10px;
}
.my-autocomplete {
li {
line-height: normal;
padding: 7px;
.name {
text-overflow: ellipsis;
overflow: hidden;
}
.addr {
font-size: 12px;
color: #b4b4b4;
}
.highlighted .addr {
color: #ddd;
}
}
}
</
style
>
<
style
lang=
"scss"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论