Crunchy
2025-03-17 0a26d58a3906b9e13946c7cb46fae51a0de98920
src/views/CNAS/process/method/standardNoveltyRetrieval/index.vue
@@ -3,8 +3,11 @@
    <div class="search">
      <div>
        <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
          <el-form-item label="标准号" prop="standardNo">
          <el-form-item label="标准号" prop="standardNo" v-if="tabIndex === '0'">
            <el-input size="small" placeholder="请输入" clearable v-model="searchForm.standardNo"></el-input>
          </el-form-item>
          <el-form-item label="存档名称" prop="archivedName" v-if="tabIndex === '1'">
            <el-input size="small" placeholder="请输入" clearable v-model="searchForm.archivedName"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">查 询</el-button>
@@ -26,28 +29,20 @@
    <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">历史档案</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>
      <!--      历史档案批准弹框-->
@@ -74,14 +69,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>
@@ -89,21 +80,18 @@
<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 {
  addSearchNewArchived, exportMethodSearchNew,
  pageMethodSearchNew, pageSearchNewArchived, pageSearchNewBackups, ratifySearchNewArchivedr
} from '@/api/cnas/process/method/standardNoveltyRetrieval'
import {selectUserCondition} from "@/api/performance/class";
export default {
  name: 'a7-standard-novelty-retrieval',
  name: 'StandardNoveltyRetrieval',
  // import 引入的组件需要注入到对象中才能使用
  components: {
    FormDialog,
    TableCard,
    limsTable,
    EditFormDia
  },
@@ -113,6 +101,7 @@
      searchForm: {
        year: '',
        standardNo: '',
        archivedName: ''
      },
      options: [
        { label: '上半年', value: '1' },
@@ -485,23 +474,9 @@
  methods: {
    // 查询列表
    searchList() {
      let params = {}
      if (this.tabIndex === '0') {
        params = {
          entity: {
            standardNo: this.searchForm.standardNo,
          },
          page: this.page
        }
      } else {
        params = {
          entity: {},
          page: this.oldPage
        }
      }
      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) {
            this.tableData = res.data.records
@@ -513,12 +488,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)
            this.oldTableData = res.data.records
            this.oldPage.total = res.data.total
          }