31fd03fa by 任超

feat:待办箱高级查询

1 parent 2a6d3672
...@@ -10,15 +10,20 @@ export default { ...@@ -10,15 +10,20 @@ export default {
10 moreQueryClick () { 10 moreQueryClick () {
11 this.isSearch = true 11 this.isSearch = true
12 }, 12 },
13 iterationData () {
14 let obj = {
15 ywlymc: '业务来源', qllxmc: '权利类型', djlxmc: '登记类型', ywh: '业务号', sqywmc: '申请业务名称',
16 qlrmc: '权利人', ywrmc: '义务人', slsj: '受理时间'
17 }
18 this.searchList = Object.entries({ ...this.searchForm, ...this.otherForm }).map((item) => {
19 const [name, value] = item
20 if (value) return { name: obj[name], value, zdm: name }
21 }).filter(Boolean)
22 },
13 getSearch (val) { 23 getSearch (val) {
14 if (!val) return
15 this.otherForm = val 24 this.otherForm = val
25 this.iterationData()
16 this.queryClick() 26 this.queryClick()
17 let obj = { ywlymc: '业务来源', qllxmc: '权利类型', djlxmc: '登记类型', ywh: '业务号', sqywmc: '申请业务名称', qlrmc: '权利人', ywrmc: '义务人', slsj: '受理时间' }
18 this.searchList = Object.entries({ ...this.searchForm, ...val }).map((item) => {
19 const [name, value] = item
20 if (value) return { name: obj[name], value }
21 }).filter(Boolean)
22 }, 27 },
23 hanldeCleanAll () { 28 hanldeCleanAll () {
24 this.searchForm = {} 29 this.searchForm = {}
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
49 <ul> 49 <ul>
50 <li v-for="(item, index) in searchList" :key="index"> 50 <li v-for="(item, index) in searchList" :key="index">
51 {{ item.name }}:{{ item.value }} 51 {{ item.name }}:{{ item.value }}
52 <i class="el-icon-circle-close" @click="handelItem(index)"></i> 52 <i class="el-icon-circle-close" @click="handelItem(item, index)"></i>
53 </li> 53 </li>
54 </ul> 54 </ul>
55 <el-button class="clean-btn" type="text" v-if="searchList.length > 0" @click.native="hanldeCleanAll">清除全部 55 <el-button class="clean-btn" type="text" v-if="searchList.length > 0" @click.native="hanldeCleanAll">清除全部
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
126 queryClick () { 126 queryClick () {
127 this.$startLoading() 127 this.$startLoading()
128 this.searchForm.ywh = this.queryForm.ywh 128 this.searchForm.ywh = this.queryForm.ywh
129 console.log(this.otherForm); 129 this.iterationData()
130 searchTaskToDo({ ...this.queryForm, ...this.pageData }).then(res => { 130 searchTaskToDo({ ...this.queryForm, ...this.pageData }).then(res => {
131 this.$endLoading() 131 this.$endLoading()
132 if (res.code === 200) { 132 if (res.code === 200) {
...@@ -145,8 +145,23 @@ export default { ...@@ -145,8 +145,23 @@ export default {
145 }) 145 })
146 }, 146 },
147 147
148 handelItem (index) { 148 handelItem (item, index) {
149 let obj = {
150 ywlymc: 'ywly',
151 qllxmc: 'qllx',
152 djlxmc: 'djlx'
153 }
149 this.searchList.splice(index, 1) 154 this.searchList.splice(index, 1)
155 if (obj[item.zdm]) {
156 this.queryForm[obj[item.zdm]] = ''
157 } else if (this.otherForm[[item.zdm]]) {
158 this.otherForm[[item.zdm]] = ''
159 } else {
160 this.queryForm[item.zdm] = ''
161 }
162 this.searchForm[item.zdm] = ''
163 this.iterationData()
164 this.queryClick()
150 }, 165 },
151 handleSort (val) { 166 handleSort (val) {
152 this.queryForm.sortField = val.prop 167 this.queryForm.sortField = val.prop
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
6 <el-row> 6 <el-row>
7 <el-col :span="5"> 7 <el-col :span="5">
8 <el-form-item label="业务来源"> 8 <el-form-item label="业务来源">
9 <el-select v-model="queryForm.ywly" @change="queryClick()" class="width100" filterable clearable 9 <el-select v-model="queryForm.ywly" @change="handleSelect('ywly', 'ywlymc', 'ywly')" class="width100"
10 placeholder="请选择业务来源"> 10 filterable clearable placeholder="请选择业务来源">
11 <el-option v-for="item in dictData['ywly']" :key="item.dcode" :label="item.dname" :value="item.dcode"> 11 <el-option v-for="item in dictData['ywly']" :key="item.dcode" :label="item.dname" :value="item.dcode">
12 </el-option> 12 </el-option>
13 </el-select> 13 </el-select>
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
15 </el-col> 15 </el-col>
16 <el-col :span="5"> 16 <el-col :span="5">
17 <el-form-item label="权利类型"> 17 <el-form-item label="权利类型">
18 <el-select v-model="queryForm.qllx" @change="queryClick()" class="width100" filterable clearable 18 <el-select v-model="queryForm.qllx" @change="handleSelect('A8', 'qllxmc', 'qllx')" class="width100"
19 placeholder="请选择权利类型"> 19 filterable clearable placeholder="请选择权利类型">
20 <el-option v-for="item in dictData['A8']" :key="item.dcode" :label="item.dname" :value="item.dcode"> 20 <el-option v-for="item in dictData['A8']" :key="item.dcode" :label="item.dname" :value="item.dcode">
21 </el-option> 21 </el-option>
22 </el-select> 22 </el-select>
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
24 </el-col> 24 </el-col>
25 <el-col :span="5"> 25 <el-col :span="5">
26 <el-form-item label="登记类型"> 26 <el-form-item label="登记类型">
27 <el-select v-model="queryForm.djlx" @change="queryClick()" class="width100" filterable clearable 27 <el-select v-model="queryForm.djlx" @change="handleSelect('A21', 'djlxmc', 'djlx')" class="width100"
28 placeholder="请选择登记类型"> 28 filterable clearable placeholder="请选择登记类型">
29 <el-option v-for="item in dictData['A21']" :key="item.dcode" :label="item.dname" :value="item.dcode"> 29 <el-option v-for="item in dictData['A21']" :key="item.dcode" :label="item.dname" :value="item.dcode">
30 </el-option> 30 </el-option>
31 </el-select> 31 </el-select>
...@@ -94,6 +94,12 @@ export default { ...@@ -94,6 +94,12 @@ export default {
94 djlx: "", 94 djlx: "",
95 ywh: "", 95 ywh: "",
96 }, 96 },
97 searchForm: {
98 ywlymc: '',
99 qllxmc: '',
100 djlxmc: '',
101 ywh: ''
102 },
97 pageData: { 103 pageData: {
98 current: 1, 104 current: 1,
99 size: 10, 105 size: 10,
...@@ -107,10 +113,19 @@ export default { ...@@ -107,10 +113,19 @@ export default {
107 }; 113 };
108 }, 114 },
109 methods: { 115 methods: {
116 handleSelect (bs, mc, code) {
117 let that = this
118 this.dictData[bs].forEach(item => {
119 if (item.dcode == this.queryForm[code]) {
120 this.searchForm[mc] = item.dname
121 }
122 })
123 },
110 // 列表渲染接口 124 // 列表渲染接口
111 queryClick () { 125 queryClick () {
112 this.$startLoading() 126 this.$startLoading()
113 searchTaskDone({ ...this.queryForm, ...this.pageData }, { 'target': '#ybxLoading' }).then(res => { 127 this.searchForm.ywh = this.queryForm.ywh
128 searchTaskDone({ ...this.queryForm, ...this.pageData }).then(res => {
114 if (res.code === 200) { 129 if (res.code === 200) {
115 this.$endLoading() 130 this.$endLoading()
116 let { total, records } = res.result 131 let { total, records } = res.result
......