|
@@ -41,7 +41,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="terr-right border-right flex-1">
|
|
|
- <FormBox >
|
|
|
+ <FormBox>
|
|
|
<div class="form-item">
|
|
|
<div class="form-label">启用状态</div>
|
|
|
<div class="form-search">
|
|
@@ -84,7 +84,11 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="accedence_time" label="入职时间"></el-table-column>
|
|
|
+ <el-table-column prop="accedence_time" label="入职时间">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span style="cursor: pointer;" @click="moreMessage(scope.row.id)">{{scope.row.accedence_time}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<!-- <el-table-column prop="id" label="员工标识" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="primary" @click="copyId(scope.row.id)">复制</el-button>
|
|
@@ -130,6 +134,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+
|
|
|
<!-- <el-table-column label="管理上级" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.is_creator != 1 && scope.row.is_official != 0" class="participateRank" style="color:#409eff;" @click="setSuperior(scope.row)">设置</span>
|
|
@@ -179,9 +184,10 @@
|
|
|
style="width:100%;"
|
|
|
v-model="messageMore.accedence_time"
|
|
|
type="date"
|
|
|
+ @change="updateDate"
|
|
|
+ :clearable="false"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="选择日期"
|
|
|
- disabled
|
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="部门" prop="name" :label-width="'100px'">
|
|
@@ -410,6 +416,7 @@
|
|
|
v-model="dept_name"
|
|
|
@change="handleChange"
|
|
|
:options="dept_tree"
|
|
|
+ :disabled="selectTbIndex!=4"
|
|
|
collapse-tags
|
|
|
:props="{checkStrictly: true, value: 'id', label: 'name', multiple: true, children: '_child' }"
|
|
|
ref="dept"
|
|
@@ -535,11 +542,11 @@ export default {
|
|
|
|
|
|
// 人员同步
|
|
|
isShowTb:false,
|
|
|
- selectTbIndex:1,
|
|
|
+ selectTbIndex:4,
|
|
|
tbList: [
|
|
|
- { id: 1, name: '仅同步指定部门内的人员信息(可多选)', kam: '该选择不会包含子部门人员,请确保选中需要同步的人员的直属部门' },
|
|
|
- { id: 2, name: '仅同步部门信息和上下级关系', kam: '仅同步所有部门名称和上下级所属关系,但不同步人员信息' },
|
|
|
- { id: 3, name: '同步全部部门和人员信息 ', kam: '同步全部信息所需时间较长,请关注同步成功后推送的工作通知' },
|
|
|
+ { id: 4, name: '仅同步指定部门内的人员信息(可多选)', kam: '该选择不会包含子部门人员,请确保选中需要同步的人员的直属部门' },
|
|
|
+ { id: 3, name: '仅同步部门信息和上下级关系', kam: '仅同步所有部门名称和上下级所属关系,但不同步人员信息' },
|
|
|
+ { id: 1, name: '同步全部部门和人员信息 ', kam: '同步全部信息所需时间较长,请关注同步成功后推送的工作通知' },
|
|
|
],
|
|
|
dept_tree:[],
|
|
|
dept_name: [],
|
|
@@ -623,8 +630,14 @@ export default {
|
|
|
if(val){
|
|
|
this.dept_name=[];
|
|
|
this.dept_ids=[];
|
|
|
+ this.selectTbIndex==4;
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ diaTableVisible(val){
|
|
|
+ if(!val){
|
|
|
+ this.getEmployee();
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
this.filtration();
|
|
@@ -634,7 +647,6 @@ export default {
|
|
|
this.getEmployeeList();
|
|
|
},
|
|
|
mounted() {
|
|
|
- console.log(this.$moment('2023-06').endOf('month').format('YYYY-MM-DD'))
|
|
|
this.$nextTick(function() {
|
|
|
if (this.$getCache('rule')) {
|
|
|
this.tips_show = false;
|
|
@@ -644,6 +656,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ //获取员工列表
|
|
|
+ updateDate() {
|
|
|
+ this.$axios('POST', '/api/employee/accedence', { employee_id: this.messageMore.id, time:this.messageMore.accedence_time}).then(res => {
|
|
|
+ this.$message.success('已修改')
|
|
|
+ })
|
|
|
+ },
|
|
|
// 递归判断列表,把最后的children设为undefined
|
|
|
getTreeData(data) {
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
@@ -1084,27 +1102,29 @@ export default {
|
|
|
},
|
|
|
//同步信息
|
|
|
tb(is) {
|
|
|
- // if(!is){
|
|
|
- // this.isShowTb=true;
|
|
|
- // return false
|
|
|
- // }
|
|
|
- this.$confirm('即将同步钉钉通讯录的人员名单,确定同步吗?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- this.tbLoading = true;
|
|
|
- this.$axios('post', '/api/ding/department_sync')
|
|
|
- .then(res => {
|
|
|
- this.$message.success({ message: '同步成功' });
|
|
|
- this.dept_id = 0;
|
|
|
- this.getInfo();
|
|
|
- this.page=1;
|
|
|
- this.getEmployee();
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- this.tbLoading = false;
|
|
|
- });
|
|
|
+ if(!is){
|
|
|
+ this.isShowTb=true;
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let data={
|
|
|
+ type:this.selectTbIndex,
|
|
|
+ dept_list:this.dept_ids.toString(),
|
|
|
+ }
|
|
|
+ if(this.selectTbIndex==4&&this.dept_ids.length==0){
|
|
|
+ this.$message.error({ message: '请选择指定部门' });
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.tbLoading = true;
|
|
|
+ this.$axios('post', '/api/ding/site_sync',data).then(res => {
|
|
|
+ this.$message.success({ message: '同步中,成功后将发送工作通知' });
|
|
|
+ this.dept_id = 0;
|
|
|
+ this.getInfo();
|
|
|
+ this.page=1;
|
|
|
+ this.getEmployee();
|
|
|
+ this.isShowTb=false
|
|
|
+ }).finally(() => {
|
|
|
+ this.tbLoading = false;
|
|
|
+ this.isShowTb=false
|
|
|
});
|
|
|
},
|
|
|
//搜索
|
|
@@ -1116,15 +1136,12 @@ export default {
|
|
|
changeIs(e, id) {
|
|
|
var url = e == 1 ? '/api/employee/disable' : '/api/employee/enable';
|
|
|
this.$axios('post', url, { employee_id: [id] }).then(res => {
|
|
|
- if (res) {
|
|
|
- if (e == 0) {
|
|
|
- this.$message.success({ message: '开启成功,可在"角色权限设置对应管理范围"' });
|
|
|
- } else {
|
|
|
- this.$message.success({ message: res.data.msg });
|
|
|
- }
|
|
|
- // this.page=1;
|
|
|
- this.getEmployee();
|
|
|
+ if (e == 0) {
|
|
|
+ this.$message.success({ message: '开启成功,可在"角色权限设置对应管理范围"' });
|
|
|
+ } else {
|
|
|
+ this.$message.success({ message: res.data.msg });
|
|
|
}
|
|
|
+ this.getEmployee();
|
|
|
});
|
|
|
},
|
|
|
//批量开通权限
|
|
@@ -1134,17 +1151,13 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.enable_loading = true;
|
|
|
- this.$axios('post', '/api/employee/enable', { employee_id: this.selectIds })
|
|
|
- .then(res => {
|
|
|
- if (res) {
|
|
|
- this.$message.success({ message: '开启成功,可在"角色权限设置对应管理范围"' });
|
|
|
- this.page=1;
|
|
|
- this.getEmployee();
|
|
|
- }
|
|
|
- })
|
|
|
- .finally(err => {
|
|
|
- this.enable_loading = false;
|
|
|
- });
|
|
|
+ this.$axios('post', '/api/employee/enable', { employee_id: this.selectIds }).then(res => {
|
|
|
+ this.$message.success({ message: '开启成功,可在"角色权限设置对应管理范围"' });
|
|
|
+ this.page=1;
|
|
|
+ this.getEmployee();
|
|
|
+ }).finally(err => {
|
|
|
+ this.enable_loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
//获取公司信息
|
|
|
getInfo(is) {
|
|
@@ -1171,9 +1184,9 @@ export default {
|
|
|
getDepartment() {
|
|
|
this.ruleDeprt = true;
|
|
|
this.$axios('get', '/api/department/tree').then(res => {
|
|
|
- var list = [{id: 0,name: this.info.name,_child: res.data.data.list}];
|
|
|
- this.bmList = list;
|
|
|
- this.dept_tree = this.getTreeData(res.data.data.list);
|
|
|
+ var list = [{id: 0,name: this.info.name,_child: res.data.data.list}];
|
|
|
+ this.bmList = list;
|
|
|
+ this.dept_tree = this.getTreeData(res.data.data.list);
|
|
|
}).finally(() => {
|
|
|
this.ruleDeprt = false;
|
|
|
});
|
|
@@ -1192,16 +1205,15 @@ export default {
|
|
|
data.is_official=is_official;
|
|
|
}
|
|
|
this.$axios('get', '/api/employee/index', data).then(res => {
|
|
|
- this.total = res.data.data.pageInfo.count;
|
|
|
- this.userList = res.data.data.list;
|
|
|
- var visible = this.$getCache('visible');
|
|
|
- if (!visible) {
|
|
|
- this.visible = true;
|
|
|
- }
|
|
|
- })
|
|
|
- .finally(err => {
|
|
|
- this.tableToading = false;
|
|
|
- });
|
|
|
+ this.total = res.data.data.pageInfo.count;
|
|
|
+ this.userList = res.data.data.list;
|
|
|
+ var visible = this.$getCache('visible');
|
|
|
+ if (!visible) {
|
|
|
+ this.visible = true;
|
|
|
+ }
|
|
|
+ }).finally(err => {
|
|
|
+ this.tableToading = false;
|
|
|
+ });
|
|
|
},
|
|
|
visible_close() {
|
|
|
this.$setCache('visible', 'true');
|