Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
K
knowledgeServiceAdmin
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
quanlili
knowledgeServiceAdmin
Commits
42764a5b
提交
42764a5b
authored
12月 12, 2019
作者:
王腾飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1212
上级
f6fe053c
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
604 行增加
和
71 行删除
+604
-71
index.js
src/router/index.js
+1
-1
publicFunctions.js
src/utils/publicFunctions.js
+14
-2
msg_packet.vue
src/views/draw/sip/msg_packet.vue
+20
-10
character.vue
src/views/storagemodule/namedentity/character.vue
+0
-0
characterentry.vue
src/views/storagemodule/namedentity/characterentry.vue
+20
-9
localtion.vue
src/views/storagemodule/namedentity/localtion.vue
+16
-7
organ.vue
src/views/storagemodule/namedentity/organ.vue
+21
-7
timer.vue
src/views/storagemodule/namedentity/timer.vue
+10
-4
addnewmetadata.vue
src/views/submission/metadatamange/addnewmetadata.vue
+6
-0
index.scss
src/views/submission/metadatamange/index.scss
+7
-0
metadataplan.vue
src/views/submission/metadatamange/metadataplan.vue
+211
-7
metadataplan_details.vue
src/views/submission/metadatamange/metadataplan_details.vue
+210
-9
resourcelable.vue
src/views/submission/metadatamange/resourcelable.vue
+21
-12
index.vue
src/views/submission/resourcecommit/index.vue
+47
-3
没有找到文件。
src/router/index.js
浏览文件 @
42764a5b
...
...
@@ -141,7 +141,7 @@ export const asyncRouterMap = [{
meta
:
{
title
:
'资源提交表单'
,
routerIds
:
[
'2402'
],
keepAlive
:
true
//
keepAlive: true
},
hidden
:
true
},{
...
...
src/utils/publicFunctions.js
浏览文件 @
42764a5b
...
...
@@ -39,4 +39,17 @@ export function confirm(msg, title = '提示') {
type
:
'warning'
// center: true
})
}
\ No newline at end of file
}
export
function
debounce
(
fn
,
delay
=
100
){
var
timer
;
return
function
()
{
var
args
=
arguments
;
if
(
timer
)
{
clearTimeout
(
timer
);
}
timer
=
setTimeout
(()
=>
{
fn
.
apply
(
this
,
args
);
// this 指向vue
},
delay
);
};
}
src/views/draw/sip/msg_packet.vue
浏览文件 @
42764a5b
...
...
@@ -213,7 +213,8 @@ export default {
hasVideoPermission
:
true
,
// 是否具备视频播放权限
videoSrc
:
''
,
// 视频播放地址
videoCover
:
''
,
// 视频封面
audioUrl
:
''
audioUrl
:
''
,
resourceType
:
null
,
}
},
mounted
()
{
...
...
@@ -244,6 +245,8 @@ export default {
getDetail
(){
detailsAPI
(
this
.
id
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
){
console
.
log
(
res
,
'111112ttt'
)
this
.
resourceType
=
res
.
data
.
data
.
resourceType
let
{
fileName
}
=
res
.
data
.
data
;
this
.
pdf
=
res
.
data
.
data
;
//this.pdf.status=2;
...
...
@@ -307,7 +310,14 @@ export default {
},
linkToEdit
(){
//console.log(this.pdf.albumId,'this.pdf.albumId')
this
.
$router
.
push
({
path
:
'/submission/resourcecommit'
,
query
:{
oid
:
this
.
id
}})
this
.
$router
.
push
({
path
:
'/submission/resourcecommit'
,
query
:{
oid
:
this
.
id
,
flag
:
'look'
,
resourceType
:
this
.
resourceType
}
})
},
closePass
(){
this
.
pdf
.
remark
=
''
;
...
...
@@ -350,14 +360,14 @@ export default {
this
.
isShow
=
false
;
}
},
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
path
===
'/submission/resourcecommit'
)
{
to
.
meta
.
keepAlive
=
true
;
}
else
{
to
.
meta
.
keepAlive
=
false
;
}
next
();
}
//
beforeRouteLeave(to, from, next) {
//
if (to.path === '/submission/resourcecommit') {
//
to.meta.keepAlive = true;
//
} else {
//
to.meta.keepAlive = false;
//
}
//
next();
//
}
}
</
script
>
<
style
lang=
"scss"
>
...
...
src/views/storagemodule/namedentity/character.vue
浏览文件 @
42764a5b
差异被折叠。
点击展开。
src/views/storagemodule/namedentity/characterentry.vue
浏览文件 @
42764a5b
...
...
@@ -106,7 +106,7 @@
<div
v-html=
"senseitemStr"
v-if=
"addNewGloss"
class=
"addNewGloss"
@
click
.
prevent=
"clickGlossItem"
></div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"warning"
@
click=
"dialogFormVisible1 = false"
icon=
"el-icon-close"
>
取消
</el-button>
<el-button
type=
"success"
icon=
"el-icon-news"
@
click=
"
addNewGloss = !addNe
wGloss"
>
添加义项
</el-button>
<el-button
type=
"success"
icon=
"el-icon-news"
@
click=
"
sho
wGloss"
>
添加义项
</el-button>
<el-button
type=
"primary"
@
click=
"finallyAddNamedEntity"
icon=
"el-icon-check"
>
确认实体
</el-button>
</div>
</el-dialog>
...
...
@@ -139,7 +139,7 @@ export default {
addNewGloss
:
false
,
formLabelWidth1
:
'120px'
,
formLabelWidth
:
'92px'
,
senseitemStr
:
false
,
senseitemStr
:
null
,
deleteEntityForm
:
{
entityid
:
[],
state
:
1
...
...
@@ -165,7 +165,8 @@ export default {
birthaddress
:
null
,
achievement
:
null
,
works
:
null
,
title
:
null
title
:
null
,
orderBy
:
null
,
//fieldJson: null,
},
rulesOne
:
{
...
...
@@ -262,7 +263,7 @@ export default {
pageSize
:
30
,
orderBy
:
null
},
createdate
:
''
,
//创建时间的筛选的
createdate
:
'
desc
'
,
//创建时间的筛选的
characterList
:
[],
totalNum
:
null
,
rules
:
{
...
...
@@ -289,6 +290,7 @@ export default {
this
.
getNamedEntityListAPI
()
},
getNamedEntityListAPI
()
{
this
.
paramsFrom
.
orderBy
=
'createdate'
+
' desc'
namedEntityListAPI
(
this
.
paramsFrom
)
.
then
(
res
=>
{
console
.
log
(
res
,
'uiui'
);
...
...
@@ -340,6 +342,7 @@ export default {
this
.
dialogFormVisible1
=
true
;
addNamedEntityAPI
(
this
.
form
)
.
then
(
res
=>
{
console
.
log
(
res
,
'woshisha'
)
if
(
res
.
data
.
code
===
0
)
{
this
.
sureForm
=
{
name
:
null
,
...
...
@@ -367,12 +370,14 @@ export default {
showNamedEntityAPI
(
this
.
form
)
.
then
(
res
=>
{
console
.
log
(
res
,
"OPOP"
)
if
(
res
.
data
.
data
)
{
if
(
res
.
data
.
data
!=
null
)
{
this
.
sureForm
=
res
.
data
.
data
;
if
(
res
.
data
.
data
.
senseitem
)
{
this
.
senseitemStr
=
res
.
data
.
data
.
senseitem
.
split
(
'<a href="javascript:;"'
)[
0
]
}
this
.
senseitemStr
=
res
.
data
.
data
.
senseitem
;
this
.
glossEntityForm
.
keyword
=
res
.
data
.
data
.
keyword
}
else
{
this
.
sureForm
.
keyword
=
this
.
form
.
keyword
this
.
sureForm
.
name
=
this
.
form
.
keyword
;
this
.
senseitemStr
=
null
}
})
},
...
...
@@ -404,7 +409,7 @@ export default {
pageSize
:
30
,
orderBy
:
null
};
this
.
createdate
=
''
;
//创建时间的筛选的
this
.
createdate
=
'
desc
'
;
//创建时间的筛选的
this
.
getNamedEntityListAPI
();
},
refPage
()
{
...
...
@@ -467,6 +472,12 @@ export default {
this
.
$message
.
warning
(
"请先至少选择一条需要删除的条目"
);
}
},
showGloss
()
{
this
.
addNewGloss
=
!
this
.
addNewGloss
if
(
this
.
senseitemStr
==
null
)
{
this
.
$message
.
warning
(
'该实体暂无义项'
);
}
},
closeDia
()
{
this
.
$refs
[
'dataForm'
].
resetFields
();
this
.
addNewGloss
=
false
;
...
...
src/views/storagemodule/namedentity/localtion.vue
浏览文件 @
42764a5b
...
...
@@ -91,7 +91,7 @@
<div
v-html=
"senseitemStr"
v-if=
"addNewGloss"
class=
"addNewGloss"
@
click
.
prevent=
"clickGlossItem"
></div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"warning"
@
click=
"dialogFormVisible1 = false"
icon=
"el-icon-close"
>
取消
</el-button>
<el-button
type=
"success"
icon=
"el-icon-news"
@
click=
"
addNewGloss = !addNewGloss"
>
添加意向
</el-button>
<el-button
type=
"success"
icon=
"el-icon-news"
@
click=
"
showGloss"
>
添加义项
</el-button>
<el-button
type=
"primary"
@
click=
"finallyAddNamedEntity"
icon=
"el-icon-check"
>
确认实体
</el-button>
</div>
</el-dialog>
...
...
@@ -203,7 +203,7 @@ export default {
pageSize
:
30
,
orderBy
:
null
,
},
createdate
:
''
,
//创建时间的筛选的
createdate
:
'
desc
'
,
//创建时间的筛选的
characterList
:
[],
totalNum
:
null
,
rules
:
{
...
...
@@ -230,6 +230,7 @@ export default {
this
.
getNamedEntityListAPI
()
},
getNamedEntityListAPI
()
{
this
.
paramsFrom
.
orderBy
=
'createdate'
+
' desc'
namedEntityListAPI
(
this
.
paramsFrom
)
.
then
(
res
=>
{
console
.
log
(
res
,
'uiui'
);
...
...
@@ -314,12 +315,14 @@ export default {
showNamedEntityAPI
(
this
.
form
)
.
then
(
res
=>
{
console
.
log
(
res
,
"OPOP"
)
if
(
res
.
data
.
data
)
{
if
(
res
.
data
.
data
!=
null
)
{
this
.
sureForm
=
res
.
data
.
data
;
if
(
res
.
data
.
data
.
senseitem
)
{
this
.
senseitemStr
=
res
.
data
.
data
.
senseitem
.
split
(
'<a href="javascript:;"'
)[
0
]
}
this
.
senseitemStr
=
res
.
data
.
data
.
senseitem
;
this
.
glossEntityForm
.
keyword
=
res
.
data
.
data
.
keyword
}
else
{
this
.
sureForm
.
keyword
=
this
.
form
.
keyword
this
.
sureForm
.
name
=
this
.
form
.
keyword
this
.
senseitemStr
=
null
}
})
},
...
...
@@ -351,7 +354,7 @@ export default {
pageSize
:
30
,
orderBy
:
null
,
};
this
.
createdate
=
''
;
//创建时间的筛选的
this
.
createdate
=
'
desc
'
;
//创建时间的筛选的
this
.
getNamedEntityListAPI
();
},
refPage
()
{
...
...
@@ -414,6 +417,12 @@ export default {
this
.
$message
.
warning
(
"请先至少选择一条需要删除的条目"
);
}
},
showGloss
()
{
this
.
addNewGloss
=
!
this
.
addNewGloss
if
(
this
.
senseitemStr
==
null
)
{
this
.
$message
.
warning
(
'该实体暂无义项'
);
}
},
closeDia
()
{
this
.
$refs
[
'dataForm'
].
resetFields
();
this
.
addNewGloss
=
false
;
...
...
src/views/storagemodule/namedentity/organ.vue
浏览文件 @
42764a5b
...
...
@@ -92,7 +92,7 @@
<div
v-html=
"senseitemStr"
v-if=
"addNewGloss"
class=
"addNewGloss"
@
click
.
prevent=
"clickGlossItem"
></div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"warning"
@
click=
"dialogFormVisible1 = false"
icon=
"el-icon-close"
>
取消
</el-button>
<el-button
type=
"success"
icon=
"el-icon-news"
@
click=
"
addNewGloss = !addNewGloss"
>
添加意向
</el-button>
<el-button
type=
"success"
icon=
"el-icon-news"
@
click=
"
showGloss"
>
添加义项
</el-button>
<el-button
type=
"primary"
@
click=
"finallyAddNamedEntity"
icon=
"el-icon-check"
>
确认实体
</el-button>
</div>
</el-dialog>
...
...
@@ -171,12 +171,17 @@ export default {
message
:
'创建时间不能为空'
,
whitespace
:
true
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'创建时间不能为空'
,
whitespace
:
true
,
trigger
:
'change'
},
{
pattern
:
/^
[\u
4E00-
\u
9FA50-9-
]
+$/
,
message
:
'请输入正确格式'
}
],
address
:
[
...
...
@@ -230,7 +235,7 @@ export default {
pageSize
:
30
,
orderBy
:
null
,
},
createdate
:
''
,
//创建时间的筛选的
createdate
:
'
desc
'
,
//创建时间的筛选的
characterList
:
[],
totalNum
:
null
,
rules
:
{
...
...
@@ -257,6 +262,7 @@ export default {
this
.
getNamedEntityListAPI
()
},
getNamedEntityListAPI
()
{
this
.
paramsFrom
.
orderBy
=
'createdate'
+
' desc'
namedEntityListAPI
(
this
.
paramsFrom
)
.
then
(
res
=>
{
console
.
log
(
res
,
'uiui'
);
...
...
@@ -333,13 +339,15 @@ export default {
showNamedEntityAPI
(
this
.
form
)
.
then
(
res
=>
{
console
.
log
(
res
,
"OPOP"
)
if
(
res
.
data
.
data
)
{
if
(
res
.
data
.
data
!=
null
)
{
this
.
sureForm
=
res
.
data
.
data
;
if
(
res
.
data
.
data
.
senseitem
)
{
this
.
senseitemStr
=
res
.
data
.
data
.
senseitem
.
split
(
'<a href="javascript:;"'
)[
0
]
}
this
.
senseitemStr
=
res
.
data
.
data
.
senseitem
this
.
$nextTick
(()
=>
this
.
$refs
.
dataForm
.
clearValidate
())
this
.
glossEntityForm
.
keyword
=
res
.
data
.
data
.
keyword
}
else
{
this
.
sureForm
.
keyword
=
this
.
form
.
keyword
this
.
sureForm
.
name
=
this
.
form
.
keyword
this
.
senseitemStr
=
null
}
})
},
...
...
@@ -371,7 +379,7 @@ export default {
pageSize
:
30
,
orderBy
:
null
,
};
this
.
createdate
=
''
;
//创建时间的筛选的
this
.
createdate
=
'
desc
'
;
//创建时间的筛选的
this
.
getNamedEntityListAPI
();
},
refPage
()
{
...
...
@@ -434,6 +442,12 @@ export default {
this
.
$message
.
warning
(
"请先至少选择一条需要删除的条目"
);
}
},
showGloss
()
{
this
.
addNewGloss
=
!
this
.
addNewGloss
if
(
this
.
senseitemStr
==
null
)
{
this
.
$message
.
warning
(
'该实体暂无义项'
);
}
},
closeDia
()
{
this
.
$refs
[
'dataForm'
].
resetFields
();
this
.
addNewGloss
=
false
;
...
...
src/views/storagemodule/namedentity/timer.vue
浏览文件 @
42764a5b
...
...
@@ -248,7 +248,7 @@ export default {
pageSize
:
30
,
orderBy
:
null
,
},
createdate
:
''
,
//创建时间的筛选的
createdate
:
'
desc
'
,
//创建时间的筛选的
totalNum
:
null
,
tableData
:
[],
rules
:
{
...
...
@@ -267,6 +267,7 @@ export default {
},
methods
:
{
getNamedEntityListAPI
()
{
this
.
paramsFrom
.
orderBy
=
'createdate'
+
' desc'
namedEntityListAPI
(
this
.
paramsFrom
)
.
then
(
res
=>
{
console
.
log
(
res
,
'uiui1111'
);
...
...
@@ -319,8 +320,13 @@ export default {
showNamedEntityAPI
(
this
.
form
)
.
then
(
res
=>
{
console
.
log
(
res
,
"OPOP"
)
if
(
res
.
data
.
data
)
{
this
.
sureForm
=
res
.
data
.
data
;
if
(
res
.
data
.
data
!=
null
)
{
//this.sureForm = res.data.data;
this
.
sureForm
.
keyword
=
this
.
form
.
keyword
;
this
.
sureForm
.
dynasty
=
this
.
form
.
keyword
;
}
else
{
this
.
sureForm
.
keyword
=
this
.
form
.
keyword
this
.
sureForm
.
name
=
this
.
form
.
keyword
}
})
},
...
...
@@ -352,7 +358,7 @@ export default {
pageSize
:
30
,
orderBy
:
null
,
};
this
.
createdate
=
''
;
//创建时间的筛选的
this
.
createdate
=
'
desc
'
;
//创建时间的筛选的
this
.
getNamedEntityListAPI
();
},
refPage
()
{
...
...
src/views/submission/metadatamange/addnewmetadata.vue
浏览文件 @
42764a5b
...
...
@@ -217,5 +217,10 @@ export default {
text-align:center;
padding-bottom:100px;
margin-top:50px;
width:36%;
}
.el-form-item {
width:36%;
}
</
style
>
\ No newline at end of file
src/views/submission/metadatamange/index.scss
浏览文件 @
42764a5b
...
...
@@ -93,4 +93,10 @@
height
:
100%
;
resize
:none
;
}
}
.dialogFormVisible
{
.el-dialog
{
width
:
700px
;
}
}
\ No newline at end of file
src/views/submission/metadatamange/metadataplan.vue
浏览文件 @
42764a5b
...
...
@@ -94,13 +94,51 @@
</el-tab-pane>
</el-tabs>
</div>
<el-dialog
title=
"添加元数据方案"
:visible
.
sync=
"dialogFormVisible"
class=
"dialogFormVisible"
@
close=
"closeDia"
>
<div
class=
"addNewPlanBox"
>
<div
class=
"metaDataForm"
>
<el-form
label-width=
"92px"
:model=
"formData"
ref=
"formData"
:rules=
"rules"
>
<el-form-item
label=
"资源类型:"
v-if=
"!this.$route.query.flag"
prop=
"type"
>
<el-select
v-model=
"formData.type"
placeholder=
"请选择资源类型"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"方案名称:"
prop=
"name"
>
<el-input
autocomplete=
"off"
placeholder=
"请输入方案名称"
v-model=
"formData.name"
></el-input>
</el-form-item>
<el-form-item
label=
"方案描述:"
prop=
"description"
>
<el-input
type=
"textarea"
v-model=
"formData.description"
placeholder=
"请输入方案描述"
></el-input>
</el-form-item>
<el-form-item
label=
"是否启用:"
>
<el-switch
v-model=
"valueisOn"
@
change=
"getStatusVal"
>
</el-switch>
</el-form-item>
</el-form>
<div
class=
"twoBtn"
>
<el-button
type=
"info"
icon=
"el-icon-close"
size=
"middle"
@
click=
"dialogFormVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-upload"
size=
"middle"
@
click=
"saveInfo"
>
保存
</el-button>
</div>
</div>
</div>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
getMetaDataPlanListAPI
getMetaDataPlanListAPI
,
addNewPlanAPI
,
updateMetaDataPlanListAPI
}
from
'@/api/resourcecommit'
import
{
detailsAPI
}
from
'@/api/metadataPlan/index'
export
default
{
name
:
'metadataplan'
,
data
()
{
...
...
@@ -110,11 +148,68 @@ export default {
type
:
1
,
},
listData
:
[],
loading
:
false
loading
:
false
,
dialogFormVisible
:
false
,
formData
:
{
description
:
null
,
name
:
null
,
status
:
1
,
type
:
null
,
id
:
this
.
$route
.
query
.
id
},
options
:
[{
value
:
1
,
label
:
'文本类资源'
},
{
value
:
2
,
label
:
'图像类资源'
},
{
value
:
3
,
label
:
'音频类资源'
},
{
value
:
4
,
label
:
'视频类资源'
}],
value
:
''
,
valueisOn
:
true
,
rules
:
{
type
:
[
{
required
:
true
,
message
:
'请选择资源类型'
,
trigger
:
'change'
}
],
name
:
[
{
required
:
true
,
message
:
'请输入方案名称'
,
trigger
:
'click'
},
{
required
:
true
,
message
:
'请输入方案名称'
,
trigger
:
'change'
}
],
description
:
[
{
required
:
true
,
message
:
'请输入方案描述'
,
trigger
:
'click'
},
{
required
:
true
,
message
:
'请输入方案描述'
,
trigger
:
'change'
}
]
}
}
},
mounted
()
{
this
.
getMetaDataPlanList
();
this
.
metaDataDetail
();
},
methods
:
{
handleClick
(
tab
,
event
)
{
...
...
@@ -131,9 +226,10 @@ export default {
this
.
getMetaDataPlanList
();
},
goAddPage
()
{
this
.
$router
.
push
({
path
:
'addnewmetadata'
})
// this.$router.push({
// path: 'addnewmetadata'
// })
this
.
dialogFormVisible
=
true
},
getMetaDataPlanList
()
{
getMetaDataPlanListAPI
(
this
.
typeData
)
...
...
@@ -157,6 +253,54 @@ export default {
setTimeout
(()
=>
{
this
.
loading
=
false
;
},
1000
)
},
getStatusVal
(
val
)
{
console
.
log
(
val
,
'22'
)
if
(
val
)
{
this
.
formData
.
status
=
1
;
}
else
{
this
.
formData
.
status
=
0
;
}
},
metaDataDetail
()
{
if
(
this
.
$route
.
query
.
id
)
{
detailsAPI
(
this
.
$route
.
query
.
id
)
.
then
(
res
=>
{
console
.
log
(
res
,
'OPPPP'
)
if
(
res
.
data
.
code
===
0
)
{
this
.
formData
.
description
=
res
.
data
.
data
.
description
;
this
.
formData
.
name
=
res
.
data
.
data
.
name
;
this
.
formData
.
status
=
res
.
data
.
data
.
status
;
if
(
this
.
formData
.
status
===
1
)
{
this
.
valueisOn
=
true
;
}
else
{
this
.
valueisOn
=
false
;
}
}
})
}
},
saveInfo
()
{
this
.
$refs
.
formData
.
validate
(
valid
=>
{
if
(
valid
)
{
addNewPlanAPI
(
this
.
formData
)
.
then
(
res
=>
{
console
.
log
(
res
,
'YUIIII'
)
if
(
res
.
data
.
code
===
0
)
{
this
.
$message
.
success
(
'添加元数据方案保存成功'
)
this
.
dialogFormVisible
=
false
;
this
.
getMetaDataPlanList
();
}
else
{
this
.
$message
.
error
(
'添加元数据方案保存失败'
)
}
})
}
else
{
this
.
$message
.
warning
(
'尚有未通过的验证'
)
}
})
},
closeDia
()
{
this
.
$refs
.
formData
.
resetFields
();
}
}
}
...
...
@@ -219,9 +363,12 @@ export default {
list-style:none;
display:flex;
align-items:center;
margin-bottom:3
5
px;
padding:
15px 0
;
margin-bottom:3
0
px;
padding:
0px 0 30px
;
border-bottom: 1px solid #EBEEF5;
&:nth-of-type(1) {
padding-top:13px;
}
dl {
display:flex;
align-items:center;
...
...
@@ -271,4 +418,60 @@ export default {
}
}
}
.addNewPlanBox {
width:100%;
display:flex;
flex-direction:column;
height:100%;
}
.metaDataTop {
width:100%;
padding-bottom:23px;
em {
color:#3F4560;
font-size:20px;
font-style:normal;
}
span {
float:right;
width:50px;
font-size:14px;
color:#868BA3;
background:url(../../../assets/img/sx.png) no-repeat;
background-size:12px 12px;
background-position:37px 2px;
}
}
.metaDataForm {
background:#fff;
padding:0 15px;
h2 {
font-size:16px;
color:#222;
font-weight:500;
margin-bottom:30px;
}
.el-select {
width:100%;
}
}
.twoBtn {
text-align:center;
padding-bottom:0;
margin-top:50px;
width:100%;
}
.el-form-item {
width:100%;
}
</
style
>
<
style
lang=
"scss"
>
@import
'./index.scss'
</
style
>
\ No newline at end of file
src/views/submission/metadatamange/metadataplan_details.vue
浏览文件 @
42764a5b
...
...
@@ -132,11 +132,49 @@
<el-button
type=
"primary"
@
click=
"submitItem"
>
确认
</el-button>
</span>
</el-dialog>
<el-dialog
title=
"添加元数据方案"
:visible
.
sync=
"dialogFormVisible"
class=
"dialogFormVisible"
@
close=
"closeDia"
>
<div
class=
"addNewPlanBox"
>
<div
class=
"metaDataForm"
>
<el-form
label-width=
"92px"
:model=
"formData"
ref=
"formData"
:rules=
"rules"
>
<el-form-item
label=
"资源类型:"
v-if=
"!this.$route.query.flag"
prop=
"type"
>
<el-select
v-model=
"formData.type"
placeholder=
"请选择资源类型"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"方案名称:"
prop=
"name"
>
<el-input
autocomplete=
"off"
placeholder=
"请输入方案名称"
v-model=
"formData.name"
></el-input>
</el-form-item>
<el-form-item
label=
"方案描述:"
prop=
"description"
>
<el-input
type=
"textarea"
v-model=
"formData.description"
placeholder=
"请输入方案描述"
></el-input>
</el-form-item>
<el-form-item
label=
"是否启用:"
>
<el-switch
v-model=
"valueisOn"
@
change=
"getStatusVal"
>
</el-switch>
</el-form-item>
</el-form>
<div
class=
"twoBtn"
>
<el-button
type=
"info"
icon=
"el-icon-close"
size=
"middle"
@
click=
"dialogFormVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-upload"
size=
"middle"
@
click=
"saveInfo"
>
保存
</el-button>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
detailsAPI
,
addAPI
}
from
'@/api/metadataPlan/index'
import
{
updateMetaDataPlanListAPI
}
from
'@/api/resourcecommit'
// import pagination from '@/components/pagination/pagination'
import
{
operationMsg
,
confirm
}
from
'@/utils/publicFunctions'
import
{
uploadUrl
,
uploadPath
,
requestPath
}
from
"@/utils/global.js"
...
...
@@ -198,11 +236,68 @@ export default {
detailsObj
:{
},
fieldJson
:[],
dialogFormVisible
:
false
,
formData
:
{
description
:
null
,
name
:
null
,
status
:
1
,
type
:
null
,
id
:
this
.
$route
.
query
.
id
},
options
:
[{
value
:
1
,
label
:
'文本类资源'
},
{
value
:
2
,
label
:
'图像类资源'
},
{
value
:
3
,
label
:
'音频类资源'
},
{
value
:
4
,
label
:
'视频类资源'
}],
value
:
''
,
valueisOn
:
true
,
rules
:
{
type
:
[
{
required
:
true
,
message
:
'请选择资源类型'
,
trigger
:
'change'
}
],
name
:
[
{
required
:
true
,
message
:
'请输入方案名称'
,
trigger
:
'click'
},
{
required
:
true
,
message
:
'请输入方案名称'
,
trigger
:
'change'
}
],
description
:
[
{
required
:
true
,
message
:
'请输入方案描述'
,
trigger
:
'click'
},
{
required
:
true
,
message
:
'请输入方案描述'
,
trigger
:
'change'
}
]
}
}
},
mounted
()
{
this
.
id
=
this
.
$route
.
query
.
id
;
this
.
getDetail
();
this
.
metaDataDetail
();
},
computed
:
{
type
(){
...
...
@@ -320,18 +415,123 @@ export default {
this
.
getDetail
();
},
goEditFun
()
{
this
.
$router
.
push
({
path
:
'addnewmetadata'
,
query
:
{
flag
:
1
,
id
:
this
.
$route
.
query
.
id
}
})
}
// this.$router.push({
// path: 'addnewmetadata',
// query: {
// flag: 1,
// id: this.$route.query.id
// }
// })
this
.
dialogFormVisible
=
true
;
},
getStatusVal
(
val
)
{
console
.
log
(
val
,
'22'
)
if
(
val
)
{
this
.
formData
.
status
=
1
;
}
else
{
this
.
formData
.
status
=
0
;
}
},
metaDataDetail
()
{
if
(
this
.
$route
.
query
.
id
)
{
detailsAPI
(
this
.
$route
.
query
.
id
)
.
then
(
res
=>
{
console
.
log
(
res
,
'OPPPP'
)
if
(
res
.
data
.
code
===
0
)
{
this
.
formData
.
type
=
res
.
data
.
data
.
type
;
this
.
formData
.
description
=
res
.
data
.
data
.
description
;
this
.
formData
.
name
=
res
.
data
.
data
.
name
;
this
.
formData
.
status
=
res
.
data
.
data
.
status
;
if
(
this
.
formData
.
status
===
1
)
{
this
.
valueisOn
=
true
;
}
else
{
this
.
valueisOn
=
false
;
}
}
})
}
},
saveInfo
()
{
this
.
$refs
.
formData
.
validate
(
valid
=>
{
if
(
valid
)
{
updateMetaDataPlanListAPI
(
this
.
formData
)
.
then
(
res
=>
{
if
(
res
.
data
.
code
===
0
)
{
this
.
$message
.
success
(
'更新元数据方案保存成功'
)
this
.
dialogFormVisible
=
false
;
this
.
getDetail
();
this
.
metaDataDetail
();
}
else
{
this
.
$message
.
error
(
'更新元数据方案保存失败'
)
}
})
}
else
{
this
.
$message
.
warning
(
'尚有未通过的验证'
)
}
})
},
closeDia
()
{
this
.
$refs
.
formData
.
resetFields
();
this
.
metaDataDetail
();
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"less"
>
.addNewPlanBox {
width:100%;
display:flex;
flex-direction:column;
height:100%;
}
.metaDataTop {
width:100%;
padding-bottom:23px;
em {
color:#3F4560;
font-size:20px;
font-style:normal;
}
span {
float:right;
width:50px;
font-size:14px;
color:#868BA3;
background:url(../../../assets/img/sx.png) no-repeat;
background-size:12px 12px;
background-position:37px 2px;
}
}
.metaDataForm {
background:#fff;
padding:0 15px;
h2 {
font-size:16px;
color:#222;
font-weight:500;
margin-bottom:30px;
}
.el-select {
width:100%;
}
}
.twoBtn {
text-align:center;
padding-bottom:0;
margin-top:50px;
width:100%;
}
.el-form-item {
width:100%;
}
</
style
>
<
style
lang=
"scss"
>
@import
'./index'
</
style
>
\ No newline at end of file
src/views/submission/metadatamange/resourcelable.vue
浏览文件 @
42764a5b
...
...
@@ -60,7 +60,7 @@
</el-table-column>
</el-table>
<pagination
v-if=
"totalCount>0"
:total=
"totalCount"
@
pagesize=
"pagesizeFun"
@
currentPage=
"currentPageFun"
></pagination>
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"dialogFormVisible"
>
<el-dialog
:title=
"dialogTitle"
:visible
.
sync=
"dialogFormVisible"
@
close=
"closeDia"
>
<el-form
:model=
"addLableForm"
ref=
"addLableForm"
:rules=
"rules"
>
<el-form-item
label=
"标签名:"
:label-width=
"formLabelWidth"
prop=
"name"
>
<el-input
v-model=
"addLableForm.name"
autocomplete=
"off"
placeholder=
"请输入标签名"
></el-input>
...
...
@@ -88,6 +88,7 @@ import {
deleteLableItemAPI
}
from
'@/api/resourcecommit'
import
pagination
from
'@/components/pagination/pagination'
import
{
operationMsg
,
confirm
}
from
'@/utils/publicFunctions'
export
default
{
name
:
'resourcelable'
,
components
:
{
...
...
@@ -224,16 +225,19 @@ export default {
},
deleteLableItem
(
row
,
index
)
{
deleteLableItemAPI
(
row
.
id
)
.
then
(
res
=>
{
console
.
log
(
res
,
'11'
);
if
(
res
.
data
.
code
===
0
)
{
this
.
tableData
.
splice
(
index
,
1
)
this
.
$message
.
success
(
'删除成功'
)
this
.
getLableList
();
}
else
{
this
.
$message
.
success
(
'删除失败'
)
}
confirm
.
apply
(
this
,
[
'确定删除选中的此条目吗?'
])
.
then
(()
=>
{
deleteLableItemAPI
(
row
.
id
)
.
then
(
res
=>
{
console
.
log
(
res
,
'11'
);
if
(
res
.
data
.
code
===
0
)
{
this
.
tableData
.
splice
(
index
,
1
)
this
.
$message
.
success
(
'删除成功'
)
this
.
getLableList
();
}
else
{
this
.
$message
.
success
(
'删除失败'
)
}
})
})
},
pagesizeFun
(
val
){
...
...
@@ -269,10 +273,15 @@ export default {
setTimeout
(()
=>
{
this
.
loading
=
false
;
},
1000
)
},
closeDia
()
{
this
.
$refs
.
addLableForm
.
resetFields
();
this
.
addLableForm
.
name
=
null
;
this
.
addLableForm
.
description
=
null
;
}
},
beforeDestroy
()
{
this
.
bus
.
$off
(
'searchList'
);
this
.
bus
.
$off
(
'searchList'
);
}
}
</
script
>
...
...
src/views/submission/resourcecommit/index.vue
浏览文件 @
42764a5b
...
...
@@ -31,6 +31,7 @@
<p
v-else-if=
"uploadFileName && this.$route.query.resourceType == 1 || this.$route.query.oid"
>
{{
uploadFileName
}}
</p>
<p
v-else-if=
"uploadFileName && this.$route.query.resourceType == 3 || this.$route.query.oid"
>
{{
uploadFileName
}}
</p>
<p
v-else-if=
"uploadFileName && this.$route.query.resourceType == 4 || this.$route.query.oid"
>
{{
uploadFileName
}}
</p>
<p
v-else-if=
"uploadFileName && this.$route.query.resourceType == 5 || this.$route.query.oid"
>
{{
uploadFileName
}}
</p>
<div
v-else
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
...
...
@@ -39,6 +40,7 @@
<div
class=
"el-upload__tip"
slot=
"tip"
v-else-if=
"this.$route.query.resourceType == 2"
>
支持jpeg格式、png, gif以及jpg。
</div>
<div
class=
"el-upload__tip"
slot=
"tip"
v-else-if=
"this.$route.query.resourceType == 3"
>
支持mp3格式、mpeg以及wma。
</div>
<div
class=
"el-upload__tip"
slot=
"tip"
v-else-if=
"this.$route.query.resourceType == 4"
>
支持mp4格式、avi, flv以及mov。
</div>
<div
class=
"el-upload__tip"
slot=
"tip"
v-else-if=
"this.$route.query.resourceType == 5"
>
支持abc, glTF, fbx, obj, dae, stl, 3ds, ply等三维文件格式。
</div>
<div
class=
"el-upload__tip"
slot=
"tip"
v-else
>
支持office格式、pdf以及txt。
</div>
</el-upload>
<el-progress
v-show=
"showProcess"
:percentage=
"processLength"
:stroke-width=
"2"
></el-progress>
...
...
@@ -177,6 +179,8 @@
import
mapmark
from
'../mapmark'
import
linkentity
from
'../linkentity'
import
{
uploadUrl
,
uploadPath
,
requestPath
}
from
"@/utils/global"
;
import
{
debounce
}
from
"@/utils/publicFunctions"
;
import
_
from
'lodash'
import
{
resourceCommitAPI
,
resourceDiyTypeAPI
,
...
...
@@ -417,6 +421,14 @@ export default {
}
else
{
this
.
$message
.
warning
(
"上传中"
);
}
}
else
if
(
this
.
formData
.
resourceType
==
5
)
{
isType
=
type
==
"abc"
||
type
==
"fbx"
||
type
==
"dae"
||
type
==
"obj"
||
type
==
"bvh"
||
type
==
"dxf"
||
type
==
"psk"
||
type
==
"stl"
||
type
==
"ply"
||
type
==
"x3d"
;
if
(
!
isType
)
{
this
.
$message
.
error
(
"上传附件格式工为abc, glTF, fbx, obj, dae, stl, 3ds, ply!"
);
return
isType
;
}
else
{
this
.
$message
.
warning
(
"上传中"
);
}
}
},
handleSuccess
(
response
,
file
,
fileList
)
{
...
...
@@ -476,7 +488,39 @@ export default {
}
})
},
commitResource
()
{
// 提交资源
// commitResource: debounce(function() {// 提交资源防抖处理
// console.log(11)
// this.formData.fieldJson = JSON.stringify(this.formData.fieldJsonArr)
// const formOne = new Promise((resolve,reject) => {
// this.$refs['formOne'].validate(valid=>{
// if(valid) resolve()
// })
// });
// const formTwo = new Promise((resolve,reject) => {
// this.$refs['formTwo'].validate(valid => {
// if(valid) resolve()
// })
// });
// const formThree = new Promise((resolve,reject) => {
// this.$refs['formThree'].validate(valid => {
// if(valid) resolve()
// })
// });
// Promise.all([formOne, formTwo, formThree]).then(() => {
// resourceCommitAPI(this.formData)
// .then(res => {
// console.log(res, '%%%%%%%%%%%%%^')
// if (res.data.code === 0) {
// this.$message.success('提交成功');
// this.$router.back(-1);
// } else {
// this.$message.error('提交失败');
// }
// })
// })
// }),
commitResource
:
_
.
throttle
(
function
()
{
// 提交资源节流处理
console
.
log
(
11
)
this
.
formData
.
fieldJson
=
JSON
.
stringify
(
this
.
formData
.
fieldJsonArr
)
const
formOne
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
[
'formOne'
].
validate
(
valid
=>
{
...
...
@@ -505,7 +549,7 @@ export default {
}
})
})
},
},
1000
),
formSixBtn
()
{
if
(
this
.
$route
.
query
.
resourceType
)
{
this
.
isShowSavaBtn
=
true
;
...
...
@@ -660,7 +704,7 @@ export default {
console
.
log
(
this
.
processLength
,
'22211aa'
)
},
},
beforeRoute
r
Leave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
from
.
meta
.
keepAlive
=
false
;
next
();
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论