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

1216

上级 48da870f
...@@ -145,15 +145,15 @@ export const asyncRouterMap = [{ ...@@ -145,15 +145,15 @@ export const asyncRouterMap = [{
}, },
hidden:true hidden:true
},{ },{
path: '/submission/infoview', // path: '/submission/infoview',
redirect: '/submission/infoview/mycommit', // redirect: '/submission/infoview/mycommit',
component: _import('submission/infoview/index'), // component: _import('submission/infoview/index'),
alwaysShow: true, // alwaysShow: true,
meta: { // meta: {
title: '提交信息包概览', // title: '提交信息包概览',
routerIds: ['2403'] // routerIds: ['2403']
}, // },
children: [{ // children: [{
path: 'mycommit', path: 'mycommit',
component: _import('submission/infoview/mycommit'), component: _import('submission/infoview/mycommit'),
name: 'mycommit', name: 'mycommit',
...@@ -241,7 +241,7 @@ export const asyncRouterMap = [{ ...@@ -241,7 +241,7 @@ export const asyncRouterMap = [{
routerIds: ['240305'] routerIds: ['240305']
}, },
hidden: true hidden: true
}] // }]
},{ },{
path: '/submission/metadatamange', path: '/submission/metadatamange',
redirect: '/submission/metadatamange/metadataplan', redirect: '/submission/metadatamange/metadataplan',
......
...@@ -178,6 +178,17 @@ ...@@ -178,6 +178,17 @@
</div> </div>
</div> </div>
<el-dialog title="标签资源" :visible.sync="dialogTableVisible" class="lableDia"> <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 :data="gridData" @selection-change="handleSelectionChange">
<el-table-column <el-table-column
type="selection" type="selection"
...@@ -188,6 +199,7 @@ ...@@ -188,6 +199,7 @@
<el-table-column property="createrName" label="创建者"></el-table-column> <el-table-column property="createrName" label="创建者"></el-table-column>
<el-table-column property="createTime" label="创建时间"></el-table-column> <el-table-column property="createTime" label="创建时间"></el-table-column>
</el-table> </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"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogTableVisible = false">取 消</el-button> <el-button @click="dialogTableVisible = false">取 消</el-button>
<el-button type="primary" @click="sureLable">确 定</el-button> <el-button type="primary" @click="sureLable">确 定</el-button>
...@@ -204,6 +216,7 @@ import linkentity from '../linkentity' ...@@ -204,6 +216,7 @@ import linkentity from '../linkentity'
import { uploadUrl, uploadPath, requestPath } from "@/utils/global"; import { uploadUrl, uploadPath, requestPath } from "@/utils/global";
import { debounce } from "@/utils/publicFunctions"; import { debounce } from "@/utils/publicFunctions";
import _ from 'lodash' import _ from 'lodash'
import pagination from '@/components/pagination/pagination'
import { import {
resourceCommitAPI, resourceCommitAPI,
resourceDiyTypeAPI, resourceDiyTypeAPI,
...@@ -219,17 +232,20 @@ export default { ...@@ -219,17 +232,20 @@ export default {
name: 'resourcecommit', name: 'resourcecommit',
components: { components: {
mapmark, mapmark,
linkentity linkentity,
pagination
}, },
data() { data() {
return { return {
restaurants: [],
totalCount: 0,
gridData: [], gridData: [],
multipleSelection: [], multipleSelection: [],
dialogTableVisible: false, dialogTableVisible: false,
searchPageLableForm: { searchPageLableForm: {
search: null, search: null,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 6,
orderBy: null orderBy: null
}, },
domain: process.env.BASE_API, domain: process.env.BASE_API,
...@@ -353,6 +369,11 @@ export default { ...@@ -353,6 +369,11 @@ export default {
] ]
} }
}, },
computed: {
searchWord () {
return this.searchPageLableForm.search
}
},
mounted() { mounted() {
this.getresourceDiyTypeList(); this.getresourceDiyTypeList();
this.resourceLabelListAPI(); this.resourceLabelListAPI();
...@@ -372,6 +393,15 @@ export default { ...@@ -372,6 +393,15 @@ export default {
}, },
deep: true deep: true
}, },
searchWord: {
handler (newVal, oldVal) {
console.log( newVal )
this.searchPageLableForm.search = newVal;
this.getSearchPageLable ();
},
deep: true,
immediate: true
}
}, },
methods: { methods: {
showMark() { showMark() {
...@@ -605,8 +635,8 @@ export default { ...@@ -605,8 +635,8 @@ export default {
if (res.data.code === 0) { if (res.data.code === 0) {
this.formData = res.data.data; this.formData = res.data.data;
this.$nextTick(() => this.$refs.formOne.clearValidate()) this.$nextTick(() => this.$refs.formOne.clearValidate())
this.$nextTick(()=>this.$refs.formTwo.clearValidate()) this.$nextTick(() => this.$refs.formTwo.clearValidate())
this.$nextTick(()=>this.$refs.formThree.clearValidate()) this.$nextTick(() => this.$refs.formThree.clearValidate())
if (res.data.data.moduleId) { if (res.data.data.moduleId) {
this.changeMetaDataVal1(res.data.data.moduleId); this.changeMetaDataVal1(res.data.data.moduleId);
setTimeout(() => { setTimeout(() => {
...@@ -621,7 +651,7 @@ export default { ...@@ -621,7 +651,7 @@ export default {
} }
res.data.data.label.map((item, index) => { res.data.data.label.map((item, index) => {
this.$set(item, 'value', item.labelId); this.$set(item, 'value', item.labelId);
this.resourceLabel.push(item.value) this.resourceLabel.push(item.name)
}) })
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);
...@@ -736,17 +766,24 @@ export default { ...@@ -736,17 +766,24 @@ export default {
//} //}
console.log(this.processLength, '22211aa') console.log(this.processLength, '22211aa')
}, },
showLableDia() { getSearchPageLable () {
this.dialogTableVisible = true;
searchPageLableAPI(this.searchPageLableForm) searchPageLableAPI(this.searchPageLableForm)
.then(res => { .then(res => {
console.log(res, '21312') console.log(res, '21312')
if ( res.data.code === 0 ) { if ( res.data.code === 0 ) {
this.gridData = res.data.data.list 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 // multipleSelection
console.log(val, '123val') console.log(val, '123val')
this.multipleSelection = val; this.multipleSelection = val;
...@@ -756,20 +793,49 @@ export default { ...@@ -756,20 +793,49 @@ export default {
labelId: item.id labelId: item.id
} }
optIdArr.push(obj) optIdArr.push(obj)
})
this.formData.label = optIdArr;
},
sureLable() {
this.multipleSelection.map((item, index) => {
if (!this.resourceLabel.includes(item.name)) { if (!this.resourceLabel.includes(item.name)) {
this.resourceLabel.push(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 this.dialogTableVisible = false
}, },
deleteLableItem(key) { deleteLableItem (key) {
this.resourceLabel.splice(key, 1) 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) { beforeRouteLeave(to, from, next) {
from.meta.keepAlive = false; from.meta.keepAlive = false;
...@@ -915,6 +981,31 @@ export default { ...@@ -915,6 +981,31 @@ export default {
height:5px; 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>
<style lang="scss"> <style lang="scss">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论