|
@@ -42,6 +42,20 @@
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="设备类型">
|
|
|
+ <a-tree-select
|
|
|
+ style="width: 100%"
|
|
|
+ :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
+ :treeData="treeData"
|
|
|
+ :treeNodeFilterProp="'title'"
|
|
|
+ :showSearch="true"
|
|
|
+ v-model="queryParam.typeId"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ </a-tree-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
<a-col :md="8 || 24" :sm="24">
|
|
|
<span class="table-page-search-submitButtons">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
|
@@ -88,6 +102,7 @@
|
|
|
import { STable, Ellipsis } from '@/components'
|
|
|
import { getSbInfoPage, fetchSbInfo, getSbInfoTree } from '@/api/sb/info'
|
|
|
import { querySbPosition } from '@/api/sb/position'
|
|
|
+import { fetchSbTypeTree } from '@/api/sb/type'
|
|
|
|
|
|
export default {
|
|
|
name: 'SbInfoSelectModal',
|
|
@@ -234,10 +249,13 @@ export default {
|
|
|
querySbPosition().then(res => {
|
|
|
this.sbPositionData = res.data
|
|
|
})
|
|
|
+ fetchSbTypeTree().then(res => {
|
|
|
+ this.treeData = res.data
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
tableOption () {
|
|
|
- this.setTree()
|
|
|
+ //this.setTree()
|
|
|
if (!this.optionAlertShow) {
|
|
|
this.options = {
|
|
|
alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
|
|
@@ -277,7 +295,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleOk () {
|
|
|
- this.setTree()
|
|
|
+ //this.setTree()
|
|
|
this.$refs.table.refresh()
|
|
|
},
|
|
|
onSelectChange (selectedRowKeys, selectedRows) {
|
|
@@ -292,11 +310,6 @@ export default {
|
|
|
/**
|
|
|
* 设置设备类型树
|
|
|
*/
|
|
|
- setTree (record = {}) {
|
|
|
- getSbInfoTree({ id: record.id }).then(res => {
|
|
|
- this.treeData = res.data
|
|
|
- })
|
|
|
- },
|
|
|
base (record, queryParam = {}) {
|
|
|
this.visible = true
|
|
|
this.modalTitle = '选择设备'
|