From 4cd66de5c36ab7c72272abe1406995679c643f14 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 15 八月 2025 11:40:09 +0800
Subject: [PATCH] 1.零件绑定分页修改
---
src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue | 194 ++++++++++++++++--------------------------------
1 files changed, 66 insertions(+), 128 deletions(-)
diff --git a/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue b/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue
index 5822548..955f69f 100644
--- a/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue
+++ b/src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue
@@ -1,63 +1,50 @@
<template>
<div class="capacity-scope">
- <div class="search">
- <div>
- <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
- <el-form-item label="鏍囧噯鍙�" prop="standardNo">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.standardNo"></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 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;" v-if="tabIndex === '0'">
+ <span style="width: 68px;font-size: 14px;font-weight: 700;color: #606266;">鏍囧噯鍙�</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.standardNo"
+ @keyup.enter.native="searchList"></el-input>
+ </div>
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;" v-if="tabIndex === '1'">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">瀛樻。鍚嶇О</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="searchForm.archivedName"
+ @keyup.enter.native="searchList"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="searchList">鏌ヨ</el-button>
+ <el-button size="mini" @click="resetSearchForm">閲嶇疆</el-button>
+ </div>
</div>
- <div>
- <el-button size="medium" type="primary" @click="openApprovalDialog1">寤� 妗�</el-button>
- <el-upload ref='upload' :action="action"
- :before-upload="beforeUpload" :headers="headers" :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="medium" type="primary">瀵煎叆</el-button>
+ <div style="line-height: 30px;">
+ <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="medium" style="margin-left: 10px;" type="primary" @click="openFormDia">鏂� 澧�</el-button>
+ <el-button size="small" style="margin-left: 10px;" type="primary" @click="openFormDia">鏂� 澧�</el-button>
</div>
</div>
<div>
<div class="table">
<div class="table-tab">
- <el-radio-group v-model="tabIndex" @input="searchList">
+ <el-radio-group v-model="tabIndex" @change="searchList">
<el-radio-button label="0">浠婂勾鏍囧噯璁板綍</el-radio-button>
<el-radio-button label="1">鍘嗗彶妗f</el-radio-button>
</el-radio-group>
</div>
<div v-if="tabIndex === '0'">
- <TableCard :showForm="false" :showTitle="false">
- <template v-slot:table>
- <lims-table
- :column="tableColumn"
- :height="'calc(100vh - 26em)'"
- :table-data="tableData"
- :table-loading="tableLoading"
- :page="page"
- @pagination="pagination">
- </lims-table>
- </template>
- </TableCard>
+ <lims-table :column="tableColumn" :height="'calc(100vh - 26em)'" :table-data="tableData"
+ :table-loading="tableLoading" :page="page" @pagination="pagination">
+ </lims-table>
</div>
<div v-if="tabIndex === '1'">
- <TableCard :showForm="false" :showTitle="false">
- <template v-slot:table>
- <lims-table
- :column="oldTableColumn"
- :height="'calc(100vh - 20em)'"
- :table-data="oldTableData"
- :table-loading="oldTableLoading"
- :page="oldPage"
- @pagination="oldPagination">
- </lims-table>
- </template>
- </TableCard>
+ <lims-table :column="oldTableColumn" :height="'calc(100vh - 20em)'" :table-data="oldTableData"
+ :table-loading="oldTableLoading" :page="oldPage" @pagination="oldPagination">
+ </lims-table>
</div>
</div>
<!-- 鍘嗗彶妗f鎵瑰噯寮规-->
@@ -84,19 +71,10 @@
<FormDialog v-if="formDialog" ref="formDialog" @closeDia="closeDia"></FormDialog>
<EditFormDia v-if="editFormDialog" ref="editFormDialog" @closeEditDia="closeEditDia"></EditFormDia>
<el-dialog :visible.sync="viewRocordDia" title="璇︽儏" width="80%" @close="approvalDialog = false">
- <TableCard :showForm="false" :showTitle="false">
- <template v-slot:table>
- <limsTable
- :column="tableColumn1"
- :height="'calc(100vh - 26em)'"
- :table-data="tableData1"
- :table-loading="tableLoading1"
- style="padding: 0 15px;margin-bottom: 16px"
- :page="page1"
- @pagination="pagination1">
- </limsTable>
- </template>
- </TableCard>
+ <limsTable :column="tableColumn1" :height="'calc(100vh - 26em)'" :table-data="tableData1"
+ :table-loading="tableLoading1" style="padding: 0 15px;margin-bottom: 16px" :page="page1"
+ @pagination="pagination1">
+ </limsTable>
</el-dialog>
</div>
</div>
@@ -104,7 +82,6 @@
<script>
import limsTable from '@/components/Table/lims-table.vue'
-import TableCard from '@/views/CNAS/externalService/serviceAndSupplyPro/component/index.vue';
import FormDialog from './component/FormDialog.vue';
import EditFormDia from './component/EditFormDia.vue';
import {
@@ -113,11 +90,10 @@
} from '@/api/cnas/process/method/standardNoveltyRetrieval'
export default {
- name: 'a7-standard-novelty-retrieval',
+ name: 'StandardNoveltyRetrieval',
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {
FormDialog,
- TableCard,
limsTable,
EditFormDia
},
@@ -127,10 +103,11 @@
searchForm: {
year: '',
standardNo: '',
+ archivedName: ''
},
options: [
- {label: '涓婂崐骞�', value: '1'},
- {label: '涓嬪崐骞�', value: '2'},
+ { label: '涓婂崐骞�', value: '1' },
+ { label: '涓嬪崐骞�', value: '2' },
],
tableColumn: [
{
@@ -475,15 +452,14 @@
tabIndex: '0',
formDialog: false,
editFormDialog: false,
- upLoading:false,
- outLoading:false,
+ upLoading: false,
+ outLoading: false,
ratifyInfo: {
writeUserId: '',
ratifyUserId: '',
writeDate: '',
ratifyDate: '',
},
- userList: [],
approvalDialog: false,
approvalDialog1: false,
viewRocordDia: false,
@@ -499,26 +475,12 @@
// 鏂规硶闆嗗悎
methods: {
// 鏌ヨ鍒楄〃
- searchList () {
- let params = {}
- if (this.tabIndex === '0') {
- params = {
- entity: {
- standardNo: this.searchForm.standardNo,
- },
- page: this.page
- }
- } else {
- params = {
- entity: {},
- page: this.oldPage
- }
- }
+ searchList() {
if (this.tabIndex === '0') {
this.tableLoading = true
- pageMethodSearchNew({...params.oldPage,...params.entity}).then(res => {
+ pageMethodSearchNew({ standardNo: this.searchForm.standardNo, ...this.page }).then(res => {
this.tableLoading = false
- if (res.code === 200){
+ if (res.code === 200) {
this.tableData = res.data.records
this.page.total = res.data.total
}
@@ -528,12 +490,9 @@
})
} else {
this.oldTableLoading = true
- pageSearchNewArchived({
- ...params.page,...params.entity
- }).then(res => {
+ pageSearchNewArchived({archivedName: this.searchForm.archivedName, ...this.oldPage}).then(res => {
this.oldTableLoading = false
- if (res.code === 200){
- console.log('res>>>>>>>>>>>>',res)
+ if (res.code === 200) {
this.oldTableData = res.data.records
this.oldPage.total = res.data.total
}
@@ -545,19 +504,19 @@
}
},
// 鎵撳紑鍘嗗彶妗f璇︽儏寮规
- openViewDia (row) {
+ openViewDia(row) {
this.archivedId = row.archivedId
this.viewRocordDia = true
this.pageSearchNewBackups()
},
- pageSearchNewBackups () {
+ pageSearchNewBackups() {
const entity = {
archivedId: this.archivedId,
}
this.tableLoading1 = true
- pageSearchNewBackups({...this.page1,...entity}).then(res => {
+ pageSearchNewBackups({ ...this.page1, ...entity }).then(res => {
this.tableLoading1 = false
- if (res.code === 200){
+ if (res.code === 200) {
this.tableData1 = res.data.records
this.page1.total = res.data.total
}
@@ -568,17 +527,17 @@
})
},
// 鎵撳紑鎵瑰噯寮规
- openApprovalDialog (row) {
+ openApprovalDialog(row) {
this.approvalDialog = true
this.archivedId = row.archivedId
},
// 鎵撳紑鎵瑰噯寮规
- openApprovalDialog1 (row) {
+ openApprovalDialog1(row) {
this.approvalDialog1 = true
this.archivedId = row.archivedId
},
// 鎻愪氦鎵瑰噯
- handleApproval (status) {
+ handleApproval(status) {
this.approvalLoading = true
let internalReport = {
archivedId: this.archivedId,
@@ -597,7 +556,7 @@
})
},
// 鎻愪氦鎵瑰噯
- handleApproval1 (status) {
+ handleApproval1(status) {
this.approvalLoading = true
let internalReport = {
archivedName: this.archivedName,
@@ -614,41 +573,40 @@
})
},
// 閲嶇疆鏌ヨ鏉′欢
- resetSearchForm () {
+ resetSearchForm() {
this.searchForm.standardNo = '';
this.searchList()
},
// 鎿嶄綔鏂板妗�
- openFormDia (row) {
+ openFormDia(row) {
this.formDialog = true
this.$nextTick(() => {
this.$refs.formDialog.openDia(row)
})
},
// 鍏抽棴鏂板寮规
- closeDia () {
+ closeDia() {
this.formDialog = false
this.searchList()
},
// 鎵撳紑淇敼寮规
- openEditFormDia (row) {
+ openEditFormDia(row) {
this.editFormDialog = true
this.$nextTick(() => {
this.$refs.editFormDialog.openDia(row)
})
},
//
- closeEditDia () {
+ closeEditDia() {
this.editFormDialog = false
this.searchList()
},
// 瀵煎嚭
- handleOut (row) {
+ handleOut(row) {
this.outLoading = true
- exportMethodSearchNew({archivedId:row.archivedId}).then(res => {
- const blob = new Blob([res],{ type: 'application/octet-stream' });
+ exportMethodSearchNew({ archivedId: row.archivedId }).then(res => {
+ const blob = new Blob([res], { type: 'application/octet-stream' });
this.$download.saveAs(blob, '鏍囧噯鏌ユ柊瀵煎嚭.xlsx')
- this.$message.success('瀵煎嚭鎴愬姛')
})
},
// 瀵煎叆
@@ -674,42 +632,21 @@
}
},
// 鍒嗛〉
- pagination(page){
+ pagination(page) {
this.page.size = page.limit
this.searchList();
},
- pagination1(page){
+ pagination1(page) {
this.page1.size = page.limit
this.pageSearchNewBackups();
},
- oldPagination(page){
+ oldPagination(page) {
this.oldPage.size = page.limit
this.searchList();
- },
- //
- getUserList(){
- this.$axios.post(this.$api.user.selectUserList, {
- page: {current: -1, size: -1,},
- entity: {name: null}
- }, {
- headers: {
- 'Content-Type': 'application/json'
- }
- }).then(res => {
- if (res.code === 201) {
- return
- }
- this.userList = res.data.body.records
- })
},
},
// 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
computed: {
- headers() {
- return {
- 'token': sessionStorage.getItem('token')
- }
- },
action() {
return this.javaApi + '/processMethodSearchNew/importMethodSearchNew'
}
@@ -723,6 +660,7 @@
display: flex;
justify-content: space-between;
}
+
.table-tab {
margin-bottom: 10px;
}
--
Gitblit v1.9.3