yangjunjing 5 years ago
parent
commit
1cf0f1aa53
45 changed files with 2784 additions and 1754 deletions
  1. 1 1
      config/index.js
  2. 6 6
      config/prod.env.js
  3. 4 4
      package.json
  4. 18 4
      src/api/scan/request.js
  5. 2 2
      src/components/business_space/business/handsontable.vue
  6. 1 1
      src/components/business_space/dialogs/addDialog/businessDialog.vue
  7. 5 3
      src/components/business_space/dialogs/list/firm.vue
  8. 6 10
      src/components/business_space/newGraphy/graphy.vue
  9. 1 1
      src/components/dialogHanson/addDevice.vue
  10. 1 1
      src/components/dialogs/addDialog/businessDialog.vue
  11. 1 1
      src/components/dialogs/addDialog/dialogAssets.vue
  12. 2 2
      src/components/dialogs/addDialog/dialogDevice.vue
  13. 1 1
      src/components/dialogs/addDialog/dialogSystem.vue
  14. 539 0
      src/components/dialogs/list/batchDialog.vue
  15. 87 43
      src/components/dialogs/list/filesDialog.vue
  16. 126 121
      src/components/dialogs/list/firm.vue
  17. 111 107
      src/components/dialogs/list/insurerDialog.vue
  18. 111 107
      src/components/dialogs/list/maintainerDialog.vue
  19. 147 126
      src/components/dialogs/list/picDialog.vue
  20. 110 106
      src/components/dialogs/list/supplierDialog.vue
  21. 68 34
      src/components/dialogs/list/uploadImgDialog.vue
  22. 1 1
      src/components/ledger/addDialog/dialogAssets.vue
  23. 2 2
      src/components/ledger/addDialog/dialogDevice.vue
  24. 1 1
      src/components/ledger/addDialog/dialogSystem.vue
  25. 2 2
      src/components/ledger/handsontables/assets.vue
  26. 1183 866
      src/components/ledger/handsontables/device.vue
  27. 1 1
      src/components/ledger/handsontables/system.vue
  28. 1 1
      src/components/ledger/lib/addDevice.vue
  29. 196 155
      src/components/ledger/lib/uploadFiles.vue
  30. 1 1
      src/components/ledger/lib/uploadImgsName.vue
  31. 2 2
      src/main.js
  32. 2 2
      src/router/system.js
  33. 2 2
      src/views/data_admin/buildData/index.vue
  34. 2 2
      src/views/ledger/cenotelist/cenoteadd/index.vue
  35. 4 4
      src/views/ledger/cenotelist/index.vue
  36. 2 2
      src/views/ledger/facility/addfacility.vue
  37. 2 2
      src/views/ledger/facility/parts/index.vue
  38. 3 3
      src/views/ledger/facility/partsmanage/addparts/index.vue
  39. 2 2
      src/views/ledger/facility/partsmanage/index.vue
  40. 2 2
      src/views/ledger/property/addproperty.vue
  41. 4 4
      src/views/ledger/rentlist/index.vue
  42. 2 2
      src/views/ledger/rentlist/rentadd/index.vue
  43. 2 2
      src/views/ledger/system/addsystem.vue
  44. 3 3
      src/views/point/config_point/steps/step1.vue
  45. 14 9
      src/views/screen/splitscreen/spaceledger/index.vue

+ 1 - 1
config/index.js

@@ -94,7 +94,7 @@ module.exports = {
                 pathRewrite: {
                     "^/modelapi": "/"
                 }
-            }
+            },
         },
 
         // Various Dev Server settings

+ 6 - 6
config/prod.env.js

@@ -1,10 +1,10 @@
 'use strict'
 module.exports = {
     NODE_ENV: '"production"',
-    BASE_URL: '"http://192.168.20.215"', //测试iframe地址
-    SSO_SERVER: '"http://192.168.20.102:8080"', //(新)测试环境
-    MQTT_SERVICE: '"ws://192.168.20.225:61614/stomp/"' //MQ测试环境地址
-    // BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
-    // SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
-    // MQTT_SERVICE: '"ws://adm.sagacloud.cn/stomp/"' //MQ正式环境地址
+    // BASE_URL: '"http://192.168.20.215"', //测试iframe地址
+    // SSO_SERVER: '"http://192.168.20.102:8080"', //(新)测试环境
+    // MQTT_SERVICE: '"ws://192.168.20.225:61614/stomp/"' //MQ测试环境地址
+    BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
+    SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
+    MQTT_SERVICE: '"ws://adm.sagacloud.cn/stomp/"' //MQ正式环境地址
 }

+ 4 - 4
package.json

@@ -25,10 +25,10 @@
         "vue-router": "^3.0.1",
         "vuex": "^3.1.0",
         "cad-engine": "2.0.250",
-        "@saga-web/base": "2.1.9",
-        "@saga-web/draw": "2.1.58",
-        "@saga-web/graphy": "2.1.30",
-        "@saga-web/cad-engine": "2.0.406"
+        "@saga-web/base": "2.1.8",
+        "@saga-web/draw": "2.1.57",
+        "@saga-web/graphy": "2.1.28",
+        "@saga-web/cad-engine": "2.0.308"
     },
     "devDependencies": {
         "ajv": "^6.9.1",

+ 18 - 4
src/api/scan/request.js

@@ -158,7 +158,6 @@ export function getPT(param) {
         "BeginTime": param.BeginTime,
         "ProjId": param.ProjId,
         "UserId": param.UserId,
-        "BeginTime": param.BeginTime,
         "EndTime": param.EndTime,
         "BuildId": param.BuildId,
         "FloorId": param.FloorId
@@ -224,7 +223,7 @@ export function updatePoint(param) {
     return fetch({ method: 'POST', url: `${api}/service/point/update`, data })
 }
 
-//点击点位标签获取tab设备族列表 
+//点击点位标签获取tab设备族列表
 export function getTabFamily(param) {
     let data = {
         "Comming": Comming,
@@ -1019,7 +1018,7 @@ export function equipLinkSys(param, success) {
     http.postJson(url, param, success)
 }
 
-//设备清单 - 设备关联系统 系统1-n   
+//设备清单 - 设备关联系统 系统1-n
 export function sysLinkEquip(param, success) {
     let url = `${baseUrl}/datacenter/sy-in-eq/link-sy-eq`;
     http.postJson(url, param, success)
@@ -1075,6 +1074,11 @@ export function queryProperty(param, success) {
     http.postJson(url, param, success)
 }
 
+// 修改设备的附件功能
+export function queryUpdate(param, success) {
+    let url = `${baseUrl}/equip-component/equip-query/update`;
+    http.postJson(url, param, success)
+}
 //查询资产 同时关联设备信息
 export function propertyLinkEq(param, success) {
     let url = `${baseUrl}/equip-component/property/property-query`;
@@ -1641,4 +1645,14 @@ export function addTabFunNum(param, success) {
 export function tableFuncRelatedOverview(param, success) {
     let url = `/pointconfig/report/meter-related`
     http.postJson(url, param, success)
-}
+}
+//实例中查询设备信息
+export function getEquipByEqID(param, success) {
+    let url = `${baseUrl}/datacenter/equip/query`
+    http.postJson(url, param, success)
+}
+//获取楼层信息
+export function getFloorMsgByFloorID(param, success) {
+    let url = `${baseUrl}/datacenter/floor/query`
+    http.postJson(url, param, success)
+}

+ 2 - 2
src/components/business_space/business/handsontable.vue

@@ -206,7 +206,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该业务空间"
@@ -654,4 +654,4 @@ export default {
     color: gray;
   }
 }
-</style>
+</style>

+ 1 - 1
src/components/business_space/dialogs/addDialog/businessDialog.vue

@@ -478,7 +478,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该业务空间"

+ 5 - 3
src/components/business_space/dialogs/list/firm.vue

@@ -29,6 +29,7 @@
             <el-table-column header-align='center' prop="name" label="型号"></el-table-column>
             <el-table-column header-align='center' label="技术参数">
               <template slot-scope="scope">
+                <el-button type="text"  @click="lookParam(scope.row)">技术参数</el-button>
                 <el-button :disabled="scope.row.specificationId?false:true" type="text" @click="lookParam(scope.row)">技术参数</el-button>
               </template>
             </el-table-column>
@@ -40,8 +41,8 @@
                 <i style="color:#46B0FF;cursor: pointer;">厂家库</i>维护吧
             </p>
             <my-pagination :page="page" @change="changed" style="margin-top:10px;"></my-pagination>
-        </div>       
-        
+        </div>
+
       </div>
     </div>
     <param-details :isLoad="isLoad" :data="data"></param-details>
@@ -54,11 +55,12 @@
   </el-dialog>
 </template>
 <script>
+
 import myPagination from "@/components/common/myPagination";
 import paramDetails from "@/components/business_space/dialogs/list/paramDetails"
 import { getSpecList, getBrandList, getManufacturerList } from "@/api/scan/request"
 
-export default {
+    export default {
   components: {
     myPagination,
     paramDetails

+ 6 - 10
src/components/business_space/newGraphy/graphy.vue

@@ -9,7 +9,7 @@
     <div class="canvas-box" v-show="FloorMap" v-loading="canvasLoading">
       <canvas id="floorCanvas" :width="canvasWidth" :height="canvasHeight" ref="canvas" tabindex="0"></canvas>
       <!-- 初始两个按钮 -->
-      <el-row class="buttons-box" v-if="hidden">
+      <el-row class="buttons-box">
         <div>
           <el-autocomplete popper-class="my-autocomplete" v-model="search" :fetch-suggestions="querySearch" placeholder="输入平面图中已有的业务空间名称进行查找"
             width="180px" @select="handleSelect">
@@ -22,7 +22,7 @@
             </template>
           </el-autocomplete>
         </div>
-        <div class="button-group" v-if="hidden">
+        <div class="button-group">
           <!-- 默认操作模式 -->
           <div v-show="type==1">
             <el-dropdown split-button type="primary" @click="editGraphy" @command="handleCommand">
@@ -56,12 +56,12 @@
             <el-button plain @click="cancelGraphy">取 消</el-button>
           </div>
         </div>
-        <div style="position: absolute;right: 0;" v-if="hidden">
+        <div style="position: absolute;right: 0;">
           <el-button type="text" @click="lookUnrelatBSpace(false)">未关联平面图的业务空间 {{num}} 条</el-button>
         </div>
       </el-row>
       <!-- 底部操作按钮 -->
-      <el-row class="canvas-actions-box" v-if="hidden">
+      <el-row class="canvas-actions-box">
         <canvasFun @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @divide="divide" @clearDivide="clearDivide" @undo="undo" @redo="redo"
           @changeAbsorb="changeAbsorb" @scale="scale" @groupSelect="groupSelect" :config="config" ref="canvasFun" @saveJson="saveJson"></canvasFun>
       </el-row>
@@ -152,11 +152,7 @@ export default {
   computed: {
     ...mapGetters('layout', ['projectId'])
   },
-  created() {
-    if(this.$route.name == "spaceLedger"){
-      this.hidden = false;
-    }
-  },
+  created() {},
   mounted() {
     this.canvasWidth = this.$refs.graphy.offsetWidth;
     this.canvasHeight = this.$refs.graphy.offsetHeight;
@@ -892,4 +888,4 @@ export default {
     z-index: 999;
   }
 }
-</style>
+</style>

+ 1 - 1
src/components/dialogHanson/addDevice.vue

@@ -344,7 +344,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该业务空间"

+ 1 - 1
src/components/dialogs/addDialog/businessDialog.vue

@@ -478,7 +478,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该业务空间"

+ 1 - 1
src/components/dialogs/addDialog/dialogAssets.vue

@@ -502,7 +502,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该资产"

+ 2 - 2
src/components/dialogs/addDialog/dialogDevice.vue

@@ -623,7 +623,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该业务空间"
@@ -972,7 +972,7 @@ export default {
 </style>
 <style lang="">
     .confirmButtonClass {
-    width: 180px; 
+    width: 180px;
 }
 .cancelButtonClass {
     width: 180px;

+ 1 - 1
src/components/dialogs/addDialog/dialogSystem.vue

@@ -556,7 +556,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该资产"

+ 539 - 0
src/components/dialogs/list/batchDialog.vue

@@ -0,0 +1,539 @@
+<template>
+    <el-dialog
+        title="批量维护信息点"
+        :visible.sync="batchDialog"
+        class="batchContainer"
+    >
+        <el-steps
+            :active="active"
+            align-center
+        >
+            <el-step
+                @click.native="active = 0"
+                description="填写需维护的信息点"
+            />
+            <el-step
+                @click.native="active = 1"
+                description="选择批量维护的对象实例"
+            />
+        </el-steps>
+        <hr>
+        <div v-show="active === 0">
+            <section>
+                <p class="text-message">维护只有单值的信息点</p>
+                <span class="small">请选择需维护的信息点</span>
+                <el-checkbox
+                    :indeterminate="isIndeterminate"
+                    v-model="checkAll"
+                    @change="handleCheckChange"
+                >
+                    全部选择
+                </el-checkbox>
+
+                <div style="margin: 15px "></div>
+                <el-checkbox-group
+                    v-model="checkedCities"
+                    @change="handleCheckedCitiesChange"
+                >
+                    <el-checkbox
+                        v-for="(city,index) in newFirm"
+                        :label="city"
+                        :key="index"
+                    >
+                        <span @click="fourVendors(city.code)"> {{city.name}}:</span>
+                        <span>{{city.rname}}</span>
+                    </el-checkbox>
+                </el-checkbox-group>
+            </section>
+            <!--维护有多个值的信息-->
+            <section>
+                <p class="text-message">维护有多个值的信息点</p>
+                <span class="small">选择值的更新方式</span>
+                <el-radio-group
+                    v-model="radio"
+                    @change="maintenance"
+                >
+                    <el-radio :label="1">以增量方式维护</el-radio>
+                    <el-radio :label="2">以覆盖方式维护</el-radio>
+                </el-radio-group>
+                <div style="margin: 15px "></div>
+                <div class="checkbox">
+                    <p>
+                        <el-checkbox
+                            v-model="videoModel.archive"
+                            @change="multiple('archive')"
+                        > <!--设备文档-->
+                            {{information.archive.name}}
+                        </el-checkbox>
+                        <span v-for="item in information.archive.Archive">{{item | filterImgName}}</span>
+                    </p>
+                    <p>
+                        <el-checkbox
+                            v-model="videoModel.checkReport"
+                            @change="multiple('checkReport')"
+                        ><!--安装质检报告-->
+                            {{information.checkReport.name}}
+                        </el-checkbox>
+                        <span v-for="item in information.checkReport.CheckReport">{{item | filterImgName}}</span>
+
+                    </p>
+                    <p>
+                        <el-checkbox
+                            v-model="videoModel.drawing"
+                            @change="multiple('drawing')"
+                        ><!--设备图纸-->
+                            {{information.drawing.name}}
+                        </el-checkbox>
+                        <span v-for="item in information.drawing.Drawing">{{item.key | filterImgName}}</span>
+
+                    </p>
+                    <p>
+                        <el-checkbox
+                            v-model="videoModel.installDrawing"
+                            @change="multiple('installDrawing')"
+                        ><!--安装图纸-->
+                            {{information.installDrawing.name}}
+                        </el-checkbox>
+                        <span
+                            v-for="item in information.installDrawing.InstallDrawing">{{item.key | filterImgName}}</span>
+                    </p>
+
+                    <p>
+                        <el-checkbox
+                            v-model="videoModel.installPic"
+                            @change="multiple('installPic')"
+                        ><!--安装照片-->
+                            {{information.installPic.name}}
+                        </el-checkbox>
+                        <span v-for="item in information.installPic.InstallPic">{{item.key | filterImgName}}</span>
+                    </p>
+                    <p>
+                        <el-checkbox
+                            v-model="videoModel.insuranceFile"
+                            @change="multiple('insuranceFile')"
+                        ><!--保险文件-->
+                            {{information.insuranceFile.name}}
+                        </el-checkbox>
+                        <span v-for="item in information.insuranceFile.InsuranceFile">{{item | filterImgName}}</span>
+
+                    </p>
+                    <p>
+                        <el-checkbox
+                            v-model="videoModel.pic"
+                            @change="multiple('pic')"
+                        ><!--设备照片-->
+                            {{information.pic.name}}
+                        </el-checkbox>
+                        <span v-for="item in information.pic.Pic">{{item.key | filterImgName}}</span>
+                    </p>
+                    <p>
+                        <el-checkbox
+                            v-model="videoModel.nameplate"
+                            @change="multiple('nameplate')"><!--设备铭牌照片-->
+                            {{information.nameplate.name}}
+                        </el-checkbox>
+                        <span v-for="item in information.nameplate.Nameplate">{{item.key | filterImgName}}</span>
+                    </p>
+                </div>
+            </section>
+            <el-button
+                style="margin-top: 12px"
+                @click="next"
+            >下一步
+            </el-button>
+        </div>
+        <div
+            v-show="active === 1"
+            class="all-message"
+        >
+            <el-table
+                ref="multipleTable"
+                :data="tableData"
+                tooltip-effect="dark"
+                style="width:100%;margin-bottom: 10px"
+                @selection-change="handleSelectionChange"
+            >
+                <el-table-column
+                    type="selection"
+                    width="55"
+                />
+                <el-table-column
+                    label="设备本地名称"
+                    width=""
+                >
+                    <template slot-scope="scope">{{scope.row.EquipLocalName}}</template>
+                </el-table-column>
+                <el-table-column
+                    prop="EquipLocalID"
+                    label="设备本地编码"
+                    width="120"
+                />
+                <el-table-column
+                    prop="build"
+                    label="所属建筑楼层"
+                    show-overflow-tooltip
+                />
+            </el-table>
+            <my-pagination
+                @change="getAllData"
+                :page="page"
+            ></my-pagination>
+            <el-button
+                type="primary"
+                @click="maintenanceSelect"
+            >维护已选
+            </el-button>
+        </div>
+    </el-dialog>
+</template>
+
+<script>
+    import myPagination from "@/components/ledger/lib/myPagination"
+
+    export default {
+        name: "batchDialog",
+        props: ['firmName', 'allObject', 'page','information'],
+        components: {myPagination},
+        data() {
+            return {
+                batchDialog: false,//dialog
+                active: 0,//进度条
+                checkAll: false,//全选
+                isIndeterminate: true,
+                checkedCities: [],//选择的项,单项
+                firm: [
+                    {
+                    name: "品牌型号",
+                    code: "DPManufacturerID",
+                    num: 2,
+                }, {
+                    name: "供应商信息",
+                    code: "DPSupplierID",
+                    num: 8
+                }, {
+                    name: "维修商信息",
+                    code: "DPMaintainerID",
+                    num: 35
+                }, {
+                    name: "保险公司信息",
+                    code: "DPInsurerID",
+                    num: 42
+                    }
+                ],
+                radio: 1, //1增加,2覆盖
+                checkedFile: [],//多项
+                multipleSelection: [],//checkbox选择的对象数组
+                filterList: [],//过滤单项选择的值
+                deviceList: [],//过滤全选数据
+                onlySelect: [],//检测是否有勾选单值信息
+                videoModel: {
+                    archive: false,
+                    checkReport: false,
+                    drawing: false,
+                    installDrawing: false,
+                    insuranceFile: false,
+                    installPic: false,
+                    nameplate: false,
+                    pic: false
+                }
+            }
+        },
+        watch:{
+          information() {
+              return this.information
+          }
+        },
+        computed: {
+            newFirm() {
+                this.firm.map(item => {
+                    if (item.num === this.firmName.num) {
+                        item.rname = this.firmName.name
+                        item.info = this.firmName
+                    }
+                    return item
+                })
+                return this.firm
+            },
+            tableData() {
+                this.allObject.map(item => {
+                    let build = ''
+                    if (item.Building && item.Floor) {
+                        build = item.Building.BuildLocalName + ' - ' + item.Floor.FloorLocalName
+                    } else if (item.Building) {
+                        build = item.Building.BuildLocalName
+                    } else if (item.Floor) {
+                        build = item.Floor.FloorLocalName
+                    } else {
+                        build = '-'
+                    }
+                    item.build = build
+                    return item
+                })
+                return this.allObject
+            },
+        },
+        filters: {
+            filterImgName(value) {
+                if (value.length > 16) {
+                    return value.substring(0, 12) + '...'
+                } else {
+                    return value
+                }
+            }
+        },
+        methods: {
+            next() { //下一步按钮
+                // if (this.active++ > 1) this.active = 0
+                this.deviceList = this.firm.filter(item => item.info)
+                if (!this.onlySelect.length) { //对单项全选进行过滤
+                    this.$message({
+                        message: '还没有选择单值信息哦',
+                        type: 'warning'
+                    });
+                    return false
+                }
+                if (!this.deviceList.length) { //对单项全选进行过滤
+                    this.$message({
+                        message: '单值信息没有填写哦',
+                        type: 'warning'
+                    });
+                    return false
+                }
+                if (this.checkAll) {    // 如果单项全选
+                    if (this.deviceList.length < 4) { //对单项全选进行过滤
+                        this.$message({
+                            message: '单值的信息点存在未填写',
+                            type: 'warning'
+                        });
+                        return false
+                    } else {
+                        this.active++
+                    }
+                } else {
+                    this.active++
+                }
+            },
+            handleCheckChange(val) { //全选
+                this.checkedCities = val ? this.firm : []
+                this.isIndeterminate = false
+
+            },
+            handleCheckedCitiesChange(value) { //维护单项触发
+                this.onlySelect = value
+                this.filterList = value.filter(item => item.info)
+                let checkCount = value.length
+                this.checkAll = checkCount === this.firm.length
+                this.isIndeterminate = checkCount > 0 && checkCount < this.firm.length
+            },
+            handleCheckedFileChange(value) { //维护多项触发
+            },
+            fourVendors(code) {
+                this.$emit('code', code)
+            },
+            //    选择维护方式
+            maintenance(val) {
+            },
+
+            maintenanceSelect() { //维护已选
+                if (!this.multipleSelection.length) {
+                    this.$message({
+                        message: '还没有选择实例哦',
+                        type: 'warning'
+                    });
+                    return false
+                }
+                let arr = []
+                // DPSupplierID 供应商 DPManufacturerID 生产商 DPBrandID 品牌
+                // DPSpecificationID 型号 DPInsurerID 保险商 DPMaintainerID 维修商
+                this.multipleSelection.forEach(item => {
+                    let EquipID = item.EquipID
+                    arr.push({EquipID})
+                })
+                let Id = {}
+                let single = {
+                    EquipManufactor: {
+                        // Manufacturer: '', //生产商
+                        // Brand: '',//品牌
+                        // Specification: '',//型号
+                    },
+                    SupplyPurchase: { //供应商
+                        // SupplierWeb: '',
+                        // Supplier: '',
+                        // PurchasePrice: ''
+                    },
+                    OperationMainte: { //维修商
+                        // Maintainer: '',
+                    },
+                    InsuranceDoc: {
+                        // Insurer: '',
+                        // InsurerWeb: '',
+                        InsuranceFile: this.information.insuranceFile.InsuranceFile ? this.information.insuranceFile.InsuranceFile : null
+                    }
+                };
+                // this.deviceList 单选数组,取到需要数据
+                // 过滤数组,取对象
+                this.deviceList.filter(item => item.num === 2).forEach(i => { //型号
+                    let {venderName, brandName, Specification, venderId, brandId, specificationId} = i.info
+                    single.EquipManufactor.Manufacturer = venderName
+                    Id.DPManufacturerID = venderId
+                    single.EquipManufactor.Brand = brandName
+                    Id.DPBrandID = brandId
+                    single.EquipManufactor.Specification = Specification
+                    Id.DPSpecificationID = specificationId
+                })
+                this.deviceList.filter(item => item.num === 8).forEach(i => {  //供应商8
+                    let {website, name, venderId} = i.info
+                    single.SupplyPurchase.SupplierWeb = website
+                    single.SupplyPurchase.Supplier = name
+                    Id.DPSupplierID = venderId
+                })
+                this.deviceList.filter(item => item.num === 35).forEach(i => {  //维修商
+                    let {name, venderId} = i.info
+                    single.OperationMainte.Maintainer = name
+                    Id.DPMaintainerID = venderId
+                })
+                this.deviceList.filter(item => item.num === 42).forEach(i => {  //保险
+                    let {website, name, venderId} = i.info
+                    single.InsuranceDoc.Insurer = name
+                    single.InsuranceDoc.InsurerWeb = website
+                    Id.DPInsurerID = venderId
+                })
+                // this.information 多选信息
+                let {archive, checkReport, drawing, installDrawing, installPic, insuranceFile, nameplate, pic} = this.information
+                let multiple = {
+                    InsuranceDoc: {
+                        InsuranceFile: insuranceFile.InsuranceFile ? insuranceFile.InsuranceFile : null
+                    },
+                    PhotoDoc: {
+                        Archive: archive.Archive ? archive.Archive : null,
+                        Drawing: drawing.Drawing ? drawing.Drawing : null,
+                        Nameplate: nameplate.Nameplate ? nameplate.Nameplate : null,
+                        Pic: pic.Pic ? pic.Pic : null
+                    },
+                    Siteinstall: {
+                        InstallPic: installPic.InstallPic ? installPic.InstallPic : null,
+                        InstallDrawing: installDrawing.InstallDrawing ? installDrawing.InstallDrawing : null,
+                        CheckReport: checkReport.CheckReport ? checkReport.CheckReport : null
+                    }
+                }
+                let LedgerParam = {}
+                if (this.radio === 1) { //组装数据,根据是覆盖该是增量,1是增量
+                    //    1:单选数据
+                    let arr1 = this.deepCopy(arr).map(item => ({
+                        ...Id,
+                        ...item,
+                        LedgerParam: {...single}
+                    }))
+                    //    2:多选数据
+                    let arr2 = this.deepCopy(arr).map(item => ({
+                        ...Id,
+                        ...item,
+                        LedgerParam: {...multiple}
+                    }))
+                    this.$emit('upDataDevice', 1, arr1, arr2)
+
+                }
+                if (this.radio === 2) {
+
+                    let {InsuranceDoc, ...multiples} = multiple
+                    LedgerParam = {
+                        ...single,
+                        ...multiples
+
+                    };
+                    let arr3 = this.deepCopy(arr).map(item => ({
+                        ...Id,
+                        ...item,
+                        LedgerParam: {...LedgerParam}
+                    }))
+                    this.$emit('upDataDevice', 2, arr3)
+                }
+                this.closeDialog()
+            },
+            closeDialog() {  //关闭弹窗,返回初始状态
+                this.batchDialog = false
+                this.active = 0
+                // this.checkedCities = []//清空单项的checkbox
+                // this.deviceList = [] //清空单选数组内容
+                // this.radio = 1 //返回到默认增量
+                // this.multipleSelection = [] //清空实例内容
+
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val
+            },
+            getAllData() {
+                this.$emit('getAllData')
+            },
+            multiple(val) {
+                this.$emit('multiple',val)
+            },
+
+            deepCopy(obj) {
+                return JSON.parse(JSON.stringify(obj))
+            }
+        }
+    }
+</script>
+
+<style scoped lang="less">
+    .batchContainer {
+        /deep/ .el-step__description {
+            margin: 2% 0;
+        }
+        .el-checkbox-group {
+            display: flex;
+            justify-content: space-between;
+            flex-direction: row;
+            flex-wrap: wrap;
+
+            .el-checkbox {
+                width: 43%;
+            }
+
+            .el-checkbox:last-of-type {
+                margin-right: 30px;
+            }
+        }
+
+        .checkbox {
+            display: flex;
+            justify-content: space-between;
+            flex-direction: row;
+            flex-wrap: wrap;
+
+            p {
+                width: 50%;
+            }
+
+            .el-checkbox:last-of-type {
+                margin-right: 10px;
+            }
+        }
+
+        .text-message {
+            overflow: hidden;
+            margin-top: 10px;
+            color: #333;
+            border-left: 8px solid #333;
+            text-indent: 10px;
+            font-weight: 600;
+        }
+
+        .small {
+            font-size: 12px;
+            color: #555;
+        }
+
+        .all-message {
+            overflow: hidden;
+
+            button {
+                float: right;
+                padding: 10px;
+                margin-left: 5px;
+            }
+        }
+
+    }
+</style>

+ 87 - 43
src/components/dialogs/list/filesDialog.vue

@@ -3,50 +3,94 @@
 -->
 
 <template>
-  <el-dialog title="上传文件" :visible.sync="dialog.uploadFiles" width="500px">
-      <div class='max-height: 500px; overflow-y: auto;'>
-        <upload-files :readOnly="read" :keysArr="keysArr" @change="changeItem" max="2"></upload-files>
-      </div>
-  </el-dialog>
+    <el-dialog
+        title="上传文件"
+        :visible.sync="dialog.uploadFiles"
+        width="500px">
+        <div class='max-height: 500px; overflow-y: auto;'>
+            <upload-files
+                :readOnly="read"
+                :keysArr="keysArr"
+                :firmDataType="firmDataType"
+                @change="changeItem"
+                max="2"/>
+        </div>
+    </el-dialog>
 </template>
 <script>
-import uploadFiles from "@/components/ledger/lib/uploadFiles";
-export default {
-  components: {
-    uploadFiles
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          uploadFiles: false
-        };
-      }
-    },
-    keysArr: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    },
-    read: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {};
-  },
-  created() { },
-  mounted() { },
-  methods: {
-    changeItem(file) {
-      console.log(file)
-      this.$emit("changeFile", file)
-    }
-  },
-};
+    import uploadFiles from "@/components/ledger/lib/uploadFiles";
+
+    export default {
+        components: {
+            uploadFiles
+        },
+        props: {
+            dialog: {
+                type: Object,
+                default: function () {
+                    return {
+                        uploadFiles: false
+                    };
+                }
+            },
+            keysArr: {
+                type: Array,
+                default: function () {
+                    return []
+                }
+            },
+            read: {
+                type: Boolean,
+                default: false
+            },
+            firmDataType: {
+                type: String
+            },
+            infoType: {
+                type: String
+            },
+            information: {
+                type: Object
+            }
+        },
+        data() {
+            return {};
+        },
+        created() {
+        },
+        computed: {
+
+        },
+        mounted() {
+        },
+        methods: {
+            changeItem(file) {
+                if (this.firmDataType === 'dialog') {
+                    let info = this.infoType;
+                    switch (info) {
+                        case 'archive':
+                            this.information.archive.Archive = file
+                            this.$emit("changeFile", this.information, this.firmDataType)
+                            break
+                        case 'checkReport':
+                            this.information.checkReport.CheckReport = file
+                            this.$emit("changeFile", this.information, this.firmDataType)
+                            break
+                        case 'insuranceFile':
+                            this.information.insuranceFile.InsuranceFile = file
+                            this.$emit("changeFile", this.information, this.firmDataType)
+                            break
+                    }
+                } else {
+                    this.$emit("changeFile", file, this.firmDataType)
+
+                }
+            },
+            deepCopy(obj) {
+                return JSON.parse((JSON.stringify(obj)))
+            }
+        },
+    };
 </script>
 <style>
-</style>
+</style>

+ 126 - 121
src/components/dialogs/list/firm.vue

@@ -27,7 +27,7 @@
             </el-table-column>
             <el-table-column prop="brandName" label="品牌" header-align='center'></el-table-column>
             <el-table-column prop="name" label="型号" header-align='center'></el-table-column>
-            <el-table-column label="技术参数" header-align='center'>
+            <el-table-column  label="技术参数" header-align='center'>
               <template slot-scope="scope">
                 <el-button :disabled="scope.row.specificationId?false:true" type="text" @click="lookParam(scope.row)">技术参数</el-button>
               </template>
@@ -40,8 +40,8 @@
                 <i style="color:#46B0FF;cursor: pointer;">厂家库</i>维护吧
             </p>
             <my-pagination :page="page" @change="changed" style="margin-top:10px;"></my-pagination>
-        </div> 
-        
+        </div>
+
       </div>
     </div>
     <div slot="footer" class="dialog-footer">
@@ -63,124 +63,129 @@ export default {
     myPagination,
     paramDetails
   },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          firm: false
-        };
-      }
-    },
-    mess: {
-      type: [Object, String]
-    }
-  },
-  data() {
-    return {
-      search: "", //搜索文案
-      radio: "",
-      value: "specification",//当前选择的查看类型
-      options: [{
-          value: 'specification',
-          label: '选型号'
-        }, {
-          value: 'brand',
-          label: '选生产厂家-品牌'
-        }, {
-          value: 'manufacturer',
-          label: '选生产厂家'
-      }],
-      tableData: [],
-      data: {},
-      isLoad: {
-        paramShow: false
-      },
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 0,
-        currentPage: 1
-      },
-    };
-  },
-  created() { },
-  mounted() { },
-  methods: {
-    changed() {
-      this.getData()
-    },
-    //查询技术参数
-    lookParam(data) {
-      this.data = data
-      this.isLoad.paramShow = true
-    },
-    getChange() {
-      if (!!this.radio) {
-        this.$emit("changeFirm", this.radio)
-        this.dialog.firm = false
-        this.radio = ''
-      } else {
-        this.$message("请选择型号")
-      }
-    },
-    searchKey() {
-      this.changePage()
-    },
-    changePage() {
-      this.page = {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 0,
-        currentPage: 1
-      }
-      this.getData()
-    },
-    handleChangeType(item) {
-      this.page.total = 0
-      this.tableData = []
-      this.getData()
-    },
-    getData() {
-      if(this.value == 'specification') {//型号
-        getSpecList({
-          limit: {
-            skip: this.page.size * (this.page.currentPage - 1),
-            count: this.page.size
-          },
-          eqFamily: this.mess.deviceId,
-          name: this.search
-        }, res => {
-          this.page.total = res.totalCount
-          this.tableData = res.content
-        })
-      } else if(this.value == 'brand') {//生产厂家-品牌
-        getBrandList({
-          limit: {
-            skip: this.page.size * (this.page.currentPage - 1),
-            count: this.page.size
-          },
-          name: this.search
-        }, res => {
-          this.page.total = res.totalCount
-          this.tableData = res.content
-        })
-      } else if(this.value == 'manufacturer') {//生产厂家
-        getManufacturerList({
-          limit: {
-            skip: this.page.size * (this.page.currentPage - 1),
-            count: this.page.size
-          },
-          name: this.search
-        }, res => {
-          this.page.total = res.totalCount
-          this.tableData = res.content
-        })
-      }
-      console.log(this.tableData)
-    }
-  },
-  watch: {
+        props: {
+            dialog: {
+                type: Object,
+                default: function () {
+                    return {
+                        firm: false
+                    };
+                }
+            },
+            mess: {
+                type: [Object, String]
+            },
+            firmDataType: {
+                type: String
+            }
+        },
+        data() {
+            return {
+                search: "", //搜索文案
+                radio: "",
+                value: "specification",//当前选择的查看类型
+                options: [{
+                    value: 'specification',
+                    label: '选型号'
+                }, {
+                    value: 'brand',
+                    label: '选生产厂家-品牌'
+                }, {
+                    value: 'manufacturer',
+                    label: '选生产厂家'
+                }],
+                tableData: [],
+                data: {},
+                isLoad: {
+                    paramShow: false
+                },
+                page: {
+                    size: 50,
+                    sizes: [10, 30, 50, 100, 150, 200],
+                    total: 0,
+                    currentPage: 1
+                },
+            };
+        },
+        created() {
+        },
+        mounted() {
+        },
+        methods: {
+            changed() {
+                this.getData()
+            },
+            //查询技术参数
+            lookParam(data) {
+                this.data = data
+                this.isLoad.paramShow = true
+            },
+            getChange() {
+                if (!!this.radio) {
+                    this.$emit("changeFirm", this.radio,this.firmDataType)
+                    this.dialog.firm = false
+                    this.radio = ''
+                } else {
+                    this.$message("请选择型号")
+                }
+            },
+            searchKey() {
+                this.changePage()
+            },
+            changePage() {
+                this.page = {
+                    size: 50,
+                    sizes: [10, 30, 50, 100, 150, 200],
+                    total: 0,
+                    currentPage: 1
+                }
+                this.getData()
+            },
+            getData() {
+                if (this.value == 'specification') {//型号
+                    getSpecList({
+                        limit: {
+                            skip: this.page.size * (this.page.currentPage - 1),
+                            count: this.page.size
+                        },
+                        eqFamily: this.mess.deviceId,
+                        name: this.search
+                    }, res => {
+                        this.page.total = res.totalCount
+                        this.tableData = res.content
+                    })
+                } else if (this.value == 'brand') {//生产厂家-品牌
+                    getBrandList({
+                        limit: {
+                            skip: this.page.size * (this.page.currentPage - 1),
+                            count: this.page.size
+                        },
+                        name: this.search
+                    }, res => {
+                        this.page.total = res.totalCount
+                        this.tableData = res.content
+                    })
+                } else if (this.value == 'manufacturer') {//生产厂家
+                    getManufacturerList({
+                        limit: {
+                            skip: this.page.size * (this.page.currentPage - 1),
+                            count: this.page.size
+                        },
+                        name: this.search
+                    }, res => {
+                        this.page.total = res.totalCount
+                        this.tableData = res.content
+                    })
+                }
+                console.log(this.tableData)
+            },
+            handleChangeType(item) {
+                this.page.total = 0
+                this.tableData = []
+                this.getData()
+            },
+        },
+        watch: {
     dialog: {
       deep: true,
       handler: function () {

+ 111 - 107
src/components/dialogs/list/insurerDialog.vue

@@ -38,7 +38,7 @@
                 <i style="color:#46B0FF;cursor: pointer;">厂家库</i>维护吧
             </p>
             <my-pagination :page="page" @change="changePage" style="margin-top:10px;"></my-pagination>
-        </div>         
+        </div>
       </div>
     </div>
     <div slot="footer">
@@ -50,120 +50,124 @@
   </el-dialog>
 </template>
 <script>
-import myPagination from "@/components/ledger/lib/myPagination";
-import { getLib } from "@/api/scan/request"
-import { mapGetters, mapActions } from "vuex";
-import tools from "@/utils/scan/tools"
+    import myPagination from "@/components/ledger/lib/myPagination";
+    import {getLib} from "@/api/scan/request"
+    import {mapGetters} from "vuex";
+    import tools from "@/utils/scan/tools"
 
-export default {
-  components: {
+    export default {
+        components: {
     myPagination
   },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          insurer: true
-        };
-      }
-    }
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"]),
-  },
-  data() {
-    return {
-      search: "", //搜索文案
-      radio: "",
-      tableData: [],
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 0,
-        currentPage: 1
-      }
-    };
-  },
-  created() {
-    // this.getData()
-  },
-  mounted() { },
-  methods: {
-    //过滤
-    filterSearch() {
-      this.tableData = this.allData.map(item => {
-        if (item.name.indexOf(this.search) != -1) {
-          return item
-        } else {
-          return undefined
-        }
-      }).filter(cb => cb)
-    },
-    getData() {
-      console.log("insurer")
-      this.page = {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 0,
-        currentPage: 1
-      }
-      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
+        props: {
+            dialog: {
+                type: Object,
+                default: function () {
+                    return {
+                        insurer: true
+                    };
                 }
-                return child
-              })
-            }
-            if (!item.man) {
-              item.man = "--"
-              item.phone = "--"
-              item.fox = "--"
-              item.email = "--"
+            },
+            firmDataType: {
+                type: String
             }
-            return item
-          })
-          this.allData = tools.deepCopy(data)
-          this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-          this.page.total = data.length
-        } else {
-          this.$message.error("请求失败:" + res.data.resultMsg)
-        }
-      })
-    },
+        },
+        computed: {
+            ...mapGetters("layout", ["projectId", "secret", "userId"]),
+        },
+        data() {
+            return {
+                search: "", //搜索文案
+                radio: "",
+                tableData: [],
+                page: {
+                    size: 50,
+                    sizes: [10, 30, 50, 100, 150, 200],
+                    total: 0,
+                    currentPage: 1
+                }
+            };
+        },
+        created() {
+            // this.getData()
+        },
+        mounted() {
+        },
+        methods: {
+            //过滤
+            filterSearch() {
+                this.tableData = this.allData.map(item => {
+                    if (item.name.indexOf(this.search) != -1) {
+                        return item
+                    } else {
+                        return undefined
+                    }
+                }).filter(cb => cb)
+            },
+            getData() {
+                console.log("insurer")
+                this.page = {
+                    size: 50,
+                    sizes: [10, 30, 50, 100, 150, 200],
+                    total: 0,
+                    currentPage: 1
+                }
+                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)
+                        this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
+                        this.page.total = data.length
+                    } else {
+                        this.$message.error("请求失败:" + res.data.resultMsg)
+                    }
+                })
+            },
 
-    //分页改变
-    changePage() {
-      this.pagination(this.page.currentPage, this.page.size, this.allData)
-    },
+            //分页改变
+            changePage() {
+                this.pagination(this.page.currentPage, this.page.size, this.allData)
+            },
 
-    //发生修改
-    getChange() {
-      if (!!this.radio) {
-        this.$emit("changeInsurer", this.radio)
-        this.dialog.insurer = false
-        this.radio = ''
-      } else {
-        this.$message("请选择一个生产厂商")
-      }
-    },
+            //发生修改
+            getChange() {
+                if (!!this.radio) {
+                    this.$emit("changeInsurer", this.radio,this.firmDataType)
+                    this.dialog.insurer = false
+                    this.radio = ''
+                } else {
+                    this.$message("请选择一个生产厂商")
+                }
+            },
 
-    //分页事件
-    pagination(pageNo, pageSize, array) {
-      let offset = (pageNo - 1) * pageSize;
-      return offset + pageSize >= array.length
-        ? array.slice(offset, array.length)
-        : array.slice(offset, offset + pageSize);
-    }
-  },
-  watch: {
+            //分页事件
+            pagination(pageNo, pageSize, array) {
+                let offset = (pageNo - 1) * pageSize;
+                return offset + pageSize >= array.length
+                    ? array.slice(offset, array.length)
+                    : array.slice(offset, offset + pageSize);
+            }
+        },
+        watch: {
     dialog: {
       deep: true,
       handler: function () {

+ 111 - 107
src/components/dialogs/list/maintainerDialog.vue

@@ -1,5 +1,5 @@
 <!--
-    maintenance 选择供应
+    maintenance 选择维修
 
 -->
 <template>
@@ -38,7 +38,7 @@
                 <i style="color:#46B0FF;cursor: pointer;">厂家库</i>维护吧
             </p>
             <my-pagination :page="page" @change="changePage" style="margin-top:10px;"></my-pagination>
-        </div>         
+        </div>
       </div>
     </div>
     <div slot="footer">
@@ -50,119 +50,123 @@
   </el-dialog>
 </template>
 <script>
-import myPagination from "@/components/ledger/lib/myPagination";
-import { mapGetters, mapActions } from "vuex";
-import { getLib } from "@/api/scan/request"
-import tools from "@/utils/scan/tools"
+    import myPagination from "@/components/ledger/lib/myPagination";
+    import {mapGetters} from "vuex";
+    import {getLib} from "@/api/scan/request"
+    import tools from "@/utils/scan/tools"
 
-export default {
-  components: {
+    export default {
+        components: {
     myPagination
   },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          maintainer: true
-        };
-      }
-    }
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"]),
-  },
-  data() {
-    return {
-      search: "", //搜索文案
-      radio: "",
-      tableData: [],
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 0,
-        currentPage: 1
-      }
-    };
-  },
-  created() {
-    // this.getData()
-  },
-  mounted() { },
-  methods: {
-    //过滤
-    filterSearch() {
-      this.tableData = this.allData.map(item => {
-        if (item.name.indexOf(this.search) != -1) {
-          return item
-        } else {
-          return undefined
-        }
-      }).filter(cb => cb)
-    },
-    getData() {
-      this.page = {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 0,
-        currentPage: 1
-      }
-      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
+        props: {
+            dialog: {
+                type: Object,
+                default: function () {
+                    return {
+                        maintainer: true
+                    };
                 }
-                return child
-              })
-            }
-            if (!item.man) {
-              item.man = "--"
-              item.phone = "--"
-              item.fox = "--"
-              item.email = "--"
+            },
+            firmDataType: {
+                type: String
             }
-            return item
-          })
-          this.allData = tools.deepCopy(data)
-          this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-          this.page.total = data.length
-        } else {
-          this.$message.error("请求失败:" + res.data.resultMsg)
-        }
-      })
-    },
+        },
+        computed: {
+            ...mapGetters("layout", ["projectId", "secret", "userId"]),
+        },
+        data() {
+            return {
+                search: "", //搜索文案
+                radio: "",
+                tableData: [],
+                page: {
+                    size: 50,
+                    sizes: [10, 30, 50, 100, 150, 200],
+                    total: 0,
+                    currentPage: 1
+                }
+            };
+        },
+        created() {
+            // this.getData()
+        },
+        mounted() {
+        },
+        methods: {
+            //过滤
+            filterSearch() {
+                this.tableData = this.allData.map(item => {
+                    if (item.name.indexOf(this.search) != -1) {
+                        return item
+                    } else {
+                        return undefined
+                    }
+                }).filter(cb => cb)
+            },
+            getData() {
+                this.page = {
+                    size: 50,
+                    sizes: [10, 30, 50, 100, 150, 200],
+                    total: 0,
+                    currentPage: 1
+                }
+                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)
+                        this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
+                        this.page.total = data.length
+                    } else {
+                        this.$message.error("请求失败:" + res.data.resultMsg)
+                    }
+                })
+            },
 
-    //分页改变
-    changePage() {
-      this.pagination(this.page.currentPage, this.page.size, this.allData)
-    },
+            //分页改变
+            changePage() {
+                this.pagination(this.page.currentPage, this.page.size, this.allData)
+            },
 
-    //发生修改
-    getChange() {
-      if (!!this.radio) {
-        this.$emit("changeMaintainer", this.radio)
-        this.dialog.maintainer = false
-        this.radio = ''
-      } else {
-        this.$message("请选择一个生产厂商")
-      }
-    },
+            //发生修改
+            getChange() {
+                if (!!this.radio) {
+                    this.$emit("changeMaintainer", this.radio,this.firmDataType)
+                    this.dialog.maintainer = false
+                    this.radio = ''
+                } else {
+                    this.$message("请选择一个生产厂商")
+                }
+            },
 
-    //分页事件
-    pagination(pageNo, pageSize, array) {
-      let offset = (pageNo - 1) * pageSize;
-      return offset + pageSize >= array.length
-        ? array.slice(offset, array.length)
-        : array.slice(offset, offset + pageSize);
-    }
-  },
-  watch: {
+            //分页事件
+            pagination(pageNo, pageSize, array) {
+                let offset = (pageNo - 1) * pageSize;
+                return offset + pageSize >= array.length
+                    ? array.slice(offset, array.length)
+                    : array.slice(offset, offset + pageSize);
+            }
+        },
+        watch: {
     dialog: {
       deep: true,
       handler: function () {

+ 147 - 126
src/components/dialogs/list/picDialog.vue

@@ -3,139 +3,160 @@
 -->
 
 <template>
-  <el-dialog title="上传图片" :visible.sync="dialog.pic" width="500px;">
-    <div style="max-height:500px;overflow-y:auto;">
-      <div>
-        <h3>设备图片</h3>
-        <upload-imgs :readOnly="read" :keysArr="picArrs" @change="imageItem" max="6"></upload-imgs>
-      </div>
-      <div>
-        <h3>视频</h3>
-        <upload-imgs
-          :accept="'video/*'"
-          type="video"
-          :keysArr="videoArr"
-          @change="videoItem"
-          :videoPicArr="videoPicArr"
-          max="2"
-          :readOnly="read"
-        ></upload-imgs>
-      </div>
-    </div>
-  </el-dialog>
+    <el-dialog title="上传图片" :visible.sync="dialog.pic" width="500px;">
+        <div style="max-height:500px;overflow-y:auto;">
+            <div>
+                <h3>设备图片</h3>
+                <upload-imgs
+                    :readOnly="read"
+                    :keysArr="picArrs"
+                    @change="imageItem"
+                    max="6"
+                />
+            </div>
+            <div>
+                <h3>视频</h3>
+                <upload-imgs
+                    :accept="'video/*'"
+                    type="video"
+                    :keysArr="videoArr"
+                    @change="videoItem"
+                    :videoPicArr="videoPicArr"
+                    max="2"
+                    :readOnly="read"
+                />
+            </div>
+        </div>
+    </el-dialog>
 </template>
 <script>
-import uploadImgs from "@/components/ledger/lib/uploadImgsName";
-import tools from "@/utils/scan/tools"
-export default {
-  components: {
-    uploadImgs
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          pic: true
-        };
-      }
-    },
-    keysArr: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    },
-    read: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {
-      picArrs: [],
-      panoramaArr: [],
-      videoArr: [],
-      videoPicArr: [],
-      changeKeys: []
-    };
-  },
-  created() { },
-  mounted() { },
-  methods: {
-    imageItem(images) {
-      this.picArrs = images
-      this.change()
-    },
+    import uploadImgs from "@/components/ledger/lib/uploadImgsName";
+
+    export default {
+        components: {
+            uploadImgs
+        },
+        props: {
+            dialog: {
+                type: Object,
+                default: function () {
+                    return {
+                        pic: true
+                    };
+                }
+            },
+            keysArr: {
+                type: Array,
+                default: function () {
+                    return []
+                }
+            },
+            read: {
+                type: Boolean,
+                default: false
+            },
+            firmDataType: {
+                type: String
+            },
+            information: {
+                type: Object
+            },
+            infoType: {
+                type: String
+            }
+        },
+        data() {
+            return {
+                picArrs: [],
+                panoramaArr: [],
+                videoArr: [],
+                videoPicArr: [],
+                changeKeys: []
+            };
+        },
+        created() {
+        },
+        mounted() {
+        },
+        methods: {
+            imageItem(images) {
+                this.picArrs = images
+                this.change()
+            },
 
-    panoramaItem(images) {
-      this.panoramaArr = images
-      this.change()
-    },
+            panoramaItem(images) {
+                this.panoramaArr = images
+                this.change()
+            },
 
-    videoItem(videos, pe, pics) {
-      this.videoArr = videos
-      this.videoPicArr = pics
-      this.change()
-    },
+            videoItem(videos, pe, pics) {
+                this.videoArr = videos
+                this.videoPicArr = pics
+                this.change()
+            },
 
-    change() {
-      //   let picsArr = this.getArr(this.picArrs, "设备图片", "image")
-      //   let videos = this.getArr(this.videoArr, "视频", "video")
-      //   let videoPics = this.getArr(this.videoPicArr, "视频资料", "image_video")
-      //   let panoramas = this.getArr(this.panoramaArr, "全景照片", "panorama")
-      let picsArr = this.picArrs
-      let videos = this.videoArr
-      let videoPics = this.videoPicArr
-      let panoramas = this.panoramaArr
-      this.changeKeys = picsArr.concat(videos).concat(videoPics).concat(panoramas)
-      console.log(this.changeKeys)
-      this.$emit("change", this.changeKeys)
-    },
+            change() {
+                //   let picsArr = this.getArr(this.picArrs, "设备图片", "image")
+                //   let videos = this.getArr(this.videoArr, "视频", "video")
+                //   let videoPics = this.getArr(this.videoPicArr, "视频资料", "image_video")
+                //   let panoramas = this.getArr(this.panoramaArr, "全景照片", "panorama")
+                let picsArr = this.picArrs
+                let videos = this.videoArr
+                let videoPics = this.videoPicArr
+                let panoramas = this.panoramaArr
+                this.changeKeys = picsArr.concat(videos).concat(videoPics).concat(panoramas)
+                if (this.firmDataType === 'dialog') {
+                    this.information.pic.Pic = this.changeKeys
+                    this.$emit("change",this.information,this.firmDataType)
+                } else {
+                    this.$emit("change", this.changeKeys)
 
-    getArr(arr, name, type) {
-      return arr.map(item => {
-        return { "systemId": "dataPlatform", "name": name, "type": type, "key": item }
-      })
-    },
+                }
+            },
 
-    //将父组件传来的数据进行分组
-    fatherTochild() {
-      this.panoramaArr = []
-      this.videoArr = []
-      this.videoPicArr = []
-      this.picArrs = []
-      if (this.keysArr instanceof Array) {
-        this.keysArr.map(item => {
-          if (item.type == 'panorama') {
-            this.panoramaArr.push(item)
-          } else if (item.type == "video") {
-            this.videoArr.push(item)
-          } else if (item.type == 'image_video') {
-            this.videoPicArr.push(item)
-          } else {
-            this.picArrs.push(item)
-          }
-        })
-      } else {
-        this.panoramaArr = []
-        this.videoArr = []
-        this.videoPicArr = []
-        this.picArrs = []
-      }
-    }
-  },
-  watch: {
-    dialog: {
-      deep: true,
-      handler: function () {
-        if (this.dialog.pic) {
-          this.fatherTochild()
+            getArr(arr, name, type) {
+                return arr.map(item => {
+                    return {"systemId": "dataPlatform", "name": name, "type": type, "key": item}
+                })
+            },
+
+            //将父组件传来的数据进行分组
+            fatherTochild() {
+                this.panoramaArr = []
+                this.videoArr = []
+                this.videoPicArr = []
+                this.picArrs = []
+                if (this.keysArr instanceof Array) {
+                    this.keysArr.map(item => {
+                        if (item.type == 'panorama') {
+                            this.panoramaArr.push(item)
+                        } else if (item.type == "video") {
+                            this.videoArr.push(item)
+                        } else if (item.type == 'image_video') {
+                            this.videoPicArr.push(item)
+                        } else {
+                            this.picArrs.push(item)
+                        }
+                    })
+                } else {
+                    this.panoramaArr = []
+                    this.videoArr = []
+                    this.videoPicArr = []
+                    this.picArrs = []
+                }
+            }
+        },
+        watch: {
+            dialog: {
+                deep: true,
+                handler: function () {
+                    if (this.dialog.pic) {
+                        this.fatherTochild()
+                    }
+                }
+            }
         }
-      }
-    }
-  }
-};
+    };
 </script>
 <style>
-</style>
+</style>

+ 110 - 106
src/components/dialogs/list/supplierDialog.vue

@@ -38,7 +38,7 @@
                 <i style="color:#46B0FF;cursor: pointer;">厂家库</i>维护吧
             </p>
             <my-pagination :page="page" @change="changePage" style="margin-top:10px;"></my-pagination>
-        </div>        
+        </div>
       </div>
     </div>
     <div slot="footer" class="footer">
@@ -50,119 +50,123 @@
   </el-dialog>
 </template>
 <script>
-import myPagination from "@/components/ledger/lib/myPagination";
-import { mapGetters } from "vuex";
-import { getLib } from "@/api/scan/request"
-import tools from "@/utils/scan/tools"
+    import myPagination from "@/components/ledger/lib/myPagination";
+    import {mapGetters} from "vuex";
+    import {getLib} from "@/api/scan/request"
+    import tools from "@/utils/scan/tools"
 
-export default {
-  components: {
+    export default {
+        components: {
     myPagination
   },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          supplier: true
-        };
-      }
-    }
-  },
-  data() {
-    return {
-      search: "", //搜索文案
-      radio: "",
-      tableData: [],
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 0,
-        currentPage: 1
-      }
-    };
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"]),
-  },
-  created() {
-    // this.getData()
-  },
-  mounted() { },
-  methods: {
-    //过滤
-    filterSearch() {
-      this.tableData = this.allData.map(item => {
-        if (item.name.indexOf(this.search) != -1) {
-          return item
-        } else {
-          return undefined
-        }
-      }).filter(cb => cb)
-    },
-    getData() {
-      this.page = {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 0,
-        currentPage: 1
-      }
-      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
+        props: {
+            dialog: {
+                type: Object,
+                default: function () {
+                    return {
+                        supplier: true
+                    };
                 }
-                return child
-              })
-            }
-            if (!item.man) {
-              item.man = "--"
-              item.phone = "--"
-              item.fox = "--"
-              item.email = "--"
+            },
+            firmDataType: {
+                type: String
             }
-            return item
-          })
-          this.allData = tools.deepCopy(data)
-          this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
-          this.page.total = data.length
-        } else {
-          this.$message.error("请求失败:" + res.data.resultMsg)
-        }
-      })
-    },
+        },
+        data() {
+            return {
+                search: "", //搜索文案
+                radio: "",
+                tableData: [],
+                page: {
+                    size: 50,
+                    sizes: [10, 30, 50, 100, 150, 200],
+                    total: 0,
+                    currentPage: 1
+                }
+            };
+        },
+        computed: {
+            ...mapGetters("layout", ["projectId", "secret", "userId"]),
+        },
+        created() {
+            // this.getData()
+        },
+        mounted() {
+        },
+        methods: {
+            //过滤
+            filterSearch() {
+                this.tableData = this.allData.map(item => {
+                    if (item.name.indexOf(this.search) != -1) {
+                        return item
+                    } else {
+                        return undefined
+                    }
+                }).filter(cb => cb)
+            },
+            getData() {
+                this.page = {
+                    size: 50,
+                    sizes: [10, 30, 50, 100, 150, 200],
+                    total: 0,
+                    currentPage: 1
+                }
+                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)
+                        this.tableData = this.pagination(this.page.currentPage, this.page.size, this.allData)
+                        this.page.total = data.length
+                    } else {
+                        this.$message.error("请求失败:" + res.data.resultMsg)
+                    }
+                })
+            },
 
-    //分页改变
-    changePage() {
-      this.pagination(this.page.currentPage, this.page.size, this.allData)
-    },
+            //分页改变
+            changePage() {
+                this.pagination(this.page.currentPage, this.page.size, this.allData)
+            },
 
-    //发生修改
-    getChange() {
-      if (!!this.radio) {
-        this.$emit("changeSupplier", this.radio)
-        this.dialog.supplier = false
-        this.radio = ''
-      } else {
-        this.$message("请选择一个生产厂商")
-      }
-    },
+            //发生修改
+            getChange() {
+                if (!!this.radio) {
+                    this.$emit("changeSupplier", this.radio, this.firmDataType)
+                    this.dialog.supplier = false
+                    this.radio = ''
+                } else {
+                    this.$message("请选择一个生产厂商")
+                }
+            },
 
-    //分页事件
-    pagination(pageNo, pageSize, array) {
-      let offset = (pageNo - 1) * pageSize;
-      return offset + pageSize >= array.length
-        ? array.slice(offset, array.length)
-        : array.slice(offset, offset + pageSize);
-    }
-  },
-  watch: {
+            //分页事件
+            pagination(pageNo, pageSize, array) {
+                let offset = (pageNo - 1) * pageSize;
+                return offset + pageSize >= array.length
+                    ? array.slice(offset, array.length)
+                    : array.slice(offset, offset + pageSize);
+            }
+        },
+        watch: {
     dialog: {
       deep: true,
       handler: function () {

+ 68 - 34
src/components/dialogs/list/uploadImgDialog.vue

@@ -10,47 +10,81 @@
   </el-dialog>
 </template>
 <script>
-import uploadImgs from "@/components/ledger/lib/uploadImgs";
-export default {
-  components: {
-    uploadImgs
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          uploadImgs: true
-        };
-      }
-    },
-    keysArr: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    },
-    read: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {};
-  },
-  created() { },
-  mounted() { },
-  methods: {
+    import uploadImgs from "@/components/ledger/lib/uploadImgs";
+
+    export default {
+        components: {
+            uploadImgs
+        },
+        props: {
+            dialog: {
+                type: Object,
+                default: function () {
+                    return {
+                        uploadImgs: true
+                    };
+                }
+            },
+            keysArr: {
+                type: Array,
+                default: function () {
+                    return []
+                }
+            },
+            read: {
+                type: Boolean,
+                default: false
+            },
+            firmDataType: {
+                type: String
+            },
+            information: {
+                type: Object
+            },
+            infoType: {
+                type: String
+            }
+        },
+        data() {
+            return {};
+        },
+        created() {
+        },
+        mounted() {
+        },
+        methods: {
     deepcopy(obj) {
       console.log(obj, "out")
       return JSON.parse(JSON.stringify(obj));
     },
     changeItem(file) {
-      console.log(file, "changed")
-      this.$emit("changeFile", file)
+        if (this.firmDataType === 'dialog') {
+            let info = this.infoType
+            switch (info) {
+                case 'installPic':
+                    this.information.installPic.InstallPic = file
+                    this.$emit('changeFile', this.information, this.firmDataType)
+                    break
+                case 'installDrawing':
+                    this.information.installDrawing.InstallDrawing = file
+                    this.$emit('changeFile', this.information, this.firmDataType)
+                    break
+                case 'nameplate':
+                    this.information.nameplate.Nameplate = file
+                    this.$emit('changeFile', this.information, this.firmDataType)
+                    break
+                case 'drawing':
+                    this.information.drawing.Drawing = file
+                    this.$emit('changeFile', this.information, this.firmDataType)
+                    break
+            }
+        } else {
+            this.$emit("changeFile", file)
+        }
+
     }
   },
 };
 </script>
 <style>
-</style>
+</style>

+ 1 - 1
src/components/ledger/addDialog/dialogAssets.vue

@@ -508,7 +508,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该资产"

+ 2 - 2
src/components/ledger/addDialog/dialogDevice.vue

@@ -612,7 +612,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该业务空间"
@@ -958,7 +958,7 @@ export default {
     overflow: hidden;
     // height: 300px;
     // overflow-x: hidden;
-    // overflow-y:auto; 
+    // overflow-y:auto;
 
 }
 </style>

+ 1 - 1
src/components/ledger/addDialog/dialogSystem.vue

@@ -570,7 +570,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该资产"

+ 2 - 2
src/components/ledger/handsontables/assets.vue

@@ -536,7 +536,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除选中资产"
@@ -890,7 +890,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")

File diff suppressed because it is too large
+ 1183 - 866
src/components/ledger/handsontables/device.vue


+ 1 - 1
src/components/ledger/handsontables/system.vue

@@ -404,7 +404,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该系统"

+ 1 - 1
src/components/ledger/lib/addDevice.vue

@@ -352,7 +352,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除该业务空间"

+ 196 - 155
src/components/ledger/lib/uploadFiles.vue

@@ -8,166 +8,207 @@
   isShow: 图片的显示
  -->
 <template>
-  <div id="saga-upload">
-    <div id="uploadFile">
-
-      <el-upload
-        v-if="filesArr.length < max"
-        class="upload-file"
-        action
-        :http-request="uploadAndSubmit"
-        drag
-      >
-        <el-button size="small" type="primary" v-if="!readOnly">点击上传</el-button>
-        <div slot="tip" class="el-upload__tip" v-if="!readOnly">请上传文件</div>
-      </el-upload>
-            <div v-if="item && filesArr.length" v-for="(item,index) in filesArr">
-        <el-button type="text" @click="download(item)">{{delFile(item)}}</el-button>
-        <i
-          v-if="!readOnly"
-          class="el-icon-close delete-icon"
-          style="margin-left:10px; cursor:pointer"
-          @click="deleteFile(index,item)"
-        ></i>
-      </div>
-    </div>
+    <div id="saga-upload">
+        <div id="uploadFile">
+
+            <el-upload
+                v-if="filesArr.length < max"
+                class="upload-file"
+                action
+                :show-file-list="showFileList"
+                :http-request="uploadAndSubmit"
+                drag
+            >
+
+                <el-button
+                    size="small"
+                    type="primary"
+                    v-if="!readOnly"
+                >点击上传
+                </el-button>
+                <div
+                    slot="tip"
+                    class="el-upload__tip"
+                    v-if="!readOnly"
+                >请上传文件
+                </div>
+            </el-upload>
+
+            <div
+                v-show="item && filesArr.length"
+                v-for="(item,index) in filesArr"
+            >
+                <el-button
+                    type="text"
+                    @click="download(item)"
+                >{{delFile(item)}}
+                </el-button>
+                <i
+                    v-if="!readOnly"
+                    class="el-icon-close delete-icon"
+                    style="margin-left:10px; cursor:pointer"
+                    @click="deleteFile(index,item)"
+                ></i>
+            </div>
+        </div>
   </div>
 </template>
 
 <script>
-import tools from "@/utils/scan/tools";
-export default {
-  props: {
-    keysArr: {
-      type: [Array, String],
-      default: function () {
-        return []
-      }
-    },
-    readOnly: {
-      type: Boolean,
-      default: false
-    },
-    max: {
-      type: [Number, String],
-      default: 6
-    },
-    defined: null
-  },
-  data() {
-    return {
-      filesArr: []
-    };
-  },
-  created() {
-    let type = typeof (this.keysArr)
-    this.fileFalg()
-  },
-  methods: {
-    //判断是否为空
-    fileFalg() {
-      let type = typeof (this.keysArr)
-      console.log(this.keysArr, "keysAee")
-      if (type == 'string') {
-        this.filesArr = [this.keysArr]
-      } else {
-        this.filesArr = tools.deepCopy(this.keysArr)
-      }
+    import tools from "@/utils/scan/tools";
 
-      if (!this.keysArr) {
-        this.filesArr = []
-      }
-    },
-    //处理地址
-    delFile(name) {
-      console.log(name, "name")
-      return name.length > 20 ? name.substring(0, 20) + "..." : ""
-    },
-
-    resetFile() {
-      this.filesArr = []
-    },
-
-
-    //点击下载
-    download(key) {
-      console.log(key)
-      window.open("/image-service/common/file_get/" + key + "?systemId=dataPlatform")
-    },
-
-    //删除图片
-    deleteFile(i, key) {
-      this.filesArr.splice(i, 1);
-      this.$emit("change", this.filesArr, this.defined);
-    },
-
-    //上传
-    uploadAndSubmit(item) {
-      // var form = document.forms["demoForm"];
-
-      // if (form["file"].files.length > 0) {
-      // 寻找表单域中的 <input type="file" ... /> 标签
-      // var file = form["file"].files[0];
-
-      let file = item.file;
-      // try sending
-      let reader = new FileReader();
-
-      let vm = this;
-
-      let fileType = file.name.split(".");
-      let type = fileType[fileType.length - 1];
-      let key = "&key=" + fileType[0] + file.uid + "." + type
-
-      reader.onloadstart = function () {
-        // 这个事件在读取开始时触发
-      };
-      reader.onprogress = function (p) {
-        // 这个事件在读取进行中定时触发
-      };
-
-      reader.onload = function () {
-        // 这个事件在读取成功结束后触发
-      };
-      reader.onloadend = function () {
-        // 这个事件在读取结束后,无论成功或者失败都会触发
-        if (reader.error) {
-        } else {
-          // document.getElementById("bytesRead").textContent = file.size;
-          // 构造 XMLHttpRequest 对象,发送文件 Binary 数据
-          var xhr = new XMLHttpRequest();
-          xhr.open(
-            /* method */
-            "POST",
-            /* target url */
-            "/image-service/common/file_upload?systemId=dataPlatform&secret=9e0891a7a8c8e885&overwrite=true" + key
-            /*, async, default to true */
-          );
-          //xhr.overrideMimeType("application/octet-stream");
-          xhr.send(reader.result);
-          xhr.onreadystatechange = function () {
-            if (xhr.readyState == 4) {
-              console.log(xhr)
-              if (xhr.status == 200) {
-                vm.filesArr.push(
-                  key.split("=")[1]
-                );
-                console.log(vm.filesArr)
-                vm.$emit("change", vm.filesArr, vm.defined);
-              } else {
-                this.$message.error(res.data.ResultMsg)
-              }
+    export default {
+        props: {
+            keysArr: {
+                type: [Array, String],
+                default: function () {
+                    return []
+                }
+            },
+            readOnly: {
+                type: Boolean,
+                default: false
+            },
+            max: {
+                type: [Number, String],
+                default: 6
+            },
+            defined: null,
+            firmDataType: {
+                type: String
+            },
+            information: {
+                type: Object
+            },
+            infoType: {
+                type: String
+            }
+        },
+        data() {
+            return {
+                filesArr: [],
+                isShow: Boolean
+            };
+        },
+        created() {
+            let type = typeof (this.keysArr)
+            this.fileFalg()
+            // this.resetFile()
+        },
+        computed: {
+            showFileList() {
+                if (this.firmDataType === 'dialog') {
+                    this.isShow = false
+                } else {
+                    this.isShow = true
+                }
+                return this.isShow
+            }
+        },
+        methods: {
+            //判断是否为空
+            fileFalg() {
+                let type = typeof (this.keysArr)
+                if (type == 'string') {
+                    this.filesArr = [this.keysArr]
+
+                } else {
+                    this.filesArr = tools.deepCopy(this.keysArr)
+
+                }
+
+                if (!this.keysArr) {
+                    this.filesArr = []
+                }
+            },
+            //处理地址
+            delFile(name) {
+                return name.length > 20 ? name.substring(0, 20) + "..." : name
+            },
+
+            resetFile() {
+                this.filesArr = []
+            },
+
+
+            //点击下载
+            download(key) {
+                console.log(key)
+                window.open("/image-service/common/file_get/" + key + "?systemId=dataPlatform")
+            },
+
+            //删除图片
+            deleteFile(i, key) {
+                this.filesArr.splice(i, 1);
+                this.$emit("change", this.filesArr, this.defined);
+            },
+
+            //上传
+            uploadAndSubmit(item) {
+                // var form = document.forms["demoForm"];
+
+                // if (form["file"].files.length > 0) {
+                // 寻找表单域中的 <input type="file" ... /> 标签
+                // var file = form["file"].files[0];
+
+                let file = item.file;
+                // try sending
+                let reader = new FileReader();
+
+                let vm = this;
+
+                let fileType = file.name.split(".");
+                let type = fileType[fileType.length - 1];
+                let key = "&key=" + fileType[0] + file.uid + "." + type
+
+                reader.onloadstart = function () {
+                    // 这个事件在读取开始时触发
+                };
+                reader.onprogress = function (p) {
+                    // 这个事件在读取进行中定时触发
+                };
+
+                reader.onload = function () {
+                    // 这个事件在读取成功结束后触发
+                };
+                reader.onloadend = function () {
+                    // 这个事件在读取结束后,无论成功或者失败都会触发
+                    if (reader.error) {
+                    } else {
+                        // document.getElementById("bytesRead").textContent = file.size;
+                        // 构造 XMLHttpRequest 对象,发送文件 Binary 数据
+                        var xhr = new XMLHttpRequest();
+                        xhr.open(
+                            /* method */
+                            "POST",
+                            /* target url */
+                            "/image-service/common/file_upload?systemId=dataPlatform&secret=9e0891a7a8c8e885&overwrite=true" + key
+                            /*, async, default to true */
+                        );
+                        //xhr.overrideMimeType("application/octet-stream");
+                        xhr.send(reader.result);
+                        xhr.onreadystatechange = function () {
+                            if (xhr.readyState == 4) {
+                                console.log(xhr)
+                                if (xhr.status == 200) {
+                                    vm.filesArr.push(
+                                        key.split("=")[1]
+                                    );
+                                    vm.$emit("change", vm.filesArr, vm.defined);
+                                } else {
+                                    this.$message.error(res.data.ResultMsg)
+                                }
+                            }
+                        };
+                    }
+                };
+                reader.readAsArrayBuffer(file);
+            }
+        },
+        watch: {
+            keysArr: function (val) {
+                this.fileFalg()
             }
-          };
-        }
-      };
-      reader.readAsArrayBuffer(file);
-    }
-  },
-  watch: {
-    keysArr: function (val) {
-      this.fileFalg()
-    }
   }
 };
 </script>
@@ -204,4 +245,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 1 - 1
src/components/ledger/lib/uploadImgsName.vue

@@ -34,7 +34,7 @@
           :accept="accept"
           action
           drag
-          style="position: relation"
+          style="position: relative"
         >
           <i class="el-icon-plus avatar-uploader-icon"></i>
         </el-upload>

+ 2 - 2
src/main.js

@@ -22,7 +22,7 @@ import componentsPlugin from '@/framework/plugins/components'
 Vue.use(componentsPlugin)
 
 Vue.config.productionTip = false
-
+Vue.config.devtools = true;
 /* eslint-disable no-new */
 new Vue({
     el: '#app',
@@ -30,4 +30,4 @@ new Vue({
     store,
     components: { App },
     template: '<App/>'
-})
+})

+ 2 - 2
src/router/system.js

@@ -469,7 +469,7 @@ export default [{
     //     component: LayoutMain,
     //     children: [
     //         { path: 'supplier', name: 'supplier', component: supplier, meta: { keepAlive: false, breadcrumbs: [{ label: '厂家库' }] }}
-    //     ] 
+    //     ]
     // },
 
     //业务空间管理
@@ -574,4 +574,4 @@ export default [{
             { path: 'own', name: 'Dasboard', component: OwnerManage }
         ]
     }
-]
+]

+ 2 - 2
src/views/data_admin/buildData/index.vue

@@ -1526,7 +1526,7 @@
                     autoColumnSize: true,
                     fixedColumnsLeft: 5,
                     language: "zh-CN",
-                    contextMenu: {
+                    contextMenu: this.onlyRead ? false :{
                         items: {
                             remove_row: {
                                 name: "删除资产"
@@ -1561,7 +1561,7 @@
             },
             afterDocumentKeyDown(e) {
                 //   this.$nextTick(() => {
-                let activeEditer = this.myHotArr[this.tabChecked].getActiveEditor(), td, row, prop, 
+                let activeEditer = this.myHotArr[this.tabChecked].getActiveEditor(), td, row, prop,
                     val = e.realTarget.value,
                     infoArr = ["Brand", "Specification", "Manufacturer", "Supplier", "Maintainer", "Insurer", "SupplierContactor", "SupplierPhone", "SupplierEmail", "SupplierWeb", "SupplierFax", "MaintainerContactor", "MaintainerPhone", "MaintainerEmail", "MaintainerWeb", "MaintainerFax", "InsurerContactor", "InsurerPhone", "InsurerEmail", "InsurerWeb", "InsurerFax"];
                 if(activeEditer){

+ 2 - 2
src/views/ledger/cenotelist/cenoteadd/index.vue

@@ -175,7 +175,7 @@ export default {
         columns: this.formatHeaderType(this.tableHeader),
         rowHeights: 30,
         maxRows: this.tableData.length,
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除竖井"
@@ -313,4 +313,4 @@ export default {
     margin-top: 10px;
   }
 }
-</style>
+</style>

+ 4 - 4
src/views/ledger/cenotelist/index.vue

@@ -108,7 +108,7 @@ export default {
     ]),
     showTypes () {
       return this.onlyRead?
-        [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]: 
+        [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]:
         [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]
     }
   },
@@ -200,7 +200,7 @@ export default {
         param.Content.push(item);
       })
       await updataCenoteTableData(param, (res) => {
-        
+
       })
     },
     // 删除表格数据
@@ -320,7 +320,7 @@ export default {
         columns: this.formatHeaderType(this.tableHeader),
         rowHeights: 30,
         maxRows: this.tableData.length,
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除竖井"
@@ -550,4 +550,4 @@ export default {
 .el-pagination button, .el-pagination span:not([class*=suffix]) {
     vertical-align: middle;
 }
-</style>
+</style>

+ 2 - 2
src/views/ledger/facility/addfacility.vue

@@ -389,7 +389,7 @@ export default {
         columns: this.formatHeaderType(this.tableHeader),
         rowHeights: 30,
         maxRows: this.tableData.length,
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除设备"
@@ -690,4 +690,4 @@ export default {
     margin-top: 10px;
   }
 }
-</style>
+</style>

+ 2 - 2
src/views/ledger/facility/parts/index.vue

@@ -229,7 +229,7 @@ export default {
         columns: this.formatHeaderType(this.tableHeader),
         rowHeights: 30,
         maxRows: this.tableData.length,
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除部件"
@@ -530,4 +530,4 @@ export default {
 .el-pagination span:not([class*="suffix"]) {
   vertical-align: middle;
 }
-</style>
+</style>

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

@@ -235,7 +235,7 @@ export default {
         //     params.PropertyId = res.Id
 
         //   })
-        // } 
+        // }
         // else {
         //   await createPart(params, res => {
         //     if (i == newData.length - 1) {
@@ -318,7 +318,7 @@ export default {
         columns: this.formatHeaderType(this.tableHeader),
         rowHeights: 30,
         maxRows: this.tableData.length,
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除部件"
@@ -603,4 +603,4 @@ export default {
     margin-top: 10px;
   }
 }
-</style>
+</style>

+ 2 - 2
src/views/ledger/facility/partsmanage/index.vue

@@ -406,7 +406,7 @@ export default {
         columns: this.formatHeaderType(this.tableHeader),
         rowHeights: 30,
         maxRows: this.tableData.length,
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除部件"
@@ -764,4 +764,4 @@ export default {
 .el-pagination span:not([class*="suffix"]) {
   vertical-align: middle;
 }
-</style>
+</style>

+ 2 - 2
src/views/ledger/property/addproperty.vue

@@ -254,7 +254,7 @@ export default {
         columns: this.formatHeaderType(this.tableHeader),
         rowHeights: 30,
         maxRows: this.tableData.length,
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除资产"
@@ -516,4 +516,4 @@ export default {
     margin-top: 10px;
   }
 }
-</style>
+</style>

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

@@ -144,7 +144,7 @@ export default {
     ]),
     showTypes () {
       return this.onlyRead?
-        [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]: 
+        [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]:
         [{value: "Visible", label: '只看采集信息'}, {value: "all", label: '全部'}]
     }
   },
@@ -238,7 +238,7 @@ export default {
         param.Content.push(item);
       });
       await updataRentTableData(param, (res) => {
-        
+
       })
     },
     //保存元空间关联
@@ -366,7 +366,7 @@ export default {
         columns: this.formatHeaderType(this.tableHeader),
         rowHeights: 30,
         maxRows: this.tableData.length,
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除租户"
@@ -596,4 +596,4 @@ export default {
 .el-pagination button, .el-pagination span:not([class*=suffix]) {
     vertical-align: middle;
 }
-</style>
+</style>

+ 2 - 2
src/views/ledger/rentlist/rentadd/index.vue

@@ -169,7 +169,7 @@ export default {
         columns: this.formatHeaderType(this.tableHeader),
         rowHeights: 30,
         maxRows: this.tableData.length,
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除租户"
@@ -307,4 +307,4 @@ export default {
     margin-top: 10px;
   }
 }
-</style>
+</style>

+ 2 - 2
src/views/ledger/system/addsystem.vue

@@ -263,7 +263,7 @@ export default {
         columns: this.formatHeaderType(this.tableHeader),
         rowHeights: 30,
         maxRows: this.tableData.length,
-        contextMenu: {
+        contextMenu: this.onlyRead ? false :{
           items: {
             remove_row: {
               name: "删除设备"
@@ -490,4 +490,4 @@ export default {
     margin-top: 10px;
   }
 }
-</style>
+</style>

+ 3 - 3
src/views/point/config_point/steps/step1.vue

@@ -362,7 +362,7 @@
                     columns: showTypes(header),
                     rowHeights: 30,
                     maxRows: this.allData.length,
-                    contextMenu: {
+                     contextMenu: {
                         items: {
                             remove_row: {
                                 name: "删除点位"
@@ -468,7 +468,7 @@
                                flag = false
                                return false
                             }
-                          } 
+                          }
                         }
                         if (flag) {
                             this.createList(createList)
@@ -508,7 +508,7 @@
             },
             /**
              * @param {更新list} updateList
-             * 
+             *
              * 更新点位
              */
             update(updateList) {

+ 14 - 9
src/views/screen/splitscreen/spaceledger/index.vue

@@ -39,7 +39,7 @@
                 <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.key}`" alt="空间图片">
               </div>
             </div>
-            <div class="space-img" v-if="!spaceDetails.Pic">
+            <!-- <div class="space-img" v-if="!spaceDetails.Pic">
               <div class="img-box">
                 <img src="https://hbimg.huabanimg.com/2787ad434fc2bc819a5d7deda3855d897a99d528ab4a-e3HRgR_fw658" alt="空间图片">
               </div>
@@ -52,7 +52,7 @@
               <div class="img-box">
                 <img src="https://hbimg.huabanimg.com/2ea712954c75ff1b1e13329e7e4209f0691b88945c73-JCmkXX_fw658" alt="空间图片">
               </div>
-            </div>
+            </div> -->
           </el-scrollbar>
         </el-aside>
         <el-main style="height:100%">
@@ -164,7 +164,7 @@ export default {
     if (this.$route.name === "spaceLedger" && this.$route.query.RoomID && this.$route.query.zone) {
       this.getData();
     }
-    this.getInFormationPoitnName();
+    // this.getInFormationPoitnName();
   },
   updated() { },
   computed: {
@@ -182,7 +182,12 @@ export default {
       }
       queryZone(params, res => {
         this.spaceDetails = res.Content[0];
-        console.log(this.spaceDetails,333)
+        this.spaceDetails.Pic ? this.spaceDetails.Pic = this.spaceDetails.Pic : this.spaceDetails.Pic = [
+          { Id: 21324324532, key: 'https://hbimg.huabanimg.com/2787ad434fc2bc819a5d7deda3855d897a99d528ab4a-e3HRgR_fw658' },
+          { Id: 21324324532, key: 'https://hbimg.huabanimg.com/5e4e3239dc7eca56eb92ca612d49d824f022b13621d5a-Ga7voM_fw658' },
+          { Id: 21324324532, key: 'https://hbimg.huabanimg.com/60e2a25564f6ac13e7e16a19dcc3e194d565776231347-1Cw8dg_fw658' },
+          { Id: 21324324532, key: 'https://hbimg.huabanimg.com/2ea712954c75ff1b1e13329e7e4209f0691b88945c73-JCmkXX_fw658' },
+        ]
         if (this.spaceDetails.Outline && this.spaceDetails.Outline[0] && this.spaceDetails.Outline[0].length) {
           this.getSpaceFloor();
         }
@@ -378,9 +383,9 @@ export default {
   margin: -10px;
   padding-bottom: 0;
   overflow: hidden;
-  width: 100%
+  width: 100%;
 }
-.el-tabs.el-tabs--card.el-tabs--top{
+.el-tabs.el-tabs--card.el-tabs--top {
   height: 100% !important;
   width: 100%;
 }
@@ -397,10 +402,10 @@ export default {
     height: 100% !important;
   }
 }
-#pane-dynamicData{
+#pane-dynamicData {
   height: calc(100% - 10px);
 }
-.el-tab-pane{
+.el-tab-pane {
   height: 100%;
 }
 #pane-staticData {
@@ -422,7 +427,7 @@ export default {
   overflow-x: hidden !important;
   overflow-y: auto !important;
 }
-.el-tabs__content{
+.el-tabs__content {
   height: calc(100% - 47px) !important;
 }
 </style>