|
@@ -54,8 +54,8 @@ import handsonTable from "@/components/common/handsontable";
|
|
|
import {
|
|
|
getDataDictionary,
|
|
|
createPart,
|
|
|
- getEquipmentFamily,
|
|
|
- createPropertyData
|
|
|
+ createPropertyData,
|
|
|
+ getEquipBelongs
|
|
|
} from "@/api/scan/request";
|
|
|
import { mapGetters, mapActions } from "vuex";
|
|
|
|
|
@@ -121,7 +121,6 @@ export default {
|
|
|
picsArr: [], //临时设备图片keys数组
|
|
|
systemId: null,
|
|
|
graphyId: null,
|
|
|
- mess: {},
|
|
|
id: 0,
|
|
|
readArr: [
|
|
|
"A1",
|
|
@@ -139,7 +138,7 @@ export default {
|
|
|
"M"
|
|
|
],
|
|
|
EquipmentList: [],
|
|
|
- firmId: "" //品牌型号所需字段
|
|
|
+ firmId: "" //品牌型号所需字段--族id三位编码(传设备类id或部件类id)
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -148,18 +147,22 @@ export default {
|
|
|
created() {
|
|
|
this.category = this.$route.params;
|
|
|
this.category.ParentId = this.category.Code.substr(0, 4);
|
|
|
- this.mess = {
|
|
|
- deviceId: this.category.ParentId
|
|
|
- };
|
|
|
- this.getEquipmentFamilyList();
|
|
|
+ this.getBelongs();
|
|
|
this.getTableHeader();
|
|
|
},
|
|
|
methods: {
|
|
|
- getEquipmentFamilyList() {
|
|
|
- getEquipmentFamily(res => {
|
|
|
- this.EquipmentList = res.Content;
|
|
|
- this.changeCader();
|
|
|
- });
|
|
|
+ //查询部件类对应的 族
|
|
|
+ getBelongs() {
|
|
|
+ let params = {
|
|
|
+ data: {
|
|
|
+ Filters: `EquipCode='${this.category.Code}'`,
|
|
|
+ PageNumber: 1,
|
|
|
+ PageSize: 50
|
|
|
+ }
|
|
|
+ }
|
|
|
+ getEquipBelongs(params, res => {
|
|
|
+ this.firmId = res.Content[0].Family;
|
|
|
+ })
|
|
|
},
|
|
|
// 获取表头数据(初始化表格)
|
|
|
async getTableHeader() {
|
|
@@ -358,7 +361,6 @@ export default {
|
|
|
},
|
|
|
//选择型号修改
|
|
|
firmChange(data) {
|
|
|
- console.log(this.row)
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
|
|
@@ -443,15 +445,6 @@ export default {
|
|
|
changePics(keys) {
|
|
|
this.setDataToMain(keys, this.messKey, this.row);
|
|
|
},
|
|
|
- setGraphyId(graphyId, assetGroupList) {
|
|
|
- this.graphyId = graphyId;
|
|
|
- this.assetGroupList = assetGroupList;
|
|
|
- },
|
|
|
- //触发父组件change
|
|
|
- getClose(val) {
|
|
|
- this.$emit("close", val);
|
|
|
- },
|
|
|
- reset() { },
|
|
|
//表格点击事件
|
|
|
handleTdClick(el, rowArr) {
|
|
|
//点击的是表头
|
|
@@ -607,18 +600,6 @@ export default {
|
|
|
this.row = row.row;
|
|
|
this.messKey = val;
|
|
|
},
|
|
|
- //修改设备类型
|
|
|
- changeCader() {
|
|
|
- this.EquipmentList.map(item => {
|
|
|
- if (!!item.content && item.content.length) {
|
|
|
- item.content.map(child => {
|
|
|
- if (child.code == this.mess.deviceId) {
|
|
|
- this.firmId = item.code;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
utilToKey(key, name, data, messName) {
|
|
|
if (key == name) {
|
|
|
this.setDataToMain(data[key], messName, this.row);
|