duy 1 سال پیش
والد
کامیت
cc485a428c
1فایلهای تغییر یافته به همراه12 افزوده شده و 7 حذف شده
  1. 12 7
      src/views/patrol/add.vue

+ 12 - 7
src/views/patrol/add.vue

@@ -159,20 +159,24 @@
                         </template>
                         <template #rectifyAttachment="{ row, index }">
                             <el-link v-if="row?.rectifyAttachmentName" type="primary" :disabled="type === 'review' || type === 'view'" @click="clickAttachment(row)">{{ row.rectifyAttachmentName }}</el-link>
-                            <el-link v-else type="primary" @click="clickAttachment(row, index)">上传</el-link>
+                            <el-link v-else type="primary" :disabled="type === 'review' || type === 'view'" @click="clickAttachment(row, index)">上传</el-link>
                         </template>
                         <template #inspectUserName="{ row }">
                             <hc-table-input v-model="row.inspectUserName" type="textarea" :disabled="type === 'review' || type === 'view'" />
                         </template>
                         <template #inspectPdfUrl="{ row, index }">
                             <el-link v-if="row?.isShowImage == 0" type="primary" :disabled="type === 'review' || type === 'view'" @click="clickUploadInspect(row, index)">上传</el-link>
-                       
-                            <el-image v-else style="width: 100px; height: 100px;cursor: pointer;" :src="row?.inspectPdfUrl" @click="clickUploadInspect(row, index)" />
+                            <template v-else>
+                                <el-image v-if="type === 'confirmChange' || type === 'add'" style="width: 100px; height: 100px;cursor: pointer;" :src="row?.inspectPdfUrl" @click="clickUploadInspect(row, index)" />
+                                <el-image v-else style="width: 100px; height: 100px;cursor: pointer;" :src="row?.inspectPdfUrl" :preview-src-list="[row?.inspectPdfUrl]" :initial-index="0" hide-on-click-modal />
+                            </template>
                         </template>
                         <template #rectifyPdfUrl="{ row, index }">
                             <el-link v-if="!row.rectifyPdfUrl" type="primary" :disabled="type === 'review' || type === 'view'" @click="clickRectifyPdfUrl(row, index)">上传</el-link>
-                       
-                            <el-image v-else style="width: 100px; height: 100px;cursor: pointer;" :src="row.rectifyPdfUrl" @click="clickRectifyPdfUrl(row, index)" />
+                            <template v-else>
+                                <el-image v-if="type === 'changeRow' || type === 'add' || type === 'confirmChange'" style="width: 100px; height: 100px;cursor: pointer;" :src="row.rectifyPdfUrl" @click="clickRectifyPdfUrl(row, index)" />
+                                <el-image v-else style="width: 100px; height: 100px;cursor: pointer;" :src="row?.rectifyPdfUrl" :preview-src-list="[row?.rectifyPdfUrl]" :initial-index="0" hide-on-click-modal />
+                            </template>
                         </template>
                         <template #action="{ row, index }">
                             <el-link type="danger" :disabled="type === 'view' || type === 'changeRow'" @click="deleProcess(row, index)">删除</el-link>
@@ -217,6 +221,7 @@
                                 :default-checked-keys="defaultChecked"
                                 :auto-expand-keys="TreeAutoExpandKeys"
                                 check-strictly
+                                :default-expand-all="type === 'confirmChange'"
                                 @check="divisionTreeCheck"
                                 @load="treeLoadNode"
                                 @nodeTap="wbsElTreeClick"
@@ -258,7 +263,7 @@ const router = useRouter()
 const useAppState = useAppStore()
 const useRoutes = useRoute()
 const routerQuery = useRoutes?.query
-const type = ref(routerQuery?.type || '')
+const type = ref(routerQuery?.type || 'add')
 const id = ref(routerQuery?.id || '')
 const projectId = ref(useAppState.getProjectId)
 const contractId = ref(useAppState.getContractId)
@@ -331,7 +336,7 @@ const tableColumn = ref([
 onActivated(()=>{
     getTypeOptions()
     const routerQuery = useRoutes?.query
-    type.value = routerQuery?.type || ''
+    type.value = routerQuery?.type || 'add'
     id.value = routerQuery?.id || ''
     if (id.value.length > 0) {
         getDetail( id.value)