|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="height_100" v-loading="loading">
|
|
|
<el-container>
|
|
|
- <!-- <el-header>
|
|
|
+ <el-header>
|
|
|
<div class="head">
|
|
|
<div class="head_left">
|
|
|
<mySearch style="width:500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
|
|
@@ -11,7 +11,7 @@
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
- </el-header> -->
|
|
|
+ </el-header>
|
|
|
<el-main class="height_100" v-DivHeight="getDivHeight">
|
|
|
<div v-if="showTable" class="content" :style="`height:${tableHeight - 20}px`">
|
|
|
<myCard class="box-card" v-for="(item,index) in tableData" :key="item.id">
|
|
@@ -93,24 +93,64 @@ import createNoveltySearch from './dialog/createNoveltySearch.vue';
|
|
|
total:0,
|
|
|
tableData:[],
|
|
|
column:column,
|
|
|
+ //检索字段
|
|
|
+ searchFiled: [],
|
|
|
+
|
|
|
+ //检索条件
|
|
|
+ searchOption: {
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
|
computed: {},
|
|
|
created() {},
|
|
|
- mounted() {
|
|
|
- this.getList()
|
|
|
+ async mounted() {
|
|
|
+ //获取检索字段和分组字段
|
|
|
+ await this.getColumn()
|
|
|
+ this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ //获取检索字段和分组字段
|
|
|
+ async getColumn() {
|
|
|
+ let params = ['noveltyProject']
|
|
|
+ await this.$api.getParamsCommon(params).then(async res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ // 分组字段
|
|
|
+ let conditionDTOList = JSON.parse(JSON.stringify(res.data[0].conditionDTOList))
|
|
|
+ // 搜索字段
|
|
|
+ this.searchFiled = this.$commonJS.getField(conditionDTOList, (u) => u.ifSearch == true, {
|
|
|
+ label: 'name',
|
|
|
+ value: 'value',
|
|
|
+ type: 'type',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.showViews()
|
|
|
+ },
|
|
|
//检索
|
|
|
search(){
|
|
|
+ let params = {}
|
|
|
+ val.forEach(item => {
|
|
|
+ if (item.type == 3) {
|
|
|
+ params[item.value] = item.searchValue.map(itemValue => {
|
|
|
+ return itemValue.value
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ params[item.value] = item.searchValue.label
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.searchOption = this.$commonJS.ArrayToArray(val)
|
|
|
this.queryParams.current = 1
|
|
|
this.getList()
|
|
|
},
|
|
|
//获取数据
|
|
|
getList(){
|
|
|
this.loading = true
|
|
|
- this.$api.queryNoveltyProject(this.queryParams).then(response=>{
|
|
|
+ var params = {
|
|
|
+ ...this.queryParams,
|
|
|
+ searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
|
|
|
+ }
|
|
|
+ this.$api.queryNoveltyProject(params).then(response=>{
|
|
|
if(response.code == 200){
|
|
|
this.tableData = response.data.data
|
|
|
this.total = response.data.total
|