Explorar el Código

添加临时维护信息点弹窗

zhangyu hace 5 años
padre
commit
93a0841dd3

+ 60 - 15
src/components/ledger/handsontables/assets.vue

@@ -46,6 +46,19 @@
     <!-- <dialog-assets :assetType="[this.mess.deviceId]"  @close="closeDialog" ref="assets" v-if="myDialog.addDevice" :dialog="myDialog" ></dialog-assets> -->
     <details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
     <look-pic :dialog="myDialog" :keysArr="picsArr"></look-pic>
+    <!-- 不支持的输入方式 -->
+    <el-dialog title="临时维护信息点" :visible.sync="myDialog.update" @close="handleCloseUpdate" width="670px">
+      <el-row>
+        该信息点未定义对应组件,现在维护数据不确定后续是否可用。如确实需要维护,请点击<el-link @click="updateInputShow = true" type="primary" :underline="false">继续维护</el-link>。
+      </el-row>
+      <el-row style="margin-top:20px;" v-show="updateInputShow">
+        <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8}" placeholder="请输入内容" v-model="updateInput"></el-input>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="myDialog.update = false">取 消</el-button>
+        <el-button type="primary" @click="handleClickUpdate">确 认</el-button>
+      </span>
+    </el-dialog>
     <!-- 新增资产 -->
     <el-dialog class="add-assets" :title="showAddByDie?'未关联资产的设备批量创建资产':'确定新增资产类型'" @close="showAddByDie = false" :visible.sync="myDialog.addDevice" width="670px">
       <el-row>
@@ -165,6 +178,7 @@ export default {
         details: false,//详情页
         changeRea: false,//关联资产
         lookPic: false,//图片查看
+        update: false,//临时维护信息点
       },
       row: null, //被修改的row
       filesArr: [], //保存临时的文件key
@@ -192,7 +206,13 @@ export default {
         floorId:'',
         Family:''
       },
-      dieNum: 0 // 查询设备部件数量
+      dieNum: 0, // 查询设备部件数量
+      inputMap: {
+        flowBuild: 'D1'
+      }, //信息点和输入方式映射表
+      updateInputShow: false, //是否显示临时维护输入框
+      updateInfoPoint: '',//临时维护信息点
+      updateInput: '', //临时维护信息点值
     };
   },
   methods: {
@@ -211,6 +231,11 @@ export default {
         };
         getDataDictionary(params, res => {
           this.tableHeader = res.Content;
+          this.tableHeader.forEach(item => {
+            if(item.Path && item.InputMode){
+              this.inputMap[item.Path] = item.InputMode
+            }
+          })
           this.getTableData()
         });
       }
@@ -675,6 +700,7 @@ export default {
     //获取到了正确的信息
     getInfors(infos, row, el) {
       let val = this.hot.colToProp(row.col);
+      let inputMode = this.inputMap[val];
       this.row = row.row;
       this.messKey = val;
       switch (val) {
@@ -682,7 +708,7 @@ export default {
         case 'caozuo':
           // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
           this.$message("开发中...")
-          break;
+          return false
         //资产二维码图片
         case 'EquipQRCode':
           this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
@@ -691,7 +717,7 @@ export default {
           } else {
             this.$message("此资产没有资产二维码");
           }
-          break;
+          return false
         //关联系统
         case 'LinkSystem':
           if (!this.onlyRead) {
@@ -699,37 +725,37 @@ export default {
             this.systemList = this.tableData[row.row].LinkSystem || [];
             this.myDialog.systemType = true;
           }
-          break;
+          return false
         //关联资产
         case 'LinkEquipLocalName':
           if (this.linkNameFalg) {
             this.myDialog.changeRea = true;
           }
-          break;
+          return false
         //品牌型号弹窗
         case 'DPManufacturerID':
           if (!this.onlyRead) {
             this.myDialog.firm = true;
           }
-          break;
+          return false
         //供应商信息弹窗
         case 'DPSupplierID':
           if (!this.onlyRead) {
             this.myDialog.supplier = true;
           }
-          break;
+          return false
         //维修商信息弹窗
         case 'DPMaintainerID':
           if (!this.onlyRead) {
             this.myDialog.maintainer = true;
           }
-          break;
+          return false
         //保险公司信息
         case 'DPInsurerID':
           if (!this.onlyRead) {
             this.myDialog.insurer = true;
           }
-          break;
+          return false
         //供应合同编号
         case 'LedgerParam.SupplyPurchase.SupplierContractID':
           if (!this.onlyRead) {
@@ -745,7 +771,7 @@ export default {
               this.$message("请先选择供应商");
             }
           }
-          break;
+          return false
         //保险单号
         case 'LedgerParam.InsuranceDoc.InsuranceNum':
           if (!this.onlyRead) {
@@ -761,7 +787,7 @@ export default {
               this.$message("请先选择保险商");
             }
           }
-          break;
+          return false
         //保险文件--资产文档--安装质检报告
         case 'LedgerParam.InsuranceDoc.InsuranceFile':
         case 'LedgerParam.PhotoDoc.Archive':
@@ -769,7 +795,7 @@ export default {
           let IPSdata = tools.dataForKey(this.tableData[row.row], val);
           this.filesArr = IPSdata ? IPSdata : [];
           this.myDialog.uploadFiles = true;
-          break;
+          return false
         //安装照片--安装图纸--资产铭牌照片--资产图纸
         case 'LedgerParam.Siteinstall.InstallPic':
         case 'LedgerParam.Siteinstall.InstallDrawing':
@@ -778,13 +804,13 @@ export default {
           let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
           this.imgsArr = SSPPdata ? SSPPdata : [];
           this.myDialog.uploadImgs = true;
-          break;
+          return false
         //资产照片
         case 'LedgerParam.PhotoDoc.Pic':
           let Pdata = tools.dataForKey(this.tableData[row.row], val);
           this.picsArr = Pdata ? Pdata : [];
           this.myDialog.pic = true;
-          break;
+          return false
         //包含的部件字段
         case 'Count':
           if (this.onlyRead) {
@@ -792,10 +818,29 @@ export default {
           } else {
             this.$router.push({ path: '/ledger/partsmanage', query: { deviceId: infos.EquipID, typeId: this.mess.deviceId } });
           }
-          break;
+          return false
         default:
           break;
       }
+      if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
+        this.updateInfoPoint = val
+        this.updateInput = tools.dataForKey(this.tableData[row.row], val)
+        this.myDialog.update = true
+      }
+    },
+    //关闭临时维护弹窗回调
+    handleCloseUpdate() {
+      this.updateInputShow = false
+      this.updateInfoPoint = ''
+      this.updateInput = ''
+    },
+    //更新临时维护信息点
+    handleClickUpdate(){
+      tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
+      this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
+      this.updateInputShow = false
+      this.myDialog.update = false
+      this.updateInput = ''
     },
     //获取被筛选掉的行号
     trimmedRows() {

+ 9 - 3
src/components/ledger/handsontables/device.vue

@@ -172,9 +172,6 @@ export default {
       tableData: [],
       mess: {},
       tableHeader: null,
-      inputMap: {
-        flowBuild: 'D1'
-      }, //信息点和输入方式映射表
       page: {
         size: 50,
         sizes: [10, 30, 50, 100, 150, 200],
@@ -217,7 +214,11 @@ export default {
       floorData: [],
       curDevice: '',//当前点击的设备id
       addData: {}, //添加设备选择的设备类型
+      inputMap: {
+        flowBuild: 'D1'
+      }, //信息点和输入方式映射表
       updateInputShow: false, //是否显示临时维护输入框
+      updateInfoPoint: '',//临时维护信息点
       updateInput: '', //临时维护信息点值
     };
   },
@@ -782,6 +783,7 @@ export default {
           break;
       }
       if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
+        this.updateInfoPoint = val
         this.updateInput = tools.dataForKey(this.tableData[row.row], val)
         this.myDialog.update = true
       }
@@ -789,11 +791,15 @@ export default {
     //关闭临时维护弹窗回调
     handleCloseUpdate() {
       this.updateInputShow = false
+      this.updateInfoPoint = ''
       this.updateInput = ''
     },
     //更新临时维护信息点
     handleClickUpdate(){
+      tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
+      this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
       this.updateInputShow = false
+      this.myDialog.update = false
       this.updateInput = ''
     },
     //获取被筛选掉的行号

+ 48 - 3
src/components/ledger/handsontables/system.vue

@@ -31,6 +31,19 @@
     <!-- <dialog-assets :assetType="[this.mess.deviceId]" @close="getClose" v-if="myDialog.addDevice" ref="assets" :dialog="myDialog"></dialog-assets> -->
     <details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
     <system-relevance @close="reset" :id="systemId" :dialog="myDialog"></system-relevance>
+    <!-- 不支持的输入方式 -->
+    <el-dialog title="临时维护信息点" :visible.sync="myDialog.update" @close="handleCloseUpdate" width="670px">
+      <el-row>
+        该信息点未定义对应组件,现在维护数据不确定后续是否可用。如确实需要维护,请点击<el-link @click="updateInputShow = true" type="primary" :underline="false">继续维护</el-link>。
+      </el-row>
+      <el-row style="margin-top:20px;" v-show="updateInputShow">
+        <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8}" placeholder="请输入内容" v-model="updateInput"></el-input>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="myDialog.update = false">取 消</el-button>
+        <el-button type="primary" @click="handleClickUpdate">确 认</el-button>
+      </span>
+    </el-dialog>
     <!-- 新增系统 -->
     <el-dialog title="确定新增系统的类型" :visible.sync="myDialog.addDevice" width="30%">
       <el-row>
@@ -126,6 +139,7 @@ export default {
         addDevice: false,
         details: false,//详情页
         relevance: false,//关联设备
+        update: false,//临时维护信息点
       },
       row: null,//被修改的row
       filesArr: [],//保存临时的文件key
@@ -142,6 +156,12 @@ export default {
       qrcodeUrl: "",//二维码图片地址
       loading: false,
       addData: {}, //添加设备选择的设备类型
+      inputMap: {
+        flowBuild: 'D1'
+      }, //信息点和输入方式映射表
+      updateInputShow: false, //是否显示临时维护输入框
+      updateInfoPoint: '',//临时维护信息点
+      updateInput: '', //临时维护信息点值
     };
   },
   created() {
@@ -166,6 +186,11 @@ export default {
         }
         getDataDictionary(params, res => {
           this.tableHeader = res.Content;
+          this.tableHeader.forEach(item => {
+            if(item.Path && item.InputMode){
+              this.inputMap[item.Path] = item.InputMode
+            }
+          })
           this.getTableData()
         });
       }
@@ -486,6 +511,7 @@ export default {
     getInfors(infos, row) {
       //其他的开始判断
       let val = this.hot.colToProp(row.col);
+      let inputMode = this.inputMap[val];
       this.systemId = infos.SysID
       this.row = row.row
       this.messKey = val
@@ -494,7 +520,7 @@ export default {
         case 'caozuo':
           // window.open(`http://adm.sagacloud.cn:8058/system?id=${infos.id}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
           this.$message("开发中...")
-          break;
+          return false
         //设备二维码图片
         case 'EquipQRCode':
           this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
@@ -503,16 +529,35 @@ export default {
           } else {
             this.$message("此设备没有设备二维码");
           }
-          break;
+          return false
         //关联设备数量
         case 'Count':
           if (!this.onlyRead) {
             this.myDialog.relevance = true
           }
-          break;
+          return false
         default:
           break;
       }
+      if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
+        this.updateInfoPoint = val
+        this.updateInput = tools.dataForKey(this.tableData[row.row], val)
+        this.myDialog.update = true
+      }
+    },
+    //关闭临时维护弹窗回调
+    handleCloseUpdate() {
+      this.updateInputShow = false
+      this.updateInfoPoint = ''
+      this.updateInput = ''
+    },
+    //更新临时维护信息点
+    handleClickUpdate(){
+      tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
+      this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
+      this.updateInputShow = false
+      this.myDialog.update = false
+      this.updateInput = ''
     },
     //获取被筛选掉的行号
     trimmedRows() {

+ 12 - 2
src/utils/handsontable/fillterField.js

@@ -11,11 +11,21 @@ const data = {
   },
   tenant: { //租户
     onlyRead: [],
-    edit: []
+    edit: [
+      "TenantID",
+      "TenantName",
+      "BIMID",
+      "BIMLocation"
+    ]
   },
   shaft: { //竖井
     onlyRead: [],
-    edit: []
+    edit: [
+      "ShaftID",
+      "ShaftName",
+      "BIMID",
+      "BIMLocation"
+    ]
   },
   parts: { //部件
     onlyRead: [],

+ 48 - 1
src/views/ledger/cenotelist/index.vue

@@ -55,6 +55,19 @@
       layout="total, sizes, prev, pager, next, jumper"
       :total="page.total">
     </el-pagination>
+    <!-- 不支持的输入方式 -->
+    <el-dialog title="临时维护信息点" :visible.sync="myDialog.update" @close="handleCloseUpdate" width="670px">
+      <el-row>
+        该信息点未定义对应组件,现在维护数据不确定后续是否可用。如确实需要维护,请点击<el-link @click="updateInputShow = true" type="primary" :underline="false">继续维护</el-link>。
+      </el-row>
+      <el-row style="margin-top:20px;" v-show="updateInputShow">
+        <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8}" placeholder="请输入内容" v-model="updateInput"></el-input>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="myDialog.update = false">取 消</el-button>
+        <el-button type="primary" @click="handleClickUpdate">确 认</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -97,7 +110,14 @@ export default {
       },
       tableData: [],
       copyTableData: [],
-      tableExample:null
+      tableExample:null,
+      myDialog: {
+        update: false,//临时维护信息点
+      },
+      inputMap: { }, //信息点和输入方式映射表
+      updateInputShow: false, //是否显示临时维护输入框
+      updateInfoPoint: '',//临时维护信息点
+      updateInput: '', //临时维护信息点值
     };
   },
   computed: {
@@ -141,6 +161,11 @@ export default {
       }
       await getDataDictionary(param, res => {
         this.tableHeader = res.Content;
+        this.tableHeader.forEach(item => {
+          if(item.Path && item.InputMode){
+            this.inputMap[item.Path] = item.InputMode
+          }
+        })
         this.getTableData()
       })
     },
@@ -342,12 +367,14 @@ export default {
     getInfors(infos, row) {
       //其他的开始判断
       let val = this.tableExample.colToProp(row.col)
+      let inputMode = this.inputMap[val]
       let name = infos.ShaftLocalName?infos.ShaftLocalName:infos.ShaftName
       this.shaftId = infos.ShaftID //要操作的数据id
       //点击关联的元空间
       if (val === "SpaceCount") {
         this.spaceList = infos.SpaceList
         this.isTableRightShow = true
+        return false
       } else if (val === "OtheRelations") {
         this.$router.push({
           path: "/ledger/cenoteDetail",
@@ -356,7 +383,27 @@ export default {
             name: name
           }
         })
+        return false
       }
+      if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
+        this.updateInfoPoint = val
+        this.updateInput = tools.dataForKey(this.tableData[row.row], val)
+        this.myDialog.update = true
+      }
+    },
+    //关闭临时维护弹窗回调
+    handleCloseUpdate() {
+      this.updateInputShow = false
+      this.updateInfoPoint = ''
+      this.updateInput = ''
+    },
+    //更新临时维护信息点
+    handleClickUpdate(){
+      tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
+      this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
+      this.updateInputShow = false
+      this.myDialog.update = false
+      this.updateInput = ''
     },
     //表格点击事件
     handleTdClick(el, rowArr) {

+ 53 - 4
src/views/ledger/rentlist/index.vue

@@ -69,6 +69,19 @@
       layout="total, sizes, prev, pager, next, jumper"
       :total="page.total">
     </el-pagination>
+    <!-- 不支持的输入方式 -->
+    <el-dialog title="临时维护信息点" :visible.sync="myDialog.update" @close="handleCloseUpdate" width="670px">
+      <el-row>
+        该信息点未定义对应组件,现在维护数据不确定后续是否可用。如确实需要维护,请点击<el-link @click="updateInputShow = true" type="primary" :underline="false">继续维护</el-link>。
+      </el-row>
+      <el-row style="margin-top:20px;" v-show="updateInputShow">
+        <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8}" placeholder="请输入内容" v-model="updateInput"></el-input>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="myDialog.update = false">取 消</el-button>
+        <el-button type="primary" @click="handleClickUpdate">确 认</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -111,7 +124,16 @@ export default {
         total: 0
       },
       tableData: [],
-      copyTableData: []
+      copyTableData: [],
+      myDialog: {
+        update: false,//临时维护信息点
+      },
+      inputMap: {
+        FloorId: 'B1'
+      }, //信息点和输入方式映射表
+      updateInputShow: false, //是否显示临时维护输入框
+      updateInfoPoint: '',//临时维护信息点
+      updateInput: '', //临时维护信息点值
     };
   },
   computed: {
@@ -158,6 +180,11 @@ export default {
       }
       await getDataDictionary(param, res => {
         this.tableHeader = res.Content;
+        this.tableHeader.forEach(item => {
+          if(item.Path && item.InputMode){
+            this.inputMap[item.Path] = item.InputMode
+          }
+        })
         this.getTableData()
       })
     },
@@ -360,14 +387,16 @@ export default {
     //获取到了正确的信息
     getInfors(infos, row) {
       //其他的开始判断
-      let val = this.tableExample.colToProp(row.col);
+      let val = this.tableExample.colToProp(row.col)
+      let inputMode = this.inputMap[val]
       this.row = row.row //要操作的列号
       this.messKey = val //要操作的列类型
       this.tenantID = infos.TenantID //要操作的数据id
       //点击操作跳转详情
       if (val === "caozuo") {
-
-        window.open(`${process.env.BASE_URL}:8889/#/details?perjectId=${this.projectId}&secret=${this.secret}&FmId=${this.tenantID}&type=0&code=VOTn`,"_blank")
+        this.$message("开发中!")
+        // window.open(`${process.env.BASE_URL}:8889/#/details?perjectId=${this.projectId}&secret=${this.secret}&FmId=${this.tenantID}&type=0&code=VOTn`,"_blank")
+        return false
       }
       //点击关联的元空间
       if (val === "RoomCount") {
@@ -377,7 +406,27 @@ export default {
           this.roomId = ""
         }
         this.isTableRightShow = true;
+        return false
       }
+      if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
+        this.updateInfoPoint = val
+        this.updateInput = tools.dataForKey(this.tableData[row.row], val)
+        this.myDialog.update = true
+      }
+    },
+    //关闭临时维护弹窗回调
+    handleCloseUpdate() {
+      this.updateInputShow = false
+      this.updateInfoPoint = ''
+      this.updateInput = ''
+    },
+    //更新临时维护信息点
+    handleClickUpdate(){
+      tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
+      this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
+      this.updateInputShow = false
+      this.myDialog.update = false
+      this.updateInput = ''
     },
     //表格点击事件
     handleTdClick(el, rowArr) {