31fd03fa by 任超

feat:待办箱高级查询

1 parent 2a6d3672
......@@ -10,15 +10,20 @@ export default {
moreQueryClick () {
this.isSearch = true
},
iterationData () {
let obj = {
ywlymc: '业务来源', qllxmc: '权利类型', djlxmc: '登记类型', ywh: '业务号', sqywmc: '申请业务名称',
qlrmc: '权利人', ywrmc: '义务人', slsj: '受理时间'
}
this.searchList = Object.entries({ ...this.searchForm, ...this.otherForm }).map((item) => {
const [name, value] = item
if (value) return { name: obj[name], value, zdm: name }
}).filter(Boolean)
},
getSearch (val) {
if (!val) return
this.otherForm = val
this.iterationData()
this.queryClick()
let obj = { ywlymc: '业务来源', qllxmc: '权利类型', djlxmc: '登记类型', ywh: '业务号', sqywmc: '申请业务名称', qlrmc: '权利人', ywrmc: '义务人', slsj: '受理时间' }
this.searchList = Object.entries({ ...this.searchForm, ...val }).map((item) => {
const [name, value] = item
if (value) return { name: obj[name], value }
}).filter(Boolean)
},
hanldeCleanAll () {
this.searchForm = {}
......
......@@ -49,7 +49,7 @@
<ul>
<li v-for="(item, index) in searchList" :key="index">
{{ item.name }}:{{ item.value }}
<i class="el-icon-circle-close" @click="handelItem(index)"></i>
<i class="el-icon-circle-close" @click="handelItem(item, index)"></i>
</li>
</ul>
<el-button class="clean-btn" type="text" v-if="searchList.length > 0" @click.native="hanldeCleanAll">清除全部
......@@ -126,7 +126,7 @@ export default {
queryClick () {
this.$startLoading()
this.searchForm.ywh = this.queryForm.ywh
console.log(this.otherForm);
this.iterationData()
searchTaskToDo({ ...this.queryForm, ...this.pageData }).then(res => {
this.$endLoading()
if (res.code === 200) {
......@@ -145,8 +145,23 @@ export default {
})
},
handelItem (index) {
handelItem (item, index) {
let obj = {
ywlymc: 'ywly',
qllxmc: 'qllx',
djlxmc: 'djlx'
}
this.searchList.splice(index, 1)
if (obj[item.zdm]) {
this.queryForm[obj[item.zdm]] = ''
} else if (this.otherForm[[item.zdm]]) {
this.otherForm[[item.zdm]] = ''
} else {
this.queryForm[item.zdm] = ''
}
this.searchForm[item.zdm] = ''
this.iterationData()
this.queryClick()
},
handleSort (val) {
this.queryForm.sortField = val.prop
......
......@@ -6,8 +6,8 @@
<el-row>
<el-col :span="5">
<el-form-item label="业务来源">
<el-select v-model="queryForm.ywly" @change="queryClick()" class="width100" filterable clearable
placeholder="请选择业务来源">
<el-select v-model="queryForm.ywly" @change="handleSelect('ywly', 'ywlymc', 'ywly')" class="width100"
filterable clearable placeholder="请选择业务来源">
<el-option v-for="item in dictData['ywly']" :key="item.dcode" :label="item.dname" :value="item.dcode">
</el-option>
</el-select>
......@@ -15,8 +15,8 @@
</el-col>
<el-col :span="5">
<el-form-item label="权利类型">
<el-select v-model="queryForm.qllx" @change="queryClick()" class="width100" filterable clearable
placeholder="请选择权利类型">
<el-select v-model="queryForm.qllx" @change="handleSelect('A8', 'qllxmc', 'qllx')" class="width100"
filterable clearable placeholder="请选择权利类型">
<el-option v-for="item in dictData['A8']" :key="item.dcode" :label="item.dname" :value="item.dcode">
</el-option>
</el-select>
......@@ -24,8 +24,8 @@
</el-col>
<el-col :span="5">
<el-form-item label="登记类型">
<el-select v-model="queryForm.djlx" @change="queryClick()" class="width100" filterable clearable
placeholder="请选择登记类型">
<el-select v-model="queryForm.djlx" @change="handleSelect('A21', 'djlxmc', 'djlx')" class="width100"
filterable clearable placeholder="请选择登记类型">
<el-option v-for="item in dictData['A21']" :key="item.dcode" :label="item.dname" :value="item.dcode">
</el-option>
</el-select>
......@@ -94,6 +94,12 @@ export default {
djlx: "",
ywh: "",
},
searchForm: {
ywlymc: '',
qllxmc: '',
djlxmc: '',
ywh: ''
},
pageData: {
current: 1,
size: 10,
......@@ -107,10 +113,19 @@ export default {
};
},
methods: {
handleSelect (bs, mc, code) {
let that = this
this.dictData[bs].forEach(item => {
if (item.dcode == this.queryForm[code]) {
this.searchForm[mc] = item.dname
}
})
},
// 列表渲染接口
queryClick () {
this.$startLoading()
searchTaskDone({ ...this.queryForm, ...this.pageData }, { 'target': '#ybxLoading' }).then(res => {
this.searchForm.ywh = this.queryForm.ywh
searchTaskDone({ ...this.queryForm, ...this.pageData }).then(res => {
if (res.code === 200) {
this.$endLoading()
let { total, records } = res.result
......