|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="900px" id="addEqDialog">
|
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="900px" id="addEqDialog">
|
|
<el-row class="filters">
|
|
<el-row class="filters">
|
|
- <el-col :span="7.5" style="width:276px">
|
|
|
|
|
|
+ <el-col :span="7" style="width:276px">
|
|
<el-input placeholder="输入设备名称或设备本地编码进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
|
|
<el-input placeholder="输入设备名称或设备本地编码进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
|
|
<i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
|
|
<i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
|
|
</el-input>
|
|
</el-input>
|
|
@@ -46,7 +46,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { unshaftInEq, linkEqSh } from "@/api/scan/request";
|
|
|
|
|
|
+import { sysLinkEquip, unSysEq} from "@/api/scan/request";
|
|
import floorCascader from "@/components/ledger/lib/floorCascader";
|
|
import floorCascader from "@/components/ledger/lib/floorCascader";
|
|
import myCascader from "@/components/ledger/system/lib/equipType";
|
|
import myCascader from "@/components/ledger/system/lib/equipType";
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
@@ -106,15 +106,16 @@ export default {
|
|
this.getTableData()
|
|
this.getTableData()
|
|
},
|
|
},
|
|
getTableData() {
|
|
getTableData() {
|
|
|
|
+
|
|
let params = {
|
|
let params = {
|
|
data: {
|
|
data: {
|
|
- Cascade: [{ Name: 'equipCategory' }, { Name: 'shaftList' }],
|
|
|
|
Filters: `not EquipID isNull`,
|
|
Filters: `not EquipID isNull`,
|
|
Orders: "createTime desc, EquipID desc",
|
|
Orders: "createTime desc, EquipID desc",
|
|
PageNumber: this.page.pageNumber,
|
|
PageNumber: this.page.pageNumber,
|
|
PageSize: this.page.pageSize,
|
|
PageSize: this.page.pageSize,
|
|
},
|
|
},
|
|
- shaftId: this.params.ShaftID
|
|
|
|
|
|
+ shaftId: this.params.ShaftID,
|
|
|
|
+ sysId:this.$route.query.SysID
|
|
}
|
|
}
|
|
if (this.Buildfloor[0] == "noKnow") {
|
|
if (this.Buildfloor[0] == "noKnow") {
|
|
params.data.Filters += `;buildingId isNull`
|
|
params.data.Filters += `;buildingId isNull`
|
|
@@ -132,7 +133,7 @@ export default {
|
|
if (this.Equipcategory) {
|
|
if (this.Equipcategory) {
|
|
params.data.Filters += `;category='${this.Equipcategory}'`
|
|
params.data.Filters += `;category='${this.Equipcategory}'`
|
|
}
|
|
}
|
|
- unshaftInEq(params, res => {
|
|
|
|
|
|
+ unSysEq(params, res => {
|
|
res.Content.forEach(item => {
|
|
res.Content.forEach(item => {
|
|
item.ShaftListName = ""
|
|
item.ShaftListName = ""
|
|
if (item.ShaftList && item.ShaftList.length) {
|
|
if (item.ShaftList && item.ShaftList.length) {
|
|
@@ -152,12 +153,12 @@ export default {
|
|
savaRelation() {
|
|
savaRelation() {
|
|
if (this.selections.length) {
|
|
if (this.selections.length) {
|
|
let params = {
|
|
let params = {
|
|
- ShaftId: this.params.ShaftID,
|
|
|
|
- EquipIdList: this.selections.map(item => {
|
|
|
|
|
|
+ SysId: this.$route.query.SysID,
|
|
|
|
+ ListEquipId: this.selections.map(item => {
|
|
return item.EquipID
|
|
return item.EquipID
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- linkEqSh(params, res => {
|
|
|
|
|
|
+ sysLinkEquip(params, res => {
|
|
this.dialogVisible = false
|
|
this.dialogVisible = false
|
|
this.$message.success('关联成功!')
|
|
this.$message.success('关联成功!')
|
|
this.$emit('refresh')
|
|
this.$emit('refresh')
|