From 49cdc0884a9a4381cd968cffff65e2a332bc675a Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期六, 24 十月 2026 21:05:29 +0800
Subject: [PATCH] feat(cnas-search): 1.标准查新模块 2.印章使用记录
---
src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue | 205 +++++++++++++++++++++++---------------------------
1 files changed, 95 insertions(+), 110 deletions(-)
diff --git a/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue b/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue
index 8ea5d96..03a091b 100644
--- a/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue
+++ b/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue
@@ -13,6 +13,7 @@
</div>
</div>
<div style="line-height: 30px;">
+ <el-button size="small" @click="openAllHistory">鏌ユ柊璁板綍</el-button>
<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>
@@ -26,6 +27,36 @@
</div>
<FormDialog v-if="formDialog" ref="formDialog" @closeDia="closeDia"></FormDialog>
<EditFormDia v-if="editFormDialog" ref="editFormDialog" @closeEditDia="closeEditDia"></EditFormDia>
+ <el-dialog v-model="historyDialog" :title="`${historyStandard} 路 鏌ユ柊璁板綍`" width="960px">
+ <div v-if="historyScopeId === null" style="display: flex; gap: 8px; margin-bottom: 12px;">
+ <el-input v-model="historySearchNo" clearable placeholder="鎸夋爣鍑嗗彿鏌ヨ" style="width: 260px"
+ @keyup.enter="searchAllHistory" />
+ <el-button type="primary" @click="searchAllHistory">鏌ヨ</el-button>
+ </div>
+ <el-table v-loading="historyLoading" :data="historyRecords" border>
+ <el-table-column prop="methodName" label="鏍囧噯鍚嶇О" min-width="160" />
+ <el-table-column prop="standardNo" label="鏍囧噯鍙�" min-width="135" />
+ <el-table-column prop="fileNo" label="鏂囦欢缂栧彿" min-width="120" />
+ <el-table-column prop="searchNewDate" label="鏌ユ柊鏃ユ湡" width="115" />
+ <el-table-column prop="nextSearchDate" label="涓嬫鏌ユ柊鏃ユ湡" width="125" />
+ <el-table-column prop="searchNewResult" label="鏌ユ柊缁撴灉" width="190" />
+ <el-table-column label="鏌ユ柊鏉ユ簮" min-width="210">
+ <template #default="scope">
+ {{ displaySearchSource(scope.row.searchNewSource) }}
+ <span v-if="scope.row.searchNewWebsite">锛坽{ scope.row.searchNewWebsite }}锛�</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="searchNewUserName" label="鏌ユ柊浜�" width="110" />
+ <el-table-column prop="newMethodName" label="鏂扮増鏍囧噯鍚嶇О" min-width="150" />
+ <el-table-column prop="newStandardNo" label="鏂扮増鏍囧噯鍙�" min-width="135" />
+ <el-table-column prop="createTime" label="鎻愪氦鏃堕棿" width="165" />
+ </el-table>
+ <el-empty v-if="!historyLoading && historyRecords.length === 0" description="鏆傛棤鏌ユ柊璁板綍" />
+ <el-pagination v-if="historyScopeId === null" v-model:current-page="historyPage.current"
+ v-model:page-size="historyPage.size" :total="historyPage.total"
+ layout="total, prev, pager, next" style="margin-top: 12px; justify-content: flex-end;"
+ @current-change="loadHistory" />
+ </el-dialog>
<import-dialog
ref="importDialog"
title="瀵煎叆鏍囧噯鏌ユ柊"
@@ -35,9 +66,9 @@
template-name="鏍囧噯鏌ユ柊瀵煎叆妯℃澘.xlsx"
:tips="[
'琛ㄥご涓轰袱琛岋紝璇蜂粠绗� 3 琛屽紑濮嬪~鍐欐暟鎹�',
- '鏍囧噯鍚嶇О銆佹爣鍑嗗彿璇峰~鍐欑幇琛屾爣鍑嗙殑鍚嶇О鍜岀紪鍙�',
- '鏌ユ柊鏉ユ簮鎸夆�滄爣鍑嗙綉 鈫� 濮旀墭鎯呮姤鎵� 鈫� 鏍囧噯涔﹀簵 鈫� 鍏朵粬鈥濈殑椤哄簭鍙栫涓�涓潪绌洪」',
- '澶囨敞鍒楀彧鑳藉~鍐欌�滄浛鎹⑩�濇垨鈥滀綔搴熲�濓紝鐣欑┖琛ㄧず鏃犲娉�'
+ '鏍囧噯鍚嶇О銆佹爣鍑嗗彿璇峰~鍐欐湰娆℃煡鏂扮殑鏍囧噯淇℃伅',
+ '鏌ユ柊鏃ユ湡鏍煎紡涓� YYYY-MM-DD锛屾煡鏂扮粨鏋滃~鍐欑幇琛屾湁鏁堛�佸凡淇/鏈夋柊鐗堟湰鏇夸唬銆佸簾姝紙鏃犳浛浠o級鎴栧嵆灏嗗疄鏂�',
+ '鍏釜鏌ユ柊鏉ユ簮鍒椾腑鍙兘濉啓涓�涓紝濉啓鈥溾垰鈥濊〃绀洪�変腑'
]"
@success="searchList"
/>
@@ -50,8 +81,10 @@
import ImportDialog from '@/components/ImportDialog/index.vue'
import FormDialog from './component/FormDialog.vue';
import EditFormDia from './component/EditFormDia.vue';
+import { displayDate, displaySearchSource } from './options'
import {
- delMethodSearchNew,
+ listSearchNewHistory,
+ pageSearchNewHistory,
pageMethodSearchNew
} from '@/api/cnas/process/method/standardNoveltyRetrieval'
@@ -67,6 +100,13 @@
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
+ historyDialog: false,
+ historyLoading: false,
+ historyRecords: [],
+ historyStandard: '',
+ historyScopeId: null,
+ historySearchNo: '',
+ historyPage: { current: 1, size: 10, total: 0 },
searchForm: {
standardNo: ''
},
@@ -87,48 +127,15 @@
minWidth: '100'
},
{
- dataType: 'tag',
- label: '鏄惁鏄柊鏍囧噯',
- prop: 'isNewStandard',
- minWidth: '100',
- formatData: (params) => {
- if (params == 0) {
- return '鍚�';
- } else if (params == 1) {
- return '鏄�';
- } else {
- return null
- }
- },
- formatType: (params) => {
- if (params == 0) {
- return 'danger';
- } else if (params == 1) {
- return 'success';
- } else {
- return null
- }
- }
- },
- {
- label: '鏂版爣鍑嗗悕绉�',
- prop: 'newMethodName',
- minWidth: '100'
- },
- {
- label: '鏂版爣鍑嗗彿',
- prop: 'newStandardNo',
- minWidth: '100'
- },
- {
- label: '鏌ユ柊鏃堕棿',
+ label: '鏈�杩戞煡鏂版棩鏈�',
prop: 'searchNewTime',
- minWidth: '150'
+ minWidth: '125',
+ formatData: displayDate
},
{
label: '鏌ユ柊缁撴灉',
prop: 'searchNewResult',
- minWidth: '140'
+ minWidth: '190'
},
{
label: '鏌ユ柊浜�',
@@ -136,65 +143,20 @@
minWidth: '100'
},
{
- dataType: 'tag',
label: '鏌ユ柊璁板綍鏉ユ簮',
prop: 'searchNewSource',
- minWidth: '100',
- formatData: (params) => {
- if (params == 0) {
- return '鏍囧噯缃�';
- } else if (params == 1) {
- return '濮旀墭鎯呮姤';
- } else if (params == 2) {
- return '鏍囧噯鏁�';
- } else if (params == 3) {
- return '鍏朵粬';
- } else {
- return null
- }
- },
- formatType: (params) => {
- if (params == 0) {
- return 'success';
- } else if (params == 1) {
- return 'danger';
- } else if (params == 2) {
- return 'warning';
- } else if (params == 3) {
- return 'info';
- } else {
- return null
- }
- }
+ minWidth: '180',
+ formatData: displaySearchSource
},
{
- label: '鏉ユ簮缃戝潃/缃戠珯鍚嶇О',
+ label: '鍏朵粬鏉ユ簮鍚嶇О',
prop: 'searchNewWebsite',
minWidth: '150'
},
+ { label: '涓嬫鏌ユ柊鏃ユ湡', prop: 'nextSearchDate', minWidth: '125', formatData: displayDate },
{
- dataType: 'tag',
- label: '澶囨敞',
- prop: 'remark',
- minWidth: '100',
- formatData: (params) => {
- if (params == 0) {
- return '浣滃簾';
- } else if (params == 1) {
- return '鏇挎崲';
- } else {
- return null
- }
- },
- formatType: (params) => {
- if (params == 0) {
- return 'danger';
- } else if (params == 1) {
- return 'success';
- } else {
- return null
- }
- }
+ dataType: 'tag', label: '鏌ユ柊鐘舵��', prop: 'searchDueStatus', minWidth: '100',
+ formatType: value => value === '宸查�炬湡' ? 'danger' : value === '浠婃棩鍒版湡' ? 'warning' : 'success'
},
{
dataType: 'action',
@@ -202,17 +164,17 @@
label: '鎿嶄綔',
operation: [
{
- name: '缂栬緫',
+ name: '鏌ユ柊',
type: 'text',
clickFun: (row) => {
this.openEditFormDia(row);
},
},
{
- name: '鍒犻櫎',
+ name: '鏈爣鍑嗚褰�',
type: 'text',
clickFun: (row) => {
- this.handleDelete(row);
+ this.openHistory(row);
},
},
]
@@ -234,6 +196,43 @@
},
// 鏂规硶闆嗗悎
methods: {
+ displaySearchSource,
+ openAllHistory() {
+ this.historyStandard = '鍏ㄩ儴鏍囧噯'
+ this.historyScopeId = null
+ this.historySearchNo = ''
+ this.historyPage.current = 1
+ this.historyRecords = []
+ this.historyDialog = true
+ this.loadHistory()
+ },
+ searchAllHistory() {
+ this.historyPage.current = 1
+ this.loadHistory()
+ },
+ openHistory(row) {
+ this.historyStandard = row.standardNo || row.methodName
+ this.historyScopeId = row.methodSearchNewId
+ this.historyRecords = []
+ this.historyDialog = true
+ this.loadHistory()
+ },
+ loadHistory() {
+ this.historyLoading = true
+ const request = this.historyScopeId === null
+ ? pageSearchNewHistory({ standardNo: this.historySearchNo,
+ current: this.historyPage.current, size: this.historyPage.size })
+ : listSearchNewHistory({ methodSearchNewId: this.historyScopeId })
+ request.then(res => {
+ if (res.code !== 200) return
+ if (this.historyScopeId === null) {
+ this.historyRecords = res.data?.records || []
+ this.historyPage.total = res.data?.total || 0
+ } else {
+ this.historyRecords = res.data || []
+ }
+ }).finally(() => { this.historyLoading = false })
+ },
// 鏌ヨ鍒楄〃
searchList() {
this.tableLoading = true
@@ -278,24 +277,10 @@
this.editFormDialog = false
this.searchList()
},
- // 鍒犻櫎鏍囧噯鏌ユ柊璁板綍
- handleDelete(row) {
- this.$confirm('鏄惁鍒犻櫎璇ユ潯鏌ユ柊璁板綍?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- delMethodSearchNew({ methodSearchNewId: row.methodSearchNewId }).then(res => {
- if (res.code !== 200) return
- this.$message.success('鍒犻櫎鎴愬姛')
- this.searchList()
- })
- }).catch(() => {
- })
- },
// 鍒嗛〉
pagination(page) {
this.page.size = page.limit
+ this.page.current = page.page
this.searchList();
},
},
--
Gitblit v1.9.3