Przeglądaj źródła

Merge branch 'dev'

haojianlong 5 lat temu
rodzic
commit
412341ffaf

+ 1 - 1
package.json

@@ -36,7 +36,7 @@
     "@saga-web/base": "2.1.9",
     "@saga-web/draw": "2.1.61",
     "@saga-web/graphy": "2.1.34",
-    "@saga-web/cad-engine": "2.0.458"
+    "@saga-web/cad-engine": "2.0.461"
   },
   "devDependencies": {
     "ajv": "^6.9.1",

+ 3 - 3
src/components/business_space/newGraphy/graphy.vue

@@ -15,9 +15,9 @@
             width="180px" @select="handleSelect">
             <i class="el-icon-search el-input__icon" slot="suffix" @click="handleSelect"></i>
             <template slot-scope="{ item }">
-              <div class="name" style="position: relative;">
-                {{ item.data.RoomLocalName | cutString(8) }}
-                <span class="addr" style="position: absolute;right:10px;color:#409EFF;">定位</span>
+              <div class="name" style="position: relative;padding-right:40px;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" :title="item.data.RoomLocalName">
+                {{ item.data.RoomLocalName }}
+                <span class="addr" style="position: absolute;right:0;color:#409EFF;">定位</span>
               </div>
             </template>
           </el-autocomplete>

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

@@ -1011,7 +1011,9 @@ export default {
                 case 'LedgerParam.Siteinstall.CheckReport':
                     let IPSdata = tools.dataForKey(this.tableData[row.row], val);
                     this.filesArr = IPSdata ? IPSdata : [];
-                    this.myDialog.uploadFiles = true;
+                    if (!this.onlyRead || this.filesArr.length) {
+                        this.myDialog.uploadFiles = true;
+                    }
                     return false
                 //安装照片--安装图纸--设备铭牌照片--设备图纸
                 case 'LedgerParam.Siteinstall.InstallPic':
@@ -1020,13 +1022,17 @@ export default {
                 case 'LedgerParam.PhotoDoc.Drawing':
                     let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
                     this.imgsArr = SSPPdata ? SSPPdata : [];
-                    this.myDialog.uploadImgs = true;
+                    if (!this.onlyRead || this.imgsArr.length) {
+                        this.myDialog.uploadImgs = true;
+                    }
                     return false
                 //设备照片
                 case 'LedgerParam.PhotoDoc.Pic':
                     let Pdata = tools.dataForKey(this.tableData[row.row], val);
                     this.picsArr = Pdata ? Pdata : [];
-                    this.myDialog.pic = true;
+                    if (!this.onlyRead || this.picsArr.length) {
+                        this.myDialog.pic = true;
+                    }
                     return false
                 //包含的部件字段
                 case 'Count':

+ 4 - 3
src/utils/handsontable/mainText.js

@@ -1,5 +1,6 @@
 const text = {
-
+    // 只读模式 or 编辑模式
+    readOnly: false,
     //图片类型
     picType: (instance, td, row, col, prop, value, cellProperties) => {
         td.style.color = "#409EFF";
@@ -13,7 +14,7 @@ const text = {
             })
             td.innerHTML = "已上传:" + i;
         } else {
-            td.innerHTML = "点击上传"
+            td.innerHTML = text.readOnly?'':'点击上传'
         }
         return td;
     },
@@ -24,7 +25,7 @@ const text = {
         if (value instanceof Array && value.length > 0) {
             td.innerHTML = "已上传:" + value.length;
         } else {
-            td.innerHTML = "点击上传"
+            td.innerHTML = text.readOnly?'':'点击上传'
         }
         return td;
     },

+ 1 - 0
src/utils/handsontable/notShow.js

@@ -933,6 +933,7 @@ const showTools = {
         if (taizhang && !onlyRead) {
             arr = this.arrToArr(arr, showType)
         }
+        text.readOnly = onlyRead;
         let data = arr.map(item => {
             // if (type == "property" && item.FirstTag == "RunParam") { //资产台账不显示运行参数
             //     return undefined