|
@@ -41,6 +41,25 @@
|
|
|
></el-pagination>
|
|
|
<!-- 二维码弹窗 -->
|
|
|
<qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
|
|
|
+ <upload-files-dialog
|
|
|
+ :read="onlyRead ? true : false"
|
|
|
+ ref="upload"
|
|
|
+ @changeFile="fileChange"
|
|
|
+ :keysArr="filesArr"
|
|
|
+ :dialog="myDialog"
|
|
|
+ ></upload-files-dialog>
|
|
|
+ <upload-img-dialog
|
|
|
+ :read="onlyRead ? true : false"
|
|
|
+ @changeFile="imgChange"
|
|
|
+ :keysArr="imgsArr"
|
|
|
+ :dialog="myDialog"
|
|
|
+ ></upload-img-dialog>
|
|
|
+ <pic-dialog
|
|
|
+ :read="onlyRead ? true : false"
|
|
|
+ :dialog="myDialog"
|
|
|
+ :keysArr="picsArr"
|
|
|
+ @change="changePics"
|
|
|
+ ></pic-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -50,6 +69,16 @@ import showTools from "@/utils/handsontable/notShow";
|
|
|
import text from "@/utils/handsontable/mainText";
|
|
|
|
|
|
import qrcode from "@/components/ledger/lib/qrcode";
|
|
|
+import firm from "@/components/dialogs/list/firm";
|
|
|
+import supplyDialog from "@/components/dialogs/list/supplyDialog";
|
|
|
+import supplierDialog from "@/components/dialogs/list/supplierDialog";
|
|
|
+import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
|
|
|
+import insurerDialog from "@/components/dialogs/list/insurerDialog";
|
|
|
+import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
|
|
|
+import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
|
|
|
+import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
|
|
|
+import picDialog from "@/components/dialogs/list/picDialog";
|
|
|
+import systemType from "@/components/dialogs/list/systemType";
|
|
|
import handsonTable from "@/components/common/handsontable";
|
|
|
import {
|
|
|
getEquipPartsType,
|
|
@@ -61,6 +90,16 @@ import { mapGetters, mapActions } from "vuex";
|
|
|
export default {
|
|
|
components: {
|
|
|
qrcode, //二维码页面
|
|
|
+ firm, //品牌型号弹窗
|
|
|
+ supplyDialog,
|
|
|
+ supplierDialog,
|
|
|
+ maintainerDialog,
|
|
|
+ insurerDialog,
|
|
|
+ guaranteeDialog,
|
|
|
+ uploadFilesDialog,
|
|
|
+ uploadImgDialog,
|
|
|
+ picDialog,
|
|
|
+ systemType,
|
|
|
handsonTable
|
|
|
},
|
|
|
data() {
|
|
@@ -97,7 +136,6 @@ export default {
|
|
|
"L2",
|
|
|
"X"
|
|
|
],
|
|
|
- qrcodeUrl: "",
|
|
|
myDialog: {
|
|
|
qrcode: false, //二维码弹窗
|
|
|
firm: false, //厂商弹窗
|
|
@@ -114,7 +152,17 @@ export default {
|
|
|
details: false, //详情页
|
|
|
changeRea: false,
|
|
|
lookPic: false //图片查看
|
|
|
- }
|
|
|
+ },
|
|
|
+ qrcodeUrl: "", //二维码图片地址
|
|
|
+ filesArr: [], //保存临时的文件key
|
|
|
+ imgsArr: [], //临时保存的图片key数组
|
|
|
+ picsArr: [], //临时设备图片keys数组
|
|
|
+ systemId: null,
|
|
|
+ graphyId: null,
|
|
|
+ mess: {},
|
|
|
+ id: 0,
|
|
|
+ EquipmentList: [],
|
|
|
+ firmId: "" //品牌型号所需字段
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -195,12 +243,14 @@ export default {
|
|
|
arr.map(item => {
|
|
|
item.Visible = true;
|
|
|
});
|
|
|
- let data = showTools.changeHeader(
|
|
|
+ let data = showTools.tableHeadFilter(
|
|
|
arr,
|
|
|
this.readArr,
|
|
|
this.onlyRead,
|
|
|
false,
|
|
|
- this.allMess
|
|
|
+ this.allMess,
|
|
|
+ false,
|
|
|
+ true
|
|
|
);
|
|
|
data.unshift("查看详情", "当前关联的资产");
|
|
|
return data;
|
|
@@ -212,12 +262,14 @@ export default {
|
|
|
//缺少信息点
|
|
|
item.Visible = true;
|
|
|
});
|
|
|
- let data = showTools.showHeaderTypes(
|
|
|
+ let data = showTools.tableHeaderTypes(
|
|
|
arr,
|
|
|
this.readArr,
|
|
|
this.onlyRead,
|
|
|
false,
|
|
|
- this.allMess
|
|
|
+ this.allMess,
|
|
|
+ false,
|
|
|
+ true
|
|
|
);
|
|
|
data.unshift(
|
|
|
{
|
|
@@ -343,10 +395,9 @@ export default {
|
|
|
//供应合同编号
|
|
|
if (val == "LedgerParam.SupplyPurchase.SupplierContractID") {
|
|
|
let falg = null;
|
|
|
- if (!!this.tableData[row.row].infos) {
|
|
|
- if (!!this.tableData[row.row].infos) {
|
|
|
- falg = this.tableData[row.row].infos.DPSupplierID.split("-")[0];
|
|
|
- }
|
|
|
+ let data = this.tableData[row.row].DPSupplierID;
|
|
|
+ if (data) {
|
|
|
+ falg = data.split("-")[0];
|
|
|
}
|
|
|
if (!!falg) {
|
|
|
this.id = falg;
|
|
@@ -359,10 +410,9 @@ export default {
|
|
|
if (val == "LedgerParam.InsuranceDoc.InsuranceNum") {
|
|
|
//选择保单
|
|
|
let falg = null;
|
|
|
- if (!!this.tableData[row.row].infos) {
|
|
|
- if (!!this.tableData[row.row].infos) {
|
|
|
- falg = this.tableData[row.row].infos.DPInsurerID.split("-")[0];
|
|
|
- }
|
|
|
+ let data = this.tableData[row.row].DPInsurerID
|
|
|
+ if (data) {
|
|
|
+ falg = data.split("-")[0];
|
|
|
}
|
|
|
if (!!falg) {
|
|
|
this.id = falg;
|
|
@@ -371,16 +421,14 @@ export default {
|
|
|
this.$message("请先选择保险商");
|
|
|
}
|
|
|
}
|
|
|
- //保险文件--设备文档
|
|
|
+ //保险文件--设备文档--安装质检报告
|
|
|
if (
|
|
|
val == "LedgerParam.InsuranceDoc.InsuranceFile" ||
|
|
|
- val == "LedgerParam.PhotoDoc.Archive"
|
|
|
+ val == "LedgerParam.PhotoDoc.Archive" ||
|
|
|
+ val == "LedgerParam.Siteinstall.CheckReport"
|
|
|
) {
|
|
|
- this.filesArr = this.tableData[row.row].infos
|
|
|
- ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
- ? [this.tableData[row.row].infos[val.split(".")[1]]]
|
|
|
- : []
|
|
|
- : [];
|
|
|
+ let data = tools.dataForKey(this.tableData[row.row], val);
|
|
|
+ this.filesArr = data? data: [];
|
|
|
this.myDialog.uploadFiles = true;
|
|
|
}
|
|
|
//安装照片--安装图纸--设备铭牌照片--设备图纸
|
|
@@ -390,28 +438,14 @@ export default {
|
|
|
val == "LedgerParam.PhotoDoc.Nameplate" ||
|
|
|
val == "LedgerParam.PhotoDoc.Drawing"
|
|
|
) {
|
|
|
- if (val == "LedgerParam.PhotoDoc.Nameplate") {
|
|
|
- this.imgsArr = this.tableData[row.row].infos
|
|
|
- ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
- ? [this.tableData[row.row].infos[val.split(".")[1]].key]
|
|
|
- : []
|
|
|
- : [];
|
|
|
- } else {
|
|
|
- this.imgsArr = this.tableData[row.row].infos
|
|
|
- ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
- ? [this.tableData[row.row].infos[val.split(".")[1]]]
|
|
|
- : []
|
|
|
- : [];
|
|
|
- }
|
|
|
+ let data = tools.dataForKey(this.tableData[row.row], val)
|
|
|
+ this.imgsArr = data? data: []
|
|
|
this.myDialog.uploadImgs = true;
|
|
|
}
|
|
|
//设备照片
|
|
|
if (val == "LedgerParam.PhotoDoc.Pic") {
|
|
|
- this.picsArr = this.tableData[row.row].infos
|
|
|
- ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
- ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
- : []
|
|
|
- : [];
|
|
|
+ let data = tools.dataForKey(this.tableData[row.row], val)
|
|
|
+ this.picsArr = data? data: []
|
|
|
this.myDialog.pic = true;
|
|
|
}
|
|
|
this.row = row.row;
|
|
@@ -461,7 +495,19 @@ export default {
|
|
|
this.$message.success("删除成功!");
|
|
|
this.getTypes();
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+ //上传文件弹窗触发事件
|
|
|
+ fileChange(keys) {
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
+ },
|
|
|
+ //上传图片弹窗触发事件
|
|
|
+ imgChange(keys) {
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
+ },
|
|
|
+ //设备图片弹窗改变事件
|
|
|
+ changePics(keys) {
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|