|
@@ -142,18 +142,15 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-// import { BeatchQueryParam, deleteEquip, getEquipBelongs, updateEquip } from "@/api/scan/request";
|
|
|
import ScanController from "@/controller/old-adm/ScanController";
|
|
|
-// import { getEquipTableCon } from "@/api/object/equip";
|
|
|
-import Equip from "@/controller/old-adm/equipController";
|
|
|
-// import { getDataDictionary, deliveredInfos } from "@/api/dict";
|
|
|
-import Dic from "@/controller/old-adm/dicController";
|
|
|
+import EquipController from "@/controller/old-adm/equipController";
|
|
|
+import DicController from "@/controller/old-adm/dicController";
|
|
|
+
|
|
|
import tools from "@/utils/old-adm/scan/tools";
|
|
|
import handsonUtils from "@/utils/old-adm/hasontableUtils";
|
|
|
import showTools from "@/utils/old-adm/handsontable/notShow";
|
|
|
import text from "@/utils/old-adm/handsontable/mainText";
|
|
|
import myCascader from "@/components/old-adm/ledger/components/lib/cascader";
|
|
|
-import buildFloor from "@/utils/old-adm/handsontable/buildFloorData";
|
|
|
import BuildController from "@/controller/old-adm/buildController";
|
|
|
import qrcode from "@/components/old-adm/ledger/components/lib/qrcode";
|
|
|
import bimDialog from "@/components/old-adm/ledger/components/lib/bimDialog";
|
|
@@ -389,7 +386,7 @@ export default {
|
|
|
* 查询已交付的信息点
|
|
|
* @param classCode 设备类型
|
|
|
*/
|
|
|
- getDeliveredInfos(classCode) {
|
|
|
+ async getDeliveredInfos(classCode) {
|
|
|
let params = {
|
|
|
classCode: classCode,
|
|
|
objType: "equipment",
|
|
@@ -405,60 +402,58 @@ export default {
|
|
|
} else if (this.mess.floorId && this.mess.floorId != "all") {
|
|
|
params.floorId = `${this.mess.floorId}`;
|
|
|
}
|
|
|
- Dic.deliveredInfos(params, (res) => {
|
|
|
- this.tableHeader = res.content;
|
|
|
- this.codeToDataSource = {};
|
|
|
- this.tableHeader.forEach((item) => {
|
|
|
- if (item.path) {
|
|
|
- this.inputMap[item.path] = item;
|
|
|
- }
|
|
|
- if (item.dataSource) {
|
|
|
- try {
|
|
|
- this.codeToDataSource[item.code] = {};
|
|
|
- item.dataSource.forEach((dic) => {
|
|
|
- this.codeToDataSource[item.code][dic.code] = dic.name;
|
|
|
- });
|
|
|
- } catch (e) {
|
|
|
- console.log(e);
|
|
|
- }
|
|
|
+ const res = await DicController.deliveredInfos(params)
|
|
|
+ this.tableHeader = res.content;
|
|
|
+ this.codeToDataSource = {};
|
|
|
+ this.tableHeader.forEach((item) => {
|
|
|
+ if (item.path) {
|
|
|
+ this.inputMap[item.path] = item;
|
|
|
+ }
|
|
|
+ if (item.dataSource) {
|
|
|
+ try {
|
|
|
+ this.codeToDataSource[item.code] = {};
|
|
|
+ item.dataSource.forEach((dic) => {
|
|
|
+ this.codeToDataSource[item.code][dic.code] = dic.name;
|
|
|
+ });
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
}
|
|
|
- });
|
|
|
- this.getTableData();
|
|
|
- // 信息维护
|
|
|
- this.newEnclosure = res.content.filter((i) => i.dataType == dataTypeMap.ATTACHMENT && i.editable == true);
|
|
|
+ }
|
|
|
});
|
|
|
+ this.getTableData();
|
|
|
+ // 信息维护
|
|
|
+ this.newEnclosure = res.content.filter((i) => i.dataType == dataTypeMap.ATTACHMENT && i.editable == true);
|
|
|
},
|
|
|
/**
|
|
|
* 查询全部信息点
|
|
|
* @param classCode 设备类型
|
|
|
*/
|
|
|
- getDataDictionary(classCode) {
|
|
|
+ async getDataDictionary(classCode) {
|
|
|
let params = {
|
|
|
type: classCode,
|
|
|
orders: "sort asc, name desc",
|
|
|
};
|
|
|
- Dic.getDataDictionary(params, (res) => {
|
|
|
- this.tableHeader = res.content;
|
|
|
- this.codeToDataSource = {};
|
|
|
- this.tableHeader.forEach((item) => {
|
|
|
- if (item.path) {
|
|
|
- this.inputMap[item.path] = item;
|
|
|
- }
|
|
|
- if (item.dataSource) {
|
|
|
- try {
|
|
|
- this.codeToDataSource[item.code] = {};
|
|
|
- item.dataSource.forEach((dic) => {
|
|
|
- this.codeToDataSource[item.code][dic.code] = dic.name;
|
|
|
- });
|
|
|
- } catch (e) {
|
|
|
- console.log(e);
|
|
|
- }
|
|
|
+ const res = await DicController.getDataDictionary(params)
|
|
|
+ this.tableHeader = res.content;
|
|
|
+ this.codeToDataSource = {};
|
|
|
+ this.tableHeader.forEach((item) => {
|
|
|
+ if (item.path) {
|
|
|
+ this.inputMap[item.path] = item;
|
|
|
+ }
|
|
|
+ if (item.dataSource) {
|
|
|
+ try {
|
|
|
+ this.codeToDataSource[item.code] = {};
|
|
|
+ item.dataSource.forEach((dic) => {
|
|
|
+ this.codeToDataSource[item.code][dic.code] = dic.name;
|
|
|
+ });
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
}
|
|
|
- });
|
|
|
- this.getTableData();
|
|
|
- // 信息维护
|
|
|
- this.newEnclosure = res.content.filter((i) => i.dataType == dataTypeMap.ATTACHMENT && i.editable == true);
|
|
|
+ }
|
|
|
});
|
|
|
+ this.getTableData();
|
|
|
+ // 信息维护
|
|
|
+ this.newEnclosure = res.content.filter((i) => i.dataType == dataTypeMap.ATTACHMENT && i.editable == true);
|
|
|
},
|
|
|
//关闭弹窗
|
|
|
closeBIM(val) {
|
|
@@ -499,9 +494,10 @@ export default {
|
|
|
param.filters += `;localName contain '${this.mess.keyWord}' || localId contain '${this.mess.keyWord}' || cADID contain '${this.mess.keyWord}' || infos.digitalDeliveryID contain '${this.mess.keyWord}'`;
|
|
|
}
|
|
|
|
|
|
- Equip.getEquipTableCon(param, (res) => {
|
|
|
+ EquipController.getEquipTableCon(param).then((res) => {
|
|
|
this.loading = false;
|
|
|
- this.showParts = res.message == "1" ? true : false; // 判断是否显示包含的部件列
|
|
|
+ // 注释:去掉包含的部件
|
|
|
+ // this.showParts = res.message == "1" ? true : false; // 判断是否显示包含的部件列
|
|
|
this.tableData = res.content.map((item) => {
|
|
|
if (item.hasOwnProperty("buildingId") && item.hasOwnProperty("floorId")) {
|
|
|
item.flowBuild = item.buildingId + "-" + item.floorId;
|
|
@@ -550,7 +546,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
if (param.data.length) {
|
|
|
- ScanController.BeatchQueryParam(param, (res) => {
|
|
|
+ ScanController.BeatchQueryParam(param).then((res) => {
|
|
|
if (!this.onlyRead) {
|
|
|
return false;
|
|
|
}
|
|
@@ -792,7 +788,7 @@ export default {
|
|
|
renderAllRows: true,
|
|
|
// colWidths: 200,
|
|
|
autoColumnSize: true,
|
|
|
- language: "zh-CN",
|
|
|
+ // language: "zh-CN",
|
|
|
fillHandle: "vertical", //允许纵向填充
|
|
|
manualColumnResize: true,
|
|
|
manualColumnMove: true,
|
|
@@ -892,8 +888,8 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 删除设备
|
|
|
- async removeDevice(param) {
|
|
|
- await ScanController.deleteEquip(param, (res) => {
|
|
|
+ removeDevice(param) {
|
|
|
+ ScanController.deleteEquip(param).then((res) => {
|
|
|
this.$message.success("删除成功");
|
|
|
this.$emit("close", { code: this.deleteCode });
|
|
|
// this.getTableData()
|
|
@@ -955,7 +951,7 @@ export default {
|
|
|
param.content.push(item);
|
|
|
}
|
|
|
});
|
|
|
- ScanController.updateEquip(param, (res) => {});
|
|
|
+ ScanController.updateEquip(param);
|
|
|
},
|
|
|
//修改设备类型
|
|
|
changeCader() {
|
|
@@ -967,7 +963,7 @@ export default {
|
|
|
pageSize: 50,
|
|
|
},
|
|
|
};
|
|
|
- ScanController.getEquipBelongs(param, (res) => {
|
|
|
+ ScanController.getEquipBelongs(param).then((res) => {
|
|
|
if (res.content.length) {
|
|
|
this.deviceType.assetType = res.content[0].family;
|
|
|
this.deviceType.assetName = res.content[0].familyName;
|