licp
2024-09-11 4163a1afd6fc4c787db36d53dc40c4b1f3f9b916
x新增历史记录查看功能
已修改7个文件
140 ■■■■ 文件已修改
src/assets/api/controller.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/circuit-parameters1.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/circuit-parameters2.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tool/value-table.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspect-order-plan.vue 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js
@@ -212,6 +212,7 @@
  temCycle: "/insOrderPlan/temCycle", // 温度循环查看列表数据(包括通过样品id,循环次数,温度,循环次数进行筛选)
  jumpTeam: "/insOrderPlan/jumpTeam", // 插队
  chooseVersion: "/insOrderPlan/chooseVersion", // 电路检验版本
  getInsProduct2: "/insOrderPlan/getInsProduct2", // 查看历史版本本
}
const systemLog = {
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -181,6 +181,10 @@
    display: inline-flex;
    align-items: center;
  }
  .history-btn{
    display: flex;
    align-items: center;
  }
</style>
<style>
  .inspection .el-form-item__label {
@@ -254,18 +258,18 @@
      </el-col>
      <el-col :span="12" style="text-align: right;">
        <el-button size="small" type="primary" @click="sampleVisible=true;uploadSample()">样品切换</el-button>
        <el-button size="small" type="primary" @click="taskVisible=true">任务切换</el-button>
        <el-button size="small" type="primary" @click="taskVisible=true" v-show="!isLook">任务切换</el-button>
        <el-button size="small" type="primary" @click="handleSubmit" v-if="state==1"
          :loading="submitLoading">提交</el-button>
        <!-- 复核 -->
        <el-button size="small" type="primary" @click="upInsReview(1)" :loading="reviewLoading"
          v-if="state>1">继续试验</el-button>
        <el-button size="small" @click="upInsReview(0)" v-if="state>1" type="danger">再次试验</el-button>
        <el-button size="small" @click="upInsReview(2)" v-if="state>1">结束试验</el-button>
          v-if="state>1&&!isLook">继续试验</el-button>
        <el-button size="small" @click="upInsReview(0)" v-if="state>1&&!isLook" type="danger">再次试验</el-button>
        <el-button size="small" @click="upInsReview(2)" v-if="state>1&&!isLook">结束试验</el-button>
        <el-button size="small" @click="$emit('goback')">返回</el-button>
      </el-col>
    </el-row>
    <div class="search">
    <div class="search" v-show="!isLook">
      <el-form :inline="true" :model="searchForm" class="form-inline" label-width="100px" label-position="right">
        <el-form-item label="委托编号:">
          <el-input clearable v-model="insOrder.entrustCode" disabled size="small" placeholder="请输入"></el-input>
@@ -351,6 +355,11 @@
          </el-select>
          <el-button type="primary" size="small" v-if="(isGet||tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='温度循环检验原始记录'&&temDataAcquisition)&&PROJECT=='检测中心'&&state==1" @click="getDataAcquisitionDevice" :loading="dataAcquisitionLoading">数据采集</el-button>
          <el-button :type="dataAcquisitionEidtAble?'':'primary'" size="small" v-if="(isGet||(tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='温度循环检验原始记录'))&&PROJECT=='检测中心'&&collected&&state==1" @click="dataAcquisitionEidtAble=!dataAcquisitionEidtAble">{{dataAcquisitionEidtAble?'关闭编辑':'编辑数采'}}</el-button>
        </div>
        <div class="history-btn" v-if="isLook">
          <el-button type="primary" icon="el-icon-arrow-left" size="small" @click="goHistory(-1)">上一条记录</el-button>
          <span style="font-size: 14px;margin: 0 10px;">当前第{{num}}条</span>
          <el-button type="primary" size="small" @click="goHistory(1)">下一条记录<i class="el-icon-arrow-right el-icon--right"></i></el-button>
        </div>
      </div>
      <!-- 常规检验原始记录 -->
@@ -800,8 +809,8 @@
      <!-- 电路试验 -->
      <div v-else-if="tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')" style="width: 100%;overflow-x: auto;overflow-y: visible;">
        <!-- <Circuit></Circuit> -->
        <CircuitParameters1 v-if="currentTableState==0" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1"></CircuitParameters1>
        <CircuitParameters2 v-if="currentTableState==1" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1"></CircuitParameters2>
        <CircuitParameters1 v-if="currentTableState==0" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1" :isLook="isLook" :currentNum="currentNum"></CircuitParameters1>
        <CircuitParameters2 v-if="currentTableState==1" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1" :isLook="isLook" :currentNum="currentNum"></CircuitParameters2>
      </div>
      <el-upload :action="action"
      :data="{
@@ -939,7 +948,7 @@
  import CircuitParameters1 from './circuit-parameters1.vue'
  import CircuitParameters2 from './circuit-parameters2.vue'
  export default {
    props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId'],
    props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId','isLook','num1'],
    components: {
      ValueTable,
      Circuit,
@@ -948,6 +957,7 @@
    },
    data() {
      return {
        currentNum:0,
        versionLoading:false,
        versionDialogVisible:false,
        currentTableState:0,
@@ -1128,6 +1138,7 @@
        changeType:null,
        getDataTypeId:'',
        getDataType:null,
        num:0
      }
    },
    // 用于上传文件的信息
@@ -1144,6 +1155,8 @@
    created() {
      this.componentData.entity.sonLaboratory = this.sonLaboratory;
      this.id = this.orderId;
      this.currentTableState = this.version
      this.num = this.num1
      this.getUserInfo()
    },
    mounted() {
@@ -1154,7 +1167,6 @@
      this.scrollInit()
      this.getPower()
      this.startWorker()
      this.currentTableState = this.version
    },
    watch: {
      // 监听任务id,获取任务信息
@@ -2171,7 +2183,12 @@
      // 根据类型、任务id、实验室来获取样品的检验项信息
      async getCurrentProduct(id,type){
        this.tableLoading = true;
        let res = await this.$axios.post(this.$api.insOrderPlan.getInsProduct+'?id='+id+'&type='+type+'&laboratory='+this.sonLaboratory)
        let res = null;
        if(!this.isLook){
          res = await this.$axios.post(this.$api.insOrderPlan.getInsProduct+'?id='+id+'&type='+type+'&laboratory='+this.sonLaboratory)
        }else{
          res = await this.$axios.post(this.$api.insOrderPlan.getInsProduct2+'?id='+id+'&type='+type+'&laboratory='+this.sonLaboratory+'&num='+this.num)
        }
        this.tableLoading = false;
        return res.data
      },
@@ -2215,7 +2232,7 @@
        }
        // 处理页面列表数据
        this.getTableLists();
        this.currentKey = row.index
        this.currentKey = row.index?row.index:0
        this.currentTab = null;
        // 向多线程去保存页面列表数据,后端传参,当前模板信息
        this.worker.postMessage(JSON.stringify({
@@ -3632,6 +3649,20 @@
          }
          this.versionDialogVisible = false
        })
      },
      async goHistory(num){
        if(this.num==1&&num==-1){
          this.$message.error('当前是第一条记录')
          return
        }else if(this.num1==this.num&&num==1){
          this.$message.error('当前是最后一条记录')
          return
        }
        this.num = this.num + num
        this.tableLoading = true
        await this.handleChangeSample(this.currentSample)
        this.currentNum++
        this.tableLoading = false
      }
    }
  }
src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
@@ -34,7 +34,7 @@
        </el-row>
      </el-col>
      <el-col :span="7">
        <div style="display: flex;align-items: center;justify-content: flex-end;" class="btns">
        <div style="display: flex;align-items: center;justify-content: flex-end;" class="btns" v-if="!isLook">
          <el-button type="primary" size="small" @click="addList(allBandList,'频段')" :disabled="state>1">添加频段</el-button>
          <el-button size="small" @click="deleteList(allBandList.length-1,allBandList,'删除频段')" :disabled="state>1">删除频段</el-button>
          <el-button type="primary" size="small" @click="addList(angleList)" :disabled="state>1">添加角度</el-button>
@@ -70,9 +70,9 @@
            :value="item.value">
          </el-option>
        </el-select>
        <el-button type="primary" size="small" @click="addList(h.projectList,'互调')" style="margin-left: 16px;" :disabled="state>1">添加互调</el-button>
        <el-button size="small" @click="deleteList(0,h.projectList,'互调')" :disabled="state>1">删除互调</el-button>
        <el-button type="primary" size="small" @click="save(h,y)" :disabled="state>1" :loading="loading[y]">保 存</el-button>
        <el-button type="primary" size="small" @click="addList(h.projectList,'互调')" style="margin-left: 16px;" :disabled="state>1" v-show="!isLook">添加互调</el-button>
        <el-button size="small" @click="deleteList(0,h.projectList,'互调')" :disabled="state>1" v-show="!isLook">删除互调</el-button>
        <el-button type="primary" size="small" @click="save(h,y)" :disabled="state>1" :loading="loading[y]" v-show="!isLook">保 存</el-button>
      </div>
      <el-divider></el-divider>
      <div class="circuit-parameters-item-content">
@@ -261,7 +261,7 @@
<script>
export default {
  props:['insProduct','orderId','sampleId','state','num'],
  props:['insProduct','orderId','sampleId','state','num','isLook','currentNum'],
  data() {
    return {
      value: "",
@@ -378,6 +378,9 @@
        })
      })
      console.log(this.allBandList)
    },
    currentNum(val) {
      this.initData()
    }
  },
  mounted() {
src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
@@ -33,7 +33,7 @@
          </el-col>
        </el-row>
      </el-col>
      <el-col :span="7">
      <el-col :span="7" v-if="!isLook">
        <div style="display: flex;align-items: center;justify-content: flex-end;" class="btns">
          <el-button type="primary" size="small" @click="addList(allBandList,'频段')" :disabled="state>1">添加频段</el-button>
          <el-button size="small" @click="deleteList(allBandList.length-1,allBandList,'删除频段')" :disabled="state>1">删除频段</el-button>
@@ -72,7 +72,7 @@
        </el-select>
        <el-button type="primary" size="small" @click="addList(h.projectList,'互调')" style="margin-left: 16px;" v-if="intermodulationNum>0&&!(state>1)">添加互调</el-button>
        <el-button size="small" @click="deleteList(0,h.projectList,'互调')" v-if="intermodulationNum>0&&!(state>1)">删除互调</el-button>
        <el-button type="primary" size="small" @click="save(h,y)" :disabled="state>1" :loading="loading[y]" style="margin-left: 16px;">保 存</el-button>
        <el-button type="primary" size="small" @click="save(h,y)" :disabled="state>1" :loading="loading[y]" style="margin-left: 16px;" v-show="!isLook">保 存</el-button>
      </div>
      <el-divider></el-divider>
      <div class="circuit-parameters-item-content">
@@ -180,7 +180,7 @@
<script>
export default {
  props:['insProduct','orderId','sampleId','state','num'],
  props:['insProduct','orderId','sampleId','state','num','isLook','currentNum'],
  data() {
    return {
      value: "",
@@ -269,11 +269,15 @@
          }
        })
      })
    },
    currentNum(val) {
      this.initData()
    }
  },
  mounted() {
    this.getTypeDicts()
    this.initData()
    console.log(2222,this.currentNum)
  },
  methods: {
    // 字典获取数据
src/components/tool/value-table.vue
@@ -1165,6 +1165,7 @@
      },
      getWidth() {
        let count = 0
        console.log(this.data.do)
        this.data.do.forEach(a => {
          count += a.font.length
        })
src/components/view/b1-inspect-order-plan.vue
@@ -236,14 +236,15 @@
          <el-table-column
            fixed="right"
            align="center" label="操作"
            width="250px"
            width="320px"
          >
          <template slot-scope="scope">
            <el-button @click="handleDataLook(scope.row)" type="text" size="small">数据查看</el-button>
            <el-button @click="handleInspection(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))">检验</el-button>
            <el-button @click="handleConnect(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 5  || scope.row.insState == 3||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))">交接</el-button>
            <el-button @click="handleReview(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState != 3 ||(scope.row.checkName&&!scope.row.checkName.includes(userName))">复核</el-button>
            <el-button @click="claimFun(scope.row)" type="text" size="small" :disabled="scope.row.userName != null || scope.row.checkName!=null">认领</el-button>
            <el-button @click="handleInspection(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="inspection">检验</el-button>
            <el-button @click="handleConnect(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 5  || scope.row.insState == 3||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="connect">交接</el-button>
            <el-button @click="handleReview(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState != 3 ||(scope.row.checkName&&!scope.row.checkName.includes(userName))" v-if="review">复核</el-button>
            <el-button @click="claimFun(scope.row)" type="text" size="small" :disabled="scope.row.userName != null || scope.row.checkName!=null" v-if="claim">认领</el-button>
            <el-button @click="lookHistory(scope.row)" type="text" size="small" :disabled="!scope.row.num1 || scope.row.num1<1" v-if="getInsProduct2">查看记录</el-button>
          </template>
          </el-table-column>
        </el-table>
@@ -298,7 +299,7 @@
        <div style="width: 100%;height: 100%;" v-if="activeFace >0">
            <Add :active="activeFace" :currentId="currentId" :examine="examine"/>
        </div>
    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version"/>
    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version" :isLook="isLook" :num1="num1"/>
      <el-dialog title="数据查看" :visible.sync="dataDialogVisible" width="80%">
                <div style="height: 70vh;overflow-y: auto;" v-if="dataDialogVisible">
                    <ValueTable ref="ValueTableDataLook" :rowKey="'insProductId'" :url="$api.insOrder.selectSampleAndProductByOrderId"
@@ -452,6 +453,14 @@
                            disabFun: (row, index) => {
                                return row.userName != null || row.checkName!=null
                            }
                        }, {
                            id: '',
                            font: '查看记录',
                            type: 'text',
                            method: 'claimFun',
                            disabFun: (row, index) => {
                                return !row.num1 || row.num1<2
                            }
                        }
                    ],
                    linkEvent: {
@@ -525,7 +534,14 @@
          label: '未出结果',
          type: 'info'
        }],
        typeList:[]
        typeList:[],
        getInsProduct2:false,
        claim:false,
        review:false,
        connect:false,
        inspection:false,
        isLook:false,//是否是查看历史页面
        num1:null,
            }
        },
        created() {
@@ -595,6 +611,7 @@
                let review = false
        let claim = false
        let jumpTeam = false
        let getInsProduct2 = false
                for (var i = 0; i < power.length; i++) {
                    if (power[i].menuMethod == 'doInsOrder') {
                        inspection = true
@@ -611,19 +628,30 @@
          if (power[i].menuMethod == 'jumpTeam') {
                        jumpTeam = true
                    }
          if (power[i].menuMethod == 'getInsProduct2') {
                        getInsProduct2 = true
                    }
                }
        if (!getInsProduct2) {
                    this.componentData.do.splice(5, 1)
                }
                if (!claim) {
                    this.componentData.do.splice(3, 1)
                    this.componentData.do.splice(4, 1)
                }
                if (!review) {
                    this.componentData.do.splice(2, 1)
                    this.componentData.do.splice(3, 1)
                }
        if (!connect) {
                    this.componentData.do.splice(1, 1)
                    this.componentData.do.splice(2, 1)
                }
                if (!inspection) {
                    this.componentData.do.splice(0, 1)
                    this.componentData.do.splice(1, 1)
                }
        this.getInsProduct2 = getInsProduct2
        this.claim = claim
        this.review = review
        this.connect = connect
        this.inspection = inspection
        this.jumpTeam = jumpTeam
            },
            changeCheckBox(val) {
@@ -796,6 +824,7 @@
        this.version = row.version
        this.orderStateId = row.orderStateId
        this.state = 1;
        this.isLook = false
      },
      handleConnect(row){
        this.orderId = row.id
@@ -847,6 +876,7 @@
                this.orderId = row.id
        this.version = row.version
        this.orderStateId = row.orderStateId
        this.isLook = false
      },
      getAuthorizedPerson() {
                this.$axios.get(this.$api.user.getUserMenu).then(res => {
@@ -860,6 +890,14 @@
                    this.personList = data
                })
            },
      lookHistory(row){
        this.isLook = true
        this.state = 2;
        this.orderId = row.id
        this.version = row.version
        this.orderStateId = row.orderStateId
        this.num1 = row.num1
      }
        }
    }
</script>
src/main.js
@@ -20,7 +20,7 @@
//本地
// Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://127.0.0.1:8001';
const javaApi = 'http://192.168.159.249:8001';
const javaApi = 'http://172.20.10.5:8001';
// //通信测试库
// Vue.prototype.LOCATIONVUE = "http://10.1.13.77:8080";