|
@@ -7,38 +7,43 @@
|
|
|
</span> -->
|
|
|
<span>当前筛选条件下共{{page.total || '--'}}设备</span>
|
|
|
</div>
|
|
|
+ <!-- 编辑模式,只读模式-->
|
|
|
<el-select v-model="onlyRead" @change="getHeaderData(mess)" style="width:100px;margin-right:20px;vertical-align:bottom;">
|
|
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
+ <!-- 只看采集信息,全部-->
|
|
|
<el-select v-model="showType" @change="initTable" style="width:100px;margin-right:10px;vertical-align:bottom;">
|
|
|
<el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
<!-- <el-button size="small" style='width: 80px;' @click="download" icon="iconfont icon-xiazai">下载</el-button> -->
|
|
|
<el-button size="small" style='width: 80px;' @click="addDevice">添加设备</el-button>
|
|
|
- <el-button size="small" style='width: 80px;' @click="reset">刷新</el-button>
|
|
|
+ <el-button size="small" @click="Batch" :disabled="batchDate">批量维护信息点</el-button>
|
|
|
+ <el-button size="small" style='width: 80px;' @click="reset">刷新</el-button>
|
|
|
<el-button size="small" style='width: 80px;' v-show="!onlyRead" @click="undo">撤销</el-button>
|
|
|
</div>
|
|
|
<!-- 二维码弹窗 -->
|
|
|
<qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
|
|
|
<!-- 型号弹窗 -->
|
|
|
- <firm :mess="{deviceId: deviceType.assetType}" ref="firm" @changeFirm="firmChange" :dialog="myDialog"></firm>
|
|
|
+ <firm :mess="{deviceId: deviceType.assetType}" :dataFirmType='dataFirmType' ref="firm" @changeFirm="firmChange" :dialog="myDialog"></firm>
|
|
|
<!-- 供应商合同弹窗 -->
|
|
|
<supply-dialog ref="supply" @change="supplyChange" :id="id" :dialog="myDialog"></supply-dialog>
|
|
|
<!-- 供应商弹窗 -->
|
|
|
<supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
|
|
|
-
|
|
|
+ <!--保险单号-保险文件-->
|
|
|
<guarantee-dialog :id="id" ref="guarantee" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
|
|
|
- <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr" :dialog="myDialog">
|
|
|
- </upload-files-dialog>
|
|
|
+ <!--上传文件弹窗-->
|
|
|
+ <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>
|
|
|
+ <!--维修商变更-->
|
|
|
<maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="myDialog"></maintainer-dialog>
|
|
|
+ <!--保险商变更-->
|
|
|
<insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
|
|
|
+ <!--设备图片弹窗改变事件-->
|
|
|
<pic-dialog :read="onlyRead ? true : false" :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
|
|
|
<div class=" middle_sty" style="height: 91%; text-align:center" v-show="!mess.deviceId && (!tableData || !tableData.length)">
|
|
|
- <p>
|
|
|
- <i class="icon-wushuju iconfont"></i>
|
|
|
- 请选择设备族
|
|
|
- </p>
|
|
|
+ <p><i class="icon-wushuju iconfont"></i>请选择设备族</p>
|
|
|
</div>
|
|
|
|
|
|
<div class="center middle_sty" style="height: 91%" v-show="mess.deviceId && (!tableData || !tableData.length)">
|
|
@@ -81,73 +86,72 @@
|
|
|
<el-button type="primary" @click="toAddDevice">下 一 步</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <!--维护信息弹窗-->
|
|
|
+ <batchDialog ref="batchDialogs" @code="fourVendors" :firmName="firmName"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import {
|
|
|
- getTableHeader,//表头
|
|
|
- getEquipmentFamily,//获取族
|
|
|
- getBillEquipList,//获取表数据
|
|
|
- BeatchQueryParam,//通过标号功能号获取值
|
|
|
- delBatchList,//删除选中设备
|
|
|
- updateEquip,//更新设备
|
|
|
- getDataDictionary,//新表头
|
|
|
- getEquipTableCon,//获取表数据
|
|
|
- deleteEquip,//删除选中设备
|
|
|
- getEquipBelongs,//获取族
|
|
|
-} from "@/api/scan/request";
|
|
|
+ import {
|
|
|
+ BeatchQueryParam,
|
|
|
+ deleteEquip,
|
|
|
+ getDataDictionary,
|
|
|
+ getEquipBelongs,
|
|
|
+ getEquipTableCon,
|
|
|
+ updateEquip,
|
|
|
+ } from "@/api/scan/request";
|
|
|
|
|
|
|
|
|
-import tools from "@/utils/scan/tools"
|
|
|
-import handsonUtils from "@/utils/hasontableUtils"
|
|
|
-import showTools from "@/utils/handsontable/notShow"
|
|
|
-import text from "@/utils/handsontable/mainText"
|
|
|
-import myCascader from "@/components/ledger/lib/cascader"
|
|
|
-import buildFloor from '@/utils/handsontable/buildFloorData'
|
|
|
+ import tools from "@/utils/scan/tools"
|
|
|
+ import handsonUtils from "@/utils/hasontableUtils"
|
|
|
+ import showTools from "@/utils/handsontable/notShow"
|
|
|
+ import text from "@/utils/handsontable/mainText"
|
|
|
+ import myCascader from "@/components/ledger/lib/cascader"
|
|
|
+ import buildFloor from '@/utils/handsontable/buildFloorData'
|
|
|
|
|
|
-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 myPagination from "@/components/ledger/lib/myPagination"
|
|
|
-import detailsDialog from "@/components/ledger/lib/detailsDia"
|
|
|
-import changeRea from "@/components/dialogs/changeRea"
|
|
|
-import { mapGetters, mapActions } from "vuex"
|
|
|
-//图片查看
|
|
|
-import lookPic from "@/components/ledger/lib/lookImages"
|
|
|
-import Handsontable from "handsontable-pro"
|
|
|
-import 'handsontable-pro/dist/handsontable.full.css'
|
|
|
-import zhCN from 'handsontable-pro/languages/zh-CN'
|
|
|
-//下拉插件
|
|
|
+ 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 myPagination from "@/components/ledger/lib/myPagination"
|
|
|
+ import detailsDialog from "@/components/ledger/lib/detailsDia"
|
|
|
+ import changeRea from "@/components/dialogs/changeRea"
|
|
|
+ import {mapGetters} from "vuex"
|
|
|
+ //图片查看
|
|
|
+ import lookPic from "@/components/ledger/lib/lookImages"
|
|
|
+ import Handsontable from "handsontable-pro"
|
|
|
+ import 'handsontable-pro/dist/handsontable.full.css'
|
|
|
+ import batchDialog from "../../dialogs/list/batchDialog";
|
|
|
+ //下拉插件
|
|
|
// import "@/assets/js/chosen.jquery.min";
|
|
|
// import "@/assets/js/handsontable-chosen-editor";
|
|
|
|
|
|
export default {
|
|
|
props: ["myParam"],
|
|
|
components: {
|
|
|
- qrcode, //二维码页面
|
|
|
- firm, //
|
|
|
- supplyDialog,
|
|
|
- supplierDialog,
|
|
|
- guaranteeDialog,
|
|
|
- uploadFilesDialog,
|
|
|
- maintainerDialog,
|
|
|
- insurerDialog,
|
|
|
- uploadImgDialog,
|
|
|
- picDialog,
|
|
|
- myPagination,
|
|
|
- systemType,
|
|
|
- detailsDialog,
|
|
|
- changeRea,
|
|
|
- lookPic,
|
|
|
- myCascader
|
|
|
+ qrcode, //二维码页面
|
|
|
+ firm, //
|
|
|
+ supplyDialog,
|
|
|
+ supplierDialog,
|
|
|
+ guaranteeDialog,
|
|
|
+ uploadFilesDialog,
|
|
|
+ maintainerDialog,
|
|
|
+ insurerDialog,
|
|
|
+ uploadImgDialog,
|
|
|
+ picDialog,
|
|
|
+ myPagination,
|
|
|
+ systemType,
|
|
|
+ detailsDialog,
|
|
|
+ changeRea,
|
|
|
+ lookPic,
|
|
|
+ myCascader,
|
|
|
+ batchDialog
|
|
|
},
|
|
|
created() {
|
|
|
buildFloor.getData(this.buildFloorData)
|
|
@@ -158,11 +162,14 @@ export default {
|
|
|
return this.onlyRead ?
|
|
|
[{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }] :
|
|
|
[{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }]
|
|
|
- }
|
|
|
+ },
|
|
|
+ batchDate() {
|
|
|
+ return !(!this.onlyRead && this.copyMain)
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- options: [{
|
|
|
+ options: [{
|
|
|
value: true,
|
|
|
label: '只读模式'
|
|
|
}, {
|
|
@@ -215,12 +222,14 @@ export default {
|
|
|
floorData: [],
|
|
|
curDevice: '',//当前点击的设备id
|
|
|
addData: {}, //添加设备选择的设备类型
|
|
|
+ dataFirmType:'row',
|
|
|
inputMap: {
|
|
|
flowBuild: 'D1'
|
|
|
}, //信息点和输入方式映射表
|
|
|
updateInputShow: false, //是否显示临时维护输入框
|
|
|
updateInfoPoint: '',//临时维护信息点
|
|
|
updateInput: '', //临时维护信息点值
|
|
|
+ firmName: '',//维护信息显示厂家名称
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -593,6 +602,7 @@ export default {
|
|
|
},
|
|
|
// 更新
|
|
|
updateBusiness(data, change) {
|
|
|
+ debugger
|
|
|
let param = {
|
|
|
Content: [],
|
|
|
Projection: []
|
|
@@ -657,9 +667,49 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ // 接受维护信息传来的四大厂商对应code,显示弹窗
|
|
|
+ fourVendors(code) {
|
|
|
+ switch (code) {
|
|
|
+ //品牌型号弹窗
|
|
|
+ case 'DPManufacturerID':
|
|
|
+ this.dataFirmType = 'dia'
|
|
|
+ this.myDialog.firm = true;
|
|
|
+ break;
|
|
|
+ //供应商信息弹窗
|
|
|
+ case 'DPSupplierID':
|
|
|
+ this.myDialog.supplier = true;
|
|
|
+ break;
|
|
|
+ //维修商信息弹窗
|
|
|
+ case 'DPMaintainerID':
|
|
|
+ this.myDialog.maintainer = true;
|
|
|
+ break;
|
|
|
+ //保险公司信息
|
|
|
+ case 'DPInsurerID':
|
|
|
+ this.myDialog.insurer = true;
|
|
|
+ break;
|
|
|
+ //保险文件--设备文档--安装质检报告
|
|
|
+ case 'LedgerParam.InsuranceDoc.InsuranceFile':
|
|
|
+ case 'LedgerParam.PhotoDoc.Archive':
|
|
|
+ case 'LedgerParam.Siteinstall.CheckReport':
|
|
|
+ this.myDialog.uploadFiles = true;
|
|
|
+ break;
|
|
|
+ //安装照片--安装图纸--设备铭牌照片--设备图纸
|
|
|
+ case 'LedgerParam.Siteinstall.InstallPic':
|
|
|
+ case 'LedgerParam.Siteinstall.InstallDrawing':
|
|
|
+ case 'LedgerParam.PhotoDoc.Nameplate':
|
|
|
+ case 'LedgerParam.PhotoDoc.Drawing':
|
|
|
+ this.myDialog.uploadImgs = true;
|
|
|
+ break;
|
|
|
+ //设备照片
|
|
|
+ case 'LedgerParam.PhotoDoc.Pic':
|
|
|
+ this.myDialog.pic = true;
|
|
|
+ break;
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
//获取到了正确的信息
|
|
|
getInfors(infos, row, el) {
|
|
|
- let val = this.hot.colToProp(row.col);
|
|
|
+ let val = this.hot.colToProp(row.col);
|
|
|
let inputMode = this.inputMap[val];
|
|
|
this.row = row.row;
|
|
|
this.messKey = val;
|
|
@@ -695,6 +745,7 @@ export default {
|
|
|
//品牌型号弹窗
|
|
|
case 'DPManufacturerID':
|
|
|
if (!this.onlyRead) {
|
|
|
+ this.dataFirmType = 'row'
|
|
|
this.myDialog.firm = true;
|
|
|
}
|
|
|
return false
|
|
@@ -831,6 +882,10 @@ export default {
|
|
|
},
|
|
|
//如果选择供应商之后
|
|
|
supplierChange(data) {
|
|
|
+ let firm = {...data, num: 8}
|
|
|
+ this.firmName = firm
|
|
|
+ console.log(data, '供应商')
|
|
|
+ debugger
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
|
|
|
this.handleUpdataTable(
|
|
@@ -846,7 +901,7 @@ export default {
|
|
|
supplyChange(data) {
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContractID", { id: data })
|
|
|
},
|
|
|
- //保险单号-保险文件
|
|
|
+ //保险单号-保险文件
|
|
|
guaranteeChange(data) {
|
|
|
for (let key in data) {
|
|
|
this.utilToKey(key, "insuranceNo", data, "InsuranceNum")
|
|
@@ -859,7 +914,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//选择型号修改
|
|
|
- firmChange(data) {
|
|
|
+ firmChange(data,type) {
|
|
|
+ let firm = {...data, num: 2, name: `${data.brand}/${data.name}`}
|
|
|
+ console.log(firm, '型号')
|
|
|
+ this.firmName = firm
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
|
|
@@ -876,6 +934,8 @@ export default {
|
|
|
},
|
|
|
//保险商变更
|
|
|
changeInsurer(data) {
|
|
|
+ let firm = {...data, num: 42}
|
|
|
+ this.firmName = firm
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
|
|
|
this.handleUpdataTable(
|
|
@@ -889,6 +949,9 @@ export default {
|
|
|
},
|
|
|
//维修商变更
|
|
|
changeMaintainer(data) {
|
|
|
+ let firm = {...data, num: 35}
|
|
|
+ this.firmName = firm
|
|
|
+ console.log(data)
|
|
|
tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
|
|
|
this.handleUpdataTable(
|
|
@@ -907,7 +970,9 @@ export default {
|
|
|
},
|
|
|
//上传文件弹窗触发事件
|
|
|
fileChange(keys) {
|
|
|
- this.setDataToMain(keys, this.messKey, this.row);
|
|
|
+ console.log(keys, '===key====', keys.length, this.messKey)
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
+
|
|
|
},
|
|
|
//上传图片弹窗触发事件
|
|
|
imgChange(keys) {
|
|
@@ -940,6 +1005,10 @@ export default {
|
|
|
tools.setDataForKey(this.tableData[row], key, "");
|
|
|
}
|
|
|
},
|
|
|
+ // 批量信息维护
|
|
|
+ Batch() {
|
|
|
+ this.$refs.batchDialogs.batchDialog = true
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
projectId() {
|