From 75bbb26a8147fa6239cc46025f13a413dbf0e177 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期四, 15 十月 2026 11:55:02 +0800
Subject: [PATCH] 方法验证模块恢复为本地版本:移除合并进来的同事 Word 表单组件(新增/编辑切换)与上岗证实时查询,恢复本地列表列、搜索与上岗证弹窗实现;人员授权下拉优化与 vite 配置等其余合并内容保留
---
src/views/CNAS/process/method/methodVerification/component/viewWorkPermitDia.vue | 84 ++++++++++++------------------------------
1 files changed, 24 insertions(+), 60 deletions(-)
diff --git a/src/views/CNAS/process/method/methodVerification/component/viewWorkPermitDia.vue b/src/views/CNAS/process/method/methodVerification/component/viewWorkPermitDia.vue
index cbe7ee6..965a0d7 100644
--- a/src/views/CNAS/process/method/methodVerification/component/viewWorkPermitDia.vue
+++ b/src/views/CNAS/process/method/methodVerification/component/viewWorkPermitDia.vue
@@ -2,25 +2,23 @@
<div>
<el-dialog v-model="filesDialogVisible" title="鏌ョ湅涓婂矖璇�" width="80%" @closed="closeFilesLook">
<div>
- <el-alert v-if="!tableLoading && tableData.length === 0" type="info" :closable="false"
- title="鎵�閫夋娴嬩汉鍛樻殏鏃犱换鑱屾巿鏉冭褰曪紝璇锋牳瀵硅浠昏亴浜哄憳涓庢娴嬩汉鍛樻槸鍚︿负鍚屼竴浜恒��"/>
<limsTable
- ref="yearTable"
- :column="columnData"
- :height="'calc(100vh - 400px)'"
- :highlightCurrentRow="true"
- :table-data="tableData"
- :table-loading="tableLoading"
- style="margin-top: 0.5em;">
+ ref="yearTable"
+ :column="columnData"
+ :height="'calc(100vh - 400px)'"
+ :highlightCurrentRow="true"
+ :table-data="tableData"
+ :table-loading="tableLoading"
+ style="margin-top: 0.5em;">
</limsTable>
</div>
</el-dialog>
<el-dialog
- v-model="lookDialogVisible"
- fullscreen
- title="鏌ョ湅闄勪欢" top="5vh" width="800px">
+ v-model="lookDialogVisible"
+ fullscreen
+ title="鏌ョ湅闄勪欢" top="5vh" width="800px">
<filePreview v-if="lookDialogVisible" :currentFile="{}"
- :fileUrl="fileUrl(currentInfo)" style="max-height: 90vh;overflow-y: auto;"/>
+ :fileUrl="javaApi+'/img/'+currentInfo.fileUrl" style="max-height: 90vh;overflow-y: auto;"/>
</el-dialog>
</div>
</template>
@@ -29,12 +27,11 @@
import file from '@/utils/file';
import filePreview from '@/components/Preview/filePreview.vue';
import limsTable from '@/components/Table/lims-table.vue'
-import {getCurrentWorkFiles} from '@/api/cnas/process/method/methodVerification'
export default {
name: 'viewWorkPermitDia',
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
- components: {filePreview, limsTable},
+ components: { filePreview, limsTable },
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
@@ -77,7 +74,7 @@
],
tableData: [],
info: {},
- currentInfo: {},
+ currentInfo:{},
lookDialogVisible: false,
};
},
@@ -86,60 +83,27 @@
},
// 鏂规硶闆嗗悎
methods: {
- fileUrl(row) {
- const image = /\.(png|jpe?g|gif|bmp|webp)$/i.test(row.fileUrl || '')
- return this.javaApi + (image ? '/img/' : '/word/') + row.fileUrl
- },
- // 涓ょ鐢ㄦ硶锛氭暟缁�=妫�娴嬩汉鍛榠d锛堝疄鏃舵煡璇級锛涜瀵硅薄=浼樺厛灞曠ず宸蹭繚瀛樼殑涓婂矖璇侊紝鍏舵鎸夊凡閫夋娴嬩汉鍛樺疄鏃舵煡璇�
- openDia(payload = {}) {
+ openDia(row) {
this.filesDialogVisible = true
- this.tableData = []
- if (Array.isArray(payload)) {
- this.loadCurrentFiles(payload)
- return
- }
- this.info = payload || {}
- if (Array.isArray(payload.workFileList) && payload.workFileList.length) {
- this.tableData = payload.workFileList
- return
- }
- this.loadCurrentFiles(Array.isArray(payload.confirmUser) ? payload.confirmUser : [])
+ this.info = row
+ this.tableData = this.info.workFileList
},
- loadCurrentFiles(userIds) {
- if (!userIds.length) return
- this.tableLoading = true
- getCurrentWorkFiles({userIds: userIds.join(',')}).then(res => {
- if (res.code === 200) this.tableData = res.data || []
- }).catch(() => {
- this.$message.error('涓婂矖璇佽鍙栧け璐ワ紝璇风◢鍚庨噸璇�')
- }).finally(() => {
- this.tableLoading = false
- })
- },
- closeFilesLook() {
+ closeFilesLook () {
this.filesDialogVisible = false
},
// 鏌ョ湅鏂囦欢
- handleLook(row) {
- if (!row.fileUrl) {
- this.$message.warning('璇ヤ汉鍛樺凡鏈変换鑱屾巿鏉冭褰曪紝浣嗗皻鏈笂浼犱笂宀楄瘉涔︽枃浠�')
- return
- }
+ handleLook(row){
this.currentInfo = row
this.lookDialogVisible = true
},
// 涓嬭浇
- upload(row) {
- if (!row.fileUrl) {
- this.$message.warning('璇ヤ汉鍛樺凡鏈変换鑱屾巿鏉冭褰曪紝浣嗗皻鏈笂浼犱笂宀楄瘉涔︽枃浠�')
- return
- }
+ upload (row) {
let url = '';
- if (/\.(png|jpe?g|gif|bmp|webp)$/i.test(row.fileUrl || '')) {
- url = this.javaApi + '/img/' + row.fileUrl
- file.downloadIamge(url, row.fileName)
- } else {
- url = this.javaApi + '/word/' + row.fileUrl
+ if(row.type==1){
+ url = this.javaApi+'/img/'+row.fileUrl
+ file.downloadIamge(url,row.fileName)
+ }else{
+ url = this.javaApi+'/word/'+row.fileUrl
const link = document.createElement('a');
link.href = url;
link.download = row.fileName;
--
Gitblit v1.9.3