From 98810eb52a46ec72f2bc3d89be8ea42c33d55c5f Mon Sep 17 00:00:00 2001
From: gaoluyang <gaoluyang@rengu.cc>
Date: 星期三, 17 七月 2024 10:14:49 +0800
Subject: [PATCH] 日工时管理的辅助工时的录入数据,完成一个数据的录入后页面不跳转,但是弹窗的内容清空继续新增录入

---
 src/components/do/b3-work-time-management/work-time-statistics.vue |   50 ++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/src/components/do/b3-work-time-management/work-time-statistics.vue b/src/components/do/b3-work-time-management/work-time-statistics.vue
index 380987a..3b873af 100644
--- a/src/components/do/b3-work-time-management/work-time-statistics.vue
+++ b/src/components/do/b3-work-time-management/work-time-statistics.vue
@@ -40,18 +40,20 @@
 				<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;">
-      <el-radio-button label="value0">
-        鍘熷宸ユ椂
-      </el-radio-button>
-      <el-radio-button label="value1">
-        淇宸ユ椂
-      </el-radio-button>
-    </el-radio-group>
+    <div style="text-align: left">
+      <el-radio-group v-model="currentTable" size="small" :key="'111'" style="margin-top: 10px;">
+        <el-radio-button label="value0">
+          鍘熷宸ユ椂
+        </el-radio-button>
+        <el-radio-button label="value1">
+          淇宸ユ椂
+        </el-radio-button>
+      </el-radio-group>
+    </div>
     <div class="table">
       <ValueTable ref="ValueTable0"
         v-if="currentTable == 'value0'"
@@ -78,6 +80,8 @@
   },
   data () {
     return{
+      down:false,
+      up:false,
       componentData: {
 					entity: {
 						month: getYearAndMonthAndDays().split('-')[0]+'-'+getYearAndMonthAndDays().split('-')[1],
@@ -123,7 +127,9 @@
           inputType:聽'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
 			},
       entity:{
-        month:getYearAndMonthAndDays()
+        month:getYearAndMonthAndDays(),
+        name:'',
+        departLims:''
       },
       entityCopy:{},
       entityCopy0:{},
@@ -139,6 +145,7 @@
     this.getUsers()
     this.entityCopy = this.HaveJson(this.componentData.entity);
     this.entityCopy0 = this.HaveJson(this.componentData0.entity);
+    this.getPower()
   },
   methods: {
     refresh(){
@@ -191,13 +198,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;
@@ -207,6 +214,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
     }
   }
 }

--
Gitblit v1.9.3