From 5612ee75d4c64c215e334e8e7577f4486b55ef49 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 17 七月 2024 09:43:27 +0800
Subject: [PATCH] 修改部分bug
---
src/components/do/b3-work-time-management/work-time-management.vue | 64 ++++++++++++++++++++++++++++---
1 files changed, 57 insertions(+), 7 deletions(-)
diff --git a/src/components/do/b3-work-time-management/work-time-management.vue b/src/components/do/b3-work-time-management/work-time-management.vue
index b36de84..f47b25e 100644
--- a/src/components/do/b3-work-time-management/work-time-management.vue
+++ b/src/components/do/b3-work-time-management/work-time-management.vue
@@ -1,7 +1,7 @@
<template>
<div class="work-time-management">
<div class="search">
- <div class="search_thing">
+ <!-- <div class="search_thing">
<div class="search_label">鍛ㄦ锛�</div>
<div class="search_input" style="display: flex;align-items: center;">
<el-input size="small" placeholder="寮�濮嬪懆娆�" clearable
@@ -10,7 +10,7 @@
<el-input size="small" placeholder="缁撴潫鍛ㄦ" clearable
v-model="entity.week2"></el-input>
</div>
- </div>
+ </div> -->
<div class="search_thing" style="width: 200px;">
<div class="search_label">鏄熸湡锛�</div>
<el-select v-model="entity.weekDay" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()" clearable>
@@ -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> 浜ч噺宸ユ椂姹囨�伙細<span style="font-size: 16px;color: #3A7BFA;">{{totalInfo['浜ч噺宸ユ椂姹囨��']?totalInfo['浜ч噺宸ユ椂姹囨��']:0}}</span> 杈呭姪宸ユ椂姹囨�伙細<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> 浜ч噺宸ユ椂姹囨�伙細<span style="font-size: 16px;color: #3A7BFA;" v-if="totalInfo">{{totalInfo['浜ч噺宸ユ椂姹囨��']?totalInfo['浜ч噺宸ユ椂姹囨��']:0}}</span> 杈呭姪宸ユ椂姹囨�伙細<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,11 +218,13 @@
data () {
return{
entity:{},
+ down:false,
+ add:false,
componentData: {
entity: {
week: null,
weekDay: null,
- dateTime: null,
+ dateTime: new Date(),
name:null,
orderBy: {
field: 'id',
@@ -333,6 +337,7 @@
requiredAdd: [],
requiredUp: []
},
+ addFileVisible:false,
entityCopy1: {},
upIndex1:100,
weekList:[
@@ -393,7 +398,7 @@
label:'宸叉壒鍑�'
},
],
- totalInfo:{},
+ totalInfo:null,
auxiliaryWorking:null,
outLoading:false
}
@@ -458,8 +463,53 @@
this.entityCopy1 = this.HaveJson(this.componentData1.entity);
this.componentData.tagField.weekDay.select = this.weekList
this.componentData.selectField.weekDay.select = this.weekList
+ this.getPower()
},
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
+ }
+ console.log(add)
+ if (power[i].menuMethod == 'updateAuxiliaryWorkingHoursDay') {
+ up = true
+ }
+ if (power[i].menuMethod == 'check') {
+ check = true
+ }
+ if (power[i].menuMethod == 'approve') {
+ ratify = true
+ }
+ }
+ if (!ratify) {
+ 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)
},
--
Gitblit v1.9.3