瀏覽代碼

报告附件组件修改

lizhenhao 2 年之前
父節點
當前提交
8c0f9d248a
共有 1 個文件被更改,包括 12 次插入6 次删除
  1. 12 6
      src/views/common/UpLoadComponentV2.1.vue

+ 12 - 6
src/views/common/UpLoadComponentV2.1.vue

@@ -58,7 +58,7 @@
         </el-table-column>
         <el-table-column label="盖章类型" prop="sealType" align="center">
           <template slot-scope="scope">
-            <el-select v-if="auth !== 'view'" size="small" v-model="scope.row.sealType" placeholder="请选择">
+            <el-select v-if="auth !== 'view'" @change="sealTypeChange(scope)" size="small" v-model="scope.row.sealType" placeholder="请选择">
               <el-option
                 v-for="item in $dictUtils.getDictList('cw_seal_type')"
                 :key="item.value"
@@ -71,11 +71,8 @@
         </el-table-column>
         <el-table-column label="备注" prop="remarks" align="center">
           <template slot-scope="scope">
-            <component
-              :is="scope.row.remarksComponent || 'remarksComponentA'"
-              :value="scope.row.remarks"
-              @updateRemarks="updateRemarks"
-            ></component>
+            <el-input size="small" v-if="auth !== 'view'" v-model="scope.row.remarks" placeholder="请输入"></el-input>
+            <span v-else>{{commonJS.isEmpty(scope.row.remarks)?'':scope.row.remarks}}</span>
           </template>
         </el-table-column>
         <el-table-column label="操作" width="200px" fixed="right" align="center">
@@ -671,6 +668,15 @@
             this.dataListNew[index].remarks = this.remarks
           }
         })
+      },
+      sealTypeChange (scope) {
+        let suffix = scope.row.name.substring(scope.row.name.lastIndexOf('.') + 1)
+        if (parseInt(scope.row.sealType) === 1) {
+          if (suffix !== 'pdf' && suffix !== 'doc' && suffix !== 'docx') {
+            this.$message.error('只有“pdf、doc、docx”格式文件的盖章类型可以是“电子章”')
+            scope.row.sealType = ''
+          }
+        }
       }
     }
   }