|
@@ -16,9 +16,9 @@
|
|
|
<el-button v-show="!onlyRead" size="small" style="width: 80px" @click="undo" icon="iconfont icon-undo">撤销</el-button>
|
|
|
</div>
|
|
|
<qrcode :dialog="myDialog" :addBody="true" ref="qrcode"></qrcode>
|
|
|
- <upload-files-dialog ref="upload" @changeFile="fileChange" :keysArr="filesArr"
|
|
|
+ <upload-files-dialog ref="upload" @changeFile="fileChange" :keysArr="filesArr" firmDataType="row"
|
|
|
:dialog="myDialog"></upload-files-dialog>
|
|
|
- <upload-img-dialog @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"></upload-img-dialog>
|
|
|
+ <upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr" firmDataType="row" :dialog="myDialog"></upload-img-dialog>
|
|
|
<pic-dialog :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
|
|
|
<div class="center middle_sty" style="height: 91%" v-show="!mess.deviceId && (!tableData || !tableData.length)">
|
|
|
<p><i class="icon-wushuju iconfont"></i>请选择系统类型</p>
|
|
@@ -72,8 +72,8 @@ import tools from "@/utils/scan/tools";
|
|
|
import handsonUtils from "@/utils/scan/hasontableUtils"
|
|
|
import showTools from "@/utils/handsontable/notShow"
|
|
|
import qrcode from "@/components/business_space/lib/qrcode"
|
|
|
-import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog"
|
|
|
-import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog"
|
|
|
+import uploadFilesDialog from "@/components/dialogs/list/filesDialog"
|
|
|
+import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog"
|
|
|
import picDialog from "@/components/business_space/dialogs/list/picDialog"
|
|
|
import myPagination from "@/components/common/myPagination"
|
|
|
import detailsDialog from "@/components/business_space/lib/detailsDia"
|
|
@@ -246,7 +246,9 @@ export default {
|
|
|
},
|
|
|
//撤回
|
|
|
undo() {
|
|
|
- this.hot.undo();
|
|
|
+ if (this.tableData.length) {
|
|
|
+ this.hot.undo();
|
|
|
+ }
|
|
|
},
|
|
|
//刷新
|
|
|
reset() {
|
|
@@ -546,7 +548,7 @@ export default {
|
|
|
//其他的开始判断
|
|
|
let val = this.hot.colToProp(row.col);
|
|
|
let inputData = this.inputMap[val];
|
|
|
- this.systemId = infos.SysID
|
|
|
+ this.systemId = infos.SysID;
|
|
|
this.row = row.row
|
|
|
this.messKey = val
|
|
|
switch (val) {
|
|
@@ -581,6 +583,14 @@ export default {
|
|
|
this.$refs.editFloor.showDialog(this.tableData[row.row]);
|
|
|
}
|
|
|
return false
|
|
|
+ //系统图(F2)
|
|
|
+ case "infos.systemChart":
|
|
|
+ let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
|
|
|
+ this.imgsArr = SSPPdata ? SSPPdata : [];
|
|
|
+ if (!this.onlyRead || this.imgsArr.length) {
|
|
|
+ this.myDialog.uploadImgs = true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
@@ -645,57 +655,28 @@ export default {
|
|
|
},
|
|
|
//上传文件弹窗触发事件
|
|
|
fileChange(keys) {
|
|
|
- this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
|
|
|
- // tools.setItem(this.deviceType.code, this.tableData)
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
},
|
|
|
//上传图片弹窗触发事件
|
|
|
imgChange(keys) {
|
|
|
- this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
|
|
|
- // tools.setItem(this.deviceType.code, this.tableData)
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
},
|
|
|
//设备图片弹窗改变事件
|
|
|
changePics(keys) {
|
|
|
- this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
|
|
|
- // tools.setItem(this.deviceType.code, this.tableData)
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
},
|
|
|
//判断是否有值,有值赋值
|
|
|
setDataToMain(data, key, row) {
|
|
|
- if (!!data && data != '--') {
|
|
|
- if (!!this.tableData[row].infos) {
|
|
|
- //falg确定每个的是否有值
|
|
|
- let falg = false
|
|
|
- if (!this.tableData[row].infos[key]) {
|
|
|
- falg = true
|
|
|
- }
|
|
|
- //铭牌照片特殊处理
|
|
|
- if (key == 'Nameplate') {
|
|
|
- this.tableData[row].infos[key] = {
|
|
|
- "systemId": "dataPlatform",
|
|
|
- "name": "铭牌照片",
|
|
|
- "type": "image",
|
|
|
- "key": data
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.tableData[row].infos[key] = data
|
|
|
- }
|
|
|
- if (falg) {
|
|
|
- this.updateBusiness([this.tableData[row]], [[0, "infos." + key, null, data]])
|
|
|
- }
|
|
|
+ if (!!data && data != "--") {
|
|
|
+ if (!!this.tableData[row]) {
|
|
|
+ tools.setDataForKey(this.tableData[row], key, data);
|
|
|
+ this.handleUpdataTable([[row, key, null, data]], "edit");
|
|
|
} else {
|
|
|
- this.tableData[row].infos = {}
|
|
|
- if (key == 'Nameplate') {
|
|
|
- this.tableData[row].infos[key] = {
|
|
|
- "systemId": "dataPlatform",
|
|
|
- "name": "铭牌照片",
|
|
|
- "type": "image",
|
|
|
- "key": data
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.tableData[row].infos[key] = data
|
|
|
- }
|
|
|
+ this.tableData[row] = {};
|
|
|
+ tools.setDataForKey(this.tableData[row], key, data);
|
|
|
}
|
|
|
} else {
|
|
|
- this.tableData[row].infos[key] = ''
|
|
|
+ tools.setDataForKey(this.tableData[row], key, "");
|
|
|
}
|
|
|
}
|
|
|
},
|