licp
2024-06-21 c67f52b0060a3d3339a0c62850e919c152d3a669
完成人员考评接口对接
已修改8个文件
371 ■■■■■ 文件已修改
src/assets/api/controller.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b3-personnel-evaluation/employee-mutual-evaluation.vue 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b3-personnel-evaluation/evaluation.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b3-personnel-evaluation/leader-rate.vue 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b3-personnel-evaluation/supervisor-rate.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b3-work-time-management/work-time-statistics.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b3-personnel-evaluation.vue 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js
@@ -31,6 +31,7 @@
    auxiliaryCorrectionHours,
    insBushing,
    auxiliaryOriginalHours,
    evaluate,
  }
}
@@ -351,3 +352,16 @@
  selectAuxiliaryOriginalHours: "/auxiliaryOriginalHours/selectAuxiliaryOriginalHours", //查询原始工时
  exportOriginalHours: "/auxiliaryOriginalHours/exportOriginalHours", //导出原始工时
}
const evaluate = {
  page: "/evaluate/page", //查询考评
  exportEvaluate: "/evaluate/exportEvaluate", //导出考评
  getEvaluateCompetent: "/evaluateCompetent/getEvaluateCompetent", //查询主管打分
  writeEvaluateCompetent: "/evaluateCompetent/writeEvaluateCompetent", //填写主管打分
  getEvaluateLeader: "/evaluateLeader/getEvaluateLeader", //查询组长评分
  writeEvaluateLeader: "/evaluateLeader/writeEvaluateLeader", //组长评分
  exportEvaluateCompetent: "/evaluateCompetent/exportEvaluateCompetent", //导出主管打分
  exportEvaluateLeader: "/evaluateLeader/exportEvaluateLeader", //导出组长打分
  getEvaluateGroup: "/evaluateGroup/getEvaluateGroup", //查询员工互评
  writeEvaluateGroup: "/evaluateGroup/writeEvaluateGroup", //填写员工互评
}
src/components/do/b3-personnel-evaluation/employee-mutual-evaluation.vue
@@ -1,9 +1,9 @@
<template>
  <div class="table-item">
    <p style="text-align: center;margin-bottom: 10px;">{{ laboratory.label }} {{ Number(month.split('-')[1]) }} 月份员工互评打分表</p>
    <p style="text-align: center;margin-bottom: 10px;">{{ entity.departLims }} {{ Number(entity.month.split('-')[1]) }} 月份员工互评打分表</p>
    <el-table
    :data="tableData"
    style="width: 100%" height="calc(100% - 20px)">
    style="width: 100%" height="calc(100% - 20px)" v-loading="loading">
      <el-table-column
        type="index"
        label="序号"
@@ -15,21 +15,21 @@
        <el-table-column label="及时完成">
          <el-table-column label="20" width="90px">
            <template slot-scope="scope">
              <el-radio :label="20" v-model="scope.row.radio0">{{ '' }}</el-radio>
              <el-radio :label="20" v-model="scope.row.seasonable" @input="m=>handleChange(m,scope.row,'seasonable')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="催促完成">
          <el-table-column label="15" width="90px">
            <template slot-scope="scope">
              <el-radio :label="15" v-model="scope.row.radio0">{{ '' }}</el-radio>
              <el-radio :label="15" v-model="scope.row.seasonable" @input="m=>handleChange(m,scope.row,'seasonable')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="延期较长">
          <el-table-column label="10" width="90px">
            <template slot-scope="scope">
              <el-radio :label="10" v-model="scope.row.radio0">{{ '' }}</el-radio>
              <el-radio :label="10" v-model="scope.row.seasonable" @input="m=>handleChange(m,scope.row,'seasonable')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
@@ -38,21 +38,21 @@
        <el-table-column label="全月无错">
          <el-table-column label="20" width="90px">
            <template slot-scope="scope">
              <el-radio :label="20" v-model="scope.row.radio1">{{ '' }}</el-radio>
              <el-radio :label="20" v-model="scope.row.exact" @input="m=>handleChange(m,scope.row,'exact')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="偶有失误">
          <el-table-column label="15" width="90px">
            <template slot-scope="scope">
              <el-radio :label="15" v-model="scope.row.radio1">{{ '' }}</el-radio>
              <el-radio :label="15" v-model="scope.row.exact" @input="m=>handleChange(m,scope.row,'exact')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="频繁错误">
          <el-table-column label="10" width="90px">
            <template slot-scope="scope">
              <el-radio :label="10" v-model="scope.row.radio1">{{ '' }}</el-radio>
              <el-radio :label="10" v-model="scope.row.exact" @input="m=>handleChange(m,scope.row,'exact')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
@@ -61,105 +61,105 @@
        <el-table-column label="操作熟练">
          <el-table-column label="20" width="90px">
            <template slot-scope="scope">
              <el-radio :label="20" v-model="scope.row.radio2">{{ '' }}</el-radio>
              <el-radio :label="20" v-model="scope.row.skill" @input="m=>handleChange(m,scope.row,'skill')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="操作基本熟练">
          <el-table-column label="15" width="120px">
            <template slot-scope="scope">
              <el-radio :label="15" v-model="scope.row.radio2">{{ '' }}</el-radio>
              <el-radio :label="15" v-model="scope.row.skill" @input="m=>handleChange(m,scope.row,'skill')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="需要指导">
          <el-table-column label="12" width="90px">
            <template slot-scope="scope">
              <el-radio :label="12" v-model="scope.row.radio2">{{ '' }}</el-radio>
              <el-radio :label="12" v-model="scope.row.skill" @input="m=>handleChange(m,scope.row,'skill')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
      </el-table-column>
      <el-table-column label="设备维护">
        <el-table-column label="自觉维护">
          <el-table-column label="10" width="90px"">
          <el-table-column label="10" width="90px">
            <template slot-scope="scope">
              <el-radio :label="10" v-model="scope.row.radio3">{{ '' }}</el-radio>
              <el-radio :label="10" v-model="scope.row.preserve" @input="m=>handleChange(m,scope.row,'preserve')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="能维护">
          <el-table-column label="5" width="80px"">
          <el-table-column label="5" width="80px">
            <template slot-scope="scope">
              <el-radio :label="5" v-model="scope.row.radio3">{{ '' }}</el-radio>
              <el-radio :label="5" v-model="scope.row.preserve" @input="m=>handleChange(m,scope.row,'preserve')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="无意识">
          <el-table-column label="2" width="80px"">
          <el-table-column label="2" width="80px">
            <template slot-scope="scope">
              <el-radio :label="2" v-model="scope.row.radio3">{{ '' }}</el-radio>
              <el-radio :label="2" v-model="scope.row.preserve" @input="m=>handleChange(m,scope.row,'preserve')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
      </el-table-column>
      <el-table-column label="遵章守纪">
        <el-table-column label="自觉遵守" >
          <el-table-column label="10" width="90px"">
          <el-table-column label="10" width="90px">
            <template slot-scope="scope">
              <el-radio :label="10" v-model="scope.row.radio4">{{ '' }}</el-radio>
              <el-radio :label="10" v-model="scope.row.discipline" @input="m=>handleChange(m,scope.row,'discipline')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="被动遵守">
          <el-table-column label="7" width="90px"">
          <el-table-column label="7" width="90px">
            <template slot-scope="scope">
              <el-radio :label="7" v-model="scope.row.radio4">{{ '' }}</el-radio>
              <el-radio :label="7" v-model="scope.row.discipline" @input="m=>handleChange(m,scope.row,'discipline')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="经常违纪">
          <el-table-column label="5" width="90px"">
          <el-table-column label="5" width="90px">
            <template slot-scope="scope">
              <el-radio :label="5" v-model="scope.row.radio4">{{ '' }}</el-radio>
              <el-radio :label="5" v-model="scope.row.discipline" @input="m=>handleChange(m,scope.row,'discipline')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
      </el-table-column>
      <el-table-column label="团结协作">
        <el-table-column label="团结协作">
          <el-table-column label="10" width="90px"">
          <el-table-column label="10" width="90px">
            <template slot-scope="scope">
              <el-radio :label="10" v-model="scope.row.radio5">{{ '' }}</el-radio>
              <el-radio :label="10" v-model="scope.row.solidarity" @input="m=>handleChange(m,scope.row,'solidarity')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="基本融洽">
          <el-table-column label="8" width="90px"">
          <el-table-column label="8" width="90px">
            <template slot-scope="scope">
              <el-radio :label="8" v-model="scope.row.radio5">{{ '' }}</el-radio>
              <el-radio :label="8" v-model="scope.row.solidarity" @input="m=>handleChange(m,scope.row,'solidarity')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
      </el-table-column>
      <el-table-column label="5S-3定">
        <el-table-column label="包干区整洁">
          <el-table-column label="10" width="110px"">
          <el-table-column label="10" width="110px">
            <template slot-scope="scope">
              <el-radio :label="10" v-model="scope.row.radio6">{{ '' }}</el-radio>
              <el-radio :label="10" v-model="scope.row.tidy" @input="m=>handleChange(m,scope.row,'tidy')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="存在不清洁点">
          <el-table-column label="7" width="130px"">
          <el-table-column label="7" width="130px">
            <template slot-scope="scope">
              <el-radio :label="7" v-model="scope.row.radio6">{{ '' }}</el-radio>
              <el-radio :label="7" v-model="scope.row.tidy" @input="m=>handleChange(m,scope.row,'tidy')">{{ '' }}</el-radio>
            </template>
          </el-table-column>
        </el-table-column>
      </el-table-column>
      <el-table-column label="得分">
        <el-table-column label="100" width="70px"">
      <el-table-column label="得分" fixed="right">
        <el-table-column label="100" width="70px" prop="total">
        </el-table-column>
      </el-table-column>
    </el-table>
@@ -169,23 +169,46 @@
<script>
export default {
  props:{
    month:String,
    laboratory:Object
    entity:Object,
  },
  data(){
    return{
      tableData:[
        {
          radio0:0,
          radio1:0,
          radio2:0,
          radio3:0,
          radio4:0,
          radio5:0,
          radio6:0,
        }
      ],
      radio:20
      tableData:[],
      loading:false,
    }
  },
  created(){
    this.refreshTable()
  },
  methods:{
    handleChange(value,row,prop){
      row[prop] = Number(value)
      this.$axios.post(this.$api.evaluate.writeEvaluateGroup, {
        ...row
        },{
          headers: {
            'Content-Type': 'application/json'
          },
          noQs:true
        }).then(res => {
          row.total = res.data
        })
    },
    refreshTable(){
      this.loading = true
      this.$axios.post(this.$api.evaluate.getEvaluateGroup, {
          ...this.$parent.entity,
        },{
          headers: {
            'Content-Type': 'application/json'
          }
        }).then(res => {
          this.loading = false
          this.tableData = res.data
        })
    },
    refresh(){
      this.refreshTable()
    }
  }
}
src/components/do/b3-personnel-evaluation/evaluation.vue
@@ -1,7 +1,7 @@
<template>
  <div class="table-item">
    <ValueTable  ref="ValueTable"
                :url="$api.deviceScope.selectDeviceParameter" :componentData="componentData" :key="upIndex" />
                :url="$api.evaluate.page" :componentData="componentData" :key="upIndex" />
  </div>
</template>
@@ -12,14 +12,15 @@
    ValueTable
  },
  props:{
    month:String,
    laboratory:Object
    entity:Object,
  },
  data(){
    return{
      componentData: {
        entity: {
          deviceName: null,
          month: this.entity.month,
          name:this.entity.name,
          departLims:this.entity.departLims,
          orderBy: {
            field: 'id',
            order: 'desc'
@@ -36,8 +37,21 @@
        requiredAdd: [],
        requiredUp: [],
      },
      upIndex:0
      upIndex:0,
    }
  },
  methods:{
    refreshTable(){
      this.componentData.entity = {
        ...this.componentData.entity,
        ...this.$parent.entity
      }
      this.$refs['ValueTable'].selectList()
    },
    refresh(){
            this.upIndex++
      this.refreshTable()
    },
  }
}
</script>
src/components/do/b3-personnel-evaluation/leader-rate.vue
@@ -1,9 +1,9 @@
<template>
  <div class="table-item">
    <p style="text-align: center;margin-bottom: 10px;">{{ laboratory.label }}  {{ Number(month.split('-')[1]) }} 月份组长打分表</p>
    <p style="text-align: center;margin-bottom: 10px;">{{ entity.departLims }}  {{ Number(entity.month.split('-')[1]) }} 月份组长打分表</p>
    <el-table
    :data="tableData"
    style="width: 100%" height="calc(100% - 20px)">
    style="width: 100%" height="calc(100% - 20px)" v-loading="loading">
      <el-table-column
        type="index"
        label="序号"
@@ -16,7 +16,7 @@
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.num0" @change="handleChange" :min="0" :max="25"></el-input-number>
            v-model="scope.row.responsibility" @change="m=>handleChange(m,scope.row,'responsibility')" :min="0" :max="25"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
@@ -25,7 +25,7 @@
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.num1" @change="handleChange" :min="0" :max="25"></el-input-number>
            v-model="scope.row.compliance" @change="m=>handleChange(m,scope.row,'compliance')" :min="0" :max="25"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
@@ -34,7 +34,7 @@
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.num2" @change="handleChange" :min="0" :max="20"></el-input-number>
            v-model="scope.row.positive" @change="m=>handleChange(m,scope.row,'positive')" :min="0" :max="20"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
@@ -43,7 +43,7 @@
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.num3" @change="handleChange" :min="0" :max="10"></el-input-number>
            v-model="scope.row.solidarity" @change="m=>handleChange(m,scope.row,'solidarity')" :min="0" :max="10"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
@@ -52,7 +52,7 @@
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.num4" @change="handleChange" :min="0" :max="10"></el-input-number>
            v-model="scope.row.seasonable" @change="m=>handleChange(m,scope.row,'seasonable')" :min="0" :max="10"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
@@ -61,11 +61,11 @@
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.num5" @change="handleChange" :min="0" :max="10"></el-input-number>
            v-model="scope.row.exact" @change="m=>handleChange(m,scope.row,'exact')" :min="0" :max="10"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
      <el-table-column label="得分">
      <el-table-column label="得分" prop="total">
      </el-table-column>
  </el-table>
  </div>
@@ -74,26 +74,48 @@
<script>
export default {
  props:{
    month:String,
    laboratory:Object
    entity:Object,
  },
  data () {
    return{
      tableData:[
        {
          num0:null,
          num1:null,
          num2:null,
          num3:null,
          num4:null,
          num5:null,
          num6:null,
        }
      ]
        ],
      loading:false,
    }
  },
  created(){
    this.refreshTable()
  },
  methods:{
    handleChange(){}
    handleChange(value,row,prop){
      row[prop] = Number(value)
      this.$axios.post(this.$api.evaluate.writeEvaluateLeader, {
        ...row
        },{
          headers: {
            'Content-Type': 'application/json'
          },
          noQs:true
        }).then(res => {
          row.total = res.data
        })
    },
    refreshTable(){
      this.loading = true
      this.$axios.post(this.$api.evaluate.getEvaluateLeader, {
        ...this.$parent.entity
        },{
          headers: {
            'Content-Type': 'application/json'
          }
        }).then(res => {
          this.loading = false
          this.tableData = res.data
        })
    },
    refresh(){
      this.refreshTable()
    }
  }
}
</script>
src/components/do/b3-personnel-evaluation/supervisor-rate.vue
@@ -1,9 +1,9 @@
<template>
  <div class="table-item">
    <p style="text-align: center;margin-bottom: 10px;">{{ laboratory.label }} {{ Number(month.split('-')[1]) }} 月份主管打分表</p>
    <p style="text-align: center;margin-bottom: 10px;">{{ entity.departLims }} {{ Number(entity.month.split('-')[1]) }} 月份主管打分表</p>
    <el-table
    :data="tableData"
    style="width: 100%" height="calc(100% - 20px)">
    style="width: 100%" height="calc(100% - 20px)" v-loading="loading">
      <el-table-column
        type="index"
        label="序号"
@@ -16,7 +16,7 @@
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.num0" @change="handleChange" :min="0" :max="20"></el-input-number>
            v-model="scope.row.skill" @change="m=>handleChange(m,scope.row,'skill')" :min="0" :max="20"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
@@ -25,7 +25,7 @@
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.num1" @change="handleChange" :min="0" :max="20"></el-input-number>
            v-model="scope.row.compliance" @change="m=>handleChange(m,scope.row,'compliance')" :min="0" :max="20"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
@@ -34,7 +34,7 @@
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.num2" @change="handleChange" :min="0" :max="20"></el-input-number>
            v-model="scope.row.positive" @change="m=>handleChange(m,scope.row,'positive')" :min="0" :max="20"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
@@ -43,7 +43,7 @@
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.num3" @change="handleChange" :min="0" :max="10"></el-input-number>
            v-model="scope.row.tidy" @change="m=>handleChange(m,scope.row,'tidy')" :min="0" :max="10"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
@@ -52,7 +52,7 @@
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.num4" @change="handleChange" :min="0" :max="10"></el-input-number>
            v-model="scope.row.discipline" @change="m=>handleChange(m,scope.row,'discipline')" :min="0" :max="10"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
@@ -61,7 +61,7 @@
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.num5" @change="handleChange" :min="0" :max="10"></el-input-number>
            v-model="scope.row.solidarity" @change="m=>handleChange(m,scope.row,'solidarity')" :min="0" :max="10"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
@@ -70,11 +70,11 @@
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.num6" @change="handleChange" :min="0" :max="10"></el-input-number>
            v-model="scope.row.proposal" @change="m=>handleChange(m,scope.row,'proposal')" :min="0" :max="10"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
      <el-table-column label="得分">
      <el-table-column label="得分" prop="total">
      </el-table-column>
  </el-table>
  </div>
@@ -83,26 +83,47 @@
<script>
export default {
  props:{
    month:String,
    laboratory:Object
    entity:Object,
  },
  data () {
    return{
      tableData:[
        {
          num0:null,
          num1:null,
          num2:null,
          num3:null,
          num4:null,
          num5:null,
          num6:null,
        }
      ]
      tableData:[],
      loading:false,
    }
  },
  created(){
    this.refreshTable()
  },
  methods:{
    handleChange(){}
    handleChange(value,row,prop){
      row[prop] = Number(value)
      this.$axios.post(this.$api.evaluate.writeEvaluateCompetent, {
        ...row
        },{
          headers: {
            'Content-Type': 'application/json'
          },
          noQs:true
        }).then(res => {
          row.total = res.data
        })
    },
    refreshTable(){
      this.loading = true
      this.$axios.post(this.$api.evaluate.getEvaluateCompetent, {
        ...this.$parent.entity
        },{
          headers: {
            'Content-Type': 'application/json'
          }
        }).then(res => {
          this.loading = false
          this.tableData = res.data
        })
    },
    refresh(){
      this.refreshTable()
    }
  }
}
</script>
src/components/do/b3-work-time-management/work-time-statistics.vue
@@ -125,7 +125,9 @@
          inputType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
            },
      entity:{
        month:getYearAndMonthAndDays()
        month:getYearAndMonthAndDays(),
        name:'',
        departLims:''
      },
      entityCopy:{},
      entityCopy0:{},
@@ -194,13 +196,13 @@
      let entity = {...this.entity}
      entity.month = entity.month.split('-')[0]+'-'+entity.month.split('-')[1]
      this.outLoading = true
      this.$axios.get(this.$api.auxiliaryOriginalHours.exportOriginalHours,{
        params:entity,
      this.$axios.post(this.$api.auxiliaryOriginalHours.exportOriginalHours,{
        ...entity
        // params:entity,
      },{responseType: "blob"}).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res],{ type: 'application/octet-stream' });
        console.log(blob)
        const url = URL.createObjectURL(blob);
        const link = document.createElement('a');
        link.href = url;
src/components/view/b3-personnel-evaluation.vue
@@ -22,7 +22,7 @@
      <div class="search_thing">
                <div class="search_label">实验室:</div>
                <div class="search_input">
          <el-select v-model="entity.laboratory" placeholder="全部" size="small" @change="refreshTable()">
          <el-select v-model="entity.departLims" placeholder="全部" size="small" @change="refreshTable()">
                    <el-option v-for="item in laboratoryList" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
@@ -31,7 +31,7 @@
            <div class="search_thing">
                <div class="search_label">人员名称:</div>
                <div class="search_input"><el-input size="small" placeholder="请输入" clearable
                        v-model="entity.deviceName" @keyup.enter.native="refreshTable()"></el-input></div>
                        v-model="entity.name" @keyup.enter.native="refreshTable()"></el-input></div>
            </div>
            <div class="search_thing" style="padding-left: 30px;">
                <el-button size="small" @click="refresh()">重 置</el-button>
@@ -45,10 +45,10 @@
        <el-radio-button label="leaderRate">组长评分</el-radio-button>
        <el-radio-button label="supervisorRate">主管打分</el-radio-button>
      </el-radio-group>
      <el-button type="primary" size="small">导 出</el-button>
      <el-button type="primary" size="small" :loading="outLoading" @click="handleDown">导 出</el-button>
    </div>
    <div class="table">
      <component :is="tabValue" :month="entity.month" :laboratory="getLaboratory()"></component>
      <component :is="tabValue" ref="component" :entity="entity" v-if="laboratoryList.length>0"></component>
    </div>
  </div>
</template>
@@ -68,35 +68,72 @@
  data(){
    return{
      entity:{
        month:new Date().getFullYear()+'-'+(new Date().getMonth() + 1),
        laboratory:''
        month:new Date().getFullYear()+'-'+((new Date().getMonth() + 1) < 10 ? '0'+(new Date().getMonth() + 1):(new Date().getMonth() + 1)),
        departLims:'',
        name:''
      },
      tabValue:'evaluation',
      laboratoryList:[]
      laboratoryList:[],
      outLoading:false,
      copyEntity:null
    }
  },
  mounted(){
  created(){
    this.obtainItemParameterList()
  },
  methods: {
    refreshTable(){},
    refresh(){},
    refreshTable(){
      this.$refs.component.refreshTable()
    },
    refresh(){
      this.entity = this.HaveJson(this.copyEntity)
      this.$refs.component.refresh()
    },
    obtainItemParameterList() {
      this.$axios.get(this.$api.laboratoryScope.obtainItemParameterList).then(res => {
        let data = []
        res.data.forEach(a => {
          data.push({
            label: a.laboratoryName,
            value: a.id
            value: a.laboratoryName
          })
        })
        this.laboratoryList = data
        this.entity.laboratory = data[0].value
        this.entity.departLims = data[0].value
        this.copyEntity = this.HaveJson(this.entity)
      })
    },
    getLaboratory(){
       return this.laboratoryList.find(a=>a.value==this.entity.laboratory)
    }
    handleDown(){
      let url = ''
      let title = ''
      if(this.tabValue=='evaluation'){
        url = this.$api.evaluate.exportEvaluate
        title = '考评表'
      }else if(this.tabValue=='employeeMutualEvaluation'){
        url = this.$api.evaluate.exportEvaluate
        title = '考评表'
      }else if(this.tabValue=='leaderRate'){
        url = this.$api.evaluate.exportEvaluateLeader
        title = '组长评分表'
      }else if(this.tabValue=='supervisorRate'){
        url = this.$api.evaluate.exportEvaluateCompetent
        title = '主管评分表'
      }
      let entity = {...this.entity}
      this.outLoading = true
      this.$axios.post(url,{
        ...entity
      },{responseType: "blob"}).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res],{ type: 'application/octet-stream' });
        const url = URL.createObjectURL(blob);
        const link = document.createElement('a');
        link.href = url;
        link.download = entity.departLims+'-'+entity.month+title+'.xlsx';
        link.click();
      })
    },
  }
}
</script>
src/main.js
@@ -63,10 +63,10 @@
        // config.headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
        // config.headers['Content-Type'] = 'application/json'
    }
    if (config.method === 'post' || config.method === 'put') {
    if ((config.method === 'post' || config.method === 'put')&&!config.noQs) {
        config.data = qs.stringify(config.data)
    }
    if (config.headers['Content-Type'] == 'application/json') {
    if (config.headers['Content-Type'] == 'application/json'&&!config.noQs) {
        config.data = qs.parse(config.data)
    }
    return config