licp
2024-06-13 b3c202648513fc01b69e09b4e3bbe1865a0b6b8c
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
    }
  }
}