5e04abed by 任超

feat:业务办理高级搜索

1 parent 1c9b8815
......@@ -10,6 +10,32 @@ export default {
moreQueryClick () {
this.isSearch = true
},
handleSelect (bs, mc, code) {
let that = this
this.dictData[bs].forEach(item => {
if (item.dcode == this.queryForm[code]) {
this.searchForm[mc] = item.dname
}
})
},
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()
},
iterationData () {
let obj = {
ywlymc: '业务来源', qllxmc: '权利类型', djlxmc: '登记类型', ywh: '业务号', sqywmc: '申请业务名称',
......
......@@ -114,14 +114,6 @@ 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()
......@@ -139,30 +131,11 @@ export default {
item.qlrmcStr = item.qlrmc ? String(item.qlrmc) : ''
item.ywrmcStr = item.ywrmc ? String(item.ywrmc) : ''
})
this.tableData.total = total;
this.tableData.total = total ? total : 0
this.tableData.data = records ? records : []
}
})
},
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
this.queryForm.sortOrder = val.order == "ascending" ? 'asc' : 'desc'
......
......@@ -50,7 +50,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">清除全部
......@@ -60,9 +60,10 @@
</div>
<!-- 表格 -->
<div class="from-clues-content">
<lb-table :page-size="pageData.size" class="loadingtext" :heightNum="300" @sort-change="handleSort" border
:current-page.sync="pageData.current" :total="pageData.total" @size-change="handleSizeChange"
@p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data">
<lb-table :page-size="pageData.size" class="loadingtext" @sort-change="handleSort"
:current-page.sync="pageData.currentPage" :heightNum="290" :total="tableData.total"
@size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns"
:data="tableData.data">
</lb-table>
</div>
<searchBox v-model="isSearch" @getSearch="getSearch" />
......@@ -100,11 +101,6 @@ export default {
djlxmc: '',
ywh: ''
},
pageData: {
current: 1,
size: 10,
total: 2,
},
tableData: {
total: 0,
columns: datas.columns(),
......@@ -113,30 +109,23 @@ 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()
this.searchForm.ywh = this.queryForm.ywh
this.iterationData()
searchTaskDone({ ...this.queryForm, ...this.pageData }).then(res => {
this.$endLoading()
if (res.code === 200) {
this.$endLoading()
let { total, records } = res.result
this.pageData.total = total;
records.forEach(item => {
item.qlrmc = item.qlrmc.join(',')
item.ywh = item.ywh.join(',')
item.zl = item.zl.join(',')
item.outstepdate = item.outstepdate[0]
})
this.tableData.data = records
this.tableData.total = total ? total : 0
this.tableData.data = records ? records : []
}
})
},
......