|
|
@@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<view class="inspectionCenter"> |
|
|
|
<view class="searchBox"> |
|
|
|
<view class="searchLine" @click="openSearch"> |
|
|
|
<view class="searchLine" @click="showTree"> |
|
|
|
<!-- <view class="searchShow"> --> |
|
|
|
<view class="searchLabels"> |
|
|
|
<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="预警类型" /> |
|
|
|
<selectRadio ref="selectRadioBox" :cellVisible="false" :value.sync="searchForm.warnHand" |
|
|
|
: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> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import selectRadio from "@/components/selectRadio.vue" |
|
|
|
import selectSearch from "@/components/selectSearch.vue" |
|
|
|
import tkiTree from '@/components/tki-tree/tki-tree.vue'; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
selectRadio, |
|
|
|
selectSearch, |
|
|
|
|
|
|
|
tkiTree |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
@@ -230,7 +233,22 @@ |
|
|
|
code: 13, |
|
|
|
name: '你好' |
|
|
|
} |
|
|
|
] |
|
|
|
], |
|
|
|
treelist: [ |
|
|
|
{ |
|
|
|
name: '111', |
|
|
|
value:'1', |
|
|
|
children: [ |
|
|
|
{ |
|
|
|
name: '111', |
|
|
|
value:'2', |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
], |
|
|
|
multiple: false, //是否多选 |
|
|
|
selectParent: true, //父级可选择 |
|
|
|
flod: false, //折叠 |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
@@ -266,6 +284,29 @@ |
|
|
|
this.loadmore() |
|
|
|
}, |
|
|
|
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() { |
|
|
|
this.showDelete = false; |
|
|
|
}, |
|
|
|