licp
2024-09-06 ed2342a8cadcd9519858ecd5d440fcba4d66a02d
电路检验版本选择
已修改6个文件
178 ■■■■■ 文件已修改
src/assets/api/controller.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/circuit-parameters1.vue 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/circuit-parameters2.vue 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-sample/detail.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspect-order-plan.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js
@@ -211,6 +211,7 @@
  write: "/insOrderPlan/write", // 填写温度与湿度
  temCycle: "/insOrderPlan/temCycle", // 温度循环查看列表数据(包括通过样品id,循环次数,温度,循环次数进行筛选)
  jumpTeam: "/insOrderPlan/jumpTeam", // 插队
  chooseVersion: "/insOrderPlan/chooseVersion", // 电路检验版本
}
const systemLog = {
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -282,7 +282,7 @@
          <el-input clearable v-model="sampleProduct.length" disabled size="small" placeholder="请输入" ></el-input>
        </el-form-item>
        <el-form-item label="试验标准:">
          <span>{{ insOrder.testRequirements?insOrder.testRequirements:'-' }}</span>
          <span>{{ currentSample.testRequirements?currentSample.testRequirements:'-' }}</span>
        </el-form-item>
        <el-form-item label="下发时间:">
          <el-input clearable v-model="insOrder.sendTime" disabled size="small" placeholder="请输入"></el-input>
@@ -309,11 +309,11 @@
            <el-radio-button :label="item.templateId" v-for="(item,index) in tableLists" :key="index"
              size="small">{{ item.templateName }}</el-radio-button>
          </el-radio-group>
          <span style="margin-left: 20px;margin-right: 10px;">模板版本:</span>
          <!-- <span style="margin-left: 20px;margin-right: 10px;">模板版本:</span>
          <el-radio-group v-model="currentTableState" size="small">
            <el-radio-button label="0" size="small">版本一</el-radio-button>
            <el-radio-button label="1" size="small">版本二</el-radio-button>
          </el-radio-group>
          </el-radio-group> -->
        </div>
        <div style="display: flex;align-items: center;">
          <span v-if="casing.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='成品缆检验原始记录'">&nbsp;&nbsp;套管:</span>
@@ -913,6 +913,21 @@
        <el-button type="primary" @click="submitDataGet()" :loading="getDataIndexLoading">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="选择电路检验模板版本"
      :visible.sync="versionDialogVisible"
      width="30%"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :show-close="false">
      <el-radio-group v-model="currentTableState">
        <el-radio :label="0">电调-电路检验原始记录</el-radio>
        <el-radio :label="1">非电调-电路检验原始记录</el-radio>
      </el-radio-group>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" :loading="versionLoading" @click="saveVersion">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
@@ -924,7 +939,7 @@
  import CircuitParameters1 from './circuit-parameters1.vue'
  import CircuitParameters2 from './circuit-parameters2.vue'
  export default {
    props: ['sonLaboratory', 'orderId', 'state','inspectorList'],
    props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId'],
    components: {
      ValueTable,
      Circuit,
@@ -933,6 +948,8 @@
    },
    data() {
      return {
        versionLoading:false,
        versionDialogVisible:false,
        currentTableState:0,
        sagData: [],
        sagForm: {
@@ -1110,7 +1127,7 @@
        getDataIndexLoading:false,
        changeType:null,
        getDataTypeId:'',
        getDataType:null
        getDataType:null,
      }
    },
    // 用于上传文件的信息
@@ -1137,6 +1154,7 @@
      this.scrollInit()
      this.getPower()
      this.startWorker()
      this.currentTableState = this.version
    },
    watch: {
      // 监听任务id,获取任务信息
@@ -2365,6 +2383,10 @@
          this.tableList = null;
          this.tableList = [this.tableLists[0]]
          this.currentTable = this.tableLists[0].templateId;
          console.log(111,this.currentTable);
          if(this.tableLists.find(m=>m.templateId==this.currentTable)&&this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('电路试验')&&this.currentTableState!=0&&this.currentTableState!=1){
            this.versionDialogVisible = true
          }
          // 处理页面列表数据
          this.handleTableData()
        }
@@ -3593,6 +3615,23 @@
      async getCurrentItem(){
        let list = await this.getCurrentProduct(this.currentSample.id,0)
        this.currentSample.insProduct = this.HaveJson(list)
      },
      saveVersion(){
        if(this.currentTableState!=0&&this.currentTableState!=1){
          this.$message.error('请选择版本')
          return
        }
        this.versionLoading = true;
        this.$axios.post(this.$api.insOrderPlan.chooseVersion, {
          orderStateId: this.orderStateId,
          version: this.currentTableState
        }).then(res => {
          this.versionLoading = false;
          if(res.code==201){
            return
          }
          this.versionDialogVisible = false
        })
      }
    }
  }
src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
@@ -35,7 +35,7 @@
      </el-col>
      <el-col :span="7">
        <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 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>
          <el-button size="small" @click="deleteList(angleList.length-1,angleList)" :disabled="state>1">删除角度</el-button>
@@ -523,30 +523,7 @@
              message: '不能删除最后一个互调'
            });
          }else{
            if(list[index].frequency){
              this.$confirm(`是否确定删除 ${list[index].often} 频点数据?`, "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
              }).then(() => {
                this.$axios.post(this.$api.insOrderPlan.deleteInsContext2, {
                  frequency:list[index].frequency,
                  productId:list[index].id,
                  often:list[index].often
                }).then(res => {
                  if (res.code === 201) {
                    this.$message.error('删除失败')
                    return
                  }
                  this.$message.success('已删除')
                  list.splice(index, 1)
                }).catch(err => {
                  console.log(err)
                })
              }).catch(() => {})
            }else{
              list.splice(index, 1)
            }
            list.splice(index, 1)
          }
        }else if(type=='删除频段'){
          this.$confirm(`是否确定删除 ${list[index].band} 频段数据?`, "提示", {
@@ -593,7 +570,39 @@
            index = i;
          }
        })
        obj.often = ''
        obj.result = ''
        let num0 = obj.value.length
        let num1 = obj.value[0].length
        delete obj.value
        obj.value = []
        for(let i = 0;i<num0;i++){
          obj.value.push([])
          for(let j = 0;j<num1;j++){
            obj.value[i].push('')
          }
        }
        list.splice(index+1, 0, obj)
      }else if(type=='频段'){
        let obj = JSON.parse(JSON.stringify(list[0]));
        console.log(2222,obj)
        obj.band = ''
        obj.projectList.forEach(item=>{
          item.often = ''
          item.result = ''
          item.frequency = ''
          let num0 = item.value.length
          let num1 = item.value[0].length
          delete item.value
          item.value = []
          for(let i = 0;i<num0;i++){
            item.value.push([])
            for(let j = 0;j<num1;j++){
              item.value[i].push('')
            }
          }
        })
        list.push(obj)
      }else{
        let obj = JSON.parse(JSON.stringify(list[0]));
        list.push(obj)
src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
@@ -35,7 +35,7 @@
      </el-col>
      <el-col :span="7">
        <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 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)" v-if="!(state>1)&&intermodulationNum>0">添加角度</el-button>
          <el-button size="small" @click="deleteList(angleList.length-1,angleList)" v-if="!(state>1)&&intermodulationNum>0">删除角度</el-button>
@@ -421,30 +421,7 @@
              message: '不能删除最后一个互调'
            });
          }else{
            if(list[index].frequency){
              this.$confirm(`是否确定删除 ${list[index].often} 频点数据?`, "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
              }).then(() => {
                this.$axios.post(this.$api.insOrderPlan.deleteInsContext2, {
                  frequency:list[index].frequency,
                  productId:list[index].id,
                  often:list[index].often
                }).then(res => {
                  if (res.code === 201) {
                    this.$message.error('删除失败')
                    return
                  }
                  this.$message.success('已删除')
                  list.splice(index, 1)
                }).catch(err => {
                  console.log(err)
                })
              }).catch(() => {})
            }else{
              list.splice(index, 1)
            }
            list.splice(index, 1)
          }
        }else if(type=='删除频段'){
          this.$confirm(`是否确定删除 ${list[index].band} 频段数据?`, "提示", {
@@ -491,7 +468,39 @@
            index = i;
          }
        })
        obj.often = ''
        obj.result = ''
        let num0 = obj.value.length
        let num1 = obj.value[0].length
        delete obj.value
        obj.value = []
        for(let i = 0;i<num0;i++){
          obj.value.push([])
          for(let j = 0;j<num1;j++){
            obj.value[i].push('')
          }
        }
        list.splice(index+1, 0, obj)
      }else if(type=='频段'){
        let obj = JSON.parse(JSON.stringify(list[0]));
        console.log(2222,obj)
        obj.band = ''
        obj.projectList.forEach(item=>{
          item.often = ''
          item.result = ''
          item.frequency = ''
          let num0 = item.value.length
          let num1 = item.value[0].length
          delete item.value
          item.value = []
          for(let i = 0;i<num0;i++){
            item.value.push([])
            for(let j = 0;j<num1;j++){
              item.value[i].push('')
            }
          }
        })
        list.push(obj)
      }else{
        let obj = JSON.parse(JSON.stringify(list[0]));
        list.push(obj)
src/components/do/b1-sample/detail.vue
@@ -66,6 +66,8 @@
                </el-table-column>
                <el-table-column prop="inspectionItem" label="检验项" min-width="100"
                    show-overflow-tooltip></el-table-column>
        <el-table-column prop="inspectionItemSubclass" label="检验子项" min-width="100"
                    show-overflow-tooltip></el-table-column>
                <el-table-column prop="inspectionItemSubclass" label="检验项分类" min-width="100" show-overflow-tooltip v-if="PROJECT=='装备电缆'"></el-table-column>
                <el-table-column prop="sonLaboratory" label="站点" min-min-width="100" show-overflow-tooltip></el-table-column>
                <el-table-column prop="unit" label="单位" min-width="100" show-overflow-tooltip></el-table-column>
src/components/view/b1-inspect-order-plan.vue
@@ -298,7 +298,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"/>
    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version"/>
      <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"
@@ -324,6 +324,8 @@
        },
        data() {
            return {
        orderStateId:null,
        version:null,
                examine: null,
        inspectorList: [],//检验人员列表
                alone: false,
@@ -792,6 +794,8 @@
        this.inspectorList = inspectorList
        this.state = 1;
                this.orderId = row.id
        this.version = row.version
        this.orderStateId = row.orderStateId
      },
      handleConnect(row){
        this.orderId = row.id
@@ -841,6 +845,8 @@
      handleReview(row){
        this.state = 2;
                this.orderId = row.id
        this.version = row.version
        this.orderStateId = row.orderStateId
      },
      getAuthorizedPerson() {
                this.$axios.get(this.$api.user.getUserMenu).then(res => {