From b64d6db597d332c699f84e4928f6d3e5551851f1 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期二, 04 三月 2025 16:43:16 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- src/views/CNAS/process/method/methodVerification/index.vue | 198 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 198 insertions(+), 0 deletions(-) diff --git a/src/views/CNAS/process/method/methodVerification/index.vue b/src/views/CNAS/process/method/methodVerification/index.vue new file mode 100644 index 0000000..48b43b0 --- /dev/null +++ b/src/views/CNAS/process/method/methodVerification/index.vue @@ -0,0 +1,198 @@ +<template> + <div class="capacity-scope"> + <div class="search"> + <div> + <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> + <el-form-item label="鏍囧噯鏂规硶" prop="methodName"> + <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.methodName"></el-input> + </el-form-item> + <el-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">鏌� 璇�</el-button> + <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">閲� 缃�</el-button> + </el-form-item> + </el-form> + </div> + <div> + <el-button size="medium" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button> + </div> + </div> + <div class="table"> + <div> + <TableCard :showForm="false" :showTitle="false"> + <template v-slot:table> + <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData" + :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" :page="page" + @pagination="pagination"> + </limsTable> + </template> + </TableCard> + </div> + </div> + <formDIa v-if="formDIa" ref="formDIa" :operationType="operationType" @closeDia="closeDia"></formDIa> + </div> +</template> + +<script> +import limsTable from '@/components/Table/lims-table.vue' +import TableCard from '@/views/CNAS/externalService/serviceAndSupplyPro/component/index.vue'; +import formDIa from './component/formDIa.vue'; +import { delMethodVerify, exportMethodVerify, pagesMethodVerify } from '@/api/cnas/process/method/methodVerification' + +export default { + name: 'a7-method-verification', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: { TableCard, limsTable, formDIa }, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + searchForm: { + methodName: '', + operationType: 1, + }, + options: [ + { label: '涓婂崐骞�', value: '1' }, + { label: '涓嬪崐骞�', value: '2' }, + ], + tableColumn: [ + { + label: '鏍囧噯鏂规硶', + prop: 'methodName', + minWidth: '100' + }, + { + label: '楠岃瘉鍘熷洜', + prop: 'verifyReason', + minWidth: '100' + }, + { + label: '涓昏鎶�鏈彉鍖�', + prop: 'technologyChange', + minWidth: '100' + }, + { + dataType: 'action', + minWidth: '60', + label: '鎿嶄綔', + operation: [ + { + name: '缂栬緫', + type: 'text', + clickFun: (row) => { + this.openFormDia('edit', row); + }, + }, + { + name: '瀵煎嚭', + type: 'text', + clickFun: (row) => { + this.downLoadPost(row); + }, + }, + { + name: '鍒犻櫎', + type: 'text', + color: '#f56c6c', + 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 = { + methodName: this.searchForm.methodName, + 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.methodName = ''; + 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 => { + this.outLoading = false + 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> -- Gitblit v1.9.3