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

1216

上级 48da870f
......@@ -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',
......
......@@ -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.value)
this.resourceLabel.push(item.name)
})
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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论