Forráskód Böngészése

Merge branch 'graphEq'

shaun-sheep 4 éve
szülő
commit
0e2d943b9a

+ 1 - 1
package.json

@@ -20,7 +20,7 @@
   },
   "dependencies": {
     "@saga-web/base": "2.1.27",
-    "@saga-web/cad-engine": "2.0.578",
+    "@saga-web/cad-engine": "2.0.581",
     "@saga-web/draw": "2.1.110",
     "@saga-web/graph": "2.1.133",
     "@saga-web/topology": "1.0.85",

+ 26 - 26
src/components/business_space/dialogs/list/insurerDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -111,29 +111,29 @@ export default {
       }
       getLib({ "type": ["insurance"] }).then(res => {
         if (res.data.result == "success") {
-          let data = res.data.content.insurance.map(item => {
-            if (item.contacts && item.contacts.length) {
-              item.contacts.map(child => {
-                if (child.projectId == this.projectId) {
-                  item.phone = child.phone
-                  item.man = child.name
-                  item.fox = child.fox
-                  item.email = child.email
-                }
-                return child
-              })
-            }
-            if (!item.man) {
-              item.man = "--"
-              item.phone = "--"
-              item.fox = "--"
-              item.email = "--"
-            }
-            return item
-          })
-          this.allData = tools.deepCopy(data)
+          // let data = res.data.content.insurance.map(item => {
+          //   if (item.contacts && item.contacts.length) {
+          //     item.contacts.map(child => {
+          //       if (child.projectId == this.projectId) {
+          //         item.phone = child.phone
+          //         item.man = child.name
+          //         item.fox = child.fox
+          //         item.email = child.email
+          //       }
+          //       return child
+          //     })
+          //   }
+          //   if (!item.man) {
+          //     item.man = "--"
+          //     item.phone = "--"
+          //     item.fox = "--"
+          //     item.email = "--"
+          //   }
+          //   return item
+          // })
+          this.allData = tools.deepCopy(res.data.content.supplier)
           this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-          this.page.total = data.length
+          this.page.total = this.allData.length
         } else {
           this.$message.error("请求失败:" + res.data.resultMsg)
         }

+ 26 - 26
src/components/business_space/dialogs/list/maintainerDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -109,29 +109,29 @@ export default {
       }
       getLib({ "type": ["maintenance"] }).then(res => {
         if (res.data.result == "success") {
-          let data = res.data.content.maintenance.map(item => {
-            if (item.contacts && item.contacts.length) {
-              item.contacts.map(child => {
-                if (child.projectId == this.projectId) {
-                  item.phone = child.phone
-                  item.man = child.name
-                  item.fox = child.fox
-                  item.email = child.email
-                }
-                return child
-              })
-            }
-            if (!item.man) {
-              item.man = "--"
-              item.phone = "--"
-              item.fox = "--"
-              item.email = "--"
-            }
-            return item
-          })
-          this.allData = tools.deepCopy(data)
+          // let data = res.data.content.maintenance.map(item => {
+          //   if (item.contacts && item.contacts.length) {
+          //     item.contacts.map(child => {
+          //       if (child.projectId == this.projectId) {
+          //         item.phone = child.phone
+          //         item.man = child.name
+          //         item.fox = child.fox
+          //         item.email = child.email
+          //       }
+          //       return child
+          //     })
+          //   }
+          //   if (!item.man) {
+          //     item.man = "--"
+          //     item.phone = "--"
+          //     item.fox = "--"
+          //     item.email = "--"
+          //   }
+          //   return item
+          // })
+          this.allData = tools.deepCopy(res.data.content.maintenance)
           this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-          this.page.total = data.length
+          this.page.total = this.allData.length
         } else {
           this.$message.error("请求失败:" + res.data.resultMsg)
         }

+ 26 - 26
src/components/business_space/dialogs/list/supplierDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -109,29 +109,29 @@ export default {
       }
       getLib({ "type": ["supplier"] }).then(res => {
         if (res.data.result == "success") {
-          let data = res.data.content.supplier.map(item => {
-            if (item.contacts && item.contacts.length) {
-              item.contacts.map(child => {
-                if (child.projectId == this.projectId) {
-                  item.phone = child.phone
-                  item.man = child.name
-                  item.fox = child.fox
-                  item.email = child.email
-                }
-                return child
-              })
-            }
-            if (!item.man) {
-              item.man = "--"
-              item.phone = "--"
-              item.fox = "--"
-              item.email = "--"
-            }
-            return item
-          })
-          this.allData = tools.deepCopy(data)
+          // let data = res.data.content.supplier.map(item => {
+          //   if (item.contacts && item.contacts.length) {
+          //     item.contacts.map(child => {
+          //       if (child.projectId == this.projectId) {
+          //         item.phone = child.phone
+          //         item.man = child.name
+          //         item.fox = child.fox
+          //         item.email = child.email
+          //       }
+          //       return child
+          //     })
+          //   }
+          //   if (!item.man) {
+          //     item.man = "--"
+          //     item.phone = "--"
+          //     item.fox = "--"
+          //     item.email = "--"
+          //   }
+          //   return item
+          // })
+          this.allData = tools.deepCopy(res.data.content.supplier)
           this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-          this.page.total = data.length
+          this.page.total = this.allData.length
         } else {
           this.$message.error("请求失败:" + res.data.resultMsg)
         }

+ 26 - 26
src/components/dialogs/list/insurerDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -114,29 +114,29 @@
                 }
                 getLib({"type": ["insurance"]}).then(res => {
                     if (res.data.result == "success") {
-                        let data = res.data.content.insurance.map(item => {
-                            if (item.contacts && item.contacts.length) {
-                                item.contacts.map(child => {
-                                    if (child.projectId == this.projectId) {
-                                        item.phone = child.phone
-                                        item.man = child.name
-                                        item.fox = child.fox
-                                        item.email = child.email
-                                    }
-                                    return child
-                                })
-                            }
-                            if (!item.man) {
-                                item.man = "--"
-                                item.phone = "--"
-                                item.fox = "--"
-                                item.email = "--"
-                            }
-                            return item
-                        })
-                        this.allData = tools.deepCopy(data)
+                        // let data = res.data.content.insurance.map(item => {
+                        //     if (item.contacts && item.contacts.length) {
+                        //         item.contacts.map(child => {
+                        //             if (child.projectId == this.projectId) {
+                        //                 item.phone = child.phone
+                        //                 item.man = child.name
+                        //                 item.fox = child.fox
+                        //                 item.email = child.email
+                        //             }
+                        //             return child
+                        //         })
+                        //     }
+                        //     if (!item.man) {
+                        //         item.man = "--"
+                        //         item.phone = "--"
+                        //         item.fox = "--"
+                        //         item.email = "--"
+                        //     }
+                        //     return item
+                        // })
+                        this.allData = tools.deepCopy(res.data.content.insurance)
                         this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-                        this.page.total = data.length
+                        this.page.total = this.allData.length
                     } else {
                         this.$message.error("请求失败:" + res.data.resultMsg)
                     }

+ 26 - 26
src/components/dialogs/list/maintainerDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -113,29 +113,29 @@
                 }
                 getLib({"type": ["maintenance"]}).then(res => {
                     if (res.data.result == "success") {
-                        let data = res.data.content.maintenance.map(item => {
-                            if (item.contacts && item.contacts.length) {
-                                item.contacts.map(child => {
-                                    if (child.projectId == this.projectId) {
-                                        item.phone = child.phone
-                                        item.man = child.name
-                                        item.fox = child.fox
-                                        item.email = child.email
-                                    }
-                                    return child
-                                })
-                            }
-                            if (!item.man) {
-                                item.man = "--"
-                                item.phone = "--"
-                                item.fox = "--"
-                                item.email = "--"
-                            }
-                            return item
-                        })
-                        this.allData = tools.deepCopy(data)
+                        // let data = res.data.content.maintenance.map(item => {
+                        //     if (item.contacts && item.contacts.length) {
+                        //         item.contacts.map(child => {
+                        //             if (child.projectId == this.projectId) {
+                        //                 item.phone = child.phone
+                        //                 item.man = child.name
+                        //                 item.fox = child.fox
+                        //                 item.email = child.email
+                        //             }
+                        //             return child
+                        //         })
+                        //     }
+                        //     if (!item.man) {
+                        //         item.man = "--"
+                        //         item.phone = "--"
+                        //         item.fox = "--"
+                        //         item.email = "--"
+                        //     }
+                        //     return item
+                        // })
+                        this.allData = tools.deepCopy(res.data.content.maintenance)
                         this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-                        this.page.total = data.length
+                        this.page.total = this.allData.length
                     } else {
                         this.$message.error("请求失败:" + res.data.resultMsg)
                     }

+ 26 - 26
src/components/dialogs/list/supplierDialog.vue

@@ -26,10 +26,10 @@
               </template>
             </el-table-column>
             <el-table-column header-align='center' prop="website" label="网址"></el-table-column>
-            <el-table-column header-align='center' prop="man" label="联系人"></el-table-column>
-            <el-table-column header-align='center' prop="phone" label="联系电话"></el-table-column>
-            <el-table-column header-align='center' prop="faxes" label="传真"></el-table-column>
-            <el-table-column header-align='center' prop="email" label="电子邮件"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].name" label="联系人"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].phone" label="联系电话"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].fax" label="传真"></el-table-column>
+            <el-table-column header-align='center' prop="contacts[0].email" label="电子邮件"></el-table-column>
           </el-table>
         </el-radio-group>
         <div class="right" style="background: #fff;">
@@ -113,29 +113,29 @@
                 }
                 getLib({"type": ["supplier"]}).then(res => {
                     if (res.data.result == "success") {
-                        let data = res.data.content.supplier.map(item => {
-                            if (item.contacts && item.contacts.length) {
-                                item.contacts.map(child => {
-                                    if (child.projectId == this.projectId) {
-                                        item.phone = child.phone
-                                        item.man = child.name
-                                        item.fox = child.fox
-                                        item.email = child.email
-                                    }
-                                    return child
-                                })
-                            }
-                            if (!item.man) {
-                                item.man = "--"
-                                item.phone = "--"
-                                item.fox = "--"
-                                item.email = "--"
-                            }
-                            return item
-                        })
-                        this.allData = tools.deepCopy(data)
+                        // let data = res.data.content.supplier.map(item => {
+                        //     if (item.contacts && item.contacts.length) {
+                        //         item.contacts.map(child => {
+                        //             if (child.projectId == this.projectId) {
+                        //                 item.phone = child.phone
+                        //                 item.man = child.name
+                        //                 item.fox = child.fox
+                        //                 item.email = child.email
+                        //             }
+                        //             return child
+                        //         })
+                        //     }
+                        //     if (!item.man) {
+                        //         item.man = "--"
+                        //         item.phone = "--"
+                        //         item.fox = "--"
+                        //         item.email = "--"
+                        //     }
+                        //     return item
+                        // })
+                        this.allData = tools.deepCopy(res.data.content.supplier)
                         this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-                        this.page.total = data.length
+                        this.page.total = this.allData.length
                     } else {
                         this.$message.error("请求失败:" + res.data.resultMsg)
                     }

+ 57 - 28
src/components/ledger/handsontables/assets.vue

@@ -1071,15 +1071,25 @@
           let firm = {...data, num: 8}
           this.firmName = firm
         } else {
-        tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
-        tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
-        this.handleUpdataTable(
-          [
-            [this.row, "DPSupplierID", null, data.venderId],
-            [this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]
-          ],
-          "edit"
-        )
+          tools.setDataForKey(this.tableData[this.row], 'DPSupplierID', data.venderId)
+          tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.Supplier', data.name)
+          tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierPhone', data.contacts[0]?data.contacts[0].phone:null)
+          tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierContactor', data.contacts[0]?data.contacts[0].name:null)
+          tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierWeb', data.website?data.website:null)
+          tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierEmail', data.contacts[0]?data.contacts[0].email:null)
+          tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierFax', data.contacts[0]?data.contacts[0].fax:null)
+          this.handleUpdataTable(
+              [
+                  [this.row, 'DPSupplierID', null, data.venderId],
+                  [this.row, 'LedgerParam.SupplyPurchase.Supplier', null, data.name],
+                  [this.row, 'LedgerParam.SupplyPurchase.SupplierPhone', null, data.contacts[0]?data.contacts[0].phone:null],
+                  [this.row, 'LedgerParam.SupplyPurchase.SupplierContactor', null, data.contacts[0]?data.contacts[0].name:null],
+                  [this.row, 'LedgerParam.SupplyPurchase.SupplierWeb', null, data.website?data.website:null],
+                  [this.row, 'LedgerParam.SupplyPurchase.SupplierEmail', null, data.contacts[0]?data.contacts[0].email:null],
+                  [this.row, 'LedgerParam.SupplyPurchase.SupplierFax', null, data.contacts[0]?data.contacts[0].fax:null],
+              ],
+              'edit'
+          )
         // this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
         }
       },
@@ -1141,15 +1151,25 @@
           let firm = {...data, num: 42}
           this.firmName = firm
         } else {
-        tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
-        tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
-        this.handleUpdataTable(
-          [
-            [this.row, "DPInsurerID", null, data.venderId],
-            [this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]
-          ],
-          "edit"
-        )
+          tools.setDataForKey(this.tableData[this.row], 'DPInsurerID', data.venderId)
+            tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.Insurer', data.name?data.name:null)
+            tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerWeb', data.website?data.website:null)
+            tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerEmail', data.contacts[0]?data.contacts[0].email:null)
+            tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerFax', data.contacts[0]?data.contacts[0].fax:null)
+            tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerPhone', data.contacts[0]?data.contacts[0].phone:null)
+            tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerContactor', data.contacts[0]?data.contacts[0].name:null)
+            this.handleUpdataTable(
+              [
+                [this.row, 'DPInsurerID', null, data.venderId],
+                [this.row, 'LedgerParam.InsuranceDoc.Insurer', null, data.name?data.name:null],
+                [this.row, 'LedgerParam.InsuranceDoc.InsurerWeb', null, data.website?data.website:null],
+                [this.row, 'LedgerParam.InsuranceDoc.InsurerEmail', null, data.contacts[0]?data.contacts[0].email:null],
+                [this.row, 'LedgerParam.InsuranceDoc.InsurerFax', null, data.contacts[0]?data.contacts[0].fax:null],
+                [this.row, 'LedgerParam.InsuranceDoc.InsurerPhone', null, data.contacts[0]?data.contacts[0].phone:null],
+                [this.row, 'LedgerParam.InsuranceDoc.InsurerContactor', null, data.contacts[0]?data.contacts[0].name:null],
+              ],
+              'edit'
+            )
         // this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
         }
       },
@@ -1159,16 +1179,25 @@
           let firm = {...data, num: 35}
           this.firmName = firm
         } else {
-
-        tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
-        tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
-        this.handleUpdataTable(
-          [
-            [this.row, "DPMaintainerID", null, data.venderId],
-            [this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]
-          ],
-          "edit"
-        )
+          tools.setDataForKey(this.tableData[this.row], 'DPMaintainerID', data.venderId)
+          tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.Maintainer', data.name)
+          tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerWeb', data.website?data.website:null)
+          tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerContactor', data.contacts[0]?data.contacts[0].name:null)
+          tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerPhone', data.contacts[0]?data.contacts[0].phone:null)
+          tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerEmail', data.contacts[0]?data.contacts[0].email:null)
+          tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerFax', data.contacts[0]?data.contacts[0].fax:null)
+          this.handleUpdataTable(
+              [
+                  [this.row, 'DPMaintainerID', null, data.venderId],
+                  [this.row, 'LedgerParam.OperationMainte.Maintainer', null, data.name],
+                  [this.row, 'LedgerParam.OperationMainte.MaintainerWeb', null, data.website?data.website:null],
+                  [this.row, 'LedgerParam.OperationMainte.MaintainerContactor', null, data.contacts[0]?data.contacts[0].name:null],
+                  [this.row, 'LedgerParam.OperationMainte.MaintainerPhone', null, data.contacts[0]?data.contacts[0].phone:null],
+                  [this.row, 'LedgerParam.OperationMainte.MaintainerEmail', null, data.contacts[0]?data.contacts[0].email:null],
+                  [this.row, 'LedgerParam.OperationMainte.MaintainerFax', null, data.contacts[0]?data.contacts[0].fax:null],
+              ],
+              'edit'
+          )
         // this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
         }
       },

+ 32 - 2
src/components/ledger/handsontables/device.vue

@@ -1263,10 +1263,20 @@
             } else {
                 tools.setDataForKey(this.tableData[this.row], 'DPSupplierID', data.venderId)
                 tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.Supplier', data.name)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierPhone', data.contacts[0]?data.contacts[0].phone:null)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierContactor', data.contacts[0]?data.contacts[0].name:null)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierWeb', data.website?data.website:null)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierEmail', data.contacts[0]?data.contacts[0].email:null)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierFax', data.contacts[0]?data.contacts[0].fax:null)
                 this.handleUpdataTable(
                     [
                         [this.row, 'DPSupplierID', null, data.venderId],
                         [this.row, 'LedgerParam.SupplyPurchase.Supplier', null, data.name],
+                        [this.row, 'LedgerParam.SupplyPurchase.SupplierPhone', null, data.contacts[0]?data.contacts[0].phone:null],
+                        [this.row, 'LedgerParam.SupplyPurchase.SupplierContactor', null, data.contacts[0]?data.contacts[0].name:null],
+                        [this.row, 'LedgerParam.SupplyPurchase.SupplierWeb', null, data.website?data.website:null],
+                        [this.row, 'LedgerParam.SupplyPurchase.SupplierEmail', null, data.contacts[0]?data.contacts[0].email:null],
+                        [this.row, 'LedgerParam.SupplyPurchase.SupplierFax', null, data.contacts[0]?data.contacts[0].fax:null],
                     ],
                     'edit'
                 )
@@ -1333,11 +1343,21 @@
                 this.firmName = firm
             } else {
                 tools.setDataForKey(this.tableData[this.row], 'DPInsurerID', data.venderId)
-                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.Insurer', data.name)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.Insurer', data.name?data.name:null)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerWeb', data.website?data.website:null)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerEmail', data.contacts[0]?data.contacts[0].email:null)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerFax', data.contacts[0]?data.contacts[0].fax:null)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerPhone', data.contacts[0]?data.contacts[0].phone:null)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerContactor', data.contacts[0]?data.contacts[0].name:null)
                 this.handleUpdataTable(
                     [
                         [this.row, 'DPInsurerID', null, data.venderId],
-                        [this.row, 'LedgerParam.InsuranceDoc.Insurer', null, data.name],
+                        [this.row, 'LedgerParam.InsuranceDoc.Insurer', null, data.name?data.name:null],
+                        [this.row, 'LedgerParam.InsuranceDoc.InsurerWeb', null, data.website?data.website:null],
+                        [this.row, 'LedgerParam.InsuranceDoc.InsurerEmail', null, data.contacts[0]?data.contacts[0].email:null],
+                        [this.row, 'LedgerParam.InsuranceDoc.InsurerFax', null, data.contacts[0]?data.contacts[0].fax:null],
+                        [this.row, 'LedgerParam.InsuranceDoc.InsurerPhone', null, data.contacts[0]?data.contacts[0].phone:null],
+                        [this.row, 'LedgerParam.InsuranceDoc.InsurerContactor', null, data.contacts[0]?data.contacts[0].name:null],
                     ],
                     'edit'
                 )
@@ -1352,10 +1372,20 @@
             } else {
                 tools.setDataForKey(this.tableData[this.row], 'DPMaintainerID', data.venderId)
                 tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.Maintainer', data.name)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerWeb', data.website?data.website:null)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerContactor', data.contacts[0]?data.contacts[0].name:null)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerPhone', data.contacts[0]?data.contacts[0].phone:null)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerEmail', data.contacts[0]?data.contacts[0].email:null)
+                tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerFax', data.contacts[0]?data.contacts[0].fax:null)
                 this.handleUpdataTable(
                     [
                         [this.row, 'DPMaintainerID', null, data.venderId],
                         [this.row, 'LedgerParam.OperationMainte.Maintainer', null, data.name],
+                        [this.row, 'LedgerParam.OperationMainte.MaintainerWeb', null, data.website?data.website:null],
+                        [this.row, 'LedgerParam.OperationMainte.MaintainerContactor', null, data.contacts[0]?data.contacts[0].name:null],
+                        [this.row, 'LedgerParam.OperationMainte.MaintainerPhone', null, data.contacts[0]?data.contacts[0].phone:null],
+                        [this.row, 'LedgerParam.OperationMainte.MaintainerEmail', null, data.contacts[0]?data.contacts[0].email:null],
+                        [this.row, 'LedgerParam.OperationMainte.MaintainerFax', null, data.contacts[0]?data.contacts[0].fax:null],
                     ],
                     'edit'
                 )

+ 21 - 6
src/views/ledger/facility/addfacility.vue

@@ -433,8 +433,13 @@ export default {
     },
     //如果选择供应商之后
     supplierChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
-      tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'DPSupplierID', data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.Supplier', data.name)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierPhone', data.contacts[0]?data.contacts[0].phone:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierContactor', data.contacts[0]?data.contacts[0].name:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierWeb', data.website?data.website:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierEmail', data.contacts[0]?data.contacts[0].email:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierFax', data.contacts[0]?data.contacts[0].fax:null)
     },
     //保险合同
     guaranteeChange(data) {
@@ -458,13 +463,23 @@ export default {
     },
     //维修商变更
     changeMaintainer(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
-      tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'DPMaintainerID', data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.Maintainer', data.name)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerWeb', data.website?data.website:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerContactor', data.contacts[0]?data.contacts[0].name:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerPhone', data.contacts[0]?data.contacts[0].phone:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerEmail', data.contacts[0]?data.contacts[0].email:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerFax', data.contacts[0]?data.contacts[0].fax:null)
     },
     //保险商变更
     changeInsurer(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
-      tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'DPInsurerID', data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.Insurer', data.name?data.name:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerWeb', data.website?data.website:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerEmail', data.contacts[0]?data.contacts[0].email:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerFax', data.contacts[0]?data.contacts[0].fax:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerPhone', data.contacts[0]?data.contacts[0].phone:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerContactor', data.contacts[0]?data.contacts[0].name:null)
     },
     //设备图片弹窗改变事件
     changePics(keys) {

+ 35 - 15
src/views/ledger/facility/batchPoint.vue

@@ -37,8 +37,8 @@
                                     @click="handleSelectIcon(item)"
                                 >
 									<p class="equip-item-text">{{item[showName] || '--'}}</p>
-									<i v-if="item.hasLocation" class="iconfont icon-hook equip-item-icon" style="color: #67C23A;"></i>
-									<i v-else class="iconfont icon-cross equip-item-icon" style="color: #F56C6C;"></i>
+									<i v-if="item.hasLocation" class="iconfont icon-hook equip-item-icon" style="color: #67C23A;font-size: 14px;"></i>
+									<i v-else class="iconfont icon-cross equip-item-icon" style="color: #ccc;font-size: 14px;"></i>
 								</li>
 								<p style="text-align: center;" v-if="loading">加载中...</p>
 								<p style="text-align: center;" v-if="noMore">没有更多了</p>
@@ -71,10 +71,10 @@
                 <el-link icon="el-icon-close" :underline="false" @click="visible = false"></el-link>
             </div>
             <el-row>
-                <p>距地面高度:{{equipZ}}m</p>
+                <p>距地面高度:{{equipZ}}mm</p>
             </el-row>
-            <div style="padding: 10px 15px;">
-                <el-slider v-model="equipZ" :max="maxHeight" :step="0.0001" show-input></el-slider>
+            <div class="elSlider">
+                <el-slider v-model="equipZ" :max="maxHeight" :step="1" :marks="marks"></el-slider>
             </div>
             <el-row style="text-align: right;">
                 <el-button size="mini" @click="visible = false">取消</el-button>
@@ -101,7 +101,7 @@ export default {
     return {
         visible: false,
         equipZ: 0,
-        maxHeight: 99,
+        maxHeight: 99000,
         popoverPosition: {
             top: 0,
             left: 0,
@@ -144,7 +144,11 @@ export default {
           value: "CADID",
           label: "显示图纸编码"
 		}],
-		equipList: [],
+        equipList: [],
+        marks: {
+            0: '本层地面',
+            99000: '本层屋顶'
+        },
 		loading: false,
 		pageNumber: 1,
 		pageSize: 50,
@@ -226,7 +230,7 @@ export default {
         const e = events[0];
         this.selectedIcon = item;
         if (item.data.Z) {
-            this.equipZ = (item.data.Z / 1000);
+            this.equipZ = (item.data.Z);
         } else {
             this.equipZ = 0;
         }
@@ -239,10 +243,17 @@ export default {
     },
     // 修改设备Z坐标
     handleUpdateZ() {
-        if (this.selectedIcon.data.Z !== this.equipZ * 1000) {
-            this.selectedIcon.data.Z = this.equipZ * 1000;
+        if (this.selectedIcon.data.Z !== this.equipZ) {
+            this.selectedIcon.data.Z = this.equipZ;
             this.isChange = true;
             this.visible = false;
+            try {
+                const str = this.selectedIcon.textItemList[0].text.split('\n');
+                str[2] = this.equipZ
+                this.selectedIcon.textItemList[0].text = str.join('\n');
+            } catch (e) {
+                console.log(e);
+            }
         }
     },
     listChange(item, ev) {
@@ -306,13 +317,13 @@ export default {
                                 X: item.LocationJson.X, 
                                 Y: -item.LocationJson.Y, 
                                 Z: item.LocationJson.Z,
-                                text: [`${item.EquipLocalName || '--'}\n${item.EquipLocalID || '--'}\n${item.CADID || '--'}`]
+                                text: [`${item.EquipLocalName || '--'}\n${item.EquipLocalID || '--'}\n${item.LocationJson.Z || '--'}`]
                             });
 						}
                     });
                     this.scene.iconMove(this, this.iconMove);
                     this.scene.spaceClick(this, this.spaceClick);
-                    this.scene.iconClick(this, this.handleClickIcon);
+                    this.scene.iconChangeText(this, this.handleClickIcon);
 					this.view.update();
                     this.canvasLoading = false;
                     this.isChange = false;
@@ -337,17 +348,19 @@ export default {
                 X: e[0].x, 
                 Y: e[0].y, 
                 Z: 0,
-                text: [`${this.equipData.EquipLocalName || '--'}\n${this.equipData.EquipLocalID || '--'}\n${this.equipData.CADID || '--'}`]
+                text: [`${this.equipData.EquipLocalName || '--'}\n${this.equipData.EquipLocalID || '--'}\n0`]
             });
             // 保存按钮
             this.isChange = true;
             // 设置有坐标标识
             this.equipData.hasLocation = true;
             // 绑定事件
-            this.scene.iconClick(this, this.handleClickIcon)
+            this.scene.iconChangeText(this, this.handleClickIcon)
             // 重置打点动作
             this.isMarking = false;
         }
+        // 取消选中状态
+        this.scene && this.scene.selectContainer.clear()
     },
 	//初始化条件并查询设备
 	initParams() {
@@ -384,7 +397,7 @@ export default {
         if (data.StructureInfo && data.StructureInfo.Height) {
             this.maxHeight = data.StructureInfo.Height;
         } else {
-            this.maxHeight = 99;
+            this.maxHeight = 99000;
         }
 		if (data.Outline && data.Outline.length) {
 			this.floorOutline = data.Outline;
@@ -569,6 +582,13 @@ export default {
     position: fixed;
   }
 }
+.elSlider{
+    padding: 10px 24px;
+    margin-bottom:15px;
+    /deep/ .el-slider__marks-text:nth-child(2) {
+        width: 80px;
+    }
+}
 .no-data {
 	height: 100%;
 	text-align: center;

+ 21 - 6
src/views/ledger/facility/partsmanage/addparts/index.vue

@@ -360,18 +360,33 @@ export default {
     },
     //供应商变更
     supplierChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
-      tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'DPSupplierID', data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.Supplier', data.name)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierPhone', data.contacts[0]?data.contacts[0].phone:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierContactor', data.contacts[0]?data.contacts[0].name:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierWeb', data.website?data.website:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierEmail', data.contacts[0]?data.contacts[0].email:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierFax', data.contacts[0]?data.contacts[0].fax:null)
     },
     //保险商变更
     changeInsurer(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
-      tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'DPInsurerID', data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.Insurer', data.name?data.name:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerWeb', data.website?data.website:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerEmail', data.contacts[0]?data.contacts[0].email:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerFax', data.contacts[0]?data.contacts[0].fax:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerPhone', data.contacts[0]?data.contacts[0].phone:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerContactor', data.contacts[0]?data.contacts[0].name:null)
     },
     //维修商变更
     changeMaintainer(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
-      tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'DPMaintainerID', data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.Maintainer', data.name)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerWeb', data.website?data.website:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerContactor', data.contacts[0]?data.contacts[0].name:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerPhone', data.contacts[0]?data.contacts[0].phone:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerEmail', data.contacts[0]?data.contacts[0].email:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerFax', data.contacts[0]?data.contacts[0].fax:null)
     },
     supplyChange(data) {
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContractID", { id: data });

+ 51 - 21
src/views/ledger/facility/partsmanage/index.vue

@@ -501,40 +501,70 @@ export default {
     },
     //供应商变更
     supplierChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
+      tools.setDataForKey(this.tableData[this.row], 'DPSupplierID', data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.Supplier', data.name)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierPhone', data.contacts[0]?data.contacts[0].phone:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierContactor', data.contacts[0]?data.contacts[0].name:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierWeb', data.website?data.website:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierEmail', data.contacts[0]?data.contacts[0].email:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierFax', data.contacts[0]?data.contacts[0].fax:null)
       this.handleUpdataTable(
-        [
-          [this.row, "DPSupplierID", null, data.venderId],
-          [this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]
-        ],
-        "edit"
+          [
+              [this.row, 'DPSupplierID', null, data.venderId],
+              [this.row, 'LedgerParam.SupplyPurchase.Supplier', null, data.name],
+              [this.row, 'LedgerParam.SupplyPurchase.SupplierPhone', null, data.contacts[0]?data.contacts[0].phone:null],
+              [this.row, 'LedgerParam.SupplyPurchase.SupplierContactor', null, data.contacts[0]?data.contacts[0].name:null],
+              [this.row, 'LedgerParam.SupplyPurchase.SupplierWeb', null, data.website?data.website:null],
+              [this.row, 'LedgerParam.SupplyPurchase.SupplierEmail', null, data.contacts[0]?data.contacts[0].email:null],
+              [this.row, 'LedgerParam.SupplyPurchase.SupplierFax', null, data.contacts[0]?data.contacts[0].fax:null],
+          ],
+          'edit'
       )
       // this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
     },
     //保险商变更
     changeInsurer(data) {
-      tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
+      tools.setDataForKey(this.tableData[this.row], 'DPInsurerID', data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.Insurer', data.name?data.name:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerWeb', data.website?data.website:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerEmail', data.contacts[0]?data.contacts[0].email:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerFax', data.contacts[0]?data.contacts[0].fax:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerPhone', data.contacts[0]?data.contacts[0].phone:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerContactor', data.contacts[0]?data.contacts[0].name:null)
       this.handleUpdataTable(
-        [
-          [this.row, "DPInsurerID", null, data.venderId],
-          [this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]
-        ],
-        "edit"
+          [
+              [this.row, 'DPInsurerID', null, data.venderId],
+              [this.row, 'LedgerParam.InsuranceDoc.Insurer', null, data.name?data.name:null],
+              [this.row, 'LedgerParam.InsuranceDoc.InsurerWeb', null, data.website?data.website:null],
+              [this.row, 'LedgerParam.InsuranceDoc.InsurerEmail', null, data.contacts[0]?data.contacts[0].email:null],
+              [this.row, 'LedgerParam.InsuranceDoc.InsurerFax', null, data.contacts[0]?data.contacts[0].fax:null],
+              [this.row, 'LedgerParam.InsuranceDoc.InsurerPhone', null, data.contacts[0]?data.contacts[0].phone:null],
+              [this.row, 'LedgerParam.InsuranceDoc.InsurerContactor', null, data.contacts[0]?data.contacts[0].name:null],
+          ],
+          'edit'
       )
       // this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
     },
     //维修商变更
     changeMaintainer(data) {
-      tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
+      tools.setDataForKey(this.tableData[this.row], 'DPMaintainerID', data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.Maintainer', data.name)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerWeb', data.website?data.website:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerContactor', data.contacts[0]?data.contacts[0].name:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerPhone', data.contacts[0]?data.contacts[0].phone:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerEmail', data.contacts[0]?data.contacts[0].email:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerFax', data.contacts[0]?data.contacts[0].fax:null)
       this.handleUpdataTable(
-        [
-          [this.row, "DPMaintainerID", null, data.venderId],
-          [this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]
-        ],
-        "edit"
+          [
+              [this.row, 'DPMaintainerID', null, data.venderId],
+              [this.row, 'LedgerParam.OperationMainte.Maintainer', null, data.name],
+              [this.row, 'LedgerParam.OperationMainte.MaintainerWeb', null, data.website?data.website:null],
+              [this.row, 'LedgerParam.OperationMainte.MaintainerContactor', null, data.contacts[0]?data.contacts[0].name:null],
+              [this.row, 'LedgerParam.OperationMainte.MaintainerPhone', null, data.contacts[0]?data.contacts[0].phone:null],
+              [this.row, 'LedgerParam.OperationMainte.MaintainerEmail', null, data.contacts[0]?data.contacts[0].email:null],
+              [this.row, 'LedgerParam.OperationMainte.MaintainerFax', null, data.contacts[0]?data.contacts[0].fax:null],
+          ],
+          'edit'
       )
       // this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
     },

+ 21 - 6
src/views/ledger/property/addproperty.vue

@@ -297,8 +297,13 @@ export default {
     },
     //如果选择供应商之后
     supplierChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
+      tools.setDataForKey(this.tableData[this.row], 'DPSupplierID', data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.Supplier', data.name)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierPhone', data.contacts[0]?data.contacts[0].phone:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierContactor', data.contacts[0]?data.contacts[0].name:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierWeb', data.website?data.website:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierEmail', data.contacts[0]?data.contacts[0].email:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.SupplyPurchase.SupplierFax', data.contacts[0]?data.contacts[0].fax:null)
     },
     //保险合同
     guaranteeChange(data) {
@@ -322,13 +327,23 @@ export default {
     },
     //维修商变更
     changeMaintainer(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
-      tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'DPMaintainerID', data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.Maintainer', data.name)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerWeb', data.website?data.website:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerContactor', data.contacts[0]?data.contacts[0].name:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerPhone', data.contacts[0]?data.contacts[0].phone:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerEmail', data.contacts[0]?data.contacts[0].email:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.OperationMainte.MaintainerFax', data.contacts[0]?data.contacts[0].fax:null)
     },
     //保险商变更
     changeInsurer(data) {
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
-      tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'DPInsurerID', data.venderId)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.Insurer', data.name?data.name:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerWeb', data.website?data.website:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerEmail', data.contacts[0]?data.contacts[0].email:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerFax', data.contacts[0]?data.contacts[0].fax:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerPhone', data.contacts[0]?data.contacts[0].phone:null)
+      tools.setDataForKey(this.tableData[this.row], 'LedgerParam.InsuranceDoc.InsurerContactor', data.contacts[0]?data.contacts[0].name:null)
     },
     //设备图片弹窗改变事件
     changePics(keys) {

+ 59 - 29
src/views/ready/buildfloor/repetitionGraphy.vue

@@ -8,7 +8,7 @@
                     <el-button size="mini">{{hasGraph?'替换平面图图片':'上传平面图图片'}}</el-button>
                 </el-upload>
                 <el-button style='float:right;' size='mini' type='primary' v-if="step==0" @click="nextStep" :disabled="nextStepBtnDisable">下一步</el-button>
-                <el-button style='float:right;' size='mini' type='primary' v-if="step==1" @click="nextStep">保存</el-button>
+                <el-button style='float:right;' size='mini' type='primary' v-if="step==1" @click="nextStep" :disabled="timeOut">保存</el-button>
                 <el-button style='float:right;' size='mini' v-if="step==1" @click="lastStep">上一步</el-button>
             </template>
             <template v-else>
@@ -99,6 +99,7 @@ export default {
             scaleItem: null, // 比例尺item
             baseImgItem: null, // 当前楼层图的图片
             nextStepBtnDisable: true, // 比例尺item创建标识
+            timeOut: true, // 保存按钮延时3秒可操作
         }
     },
     created() {
@@ -120,7 +121,6 @@ export default {
     mounted() {},
     methods: {
         init() {
-            this.getFileName(this.modelId)
             this.getFloorData()
         },
         // 返回路由
@@ -200,21 +200,25 @@ export default {
             })
         },
         // 获取楼层
-        getFloorData() {
+        getFloorData(flag) {
             let floorParam = {
                 PageSize: 1000,
                 Filters: `BuildID='${this.BuildID}'`,
                 Orders: 'FloorSequenceID desc'
             }
             floorQueryAndSign(floorParam, (res) => {
-                this.floorList = res.Content;
+                this.floorList = res.Content.filter(t => t.StructureInfo && t.StructureInfo.FloorMap || t.FloorID == this.FloorID);
                 // todo
-                this.floorRadio = res.Content[0];
+                if (flag && flag == 'next') {
+                    this.floorRadio = this.floorList[0];
+                    this.loadOtherImg(this.floorRadio)
+                }
                 this.alreadyRelatedModel = res.Content.map((t) => {
                     if (t.FloorID != this.FloorID) return t.ModelId
                     this.sign = t.Sign > 0
                     this.FloorName = t.FloorLocalName || t.FloorName
                     this.$refs.drawFloor.buildFloorName = `${this.BuildName}-${this.FloorName}`
+                    t.modelId && this.getFileName(t.modelId)
                 }).filter((t) => t)
             })
         },
@@ -258,6 +262,12 @@ export default {
                                 vm.refresh(uploadKey + '.' + type)
                                 // 设置步骤为第一步
                                 vm.step = 0;
+                                // watch中不会走到initGraph,所以手动触发
+                                vm.$nextTick(()=>{
+                                    vm.initFromModelId(uploadKey + '.' + type)
+                                })
+                                // 设定保存按钮不可操作
+                                this.timeOut = true;
                             }
                         }
                     }
@@ -289,6 +299,9 @@ export default {
                 this.$message.success('更新成功')
                 this.step = -1;
                 this.baseImgItem.globalAlpha = 1
+                this.baseImgItem.moveable = false;
+                scaleItem.show()
+                scaleItem.moveable = false;
                 this.removeLast()
                 this.$refs.drawFloor.fit()
             })
@@ -296,8 +309,12 @@ export default {
         // 根据modelid初始化
         initFromModelId(id){
             const temp = id.split('.')[1];
-            if (temp && (temp.toLowerCase() == 'png' || temp.toLowerCase() == 'jpg')) {
-                this.$refs.drawFloor.initGraphy(id, 3)
+            if (temp) {
+                if (temp.toLowerCase() == 'png' || temp.toLowerCase() == 'jpg') {
+                    this.$refs.drawFloor.initGraphy(id, 3)
+                } else {
+                    this.$refs.drawFloor.initGraphy(id, 2)
+                }
             } else {
                 this.$refs.drawFloor.initGraphy(id, 1)
             }
@@ -307,19 +324,24 @@ export default {
             this.step = 0;
             this.$refs.drawFloor.scaleItem.show()
             this.baseImgItem.globalAlpha = 1
+            this.baseImgItem.moveable = false;
             this.removeLast()
         },
         // 下一步||保存
         nextStep() {
             this.baseImgItem = this.$refs.drawFloor.drawMainScene.imgList[0]
-            this.baseImgItem.globalAlpha = 0.2
+            this.baseImgItem.globalAlpha = 0.5
             this.baseImgItem.moveable = true;
             // 下一步
             if (this.step == 0) {
                 this.step = 1;
                 this.$refs.drawFloor.scaleItem.hide();
                 // 获取楼层列表
-                this.getFloorData()
+                this.getFloorData('next')
+                // 延时3秒可操作性保存按钮
+                setTimeout(() => {
+                    this.timeOut = false
+                },3000)
             } else if (this.step == 1) {
                 // 保存
                 this.updateFloorKey();
@@ -352,30 +374,37 @@ export default {
         changeFloor(v) {
             // v->当前改为的楼层对象
             this.removeLast();
+            this.loadOtherImg(v)
+        },
+        // 加载其他楼层图片
+        loadOtherImg(v) {
             if (v.StructureInfo && v.StructureInfo.FloorMap) {
-                const url = this.imgService + v.StructureInfo.FloorMap
-                this.curImgItem = new SImageItem(null, url);
-                this.curImgItem.enabled = false;
-                this.curImgItem.globalAlpha = 0.2;
-                this.curImgItem.showType = SImageShowType.AutoFit;
-                if (v.Properties) {
-                    try {
-                        // 计算两个比例尺差距
-                        const scaleItem = this.$refs.drawFloor.scaleItem
-                        const r = this.calScaleGap(v.Properties, scaleItem);
-                        if (r != 1) {
-                            this.$message.warning('比例尺相差较大,可以返回上一步修改比例尺')
+                const temp = this.modelId.split('.');
+                if (temp[1] && (temp[1].toLowerCase() == 'png' || temp[1].toLowerCase() == 'jpg')) {
+                    const url = this.imgService + v.StructureInfo.FloorMap
+                    this.curImgItem = new SImageItem(null, url);
+                    this.curImgItem.enabled = false;
+                    this.curImgItem.showType = SImageShowType.AutoFit;
+                    if (v.Properties) {
+                        try {
+                            // 计算两个比例尺差距
+                            const scaleItem = this.$refs.drawFloor.scaleItem
+                            this.curImgItem.zOrder = scaleItem.zOrder - 1;
+                            const r = this.calScaleGap(v.Properties, scaleItem);
+                            if (r != 1) {
+                                this.$message.warning('比例尺相差较大,可以返回上一步修改比例尺')
+                            }
+                            this.curImgItem.showType == SImageShowType.Full;
+                            this.curImgItem.moveTo(v.Properties.X, v.Properties.Y);
+                            // this.curImgItem.width = v.Properties.width;
+                            // this.curImgItem.height = v.Properties.height;
+                        } catch (err) {
+                            console.log(err);
                         }
-                        this.curImgItem.showType == SImageShowType.Full;
-                        this.curImgItem.moveTo(v.Properties.X, v.Properties.Y);
-                        // this.curImgItem.width = v.Properties.width;
-                        // this.curImgItem.height = v.Properties.height;
-                    } catch (err) {
-                        console.log(err);
                     }
+                    this.$refs.drawFloor.drawMainScene.addItem(this.curImgItem);
+                    this.$refs.drawFloor.fit()
                 }
-                this.$refs.drawFloor.drawMainScene.addItem(this.curImgItem);
-                this.$refs.drawFloor.fit()
             }
         },
         // 清除上一张底图
@@ -417,6 +446,7 @@ export default {
         modelId(n, o) {
             if (n != o) {
                 if (n) {
+                    // 替换的时候需要走
                     this.$nextTick(()=>{
                         this.initFromModelId(n)
                     })