|
@@ -1,9 +1,36 @@
|
|
|
<template>
|
|
|
<div class='tableZh'>
|
|
|
<div class='tab-top'>
|
|
|
- <Select width='146' tipPlace='top' caption='状态' size='small' style='margin-right:12px' :selectdata='dataSelect2' :placeholder='"请选择"'></Select>
|
|
|
- <Select width='146' tipPlace='top' caption='部门' size='small' style='margin-right:12px' :selectdata='dataSelect2' :placeholder='"请选择"'></Select>
|
|
|
- <Select width='180' tipPlace='top' caption='检测结论' size='small' style='margin-right:12px' :selectdata='dataSelect2' :placeholder='"请选择"'></Select>
|
|
|
+ <Select
|
|
|
+ width='146'
|
|
|
+ tipPlace='top'
|
|
|
+ caption='状态'
|
|
|
+ size='small'
|
|
|
+ style='margin-right:12px'
|
|
|
+ v-if='status2.length>0'
|
|
|
+ :selectdata='status2'
|
|
|
+ :placeholder='"请选择"'
|
|
|
+ ></Select>
|
|
|
+ <Select
|
|
|
+ width='146'
|
|
|
+ tipPlace='top'
|
|
|
+ caption='部门'
|
|
|
+ v-if='zgbm.length>0'
|
|
|
+ size='small'
|
|
|
+ style='margin-right:12px'
|
|
|
+ :selectdata='zgbm'
|
|
|
+ :placeholder='"请选择"'
|
|
|
+ ></Select>
|
|
|
+ <Select
|
|
|
+ width='180'
|
|
|
+ tipPlace='top'
|
|
|
+ caption='检测结论'
|
|
|
+ size='small'
|
|
|
+ style='margin-right:12px'
|
|
|
+ v-if='conclusion.length>0'
|
|
|
+ :selectdata='conclusion'
|
|
|
+ :placeholder='"请选择"'
|
|
|
+ ></Select>
|
|
|
<el-input placeholder='请按照任务名称搜索' size='small' prefix-icon='el-icon-search' v-model='searVal' style='width:200px'></el-input>
|
|
|
</div>
|
|
|
<el-table
|
|
@@ -44,6 +71,7 @@
|
|
|
<script>
|
|
|
import Select from '@/components/Select/Select.vue'
|
|
|
import { queryDsfrw } from '@/api/other.js'
|
|
|
+import { querySelect } from '@/api/public.js'
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -59,7 +87,10 @@ export default {
|
|
|
dsfTable: [],
|
|
|
total: 0,
|
|
|
page: 1,
|
|
|
- size: 10
|
|
|
+ size: 10,
|
|
|
+ status2: [],
|
|
|
+ zgbm: [],
|
|
|
+ conclusion: []
|
|
|
}
|
|
|
},
|
|
|
components: { Select },
|
|
@@ -75,7 +106,7 @@ export default {
|
|
|
if (res.result == 'success') {
|
|
|
this.loading = false
|
|
|
this.total = res.count
|
|
|
- this.dsfTable = res.data
|
|
|
+ this.dsfTable = res.data ? res.data : []
|
|
|
}
|
|
|
console.log('第三方', res)
|
|
|
})
|
|
@@ -83,7 +114,58 @@ export default {
|
|
|
pageChanged(page) {
|
|
|
this.page = page
|
|
|
this.dsfjc()
|
|
|
+ },
|
|
|
+ changeSelect() {
|
|
|
+ this.department = []
|
|
|
+ let postParams = [
|
|
|
+ {
|
|
|
+ columnName: { status2: 'status2', zgbm: 'zgbm', conclusion: 'conclusion' },
|
|
|
+ tableName: 'v_glsms_dsfrw'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ let data = {
|
|
|
+ plazaId: this.$store.state.plazaId
|
|
|
+ }
|
|
|
+ querySelect({ data, postParams }).then(res => {
|
|
|
+ console.log('下拉框', res)
|
|
|
+ let status2 = [],
|
|
|
+ zgbm = [],
|
|
|
+ conclusion = []
|
|
|
+ status2 = res.data.data.v_glsms_dsfrw.status2 ? res.data.data.v_glsms_dsfrw.status2 : []
|
|
|
+ zgbm = res.data.data.v_glsms_dsfrw.zgbm ? res.data.data.v_glsms_dsfrw.zgbm : []
|
|
|
+ conclusion = res.data.data.v_glsms_dsfrw.conclusion ? res.data.data.v_glsms_dsfrw.conclusion : []
|
|
|
+ if (status2.length > 0) {
|
|
|
+ status2.forEach(el => {
|
|
|
+ let obj = {
|
|
|
+ id: el.key,
|
|
|
+ name: el.value
|
|
|
+ }
|
|
|
+ this.status2.push(obj)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (zgbm.length > 0) {
|
|
|
+ zgbm.forEach(el => {
|
|
|
+ let obj = {
|
|
|
+ id: el.key,
|
|
|
+ name: el.value
|
|
|
+ }
|
|
|
+ this.zgbm.push(obj)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (conclusion.length > 0) {
|
|
|
+ conclusion.forEach(el => {
|
|
|
+ let obj = {
|
|
|
+ id: el.key,
|
|
|
+ name: el.value
|
|
|
+ }
|
|
|
+ this.conclusion.push(obj)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.changeSelect()
|
|
|
}
|
|
|
}
|
|
|
</script>
|