|
@@ -13,13 +13,9 @@
|
|
|
<el-tab-pane v-for="(item) in typeList" :key="item.Name" :label="item.Name" :name="item.Name"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<!-- 数据字典设备类型 -->
|
|
|
- <el-form>
|
|
|
- <el-form-item label="数据字典设备类型">
|
|
|
- <el-select v-model="form.SubTypeName" multiple collapse-tags placeholder="全部" filterable>
|
|
|
- <el-option v-for="item in DynEquipList" :key="item" :label="item" :value="item"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <div>
|
|
|
+ <dictionary-device @change="changeDictionary" :Related="false"></dictionary-device>
|
|
|
+ </div>
|
|
|
<!-- 列表及查询条件区域 -->
|
|
|
<div class="table-container clearfix">
|
|
|
<div class="left-table">
|
|
@@ -34,15 +30,11 @@
|
|
|
</div>
|
|
|
<div class="query-item">
|
|
|
<label>数据源</label>
|
|
|
- <el-select v-model="form.Datasource" multiple collapse-tags placeholder="全部" filterable>
|
|
|
- <el-option v-for="item in sourceList" :key="item" :label="item" :value="item"></el-option>
|
|
|
- </el-select>
|
|
|
+ <dataSource :Related="false" @change="changeDataSource"></dataSource>
|
|
|
</div>
|
|
|
<div class="query-item">
|
|
|
<label>位置标签</label>
|
|
|
- <el-select v-model="form.LocationFlag" multiple collapse-tags placeholder="全部" filterable>
|
|
|
- <el-option v-for="item in LocFlagList" :key="item" :label="item" :value="item"></el-option>
|
|
|
- </el-select>
|
|
|
+ <locationFlag :Related="false" @change="changeLocationFlag"></locationFlag>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 左侧列表 -->
|
|
@@ -91,7 +83,7 @@
|
|
|
</div>
|
|
|
<div class="query-item">
|
|
|
<label>所在位置</label>
|
|
|
- <el-cascader placeholder="请选择所在位置" :options="LocationList" filterable change-on-select v-model="locationVal"></el-cascader>
|
|
|
+ <location-cas @change="changeLocation" :Related="false"></location-cas>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 右侧列表 -->
|
|
@@ -137,34 +129,41 @@
|
|
|
<script>
|
|
|
import tools from "@/utils/tools";
|
|
|
import historyDialog from "@/components/point/dynamicdata/historyDialog";
|
|
|
+import locationCas from "@/components/point/dynamicdata/locationCascader";
|
|
|
+import dictionaryDevice from "@/components/point/dynamicdata/dictionaryDevice";
|
|
|
+import dataSource from "@/components/point/dynamicdata/dataSource";
|
|
|
+import locationFlag from "@/components/point/dynamicdata/locationFlag";
|
|
|
import { mapGetters, mapActions } from "vuex";
|
|
|
import {
|
|
|
- dynamicDataSource,
|
|
|
- dynamicDynEquipList,
|
|
|
- dynamicLocationList,
|
|
|
dynamicPendingobjs,
|
|
|
dynamicPendingPoint,
|
|
|
dynamicCreateRelation,
|
|
|
dynamicDeleteRelation,
|
|
|
- dynamicLocFlagList,
|
|
|
dynamicPointTypeList
|
|
|
} from "@/api/scan/request";
|
|
|
export default {
|
|
|
components: {
|
|
|
- historyDialog
|
|
|
+ historyDialog,
|
|
|
+ locationCas,
|
|
|
+ dictionaryDevice,
|
|
|
+ dataSource,
|
|
|
+ locationFlag
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
isSwitch: true, //AI辅助
|
|
|
curType: "", //当前所在tab页
|
|
|
typeList: [], //tab页list
|
|
|
- sourceList: [], //数据源
|
|
|
- DynEquipList: [], //数据字典设备类型
|
|
|
- LocFlagList: [], //位置标签
|
|
|
- LocationList: [], //所在位置下拉
|
|
|
LtableData: [], //列表数据
|
|
|
RtableData: [], //列表数据
|
|
|
- form: {}, //查询条件
|
|
|
+ form: {
|
|
|
+ EquipmentMark: "", //设备标识关键字
|
|
|
+ SubTypeName: [], //数据字典设备类型
|
|
|
+ LocationFlag: [], //位置标签
|
|
|
+ Datasource: [], //数据源
|
|
|
+ EquipLocalName: "", //设备实例关键字
|
|
|
+ locationVal: [] //所在位置下拉
|
|
|
+ }, //查询条件
|
|
|
leftRecoList: [], //左推荐
|
|
|
rightRecoList: [], //右推荐
|
|
|
leftAI: true, //左右推荐公用-互斥
|
|
@@ -187,7 +186,6 @@ export default {
|
|
|
pageSize: 50,
|
|
|
total: 0
|
|
|
},
|
|
|
- locationVal: [],
|
|
|
options: [
|
|
|
{
|
|
|
value: "zhinan",
|
|
@@ -515,30 +513,6 @@ export default {
|
|
|
let param = { Related: false };
|
|
|
//对象类型
|
|
|
this.getTypeNames();
|
|
|
- //数据源
|
|
|
- dynamicDataSource(param, res => {
|
|
|
- if (res.Result == "success") {
|
|
|
- this.sourceList = res.Content;
|
|
|
- }
|
|
|
- });
|
|
|
- //数据字典
|
|
|
- dynamicDynEquipList(param, res => {
|
|
|
- if (res.Result == "success") {
|
|
|
- this.DynEquipList = res.Content;
|
|
|
- }
|
|
|
- });
|
|
|
- // 位置标签
|
|
|
- dynamicLocFlagList(param, res => {
|
|
|
- if (res.Result == "success") {
|
|
|
- this.LocFlagList = res.Content;
|
|
|
- }
|
|
|
- });
|
|
|
- //所在位置下拉
|
|
|
- dynamicLocationList(param, res => {
|
|
|
- if (res.Result == "success") {
|
|
|
- this.LocationList = res.Content;
|
|
|
- }
|
|
|
- });
|
|
|
},
|
|
|
//获取tab页
|
|
|
getTypeNames() {
|
|
@@ -644,14 +618,14 @@ export default {
|
|
|
if (this.form.SubTypeName.length) {
|
|
|
param.SubTypeName = this.form.SubTypeName.toString();
|
|
|
}
|
|
|
- // if (this.LocationList.length == 1) {
|
|
|
- // param.BuildLocalName = this.LocationList[0];
|
|
|
- // } else if (this.LocationList.length == 2) {
|
|
|
- // param.FloorLocalName = this.LocationList[1];
|
|
|
- // } else if (this.LocationList.length == 3) {
|
|
|
- // param.RoomLocalName = this.LocationList[2];
|
|
|
- // } else if (this.LocationList.length == 4) {
|
|
|
- // param.SpaceType = this.LocationList[3];
|
|
|
+ // if (this.locationVal.length == 1) {
|
|
|
+ // param.BuildLocalName = this.locationVal[0];
|
|
|
+ // } else if (this.locationVal.length == 2) {
|
|
|
+ // param.FloorLocalName = this.locationVal[1];
|
|
|
+ // } else if (this.locationVal.length == 3) {
|
|
|
+ // param.RoomLocalName = this.locationVal[2];
|
|
|
+ // } else if (this.locationVal.length == 4) {
|
|
|
+ // param.SpaceType = this.locationVal[3];
|
|
|
// }
|
|
|
this.rTableLoading = true;
|
|
|
dynamicPendingobjs(param, res => {
|
|
@@ -674,6 +648,27 @@ export default {
|
|
|
deleteSuc() {
|
|
|
this.num--;
|
|
|
this.refresh();
|
|
|
+ },
|
|
|
+ //所在位置修改
|
|
|
+ changeLocation(val) {
|
|
|
+ this.form.locationVal = val;
|
|
|
+ this.getRightData();
|
|
|
+ },
|
|
|
+ //数据字典设备类型修改
|
|
|
+ changeDictionary(val) {
|
|
|
+ this.form.SubTypeName = val;
|
|
|
+ this.getLeftData();
|
|
|
+ this.getRightData();
|
|
|
+ },
|
|
|
+ //数据源修改
|
|
|
+ changeDataSource(val) {
|
|
|
+ this.form.Datasource = val;
|
|
|
+ this.getLeftData();
|
|
|
+ },
|
|
|
+ //修改位置标签
|
|
|
+ changeLocationFlag(val) {
|
|
|
+ this.form.LocationFlag = val;
|
|
|
+ this.getLeftData();
|
|
|
}
|
|
|
},
|
|
|
watch: {
|