licp
2024-06-07 7a5de6ba2d6a750f09d6c0b558b8d05afcb1c633
优化功能
已修改5个文件
131 ■■■■■ 文件已修改
src/components/do/b1-ins-order/add.vue 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b3-work-time-management/work-time-management.vue 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b3-work-time-management/work-time-statistics.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue
@@ -451,7 +451,7 @@
          <el-col class="search_thing" :span="22">
            <div class="search_label"><span class="required-span" v-if="addObj.type == 2">* </span>指派人员:</div>
            <div class="search_input">
              <el-select v-model="distributeData.userId" placeholder="请选择" size="small" style="width: 100%;">
              <el-select v-model="distributeData.userId" placeholder="请选择" size="small" filterable  style="width: 100%;">
                <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
@@ -521,9 +521,29 @@
          </el-col>
          <el-col style="margin-top: 6px;">
            <el-col v-for="(a,ai) in bsm2Val2" :key="ai">
              <el-col :span="10" class="pairing">{{a[0]}}</el-col>
              <el-col :span="10">
                <el-select v-model="a[0]" placeholder="请选择" size="small" style="width: 100%;">
                  <el-option
                    v-for="(item,index) in sampleList"
                    :key="index"
                    :label="index+1"
                    :value="index+1">
                  </el-option>
                </el-select>
              </el-col>
              <!-- <el-col :span="10" class="pairing">{{a[0]}}</el-col> -->
              <el-col :span="4" class="pairing" style="border: 0;color: rgba(0, 0, 0, 0.2);">——</el-col>
              <el-col :span="10" class="pairing">{{a[1]}}</el-col>
              <el-col :span="10">
                <el-select v-model="a[1]" placeholder="请选择" size="small" style="width: 100%;">
                  <el-option
                    v-for="(item,index) in sampleList"
                    :key="index"
                    :label="index+1"
                    :value="index+1">
                  </el-option>
                </el-select>
              </el-col>
              <!-- <el-col :span="10" class="pairing">{{a[1]}}</el-col> -->
            </el-col>
          </el-col>
        </el-row>
@@ -1105,6 +1125,8 @@
          this.sampleList.push(this.HaveJson(this.sample))
          this.count++
        }
        this.computationalPairing(this.sampleList.length)
        this.bsm2Val2 = this.HaveJson(this.bsm2Val3)
      },
      selectSample(val) {
        this.sampleIds = []
@@ -1576,6 +1598,22 @@
            this.$message.error('特殊项目必须处理')
            return
          }
          let set = new Set()
          for (let i=0;i<this.bsm2Val2.length;i++){
            let num0 = set.size
            set.add(JSON.stringify(this.bsm2Val2[i]))
            let num1 = set.size
            if(num1==num0){
              this.$message.error('关联项目不能重复')
              return
            }
            set.add(JSON.stringify(this.bsm2Val2[i].reverse()))
            let num2 = set.size
            if(num1==num2){
              this.$message.error('关联项目不能重复')
              return
            }
          }
        }
        done()
      },
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -359,6 +359,7 @@
      v-show="state==1&&fileAdd"
      :on-success="handleSuccessUp" :show-file-list="false"
        accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="headers" :on-change="beforeUpload"
        style="width: 80px !important;"
        :on-error="onError" ref='upload'>
        <el-button size="small" type="primary">附件上传</el-button></el-upload>
      <ValueTable class="value-table" ref="fileList" :url="$api.insOrderPlan.getFileList"
@@ -636,6 +637,10 @@
              this.insOrder.typeName = m.label
            }
          })
          this.loading = false
          if(!res.data.sampleProduct||res.data.sampleProduct.length==0){
            return this.$message.error('该任务没有样品信息')
          }
          this.sampleProduct = res.data.sampleProduct
          this.currentSample = this.HaveJson(this.sampleProduct[0])
          let list = await this.getCurrentProduct(this.currentSample.id,0)
@@ -652,7 +657,6 @@
          })
          if (this.currentSample.index == undefined) this.currentSample['index'] = 1
          let bushing = this.currentSample.bushing
          this.loading = false
          // this.handleTableData()
          this.getTableLists();
          this.componentData.currentId = val;
src/components/do/b3-work-time-management/work-time-management.vue
@@ -63,10 +63,12 @@
      </el-radio-group>
      <div style="display: flex;align-items: center;">
        <p style="font-size: 14px;margin-right: 30px;">
          总工时汇总:<span style="font-size: 16px;color: #3A7BFA;">{{ (totalInfo['产量工时汇总']+totalInfo['辅助工时汇总'])? (totalInfo['产量工时汇总']+totalInfo['辅助工时汇总']):0 }}</span>&nbsp;&nbsp;&nbsp;&nbsp;产量工时汇总:<span style="font-size: 16px;color: #3A7BFA;">{{totalInfo['产量工时汇总']?totalInfo['产量工时汇总']:0}}</span>&nbsp;&nbsp;&nbsp;&nbsp;辅助工时汇总:<span style="font-size: 16px;color: #3A7BFA;">{{totalInfo['辅助工时汇总']?totalInfo['辅助工时汇总']:0}}</span>
          总工时汇总:<span style="font-size: 16px;color: #3A7BFA;" v-if="totalInfo">{{ (totalInfo['产量工时汇总']+totalInfo['辅助工时汇总'])? (totalInfo['产量工时汇总']+totalInfo['辅助工时汇总']):0 }}</span>&nbsp;&nbsp;&nbsp;&nbsp;产量工时汇总:<span style="font-size: 16px;color: #3A7BFA;" v-if="totalInfo">{{totalInfo['产量工时汇总']?totalInfo['产量工时汇总']:0}}</span>&nbsp;&nbsp;&nbsp;&nbsp;辅助工时汇总:<span style="font-size: 16px;color: #3A7BFA;" v-if="totalInfo">{{totalInfo['辅助工时汇总']?totalInfo['辅助工时汇总']:0}}</span>
        </p>
        <el-button size="small" type="primary" style="margin-right: 16px;" @click="openAdd" v-show="currentTable == 'ValueTable0'">录入数据</el-button>
        <el-button size="small" type="primary" @click="handleOut" :loading="outLoading">导 出</el-button>
        <el-button size="small" type="primary" style="margin-right: 16px;" @click="openAdd" v-show="currentTable == 'ValueTable0'&&add">录入数据</el-button>
        <el-button size="small" type="primary"
        v-if="down"
        @click="handleOut" :loading="outLoading">导 出</el-button>
      </div>
    </div>
    <div class="table">
@@ -216,6 +218,8 @@
  data () {
    return{
      entity:{},
      down:false,
      add:false,
      componentData: {
                    entity: {
                        week: null,
@@ -394,7 +398,7 @@
          label:'已批准'
        },
      ],
      totalInfo:{},
      totalInfo:null,
      auxiliaryWorking:null,
      outLoading:false
    }
@@ -461,6 +465,49 @@
    this.componentData.selectField.weekDay.select = this.weekList
  },
  methods:{
    getPower(){
      let power = JSON.parse(sessionStorage.getItem('power'))
        let del = false
        let down = false
        let add = false
        let up = false
        let check = false
        let ratify = false
        for (var i = 0; i < power.length; i++) {
                    if (power[i].menuMethod == 'exportWorkingHours') {
                        down = true
                    }
                    if (power[i].menuMethod == 'deleteAuxiliaryWorkingHoursDay') {
                        del = true
                    }
          if (power[i].menuMethod == 'insertAuxiliaryWorkingHoursDay') {
                        add = true
                    }
          if (power[i].menuMethod == 'updateAuxiliaryWorkingHoursDay') {
                        up = true
                    }
          if (power[i].menuMethod == 'check') {
                        check = true
                    }
          if (power[i].menuMethod == 'approve') {
                        ratify = true
                    }
                }
        if (!approve) {
                    this.componentData.do.splice(3, 1)
                }
        if (!check) {
                    this.componentData.do.splice(2, 1)
                }
        if (!up) {
                    this.componentData.do.splice(1, 1)
                }
        if (!del) {
                    this.componentData.do.splice(0, 1)
                }
        this.down = down
        this.add = add
    },
    getYearAndMonthAndDays(date){
      return getYearAndMonthAndDays(date)
    },
src/components/do/b3-work-time-management/work-time-statistics.vue
@@ -40,8 +40,8 @@
                <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
            </div>
      <div class="search_thing">
        <el-button size="small" type="primary"  @click="handleDown" v-show="currentTable == 'value0'" :loading="outLoading">导 出</el-button>
        <el-button size="small" type="primary"  @click="handleUp" v-show="currentTable == 'value1'">导 入</el-button>
        <el-button size="small" type="primary"  @click="handleDown" v-show="currentTable == 'value0'&&down" :loading="outLoading">导 出</el-button>
        <el-button size="small" type="primary"  @click="handleUp" v-show="currentTable == 'value1'&&up">导 入</el-button>
      </div>
        </div>
    <el-radio-group v-model="currentTable" size="small" :key="'111'" style="margin-top: 10px;">
@@ -78,6 +78,8 @@
  },
  data () {
    return{
      down:false,
      up:false,
      componentData: {
                    entity: {
                        month: getYearAndMonthAndDays().split('-')[0]+'-'+getYearAndMonthAndDays().split('-')[1],
@@ -139,6 +141,7 @@
    this.getUsers()
    this.entityCopy = this.HaveJson(this.componentData.entity);
    this.entityCopy0 = this.HaveJson(this.componentData0.entity);
    this.getPower()
  },
  methods: {
    refresh(){
@@ -207,6 +210,21 @@
    },
    handleUp(){
      this.$refs.ValueTable1.openUpload()
    },
    getPower(){
      let power = JSON.parse(sessionStorage.getItem('power'))
        let up = false
        let down = false
        for (var i = 0; i < power.length; i++) {
                    if (power[i].menuMethod == 'exportOriginalHours') {
                        down = true
                    }
                    if (power[i].menuMethod == 'upload') {
                        up = true
                    }
                }
        this.down = down
        this.up = up
    }
  }
}
src/main.js
@@ -15,8 +15,8 @@
Vue.prototype.PROJECT = '检测中心' //项目名称:检测中心、装备电缆
//本地
Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
const javaApi = 'http://192.168.11.200:8001';//李
// const javaApi = 'http://192.168.144.249:8001';//张
const javaApi = 'http://192.168.144.200:8001';//李
// const javaApi = 'http://192.168.11.249:8001';//张
// const javaApi = 'http://192.168.11.2:8001';//柴
//  const javaApi = 'http://127.0.0.1:8001';//晏
// const javaApi = 'http://114.132.189.42:1234';//测试服