Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
K
knowledgeServiceAdmin
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
quanlili
knowledgeServiceAdmin
Commits
1e125d4c
提交
1e125d4c
authored
11月 15, 2019
作者:
王腾飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1115
上级
cae896b6
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
378 行增加
和
7 行删除
+378
-7
resourcecommit.js
src/api/resourcecommit.js
+16
-0
index.js
src/router/index.js
+10
-0
addnewmetadata.vue
src/views/submission/metadatamange/addnewmetadata.vue
+147
-0
metadataplan.vue
src/views/submission/metadatamange/metadataplan.vue
+205
-7
没有找到文件。
src/api/resourcecommit.js
浏览文件 @
1e125d4c
...
...
@@ -117,6 +117,22 @@ export function getlinkedResAPI(params) { //关联实体弹窗的已链接资源
})
}
export
function
addNewPlanAPI
(
data
)
{
//新增元数据方案
return
request
({
url
:
`
${
requestPath
.
common
}
/module/save`
,
method
:
'post'
,
data
})
}
export
function
getMetaDataPlanListAPI
(
params
)
{
//元数据方案列表
return
request
({
url
:
`
${
requestPath
.
common
}
/module/list`
,
method
:
'get'
,
params
})
}
...
...
src/router/index.js
浏览文件 @
1e125d4c
...
...
@@ -260,6 +260,16 @@ export const asyncRouterMap = [{
routerIds
:
[
'090401'
],
search
:
true
},
},{
path
:
'addnewmetadata'
,
component
:
_import
(
'submission/metadatamange/addnewmetadata'
),
name
:
'addnewmetadata'
,
meta
:
{
title
:
'添加元数据方案'
,
routerIds
:
[
'090401'
],
search
:
true
,
},
hidden
:
true
}]
}]
},
...
...
src/views/submission/metadatamange/addnewmetadata.vue
0 → 100644
浏览文件 @
1e125d4c
<
template
>
<div
class=
"addNewPlanBox"
>
<div
class=
"metaDataTop"
>
<em>
提交新资源
</em>
<span>
刷新
</span>
</div>
<div
class=
"metaDataForm"
>
<h2>
添加元数据方案
</h2>
<el-form
label-width=
"86px"
:model=
"formData"
>
<el-form-item
label=
"资源类型:"
>
<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=
"方案名称:"
>
<el-input
autocomplete=
"off"
placeholder=
"请输入方案名称"
v-model=
"formData.name"
></el-input>
</el-form-item>
<el-form-item
label=
"方案描述:"
>
<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=
"$router.back(-1)"
>
取消
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-upload"
size=
"middle"
@
click=
"saveInfo"
>
保存
</el-button>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
addNewPlanAPI
}
from
'@/api/resourcecommit'
export
default
{
name
:
'addnewmetadata'
,
data
()
{
return
{
formData
:
{
description
:
null
,
name
:
null
,
status
:
1
,
type
:
null
,
},
options
:
[{
value
:
1
,
label
:
'文本类资源'
},
{
value
:
2
,
label
:
'图像类资源'
},
{
value
:
3
,
label
:
'音频类资源'
},
{
value
:
4
,
label
:
'视频类资源'
}],
value
:
''
,
valueisOn
:
true
,
}
},
methods
:
{
getStatusVal
(
val
)
{
console
.
log
(
val
,
'22'
)
if
(
val
)
{
alert
(
1
)
this
.
formData
.
status
=
1
;
}
else
{
alert
(
0
)
this
.
formData
.
status
=
0
;
}
},
saveInfo
()
{
addNewPlanAPI
(
this
.
formData
)
.
then
(
res
=>
{
console
.
log
(
res
,
'YUIIII'
)
if
(
res
.
data
.
code
===
0
)
{
this
.
$message
.
success
(
'添加元数据方案保存成功'
)
}
else
{
this
.
$message
.
error
(
'添加元数据方案保存失败'
)
}
})
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.addNewPlanBox {
width:100%;
padding:37px 40px 20px;
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:100px;
margin-top:50px;
}
</
style
>
\ No newline at end of file
src/views/submission/metadatamange/metadataplan.vue
浏览文件 @
1e125d4c
...
...
@@ -5,27 +5,143 @@
<span>
刷新
</span>
</div>
<div
class=
"metaDataPlanList"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"middle"
class=
"addNewPlanBtn"
@
click=
"goAddPage"
>
添加元数据方案
</el-button>
<h2>
元数据方案列表
</h2>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"用户管理"
name=
"first"
>
用户管理
</el-tab-pane>
<el-tab-pane
label=
"配置管理"
name=
"second"
>
配置管理
</el-tab-pane>
<el-tab-pane
label=
"角色管理"
name=
"third"
>
角色管理
</el-tab-pane>
<el-tab-pane
label=
"定时任务补偿"
name=
"fourth"
>
定时任务补偿
</el-tab-pane>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"handleClick"
class=
"elTab"
>
<el-tab-pane
label=
"文本"
name=
"first"
>
<ul>
<li
v-for=
"(item, key) in listData"
:key=
"key"
>
<dl>
<dt>
<!--
<img
src=
"../../../assets/img/default.png"
alt=
""
>
-->
北
</dt>
<dd>
<h3>
{{
item
.
name
}}
</h3>
<p>
创建者:
{{
item
.
createrName
}}
</p>
<p>
{{
item
.
description
}}
</p>
</dd>
</dl>
<div>
<p>
{{
item
.
createTime
}}
</p>
<el-button
type=
"primary"
icon=
"el-icon-view"
size=
"mini"
>
查看
</el-button>
</div>
</li>
</ul>
</el-tab-pane>
<el-tab-pane
label=
"图像"
name=
"second"
>
<ul>
<li
v-for=
"(item, key) in listData"
:key=
"key"
>
<dl>
<dt>
<!--
<img
src=
"../../../assets/img/default.png"
alt=
""
>
-->
北
</dt>
<dd>
<h3>
{{
item
.
name
}}
</h3>
<p>
创建者:
{{
item
.
createrName
}}
</p>
<p>
{{
item
.
description
}}
</p>
</dd>
</dl>
<div>
<p>
{{
item
.
createTime
}}
</p>
<el-button
type=
"primary"
icon=
"el-icon-view"
size=
"mini"
>
查看
</el-button>
</div>
</li>
</ul>
</el-tab-pane>
<el-tab-pane
label=
"音频"
name=
"third"
>
<ul>
<li
v-for=
"(item, key) in listData"
:key=
"key"
>
<dl>
<dt>
<!--
<img
src=
"../../../assets/img/default.png"
alt=
""
>
-->
北
</dt>
<dd>
<h3>
{{
item
.
name
}}
</h3>
<p>
创建者:
{{
item
.
createrName
}}
</p>
<p>
{{
item
.
description
}}
</p>
</dd>
</dl>
<div>
<p>
{{
item
.
createTime
}}
</p>
<el-button
type=
"primary"
icon=
"el-icon-view"
size=
"mini"
>
查看
</el-button>
</div>
</li>
</ul>
</el-tab-pane>
<el-tab-pane
label=
"视频"
name=
"fourth"
>
<ul>
<li
v-for=
"(item, key) in listData"
:key=
"key"
>
<dl>
<dt>
<!--
<img
src=
"../../../assets/img/default.png"
alt=
""
>
-->
北
</dt>
<dd>
<h3>
{{
item
.
name
}}
</h3>
<p>
创建者:
{{
item
.
createrName
}}
</p>
<p>
{{
item
.
description
}}
</p>
</dd>
</dl>
<div>
<p>
{{
item
.
createTime
}}
</p>
<el-button
type=
"primary"
icon=
"el-icon-view"
size=
"mini"
>
查看
</el-button>
</div>
</li>
</ul>
</el-tab-pane>
</el-tabs>
</div>
</div>
</
template
>
<
script
>
import
{
getMetaDataPlanListAPI
}
from
'@/api/resourcecommit'
export
default
{
name
:
'metadataplan'
,
data
()
{
return
{
activeName
:
'first'
activeName
:
'first'
,
typeData
:
{
type
:
1
,
},
listData
:
[]
}
},
mounted
()
{
this
.
getMetaDataPlanList
();
},
methods
:
{
handleClick
(
tab
,
event
)
{
console
.
log
(
tab
,
event
);
console
.
log
(
tab
,
event
,
'KLLL'
);
if
(
tab
.
index
===
'0'
)
{
this
.
typeData
.
type
=
1
;
}
else
if
(
tab
.
index
===
'1'
)
{
this
.
typeData
.
type
=
2
;
}
else
if
(
tab
.
index
===
'2'
)
{
this
.
typeData
.
type
=
3
;
}
else
{
this
.
typeData
.
type
=
4
;
}
this
.
getMetaDataPlanList
();
},
goAddPage
()
{
this
.
$router
.
push
({
path
:
'addnewmetadata'
})
},
getMetaDataPlanList
()
{
getMetaDataPlanListAPI
(
this
.
typeData
)
.
then
(
res
=>
{
console
.
log
(
res
,
'没错,我就是最帅的列表了'
)
if
(
res
.
data
.
code
===
0
)
{
this
.
listData
=
res
.
data
.
data
;
}
})
}
}
}
...
...
@@ -39,6 +155,7 @@ export default {
flex-direction:column;
height:100%;
}
.metaDataTop {
width:100%;
padding-bottom:23px;
...
...
@@ -57,4 +174,84 @@ export default {
background-position:37px 2px;
}
}
.metaDataPlanList {
position:relative;
background:#fff;
padding:0 15px;
h2 {
font-size:16px;
color:#222;
font-weight:500;
margin-bottom:30px;
}
}
.addNewPlanBtn {
position:absolute;
right:15px;
top:61px;
z-index:2;
}
.elTab {
ul {
margin-block-start:0;
margin-block-end:0;
padding-inline-start:0;
li {
list-style:none;
display:flex;
align-items:center;
margin-bottom:35px;
padding:15px 0;
dl {
display:flex;
align-items:center;
flex:1;
dt {
width:40px;
height:40px;
border-radius:50%;
text-align:center;
line-height:40px;
background:#2DCEE3;
color:#fff;
img {
width:100%;
height:100%;
border-radius:50%;
}
}
dd {
font-size:14px;
margin-inline-start:0px;
margin-left:20px;
h3 {
font-size:#333;
font-weight:600;
margin-block-start:0em;
margin-block-end:0em;
}
p {
color:#555;
margin-block-start:0em;
margin-block-end:0em;
&:nth-of-type(1) {
margin:10px 0;
}
}
}
}
div {
p {
margin-block-start:0em;
margin-block-end:0em;
color:#00B5B8;
margin-bottom:10px;
}
}
}
}
}
</
style
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论