|
@@ -1,15 +1,25 @@
|
|
<template>
|
|
<template>
|
|
<div class="content-container goaf">
|
|
<div class="content-container goaf">
|
|
<el-row class="tool-bar">
|
|
<el-row class="tool-bar">
|
|
- <el-col :span="12" class="left">
|
|
|
|
|
|
+ <el-col :span="3" class="left">
|
|
<div class="content-title">
|
|
<div class="content-title">
|
|
采空区
|
|
采空区
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="12" class="right">
|
|
|
|
- <el-input v-model="conditions.data.goafName" class="search-input m-right-15" placeholder="请输入采空区名称">
|
|
|
|
- <el-button slot="append" icon="el-icon-search" @click="getData()" />
|
|
|
|
- </el-input>
|
|
|
|
|
|
+ <el-col :span="21" class="right">
|
|
|
|
+ <el-select v-model="conditions.goafOrebelt" class="search-input m-right-15" filterable placeholder="矿带" clearable @change="changeArea(1)">
|
|
|
|
+ <el-option v-for="(item,index) in goafOrebelts" :key="index" :value="item" :label="item" />
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-select v-model="conditions.goafOrebody" class="search-input m-right-15" filterable placeholder="矿体" clearable @change="changeArea(2)">
|
|
|
|
+ <el-option v-for="(item,index) in goafOrebodys" :key="index" :value="item.goafOrebody" :label="item.goafOrebody" />
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-select v-model="conditions.goafOreheight" class="search-input m-right-15" filterable placeholder="中段" clearable @change="changeArea(3)">
|
|
|
|
+ <el-option v-for="(item,index) in goafOreheights" :key="index" :value="item.goafOreheight" :label="item.goafOreheight" />
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-select v-model="conditions.goafId" class="search-input m-right-15" filterable placeholder="采空区编号" clearable @change="changeArea(4)">
|
|
|
|
+ <el-option v-for="item in goafNames" :key="item.goafId" :value="item.goafId" :label="item.goafName" />
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-button type="primary" style="margin-right: 10px;" @click="getData">查询</el-button>
|
|
<el-button type="primary" @click="batchDown">批量下载二维码</el-button>
|
|
<el-button type="primary" @click="batchDown">批量下载二维码</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -59,7 +69,7 @@ import html2canvas from 'html2canvas'
|
|
import JSZip from 'jszip'
|
|
import JSZip from 'jszip'
|
|
import saveAs from 'file-saver'
|
|
import saveAs from 'file-saver'
|
|
import QRCode from 'qrcodejs2'
|
|
import QRCode from 'qrcodejs2'
|
|
-import { getGoafBaseInfoByPage, delGoaf } from '@/api/goaf/info'
|
|
|
|
|
|
+import { getGoafBaseInfoByPage, delGoaf, getGoafBaseInfo } from '@/api/goaf/info'
|
|
import { Pagination } from '@/components'
|
|
import { Pagination } from '@/components'
|
|
import { NumConvertLM } from '@/utils'
|
|
import { NumConvertLM } from '@/utils'
|
|
import { QrCode } from '@/components'
|
|
import { QrCode } from '@/components'
|
|
@@ -73,17 +83,28 @@ export default {
|
|
dataList: [],
|
|
dataList: [],
|
|
total: 0,
|
|
total: 0,
|
|
listLoading: false,
|
|
listLoading: false,
|
|
|
|
+ goafList: [],
|
|
|
|
+ goafOrebelts: [],
|
|
|
|
+ goafOrebodys: [],
|
|
|
|
+ goafOreheights: [],
|
|
|
|
+ goafNames: [],
|
|
conditions: {
|
|
conditions: {
|
|
page: 1,
|
|
page: 1,
|
|
limit: 10,
|
|
limit: 10,
|
|
- data: {
|
|
|
|
- goafName: ''
|
|
|
|
- }
|
|
|
|
|
|
+ goafId: '',
|
|
|
|
+ goafOrebelt: '',
|
|
|
|
+ goafOrebody: '',
|
|
|
|
+ goafOreheight: ''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getData()
|
|
this.getData()
|
|
|
|
+ getGoafBaseInfo().then((res) => {
|
|
|
|
+ const goafOrebelts = res.data.map(item => item.goafOrebelt)
|
|
|
|
+ this.goafOrebelts = [...new Set(goafOrebelts)]
|
|
|
|
+ this.goafList = res.data
|
|
|
|
+ })
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
convertNum(num) {
|
|
convertNum(num) {
|
|
@@ -91,6 +112,10 @@ export default {
|
|
},
|
|
},
|
|
getData() {
|
|
getData() {
|
|
this.listLoading = true
|
|
this.listLoading = true
|
|
|
|
+ if (this.conditions.goafOrebelt === '') delete this.conditions.goafOrebelt
|
|
|
|
+ if (this.conditions.goafOrebody === '') delete this.conditions.goafOrebody
|
|
|
|
+ if (this.conditions.goafOreheight === '') delete this.conditions.goafOreheight
|
|
|
|
+ if (this.conditions.goafName === '') delete this.conditions.goafName
|
|
getGoafBaseInfoByPage(this.conditions).then((resp) => {
|
|
getGoafBaseInfoByPage(this.conditions).then((resp) => {
|
|
this.listLoading = false
|
|
this.listLoading = false
|
|
const { code, msg, data, total } = resp
|
|
const { code, msg, data, total } = resp
|
|
@@ -102,7 +127,38 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ changeArea(type) {
|
|
|
|
+ const goafs = this.deeepClone(this.goafList)
|
|
|
|
+ let goafOrebodys = this.deeepClone(this.goafOrebodys)
|
|
|
|
+ let goafOreheights = this.deeepClone(this.goafOreheights)
|
|
|
|
+ let goafNames = this.deeepClone(this.goafNames)
|
|
|
|
+ if (type === 1) {
|
|
|
|
+ goafOrebodys = goafs.filter(item => item.goafOrebelt === this.conditions.goafOrebelt)
|
|
|
|
+ this.goafOrebodys = goafOrebodys
|
|
|
|
+ this.goafOreheights = []
|
|
|
|
+ this.goafNames = []
|
|
|
|
+ this.conditions.goafOrebody = ''
|
|
|
|
+ this.conditions.goafOreheight = ''
|
|
|
|
+ this.conditions.goafName = ''
|
|
|
|
+ } else if (type === 2) {
|
|
|
|
+ goafOreheights = goafs.filter(item => (item.goafOrebody === this.conditions.goafOrebody) && (item.goafOrebelt === this.conditions.goafOrebelt))
|
|
|
|
+ this.goafOreheights = goafOreheights
|
|
|
|
+ this.goafNames = []
|
|
|
|
+ this.conditions.goafOreheight = ''
|
|
|
|
+ this.conditions.goafName = ''
|
|
|
|
+ } else if (type === 3) {
|
|
|
|
+ goafNames = goafs.filter(item => (item.goafOreheight === this.conditions.goafOreheight) && (item.goafOrebody === this.conditions.goafOrebody) && (item.goafOrebelt === this.conditions.goafOrebelt))
|
|
|
|
+ this.goafNames = goafNames
|
|
|
|
+ this.conditions.goafName = ''
|
|
|
|
+ } else {
|
|
|
|
+ for (let i = 0; i < goafNames.length; i++) {
|
|
|
|
+ if (this.conditions.goafId === goafNames[i].goafId) {
|
|
|
|
+ this.conditions.goafName = goafNames[i].goafName
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ },
|
|
showQrcode(row) {
|
|
showQrcode(row) {
|
|
this.$refs.qrcode.draw(row.goafQrCode)
|
|
this.$refs.qrcode.draw(row.goafQrCode)
|
|
},
|
|
},
|
|
@@ -202,6 +258,9 @@ export default {
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
this.$message.info('已取消删除')
|
|
this.$message.info('已取消删除')
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ deeepClone(params) {
|
|
|
|
+ return JSON.parse(JSON.stringify(params))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -243,7 +302,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
.search-input {
|
|
.search-input {
|
|
- width: 300px;
|
|
|
|
|
|
+ width: 200px !important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|