|
@@ -1,7 +1,7 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="inspectionCenter"> |
|
|
<view class="inspectionCenter"> |
|
|
<view class="searchBox"> |
|
|
<view class="searchBox"> |
|
|
<view class="searchLine" @click="openSearch"> |
|
|
|
|
|
|
|
|
<view class="searchLine" @click="showTree"> |
|
|
<!-- <view class="searchShow"> --> |
|
|
<!-- <view class="searchShow"> --> |
|
|
<view class="searchLabels"> |
|
|
<view class="searchLabels"> |
|
|
<image v-show="isShowSearch==false" src="@/static/image/earlyWarning/group.png" mode=""> |
|
|
<image v-show="isShowSearch==false" src="@/static/image/earlyWarning/group.png" mode=""> |
|
@@ -141,17 +141,20 @@ |
|
|
:options="[{value:1,label:'qinshi1'},{value:2,label:'qinshi2'}]" title="预警类型" search-place-holder="预警类型" /> |
|
|
:options="[{value:1,label:'qinshi1'},{value:2,label:'qinshi2'}]" title="预警类型" search-place-holder="预警类型" /> |
|
|
<selectRadio ref="selectRadioBox" :cellVisible="false" :value.sync="searchForm.warnHand" |
|
|
<selectRadio ref="selectRadioBox" :cellVisible="false" :value.sync="searchForm.warnHand" |
|
|
:options="[{value:1,label:'loudong1'},{value:2,label:'loudong2'}]" title="楼栋" /> |
|
|
:options="[{value:1,label:'loudong1'},{value:2,label:'loudong2'}]" title="楼栋" /> |
|
|
|
|
|
<tki-tree ref="tkitree" :selectParent="selectParent" :multiple="multiple" :range="treelist" :foldAll="flod" |
|
|
|
|
|
rangeKey="name" @confirm="treeConfirm" @cancel="treeCancel"></tki-tree> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import selectRadio from "@/components/selectRadio.vue" |
|
|
import selectRadio from "@/components/selectRadio.vue" |
|
|
import selectSearch from "@/components/selectSearch.vue" |
|
|
import selectSearch from "@/components/selectSearch.vue" |
|
|
|
|
|
import tkiTree from '@/components/tki-tree/tki-tree.vue'; |
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
selectRadio, |
|
|
selectRadio, |
|
|
selectSearch, |
|
|
selectSearch, |
|
|
|
|
|
|
|
|
|
|
|
tkiTree |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@@ -230,7 +233,22 @@ |
|
|
code: 13, |
|
|
code: 13, |
|
|
name: '你好' |
|
|
name: '你好' |
|
|
} |
|
|
} |
|
|
] |
|
|
|
|
|
|
|
|
], |
|
|
|
|
|
treelist: [ |
|
|
|
|
|
{ |
|
|
|
|
|
name: '111', |
|
|
|
|
|
value:'1', |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ |
|
|
|
|
|
name: '111', |
|
|
|
|
|
value:'2', |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
multiple: false, //是否多选 |
|
|
|
|
|
selectParent: true, //父级可选择 |
|
|
|
|
|
flod: false, //折叠 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
watch: { |
|
@@ -266,6 +284,29 @@ |
|
|
this.loadmore() |
|
|
this.loadmore() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
addAttribute(data) { // tree结构递归添加属性 |
|
|
|
|
|
for (var i = 0; i < data.length; i++) { |
|
|
|
|
|
data[i].isShow = false |
|
|
|
|
|
data[i].name = data[i].title |
|
|
|
|
|
if (data[i].children && data[i].children.length > 0) { |
|
|
|
|
|
this.addAttribute(data[i].children) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return data |
|
|
|
|
|
}, |
|
|
|
|
|
// 确定回调事件 |
|
|
|
|
|
treeConfirm(e) { |
|
|
|
|
|
// this.form.groupName = e[0].name |
|
|
|
|
|
// this.form.groupId = e[0].id |
|
|
|
|
|
}, |
|
|
|
|
|
// 取消回调事件 |
|
|
|
|
|
treeCancel(e) { |
|
|
|
|
|
// console.log(e) |
|
|
|
|
|
}, |
|
|
|
|
|
// 显示树形选择器 |
|
|
|
|
|
showTree() { |
|
|
|
|
|
this.$refs.tkitree._show(); |
|
|
|
|
|
}, |
|
|
cancelDelete() { |
|
|
cancelDelete() { |
|
|
this.showDelete = false; |
|
|
this.showDelete = false; |
|
|
}, |
|
|
}, |
|
|