Merge remote-tracking branch 'origin/master'
# Conflicts:
# src/assets/styles/element-ui.scss
| | |
| | | data: query, |
| | | }) |
| | | } |
| | | // 被çç£äººå确认çç£è®°å½ï¼ç¨åº4.2.5ï¼ |
| | | export function confirmSuperviseRecord(query) { |
| | | return request({ |
| | | url: '/qualitySupervise/confirmSuperviseRecord', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | // è·åå½åçç£è®°å½ççç£åå表 |
| | | export function getRecordUser(query) { |
| | | return request({ |
| | |
| | | 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 }); |
| | | } |
| | |
| | | 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; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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: '导å
¥æ¨¡æ¿' |
| | | }, |
| | | // æä»¶å¤§å°ä¸éï¼MBï¼ |
| | | 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> |
| | |
| | | .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', |
| | |
| | | 'æªæ': '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; |
| | |
| | | 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) { |
| | |
| | | </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" |
| | |
| | | </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> |
| | |
| | | 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) { |
| | |
| | | this.$message.error('è¯·éæ©å®¡æ ¸äºº') |
| | | return |
| | | } |
| | | if (this.$refs.upload.uploadFiles.length == 0) { |
| | | if (!this.fileList || this.fileList.length == 0) { |
| | | this.$message.error('æªéæ©æä»¶') |
| | | return |
| | | } |
| | |
| | | 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) { |
| | |
| | | </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> |
| | |
| | | } 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 { |
| | |
| | | dueDate: null, |
| | | }, |
| | | standardOptions: [], |
| | | allTemplateOptions: [], |
| | | templateOptions: [], |
| | | templateBindingLoading: false, |
| | | userOptions: [], |
| | | rules: { |
| | | monitorProject: [{ required: true, message: '请è¾å
¥è´¨æ§é¡¹ç®', trigger: 'blur' }], |
| | |
| | | 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) { |
| | |
| | | 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) |
| | |
| | | :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">çç£åé»è®¤ä¸ºè®¡å䏿å®çè¯ä»·äººï¼è¢«çç£äººå为计å䏿å®çæ£æµåã</div> |
| | | <el-form :model="form" label-width="150px" style="margin-top: 16px"> |
| | | <el-row :gutter="12"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµé¡¹ç®"> |
| | |
| | | </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="被çç£äººå"> |
| | | <el-form-item label="被çç£äººåï¼æ£æµåï¼"> |
| | | <el-input :model-value="supervisedPersonName" disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | }, |
| | | 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) |
| | | // çç£åé»è®¤å°±æ¯è®¡åä¸çè¯ä»·äººï¼å æ¤è¿éä¸è½æè¯ä»·äººæé¤æï¼åªæé¤è¢«çç£çæ£æµå |
| | | 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: { |
| | |
| | | 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} |
| | | // å
åºï¼åå²è¯ä»·è®°å½æ²¡æçç£åæ¶ï¼é»è®¤å¸¦åºè®¡åè¯ä»·äºº |
| | | 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(() => { |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .role-hint { |
| | | margin-top: 8px; |
| | | font-size: 12px; |
| | | line-height: 18px; |
| | | color: var(--el-text-color-secondary); |
| | | } |
| | | </style> |
| | |
| | | </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" |
| | |
| | | <!--导å
¥è®¡å--> |
| | | <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>è´¨æ§é¡¹ç®ãææ¯æ åãè´¨æ§æ¹å¼ã宿æ¶éãè´è´£äººä¸ºå¿
填项ã</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> |
| | |
| | | </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> |
| | |
| | | }, { |
| | | label: 'çæ§ä»»å¡ç¼å·', prop: 'inspectionTaskCode', minWidth: '150px' |
| | | }, { |
| | | label: 'ä»»å¡ç¶æ', prop: 'inspectionTaskState', width: '100px', |
| | | formatData: value => this.inspectionTaskStatus(value) |
| | | label: 'ä»»å¡ç¶æ', prop: 'taskStatusText', width: '110px' |
| | | },{ |
| | | dataType: 'tag', |
| | | label: 'è¯ä»·ç¶æ', |
| | |
| | | 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() |
| | |
| | | } |
| | | }, |
| | | 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ï¼el-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) { |
| | |
| | | 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 |
| | |
| | | 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 => { |
| | |
| | | } |
| | | this.lookDialogVisible = true |
| | | } else { |
| | | this.fileList1 = [] |
| | | this.uploadDia1 = true |
| | | } |
| | | }, |
| | |
| | | this.uploading1 = false |
| | | }, |
| | | submitUpload1() { |
| | | if (this.$refs.upload1.uploadFiles.length === 0) { |
| | | if (!this.fileList1 || this.fileList1.length === 0) { |
| | | this.$message.error('æªéæ©æä»¶') |
| | | return |
| | | } |
| | |
| | | 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 = { |
| | |
| | | </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="请è¾å
¥çç£åå " size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | }, |
| | | // æ¹æ³éå |
| | | 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) |
| | | } |
| | |
| | | }, |
| | | 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 () { |
| | |
| | | </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"> |
| | |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.rectifyAdvice }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>被çç£äººå确认æè§ï¼</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="对çç£è®°å½ç宿§è¡¨ç¤ºè®¤å¯ã"/> |
| | | <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> |
| | |
| | | <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 = [ |
| | | '人åæè¯åå¹è®', '设æ½åç¯å¢æ¡ä»¶', 'æ£æµæ¹æ³', |
| | | '仪å¨è®¾å¤ç®¡ç', 'æµéæº¯æºæ§', 'æ åç©è´¨ç®¡ç', |
| | | 'æ ·åå¶å¤åå¤ç½®', 'æ£æµæ°æ®å¤ç', 'ç»ææ¥åç»æ' |
| | | ] |
| | | // çç£æ¹å¼ï¼å¯¹åºãè´¨éçç£ç¨åºã4.2.4 |
| | | const SUPERVISE_MODE_ITEMS = [ |
| | | 'æ ¸æ¥åå§è®°å½åæ¥å', |
| | | 'ç°åºçç£å®é
æä½è¿ç¨', |
| | | 'ä¸è¢«çç£å¯¹è±¡äº¤æµ', |
| | | 'å
é¨è´¨éæ§å¶/å¤é¨è´¨éè¯ä¼°', |
| | | 'å¹è®ææè¯ä»·' |
| | | ] |
| | | |
| | | export default { |
| | | name: 'recordsDialog', |
| | |
| | | ratifyOpinion: '', |
| | | isAccording: '', |
| | | isFinish: '', |
| | | superviseMethod: '', |
| | | confirmOpinion: '', |
| | | }, |
| | | currentStep: 0, |
| | | editLoad: false, |
| | |
| | | ratifyUserId: '', |
| | | superviseeList: [], |
| | | superviseContentList: [], |
| | | superviseContentItems: ['人åæè¯åå¹è®', '设æ½åç¯å¢æ¡ä»¶', 'æ£æµæ¹æ³', '仪å¨è®¾å¤ç®¡ç', 'æµéæº¯æºæ§', 'æ åç©è´¨ç®¡ç', 'æ ·åå¶å¤åå¤ç½®', 'æ£æµæ°æ®å¤ç', 'ç»ææ¥åç»æ'], |
| | | superviseContentItems: SUPERVISE_CONTENT_ITEMS, |
| | | superviseModeItems: SUPERVISE_MODE_ITEMS, |
| | | superviseModeList: [], |
| | | confirmOpinion: '', |
| | | confirming: false, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | ...mapGetters(["userId", "nickName"]), |
| | | // è®°å½å·²æäº¤ä¸å°æªç¡®è®¤æ¶ï¼åªæè¢«çç£äººåæ¬äººå¯ä»¥ç¡®è®¤ï¼ç¨åº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) { |
| | |
| | | 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); |
| | |
| | | } |
| | | this.form.testMember = this.superviseeList.join('ã') |
| | | this.form.superviseContent = this.superviseContentList.join('ã') |
| | | this.form.superviseMethod = this.superviseModeList.join('ã') |
| | | this.addInfo() |
| | | } else { |
| | | this.editInfo(isFinish) |
| | |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // 被çç£äººå确认çç£è®°å½ï¼ç¨åº4.2.5ï¼ |
| | | confirmRecord () { |
| | | const opinion = (this.confirmOpinion || '').trim() || '对çç£è®°å½ç宿§è¡¨ç¤ºè®¤å¯ã' |
| | | this.confirming = true |
| | | confirmSuperviseRecord({ |
| | | superviseDetailsId: this.form.superviseDetailsId, |
| | | confirmOpinion: opinion |
| | | }).then(() => { |
| | | this.form.confirmOpinion = opinion |
| | | this.$message.success('已确认çç£è®°å½') |
| | | }).finally(() => { |
| | | this.confirming = false |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeRecordsDia () { |
| | | this.formDia = false |
| | |
| | | }, |
| | | getRecordUser () { |
| | | getRecordUser({superviseDetailsId: this.form.superviseDetailsId}).then(res => { |
| | | this.recordUserList = res.data |
| | | this.recordUserList = res.data || [] |
| | | // 计åå·²æå®çç£åä½å°æªäº§çè®°å½æ¶ï¼é»è®¤åæ¾ç¬¬ä¸ä½çç£åï¼ |
| | | // åç«¯åªæå¨åå¨ä¸æè®°å½æ¶æä¼èªå¨å¸¦åºçç£åï¼é¦æ¬¡å¡«åä¼ä¸ºç©ºã |
| | | if (this.currentStep === 0 && !this.form.supervisor && this.recordUserList.length) { |
| | | this.form.supervisor = this.recordUserList[0].userName |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | |
| | | <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> |
| | |
| | | <!--导å
¥è®¡å--> |
| | | <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>被çç£äººåå¿
须填åç³»ç»ä¸å·²åå¨ç人åå§åï¼å¦åæ´æ¹å¯¼å
¥å¤±è´¥ã</div> |
| | | <div>导å
¥åªè¯»å模æ¿ç第ä¸ä¸ªå·¥ä½è¡¨ã</div> |
| | | <div style="color: var(--el-color-warning);">导å
¥å计å为âå¾
æ¹åâï¼éä½¿ç¨æéæ¹å人账å·ç»å½å¹¶ç¹å»âæ¹åâï¼æ¹ååæè½ä¸åå导åºã</div> |
| | | </div> |
| | | <template #footer><span class="dialog-footer"> |
| | | <el-button @click="closeUploadDia">å æ¶</el-button> |
| | |
| | | } else if (params === 1) { |
| | | return 'æ¹å'; |
| | | } else { |
| | | return null; |
| | | return 'å¾
æ¹å'; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | |
| | | } else if (params === 1) { |
| | | return 'success'; |
| | | } else { |
| | | return null; |
| | | return 'warning'; |
| | | } |
| | | } |
| | | }, { |
| | |
| | | yearLoading: false, |
| | | yearDetailForm: { |
| | | supervisePurpose: '', |
| | | superviseProject: '', |
| | | causeType: 1 |
| | | superviseProject: '' |
| | | }, |
| | | yearDetailColumnData: [ |
| | | { |
| | |
| | | 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('ä¸ä¼ 失败') |
| | |
| | | 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 = [] |
| | |
| | | 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 |
| | | }) |
| | | }, |
| | | // æ¹å |
| | |
| | | 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 |
| | | // åå²å¯¼å
¥ççç£æ¥æå¯è½æ¯ 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); |
| | |
| | | showDialog(type, row) { |
| | | this.formDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.formDia.openDia(type, row, this.yearDetailForm.causeType) |
| | | this.$refs.formDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeDia() { |
| | |
| | | action() { |
| | | return this.javaApi + '/qualitySupervise/importQualitySupervise' |
| | | }, |
| | | ...mapGetters(["userId"]), |
| | | ...mapGetters(["userId", "nickName"]), |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | <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"> |
| | |
| | | <p>æ åæ¹æ³</p> |
| | | </td> |
| | | <td> |
| | | <p>éªè¯åå </p> |
| | | <p>{{ verifyType === 0 ? 'åæ´åå ' : 'éªè¯åå ' }}</p> |
| | | </td> |
| | | <td> |
| | | <p>ä¸»è¦ææ¯åå</p> |
| | |
| | | </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> |
| | |
| | | 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() { |
| | |
| | | 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 { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| | |
| | | </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> |
| | |
| | | @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 { |
| | |
| | | components: { |
| | | FormDialog, |
| | | limsTable, |
| | | ImportDialog, |
| | | EditFormDia |
| | | }, |
| | | data() { |
| | |
| | | ], |
| | | formDialog: false, |
| | | editFormDialog: false, |
| | | upLoading: false, |
| | | outLoading: false, |
| | | ratifyInfo: { |
| | | writeUserId: '', |
| | |
| | | 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) { |
| | |
| | | <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> |
| | |
| | | }).catch(() => { }) |
| | | }, |
| | | submitImport() { |
| | | if (!this.$refs.deviceUpload.uploadFiles.length) { |
| | | if (!this.importFiles || this.importFiles.length === 0) { |
| | | this.$message.warning('è¯·éæ©éè¦å¯¼å
¥çExcelæä»¶') |
| | | return |
| | | } |
| | |
| | | </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"> |
| | |
| | | <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="['表头å¿
须䏿¨¡æ¿å®å
¨ä¸è´ï¼ä¸è½å¢å åæä¿®æ¹åå', 'çææ¥ææ ¼å¼ï¼YYYY-MM-DD']" |
| | | @success="refreshTable" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | 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, |
| | |
| | | UpPdfStamp, |
| | | filePreview, |
| | | limsTable, |
| | | ImportDialog, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | </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> |
| | |
| | | <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="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"; |
| | |
| | | export default { |
| | | name: 'ApprovalRecord', |
| | | components: { |
| | | limsTable |
| | | limsTable, |
| | | ImportDialog |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | </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> |
| | |
| | | <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"; |
| | |
| | | export default { |
| | | name: 'CancellationRecord', |
| | | components: { |
| | | limsTable |
| | | limsTable, |
| | | ImportDialog |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | </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> |
| | |
| | | <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' |
| | |
| | | export default { |
| | | name: 'DistributionCollectionRecord', |
| | | components: { |
| | | limsTable |
| | | limsTable, |
| | | ImportDialog |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | <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> |
| | |
| | | <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, |
| | |
| | | components: { |
| | | filePreview, |
| | | limsTable, |
| | | ImportDialog, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | </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"> |
| | |
| | | <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, |
| | |
| | | name: 'RegularReviewsRecord', |
| | | components: { |
| | | limsTable, |
| | | filePreview |
| | | filePreview, |
| | | ImportDialog |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | 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, |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | 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, |
| | |
| | | <el-input |
| | | v-model="loginForm.password" |
| | | type="password" |
| | | show-password |
| | | size="large" |
| | | autocomplete="current-password" |
| | | placeholder="请è¾å
¥å¯ç " |
| | |
| | | </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> |
| | |
| | | <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> |
| | |
| | | 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', |
| | |
| | | productRules: { |
| | | name: [{ required: true, message: '请填å产ååç§°', trigger: 'blur' }] |
| | | }, |
| | | uploadDia: false, |
| | | fileList: [], |
| | | token: {Authorization: "Bearer " + getToken()}, |
| | | uploading: false, |
| | | currentRow: {}, // éæ©é¶ä»¶ç»å®æ¬æ¡æ°æ®çä¿¡æ¯ |
| | | currentSupplierDensityRow: {}, // éæ©é¶ä»¶ç»å®æ¬æ¡æ°æ®çä¿¡æ¯ |
| | |
| | | } |
| | | }, |
| | | 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() |
| | | }, |