|
@@ -44,6 +44,15 @@
|
|
|
<span slot="title">请假审批流程</span>
|
|
|
</template>
|
|
|
</el-menu-item>
|
|
|
+
|
|
|
+ <el-menu-item index="6" v-if="user.role != 0">
|
|
|
+ <template slot="title">
|
|
|
+ <i class="iconfont firerock-icontianbao"></i>
|
|
|
+ <span slot="title">年假管理</span>
|
|
|
+ </template>
|
|
|
+ </el-menu-item>
|
|
|
+
|
|
|
+
|
|
|
</el-menu>
|
|
|
</el-col>
|
|
|
</div>
|
|
@@ -249,7 +258,7 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 统计部分 -->
|
|
|
- <div v-if="displayTable && apk && apk2 == false" class="tops">
|
|
|
+ <div v-if="displayTable && apk && apk2 == 4" class="tops">
|
|
|
<!-- 公共 -->
|
|
|
<div class="ctons">
|
|
|
<div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
|
|
@@ -313,7 +322,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div v-if="displayTable && apk && apk2" class="tops">
|
|
|
+ <div v-if="displayTable && apk && apk2 == 5" class="tops">
|
|
|
|
|
|
<div class="ctons">
|
|
|
<el-col :span="6" >
|
|
@@ -376,7 +385,78 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
</div>
|
|
|
-
|
|
|
+ <!-- -------------- -->
|
|
|
+ <div v-if="displayTable && apk && apk2 == 6" class="tops">
|
|
|
+ <div class="ctons">
|
|
|
+ <div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
|
|
|
+ <div style="display: inline-block;width: 350px">
|
|
|
+ <el-input style="float:left;" v-model="keywordAl" class="input-with-select" placeholder="请输入人员搜索" clearable="true" size="small">
|
|
|
+ <el-button slot="append" @click="searchAl()" icon="el-icon-search"></el-button>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <div style="display: inline-block;width: 340px;margin-left:100px">
|
|
|
+ <span style="display: inline-block;margin: 0 15px 0 20px;color: rgb(96, 98, 102);">按部门筛选</span>
|
|
|
+ <el-cascader
|
|
|
+ filterable
|
|
|
+ v-model="NcurDeptId"
|
|
|
+ placeholder="请选择部门/指定人员"
|
|
|
+ size="small"
|
|
|
+ style="width: 50%"
|
|
|
+ @change="chooseDept"
|
|
|
+ :options="Nsdata"
|
|
|
+ :props="{ checkStrictly: true, expandTrigger: 'hover' }"
|
|
|
+ :show-all-levels="false">
|
|
|
+ </el-cascader>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-table v-loading="loading" :data="iAlDataS" height="780px" style="width: 100%">
|
|
|
+ <el-table-column prop="name" label="姓名" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.name">
|
|
|
+ {{scope.row.name}}
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <span>暂无请假统计</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="Dpm" label="所在部门" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.Dpm}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="AltimeAll" label="每年年假天数" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.AltimeAll}}天
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="AltimeAlr" label="剩余年假天数" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.AltimeAll - scope.row.AltimeAlr}}天
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="id" label="设置">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="small" @click="changeAltime(scope.row.id)">设置</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-dialog title="请设置年假时限" v-if="Alshow" :visible.sync="Alshow" width="500px">
|
|
|
+ <el-form label-width="100px">
|
|
|
+ <el-form-item label="设置总年假天数" >
|
|
|
+ <el-input v-model="Alchange" type="number" placeholder="请输入天数"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="default" @click="delAltime" v-if="!isAdd" style="float:left;">取消</el-button>
|
|
|
+ <el-button type="primary" @click="chgAltime" >确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+<!-- ------------------- -->
|
|
|
</div>
|
|
|
<!-- 请假单详情 -->
|
|
|
<el-dialog title="请假单详情" :visible.sync="dialog" width="1000px" @close="bangd()">
|
|
@@ -593,9 +673,22 @@ export default {
|
|
|
curUserId : null,
|
|
|
dialogVisible: false,
|
|
|
soption : null,
|
|
|
- susers: []
|
|
|
|
|
|
- //
|
|
|
+ Alshow: false,
|
|
|
+ Alchange: '',
|
|
|
+ susers: [],
|
|
|
+ keywordAl: '',
|
|
|
+ NcurDeptId:null,
|
|
|
+ Nsdata : [],
|
|
|
+ AlData : [],
|
|
|
+ iAlDataS: [],
|
|
|
+ iAlData : [
|
|
|
+ {name: "杨峰", id: "7913998191517310976", Dpm:"软件开发部", AltimeAll: 2, AltimeAlr: 1},
|
|
|
+ {name: "赵四", id: "123456789", Dpm:"美术中心", AltimeAll: 3, AltimeAlr: 1},
|
|
|
+ {name: "刘能", id: "987654321", Dpm:"策划部", AltimeAll: 3, AltimeAlr: 2},
|
|
|
+ ]
|
|
|
+
|
|
|
+ // ------------------
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -612,9 +705,39 @@ export default {
|
|
|
mounted() {
|
|
|
this.getUsers() // 获取人员信息
|
|
|
this.getDepartment();
|
|
|
+ this.getAl()
|
|
|
},
|
|
|
filters: {},
|
|
|
methods: {
|
|
|
+ changeAltime(id){
|
|
|
+ this.Alshow = true
|
|
|
+ console.log("id",id);
|
|
|
+ },
|
|
|
+ searchAl(){
|
|
|
+ this.iAlDataS = []
|
|
|
+ for (let i = 0; i < this.iAlData.length; i++) {
|
|
|
+ if (this.iAlData[i].name.indexOf(this.keywordAl) != -1) {
|
|
|
+ this.iAlDataS.push(this.iAlData[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ delAltime(){
|
|
|
+
|
|
|
+ },
|
|
|
+ chgAltime(){
|
|
|
+
|
|
|
+ },
|
|
|
+ getAl(){
|
|
|
+ this.http.get('/user-yearleave-setting/list',
|
|
|
+ res => {
|
|
|
+ if(res.code == "ok"){
|
|
|
+ this.iAlData = res.data
|
|
|
+ console.log("getAl",res.data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ },
|
|
|
+ // ---------
|
|
|
|
|
|
handleNodeClick(data) {
|
|
|
if(this.depData == null || data.id != this.depData.id) {
|
|
@@ -658,7 +781,8 @@ export default {
|
|
|
{value: 1 , label : "部门" , children : this.changeArr(list1)},
|
|
|
{value: 2 , label : "指定人员",children : this.susers}
|
|
|
]
|
|
|
- console.log("列表",this.soption);
|
|
|
+ this.Nsdata = list1
|
|
|
+ // console.log("列表",this.Nsdata);
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -857,7 +981,7 @@ export default {
|
|
|
this.addForm.leaveType = index
|
|
|
},
|
|
|
staffs(key, keyPath) {
|
|
|
- console.log("keypath",keyPath)
|
|
|
+ // console.log("keypath",keyPath)
|
|
|
if (keyPath[0] == '1') {
|
|
|
this.displayTable = false;
|
|
|
this.apk = false
|
|
@@ -867,12 +991,18 @@ export default {
|
|
|
} else if(keyPath[0] == '4'){
|
|
|
this.displayTable = true;
|
|
|
this.apk = true
|
|
|
- this.apk2 = false
|
|
|
+ this.apk2 = 4
|
|
|
+ this.statistical()
|
|
|
+ } else if(keyPath[0] == '5'){
|
|
|
+ this.displayTable = true;
|
|
|
+ this.apk2 = 5
|
|
|
+ this.apk = true
|
|
|
this.statistical()
|
|
|
} else {
|
|
|
this.displayTable = true;
|
|
|
- this.apk2 = true
|
|
|
+ this.apk2 = 6
|
|
|
this.apk = true
|
|
|
+ this.iAlDataS = this.iAlData
|
|
|
this.statistical()
|
|
|
}
|
|
|
},
|