gaoluyang
2025-02-17 0bf196996db772956926856f9ad02d1b6d5de90a
1.实验室资质联调
2.分页查询修改
已修改4个文件
67 ■■■■ 文件已修改
src/api/structural/laboratory.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/structural/capabilityAndLaboratory/capability/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/structural/capabilityAndLaboratory/laboratory/index.vue 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/structural/laboratory.js
@@ -13,7 +13,7 @@
  return request({
    url: '/certification/addCertificationDetail',
    method: 'post',
    params: query
    data: query
  })
}
// 删除资质明细列表
src/main.js
@@ -51,6 +51,7 @@
Vue.prototype.HaveJson = (val) => {
  return JSON.parse(JSON.stringify(val))
}
Vue.prototype.javaApi = process.env.VUE_APP_BASE_API
// 全局组件挂载
Vue.component('DictTag', DictTag)
src/views/structural/capabilityAndLaboratory/capability/index.vue
@@ -46,11 +46,13 @@
<!--      检验项目参数表格-->
      <div class="table" v-if="radio===0">
        <lims-table :tableData="tableData" :column="column"
                    @pagination="pagination"
                    :page="page" :tableLoading="tableLoading"></lims-table>
      </div>
<!--      检验对象表格-->
      <div class="table" v-if="radio===1">
        <lims-table :tableData="testObjectTableData" :column="testObjectColumn"
                    @pagination="pagination"
                    :page="testObjectPage" :tableLoading="tableLoading"></lims-table>
      </div>
    </div>
@@ -461,6 +463,10 @@
      this.resetForm('itemParameterForm')
      this.refreshTable()
    },
    pagination (page) {
      this.page.size = page.pageNum.limit
      this.refreshTable()
    },
    // 检验项目参数新增
    openAdd() {
      if (this.radio === 0) {
src/views/structural/capabilityAndLaboratory/laboratory/index.vue
@@ -32,13 +32,14 @@
    <div v-if="radio===0">
      <lims-table :tableData="tableData" :column="column"
                  :isSelection="true" :handleSelectionChange="handleSelectionChange"
                  @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
    <div class="table" v-if="radio===1" v-loading="pageLoading" @scroll="scrollFn">
      <el-row :gutter="16">
        <el-col :span="6" v-for="(m,i) in list" :key="i" :xs="24" :sm="12" :md="8" :lg="6" :xl="6" style="margin-bottom: 16px;">
        <el-col :span="8" v-for="(m,i) in list" :key="i" :xs="24" :sm="12" :md="8" :lg="8" :xl="6" style="margin-bottom: 16px;">
          <div class="table-item">
            <el-image style="width: 102px;height: 102px;margin-right: 20px;border-radius: 16px;" :src="process.env.VUE_APP_BASE_API+'/img/'+m.imageUrl">
            <el-image style="width: 102px;height: 102px;margin-right: 20px;border-radius: 16px;" :src="javaApi +'/img/'+m.imageUrl">
              <div slot="error" class="image-error" style="width: 100px;
                height: 100px;
                border-radius: 16px;
@@ -184,7 +185,7 @@
      page: {
        total:0,
        size:10,
        current:0
        current:1
      },
      tableLoading: false,
      qualificationsList:[],
@@ -214,19 +215,19 @@
  },
  methods: {
    selectorSwitch(radio) {
      if(radio === '1'){
      if(radio === 1){
        this.list = [];
        this.refreshTable();
      }
    },
    refreshTable() {
      if (this.radio === '0') {
      if (this.radio === 0) {
        this.tableLoading = true;
        getCertificationDetail({...this.page,...this.queryParams,}).then(res => {
        getCertificationDetail({...this.page,...this.queryParams}).then(res => {
          this.tableLoading = false
          if (res.code === 200) {
            this.tableData = res.data
            this.page.total = res.total
            this.tableData = res.data.records
            this.page.total = res.data.total
          }
        }).catch(err => {
          this.tableLoading = false
@@ -241,15 +242,13 @@
          window.addEventListener("scroll", this.throttle(this.scrollFn, 20000));
        }
        getCertificationDetail({
          page: {
            current: this.currentPage,
            size: this.pageSize
          },
          entity: this.queryParams
          current: this.currentPage,
          size: this.pageSize,
          ...this.queryParams
        }).then(res => {
          if(res.code===200){
            this.total = res.data.body.total
            let list = res.data.body.records;
            this.total = res.data.total
            let list = res.data.records;
            if(list.length===0){
              this.finishLoding = true;
            }else{
@@ -272,14 +271,25 @@
    },
    // 重置
    refresh() {
      this.queryParams.name = ''
      this.page.size = 10
      this.page.current = 1
      this.refreshTable()
      if(this.radio === 0){
        this.queryParams.name = ''
        this.page.size = 10
        this.page.current = 1
        this.refreshTable()
      } else {
        this.finishLoding = false;
        this.currentPage= 1;
        this.list=[];
        this.refreshTable()
      }
    },
    // 表格多选
    handleSelectionChange (selection) {
      this.selection = selection;
    },
    pagination (page) {
      this.page.size = page.pageNum.limit
      this.refreshTable()
    },
    // 资质明细批量删除
    handleDel(){
@@ -406,4 +416,14 @@
  line-height: 40px;
  margin-bottom: 10px;
}
.table-item{
  border-radius: 8px 8px 8px 8px;
  box-shadow: 4px 4px 8px 0px rgba(51,51,51,0.04);
  border: 1px solid #EEEEEE;
  box-sizing: border-box;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
</style>