|
@@ -6,14 +6,8 @@
|
|
|
<div>
|
|
|
<div id="changeRea">
|
|
|
<div class="title-search" style="margin-bottom: 10px;">
|
|
|
- <el-input
|
|
|
- placeholder="输入名称查询"
|
|
|
- v-model="search"
|
|
|
- size="small"
|
|
|
- style="width:300px;"
|
|
|
- clearable
|
|
|
- ></el-input>
|
|
|
- <el-button @click="getData" size="small">查找</el-button>
|
|
|
+ <el-input placeholder="输入名称或编码查询" v-model="search" size="small" style="width:300px;" clearable></el-input>
|
|
|
+ <el-button @click="getPropertyData" size="small">查找</el-button>
|
|
|
</div>
|
|
|
<div>
|
|
|
<floor-cascader @change="changeFloor"></floor-cascader>
|
|
@@ -22,47 +16,39 @@
|
|
|
<el-table :data="tableData" style="width: 100%" height="300px">
|
|
|
<el-table-column label="资产名称">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-radio
|
|
|
- v-model="radio"
|
|
|
- :label="scope.row.id"
|
|
|
- >{{scope.row.infos.EquipLocalName || scope.row.infos.EquipName}}</el-radio>
|
|
|
+ <el-radio :label="scope.row.EquipID">{{scope.row.EquipLocalName || scope.row.EquipName}}</el-radio>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="本地编码">
|
|
|
- <template
|
|
|
- slot-scope="scope"
|
|
|
- >{{scope.row.infos.EquipLocalID || scope.row.infos.EquipID}}</template>
|
|
|
+ <template slot-scope="scope">{{scope.row.EquipLocalID || scope.row.EquipID}}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="所在楼层">
|
|
|
- <template slot-scope="scope">{{getFloor(scope.row.relation)}}</template>
|
|
|
+ <template slot-scope="scope">{{getFloor(scope.row.FloorId)}}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="设备族">
|
|
|
- <template slot-scope="scope">{{getFramily(scope.row.family)}}</template>
|
|
|
+ <span>{{this.category.assetName}}</span>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="安装位置">
|
|
|
- <template slot-scope="scope">{{scope.row.infos.InstallLocation || "--"}}</template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.LedgerParam.Siteinstall?scope.row.LedgerParam.Siteinstall.InstallLocation:"--"}}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-radio-group>
|
|
|
<my-pagination :page="page" @change="changed" style="margin-top:10px;"></my-pagination>
|
|
|
<div class="footer">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="clickTrue"
|
|
|
- style="display:block;margin: 10px auto 0;"
|
|
|
- >确 定</el-button>
|
|
|
+ <el-button type="primary" @click="clickTrue" style="display:block;margin: 10px auto 0;">确 定</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <param-details :isLoad="isLoad" :data="data"></param-details>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
<script>
|
|
|
import myPagination from "@/components/ledger/lib/myPagination";
|
|
|
import paramDetails from "@/components/dialogs/list/paramDetails"
|
|
|
-import { getBillPropList, getEquipmentFamily, getSpaceFloor, getBussines2, upDateTableMain } from "@/api/scan/request"
|
|
|
+import { getBillPropList, getEquipmentFamily, getSpaceFloor, getBussines2, upDateTableMain, queryProperty } from "@/api/scan/request"
|
|
|
import floorCascader from "@/components/ledger/lib/floorCascader";
|
|
|
-import {mapGetters, mapActions} from "vuex"
|
|
|
+import { mapGetters, mapActions } from "vuex"
|
|
|
export default {
|
|
|
components: {
|
|
|
myPagination,
|
|
@@ -89,12 +75,7 @@ export default {
|
|
|
return {
|
|
|
search: "", //搜索文案
|
|
|
radio: "",
|
|
|
- tableData: [
|
|
|
- ],
|
|
|
- data: {},
|
|
|
- isLoad: {
|
|
|
- paramShow: false
|
|
|
- },
|
|
|
+ tableData: [],
|
|
|
page: {
|
|
|
size: 50,
|
|
|
sizes: [10, 30, 50, 100, 150, 200],
|
|
@@ -107,17 +88,14 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.getCode()
|
|
|
+ this.getFloorList();
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters("layout", [
|
|
|
- "projectId",
|
|
|
- "secret",
|
|
|
- "userId"
|
|
|
- ])
|
|
|
+ ...mapGetters("layout", ["projectId", "secret", "userId"])
|
|
|
},
|
|
|
mounted() { },
|
|
|
methods: {
|
|
|
+ //根据楼层id对应楼层
|
|
|
getFloor(relation) {
|
|
|
let floor = !!relation ? relation.floor || "" : ""
|
|
|
if (!!floor) {
|
|
@@ -137,45 +115,16 @@ export default {
|
|
|
return "--"
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ //确认选择
|
|
|
clickTrue() {
|
|
|
- if (!!this.radio) {
|
|
|
- let param = {
|
|
|
- UserId: this.userId,
|
|
|
- ProjId: this.projectId
|
|
|
- }
|
|
|
- let paramList = [{
|
|
|
- EquipmentId: this.category.id,
|
|
|
- FmId: this.radio
|
|
|
- }]
|
|
|
- console.log(param, paramList)
|
|
|
- upDateTableMain(param, paramList).then(res => {
|
|
|
- this.$emit("close")
|
|
|
- this.dialog.changeRea = false
|
|
|
- })
|
|
|
- // upDateTableMain(param, res => {
|
|
|
- // })
|
|
|
+ if (this.radio) {
|
|
|
+ this.$emit('changeProperty', this.radio);
|
|
|
+ this.dialog.changeRea = false;
|
|
|
} else {
|
|
|
this.$message("请先选择资产")
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
- getFramily(code) {
|
|
|
- console.log(code)
|
|
|
- let name = ""
|
|
|
- this.codeListCode.map(item => {
|
|
|
- if (item.code == code) {
|
|
|
- name = item.name
|
|
|
- }
|
|
|
- })
|
|
|
- return name || "--"
|
|
|
- },
|
|
|
- getCode() {
|
|
|
- getEquipmentFamily(res => {
|
|
|
- this.codeListCode = res.Content
|
|
|
- this.getFloorList()
|
|
|
- })
|
|
|
- },
|
|
|
+ //查询条件-所在建筑楼层
|
|
|
getFloorList() {
|
|
|
let param = {
|
|
|
secret: this.secret,
|
|
@@ -191,114 +140,55 @@ export default {
|
|
|
this.$message.error("请求错误")
|
|
|
})
|
|
|
},
|
|
|
+ //所在建筑楼层修改
|
|
|
changeFloor(val) {
|
|
|
this.mess = {
|
|
|
buildId: val[0] || "",
|
|
|
floorId: val[1] || ""
|
|
|
}
|
|
|
- this.getData()
|
|
|
- console.log(val)
|
|
|
+ this.getPropertyData()
|
|
|
},
|
|
|
+ //分页修改
|
|
|
changed() {
|
|
|
- this.getData()
|
|
|
- },
|
|
|
- //查询技术参数
|
|
|
- lookParam(data) {
|
|
|
- this.data = data
|
|
|
- this.isLoad.paramShow = true
|
|
|
- },
|
|
|
- getChange() {
|
|
|
- if (!!this.radio) {
|
|
|
- this.$emit("changechangeRea", this.radio)
|
|
|
- this.dialog.changeRea = false
|
|
|
- } else {
|
|
|
- this.$message("请选择型号")
|
|
|
- }
|
|
|
- },
|
|
|
- searchKey() {
|
|
|
- this.changePage()
|
|
|
+ this.getPropertyData()
|
|
|
},
|
|
|
+ //弹窗显示时
|
|
|
changePage() {
|
|
|
this.page = {
|
|
|
size: 50,
|
|
|
- sizes: [10, 30, 50, 100, 150, 200],
|
|
|
+ sizes: [10, 30, 50, 100],
|
|
|
total: 0,
|
|
|
currentPage: 1
|
|
|
}
|
|
|
- this.getData()
|
|
|
+ this.getPropertyData()
|
|
|
},
|
|
|
- getData() {
|
|
|
- // let param = {
|
|
|
- // data: {
|
|
|
- // filter: {
|
|
|
- // EquipLocalName: this.search
|
|
|
- // },
|
|
|
- // directOnly: false,
|
|
|
- // criteria: {
|
|
|
- // id: "",
|
|
|
- // graphType: "Pe2Eq",
|
|
|
- // side: -1,
|
|
|
- // type: ""
|
|
|
- // }
|
|
|
- // },
|
|
|
- // secret: this.secret,
|
|
|
- // ProjId: this.projectId
|
|
|
- // }
|
|
|
+ //查询表数据
|
|
|
+ getPropertyData() {
|
|
|
let param = {
|
|
|
- data: {
|
|
|
- directOnly: false,
|
|
|
- criteria: {
|
|
|
- EquipLocalName: [this.search == ""? null: this.search],
|
|
|
- id: "",
|
|
|
- type: [],
|
|
|
- exclude: [{
|
|
|
- graphType: "Pe2Eq",
|
|
|
- side: "fromId",
|
|
|
- }]
|
|
|
- }
|
|
|
- },
|
|
|
- secret: this.secret,
|
|
|
- ProjId: this.projectId
|
|
|
+ Filters: `EquipmentId isNull;Family="${this.category.assetType}"`,
|
|
|
+ PageNumber: 1,
|
|
|
+ PageSize: 50
|
|
|
}
|
|
|
- if (this.mess.buildId == "all") {
|
|
|
- param.data.criteria.id = this.mess.ProjId
|
|
|
+ //建筑id
|
|
|
+ if (this.mess.buildId && this.mess.buildId != "all") {
|
|
|
+ param.Filters += `;buildingId='${this.mess.buildId}'`
|
|
|
} else if (this.mess.buildId == "noKnow") {
|
|
|
- param.data.criteria.id = this.mess.ProjId
|
|
|
- param.data.directOnly = true
|
|
|
+ param.Filters += `;buildingId isNull`
|
|
|
+ }
|
|
|
+ //楼层id
|
|
|
+ if (this.mess.floorId && this.mess.floorId != "all") {
|
|
|
+ param.Filters += `;floorId='${this.mess.floorId}'`
|
|
|
} else if (this.mess.floorId == "noKnow") {
|
|
|
- param.data.criteria.id = this.mess.buildId
|
|
|
- param.data.directOnly = true
|
|
|
- } else if (this.mess.floorId && this.mess.floorId != "all") {
|
|
|
- param.data.criteria.id = this.mess.floorId
|
|
|
- } else if (this.mess.floorId == 'all') {
|
|
|
- param.data.criteria.id = this.mess.buildId
|
|
|
- } else {
|
|
|
- param.data.criteria.id = this.projectId
|
|
|
+ param.Filters += `;floorId isNull`
|
|
|
}
|
|
|
- param.data.criteria.type = [this.getType(this.category.category)]
|
|
|
- console.log(param)
|
|
|
- getBussines2(param).then(res => {
|
|
|
- this.tableData = res.data.Content
|
|
|
- console.log(this.tableData, "this.tableData")
|
|
|
- this.page.total = res.data.Count
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- getType(code) {
|
|
|
- console.log(code, "code")
|
|
|
- console.log(code.substring(2, 6))
|
|
|
- let system = code.substring(2, 6), myCode = ""
|
|
|
- this.codeListCode.map(item => {
|
|
|
- if (!!item.content && item.content.length) {
|
|
|
- item.content.map(child => {
|
|
|
- if (child.code == system) {
|
|
|
- myCode = item.code
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ //名称和编码
|
|
|
+ if (this.search) {
|
|
|
+ param.Filters += `;floorId='${this.mess.floorId}'`
|
|
|
+ }
|
|
|
+ queryProperty(param, res => {
|
|
|
+ this.tableData = res.Content
|
|
|
+ this.page.total = res.Total
|
|
|
})
|
|
|
- console.log(myCode)
|
|
|
- return myCode
|
|
|
}
|
|
|
},
|
|
|
watch: {
|