From 9862248787934f4242ac9636e0c4d5b8ee0870b8 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期二, 20 十月 2026 16:45:58 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue | 118 ++++-
src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue | 19
public/import-templates/标准查新导入模板.xlsx | 0
public/import-templates/质量监控计划导入模板.xlsx | 0
src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue | 48 -
src/views/CNAS/process/ensureResults/ensureResultsValidity/components/inspectionEvaluationDialog.vue | 42 +
src/views/CNAS/systemManagement/documentControl/components/FileList.vue | 17
src/views/CNAS/process/method/methodVerification/component/formDIa.vue | 24
public/import-templates/文件作废记录导入模板.docx | 0
src/components/ImportDialog/index.vue | 204 +++++++++
src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue | 17
public/import-templates/质量监督计划导入模板.xlsx | 0
src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue | 15
src/api/cnas/process/ensureResults/qualitySupervise.js | 8
src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue | 113 +++-
public/import-templates/外来文件确认导入模板.docx | 0
public/import-templates/文件清单导入模板.xlsx | 0
public/import-templates/文件定期审查记录导入模板.docx | 0
src/views/structural/capabilityAndLaboratory/capability/index.vue | 122 +---
src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue | 43 +
src/utils/inspectionValueFormat.js | 29 +
src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue | 17
public/import-templates/重大风险因素分析及控制计划导入模板.xlsx | 0
src/assets/styles/element-ui.scss | 7
public/import-templates/检验对象导入模板.xlsx | 0
public/import-templates/文件发放回收记录导入模板.docx | 0
src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue | 19
public/import-templates/文件审批记录导入模板.docx | 0
public/import-templates/危险因素辨识与风险评价导入模板.xlsx | 0
src/api/standard/standardLibrary.js | 5
src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue | 19
src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue | 92 ++++
src/views/CNAS/resourceDemand/device/component/deviceOverview.vue | 4
src/views/login.vue | 1
src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue | 17
src/views/CNAS/process/method/standardMethodsChange/index.vue | 200 +++++++++
src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue | 19
public/import-templates/人员培训年度计划导入模板.xlsx | 0
src/views/CNAS/process/ensureResults/ensureResultsValidity/components/detailFormDialog.vue | 55 ++
public/import-templates/检验项目参数导入模板.xlsx | 0
40 files changed, 1,018 insertions(+), 256 deletions(-)
diff --git "a/public/import-templates/\344\272\272\345\221\230\345\237\271\350\256\255\345\271\264\345\272\246\350\256\241\345\210\222\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" "b/public/import-templates/\344\272\272\345\221\230\345\237\271\350\256\255\345\271\264\345\272\246\350\256\241\345\210\222\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
new file mode 100644
index 0000000..269954c
--- /dev/null
+++ "b/public/import-templates/\344\272\272\345\221\230\345\237\271\350\256\255\345\271\264\345\272\246\350\256\241\345\210\222\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
Binary files differ
diff --git "a/public/import-templates/\345\215\261\351\231\251\345\233\240\347\264\240\350\276\250\350\257\206\344\270\216\351\243\216\351\231\251\350\257\204\344\273\267\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" "b/public/import-templates/\345\215\261\351\231\251\345\233\240\347\264\240\350\276\250\350\257\206\344\270\216\351\243\216\351\231\251\350\257\204\344\273\267\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
new file mode 100644
index 0000000..dfdc52d
--- /dev/null
+++ "b/public/import-templates/\345\215\261\351\231\251\345\233\240\347\264\240\350\276\250\350\257\206\344\270\216\351\243\216\351\231\251\350\257\204\344\273\267\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
Binary files differ
diff --git "a/public/import-templates/\345\244\226\346\235\245\346\226\207\344\273\266\347\241\256\350\256\244\345\257\274\345\205\245\346\250\241\346\235\277.docx" "b/public/import-templates/\345\244\226\346\235\245\346\226\207\344\273\266\347\241\256\350\256\244\345\257\274\345\205\245\346\250\241\346\235\277.docx"
new file mode 100644
index 0000000..c11f071
--- /dev/null
+++ "b/public/import-templates/\345\244\226\346\235\245\346\226\207\344\273\266\347\241\256\350\256\244\345\257\274\345\205\245\346\250\241\346\235\277.docx"
Binary files differ
diff --git "a/public/import-templates/\346\226\207\344\273\266\344\275\234\345\272\237\350\256\260\345\275\225\345\257\274\345\205\245\346\250\241\346\235\277.docx" "b/public/import-templates/\346\226\207\344\273\266\344\275\234\345\272\237\350\256\260\345\275\225\345\257\274\345\205\245\346\250\241\346\235\277.docx"
new file mode 100644
index 0000000..5c9ddbb
--- /dev/null
+++ "b/public/import-templates/\346\226\207\344\273\266\344\275\234\345\272\237\350\256\260\345\275\225\345\257\274\345\205\245\346\250\241\346\235\277.docx"
Binary files differ
diff --git "a/public/import-templates/\346\226\207\344\273\266\345\217\221\346\224\276\345\233\236\346\224\266\350\256\260\345\275\225\345\257\274\345\205\245\346\250\241\346\235\277.docx" "b/public/import-templates/\346\226\207\344\273\266\345\217\221\346\224\276\345\233\236\346\224\266\350\256\260\345\275\225\345\257\274\345\205\245\346\250\241\346\235\277.docx"
new file mode 100644
index 0000000..c4521a4
--- /dev/null
+++ "b/public/import-templates/\346\226\207\344\273\266\345\217\221\346\224\276\345\233\236\346\224\266\350\256\260\345\275\225\345\257\274\345\205\245\346\250\241\346\235\277.docx"
Binary files differ
diff --git "a/public/import-templates/\346\226\207\344\273\266\345\256\232\346\234\237\345\256\241\346\237\245\350\256\260\345\275\225\345\257\274\345\205\245\346\250\241\346\235\277.docx" "b/public/import-templates/\346\226\207\344\273\266\345\256\232\346\234\237\345\256\241\346\237\245\350\256\260\345\275\225\345\257\274\345\205\245\346\250\241\346\235\277.docx"
new file mode 100644
index 0000000..2270329
--- /dev/null
+++ "b/public/import-templates/\346\226\207\344\273\266\345\256\232\346\234\237\345\256\241\346\237\245\350\256\260\345\275\225\345\257\274\345\205\245\346\250\241\346\235\277.docx"
Binary files differ
diff --git "a/public/import-templates/\346\226\207\344\273\266\345\256\241\346\211\271\350\256\260\345\275\225\345\257\274\345\205\245\346\250\241\346\235\277.docx" "b/public/import-templates/\346\226\207\344\273\266\345\256\241\346\211\271\350\256\260\345\275\225\345\257\274\345\205\245\346\250\241\346\235\277.docx"
new file mode 100644
index 0000000..d2bbcbb
--- /dev/null
+++ "b/public/import-templates/\346\226\207\344\273\266\345\256\241\346\211\271\350\256\260\345\275\225\345\257\274\345\205\245\346\250\241\346\235\277.docx"
Binary files differ
diff --git "a/public/import-templates/\346\226\207\344\273\266\346\270\205\345\215\225\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" "b/public/import-templates/\346\226\207\344\273\266\346\270\205\345\215\225\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
new file mode 100644
index 0000000..ffed303
--- /dev/null
+++ "b/public/import-templates/\346\226\207\344\273\266\346\270\205\345\215\225\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
Binary files differ
diff --git "a/public/import-templates/\346\240\207\345\207\206\346\237\245\346\226\260\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" "b/public/import-templates/\346\240\207\345\207\206\346\237\245\346\226\260\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
new file mode 100644
index 0000000..4d545ee
--- /dev/null
+++ "b/public/import-templates/\346\240\207\345\207\206\346\237\245\346\226\260\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
Binary files differ
diff --git "a/public/import-templates/\346\243\200\351\252\214\345\257\271\350\261\241\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" "b/public/import-templates/\346\243\200\351\252\214\345\257\271\350\261\241\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
new file mode 100644
index 0000000..e1535e6
--- /dev/null
+++ "b/public/import-templates/\346\243\200\351\252\214\345\257\271\350\261\241\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
Binary files differ
diff --git "a/public/import-templates/\346\243\200\351\252\214\351\241\271\347\233\256\345\217\202\346\225\260\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" "b/public/import-templates/\346\243\200\351\252\214\351\241\271\347\233\256\345\217\202\346\225\260\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
new file mode 100644
index 0000000..939aa5e
--- /dev/null
+++ "b/public/import-templates/\346\243\200\351\252\214\351\241\271\347\233\256\345\217\202\346\225\260\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
Binary files differ
diff --git "a/public/import-templates/\350\264\250\351\207\217\347\233\221\346\216\247\350\256\241\345\210\222\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" "b/public/import-templates/\350\264\250\351\207\217\347\233\221\346\216\247\350\256\241\345\210\222\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
new file mode 100644
index 0000000..5e42a1b
--- /dev/null
+++ "b/public/import-templates/\350\264\250\351\207\217\347\233\221\346\216\247\350\256\241\345\210\222\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
Binary files differ
diff --git "a/public/import-templates/\350\264\250\351\207\217\347\233\221\347\235\243\350\256\241\345\210\222\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" "b/public/import-templates/\350\264\250\351\207\217\347\233\221\347\235\243\350\256\241\345\210\222\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
new file mode 100644
index 0000000..7e8a2cd
--- /dev/null
+++ "b/public/import-templates/\350\264\250\351\207\217\347\233\221\347\235\243\350\256\241\345\210\222\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
Binary files differ
diff --git "a/public/import-templates/\351\207\215\345\244\247\351\243\216\351\231\251\345\233\240\347\264\240\345\210\206\346\236\220\345\217\212\346\216\247\345\210\266\350\256\241\345\210\222\345\257\274\345\205\245\346\250\241\346\235\277.xlsx" "b/public/import-templates/\351\207\215\345\244\247\351\243\216\351\231\251\345\233\240\347\264\240\345\210\206\346\236\220\345\217\212\346\216\247\345\210\266\350\256\241\345\210\222\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
new file mode 100644
index 0000000..f2cdd5a
--- /dev/null
+++ "b/public/import-templates/\351\207\215\345\244\247\351\243\216\351\231\251\345\233\240\347\264\240\345\210\206\346\236\220\345\217\212\346\216\247\345\210\266\350\256\241\345\210\222\345\257\274\345\205\245\346\250\241\346\235\277.xlsx"
Binary files differ
diff --git a/src/api/cnas/process/ensureResults/qualitySupervise.js b/src/api/cnas/process/ensureResults/qualitySupervise.js
index 7d767ed..f3b59b8 100644
--- a/src/api/cnas/process/ensureResults/qualitySupervise.js
+++ b/src/api/cnas/process/ensureResults/qualitySupervise.js
@@ -125,6 +125,14 @@
data: query,
})
}
+// 琚洃鐫d汉鍛樼‘璁ょ洃鐫h褰曪紙绋嬪簭4.2.5锛�
+export function confirmSuperviseRecord(query) {
+ return request({
+ url: '/qualitySupervise/confirmSuperviseRecord',
+ method: 'post',
+ data: query,
+ })
+}
// 鑾峰彇褰撳墠鐩戠潱璁板綍鐨勭洃鐫e憳鍒楄〃
export function getRecordUser(query) {
return request({
diff --git a/src/api/standard/standardLibrary.js b/src/api/standard/standardLibrary.js
index a380534..cbb21d0 100644
--- a/src/api/standard/standardLibrary.js
+++ b/src/api/standard/standardLibrary.js
@@ -136,6 +136,11 @@
return request({ url: "/standardTree/selectTemplateBindings", method: "get", params: query });
}
+// 鏍规嵁妫�娴嬫爣鍑嗭紙鏍囧噯鏂规硶锛夋煡璇㈡爣鍑嗗簱涓凡缁戝畾鐨勫師濮嬭褰曟ā鏉�
+export function selectTemplateBindingsByStandardMethod(query) {
+ return request({ url: "/standardTree/selectTemplateBindingsByStandardMethod", method: "get", params: query });
+}
+
export function saveTemplateBindings(data) {
return request({ url: "/standardTree/saveTemplateBindings", method: "post", data });
}
diff --git a/src/assets/styles/element-ui.scss b/src/assets/styles/element-ui.scss
index c1b01b6..78f297b 100644
--- a/src/assets/styles/element-ui.scss
+++ b/src/assets/styles/element-ui.scss
@@ -149,6 +149,13 @@
font-size: 14px !important;
}
+// 浠呬綔鐢ㄤ簬瀹炲績涓绘寜閽紱plain/link/text 鎸夐挳鐨勬枃瀛椾笌鑳屾櫙鐢� Element Plus 鐨勪富棰樺彉閲忔帶鍒讹紝
+// 鍚﹀垯杩欓噷浼氭妸 plain 鎸夐挳鐨勮儗鏅篃鍒锋垚涓昏壊锛屼笌鍚岃壊鐨勬枃瀛楅噸鍙犲鑷粹�滅湅涓嶈瀛椻�濄��
+.el-button--primary:not(.is-plain):not(.is-link):not(.is-text) {
+ background: var(--el-color-primary);
+ border-color: var(--el-color-primary);
+}
+
/* 婊氬姩鏉★細缁嗐�佹祬銆佹棤杞ㄩ亾搴曡壊 */
::-webkit-scrollbar {
width: 8px !important;
diff --git a/src/components/ImportDialog/index.vue b/src/components/ImportDialog/index.vue
new file mode 100644
index 0000000..51b5ede
--- /dev/null
+++ b/src/components/ImportDialog/index.vue
@@ -0,0 +1,204 @@
+<template>
+ <el-dialog :title="title" v-model="visible" width="520px" append-to-body @close="handleClose">
+ <div v-if="templateUrl" class="template-tip">
+ <el-icon><InfoFilled /></el-icon>
+ <span>绗竴娆″鍏ヨ鍏堜笅杞芥ā鏉匡紝鎸夋ā鏉挎牸寮忓~鍐欏悗鍐嶄笂浼犮��</span>
+ <el-button link type="primary" @click="handleDownloadTemplate">涓嬭浇瀵煎叆妯℃澘</el-button>
+ </div>
+
+ <el-upload
+ ref="uploadRef"
+ drag
+ name="file"
+ :action="action"
+ :headers="headers"
+ :accept="accept"
+ :limit="1"
+ :multiple="false"
+ :auto-upload="false"
+ :on-change="handleFileChange"
+ :on-remove="handleFileRemove"
+ :on-exceed="handleExceed"
+ :on-success="handleSuccess"
+ :on-error="handleError"
+ >
+ <el-icon class="el-icon--upload"><upload-filled /></el-icon>
+ <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮閫夋嫨鏂囦欢</em></div>
+ </el-upload>
+
+ <div class="upload-tips">
+ <div>鏀寔鏍煎紡锛歿{ acceptText }}</div>
+ <div>鍗曚釜鏂囦欢涓嶈秴杩� {{ maxSizeMb }}MB锛屼竴娆″彧鑳戒笂浼犱竴涓枃浠躲��</div>
+ <div v-for="(tip, index) in tips" :key="index">{{ tip }}</div>
+ </div>
+
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button @click="visible = false">鍙� 娑�</el-button>
+ <el-button type="primary" :loading="uploading" @click="handleSubmit">寮�濮嬪鍏�</el-button>
+ </div>
+ </template>
+ </el-dialog>
+</template>
+
+<script setup>
+import { computed, getCurrentInstance, nextTick, ref } from 'vue'
+import { ElMessage } from 'element-plus'
+import { InfoFilled, UploadFilled } from '@element-plus/icons-vue'
+
+const { proxy } = getCurrentInstance()
+
+const props = defineProps({
+ title: {
+ type: String,
+ default: '鏁版嵁瀵煎叆'
+ },
+ // 涓婁紶鎺ュ彛瀹屾暣鍦板潃
+ action: {
+ type: String,
+ required: true
+ },
+ // 鍏佽鐨勬枃浠跺悗缂�锛屽 '.xls,.xlsx'
+ accept: {
+ type: String,
+ default: '.xls,.xlsx'
+ },
+ // 妯℃澘鏂囦欢鍦板潃锛堟斁鍦� public 涓嬶紝濡� /import-templates/xxx.xlsx锛�
+ templateUrl: {
+ type: String,
+ default: ''
+ },
+ templateName: {
+ type: String,
+ default: '瀵煎叆妯℃澘'
+ },
+ // 鏂囦欢澶у皬涓婇檺锛圡B锛�
+ maxSizeMb: {
+ type: Number,
+ default: 10
+ },
+ // 棰濆濉啓璇存槑
+ tips: {
+ type: Array,
+ default: () => []
+ }
+})
+
+const emit = defineEmits(['success'])
+
+const uploadRef = ref(null)
+const visible = ref(false)
+const selectedFile = ref(null)
+const uploading = ref(false)
+
+const headers = computed(() => proxy.uploadHeader || {})
+const acceptText = computed(() => props.accept.split(',').map(item => item.trim()).join('銆�'))
+
+function open() {
+ visible.value = true
+ uploading.value = false
+ nextTick(() => {
+ selectedFile.value = null
+ uploadRef.value?.clearFiles()
+ })
+}
+
+function handleClose() {
+ uploading.value = false
+ selectedFile.value = null
+ uploadRef.value?.clearFiles()
+}
+
+function handleDownloadTemplate() {
+ const link = document.createElement('a')
+ link.href = props.templateUrl
+ link.download = props.templateName
+ document.body.appendChild(link)
+ link.click()
+ document.body.removeChild(link)
+}
+
+function handleFileChange(file) {
+ selectedFile.value = file
+}
+
+function handleFileRemove() {
+ selectedFile.value = null
+}
+
+function handleExceed() {
+ ElMessage.warning('涓�娆″彧鑳戒笂浼犱竴涓枃浠讹紝璇峰厛绉婚櫎宸查�夋嫨鐨勬枃浠�')
+}
+
+function validateFile(file) {
+ const name = (file.name || '').toLowerCase()
+ const allowed = props.accept.split(',').map(item => item.trim().toLowerCase()).filter(Boolean)
+ if (allowed.length && !allowed.some(ext => name.endsWith(ext))) {
+ ElMessage.error(`璇烽�夋嫨 ${acceptText.value} 鏍煎紡鐨勬枃浠禶)
+ uploadRef.value?.clearFiles()
+ selectedFile.value = null
+ return false
+ }
+ if (file.size && file.size > props.maxSizeMb * 1024 * 1024) {
+ ElMessage.error(`涓婁紶鏂囦欢涓嶈秴杩�${props.maxSizeMb}M`)
+ uploadRef.value?.clearFiles()
+ selectedFile.value = null
+ return false
+ }
+ return true
+}
+
+function handleSubmit() {
+ const file = selectedFile.value
+ if (!file) {
+ ElMessage.warning('璇峰厛閫夋嫨瑕佸鍏ョ殑鏂囦欢')
+ return
+ }
+ if (!validateFile(file)) {
+ return
+ }
+ uploading.value = true
+ uploadRef.value.submit()
+}
+
+function handleSuccess(response) {
+ uploading.value = false
+ if (response && response.code != null && response.code !== 200) {
+ ElMessage.error(response.msg || '瀵煎叆澶辫触')
+ return
+ }
+ ElMessage.success('瀵煎叆鎴愬姛')
+ visible.value = false
+ uploadRef.value?.clearFiles()
+ selectedFile.value = null
+ emit('success', response)
+}
+
+function handleError() {
+ uploading.value = false
+ ElMessage.error('瀵煎叆澶辫触锛岃妫�鏌ユ枃浠舵牸寮忓拰鍐呭鍚庨噸璇�')
+}
+
+defineExpose({ open })
+</script>
+
+<style scoped>
+.template-tip {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ margin-bottom: 12px;
+ padding: 8px 12px;
+ border-radius: 4px;
+ background: var(--el-color-primary-light-9);
+ color: var(--el-text-color-regular);
+ font-size: 13px;
+}
+
+.upload-tips {
+ margin-top: 10px;
+ color: var(--el-text-color-secondary);
+ font-size: 12px;
+ line-height: 20px;
+}
+</style>
diff --git a/src/utils/inspectionValueFormat.js b/src/utils/inspectionValueFormat.js
index f0f536a..f9b6b16 100644
--- a/src/utils/inspectionValueFormat.js
+++ b/src/utils/inspectionValueFormat.js
@@ -12,11 +12,13 @@
.split(',')
.map(item => item.trim())
.filter(Boolean);
- const decimalPlaces = parts[1] === '' || parts[1] == null ? null : Number(parts[1]);
+ const decimalIndex = parts.findIndex((item, index) => index > 0 && /^\d+$/.test(item));
+ const decimalPlaces = decimalIndex < 0 ? null : Number(parts[decimalIndex]);
if (decimalPlaces != null && (!Number.isInteger(decimalPlaces) || decimalPlaces < 0 || decimalPlaces > 15)) {
return { error: '灏忔暟浣嶆暟蹇呴』鏄� 0 鍒� 15 鐨勬暣鏁�' };
}
- const displayMode = parts.slice(2).includes('绉戝璁℃暟娉�') ? 'SCIENTIFIC' : 'NORMAL';
+ const scientificIndex = parts.findIndex((item, index) => index > 0 && item === '绉戝璁℃暟娉�');
+ const displayMode = scientificIndex >= 0 ? 'SCIENTIFIC' : 'NORMAL';
const roundingNames = {
'鍥涜垗浜斿叆': 'HALF_UP',
'鍥涜垗鍏叆': 'HALF_UP_6',
@@ -25,17 +27,30 @@
'鎴柇': 'DOWN'
};
const roundingPart = parts.slice(2).find(item => Object.prototype.hasOwnProperty.call(roundingNames, item));
- const unsupported = parts.slice(2).filter(item => item && item !== '绉戝璁℃暟娉�' && !roundingNames[item]);
+ const unsupported = parts.slice(1).filter((item, index) =>
+ item && index + 1 !== decimalIndex && item !== '绉戝璁℃暟娉�' && !roundingNames[item]
+ );
if (unsupported.length || parts.length > 4) {
return { error: '妫�楠屽�兼壒娉ㄦ牸寮忓簲涓猴細妫�楠屽�硷紝2锛屽洓鑸嶄簲鍏� 鎴� 妫�楠屽�硷紝2锛岀瀛﹁鏁版硶锛屽洓鑸嶄簲鍏�' };
}
- return { decimalPlaces, displayMode, roundingMode: roundingPart ? roundingNames[roundingPart] : 'HALF_UP' };
+ return {
+ decimalPlaces,
+ displayMode,
+ // 鍙傛暟椤哄簭鍐冲畾澶勭悊椤哄簭锛氱瀛﹁鏁版硶鍦ㄥ皬鏁颁綅鍓嶈〃绀哄厛杞瀛﹁鏁版硶銆�
+ scientificFirst: displayMode === 'SCIENTIFIC' && scientificIndex < decimalIndex,
+ roundingMode: roundingPart ? roundingNames[roundingPart] : 'HALF_UP'
+ };
}
export function formatInspectionValue(value, config) {
if (!config || config.error || config.decimalPlaces == null || value === '' || value == null) return value;
const number = Number(value);
if (!Number.isFinite(number)) return value;
+ // 绉戝璁℃暟娉曞湪鎵规敞涓帓鍦ㄥ皬鏁颁綅鏁板墠鏃讹紝鍏堣浆绉戝璁℃暟娉曞啀淇濈暀灏炬暟浣嶆暟銆�
+ if (config.displayMode === 'SCIENTIFIC' && config.scientificFirst) {
+ const scientific = number.toExponential(config.decimalPlaces);
+ return scientific.replace('e', 'E');
+ }
const factor = 10 ** config.decimalPlaces;
let rounded;
if (config.roundingMode === 'CEILING') rounded = Math.ceil(number * factor) / factor;
@@ -47,9 +62,9 @@
const fraction = absolute - base;
rounded = (number < 0 ? -1 : 1) * ((fraction >= 0.6 ? base + 1 : base) / factor);
} else rounded = Math.round((number + (number >= 0 ? Number.EPSILON : -Number.EPSILON)) * factor) / factor;
- return config.displayMode === 'SCIENTIFIC'
- ? rounded.toExponential(config.decimalPlaces)
- : rounded.toFixed(config.decimalPlaces);
+ const fixed = rounded.toFixed(config.decimalPlaces);
+ if (config.displayMode === 'SCIENTIFIC') return Number(fixed).toExponential(config.decimalPlaces).replace('e', 'E');
+ return fixed;
}
export function validateInspectionValueAnnotation(annotation) {
diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue b/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue
index c6ab56b..71c311b 100644
--- a/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue
+++ b/src/views/CNAS/personnel/personnelInfo/tabs/personnelTraining.vue
@@ -17,7 +17,7 @@
</div>
</div>
<div style="line-height: 30px;">
- <el-button size="small" type="primary" @click="uploadDia = true, getUserList()">瀵煎叆</el-button>
+ <el-button size="small" type="primary" @click="openUpload">瀵煎叆</el-button>
</div>
</div>
<lims-table :tableData="yearPlanTableData" :column="yearPlanColumn" :currentChange="currentChange"
@@ -95,14 +95,24 @@
</el-option>
</el-select>
</div>
+ <div style="display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 12px; border-radius: 4px; background: var(--el-color-primary-light-9); font-size: 13px;">
+ <span>绗竴娆″鍏ヨ鍏堜笅杞芥ā鏉匡紝鎸夋ā鏉挎牸寮忓~鍐欏悗鍐嶄笂浼犮��</span>
+ <el-button link type="primary" @click="downloadTemplate">涓嬭浇瀵煎叆妯℃澘</el-button>
+ </div>
<div style="margin: 0 auto;">
<el-upload ref="upload"
:action="javaApi + '/personTraining/personTrainingImport' + '?planYear=' + planYear + '&reviewerId=' + reviewerId"
- :auto-upload="false" :before-upload="beforeUpload" :file-list="fileList" :headers="uploadHeader" :limit="1"
- :on-error="onError" :on-success="onSuccess" accept=".xlsx" drag name="file">
+ :auto-upload="false" :before-upload="beforeUpload" v-model:file-list="fileList" :headers="uploadHeader" :limit="1"
+ :on-error="onError" :on-success="onSuccess" accept=".xls,.xlsx" drag name="file">
<lims-icon name="el-icon-upload"></lims-icon>
<div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
</el-upload>
+ </div>
+ <div style="margin-top: 10px; color: var(--el-text-color-secondary); font-size: 12px; line-height: 20px;">
+ <div>鏀寔鏍煎紡锛�.xls銆�.xlsx锛涘崟涓枃浠朵笉瓒呰繃10MB銆�</div>
+ <div>鍩硅璁插笀蹇呴』濉啓绯荤粺涓凡瀛樺湪鐨勪汉鍛樺鍚嶏紝鍚﹀垯鏁存壒瀵煎叆澶辫触銆�</div>
+ <div>鍩硅鏃堕棿寤鸿濉啓 YYYY-MM-DD锛岃鏃跺~鍐欐暣鏁般��</div>
+ <div>瀵煎叆鍙鍙栨ā鏉跨殑绗竴涓伐浣滆〃銆�</div>
</div>
<template #footer><span class="dialog-footer">
<el-button @click="uploadDia = false">鍙� 娑�</el-button>
@@ -626,6 +636,21 @@
this.$download.saveAs(blob, row.fileName + '.docx')
})
},
+ // 鎵撳紑瀵煎叆寮规
+ openUpload() {
+ this.fileList = []
+ this.uploadDia = true
+ this.getUserList()
+ },
+ // 涓嬭浇骞村害璁″垝瀵煎叆妯℃澘
+ downloadTemplate() {
+ const link = document.createElement('a')
+ link.href = '/import-templates/浜哄憳鍩硅骞村害璁″垝瀵煎叆妯℃澘.xlsx?v=2'
+ link.download = '浜哄憳鍩硅骞村害璁″垝瀵煎叆妯℃澘.xlsx'
+ document.body.appendChild(link)
+ link.click()
+ document.body.removeChild(link)
+ },
// 骞村害璁″垝-瀵煎叆
submitUpload() {
if (!this.planYear) {
@@ -636,7 +661,7 @@
this.$message.error('璇烽�夋嫨瀹℃牳浜�')
return
}
- if (this.$refs.upload.uploadFiles.length == 0) {
+ if (!this.fileList || this.fileList.length == 0) {
this.$message.error('鏈�夋嫨鏂囦欢')
return
}
@@ -663,11 +688,17 @@
this.uploading = false
},
beforeUpload(file, fileList) {
- if (file.type != 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
- this.$message.error('涓婁紶鏂囦欢鏍煎紡涓嶆纭�');
+ if (!/\.(xls|xlsx)$/i.test(file.name || '')) {
+ this.$message.error('璇烽�夋嫨 .xls 鎴� .xlsx 鏍煎紡鐨勬枃浠�');
this.$refs.upload.clearFiles()
return false;
}
+ if (file.size > 1024 * 1024 * 10) {
+ this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
+ this.$refs.upload.clearFiles()
+ return false;
+ }
+ return true;
},
// 骞村害璁″垝鏄庣粏琛�-缂栬緫
editInDetail(row) {
diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/detailFormDialog.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/detailFormDialog.vue
index 6341f59..88318c1 100644
--- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/detailFormDialog.vue
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/detailFormDialog.vue
@@ -52,9 +52,16 @@
</el-select>
</el-form-item></el-col>
<el-col :span="12"><el-form-item label="鍘熷璁板綍妯℃澘" prop="templateIds">
- <el-select v-model="form.templateIds" multiple collapse-tags filterable style="width: 100%" placeholder="鍙�夋嫨澶氫釜妯℃澘">
+ <el-select v-model="form.templateIds" multiple collapse-tags filterable style="width: 100%"
+ :loading="templateBindingLoading" :disabled="!form.standardMethodId"
+ :placeholder="form.standardMethodId ? '璇烽�夋嫨鍘熷璁板綍妯℃澘' : '璇峰厛閫夋嫨妫�娴嬫爣鍑�'"
+ :no-data-text="form.standardMethodId ? '璇ユ娴嬫爣鍑嗘殏鏈粦瀹氬師濮嬭褰曟ā鏉�' : '璇峰厛閫夋嫨妫�娴嬫爣鍑�'">
<el-option v-for="item in templateOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
+ <div v-if="form.standardMethodId && !templateBindingLoading && templateOptions.length === 0"
+ style="font-size: 12px; line-height: 18px; color: var(--el-color-warning); margin-top: 4px;">
+ 璇ユ娴嬫爣鍑嗗湪鏍囧噯搴撲腑灏氭湭缁戝畾鍘熷璁板綍妯℃澘锛岃鍏堝湪鏍囧噯搴撲腑瀹屾垚缁戝畾銆�
+ </div>
</el-form-item></el-col>
<el-col :span="12"><el-form-item label="鏍峰搧鍚嶇О"><el-input v-model="form.sampleName" /></el-form-item></el-col>
<el-col :span="12"><el-form-item label="鏍峰搧瑙勬牸"><el-input v-model="form.sampleSpec" /></el-form-item></el-col>
@@ -84,6 +91,7 @@
} from "@/api/cnas/process/ensureResults/qualityMonitor";
import { selectStandardMethodList } from '@/api/cnas/process/method/standardMethod';
import { selectStandardTemplatePageList } from '@/api/standard/model';
+import { selectTemplateBindingsByStandardMethod } from '@/api/standard/standardLibrary';
import { selectUserCondition } from '@/api/performance/class';
export default {
@@ -119,7 +127,9 @@
dueDate: null,
},
standardOptions: [],
+ allTemplateOptions: [],
templateOptions: [],
+ templateBindingLoading: false,
userOptions: [],
rules: {
monitorProject: [{ required: true, message: '璇疯緭鍏ヨ川鎺ч」鐩�', trigger: 'blur' }],
@@ -137,12 +147,18 @@
methods: {
openDia(type, row) {
this.formDia = true
- selectStandardMethodList({ current: 1, size: 1000 }).then(res => { this.standardOptions = res.data?.records || res.data || [] })
- selectStandardTemplatePageList({ current: 1, size: 1000 }).then(res => { this.templateOptions = res.data?.records || res.data || [] })
- selectUserCondition({ type: 1 }).then(res => { this.userOptions = res.data || [] })
this.operationType = type
+ this.templateOptions = []
+ this.allTemplateOptions = []
+ this.templateBindingLoading = false
+ selectStandardMethodList({ current: 1, size: 1000 }).then(res => { this.standardOptions = res.data?.records || res.data || [] })
+ selectStandardTemplatePageList({ current: 1, size: 1000 }).then(res => { this.allTemplateOptions = res.data?.records || res.data || [] })
+ selectUserCondition({ type: 1 }).then(res => { this.userOptions = res.data || [] })
if (type === 'edit') {
this.searchInfo(row)
+ if (row.itemKind === 'INSPECTION' && row.standardMethodId) {
+ this.loadBoundTemplates(row.standardMethodId, this.form.templateIds)
+ }
}
},
searchInfo (row) {
@@ -156,6 +172,37 @@
if (standard) this.form.technicalStandardText = `${standard.code || ''} ${standard.name || ''}`.trim()
this.form.templateIds = []
this.form.templateId = null
+ // 鍜屽鎵樹笅鍗曚繚鎸佷竴鑷达細閫夋嫨妫�娴嬫爣鍑嗗悗锛屽彧灞曠ず璇ユ爣鍑嗗湪鏍囧噯搴撲腑宸茬粦瀹氱殑鍘熷璁板綍妯℃澘
+ this.loadBoundTemplates(id)
+ },
+ loadBoundTemplates(standardMethodId, selectedIds = null) {
+ const currentIds = Array.isArray(selectedIds) ? selectedIds.map(Number) : null
+ this.templateOptions = []
+ if (currentIds === null) this.form.templateIds = []
+ if (!standardMethodId) return
+ this.templateBindingLoading = true
+ selectTemplateBindingsByStandardMethod({ standardMethodId }).then(res => {
+ const bound = (res.data || []).map(item => ({ id: Number(item.templateId), name: item.name }))
+ this.templateOptions = bound
+ if (currentIds === null) {
+ // 鏂板鎴栧垏鎹㈡娴嬫爣鍑嗘椂锛岄粯璁ら�変腑璇ユ爣鍑嗗凡缁戝畾鐨勫叏閮ㄦā鏉�
+ this.form.templateIds = bound.map(item => item.id)
+ return
+ }
+ // 缂栬緫鏃朵繚鐣欏師閫夋嫨锛涜嫢妯℃澘鍚庢潵琚В缁戯紝琛ュ厖鍚嶇О閬垮厤涓嬫媺妗嗗彧鏄剧ず ID
+ const boundIds = new Set(bound.map(item => item.id))
+ currentIds.forEach(id => {
+ if (!boundIds.has(id)) {
+ const template = this.allTemplateOptions.find(item => Number(item.id) === id)
+ if (template) this.templateOptions.push({ id: Number(template.id), name: template.name })
+ }
+ })
+ this.form.templateIds = currentIds
+ }).catch(() => {
+ this.templateOptions = []
+ }).finally(() => {
+ this.templateBindingLoading = false
+ })
},
buildEntity () {
const entity = this.HaveJson(this.form)
diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/inspectionEvaluationDialog.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/inspectionEvaluationDialog.vue
index 110092e..68b5163 100644
--- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/inspectionEvaluationDialog.vue
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/inspectionEvaluationDialog.vue
@@ -7,7 +7,8 @@
:closable="false"/>
<el-alert v-if="!canEdit" :title="editNotice" :type="loaded ? 'warning' : 'info'"
:closable="false" style="margin-top:8px"/>
- <el-form :model="form" label-width="110px" style="margin-top: 16px">
+ <div class="role-hint">鐩戠潱鍛橀粯璁や负璁″垝涓寚瀹氱殑璇勪环浜猴紝琚洃鐫d汉鍛樹负璁″垝涓寚瀹氱殑妫�娴嬪憳銆�</div>
+ <el-form :model="form" label-width="150px" style="margin-top: 16px">
<el-row :gutter="12">
<el-col :span="12">
<el-form-item label="妫�娴嬮」鐩�">
@@ -43,14 +44,14 @@
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item label="鐩戠潱鍛�">
+ <el-form-item label="鐩戠潱鍛橈紙璇勪环浜猴級">
<el-select v-model="form.supervisorUserId" filterable style="width: 100%" :disabled="!canEdit">
<el-option v-for="person in supervisorOptions" :key="person.id" :value="person.id" :label="person.name"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item label="琚洃鐫d汉鍛�">
+ <el-form-item label="琚洃鐫d汉鍛橈紙妫�娴嬪憳锛�">
<el-input :model-value="supervisedPersonName" disabled/>
</el-form-item>
</el-col>
@@ -168,12 +169,23 @@
},
supervisedPersonName() {
const id = this.form.inspectorUserId || this.row?.inspectorUserId
- return this.people.find(person => Number(person.id) === Number(id))?.name || ''
+ return this.people.find(person => Number(person.id) === Number(id))?.name
+ || this.form.inspectorName || this.row?.inspectorName || ''
},
supervisorOptions() {
const inspectorId = Number(this.form.inspectorUserId || this.row?.inspectorUserId)
- const evaluatorId = Number(this.row?.evaluatorUserId)
- return this.people.filter(person => Number(person.id) !== inspectorId && Number(person.id) !== evaluatorId)
+ // 鐩戠潱鍛橀粯璁ゅ氨鏄鍒掍腑鐨勮瘎浠蜂汉锛屽洜姝よ繖閲屼笉鑳芥妸璇勪环浜烘帓闄ゆ帀锛涘彧鎺掗櫎琚洃鐫g殑妫�娴嬪憳
+ const options = this.people.filter(person => Number(person.id) !== inspectorId)
+ // 宸蹭繚瀛樼殑鐩戠潱鍛樺鏋滀笉鍦ㄤ汉鍛樹笅鎷夊垪琛ㄤ腑锛堣瑙掕壊/鐘舵�佽繃婊ゆ垨宸插仠鐢級锛岃ˉ涓�鏉¢�夐」淇濊瘉鑳藉弽鏄�
+ const savedId = this.form.supervisorUserId
+ if (savedId && !options.some(person => Number(person.id) === Number(savedId))) {
+ const saved = this.people.find(person => Number(person.id) === Number(savedId))
+ options.unshift({
+ id: savedId,
+ name: saved?.name || this.form.supervisorName || `鐢ㄦ埛 ${savedId}`
+ })
+ }
+ return options
}
},
methods: {
@@ -192,7 +204,14 @@
this.people = res.data || []
})
getInspectionEvaluation(row.qualityMonitorDetailsId).then(res => {
- if (res.data) this.form = {...res.data, resultRows: res.data.resultRows || [], measurementConfirmed: false}
+ if (res.data) {
+ this.form = {...res.data, resultRows: res.data.resultRows || [], measurementConfirmed: false}
+ // 鍏滃簳锛氬巻鍙茶瘎浠疯褰曟病鏈夌洃鐫e憳鏃讹紝榛樿甯﹀嚭璁″垝璇勪环浜�
+ if (!this.form.supervisorUserId && this.row?.evaluatorUserId) {
+ this.form.supervisorUserId = this.row.evaluatorUserId
+ this.form.supervisorName = this.people.find(person => Number(person.id) === Number(this.row.evaluatorUserId))?.name || ''
+ }
+ }
}).catch(() => {
this.loadError = '璇勪环璁板綍璇诲彇澶辫触锛岃鍒锋柊鍚庨噸璇�'
}).finally(() => {
@@ -231,3 +250,12 @@
}
}
</script>
+
+<style scoped>
+.role-hint {
+ margin-top: 8px;
+ font-size: 12px;
+ line-height: 18px;
+ color: var(--el-text-color-secondary);
+}
+</style>
diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
index 224c51e..f6346ed 100644
--- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
@@ -62,9 +62,11 @@
</div>
</div>
<div class="plan-detail-card">
+ <el-alert v-if="currentPlan && currentPlan.ratifyStatus !== 1" type="info" :closable="false" show-icon
+ style="margin-bottom: 12px"
+ title="妫�娴嬬被璐ㄦ帶椤圭洰闇�鍦ㄥ勾搴﹁鍒掑鏍搞�佹壒鍑嗛�氳繃鍚庯紝鐐瑰嚮瀵瑰簲琛岀殑鈥滀笅鍙戜换鍔♀�濊繘琛屼笅鍙戯紱闈炴娴嬬被椤圭洰鏃犻渶涓嬪彂銆�" />
<div class="plan-detail-toolbar">
<div style="display: flex;">
- <span class="section-title">璐ㄦ帶椤圭洰</span>
<div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
<span style="width: 88px;font-size: 14px;font-weight: 700;color: var(--lims-text-2);">璐ㄦ帶椤圭洰</span>
<el-input v-model="yearDetailForm.monitorProject" placeholder="璇疯緭鍏�" size="small"
@@ -212,27 +214,38 @@
<!--瀵煎叆璁″垝-->
<el-dialog v-model="uploadDia" title="鏁版嵁瀵煎叆" width="500px" :close-on-click-modal="false"
:close-on-press-escape="false">
- <div style="display: flex; align-items: center;">
- <span style="width: 60px">骞翠唤锛�</span>
- <el-date-picker v-model="planYear" type="year" value-format="YYYY" clearable size="small" format="YYYY"
- placeholder="閫夋嫨骞�">
- </el-date-picker>
- </div>
- <div style="display: flex;align-items: center;margin: 10px 0">
- <div style="width: 60px">瀹℃牳浜猴細</div>
- <el-select v-model="examineUserId" clearable filterable size="small" style="width: 50%;">
- <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id">
- </el-option>
- </el-select>
+ <el-form label-width="70px" size="small">
+ <el-form-item label="骞翠唤">
+ <el-date-picker v-model="planYear" type="year" value-format="YYYY" clearable format="YYYY"
+ placeholder="閫夋嫨骞�" style="width: 100%">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="瀹℃牳浜�">
+ <el-select v-model="examineUserId" clearable filterable style="width: 100%">
+ <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
+ <div style="display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 12px; border-radius: 4px; background: var(--el-color-primary-light-9); font-size: 13px;">
+ <span>绗竴娆″鍏ヨ鍏堜笅杞芥ā鏉匡紝鎸夋ā鏉挎牸寮忓~鍐欏悗鍐嶄笂浼犮��</span>
+ <el-button link type="primary" @click="downloadTemplate">涓嬭浇瀵煎叆妯℃澘</el-button>
</div>
<div style="margin: 0 auto;">
- <el-upload ref="upload" :action="action" :auto-upload="false" :file-list="fileList" :headers="uploadHeader"
- :limit="1" accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
+ <el-upload ref="upload" :action="action" :auto-upload="false" v-model:file-list="fileList" :headers="uploadHeader"
+ :limit="1" accept=".xls,.xlsx"
:on-change="beforeUpload" :on-error="onError" :on-success="handleSuccessUp" drag
- :data="{ planYear: planYear, examineUserId: examineUserId }" name="file">
+ :data="{ monitorYear: planYear, examineUserId: examineUserId }" name="file">
<lims-icon name="el-icon-upload"></lims-icon>
<div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
</el-upload>
+ </div>
+ <div style="margin-top: 10px; color: var(--el-text-color-secondary); font-size: 12px; line-height: 20px;">
+ <div>鏀寔鏍煎紡锛�.xls銆�.xlsx锛涘崟涓枃浠朵笉瓒呰繃10MB銆�</div>
+ <div>璐ㄦ帶椤圭洰銆佹妧鏈爣鍑嗐�佽川鎺ф柟寮忋�佸畬鎴愭椂闄愩�佽礋璐d汉涓哄繀濉」銆�</div>
+ <div>瀹屾垚鏃堕檺鏍煎紡蹇呴』涓� YYYY-MM锛堟ā鏉夸腑璇ュ垪涓烘枃鏈牸寮忥紝鐩存帴杈撳叆 2026-12 鍗冲彲锛夛紱璐熻矗浜哄繀椤诲~鍐欑郴缁熶腑宸插瓨鍦ㄧ殑浜哄憳濮撳悕銆�</div>
+ <div>瀵煎叆鍚庤鍒掍繚瀛樹负鑽夌銆傝鍦ㄨ鍒掕鎯呬腑缂栬緫璐ㄦ帶椤圭洰骞堕�夋嫨浜嬮」绫诲埆锛涙娴嬬被杩橀渶閫夋嫨妫�娴嬫爣鍑嗐�佸師濮嬭褰曟ā鏉裤�佹娴嬪憳銆佽瘎浠蜂汉骞跺~鍐欎换鍔℃埅姝㈡棩锛岀‘璁ゅ悗鍐嶆彁浜ゅ鏍搞��</div>
+ <div>瀵煎叆鍙鍙栨ā鏉跨殑绗竴涓伐浣滆〃銆�</div>
</div>
<template #footer><span class="dialog-footer">
<el-button @click="uploadDia = false">鍙� 娑�</el-button>
@@ -247,7 +260,7 @@
</div>
<div style="margin: 0 auto;">
<el-upload ref="upload1" :action="action1" :auto-upload="false"
- :data="{ qualityMonitorDetailsId: qualityMonitorDetailsId }" :file-list="fileList1" :headers="uploadHeader"
+ :data="{ qualityMonitorDetailsId: qualityMonitorDetailsId }" v-model:file-list="fileList1" :headers="uploadHeader"
:limit="1" :on-change="beforeUpload1" :on-error="onError1" :on-success="onSuccess1" accept='.doc,.docx,application/pdf,' drag
name="file">
<lims-icon name="el-icon-upload"></lims-icon>
@@ -397,8 +410,7 @@
}, {
label: '鐩戞帶浠诲姟缂栧彿', prop: 'inspectionTaskCode', minWidth: '150px'
}, {
- label: '浠诲姟鐘舵��', prop: 'inspectionTaskState', width: '100px',
- formatData: value => this.inspectionTaskStatus(value)
+ label: '浠诲姟鐘舵��', prop: 'taskStatusText', width: '110px'
},{
dataType: 'tag',
label: '璇勪环鐘舵��',
@@ -575,10 +587,26 @@
leadInto() {
this.uploadDia = true
this.planYear = this.selectedYear
+ this.fileList = []
this.getUserList()
+ },
+ // 涓嬭浇瀵煎叆妯℃澘
+ downloadTemplate() {
+ const link = document.createElement('a')
+ // 甯︾増鏈弬鏁伴伩鍏嶆祻瑙堝櫒缁х画浣跨敤缂撳瓨閲岀殑鏃фā鏉�
+ link.href = '/import-templates/璐ㄩ噺鐩戞帶璁″垝瀵煎叆妯℃澘.xlsx?v=2'
+ link.download = '璐ㄩ噺鐩戞帶璁″垝瀵煎叆妯℃澘.xlsx'
+ document.body.appendChild(link)
+ link.click()
+ document.body.removeChild(link)
},
// 瀵煎叆娴佺▼
beforeUpload(file) {
+ if (!/\.(xls|xlsx)$/i.test(file.name || '')) {
+ this.$message.error('璇烽�夋嫨 .xls 鎴� .xlsx 鏍煎紡鐨勬枃浠�');
+ this.$refs.upload.clearFiles()
+ return false;
+ }
if (file.size > 1024 * 1024 * 10) {
this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
this.$refs.upload.clearFiles()
@@ -588,23 +616,40 @@
}
},
onError(err, file, fileList) {
- this.$message.error('涓婁紶澶辫触')
- this.$refs.upload.clearFiles()
+ this.uploading = false
+ this.fileList = []
+ this.$message.error('涓婁紶澶辫触锛岃閲嶆柊閫夋嫨鏂囦欢')
},
handleSuccessUp(response) {
this.uploading = false;
if (response.code == 200) {
- this.$message.success('涓婁紶鎴愬姛');
+ this.$message.success('瀵煎叆鎴愬姛锛岃鍒掑凡淇濆瓨涓鸿崏绋匡紝璇疯ˉ鍏ㄨ川鎺ч」鐩悗鎻愪氦瀹℃牳');
+ const importedPlan = response.data || null
this.timer = setTimeout(() => {
this.uploadDia = false
this.fileList = []
- this.planYear = this.selectedYear
this.examineUserId = ''
- this.getYearPlanList()
+ // 瀵煎叆瀹屾垚鍚庣洿鎺ヨ繘鍏ヨ鍒掕鎯咃紝鏂逛究缁х画缂栬緫璐ㄦ帶椤圭洰銆侀�夋嫨妫�娴嬫爣鍑嗙瓑
+ if (importedPlan && importedPlan.qualityMonitorId) {
+ this.openPlan(importedPlan)
+ } else {
+ this.getYearPlanList()
+ }
}, 1000)
} else {
- this.$message.error(response.msg)
+ this.$message.error(response.msg || '涓婁紶澶辫触')
+ // 鍚庣杩斿洖涓氬姟閿欒鏃� HTTP 鐘舵�佷粛鏄� 200锛宔l-upload 浼氭妸鏂囦欢鏍囪涓� success锛�
+ // 鐩存帴鍐嶆璋冪敤 submit() 涓嶄細閲嶆柊涓婁紶锛岃繖閲屾妸鏂囦欢鎭㈠涓哄緟涓婁紶鐘舵�併��
+ this.resetUploadFiles()
}
+ },
+ resetUploadFiles() {
+ const files = this.$refs.upload?.uploadFiles || this.fileList || []
+ files.forEach(file => {
+ file.status = 'ready'
+ file.response = undefined
+ file.percentage = 0
+ })
},
submitUpload() {
if (!this.planYear) {
@@ -615,6 +660,12 @@
this.$message.warning('璇烽�夋嫨瀹℃牳浜�')
return;
}
+ const files = this.$refs.upload?.uploadFiles || this.fileList || []
+ if (!files.length) {
+ this.$message.warning('璇烽�夋嫨瑕佸鍏ョ殑鏂囦欢')
+ return;
+ }
+ this.uploading = true
this.$refs.upload.submit();
},
// end
@@ -738,7 +789,10 @@
this.yearDetailLoading = true
pageQualityMonitorDetail({ ...entity, ...page }).then(res => {
this.yearDetailLoading = false
- this.yearDetailTableData = res.data.records
+ this.yearDetailTableData = res.data.records.map(item => ({
+ ...item,
+ taskStatusText: this.inspectionTaskStatus(item)
+ }))
this.yearDetailPage.total = res.data.total
this.$nextTick(() => this.$refs.yearDetailTableData?.$refs?.multipleTable?.doLayout())
}).catch(err => {
@@ -791,6 +845,7 @@
}
this.lookDialogVisible = true
} else {
+ this.fileList1 = []
this.uploadDia1 = true
}
},
@@ -820,7 +875,7 @@
this.uploading1 = false
},
submitUpload1() {
- if (this.$refs.upload1.uploadFiles.length === 0) {
+ if (!this.fileList1 || this.fileList1.length === 0) {
this.$message.error('鏈�夋嫨鏂囦欢')
return
}
@@ -991,9 +1046,14 @@
if (command === 'export') this.handleDown(row)
if (command === 'delete') this.delPlan(row)
},
- inspectionTaskStatus(value) {
+ inspectionTaskStatus(row) {
+ if (row.itemKind !== 'INSPECTION') return '鏃犻渶涓嬪彂'
+ const value = row.inspectionTaskState
+ if (value === null || value === undefined) {
+ return Number(row.planRatifyStatus) === 1 ? '鏈笅鍙�' : '寰呰鍒掓壒鍑�'
+ }
const map = { 0: '寰呮娴�', 1: '妫�娴嬩腑', 2: '妫�娴嬩腑', 3: '寰呭鏍�', 4: '澶嶆牳閫�鍥�', 5: '寰呰瘎浠�' }
- return value === null || value === undefined ? '鏈笅鍙�' : (map[value] || '澶勭悊涓�')
+ return map[value] || '澶勭悊涓�'
},
handleDetailCommand(command, row) {
const handlers = {
diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue
index 0cafc96..ac8d0e0 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue
@@ -38,7 +38,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="鐩戠潱鍘熷洜" prop="superviseReason">
- <el-input v-model="form.superviseReason" clearable disabled size="small"></el-input>
+ <el-input v-model="form.superviseReason" clearable placeholder="璇疯緭鍏ョ洃鐫e師鍥�" size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -94,15 +94,10 @@
},
// 鏂规硶闆嗗悎
methods: {
- openDia(type, row, causeType) {
+ openDia(type, row) {
this.formDia = true
this.operationType = type
this.getUserList()
- if (causeType == 1) {
- this.form.superviseReason = '瀹氭湡鐩戠潱'
- } else {
- this.form.superviseReason = '鍔ㄦ�佺洃鐫�'
- }
if (type === 'edit') {
this.searchInfo(row)
}
@@ -115,6 +110,12 @@
},
searchInfo (row) {
this.form = {...row}
+ // 瀵煎叆鐨勫巻鍙叉暟鎹彲鑳芥槸瀹屾暣鏃ユ湡锛�2026/3/15锛夛紝鏈堜唤閫夋嫨鍣ㄩ渶瑕� YYYY.M 鎵嶈兘鍥炴樉
+ const text = row.superviseTime ? String(row.superviseTime).trim() : ''
+ const matched = text.match(/^(\d{4})\s*[./骞�-]\s*(\d{1,2})(?:\s*[./鏈�-]\s*\d{1,2}\s*鏃�?)?$/)
+ if (matched && Number(matched[2]) >= 1 && Number(matched[2]) <= 12) {
+ this.form.superviseTime = `${matched[1]}.${Number(matched[2])}`
+ }
},
// 鎻愪氦琛ㄥ崟
submitForm () {
diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue
index 39e3be1..cca0e74 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue
@@ -70,6 +70,18 @@
</tr>
<tr>
<td class="td-title">
+ <p>鐩戠潱鏂瑰紡锛�</p>
+ </td>
+ <td colspan="5">
+ <el-select v-if="currentStep === 0" v-model="superviseModeList" multiple filterable collapse-tags
+ placeholder="璇烽�夋嫨鐩戠潱鏂瑰紡锛堢▼搴�4.2.4锛�" size="small" style="width: 100%">
+ <el-option v-for="item in superviseModeItems" :key="item" :label="item" :value="item"></el-option>
+ </el-select>
+ <span v-else class="td-info"> {{ form.superviseMethod }}</span>
+ </td>
+ </tr>
+ <tr>
+ <td class="td-title">
<p><span class="required-span">* </span>鐩戠潱璁板綍锛�</p>
</td>
<td colspan="5">
@@ -108,6 +120,23 @@
type="textarea">
</el-input>
<span v-else class="td-info"> {{ form.rectifyAdvice }}</span>
+ </td>
+ </tr>
+ <tr>
+ <td class="td-title">
+ <p>琚洃鐫d汉鍛樼‘璁ゆ剰瑙侊細</p>
+ </td>
+ <td colspan="5">
+ <span v-if="form.confirmOpinion" class="td-info">{{ form.confirmOpinion }}</span>
+ <template v-else-if="canConfirm">
+ <el-input v-model="confirmOpinion" :rows="2" size="small" type="textarea"
+ placeholder="瀵圭洃鐫h褰曠湡瀹炴�ц〃绀鸿鍙��"/>
+ <el-button :loading="confirming" size="small" type="primary" style="margin-top: 6px"
+ @click="confirmRecord">纭� 璁�</el-button>
+ </template>
+ <span v-else class="td-info">
+ {{ form.superviseDetailsRecordId ? '寰呰鐩戠潱浜哄憳纭' : '鐩戠潱鍛樻彁浜ゅ悗鐢辫鐩戠潱浜哄憳纭' }}
+ </span>
</td>
</tr>
<tr>
@@ -170,11 +199,26 @@
<script>
import {
addSuperviseDetailRecord,
- addSuperviseRecordOpinion, getRecordUser,
+ addSuperviseRecordOpinion, confirmSuperviseRecord, getRecordUser,
getSuperviseDetailRecord
} from "@/api/cnas/process/ensureResults/qualitySupervise";
import {selectUserCondition} from "@/api/business/inspectionTask";
import {mapGetters} from "@/utils/store-compat";
+
+// 鐩戠潱鍐呭9椤癸紝涓庡彈鎺ц褰曡〃 LMSY-CX29-JL02 鐨勬枃瀛楀強妯帓椤哄簭瀹屽叏涓�鑷�
+const SUPERVISE_CONTENT_ITEMS = [
+ '浜哄憳鎸佽瘉鍙婂煿璁�', '璁炬柦鍙婄幆澧冩潯浠�', '妫�娴嬫柟娉�',
+ '浠櫒璁惧绠$悊', '娴嬮噺婧簮鎬�', '鏍囧噯鐗╄川绠$悊',
+ '鏍峰搧鍒跺鍜屽缃�', '妫�娴嬫暟鎹鐞�', '缁撴灉鎶ュ憡缁撴灉'
+]
+// 鐩戠潱鏂瑰紡锛屽搴斻�婅川閲忕洃鐫g▼搴忋��4.2.4
+const SUPERVISE_MODE_ITEMS = [
+ '鏍告煡鍘熷璁板綍鍜屾姤鍛�',
+ '鐜板満鐩戠潱瀹為檯鎿嶄綔杩囩▼',
+ '涓庤鐩戠潱瀵硅薄浜ゆ祦',
+ '鍐呴儴璐ㄩ噺鎺у埗/澶栭儴璐ㄩ噺璇勪及',
+ '鍩硅鏁堟灉璇勪环'
+]
export default {
name: 'recordsDialog',
@@ -200,6 +244,8 @@
ratifyOpinion: '',
isAccording: '',
isFinish: '',
+ superviseMethod: '',
+ confirmOpinion: '',
},
currentStep: 0,
editLoad: false,
@@ -209,11 +255,27 @@
ratifyUserId: '',
superviseeList: [],
superviseContentList: [],
- superviseContentItems: ['浜哄憳鎸佽瘉鍙婂煿璁�', '璁炬柦鍙婄幆澧冩潯浠�', '妫�娴嬫柟娉�', '浠櫒璁惧绠$悊', '娴嬮噺婧簮鎬�', '鏍囧噯鐗╄川绠$悊', '鏍峰搧鍒跺鍜屽缃�', '妫�娴嬫暟鎹鐞�', '缁撴灉鎶ュ憡缁撴灉'],
+ superviseContentItems: SUPERVISE_CONTENT_ITEMS,
+ superviseModeItems: SUPERVISE_MODE_ITEMS,
+ superviseModeList: [],
+ confirmOpinion: '',
+ confirming: false,
};
},
computed: {
- ...mapGetters(["userId"]),
+ ...mapGetters(["userId", "nickName"]),
+ // 璁板綍宸叉彁浜や笖灏氭湭纭鏃讹紝鍙湁琚洃鐫d汉鍛樻湰浜哄彲浠ョ‘璁わ紙绋嬪簭4.2.5锛�
+ canConfirm() {
+ if (!this.form.superviseDetailsRecordId || this.form.confirmOpinion) {
+ return false
+ }
+ const members = (this.form.testMember || '').split('銆�').map(item => item.trim()).filter(Boolean)
+ if (this.nickName && members.includes(this.nickName)) {
+ return true
+ }
+ // 鍏滃簳锛氳鍒掓槑缁嗕腑鐧昏鐨勮鐩戠潱浜哄憳
+ return !!this.supervisedUserId && Number(this.supervisedUserId) === Number(this.userId)
+ },
contentRows() {
const rows = []
for (let i = 0; i < this.superviseContentItems.length; i += 3) {
@@ -255,6 +317,8 @@
this.ratifyUserId = res.data.ratifyUserId
this.superviseeList = this.form.testMember ? this.form.testMember.split('銆�').filter(i => i) : []
this.superviseContentList = this.form.superviseContent ? this.form.superviseContent.split('銆�').filter(i => i) : []
+ this.superviseModeList = this.form.superviseMethod ? this.form.superviseMethod.split('銆�').filter(i => i) : []
+ this.confirmOpinion = this.form.confirmOpinion || ''
this.getRecordUser()
}).catch(err => {
console.log('err---', err);
@@ -273,6 +337,7 @@
}
this.form.testMember = this.superviseeList.join('銆�')
this.form.superviseContent = this.superviseContentList.join('銆�')
+ this.form.superviseMethod = this.superviseModeList.join('銆�')
this.addInfo()
} else {
this.editInfo(isFinish)
@@ -311,6 +376,20 @@
this.editLoad = false
})
},
+ // 琚洃鐫d汉鍛樼‘璁ょ洃鐫h褰曪紙绋嬪簭4.2.5锛�
+ confirmRecord () {
+ const opinion = (this.confirmOpinion || '').trim() || '瀵圭洃鐫h褰曠湡瀹炴�ц〃绀鸿鍙��'
+ this.confirming = true
+ confirmSuperviseRecord({
+ superviseDetailsId: this.form.superviseDetailsId,
+ confirmOpinion: opinion
+ }).then(() => {
+ this.form.confirmOpinion = opinion
+ this.$message.success('宸茬‘璁ょ洃鐫h褰�')
+ }).finally(() => {
+ this.confirming = false
+ })
+ },
// 鍏抽棴寮规
closeRecordsDia () {
this.formDia = false
@@ -331,7 +410,12 @@
},
getRecordUser () {
getRecordUser({superviseDetailsId: this.form.superviseDetailsId}).then(res => {
- this.recordUserList = res.data
+ this.recordUserList = res.data || []
+ // 璁″垝宸叉寚瀹氱洃鐫e憳浣嗗皻鏈骇鐢熻褰曟椂锛岄粯璁ゅ弽鏄剧涓�浣嶇洃鐫e憳锛�
+ // 鍚庣鍙湁鍦ㄥ瓨鍦ㄤ笂鏈堣褰曟椂鎵嶄細鑷姩甯﹀嚭鐩戠潱鍛橈紝棣栨濉啓浼氫负绌恒��
+ if (this.currentStep === 0 && !this.form.supervisor && this.recordUserList.length) {
+ this.form.supervisor = this.recordUserList[0].userName
+ }
})
},
}
diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue
index 6df53e6..fe29f64 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue
@@ -25,12 +25,6 @@
<div style="display: flex;justify-content: space-between">
<div style="display: flex;">
<div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
- <el-radio-group v-model="yearDetailForm.causeType" @change="getYearDetailPlan" size="small">
- <el-radio-button :value="1">瀹氭湡鐩戠潱</el-radio-button>
- <el-radio-button :value="2">鍔ㄦ�佺洃鐫�</el-radio-button>
- </el-radio-group>
- </div>
- <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
<span style="width: 88px;font-size: 14px;font-weight: 700;color: var(--lims-text-2);">鐩戞帶鐩殑</span>
<el-input v-model="yearDetailForm.supervisePurpose" placeholder="璇疯緭鍏�" size="small"
@keyup.enter="getYearDetailPlan"></el-input>
@@ -118,33 +112,46 @@
<!--瀵煎叆璁″垝-->
<el-dialog v-model="uploadDia" title="鏁版嵁瀵煎叆" width="500px" :close-on-click-modal="false"
:close-on-press-escape="false">
- <div style="display: flex; align-items: center;">
- <span style="width: 80px">骞翠唤锛�</span>
- <el-date-picker v-model="superviseYear" type="year" value-format="YYYY" clearable size="small" format="YYYY"
- placeholder="閫夋嫨骞�">
- </el-date-picker>
- <span style="width: 110px">鐩戠潱鍛橈細</span>
- <el-select v-model="recordUserIds" placeholder="璇烽�夋嫨" size="small" @change="splitList" :multiple-limit="2"
- filterable multiple style="width: 100%">
- <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option>
- </el-select>
- </div>
- <div style="display: flex;align-items: center;margin: 10px 0">
- <div style="width: 60px">鎵瑰噯浜猴細</div>
- <el-select v-model="ratifyUserId" clearable filterable size="small" style="width: 50%;">
- <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id">
- </el-option>
- </el-select>
+ <el-form label-width="70px" size="small">
+ <el-form-item label="骞翠唤">
+ <el-date-picker v-model="superviseYear" type="year" value-format="YYYY" clearable format="YYYY"
+ placeholder="閫夋嫨骞�" style="width: 100%">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="鐩戠潱鍛�">
+ <el-select v-model="recordUserIds" placeholder="璇烽�夋嫨" @change="splitList" :multiple-limit="2"
+ filterable multiple style="width: 100%">
+ <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鎵瑰噯浜�">
+ <el-select v-model="ratifyUserId" clearable filterable style="width: 100%">
+ <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
+ <div style="display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 12px; border-radius: 4px; background: var(--el-color-primary-light-9); font-size: 13px;">
+ <span>绗竴娆″鍏ヨ鍏堜笅杞芥ā鏉匡紝鎸夋ā鏉挎牸寮忓~鍐欏悗鍐嶄笂浼犮��</span>
+ <el-button link type="primary" @click="downloadTemplate">涓嬭浇瀵煎叆妯℃澘</el-button>
</div>
<div style="margin: 0 auto;">
<el-upload ref="upload1" :action="action" :auto-upload="false" :file-list="fileList" :headers="uploadHeader"
- :limit="1" accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
+ :limit="1" accept=".xls,.xlsx"
:on-change="beforeUpload" :on-error="onError" :on-success="handleSuccessUp" drag
:data="{ recordUserIds: recordUserIds1, superviseYear: superviseYear, ratifyUserId: ratifyUserId }"
name="file">
<lims-icon name="el-icon-upload"></lims-icon>
<div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
</el-upload>
+ </div>
+ <div style="margin-top: 10px; color: var(--el-text-color-secondary); font-size: 12px; line-height: 20px;">
+ <div>鏀寔鏍煎紡锛�.xls銆�.xlsx锛涘崟涓枃浠朵笉瓒呰繃10MB銆�</div>
+ <div>鐩戠潱鏃ユ湡銆佺洃鎺ч」鐩�佽鐩戠潱浜哄憳涓哄繀濉」銆�</div>
+ <div>鐩戠潱鏃ユ湡寤鸿濉�滃勾.鏈堚�濓紙濡� 2026.3锛夛紱濉垚 2026-03-15 涔熷彲浠ワ紝绯荤粺浼氳嚜鍔ㄦ崲绠椾负 2026.3銆�</div>
+ <div>琚洃鐫d汉鍛樺繀椤诲~鍐欑郴缁熶腑宸插瓨鍦ㄧ殑浜哄憳濮撳悕锛屽惁鍒欐暣鎵瑰鍏ュけ璐ャ��</div>
+ <div>瀵煎叆鍙鍙栨ā鏉跨殑绗竴涓伐浣滆〃銆�</div>
+ <div style="color: var(--el-color-warning);">瀵煎叆鍚庤鍒掍负鈥滃緟鎵瑰噯鈥濓細闇�浣跨敤鎵�閫夋壒鍑嗕汉璐﹀彿鐧诲綍骞剁偣鍑烩�滄壒鍑嗏�濓紝鎵瑰噯鍚庢墠鑳戒笅鍙戝拰瀵煎嚭銆�</div>
</div>
<template #footer><span class="dialog-footer">
<el-button @click="closeUploadDia">鍙� 娑�</el-button>
@@ -208,7 +215,7 @@
} else if (params === 1) {
return '鎵瑰噯';
} else {
- return null;
+ return '寰呮壒鍑�';
}
},
formatType: (params) => {
@@ -217,7 +224,7 @@
} else if (params === 1) {
return 'success';
} else {
- return null;
+ return 'warning';
}
}
}, {
@@ -316,8 +323,7 @@
yearLoading: false,
yearDetailForm: {
supervisePurpose: '',
- superviseProject: '',
- causeType: 1
+ superviseProject: ''
},
yearDetailColumnData: [
{
@@ -570,13 +576,29 @@
this.yearPage.size = limit;
this.getYearPlanList();
},
+ // 涓嬭浇瀵煎叆妯℃澘
+ downloadTemplate() {
+ const link = document.createElement('a')
+ // 甯︾増鏈弬鏁伴伩鍏嶆祻瑙堝櫒缁х画浣跨敤缂撳瓨閲岀殑鏃фā鏉�
+ link.href = '/import-templates/璐ㄩ噺鐩戠潱璁″垝瀵煎叆妯℃澘.xlsx?v=3'
+ link.download = '璐ㄩ噺鐩戠潱璁″垝瀵煎叆妯℃澘.xlsx'
+ document.body.appendChild(link)
+ link.click()
+ document.body.removeChild(link)
+ },
// 瀵煎叆娴佺▼
beforeUpload(file) {
+ if (!/\.(xls|xlsx)$/i.test(file.name || '')) {
+ this.$message.error('璇烽�夋嫨 .xls 鎴� .xlsx 鏍煎紡鐨勬枃浠�');
+ this.$refs.upload1.clearFiles()
+ return false;
+ }
if (file.size > 1024 * 1024 * 10) {
this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
this.$refs.upload1.clearFiles()
return false;
}
+ return true;
},
onError(err, file, fileList) {
this.$message.error('涓婁紶澶辫触')
@@ -585,7 +607,13 @@
handleSuccessUp(response) {
this.uploading = false;
if (response.code == 200) {
- this.$message.success('涓婁紶鎴愬姛');
+ const approver = this.userList.find(item => Number(item.id) === Number(this.ratifyUserId))
+ const approverName = approver ? approver.name : '鎵�閫夋壒鍑嗕汉'
+ if (Number(this.ratifyUserId) === Number(this.userId)) {
+ this.$message.success('瀵煎叆鎴愬姛锛岃鍦ㄥ垪琛ㄤ腑鐐瑰嚮鈥滄壒鍑嗏�濆畬鎴愭壒鍑嗭紝鎵瑰噯鍚庢墠鑳戒笅鍙戝拰瀵煎嚭')
+ } else {
+ this.$message.success(`瀵煎叆鎴愬姛锛岃鍒掑凡鎻愪氦缁�${approverName}鎵瑰噯锛涜鐢ㄨ璐﹀彿鐧诲綍鎵瑰噯锛屾壒鍑嗗悗鎵嶈兘涓嬪彂鍜屽鍑篳)
+ }
this.recordUserIds = []
this.superviseYear = ''
this.fileList = []
@@ -636,7 +664,12 @@
getUserList() {
// 璐ㄩ噺鐩戠潱闈㈠悜鍏ㄥ疄楠屽, 浜哄憳鍒楄〃涓嶆寜閮ㄩ棬绛涢��
selectUserCondition({ type: 1 }).then((res) => {
- this.userList = res.data || [];
+ const list = res.data || []
+ // 褰撳墠鐧诲綍鐢ㄦ埛鍙兘鍥犺鑹诧紙濡� admin锛夎鎺ュ彛杩囨护锛屼粛鍏佽閫夎嚜宸变綔涓烘壒鍑嗕汉锛岄伩鍏嶅鍏ュ悗鏃犱汉鍙壒鍑�
+ if (this.userId && !list.some(item => Number(item.id) === Number(this.userId))) {
+ list.unshift({ id: this.userId, name: this.nickName })
+ }
+ this.userList = list
})
},
// 鎵瑰噯
@@ -747,18 +780,30 @@
this.getYearDetailPlanList()
},
// 鑾峰彇骞村害鏄庣粏琛�
+ // 鐩戠潱鏃ユ湡缁熶竴鎴� "YYYY.M"锛氬吋瀹� 2026-03-15 / 2026/3/15 / 2026骞�3鏈�15鏃� 绛夊鍏ュ啓娉�
+ normalizeSuperviseMonth(value) {
+ if (!value) return value
+ const text = String(value).trim()
+ const matched = text.match(/^(\d{4})\s*[./骞�-]\s*(\d{1,2})(?:\s*[./鏈�-]\s*\d{1,2}\s*鏃�?)?$/)
+ if (!matched) return text
+ const month = Number(matched[2])
+ return month >= 1 && month <= 12 ? `${matched[1]}.${month}` : text
+ },
getYearDetailPlanList() {
const entity = {
superviseId: this.superviseId,
supervisePurpose: this.yearDetailForm.supervisePurpose,
superviseProject: this.yearDetailForm.superviseProject,
- causeType: this.yearDetailForm.causeType,
}
const page = this.yearDetailPage
this.yearDetailLoading = true
pageQualitySuperviseDetail({ ...entity, ...page }).then(res => {
this.yearDetailLoading = false
- this.yearDetailTableData = res.data.records
+ // 鍘嗗彶瀵煎叆鐨勭洃鐫f棩鏈熷彲鑳芥槸 2026/3/15銆�2026-03-15 绛夊畬鏁存棩鏈燂紝缁熶竴鏄剧ず鎴� 2026.3
+ this.yearDetailTableData = (res.data.records || []).map(item => ({
+ ...item,
+ superviseTime: this.normalizeSuperviseMonth(item.superviseTime)
+ }))
this.yearDetailPage.total = res.data.total
}).catch(err => {
console.log('err---', err);
@@ -779,7 +824,7 @@
showDialog(type, row) {
this.formDia = true
this.$nextTick(() => {
- this.$refs.formDia.openDia(type, row, this.yearDetailForm.causeType)
+ this.$refs.formDia.openDia(type, row)
})
},
closeDia() {
@@ -872,7 +917,7 @@
action() {
return this.javaApi + '/qualitySupervise/importQualitySupervise'
},
- ...mapGetters(["userId"]),
+ ...mapGetters(["userId", "nickName"]),
},
};
</script>
diff --git a/src/views/CNAS/process/method/methodVerification/component/formDIa.vue b/src/views/CNAS/process/method/methodVerification/component/formDIa.vue
index aaffbc6..d66a02c 100644
--- a/src/views/CNAS/process/method/methodVerification/component/formDIa.vue
+++ b/src/views/CNAS/process/method/methodVerification/component/formDIa.vue
@@ -1,11 +1,11 @@
<template>
<div>
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
- :title="operationType === 'edit' ? '缂栬緫' : operationType === 'view' ? '璇︽儏' : '鏂板'"
+ :title="dialogTitle"
v-model="formDia"
width="90%" @close="closeDia">
<div v-if="operationType === 'edit'" style="text-align: right">
- <el-button :disabled="form.confirmDate" size="small" type="primary" @click="validation">楠岃瘉纭</el-button>
+ <el-button :disabled="form.confirmDate" size="small" type="primary" @click="validation">{{ verifyType === 0 ? '鍙樻洿纭' : '楠岃瘉纭' }}</el-button>
</div>
<fieldset :disabled="operationType === 'view'" class="view-fieldset">
<table border="1" cellspacing="10" class="tables">
@@ -14,7 +14,7 @@
<p>鏍囧噯鏂规硶</p>
</td>
<td>
- <p>楠岃瘉鍘熷洜</p>
+ <p>{{ verifyType === 0 ? '鍙樻洿鍘熷洜' : '楠岃瘉鍘熷洜' }}</p>
</td>
<td>
<p>涓昏鎶�鏈彉鍖�</p>
@@ -221,7 +221,7 @@
</td>
</tr>
<tr>
- <td>楠岃瘉缁撹</td>
+ <td>{{ verifyType === 0 ? '鍙樻洿缁撹' : '楠岃瘉缁撹' }}</td>
<td colspan="7">
<el-input v-model="form.verificationConclusion" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" size="small" type="textarea"></el-input>
</td>
@@ -323,6 +323,20 @@
operationType: {
type: String,
default: () => ''
+ },
+ // 0 鏍囧噯鏂规硶鍙樻洿锛�1 鏂规硶楠岃瘉
+ verifyType: {
+ type: Number,
+ default: 1
+ }
+ },
+ computed: {
+ typeLabel() {
+ return this.verifyType === 0 ? '鏍囧噯鏂规硶鍙樻洿' : '鏂规硶楠岃瘉'
+ },
+ dialogTitle() {
+ if (this.operationType === 'view') return `鏌ョ湅${this.typeLabel}`
+ return this.operationType === 'edit' ? `缂栬緫${this.typeLabel}` : `鏂板${this.typeLabel}`
}
},
data() {
@@ -414,7 +428,7 @@
this.editLoad = true
const processMethodSearchNews = this.HaveJson(this.form)
processMethodSearchNews.confirmUser = processMethodSearchNews.confirmUser && processMethodSearchNews.confirmUser.join(',')
- processMethodSearchNews.operationType = 1
+ processMethodSearchNews.operationType = this.verifyType
if (this.operationType === 'edit') {
this.editInfo(processMethodSearchNews)
} else {
diff --git a/src/views/CNAS/process/method/standardMethodsChange/index.vue b/src/views/CNAS/process/method/standardMethodsChange/index.vue
new file mode 100644
index 0000000..03b8602
--- /dev/null
+++ b/src/views/CNAS/process/method/standardMethodsChange/index.vue
@@ -0,0 +1,200 @@
+<template>
+ <div class="capacity-scope">
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: var(--lims-text-2);">鏍囧噯鏂规硶</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.standardName"
+ @keyup.enter="searchList"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="small" @click="searchList">鏌ヨ</el-button>
+ <el-button size="small" @click="resetSearchForm">閲嶇疆</el-button>
+ </div>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button size="small" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button>
+ </div>
+ </div>
+ <div class="table">
+ <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData"
+ :table-loading="tableLoading" :page="page"
+ @pagination="pagination">
+ </limsTable>
+ </div>
+ <component :is="'formDIa'" v-if="formDIa" ref="formDIa" :operationType="operationType" :verify-type="0"
+ @closeDia="closeDia" />
+ </div>
+</template>
+
+<script>
+import limsTable from '@/components/Table/lims-table.vue'
+import formDIa from '../methodVerification/component/formDIa.vue'
+import { delMethodVerify, exportMethodVerify, pagesMethodVerify } from '@/api/cnas/process/method/methodVerification'
+
+export default {
+ name: 'StandardMethodsChange',
+ components: { limsTable, formDIa },
+ data() {
+ return {
+ searchForm: {
+ standardName: '',
+ operationType: 0,
+ },
+ tableColumn: [
+ {
+ label: '鏍囧噯鏂规硶',
+ prop: 'methodName',
+ minWidth: '120'
+ },
+ {
+ label: '鍙樻洿鍘熷洜',
+ prop: 'verifyReason',
+ minWidth: '120'
+ },
+ {
+ label: '涓昏鎶�鏈彉鍖�',
+ prop: 'technologyChange',
+ minWidth: '120'
+ },
+ {
+ label: '纭鏃堕棿',
+ prop: 'confirmDate',
+ minWidth: '100'
+ },
+ {
+ label: '鍒涘缓鏃堕棿',
+ prop: 'createTime',
+ minWidth: '100'
+ },
+ {
+ dataType: 'action',
+ minWidth: '60',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '璇︽儏',
+ type: 'text',
+ clickFun: (row) => {
+ this.openFormDia('view', row);
+ },
+ },
+ {
+ name: '缂栬緫',
+ type: 'text',
+ clickFun: (row) => {
+ this.openFormDia('edit', row);
+ },
+ },
+ {
+ name: '瀵煎嚭',
+ type: 'text',
+ clickFun: (row) => {
+ this.downLoadPost(row);
+ },
+ },
+ {
+ name: '鍒犻櫎',
+ type: 'text',
+ color: 'var(--el-color-danger)',
+ clickFun: (row) => {
+ this.deleteRow(row);
+ },
+ }
+ ]
+ }
+ ],
+ tableData: [],
+ tableLoading: false,
+ page: {
+ size: 20,
+ current: 1,
+ total: 0
+ },
+ formDIa: false,
+ operationType: '',
+ };
+ },
+ mounted() {
+ this.searchList()
+ },
+ methods: {
+ // 鏌ヨ鍒楄〃
+ searchList() {
+ const entity = {
+ standardName: this.searchForm.standardName,
+ operationType: this.searchForm.operationType,
+ }
+ const page = this.page
+ this.tableLoading = true
+ pagesMethodVerify({ ...page, ...entity }).then(res => {
+ this.tableLoading = false
+ if (res.code === 200) {
+ this.tableData = res.data.records
+ this.page.total = res.data.total
+ }
+ }).catch(err => {
+ console.log('err---', err);
+ this.tableLoading = false
+ })
+ },
+ // 鍒犻櫎
+ deleteRow(row) {
+ this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ this.tableLoading = true
+ delMethodVerify({ methodVerifyId: row.methodVerifyId }).then(res => {
+ this.tableLoading = false
+ if (res.code === 200) {
+ this.$message.success('鍒犻櫎鎴愬姛')
+ this.searchList()
+ }
+ }).catch(err => {
+ this.tableLoading = false
+ console.log('err---', err);
+ })
+ })
+ },
+ // 閲嶇疆鏌ヨ鏉′欢
+ resetSearchForm() {
+ this.searchForm.standardName = '';
+ this.searchList()
+ },
+ openFormDia(type, row) {
+ this.formDIa = true
+ this.operationType = type
+ this.$nextTick(() => {
+ this.$refs.formDIa.openDia(row)
+ })
+ },
+ // 瀵煎嚭
+ downLoadPost(row) {
+ exportMethodVerify({ methodVerifyId: row.methodVerifyId }).then(res => {
+ const blob = new Blob([res], { type: 'application/msword' });
+ this.$download.saveAs(blob, '鏍囧噯鏂规硶鍙樻洿璁板綍.docx')
+ })
+ },
+ // 鍏抽棴寮规
+ closeDia() {
+ this.formDIa = false
+ this.searchList()
+ },
+ // 鍒嗛〉鍒囨崲
+ pagination(page) {
+ this.page.size = page.limit
+ this.searchList();
+ },
+ }
+};
+</script>
+
+<style scoped>
+.search {
+ height: 46px;
+ display: flex;
+ justify-content: space-between;
+}
+</style>
diff --git a/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue b/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue
index a459b37..06292dc 100644
--- a/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue
+++ b/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue
@@ -24,12 +24,8 @@
</div>
<div style="line-height: 30px;" v-if="tabIndex === '0'">
<el-button size="small" type="primary" @click="openApprovalDialog1">寤� 妗�</el-button>
- <el-upload ref='upload' :action="action" :before-upload="beforeUpload" :headers="uploadHeader" :on-error="onError"
- :on-success="handleSuccessUp" :show-file-list="false"
- accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
- style="display: inline-block; margin-left: 10px;">
- <el-button :loading="upLoading" size="small" type="primary">瀵煎叆</el-button>
- </el-upload>
+ <el-button size="small" type="primary" style="margin-left: 10px;"
+ @click="$refs.importDialog.open()">瀵煎叆</el-button>
<el-button size="small" style="margin-left: 10px;" type="primary" @click="openFormDia">鏂� 澧�</el-button>
</div>
</div>
@@ -88,12 +84,28 @@
@pagination="pagination1">
</limsTable>
</el-dialog>
+ <import-dialog
+ ref="importDialog"
+ title="瀵煎叆鏍囧噯鏌ユ柊"
+ :action="action"
+ accept=".xls,.xlsx"
+ template-url="/import-templates/鏍囧噯鏌ユ柊瀵煎叆妯℃澘.xlsx"
+ template-name="鏍囧噯鏌ユ柊瀵煎叆妯℃澘.xlsx"
+ :tips="[
+ '琛ㄥご涓轰袱琛岋紝璇蜂粠绗� 3 琛屽紑濮嬪~鍐欐暟鎹�',
+ '鏍囧噯鍚嶇О銆佹爣鍑嗗彿璇峰~鍐欑幇琛屾爣鍑嗙殑鍚嶇О鍜岀紪鍙�',
+ '鏌ユ柊鏉ユ簮鎸夆�滄爣鍑嗙綉 鈫� 濮旀墭鎯呮姤鎵� 鈫� 鏍囧噯涔﹀簵 鈫� 鍏朵粬鈥濈殑椤哄簭鍙栫涓�涓潪绌洪」',
+ '澶囨敞鍒楀彧鑳藉~鍐欌�滄浛鎹⑩�濇垨鈥滀綔搴熲�濓紝鐣欑┖琛ㄧず鏃犲娉�'
+ ]"
+ @success="searchList"
+ />
</div>
</div>
</template>
<script>
import limsTable from '@/components/Table/lims-table.vue'
+import ImportDialog from '@/components/ImportDialog/index.vue'
import FormDialog from './component/FormDialog.vue';
import EditFormDia from './component/EditFormDia.vue';
import {
@@ -107,6 +119,7 @@
components: {
FormDialog,
limsTable,
+ ImportDialog,
EditFormDia
},
data() {
@@ -483,7 +496,6 @@
],
formDialog: false,
editFormDialog: false,
- upLoading: false,
outLoading: false,
ratifyInfo: {
writeUserId: '',
@@ -657,28 +669,6 @@
const blob = new Blob([res], { type: 'application/octet-stream' });
this.$download.saveAs(blob, '鏍囧噯鏌ユ柊瀵煎嚭.xlsx')
})
- },
- // 瀵煎叆
- beforeUpload(file) {
- if (file.size > 1024 * 1024 * 10) {
- this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
- this.$refs.upload.clearFiles()
- return false;
- } else {
- this.upLoading = true;
- return true;
- }
- },
- onError(err, file, fileList) {
- this.$message.error('涓婁紶澶辫触')
- this.$refs.upload.clearFiles()
- },
- handleSuccessUp(response) {
- this.upLoading = false;
- if (response.code == 200) {
- this.$message.success('涓婁紶鎴愬姛');
- this.searchList()
- }
},
// 鍒嗛〉
pagination(page) {
diff --git a/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue b/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue
index 88aa48d..6e132bf 100644
--- a/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue
+++ b/src/views/CNAS/resourceDemand/device/component/deviceOverview.vue
@@ -89,7 +89,7 @@
<el-button link type="primary" @click="downloadTemplate">涓嬭浇瀵煎叆妯℃澘</el-button>
</div>
<el-upload ref="deviceUpload" drag name="file" accept=".xlsx" :action="importAction"
- :headers="uploadHeader" :auto-upload="false" :limit="1" :file-list="importFiles"
+ :headers="uploadHeader" :auto-upload="false" :limit="1" v-model:file-list="importFiles"
:before-upload="beforeImport" :on-success="importSuccess" :on-error="importError">
<lims-icon name="el-icon-upload"></lims-icon>
<div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
@@ -160,7 +160,7 @@
}).catch(() => { })
},
submitImport() {
- if (!this.$refs.deviceUpload.uploadFiles.length) {
+ if (!this.importFiles || this.importFiles.length === 0) {
this.$message.warning('璇烽�夋嫨闇�瑕佸鍏ョ殑Excel鏂囦欢')
return
}
diff --git a/src/views/CNAS/systemManagement/documentControl/components/FileList.vue b/src/views/CNAS/systemManagement/documentControl/components/FileList.vue
index 875358a..256bc60 100644
--- a/src/views/CNAS/systemManagement/documentControl/components/FileList.vue
+++ b/src/views/CNAS/systemManagement/documentControl/components/FileList.vue
@@ -21,10 +21,7 @@
</el-form>
</div>
<div>
- <el-upload :action="action" :multiple="false" accept='.xls,.xlsx' :headers="uploadHeader"
- :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp"
- :show-file-list="false">
- <el-button size="small" type="primary" :loading="upLoading">瀵煎叆</el-button></el-upload>
+ <el-button size="small" type="primary" @click="$refs.importDialog.open()">瀵煎叆</el-button>
</div>
</div>
<div class="table">
@@ -84,6 +81,16 @@
<el-button :loading="uploading" type="primary" @click="submitProduct('currentInfoForm')">纭� 璁�</el-button>
</span></template>
</el-dialog>
+ <import-dialog
+ ref="importDialog"
+ title="瀵煎叆鏂囦欢娓呭崟"
+ :action="action"
+ accept=".xls,.xlsx"
+ template-url="/import-templates/鏂囦欢娓呭崟瀵煎叆妯℃澘.xlsx?v=2"
+ template-name="鏂囦欢娓呭崟瀵煎叆妯℃澘.xlsx"
+ :tips="['琛ㄥご蹇呴』涓庢ā鏉垮畬鍏ㄤ竴鑷达紝涓嶈兘澧炲垹鍒楁垨淇敼鍒楀悕', '鐢熸晥鏃ユ湡鏍煎紡锛歒YYY-MM-DD']"
+ @success="refreshTable"
+ />
</div>
</template>
@@ -91,6 +98,7 @@
import UpPdfStamp from '@/components/UpPdfStamp/index.vue'
import filePreview from '@/components/Preview/filePreview.vue'
import limsTable from "@/components/Table/lims-table.vue";
+import ImportDialog from '@/components/ImportDialog/index.vue'
import {
uploadFileManageDocumentList,
pageManageDocumentList,
@@ -102,6 +110,7 @@
UpPdfStamp,
filePreview,
limsTable,
+ ImportDialog,
},
data() {
return {
diff --git a/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue b/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue
index 60e74ff..4bea504 100644
--- a/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue
@@ -20,10 +20,7 @@
</div>
<div>
<el-button size="small" type="primary" @click="openAdd('鏂板')">鏂板</el-button>
- <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
- :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
- :on-success="handleSuccessUp" style="display: inline-block;margin: 0 8px">
- <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
+ <el-button type="primary" size="small" style="margin: 0 8px" @click="$refs.importDialog.open()">瀵煎叆</el-button>
<el-button size="small" type="primary" @click="handleDown" :loading="outLoading">瀵煎嚭</el-button>
</div>
</div>
@@ -77,11 +74,22 @@
<el-button :loading="uploading" type="primary" @click="submitProduct('addForm')">纭� 璁�</el-button>
</span></template>
</el-dialog>
+ <import-dialog
+ ref="importDialog"
+ title="瀵煎叆鏂囦欢瀹℃壒璁板綍"
+ :action="action"
+ accept=".doc,.docx"
+ template-url="/import-templates/鏂囦欢瀹℃壒璁板綍瀵煎叆妯℃澘.docx"
+ template-name="鏂囦欢瀹℃壒璁板綍瀵煎叆妯℃澘.docx"
+ :tips="['璇峰嬁鍒犻櫎琛ㄥご鎴栧鍒犲垪锛屾暟鎹粠绗� 2 琛屽紑濮嬪~鍐�', '缂栧埗/瀹℃牳/鎵瑰噯濉啓绯荤粺鐢ㄦ埛濮撳悕', '鎵瑰噯鏃ユ湡鏍煎紡锛歒YYY-MM-DD']"
+ @success="refreshTable"
+ />
</div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
+import ImportDialog from '@/components/ImportDialog/index.vue'
import {
selectUserCondition,
} from "@/api/business/inspectionTask.js";
@@ -97,7 +105,8 @@
export default {
name: 'ApprovalRecord',
components: {
- limsTable
+ limsTable,
+ ImportDialog
},
data() {
return {
diff --git a/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue b/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
index df5accc..f527eb7 100644
--- a/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
@@ -20,10 +20,7 @@
</div>
<div>
<el-button size="small" type="primary" @click="openAdd">鏂板</el-button>
- <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
- :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
- :on-success="handleSuccessUp" style="display:inline-block;margin: 0 8px;">
- <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
+ <el-button type="primary" size="small" style="margin: 0 8px" @click="$refs.importDialog.open()">瀵煎叆</el-button>
<el-button size="small" type="primary" @click="handleDown" :loading="outLoading">瀵煎嚭</el-button>
</div>
</div>
@@ -80,11 +77,22 @@
<el-button type="primary" @click="handleAdd" :loading="addLoading">纭� 瀹�</el-button>
</span></template>
</el-dialog>
+ <import-dialog
+ ref="importDialog"
+ title="瀵煎叆鏂囦欢浣滃簾璁板綍"
+ :action="action"
+ accept=".doc,.docx"
+ template-url="/import-templates/鏂囦欢浣滃簾璁板綍瀵煎叆妯℃澘.docx"
+ template-name="鏂囦欢浣滃簾璁板綍瀵煎叆妯℃澘.docx"
+ :tips="['璇峰嬁鍒犻櫎琛ㄥご鎴栧鍒犲垪锛屾暟鎹粠绗� 2 琛屽紑濮嬪~鍐�', '鏁伴噺蹇呴』濉啓鏁存暟', '鐢宠鏃ユ湡銆佹壒鍑嗘棩鏈熸牸寮忥細YYYY-MM-DD']"
+ @success="refreshTable"
+ />
</div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
+import ImportDialog from '@/components/ImportDialog/index.vue'
import {
selectUserCondition,
} from "@/api/business/inspectionTask.js";
@@ -102,7 +110,8 @@
export default {
name: 'CancellationRecord',
components: {
- limsTable
+ limsTable,
+ ImportDialog
},
data() {
return {
diff --git a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
index 765b4d1..4b3344a 100644
--- a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
@@ -20,10 +20,7 @@
</div>
<div>
<el-button size="small" type="primary" @click="openAdd">鏂板</el-button>
- <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
- :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
- :on-success="handleSuccessUp" style="display:inline-block;margin: 0 8px;">
- <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
+ <el-button type="primary" size="small" style="margin: 0 8px" @click="$refs.importDialog.open()">瀵煎叆</el-button>
<el-button size="small" type="primary" @click="handleDown" :loading="outLoading">瀵煎嚭</el-button>
</div>
</div>
@@ -124,11 +121,22 @@
<el-button type="primary" @click="handleAdd" :loading="addLoading">纭� 瀹�</el-button>
</span></template>
</el-dialog>
+ <import-dialog
+ ref="importDialog"
+ title="瀵煎叆鏂囦欢鍙戞斁鍥炴敹璁板綍"
+ :action="action"
+ accept=".doc,.docx"
+ template-url="/import-templates/鏂囦欢鍙戞斁鍥炴敹璁板綍瀵煎叆妯℃澘.docx"
+ template-name="鏂囦欢鍙戞斁鍥炴敹璁板綍瀵煎叆妯℃澘.docx"
+ :tips="['璇峰嬁鍒犻櫎琛ㄥご鎴栧鍒犲垪锛屾暟鎹粠绗� 3 琛屽紑濮嬪~鍐�', '鎺ユ敹浜恒�佺鏀朵汉濉啓绯荤粺鐢ㄦ埛濮撳悕', '鎺ユ敹鏃ユ湡銆佺鏀舵棩鏈熸牸寮忥細YYYY-MM-DD']"
+ @success="refreshTable"
+ />
</div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
+import ImportDialog from '@/components/ImportDialog/index.vue'
import {
getYearAndMonthAndDays
} from '@/utils/date'
@@ -150,7 +158,8 @@
export default {
name: 'DistributionCollectionRecord',
components: {
- limsTable
+ limsTable,
+ ImportDialog
},
data() {
return {
diff --git a/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue b/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
index 8fb86d5..5a74e71 100644
--- a/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
@@ -5,10 +5,7 @@
<el-tab-pane label="濉啓" name="濉啓" style="height: 100%;">
<div style="display: flex;align-items: center;justify-content: flex-end;margin-bottom: 10px">
<el-button size="small" type="primary" @click="openAdd('鏂板')" style="margin-left: 20px;">鏂板</el-button>
- <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
- :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
- :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
- <el-button size="small" type="primary" :loading="upLoading">瀵煎叆</el-button></el-upload>
+ <el-button size="small" type="primary" style="margin-left: 20px" @click="$refs.importDialog.open()">瀵煎叆</el-button>
</div>
<lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading0"
:height="'calc(100vh - 290px)'" @pagination="pagination0"></lims-table>
@@ -79,12 +76,23 @@
<el-button :loading="uploading" type="primary" @click="submitProduct('addForm')">纭� 璁�</el-button>
</span></template>
</el-dialog>
+ <import-dialog
+ ref="importDialog"
+ title="瀵煎叆澶栨潵鏂囦欢纭"
+ :action="action"
+ accept=".doc,.docx"
+ template-url="/import-templates/澶栨潵鏂囦欢纭瀵煎叆妯℃澘.docx"
+ template-name="澶栨潵鏂囦欢纭瀵煎叆妯℃澘.docx"
+ :tips="['璇峰嬁鍒犻櫎琛ㄥご鎴栧鍒犲垪锛屾暟鎹粠绗� 2 琛屽紑濮嬪~鍐�', '鐢熸晥鏃ユ湡銆佷綔搴熸棩鏈熸牸寮忥細YYYY-MM-DD']"
+ @success="getList0"
+ />
</div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import filePreview from '@/components/Preview/filePreview.vue'
+import ImportDialog from '@/components/ImportDialog/index.vue'
import {
addManageRecordVerify,
pageManageRecordVerify,
@@ -99,6 +107,7 @@
components: {
filePreview,
limsTable,
+ ImportDialog,
},
data() {
return {
diff --git a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
index 51475c0..e1381fb 100644
--- a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
@@ -22,10 +22,7 @@
</div>
<div>
<el-button size="small" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
- <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
- :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower"
- :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
- <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
+ <el-button v-if="upPower" type="primary" size="small" style="margin-left: 20px" @click="$refs.importDialog.open()">瀵煎叆</el-button>
</div>
</div>
<div class="table">
@@ -122,12 +119,23 @@
<el-button type="primary" @click="submitCheck('閫氳繃')" :loading="checkLoading">閫� 杩�</el-button>
</span></template>
</el-dialog>
+ <import-dialog
+ ref="importDialog"
+ title="瀵煎叆鏂囦欢瀹氭湡瀹℃煡璁板綍"
+ :action="action"
+ accept=".doc,.docx"
+ template-url="/import-templates/鏂囦欢瀹氭湡瀹℃煡璁板綍瀵煎叆妯℃澘.docx"
+ template-name="鏂囦欢瀹氭湡瀹℃煡璁板綍瀵煎叆妯℃澘.docx"
+ :tips="['璇峰嬁鍒犻櫎琛ㄥご鎴栧鍒犲垪锛屾暟鎹粠绗� 2 琛屽紑濮嬪~鍐�', '閫傚疁鎬у~鍐欌�滈�傚疁 / 涓嶉�傚疁鈥濇垨鈥溾垰 / 脳鈥�']"
+ @success="refreshTable"
+ />
</div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import filePreview from '@/components/Preview/filePreview.vue'
+import ImportDialog from '@/components/ImportDialog/index.vue'
import {
exportOutManageRecordIntervals,
addManageRecordIntervals,
@@ -145,7 +153,8 @@
name: 'RegularReviewsRecord',
components: {
limsTable,
- filePreview
+ filePreview,
+ ImportDialog
},
data() {
return {
diff --git a/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue b/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue
index bf5817a..b4af08b 100644
--- a/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue
+++ b/src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue
@@ -6,10 +6,7 @@
<el-button type="primary" size="small" @click="addFun">鏂� 澧�</el-button>
<el-button type="primary" size="small" @click="approvalFun">瀹� 鎵�</el-button>
<el-button type="primary" size="small" @click="approveFun">鎵� 鍑�</el-button>
- <el-upload style="display: inline-block; padding: 0 6px" :headers="uploadHeader" :action="action"
- :on-error="onError" :show-file-list="false" :on-success="onSuccess">
- <el-button size="small" type="primary">瀵� 鍏�</el-button>
- </el-upload>
+ <el-button size="small" type="primary" @click="$refs.importDialog.open()">瀵� 鍏�</el-button>
<el-button size="small" @click="openDownloadDia">瀵煎嚭</el-button>
</div>
</div>
@@ -121,6 +118,16 @@
<el-button type="primary" @click="addApi" :loading="loading">纭� 瀹�</el-button>
</span></template>
</el-dialog>
+ <import-dialog
+ ref="importDialog"
+ title="瀵煎叆鍗遍櫓鍥犵礌杈ㄨ瘑涓庨闄╄瘎浠�"
+ :action="action"
+ accept=".xls,.xlsx"
+ template-url="/import-templates/鍗遍櫓鍥犵礌杈ㄨ瘑涓庨闄╄瘎浠峰鍏ユā鏉�.xlsx"
+ template-name="鍗遍櫓鍥犵礌杈ㄨ瘑涓庨闄╄瘎浠峰鍏ユā鏉�.xlsx"
+ :tips="['鍓嶄袱琛屼负琛ㄥご锛屾暟鎹粠绗� 3 琛屽紑濮嬪~鍐�', '椋庨櫓璇勪环 L/E/C/D 闇�鍒嗗埆濉啓']"
+ @success="initData"
+ />
</div>
</template>
@@ -135,7 +142,9 @@
exportHazardFactorIdentification,
} from '@/api/cnas/systemManagement/measuresDealRisks.js'
import { mapGetters } from "@/utils/store-compat";
+import ImportDialog from '@/components/ImportDialog/index.vue'
export default {
+ components: { ImportDialog },
data() {
return {
dialogVisible: false,
diff --git a/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue b/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue
index d32e39d..83304ca 100644
--- a/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue
+++ b/src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue
@@ -6,10 +6,7 @@
<el-button type="primary" size="small" @click="addFun">鏂� 澧�</el-button>
<el-button type="primary" size="small" @click="approvalFun">瀹� 鎵�</el-button>
<el-button type="primary" size="small" @click="approveFun">鎵� 鍑�</el-button>
- <el-upload style="display: inline-block; padding: 0 6px" :action="action" :headers="uploadHeader"
- :on-error="onError" :show-file-list="false" :on-success="onSuccess">
- <el-button size="small" type="primary">瀵� 鍏�</el-button>
- </el-upload>
+ <el-button size="small" type="primary" @click="$refs.importDialog.open()">瀵� 鍏�</el-button>
<el-button size="small" @click="openDownloadDia">瀵煎嚭</el-button>
</div>
</div>
@@ -93,6 +90,16 @@
<el-button type="primary" @click="addApi" :loading="loading">纭� 瀹�</el-button>
</span></template>
</el-dialog>
+ <import-dialog
+ ref="importDialog"
+ title="瀵煎叆閲嶅ぇ椋庨櫓鍥犵礌鍒嗘瀽鍙婃帶鍒惰鍒�"
+ :action="action"
+ accept=".xls,.xlsx"
+ template-url="/import-templates/閲嶅ぇ椋庨櫓鍥犵礌鍒嗘瀽鍙婃帶鍒惰鍒掑鍏ユā鏉�.xlsx"
+ template-name="閲嶅ぇ椋庨櫓鍥犵礌鍒嗘瀽鍙婃帶鍒惰鍒掑鍏ユā鏉�.xlsx"
+ :tips="['琛ㄥご蹇呴』涓庢ā鏉夸竴鑷达紝涓嶈兘澧炲垹鍒楁垨淇敼鍒楀悕']"
+ @success="initData"
+ />
</div>
</template>
@@ -106,7 +113,9 @@
exportSignificantRiskFactors,
} from '@/api/cnas/systemManagement/measuresDealRisks.js'
import { mapGetters } from "@/utils/store-compat";
+import ImportDialog from '@/components/ImportDialog/index.vue'
export default {
+ components: { ImportDialog },
data() {
return {
dialogVisible: false,
diff --git a/src/views/login.vue b/src/views/login.vue
index dbcdd29..1d80d27 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -92,6 +92,7 @@
<el-input
v-model="loginForm.password"
type="password"
+ show-password
size="large"
autocomplete="current-password"
placeholder="璇疯緭鍏ュ瘑鐮�"
diff --git a/src/views/structural/capabilityAndLaboratory/capability/index.vue b/src/views/structural/capabilityAndLaboratory/capability/index.vue
index e5b071c..a80bb26 100644
--- a/src/views/structural/capabilityAndLaboratory/capability/index.vue
+++ b/src/views/structural/capabilityAndLaboratory/capability/index.vue
@@ -9,14 +9,9 @@
</el-radio-group>
</el-col>
<el-col :span="12" style="text-align: right;">
- <el-upload v-if="radio === 0" ref='upload1'
- style="display: inline;margin-right: 8px"
- :action="uploadAction1"
- :before-upload="beforeUpload1" :headers="token" :on-error="onError1"
- :on-success="handleSuccessUp1" :show-file-list="false" accept='.doc,.docx,.xls,.xlsx'>
- <el-button size="small" type="primary">瀵煎叆</el-button>
- </el-upload>
- <el-button size="small" type="primary" v-if="radio === 1" @click="uploadDia = true">瀵煎叆</el-button>
+ <el-button v-if="radio === 0" size="small" type="primary" style="margin-right: 8px"
+ @click="$refs.importDialog0.open()">瀵煎叆</el-button>
+ <el-button size="small" type="primary" v-if="radio === 1" @click="$refs.importDialog1.open()">瀵煎叆</el-button>
<el-button size="small" type="primary" @click="openAdd()">鏂板</el-button>
</el-col>
</el-row>
@@ -92,22 +87,37 @@
<el-button :loading="uploading" type="primary" @click="submitProduct">纭� 璁�</el-button>
</span></template>
</el-dialog>
- <el-dialog v-model="uploadDia" title="鏁版嵁瀵煎叆" width="500px">
- <div style="margin: 0 auto;">
- <el-upload ref="upload" :action="uploadAction"
- :auto-upload="false" :file-list="fileList"
- :headers="token" :limit="1"
- :on-change="beforeUpload" :on-error="onError" :on-success="onSuccess" accept=".xlsx" drag
- name="file">
- <lims-icon name="el-icon-upload"></lims-icon>
- <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
- </el-upload>
- </div>
- <template #footer><span class="dialog-footer">
- <el-button @click="uploadDia = false">鍙� 娑�</el-button>
- <el-button :loading="uploading" type="primary" @click="submitUpload()">涓� 浼�</el-button>
- </span></template>
- </el-dialog>
+ <import-dialog
+ ref="importDialog0"
+ title="瀵煎叆妫�楠岄」鐩弬鏁�"
+ :action="uploadAction1"
+ accept=".xls,.xlsx"
+ template-url="/import-templates/妫�楠岄」鐩弬鏁板鍏ユā鏉�.xlsx"
+ template-name="妫�楠岄」鐩弬鏁板鍏ユā鏉�.xlsx"
+ :tips="[
+ '姣忎釜鏁版嵁琛岄兘蹇呴』濉啓锛氭楠屽璞°�佹楠岄」銆佹楠岄」绫诲瀷銆佹楠屽�肩被鍨嬨�佺壒娈婃爣璇�',
+ '妫�楠岄」绫诲瀷鍙兘濉啓鈥滈潪閲囬泦绫诲瀷鈥濇垨鈥滈噰闆嗙被鍨嬧��',
+ '妫�楠屽�肩被鍨嬪彧鑳藉~鍐欌�滄暟鍊尖�濇垨鈥滄枃鏈��',
+ '鐗规畩鏍囪瘑鍙兘濉啓鈥滄槸鈥濇垨鈥滃惁鈥�',
+ '澶氫釜浜у搧/鏂规硶/鏉′欢/璁惧缂栧彿璇风敤涓枃鍒嗗彿鈥滐紱鈥濆垎闅�',
+ '璇峰垹闄ゅ浣欑殑绌虹櫧琛岋紝绌虹櫧琛屼細瀵艰嚧瀵煎叆澶辫触'
+ ]"
+ @success="refreshTable"
+ />
+ <import-dialog
+ ref="importDialog1"
+ title="瀵煎叆妫�楠屽璞�"
+ :action="uploadAction"
+ accept=".xls,.xlsx"
+ template-url="/import-templates/妫�楠屽璞″鍏ユā鏉�.xlsx"
+ template-name="妫�楠屽璞″鍏ユā鏉�.xlsx"
+ :tips="[
+ '鈥滃満鎵�鈥濆繀椤讳笌绯荤粺涓凡鏈夌殑鍦烘墍鍚嶇О瀹屽叏涓�鑷达紝鍚﹀垯瀵煎叆澶辫触',
+ '妫�娴嬪璞°�佷骇鍝佸悕绉板繀濉�',
+ '鍚屼竴妫�娴嬪璞℃湁澶氫釜浜у搧鏃讹紝璇峰~鍐欏琛�'
+ ]"
+ @success="refreshTable"
+ />
<!--妫�楠岄」鐩弬鏁�-缂栬緫寮规-->
<EditForm ref="editForm" @refreshList="refreshList1"></EditForm>
<testObjectEditForm ref="testObjectEditForm" @refreshList="refreshList"></testObjectEditForm>
@@ -131,14 +141,14 @@
selectTestObjectList, upProduct,
} from "@/api/structural/capability";
import limsTable from "@/components/Table/lims-table.vue";
+import ImportDialog from "@/components/ImportDialog/index.vue";
import EditForm from "@/views/structural/capabilityAndLaboratory/capabilityComponents/EditForm.vue";
import testObjectEditForm from "@/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue";
-import {getToken} from "@/utils/auth";
import { obtainItemParameterList } from '@/api/structural/laboratoryScope'
export default {
name: 'Capability',
- components: {limsTable, EditForm, testObjectEditForm, BindPartDialog, BindSupplierDensityDialog},
+ components: {limsTable, ImportDialog, EditForm, testObjectEditForm, BindPartDialog, BindSupplierDensityDialog},
data() {
return {
uploadAction: import.meta.env.VITE_APP_BASE_API + '/capacityScope/importExcel',
@@ -374,9 +384,6 @@
productRules: {
name: [{ required: true, message: '璇峰~鍐欎骇鍝佸悕绉�', trigger: 'blur' }]
},
- uploadDia: false,
- fileList: [],
- token: {Authorization: "Bearer " + getToken()},
uploading: false,
currentRow: {}, // 閫夋嫨闆朵欢缁戝畾鏈潯鏁版嵁鐨勪俊鎭�
currentSupplierDensityRow: {}, // 閫夋嫨闆朵欢缁戝畾鏈潯鏁版嵁鐨勪俊鎭�
@@ -396,63 +403,6 @@
}
},
methods: {
- submitUpload() {
- if (this.$refs.upload.uploadFiles.length === 0) {
- this.$message.error('鏈�夋嫨鏂囦欢')
- return
- }
- this.uploading = true
- this.$refs.upload.submit();
- },
- onSuccess(response, file, fileList) {
- this.$refs.upload.clearFiles()
- this.uploadDia = false
- this.uploading = false
- if (response.code !== 200) {
- this.$message.error(response.msg)
- return
- }
- this.$message.success('涓婁紶鎴愬姛')
- this.productList = []
- this.refreshTable()
- },
- onError(err, file, fileList) {
- this.$message.error('涓婁紶澶辫触')
- this.$refs.upload.clearFiles()
- this.uploading = false
- },
- beforeUpload(file, fileList) {
- if (file.size > 1024 * 1024 * 10) {
- this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
- this.$refs.upload.clearFiles()
- return false;
- } else {
- return true;
- }
- },
- onError1(err, file, fileList) {
- this.$message.error('涓婁紶澶辫触')
- this.$refs.upload1.clearFiles()
- this.uploading = false
- },
- beforeUpload1(file, fileList) {
- if (file.size > 1024 * 1024 * 10) {
- this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
- this.$refs.upload1.clearFiles()
- return false;
- } else {
- return true;
- }
- },
- handleSuccessUp1 (response, file, fileList) {
- this.$refs.upload1.clearFiles()
- if (response.code !== 200) {
- this.$message.error(response.msg)
- return
- }
- this.$message.success('涓婁紶鎴愬姛')
- this.refreshTable()
- },
refreshList () {
this.refreshTable()
},
--
Gitblit v1.9.3