|
|
@@ -6,12 +6,53 @@
|
|
|
<org-tree v-model="search.orgId" @changeItem="changeTree" @checked="orgCheckChanged" showChecked></org-tree>
|
|
|
</van-col>
|
|
|
</van-row>
|
|
|
+ <van-row>
|
|
|
+ <van-col span="10">
|
|
|
+ <!-- <van-field
|
|
|
+ v-model="fieldValue"
|
|
|
+ label-width="3em"
|
|
|
+ clearable
|
|
|
+ :disabled="showStatus"
|
|
|
+ label="状态"
|
|
|
+ placeholder=""
|
|
|
+ @click="showStatus = true"
|
|
|
+ ><van-icon name="arrow-down" slot="button"
|
|
|
+ /></van-field> -->
|
|
|
+ <van-cell title="状态" @click="showStatus = true" is-link arrow-direction="down" :value="defaultStatus" />
|
|
|
+
|
|
|
+ <van-popup v-model="showStatus" round position="bottom">
|
|
|
+ <van-picker
|
|
|
+ title="状态"
|
|
|
+ show-toolbar
|
|
|
+ :columns="statusOptions"
|
|
|
+ @confirm="onStatusConfirm"
|
|
|
+ @cancel="onCancel"
|
|
|
+ default-index="0"
|
|
|
+ :close-on-click-overlay="false"
|
|
|
+ />
|
|
|
+ </van-popup>
|
|
|
+ </van-col>
|
|
|
+ <van-col span="14">
|
|
|
+ <van-cell title="上报时间" @click="showHour = true" is-link arrow-direction="down" :value="defaultHour"/>
|
|
|
+
|
|
|
+ <van-popup v-model="showHour" round position="bottom">
|
|
|
+ <van-picker
|
|
|
+ title="上报时间"
|
|
|
+ show-toolbar
|
|
|
+ :columns="hourOptions.map(o => o.text)"
|
|
|
+ @confirm="onTimeConfirm"
|
|
|
+ @cancel="onCancel"
|
|
|
+ :close-on-click-overlay="false"
|
|
|
+ />
|
|
|
+ </van-popup>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
<!-- <van-search v-model="search.key" placeholder="请输入搜索关键词" maxlength="50" /> -->
|
|
|
- <van-dropdown-menu>
|
|
|
- <!-- <van-dropdown-item :title="selectedOrgName" @open="onItemClick" /> -->
|
|
|
- <van-dropdown-item v-model="search.status" :options="statusOptions" />
|
|
|
+ <!-- <van-dropdown-menu> -->
|
|
|
+ <!-- <van-dropdown-item :title="selectedOrgName" @open="onItemClick" /> -->
|
|
|
+ <!-- <van-dropdown-item v-model="search.status" :options="statusOptions" />
|
|
|
<van-dropdown-item v-model="search.hour" :options="hourOptions" />
|
|
|
- </van-dropdown-menu>
|
|
|
+ </van-dropdown-menu> -->
|
|
|
<!-- <div>
|
|
|
<van-picker show-toolbar title="选择" :columns="statusOptions"/>
|
|
|
</div> -->
|
|
|
@@ -39,13 +80,13 @@ import KList from '@/components/list/index.vue'
|
|
|
import Item from './components/item.vue'
|
|
|
import OrgTree from '@/components/orgTree'
|
|
|
export default {
|
|
|
- components: { NavBar, KList, Item ,OrgTree},
|
|
|
+ components: { NavBar, KList, Item, OrgTree },
|
|
|
data() {
|
|
|
return {
|
|
|
options: [],
|
|
|
search: {
|
|
|
orgId: this.orgId,
|
|
|
- checkSub:false,
|
|
|
+ checkSub: false,
|
|
|
status: null,
|
|
|
hour: null,
|
|
|
key: null,
|
|
|
@@ -53,11 +94,14 @@ export default {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10
|
|
|
},
|
|
|
- showOrg: false,
|
|
|
+ // showOrg: false,
|
|
|
selectedOrgName: null,
|
|
|
-
|
|
|
+ showStatus: false,
|
|
|
+ showHour: false,
|
|
|
+ defaultStatus: '全部',
|
|
|
+ defaultHour: '全部',
|
|
|
hourOptions: [
|
|
|
- { value: null, text: '上报时间' },
|
|
|
+ { value: null, text: '全部' },
|
|
|
{ value: 1, text: '1小时内' },
|
|
|
{ value: 2, text: '2小时内' },
|
|
|
{ value: 3, text: '3小时内' },
|
|
|
@@ -73,12 +117,12 @@ export default {
|
|
|
// text: ''
|
|
|
// }
|
|
|
// ],
|
|
|
- fieldNames: {
|
|
|
- text: 'shortName',
|
|
|
- value: 'id',
|
|
|
- children: 'children'
|
|
|
- },
|
|
|
- dicts: ["protection_status"]
|
|
|
+ // fieldNames: {
|
|
|
+ // text: 'shortName',
|
|
|
+ // value: 'id',
|
|
|
+ // children: 'children'
|
|
|
+ // },
|
|
|
+ dicts: ['protection_status']
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -95,7 +139,7 @@ export default {
|
|
|
// }
|
|
|
// }
|
|
|
},
|
|
|
- created() { },
|
|
|
+ created() {},
|
|
|
mounted() {
|
|
|
this.getTreeList()
|
|
|
this.search.orgId = this.orgId
|
|
|
@@ -106,18 +150,26 @@ export default {
|
|
|
computed: {
|
|
|
...mapGetters(['orgName', 'orgId', 'dictionary']),
|
|
|
statusOptions() {
|
|
|
- let r = [
|
|
|
- { value: null, text: '布撤防状态' }
|
|
|
- ]
|
|
|
-
|
|
|
- let dict = this.getDictItem('protection_status');
|
|
|
+ let r = ['全部']
|
|
|
+ let dict = this.getDictItem('protection_status')
|
|
|
if (dict) {
|
|
|
dict.forEach(element => {
|
|
|
- r.push({ value: element.dictValue, text: element.dictLabel })
|
|
|
- });
|
|
|
+ r.push(element.dictLabel)
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
- return r;
|
|
|
+ // let r = [
|
|
|
+ // { value: null, text: '所有布撤防状态' }
|
|
|
+ // ]
|
|
|
+
|
|
|
+ // let dict = this.getDictItem('protection_status');
|
|
|
+ // if (dict) {
|
|
|
+ // dict.forEach(element => {
|
|
|
+ // r.push({ value: element.dictValue, text: element.dictLabel })
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+
|
|
|
+ return r
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -131,8 +183,30 @@ export default {
|
|
|
// console.log(res,'3333')
|
|
|
})
|
|
|
},
|
|
|
- onItemClick() {
|
|
|
- this.showOrg = true
|
|
|
+ onStatusConfirm(text) {
|
|
|
+ let dict = this.getDictItem('protection_status')
|
|
|
+ for (let item of dict) {
|
|
|
+ if (item.dictLabel === text) {
|
|
|
+ this.search.status = item.dictValue
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.showStatus=false;
|
|
|
+ },
|
|
|
+
|
|
|
+ onTimeConfirm(text) {
|
|
|
+ for (let item of this.hourOptions) {
|
|
|
+ if (item.text === text) {
|
|
|
+ this.search.hour = item.value
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.showHour=false;
|
|
|
+ },
|
|
|
+ // onItemClick() {
|
|
|
+ // this.showOrg = true
|
|
|
+ // },
|
|
|
+ onCancel() {
|
|
|
+ this.showHour = false
|
|
|
+ this.showStatus = false
|
|
|
},
|
|
|
//改变机构后将重新发起请求
|
|
|
changeTree(node) {
|
|
|
@@ -142,11 +216,11 @@ export default {
|
|
|
this.search.orgId = node.id
|
|
|
this.selectedOrgName = node.shortName
|
|
|
},
|
|
|
- orgCheckChanged(v){
|
|
|
- this.search.checkSub=v;
|
|
|
+ orgCheckChanged(v) {
|
|
|
+ this.search.checkSub = v
|
|
|
},
|
|
|
onFinish({ selectedOptions }) {
|
|
|
- this.showOrg = false
|
|
|
+ // this.showOrg = false
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -158,7 +232,6 @@ export default {
|
|
|
display: block;
|
|
|
|
|
|
.container {
|
|
|
-
|
|
|
// overflow: auto;
|
|
|
// height: calc(100vh - 11rem);
|
|
|
.k-content-repair {
|