Jelajahi Sumber

一级校审附件问题

lizhenhao 2 tahun lalu
induk
melakukan
e494992893

+ 20 - 3
src/views/common/UpLoadComponent.vue

@@ -12,7 +12,7 @@
                :on-change="changes"
                :on-progress="uploadVideoProcess"
                :file-list="fileList">
-      <el-button type="info" size="mini" :slot="auth==='view'&&uploadFlag===false?'tip':'trigger'" :disabled="auth==='view'">点击上传</el-button>
+      <el-button type="info" size="mini" :slot="auth==='view'&&uploadFlag===false?'tip':'trigger'" :disabled="auth==='view'&&uploadFlag===false">点击上传</el-button>
     </el-upload>
     <div style="height: calc(100% - 80px);margin-top: 10px">
       <!-- 进度条 -->
@@ -46,7 +46,8 @@
         <el-table-column label="操作" width="200px" fixed="right" align="center">
           <template  scope="scope">
             <el-button type="text"  icon="el-icon-edit" size="small" @click="toHref(scope.row)" :disabled="false">下载</el-button>
-            <el-button type="text"  icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false">删除</el-button>
+            <el-button type="text"  icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name">删除</el-button>
+<!--            <el-button v-if="createBy===scope.row.createBy.name" type="text"  icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false">删除2</el-button>-->
           </template>
         </el-table-column>
       </el-table>
@@ -89,7 +90,8 @@
         fileLoading: true,
         dividerName: '',
         uploadFlag: false,
-        delFlag: false
+        delFlag: false,
+        createBy: ''
       }
     },
     watch: {
@@ -153,9 +155,23 @@
         this.auth = auth
         if (this.commonJS.isEmpty(uploadFlag)) {
           this.uploadFlag = false
+        } else {
+          if (uploadFlag !== true && uploadFlag !== false) {
+            this.uploadFlag = false
+          } else {
+            this.uploadFlag = uploadFlag
+          }
+          console.log(this.uploadFlag)
         }
         if (this.commonJS.isEmpty(delFlag)) {
           this.delFlag = false
+        } else {
+          if (delFlag !== true && delFlag !== false) {
+            this.delFlag = false
+            this.createBy = delFlag
+          } else {
+            this.delFlag = delFlag
+          }
         }
         if (this.commonJS.isEmpty(fileList)) {
           this.fileLoading = true
@@ -267,6 +283,7 @@
         this.$refs.upload.uploadFiles = []
         this.dataList = []
         this.dataListNew = []
+        this.createBy = ''
       },
       /**
        * 获取当前文件列表中的文件数据

+ 1 - 1
src/views/modules/flowable/task/TaskFormDetail.vue

@@ -10,7 +10,7 @@
   <el-tabs type="border-card" v-model="selectedTab">
     <el-tab-pane label="表单信息" name="form-first">
 
-      <component :formReadOnly="formReadOnly" v-if="formType === '2'"  :class="formReadOnly?'readonly':''" ref="form" :businessId="businessId" :is="form"></component>
+      <component :formReadOnly="formReadOnly" v-if="formType === '2'" :status="'taskFormDetail'"  :class="formReadOnly?'readonly':''" ref="form" :businessId="businessId" :is="form"></component>
       <PreviewForm   v-if="formType !== '2'"  :processDefinitionId="procDefId" :edit="false" :taskFormData="taskFormData" ref="form"/>
 
     </el-tab-pane>

+ 14 - 6
src/views/modules/program/registered/ProjectThreeAuditForm.vue

@@ -116,10 +116,11 @@
               </el-col>
             </el-form>
           </el-row>
-          <!--        附件-->
-          <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+
 
       </el-form>
+      <!--        附件-->
+      <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
 
     </div>
   </div>
@@ -141,6 +142,10 @@
       formReadOnly: {
         type: Boolean,
         default: false
+      },
+      status: {
+        type: String,
+        default: ''
       }
     },
     data () {
@@ -289,11 +294,14 @@
             } else {
               this.inputForm.auditPeopleList = ''
             }
-            if (this.formReadOnly === true && this.status === 'audit') {
-              this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit', null, null, true)
-            }
-            if (this.formReadOnly === true && this.status !== 'audit') {
+            if (this.formReadOnly === true && this.status === 'taskFormDetail') {
+              this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit')
+            } else if (this.formReadOnly === true && this.status === 'audit') {
+              this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit', null, null, true, JSON.parse(localStorage.getItem('user')).name)
+            } else if (this.formReadOnly === true && this.status !== 'audit' && this.status !== 'taskFormDetail') {
               this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit')
+            } else {
+              this.$refs.uploadComponent.newUpload('view', this.inputForm.workAttachmentDtoList, 'program_audit', null, null, true, JSON.parse(localStorage.getItem('user')).name)
             }
             this.loading = false
           })