|
@@ -230,14 +230,12 @@ export default {
|
|
|
return {
|
|
|
mj: 0,
|
|
|
zs: 0,
|
|
|
- lx: [],
|
|
|
ydlxDicts: ydlxDicts,
|
|
|
query: {
|
|
|
xzqmc: '',
|
|
|
name: '',
|
|
|
type: '',
|
|
|
status: '',
|
|
|
- lx: '',
|
|
|
zqscqk: '',
|
|
|
scsj: '',
|
|
|
sfjd: ''
|
|
@@ -268,7 +266,8 @@ export default {
|
|
|
ydlx: [],
|
|
|
crjhs: [ '2023年', '2024年', '2025年','2026年','远期' ],
|
|
|
foldShow: false,
|
|
|
- isAllSelected: false
|
|
|
+ isAllSelected: false,
|
|
|
+ isOther: false
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -284,6 +283,27 @@ export default {
|
|
|
this.tdyts = data;
|
|
|
});
|
|
|
},
|
|
|
+ queryWlydZydxzList() {
|
|
|
+ const urlApi = `/api/ybz-bj/wlydZydxzList/query`;
|
|
|
+ let p = {}
|
|
|
+ p['isOther'] = this.isOther
|
|
|
+ if (this.isOther) {
|
|
|
+ p['dlbms'] = ydlxDicts.map((item) => item['value']);
|
|
|
+ } else {
|
|
|
+ if (this.ydlx.length > 0) {
|
|
|
+ p['dlbms'] = this.isAllSelected ? [this.ydlx[0][0]] : this.ydlx.map(arr => arr[1])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ if (this.ydlx.length > 0) {
|
|
|
+ this.$ajax.get(urlApi, p, this, false).then((result) => {
|
|
|
+ resolve(result)
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ resolve({data: []})
|
|
|
+ })
|
|
|
+ },
|
|
|
getTsxzListData() {
|
|
|
const urlApi = `/api/ybz-bj/wlydList`;
|
|
|
let p = {
|
|
@@ -291,8 +311,13 @@ export default {
|
|
|
pageIndex: this.config.page.index,
|
|
|
pageSize: this.config.page.count
|
|
|
}
|
|
|
- if (this.ydlx.length > 0) {
|
|
|
- p['dlbms'] = this.isAllSelected ? [this.ydlx[0][0]] : this.ydlx.map(arr => arr[1])
|
|
|
+ p['isOther'] = this.isOther
|
|
|
+ if (this.isOther) {
|
|
|
+ p['dlbms'] = ydlxDicts.map((item) => item['value']);
|
|
|
+ } else {
|
|
|
+ if (this.ydlx.length > 0) {
|
|
|
+ p['dlbms'] = this.isAllSelected ? [this.ydlx[0][0]] : this.ydlx.map(arr => arr[1])
|
|
|
+ }
|
|
|
}
|
|
|
this.$ajax.get(urlApi, p, this, false).then((result) => {
|
|
|
const data = result["data"] || {};
|
|
@@ -323,20 +348,26 @@ export default {
|
|
|
});
|
|
|
window.open(routeUrl.href, '_blank');
|
|
|
},
|
|
|
- searchData() {
|
|
|
+ async searchData() {
|
|
|
+ this.isOther = false;
|
|
|
this.isAllSelected = false;
|
|
|
if (this.ydlx.length > 0) {
|
|
|
- const pBm = this.ydlx[0][0]
|
|
|
- const selected = ydlxDicts.filter(item => item.value === pBm);
|
|
|
- if (selected && selected.length > 0) {
|
|
|
- if (selected[0]['children'].length === this.ydlx.length) {
|
|
|
- this.isAllSelected = true;
|
|
|
+ const pBms = this.ydlx.filter(arr => arr[0] === 'Q');
|
|
|
+ const pBm = pBms[0][0] || ''
|
|
|
+ if (pBm !== 'Q') {
|
|
|
+ const selected = ydlxDicts.filter(item => item.value === pBm);
|
|
|
+ if (selected && selected.length > 0) {
|
|
|
+ if (selected[0]['children'].length === this.ydlx.length) {
|
|
|
+ this.isAllSelected = true;
|
|
|
+ }
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.isAllSelected = true;
|
|
|
+ this.isOther = true;
|
|
|
}
|
|
|
}
|
|
|
this.initHZ()
|
|
|
this.getTsxzListData();
|
|
|
- return;
|
|
|
let refreshP = "(sfygd is null or sfygd = '')"
|
|
|
if (this.query.xzqmc) {
|
|
|
refreshP += ` and ssjd = '${this.query.xzqmc}'`
|
|
@@ -344,16 +375,6 @@ export default {
|
|
|
if (this.query.type) {
|
|
|
refreshP += ` and ghdy = '${this.query.type}'`
|
|
|
}
|
|
|
- if (this.lx.length) {
|
|
|
- refreshP += ' and ('
|
|
|
- this.lx.forEach((it, index) => {
|
|
|
- if (index > 0) {
|
|
|
- refreshP += ' or '
|
|
|
- }
|
|
|
- refreshP += `zydxz like '${it}%'`
|
|
|
- })
|
|
|
- refreshP += ')'
|
|
|
- }
|
|
|
if (this.query.status === '是') {
|
|
|
refreshP += ` and sftb = '${this.query.status}'`
|
|
|
} else if (this.query.status === '否') {
|
|
@@ -375,6 +396,25 @@ export default {
|
|
|
if (this.query.name) {
|
|
|
refreshP += ` and dkbh = '${this.query.name}'`
|
|
|
}
|
|
|
+ const result = await this.queryWlydZydxzList();
|
|
|
+ const dataResult = result['data']
|
|
|
+ if (dataResult && dataResult.length > 0) {
|
|
|
+ let pstr = '';
|
|
|
+ dataResult.forEach((it,index) => {
|
|
|
+ pstr += "'"
|
|
|
+ pstr += it
|
|
|
+ if (index === dataResult.length - 1) {
|
|
|
+ pstr += "'";
|
|
|
+ } else {
|
|
|
+ pstr += "',"
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (this.isOther) {
|
|
|
+ refreshP += ` and zydxz not in (${pstr})`
|
|
|
+ } else {
|
|
|
+ refreshP += ` and zydxz in (${pstr})`
|
|
|
+ }
|
|
|
+ }
|
|
|
setTimeout(() => {
|
|
|
this.$vm.$emit("updateLayer", { id: "bj-wlyd", param: refreshP, layerIdx: 'ysybz:bjwlyd2000' })
|
|
|
this.$vm.$emit('change-layer')
|
|
@@ -384,8 +424,13 @@ export default {
|
|
|
const p = {
|
|
|
...this.query
|
|
|
}
|
|
|
- if (this.ydlx.length > 0) {
|
|
|
- p['dlbms'] = this.isAllSelected ? [this.ydlx[0][0]] : this.ydlx.map(arr => arr[1])
|
|
|
+ p['isOther'] = this.isOther
|
|
|
+ if (this.isOther) {
|
|
|
+ p['dlbms'] = ydlxDicts.map((item) => item['value']);
|
|
|
+ } else {
|
|
|
+ if (this.ydlx.length > 0) {
|
|
|
+ p['dlbms'] = this.isAllSelected ? [this.ydlx[0][0]] : this.ydlx.map(arr => arr[1])
|
|
|
+ }
|
|
|
}
|
|
|
const urlApi = `/api/ybz-bj/wlydTJ`;
|
|
|
this.$ajax.get(urlApi, p, this, false).then(result=>{
|