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

1115

上级 a48fbc92
<template>
<div id="app">
<router-view></router-view>
<keep-alive>
<router-view v-if="$route.meta.keepAlive"></router-view>
</keep-alive>
<router-view v-if="!$route.meta.keepAlive"></router-view>
</div>
</template>
......
......@@ -140,7 +140,8 @@ export const asyncRouterMap = [{
name: 'resourcecommit',
meta: {
title: '资源提交表单',
routerIds: ['0902']
routerIds: ['0902'],
keepAlive: true
},
hidden:true
},{
......@@ -241,6 +242,25 @@ export const asyncRouterMap = [{
},
hidden: true
}]
},{
path: '/submission/metadatamange',
redirect: '/submission/metadatamange/metadataplan',
component: _import('submission/metadatamange/index'),
alwaysShow: true,
meta: {
title: '元数据管理',
routerIds: ['0904']
},
children: [{
path: 'metadataplan',
component: _import('submission/metadatamange/metadataplan'),
name: 'metadataplan',
meta: {
title: '自定义元数据方案',
routerIds: ['090401'],
search:true
},
}]
}]
},
{
......
......@@ -54,7 +54,7 @@
<img class="peeson_pic" src="~@/assets/img/pic_user.png" alt="人物默认图" v-else>
<div class="content">
<p class="tit">{{item.keyword}}</p>
<p class="work">职业:{{item.works}}</p>
<p class="work">职业:{{item.occupation}}</p>
<p class="text">
{{item.description}}
</p>
......
......@@ -319,6 +319,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();
}
}
</script>
<style lang="scss">
......
......@@ -60,7 +60,7 @@ export default {
return true
}
return false
}
},
}
}
</script>
......
......@@ -203,10 +203,10 @@
<h2>>已链接资源</h2>
<img :src="imgPathX1" alt="">
</div>
<ul v-if="isShowListOfLinkedRes">
<ul v-if="isShowListOfLinkedRes" class="listUl">
<li v-for="(item, key) in linkedResData" :key="key" @click="goResourceDetail(item)">
<span>
<a href="javascript:;" :title="item.name">{{ item.name ? item.name.length > 22 ? item.name.substring(0, 22) + '...' : item.name : '' }}</a>
<a href="javascript:;" :title="item.name">{{ item.name ? item.name.length > 20 ? item.name.substring(0, 20) + '...' : item.name : '' }}</a>
</span>
</li>
</ul>
......@@ -270,6 +270,7 @@ export default {
],
alreadyEntityData: [],//已选择实体的数据
entityDetail: {},//点击实体列表的实体,得到的对应的详情
alreadyEntityIdData: []
}
},
mounted() {
......@@ -330,19 +331,28 @@ export default {
}
})
}
this.alreadyEntityData.map((item, index) => {
if (this.alreadyEntityIdData.indexOf(item.id) > -1) {
return;
} else {
this.alreadyEntityIdData.push(item.id);
}
})
},
deleteItem(item, key) {
this.alreadyEntityData.splice(key, 1)
this.alreadyEntityIdData.splice(key, 1)
item.choosedAlready = false;
this.getEntityList();
},
closeMark() {
this.searchForm.keyword = null;
this.getEntityList();
//this.getEntityList();
this.$emit('changeStateVal', false);
this.dataList.forEach((val, key) => {
val.choosedAlready = false;
})
this.alreadyEntityData = [];
// this.dataList.forEach((val, key) => {
// val.choosedAlready = false;
// })
//this.alreadyEntityData = [];
},
giveEntityToParent() {
this.$emit('getEntity', this.alreadyEntityData);
......@@ -351,13 +361,18 @@ export default {
getEntityList() {
getEntityListAPI(this.searchForm)
.then(res => {
console.log(res, 'KLKLK')
if (res.data.code === 0) {
console.log(res.data.data.list, "OPL")
this.totalCount = res.data.data.total;
this.dataList = res.data.data.list;
this.dataList.map((item, index) => {
this.$set(item, 'stateVal', null)
this.$set(item, 'choosedAlready', false);
if (this.alreadyEntityIdData.indexOf(item.id) > -1) {
item.choosedAlready = true;
} else {
item.choosedAlready = false;
}
if (item.state == 1) {
item.stateVal = '历史人物'
} else if (item.state == 2) {
......@@ -374,9 +389,9 @@ export default {
},
getSearchResult() {
this.getEntityList();
//this.alreadyEntityData()
},
pagesizeFun(val){
console.log(val,"()()999")
this.searchForm.pageSize = val;
this.getEntityList()
},
......@@ -392,7 +407,6 @@ export default {
getlinkedRes() {
getlinkedResAPI(this.linkedResParams)
.then(res => {
console.log(res, '32323231231231232');
if (res.data.code === 0) {
this.linkedResData = res.data.data
}
......@@ -428,7 +442,7 @@ export default {
}
.entityBox {
width:69.27%;
height:51%;
height:53%;
background:#fff;
margin:2.9% auto;
padding:0 30px;
......@@ -483,7 +497,7 @@ export default {
}
.dataList {
width:100%;
max-height:420px;
max-height:410px;
overflow-y:auto;
&::-webkit-scrollbar {
width:5px;
......@@ -516,7 +530,8 @@ export default {
margin-right:14px;
img {
width:100%;
height:100%;
max-height:100%;
height:auto;
}
}
dd {
......
<template>
<div>
<router-view></router-view>
</div>
</template>
<script>
export default {
name: 'metadatamange',
data() {
return {
}
}
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<template>
<div class="metaDataPlanBox">
<div class="metaDataTop">
<em>自定义元数据方案</em>
<span>刷新</span>
</div>
<div class="metaDataPlanList">
<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>
</div>
</div>
</template>
<script>
export default {
data() {
return {
activeName: 'first'
}
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
}
}
}
</script>
<style lang="less" scoped>
.metaDataPlanBox {
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;
}
}
</style>
\ No newline at end of file
......@@ -306,6 +306,17 @@ export default {
this.getNowTime();
this.formSixBtn();
},
watch: {
$route: {
handler: function(val, oldVal){
console.log(oldVal, "()()(111");
if (val) {
oldVal.meta.keepAlive = false;
}
},
deep: true
}
},
methods: {
showMark() {
this.isShowMark = true;
......@@ -561,7 +572,11 @@ export default {
this.formData.formationTime = defaultDate;
console.log(this.formData.formationTime,"()***")
},
}
},
beforeRouterLeave(to, from, next) {
from.meta.keepAlive = false;
next();
},
}
</script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论