From 7f4ffe2c19004403bb3190f25879b2074f4d3932 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 16 十月 2026 17:16:43 +0800
Subject: [PATCH] fix:1. 过程要求 - 样品接收:列表样式优化。 2. 过程要求 - 方法验证:点击详情还能修改,导出格式优化,按客户给的文档来。 3. 业务管理 - 检验任务:删除不合格相关的检测。 4. 业务管理 - 报告结果:按照发送日期倒序排列。 5. 基础配置 - 行业管理:删除印章管理。 6. 体系管理要求 - 客户满意度:附件上传报错,精简上传逻辑。
---
src/views/CNAS/process/disposal/sampleReceipt/index.vue | 2
src/views/structural/premises/index.vue | 190 --------------------------------------
src/views/CNAS/process/method/methodVerification/index.vue | 2
src/views/CNAS/process/method/methodVerification/component/wordFormDIa.vue | 33 +++--
src/views/business/inspectionView/index.vue | 1
src/views/business/inspectionTask/inspection.vue | 3
src/views/CNAS/process/method/methodVerification/component/ViewDeviceDialog.vue | 17 ++-
src/views/CNAS/process/method/methodVerification/component/formDIa.vue | 10 +
src/views/CNAS/process/method/methodVerification/component/ViewTestRecord.vue | 16 ++
9 files changed, 52 insertions(+), 222 deletions(-)
diff --git a/src/views/CNAS/process/disposal/sampleReceipt/index.vue b/src/views/CNAS/process/disposal/sampleReceipt/index.vue
index 2b549b3..8b6f4cb 100644
--- a/src/views/CNAS/process/disposal/sampleReceipt/index.vue
+++ b/src/views/CNAS/process/disposal/sampleReceipt/index.vue
@@ -40,7 +40,7 @@
<lims-table :tableData="tableData" :column="column" @pagination="pagination"
:height="'calc(100vh - 280px)'" :key="upIndex" :page="page" :tableLoading="tableLoading">
<template #inspectionItem="scope">
- <div style="white-space: pre-line; text-align: left; padding: 4px 0;">{{ scope.row.inspectionItem }}</div>
+ <div style="white-space: pre-line; text-align: center; padding: 4px 0;">{{ scope.row.inspectionItem }}</div>
</template>
<template #remark="scope">
<span>{{ scope.row.status === 2 && scope.row.rejectRemark ? scope.row.rejectRemark : scope.row.remark }}</span>
diff --git a/src/views/CNAS/process/method/methodVerification/component/ViewDeviceDialog.vue b/src/views/CNAS/process/method/methodVerification/component/ViewDeviceDialog.vue
index e92c63b..d214852 100644
--- a/src/views/CNAS/process/method/methodVerification/component/ViewDeviceDialog.vue
+++ b/src/views/CNAS/process/method/methodVerification/component/ViewDeviceDialog.vue
@@ -1,7 +1,7 @@
<template>
<div>
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-model="viewDeviceDialog" title="鏌ョ湅璁惧" width="80%" @close="closeDia">
- <div style="text-align: right;margin-bottom: 10px">
+ <div v-if="!readOnly" style="text-align: right;margin-bottom: 10px">
<el-button size="small" type="primary" @click="addRow">娣诲姞</el-button>
<el-button size="small" type="danger" @click="clearTable">娓呯┖</el-button>
</div>
@@ -18,7 +18,7 @@
clearable
filterable
placeholder="璁惧鍚嶇О"
- size="small" @change="(val)=>changeMachineName(val, scope.$index)">
+ size="small" :disabled="readOnly" @change="(val)=>changeMachineName(val, scope.$index)">
<el-option v-for="item in equipOptions" :key="item.value" :label="item.label" :value="item.value">
{{item.label + item.value}}
</el-option>
@@ -30,7 +30,7 @@
<p>鍨嬪彿瑙勬牸</p>
</template>
<template #default="{row}">
- <el-input v-model="row.machineSpecification" size="small"/>
+ <el-input v-model="row.machineSpecification" size="small" :disabled="readOnly"/>
</template>
</el-table-column>
<el-table-column header-align="center" label="娴嬮噺鑼冨洿" prop="machineMeasuringRange">
@@ -38,7 +38,7 @@
<p>娴嬮噺鑼冨洿</p>
</template>
<template #default="{row}">
- <el-input v-model="row.machineMeasuringRange" size="small" type="textarea"/>
+ <el-input v-model="row.machineMeasuringRange" size="small" type="textarea" :disabled="readOnly"/>
</template>
</el-table-column>
<el-table-column header-align="center" label="鈶犳墿灞曚笉纭畾搴︹憽鏈�澶у厑宸憿鍑嗙‘搴︾瓑绾�" prop="other">
@@ -46,14 +46,14 @@
<p>鈶犳墿灞曚笉纭畾搴︹憽鏈�澶у厑宸憿鍑嗙‘搴︾瓑绾�</p>
</template>
<template #default="{row}">
- <el-input v-model="row.other" size="small" type="textarea"/>
+ <el-input v-model="row.other" size="small" type="textarea" :disabled="readOnly"/>
</template>
</el-table-column>
</el-table>
</div>
<template #footer><span class="dialog-footer">
<el-button @click="closeDia">鍙� 娑�</el-button>
- <el-button type="primary" @click="handleDeviceInfo">纭� 瀹�</el-button>
+ <el-button v-if="!readOnly" type="primary" @click="handleDeviceInfo">纭� 瀹�</el-button>
</span></template>
</el-dialog>
</div>
@@ -64,6 +64,7 @@
export default {
name: 'ViewDeviceDialog',
+ props: { readOnly: { type: Boolean, default: false } },
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {},
data() {
@@ -83,6 +84,7 @@
},
// 澧炲姞琛ㄦ牸琛屾暟鎹�
addRow () {
+ if (this.readOnly) return
this.machineAttachmentList.push({
machineName: '',
machineSpecification: '',
@@ -92,10 +94,12 @@
},
// 娓呯┖琛ㄦ牸鏁版嵁
clearTable () {
+ if (this.readOnly) return
this.machineAttachmentList = []
},
// 閫夋嫨璁惧鐨勫洖璋�
changeMachineName (val, index) {
+ if (this.readOnly) return
const index1 = this.equipOptions.findIndex(item => item.value === val);
if (index1 !== -1) {
this.machineAttachmentList[index].deviceId = this.equipOptions[index1].id;
@@ -105,6 +109,7 @@
},
// 鎻愪氦璁惧淇℃伅
handleDeviceInfo () {
+ if (this.readOnly) return
if (this.machineAttachmentList.length === 0) {
this.$message.warning('璇锋坊鍔犱俊鎭�')
return
diff --git a/src/views/CNAS/process/method/methodVerification/component/ViewTestRecord.vue b/src/views/CNAS/process/method/methodVerification/component/ViewTestRecord.vue
index 309eba1..02b4ad2 100644
--- a/src/views/CNAS/process/method/methodVerification/component/ViewTestRecord.vue
+++ b/src/views/CNAS/process/method/methodVerification/component/ViewTestRecord.vue
@@ -1,7 +1,7 @@
<template>
<div>
- <el-dialog v-model="filesDialogVisible" title="闄勪欢涓婁紶" width="80%" @closed="closeFilesLook">
- <div style="display: flex;justify-content: space-between;">
+ <el-dialog v-model="filesDialogVisible" :title="readOnly ? '鏌ョ湅闄勪欢' : '闄勪欢涓婁紶'" width="80%" @closed="closeFilesLook">
+ <div v-if="!readOnly" style="display: flex;justify-content: space-between;">
<el-upload ref='upload'
:action="fileAction"
:auto-upload="true"
@@ -17,7 +17,7 @@
<div>
<lims-table
ref="yearTable"
- :column="columnData"
+ :column="readOnly ? readonlyColumnData : columnData"
:height="'calc(100vh - 47em)'"
:highlightCurrentRow="true"
:table-data="tableData"
@@ -36,8 +36,16 @@
export default {
name: 'ViewTestRecord',
+ props: { readOnly: { type: Boolean, default: false } },
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: { limsTable },
+ computed: {
+ readonlyColumnData() {
+ return this.columnData.map(column => column.dataType === 'action'
+ ? { ...column, operation: column.operation.filter(item => item.name !== '鍒犻櫎') }
+ : column)
+ }
+ },
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
@@ -122,6 +130,7 @@
},
// 鍒犻櫎
delete (row) {
+ if (this.readOnly) return
this.tableLoading = true
delVerifyMethodFileList({methodFileId:row.methodFileId}).then(res => {
this.tableLoading = false
@@ -137,6 +146,7 @@
},
// 涓婁紶楠岃瘉
fileBeforeUpload(file) {
+ if (this.readOnly) return false
let flag = true
if (file.size > 1024 * 1024 * 10) {
this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
diff --git a/src/views/CNAS/process/method/methodVerification/component/formDIa.vue b/src/views/CNAS/process/method/methodVerification/component/formDIa.vue
index 5b8d568..aaffbc6 100644
--- a/src/views/CNAS/process/method/methodVerification/component/formDIa.vue
+++ b/src/views/CNAS/process/method/methodVerification/component/formDIa.vue
@@ -291,12 +291,12 @@
</table>
</fieldset>
<template #footer><span class="dialog-footer">
- <el-button @click="closeDia">鍙� 娑�</el-button>
+ <el-button @click="closeDia">{{ operationType === 'view' ? '鍏抽棴' : '鍙� 娑�' }}</el-button>
<el-button v-if="operationType !== 'view'" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
</span></template>
</el-dialog>
- <ViewDeviceDialog v-if="viewDeviceDialog" ref="viewDeviceDialog" @closDeviceDia="closDeviceDia" @handleDeviceInfo="handleDeviceInfo"></ViewDeviceDialog>
- <ViewTestRecord v-if="viewTestRecordDialog" ref="viewTestRecordDialog"></ViewTestRecord>
+ <ViewDeviceDialog v-if="viewDeviceDialog" ref="viewDeviceDialog" :read-only="operationType === 'view'" @closDeviceDia="closDeviceDia" @handleDeviceInfo="handleDeviceInfo"></ViewDeviceDialog>
+ <ViewTestRecord v-if="viewTestRecordDialog" ref="viewTestRecordDialog" :read-only="operationType === 'view'"></ViewTestRecord>
<ViewWorkPermitDia v-if="viewWorkPermitDia" ref="viewWorkPermitDia"></ViewWorkPermitDia>
<calibrations-file-dia v-if="calibrationsFileDia" ref="calibrationsFileDia"></calibrations-file-dia>
</div>
@@ -410,6 +410,7 @@
},
// 鎻愪氦
handleEdit() {
+ if (this.operationType === 'view') return
this.editLoad = true
const processMethodSearchNews = this.HaveJson(this.form)
processMethodSearchNews.confirmUser = processMethodSearchNews.confirmUser && processMethodSearchNews.confirmUser.join(',')
@@ -422,10 +423,12 @@
},
// 璇勫鎰忚鍕鹃�夛紙涓夐�変竴锛屽啀鐐逛竴娆″彇娑堬級
toggleReview (value, checked) {
+ if (this.operationType === 'view') return
this.form.reviewResult = checked ? value : ''
},
// 瀹℃壒鎰忚鍕鹃�夛紙涓夐�変竴锛屽啀鐐逛竴娆″彇娑堬級
toggleApproval (value, checked) {
+ if (this.operationType === 'view') return
this.form.approvalResult = checked ? value : ''
},
// 鏌ョ湅涓婂矖璇�
@@ -455,6 +458,7 @@
},
// 鎻愪氦璁惧淇℃伅
handleDeviceInfo (machineAttachmentList) {
+ if (this.operationType === 'view') return
this.viewDeviceDialog = false
this.form.machineAttachmentList = machineAttachmentList
},
diff --git a/src/views/CNAS/process/method/methodVerification/component/wordFormDIa.vue b/src/views/CNAS/process/method/methodVerification/component/wordFormDIa.vue
index 0121608..21df974 100644
--- a/src/views/CNAS/process/method/methodVerification/component/wordFormDIa.vue
+++ b/src/views/CNAS/process/method/methodVerification/component/wordFormDIa.vue
@@ -14,17 +14,17 @@
<tr>
<th>鏍囧噯鍚嶇О</th>
<td>
- <el-input v-model="form.standardName"/>
+ <el-input v-model="form.standardName" :disabled="isView"/>
</td>
<th>鏍囧噯缂栧彿</th>
<td>
- <el-input v-model="form.standardCode"/>
+ <el-input v-model="form.standardCode" :disabled="isView"/>
</td>
</tr>
<tr>
<th>楠岃瘉椤圭洰</th>
<td colspan="3">
- <el-input v-model="form.verifyItem"/>
+ <el-input v-model="form.verifyItem" :disabled="isView"/>
</td>
</tr>
</tbody>
@@ -48,13 +48,13 @@
<tr v-for="(item, index) in content.checks" :key="item.key">
<th>{{ index < 7 ? `${index + 1}. ${item.label}` : item.label }}</th>
<td>
- <el-input v-model="item.requirement" type="textarea" :rows="3"/>
+ <el-input v-model="item.requirement" type="textarea" :rows="3" :disabled="isView"/>
</td>
<td>
- <el-input v-model="item.capability" type="textarea" :rows="3"/>
+ <el-input v-model="item.capability" type="textarea" :rows="3" :disabled="isView"/>
<div v-if="item.key === 'personnel'" class="row-extra">
<span>妫�娴嬩汉鍛�</span>
- <el-select v-model="form.confirmUser" multiple :multiple-limit="5" placeholder="璇烽�夋嫨妫�娴嬩汉鍛�">
+ <el-select v-model="form.confirmUser" multiple :multiple-limit="5" placeholder="璇烽�夋嫨妫�娴嬩汉鍛�" :disabled="isView">
<el-option v-for="user in userList" :key="user.id" :label="user.name" :value="user.id"/>
</el-select>
<el-link v-if="operationType !== 'add'" type="primary" @click="viewWorkPermit">鏌ョ湅涓婂矖璇�</el-link>
@@ -66,7 +66,7 @@
</div>
</td>
<td class="choice-cell">
- <el-radio-group v-model="item.satisfied">
+ <el-radio-group v-model="item.satisfied" :disabled="isView">
<el-radio :value="1">鏄�</el-radio>
<el-radio :value="0">鍚�</el-radio>
</el-radio-group>
@@ -75,23 +75,23 @@
<tr>
<th>楠岃瘉缁撹</th>
<td colspan="3">
- <el-input v-model="content.conclusion" type="textarea" :rows="4"/>
+ <el-input v-model="content.conclusion" type="textarea" :rows="4" :disabled="isView"/>
</td>
</tr>
<tr v-for="decision in decisions" :key="decision.key">
<th>{{ decision.label }}</th>
<td colspan="3">
<div class="decision-row">
- <el-radio-group v-model="content[decision.key]">
+ <el-radio-group v-model="content[decision.key]" :disabled="isView">
<el-radio value="鍚屾剰浣跨敤">鍚屾剰浣跨敤</el-radio>
<el-radio value="涓嶈兘浣跨敤">涓嶈兘浣跨敤</el-radio>
<el-radio value="闄愬埗浣跨敤">闄愬埗浣跨敤</el-radio>
</el-radio-group>
<span>{{ decision.personLabel }}</span>
- <el-input v-model="content[decision.personKey]" class="person-input"/>
+ <el-input v-model="content[decision.personKey]" class="person-input" :disabled="isView"/>
<span>鏃ユ湡</span>
<el-date-picker v-model="content[decision.dateKey]" type="date" value-format="YYYY-MM-DD"
- placeholder="閫夋嫨鏃ユ湡"/>
+ placeholder="閫夋嫨鏃ユ湡" :disabled="isView"/>
</div>
</td>
</tr>
@@ -103,13 +103,13 @@
</div>
</div>
<template #footer>
- <el-button @click="closeDia">鍙栨秷</el-button>
+ <el-button @click="closeDia">{{ isView ? '鍏抽棴' : '鍙栨秷' }}</el-button>
<el-button v-if="operationType !== 'view'" :loading="loading" type="primary" @click="submit">鎻愪氦</el-button>
</template>
</el-dialog>
- <ViewDeviceDialog v-if="deviceVisible" ref="device" @closDeviceDia="deviceVisible = false"
+ <ViewDeviceDialog v-if="deviceVisible" ref="device" :read-only="isView" @closDeviceDia="deviceVisible = false"
@handleDeviceInfo="setDevices"/>
- <ViewTestRecord v-if="recordVisible" ref="record"/>
+ <ViewTestRecord v-if="recordVisible" ref="record" :read-only="isView"/>
<ViewWorkPermitDia v-if="permitVisible" ref="permit"/>
<CalibrationsFileDia v-if="calibrationVisible" ref="calibration"/>
</div>
@@ -157,6 +157,9 @@
components: {ViewDeviceDialog, ViewTestRecord, ViewWorkPermitDia, CalibrationsFileDia},
props: {operationType: {type: String, default: 'add'}},
computed: {
+ isView() {
+ return this.operationType === 'view'
+ },
dialogTitle() {
if (this.operationType === 'view') return '鏌ョ湅鏂规硶楠岃瘉'
return this.operationType === 'edit' ? '缂栬緫鏂规硶楠岃瘉' : '鏂板鏂规硶楠岃瘉'
@@ -198,6 +201,7 @@
})
},
submit() {
+ if (this.isView) return
if (!this.form.standardName?.trim() || !this.form.standardCode?.trim() || !this.form.verifyItem?.trim()) {
this.$message.warning('璇峰~鍐欐爣鍑嗗悕绉般�佹爣鍑嗙紪鍙峰拰楠岃瘉椤圭洰')
return
@@ -239,6 +243,7 @@
this.openChild('recordVisible', 'record', this.info)
},
setDevices(list) {
+ if (this.isView) return
this.deviceVisible = false;
this.form.machineAttachmentList = list
},
diff --git a/src/views/CNAS/process/method/methodVerification/index.vue b/src/views/CNAS/process/method/methodVerification/index.vue
index c26f254..f4d3196 100644
--- a/src/views/CNAS/process/method/methodVerification/index.vue
+++ b/src/views/CNAS/process/method/methodVerification/index.vue
@@ -177,7 +177,7 @@
exportMethodVerify({ methodVerifyId: row.methodVerifyId }).then(res => {
this.outLoading = false
const blob = new Blob([res], { type: 'application/msword' });
- this.$download.saveAs(blob, '鏍囧噯锛堟柟娉曪級纭璁板綍.docx')
+ this.$download.saveAs(blob, '鏂规硶楠岃瘉璁板綍.docx')
})
},
// 鍏抽棴寮规
diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index 9a80a57..bc31b8c 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -121,9 +121,6 @@
</el-radio-group>
</div>
<div style="display: flex; align-items: center">
- <el-button v-if="state == 1" size="small" type="primary" @click="openAddUnpass">鏂板涓嶅悎鏍煎娴�</el-button>
- <el-button v-if="state == 1" size="small" type="primary" @click="unpassCheck">涓嶅悎鏍煎娴�</el-button>
- <el-button v-if="state > 1" size="small" type="primary" @click="viewUnpassCheck">鏌ョ湅涓嶅悎鏍煎娴�</el-button>
<span v-if="cableTagList.length > 0"> 鐢电紗閰嶇疆锛�</span>
<el-select v-if="cableTagList.length > 0" v-model="currentTab" clearable placeholder="璇烽�夋嫨" size="small"
@change="(m) => handleChangeCableTag(currentSample.id, 0, 'cableTag', m)
diff --git a/src/views/business/inspectionView/index.vue b/src/views/business/inspectionView/index.vue
index 8596a25..958bafa 100644
--- a/src/views/business/inspectionView/index.vue
+++ b/src/views/business/inspectionView/index.vue
@@ -83,7 +83,6 @@
<div style="display: flex; align-items: center">
<el-button v-if="state == 1" size="small" type="primary" @click="openAddUnpass">鏂板涓嶅悎鏍煎娴�</el-button>
<el-button v-if="state == 1" size="small" type="primary" @click="unpassCheck">涓嶅悎鏍煎娴�</el-button>
- <el-button v-if="state > 1" size="small" type="primary" @click="viewUnpassCheck">鏌ョ湅涓嶅悎鏍煎娴�</el-button>
<span v-if="cableTagList.length > 0"> 鐢电紗閰嶇疆锛�</span>
<el-select v-if="cableTagList.length > 0" v-model="currentTab" clearable placeholder="璇烽�夋嫨" size="small"
@change="(m) => handleChangeCableTag(currentSample.id, 0, 'cableTag', m)
diff --git a/src/views/structural/premises/index.vue b/src/views/structural/premises/index.vue
index f261b0b..f4f8e6e 100644
--- a/src/views/structural/premises/index.vue
+++ b/src/views/structural/premises/index.vue
@@ -53,33 +53,6 @@
<el-button type="primary" @click="customAdd" :loading="loading">纭� 瀹�</el-button>
</span></template>
</el-dialog>
- <el-dialog title="鍗扮珷绠$悊" v-model="fileVisible" width="60vw">
- <div class="btns">
- <el-button size="default" type="primary" @click="openUpload">鏇存柊鍗扮珷</el-button>
- </div>
- <lims-table :tableData="fileComponentData" :column="fileComponentDataColumn" @pagination="fileComponentPagination"
- height="500px" :page="fileComponentPage" :tableLoading="fileComponentTableLoading"></lims-table>
- </el-dialog>
- <el-dialog title="鏇存柊鍗扮珷" v-model="upFileVisible" width="400px">
- <el-form ref="dataForm" :model="dataForm" :rules="dataFormRules" label-position="right" label-width="80px">
- <el-form-item label="鍗扮珷绫诲瀷" prop="type">
- <el-cascader v-model="dataForm.type" :options="options" :show-all-levels="false" :props="props"
- placeholder="璇烽�夋嫨" size="small" style="width:100%" collapse-tags clearable></el-cascader>
- </el-form-item>
- <el-form-item label="鍗扮珷鍥剧墖" prop="address">
- <el-upload class="avatar-uploader" :action="action" :headers="uploadHeader"
- accept='image/jpg,image/jpeg,image/png' :show-file-list="false" :on-success="handleSuccess"
- :on-change="beforeUpload" ref="upload" :on-error="onError">
- <img v-if="dataForm.address" :src="javaApi + '/img/' + dataForm.address" class="avatar">
- <lims-icon v-else class="avatar-uploader-icon" name="el-icon-plus"></lims-icon>
- </el-upload>
- </el-form-item>
- </el-form>
- <template #footer><span class="dialog-footer">
- <el-button @click="upFileVisible = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="confirmConnect" :loading="loading">纭� 瀹�</el-button>
- </span></template>
- </el-dialog>
</div>
</template>
@@ -87,22 +60,14 @@
import limsTable from "@/components/Table/lims-table.vue";
import {
addParameter,
- addSeal,
delParameter,
selectItemParameter,
- selectSeal,
upParameter
} from "@/api/structural/laboratoryScope";
-import { getCertificationDetail } from "@/api/structural/laboratory";
export default {
components: {
limsTable
- },
- computed: {
- action() {
- return this.javaApi + '/deviceScope/uploadFile'
- }
},
data() {
return {
@@ -139,13 +104,6 @@
this.delete(row);
},
},
- {
- name: '鍗扮珷绠$悊',
- type: 'text',
- clickFun: (row) => {
- this.fileManagement(row);
- },
- },
]
}
],
@@ -166,49 +124,7 @@
head: [{ required: true, message: '璇疯緭鍏ヨ礋璐d汉', trigger: 'blur' }],
phoneNumber: [{ required: true, message: '璇疯緭鍏ヨ礋璐d汉鐢佃瘽', trigger: 'blur' }],
},
- currentRow: {},
- fileComponentTableLoading: false,
- fileComponentData: [],
- fileComponentDataColumn: [
- { label: '琛屼笟鍚嶇О', prop: 'laboratoryName' },
- { label: '鍗扮珷鍥剧墖', prop: 'address', dataType: 'image' },
- { label: '鍗扮珷绫诲瀷', prop: 'type' },
- ],
- fileComponentPage: {
- total: 0,
- size: 10,
- current: 1,
- layout: 'total, prev, pager, next'
- },
- fileVisible: false,
- upFileVisible: false,
loading: false,
- dataForm: {
- type: '',
- address: '',
- },
- dataFormRules: {
- type: [{ required: true, message: '璇烽�夋嫨鍗扮珷绫诲瀷', trigger: 'change' }],
- address: [{ required: false, message: '璇蜂笂浼犲浘鐗�', trigger: 'change' }],
- },
- props: { multiple: false, emitPath: false, },
- options: [
- {
- value: '琛屼笟璧勮川',
- label: '琛屼笟璧勮川',
- children: []
- },
- {
- value: '濮旀墭鎶ュ憡',
- label: '濮旀墭鎶ュ憡',
- children: null
- },
- {
- value: '杩涘巶鎶ュ憡',
- label: '杩涘巶鎶ュ憡',
- children: null
- },
- ],
}
},
mounted() {
@@ -291,80 +207,6 @@
})
}).catch(() => { })
},
- // 鎵撳紑鍗扮珷绠$悊寮规
- fileManagement(row) {
- this.fileVisible = true;
- this.fileComponentTableLoading = true
- this.currentRow = row
- this.getFileComponentList()
- },
- getFileComponentList() {
- selectSeal({ id: this.currentRow.id, ...this.fileComponentPage }).then(res => {
- this.fileComponentTableLoading = false
- if (res.code === 200) {
- this.fileComponentData = res.data.records
- this.fileComponentPage.total = res.data.total
- }
- }).catch(err => {
- this.fileComponentTableLoading = false
- })
- },
- fileComponentPagination(page) {
- this.fileComponentPage.size = page.limit
- this.getFileComponentList()
- },
- // 鎵撳紑鏇存柊鍗扮珷寮规
- openUpload() {
- this.dataForm.type = '';
- this.dataForm.address = '';
- this.upFileVisible = true;
- this.getCertificationOperation()
- },
- // 鏌ヨ鍗扮珷绫诲瀷
- getCertificationOperation() {
- const params = {
- current: -1,
- size: -1,
- }
- getCertificationDetail(params).then(res => {
- this.options[0].children = res.data.records.map(m => {
- m.value = m.name;
- m.label = m.name;
- return m
- });
- })
- },
- // 鎻愪氦鏇存柊鍗扮珷
- confirmConnect() {
- this.$refs['dataForm'].validate((valid) => {
- if (valid) {
- this.loading = true;
- addSeal({ labId: this.currentRow.id, ...this.dataForm }).then(res => {
- this.loading = false;
- this.getFileComponentList()
- this.upFileVisible = false;
- })
- }
- })
- },
- handleSuccess(response,) {
- if (response.code === 200) {
- this.dataForm.address = response.data.url
- }
- },
- beforeUpload(file, type) {
- if (file.size > 1024 * 1024 * 10) {
- this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
- this.$refs.upload.clearFiles()
- return false;
- } else {
- return true;
- }
- },
- onError(err, file, fileList, type) {
- this.$message.error('涓婁紶澶辫触')
- this.$refs.upload.clearFiles()
- },
}
}
</script>
@@ -375,39 +217,7 @@
justify-content: space-between;
}
-.btns {
- text-align: right;
- margin-bottom: 10px;
-}
-
:deep(.el-dialog__body) {
padding-top: 8px !important;
-}
-
-.avatar-uploader :deep(.el-upload) {
- border: 1px dashed var(--lims-text-2);
- border-radius: 6px;
- cursor: pointer;
- position: relative;
- overflow: hidden;
-}
-
-.avatar-uploader :deep(.el-upload:hover) {
- border-color: var(--el-color-primary);
-}
-
-.avatar-uploader-icon {
- font-size: 20px;
- color: #8c939d;
- width: 90px;
- height: 90px;
- line-height: 90px;
- text-align: center;
-}
-
-.avatar {
- width: 90px;
- height: 90px;
- display: block;
}
</style>
--
Gitblit v1.9.3