duy před 1 rokem
rodič
revize
eb25a93a10
1 změnil soubory, kde provedl 12 přidání a 6 odebrání
  1. 12 6
      src/views/patrol/add.vue

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

@@ -23,7 +23,7 @@
                     <span>清空数据</span>
                 </el-button>
                 <el-button
-                    v-if="type === ''"
+                    v-if="type === 'add'"
                     hc-btn
                     color="#12C060"
                     style="color: white;"
@@ -159,7 +159,12 @@
                         </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" :disabled="type === 'review' || type === 'view'" @click="clickAttachment(row, index)">上传</el-link>
+                            <template v-else>
+                                <el-link v-if="type === 'changeRow' || type === 'add' || type === 'confirmChange'" :disabled="type === 'review' || type === 'view'" @click="clickAttachment(row, index)">上传</el-link>
+                                <el-link v-else type="primary" @click="openAttachment(row, index)">
+                                    上传
+                                </el-link>
+                            </template>
                         </template>
                         <template #inspectUserName="{ row }">
                             <hc-table-input v-model="row.inspectUserName" type="textarea" :disabled="type === 'review' || type === 'view'" />
@@ -168,14 +173,14 @@
                             <el-link v-if="row?.isShowImage == 0" type="primary" :disabled="type === 'review' || type === 'view'" @click="clickUploadInspect(row, index)">上传</el-link>
                             <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 />
+                                <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 preview-teleported />
                             </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>
                             <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 />
+                                <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 preview-teleported />
                             </template>
                         </template>
                         <template #action="{ row, index }">
@@ -221,7 +226,7 @@
                                 :default-checked-keys="defaultChecked"
                                 :auto-expand-keys="TreeAutoExpandKeys"
                                 check-strictly
-                                :default-expand-all="type === 'confirmChange'"
+                              
                                 @check="divisionTreeCheck"
                                 @load="treeLoadNode"
                                 @nodeTap="wbsElTreeClick"
@@ -509,7 +514,7 @@ const linksRelateModalClick = ()=>{
     linksRelateModal.value = true
     isSearchTree.value = false
    
-    defaultChecked.value = arrToKey(processDataList.value, 'primaryKeyId', ',').split(',')
+    // defaultChecked.value = arrToKey(processDataList.value, 'primaryKeyId', ',').split(',')
 }
 const linksRelateModalClose = ()=>{
     linksRelateModal.value = false
@@ -573,6 +578,7 @@ const linksRelateModalSave = ()=>{
  
    
 }
+
     //获取展开节点
     const getKeys = (node, pathArr) => {
     if (node.parent) {