zouyu
2023-08-30 ef1c0d5baa9d766dfe81a5fa972a6f83225536da
src/views/laboratory/measure/index.vue
@@ -7,6 +7,9 @@
            <el-input v-model="searchData.code" @blur="blurSearch()" class="input-form" placeholder="请输入">
            </el-input>
          </el-form-item>
          <el-form-item v-if="this.radioValue === 1">
            <el-button type="primary" @click="searchPlan">查询</el-button>
          </el-form-item>
          <el-form-item v-if="this.radioValue === 0" :label="this.radioValue === 0 ? '仪器设备名称:' : '设备名称'"
            class="sermargin">
            <el-input v-model="searchData.name" class="input-form" placeholder="请输入">
@@ -70,10 +73,10 @@
            <el-table-column prop="name" label="负责人" min-width="10%" />
            <el-table-column prop="createTime" label="创建日期" min-width="10%" />
            <el-table-column prop="name" label="创建人" min-width="8%" />
            <el-table-column prop="code" label="计量编号" min-width="8%" />
            <el-table-column prop="code" label="计量编号" min-width="12%" />
            <el-table-column label="操作" min-width="15%">
              <template slot-scope="scope">
                <el-button type="text" @click="lookMeasurement(scope.row.equipmentCode)" size="small">查看计量履历</el-button>
                <!-- <el-button type="text" @click="lookMeasurement(scope.row.equipmentCode)" size="small">查看计量履历</el-button> -->
                <el-button type="text" size="small">查看附件</el-button>
              </template>
            </el-table-column>
@@ -109,7 +112,7 @@
            </el-table-column>
          </el-table>
          <!-- 分页器 -->
          <div style="display: flex;justify-content: end;">
          <div style="display: flex;justify-content: end;padding: 10px 0;">
            <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
              :current-page="currentPage" :page-sizes="[5, 10, 20]" :page-size="pageSize"
              layout="total, sizes, prev, pager, next, jumper" :total="total">
@@ -118,9 +121,12 @@
        </div>
      </div>
      <div>
        <el-button v-if="selectInfoBtn" @click="combackLookPlan" style="position: fixed;top: 43px;right: 14px; z-index: 1000;" type="primary" icon="el-icon-refresh-left" size="mini" plain >返回</el-button>
        <div v-if="addBtn" style="display: flex;justify-content: center;width: 10%;position: fixed;top: 43px;right: 14px; z-index: 1000;">
          <el-button @click="addTop = -82;addBtn=false" size="mini" style="width: 60px;" >返回</el-button>
        <el-button v-if="selectInfoBtn" @click="combackLookPlan"
          style="position: fixed;top: 43px;right: 14px; z-index: 1000;" type="primary" icon="el-icon-refresh-left"
          size="mini" plain>返回</el-button>
        <div v-if="addBtn"
          style="display: flex;justify-content: center;width: 10%;position: fixed;top: 43px;right: 14px; z-index: 1000;">
          <el-button @click="addTop = -82; addBtn = false" size="mini" style="width: 60px;">返回</el-button>
          <el-button size="mini" @click="measureAdd" style="width: 60px;" type="primary">保存</el-button>
        </div>
      </div>
@@ -378,13 +384,19 @@
      this.measureUpInfo.remarks = scope.row.remarks
      this.measureUpInfo.termValidity = scope.row.termValidity
    },
    measureAdd() {
    async measureAdd() {
      let res = await this.$refs.add.add()
      if (!res) {
        return
      }
      this.addTop = -82
        this.$message({
          message: '操作成功!',
          type: 'success'
        });
        this.lookVisible = false
      this.$message({
        message: '操作成功!',
        type: 'success'
      });
      this.lookVisible = false
      this.addBtn = false
      this.limitGetPlanMeasureInstrument()
    },
    async handleSizeChangePlan(num) {
      this.pageSizePlan = num
@@ -399,7 +411,7 @@
      this.addTop = 2
      this.lookVisible = true
      this.$parent.mainShowAdd()
      this.addBtn=true
      this.addBtn = true
    },
    async limitGetPlanMeasureInstrument() {
      let param = {
@@ -418,7 +430,7 @@
      this.getPlanAndInfoAndIns(id)
      this.lookVisible = true
      this.mymodelTop = 2
      this.selectInfoBtn=true
      this.selectInfoBtn = true
      this.$parent.triggerMainBtnPlan()
    },
    async getPlanAndInfoAndIns(id) {
@@ -440,7 +452,7 @@
    combackLookPlan() {
      this.lookVisible = false
      this.mymodelTop = -1000
      this.selectInfoBtn=false
      this.selectInfoBtn = false
    },
    blurSearch() {
      if (this.radioValue === 1) {
@@ -495,6 +507,9 @@
    search() {
      this.getStandingPageList()
    },
    searchPlan(){
      this.getPlanPageList()
    },
    reset(formName) {
      this.searchData.name = ''
      this.searchData.code = ''
@@ -506,8 +521,9 @@
    },
    async getPlanPageList() {
      let param = {
        currentPage: this.currentPage, pageSize: this.pageSize,
        code: this.searchData.code, name: this.searchData.name, unit: this.searchData.measureunit
        currentPage: this.currentPage,
        pageSize: this.pageSize,
        plannedOrderNumber: this.searchData.code
      }
      const res = await getPlanPageList(param)
      res.data.list.forEach(item => {