|
@@ -2,8 +2,9 @@
|
|
<div class="all-box">
|
|
<div class="all-box">
|
|
<!-- 头部提示 -->
|
|
<!-- 头部提示 -->
|
|
<div class="top-msg margin-bottom">
|
|
<div class="top-msg margin-bottom">
|
|
- <div>当前组织架构和角色同过钉钉同步,上次同步时间
|
|
|
|
- <span v-if="info.sync_time">{{info.sync_time}}</span>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ 当前组织架构和角色同过钉钉同步,上次同步时间
|
|
|
|
+ <span v-if="info.sync_time">{{ info.sync_time }}</span>
|
|
<span v-else>暂未同步</span>
|
|
<span v-else>暂未同步</span>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
@@ -38,15 +39,17 @@
|
|
style="font-size: 14px;color: #606266; width:100%; text-align: left;"
|
|
style="font-size: 14px;color: #606266; width:100%; text-align: left;"
|
|
>
|
|
>
|
|
<img src="../assets/image/one.png" style="width: 20px;margin-right: 5px;" />
|
|
<img src="../assets/image/one.png" style="width: 20px;margin-right: 5px;" />
|
|
- <span class="name">{{ data.name}}</span>
|
|
|
|
|
|
+ <span class="name">{{ data.name }}</span>
|
|
</div>
|
|
</div>
|
|
</el-tree>
|
|
</el-tree>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="terr-right border-right flex-1">
|
|
<div class="terr-right border-right flex-1">
|
|
<div class="margin-bottom">
|
|
<div class="margin-bottom">
|
|
- <el-button @click="participation()" size="medium" type="primary" style="margin-right: 10px;" v-show="selectIds.length>0">参与积分管理</el-button>
|
|
|
|
- <el-input placeholder="输入同事姓名" size="medium" style="width: 230px;" v-model="keywords"><el-button slot="append" icon="el-icon-search" @click="getEmployee()"></el-button></el-input>
|
|
|
|
|
|
+ <el-button @click="participation()" size="medium" type="primary" style="margin-right: 10px;" v-show="selectIds.length > 0">参与积分管理</el-button>
|
|
|
|
+ <el-input placeholder="输入同事姓名" size="medium" style="width: 230px;" v-model="keywords">
|
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="getEmployee()"></el-button>
|
|
|
|
+ </el-input>
|
|
</div>
|
|
</div>
|
|
<el-table :data="userList" @selection-change="handleSelectionChange" v-loading="tableToading">
|
|
<el-table :data="userList" @selection-change="handleSelectionChange" v-loading="tableToading">
|
|
<el-table-column type="selection" width="50"></el-table-column>
|
|
<el-table-column type="selection" width="50"></el-table-column>
|
|
@@ -69,9 +72,12 @@
|
|
<el-table-column label="是否参与积分管理">
|
|
<el-table-column label="是否参与积分管理">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<!-- {{scope.row.is_official}} -->
|
|
<!-- {{scope.row.is_official}} -->
|
|
- <el-switch @change="changeIs($event,scope.row.id)" v-model="scope.row.is_official" :active-value="is" :inactive-value="no"></el-switch>
|
|
|
|
|
|
+ <el-switch @change="changeIs($event, scope.row.id)" v-model="scope.row.is_official" :active-value="is" :inactive-value="no"></el-switch>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <template slot="empty">
|
|
|
|
+ <noData></noData>
|
|
|
|
+ </template>
|
|
</el-table>
|
|
</el-table>
|
|
<div class="pagination">
|
|
<div class="pagination">
|
|
<el-pagination
|
|
<el-pagination
|
|
@@ -91,6 +97,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import noData from '@/components/noData';
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -107,15 +114,18 @@ export default {
|
|
treedata: [1],
|
|
treedata: [1],
|
|
tableData: [],
|
|
tableData: [],
|
|
keywords: '',
|
|
keywords: '',
|
|
- dept_id:0,
|
|
|
|
-
|
|
|
|
|
|
+ dept_id: 0,
|
|
|
|
+
|
|
tableToading: false,
|
|
tableToading: false,
|
|
- tbLoading:false,
|
|
|
|
- selectIds:[],
|
|
|
|
|
|
+ tbLoading: false,
|
|
|
|
+ selectIds: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- watch:{
|
|
|
|
- dept_id(val){
|
|
|
|
|
|
+ components: {
|
|
|
|
+ noData
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ dept_id(val) {
|
|
this.getEmployee();
|
|
this.getEmployee();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -135,33 +145,33 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
//同步信息
|
|
//同步信息
|
|
- tb(){
|
|
|
|
- this.tbLoading=true;
|
|
|
|
- var http1=this.$axios.post('api/ding/department_sync');
|
|
|
|
- var http2=this.$axios.post('api/ding/employee_sync');
|
|
|
|
- Promise.all([http1,http2]).then(res=>{
|
|
|
|
- this.tbLoading=false;
|
|
|
|
- if(res[0]){
|
|
|
|
- this.tbLoading=false;
|
|
|
|
- this.$message.success({message:res[0].data.msg})
|
|
|
|
|
|
+ tb() {
|
|
|
|
+ this.tbLoading = true;
|
|
|
|
+ var http1 = this.$axios.post('api/ding/department_sync');
|
|
|
|
+ var http2 = this.$axios.post('api/ding/employee_sync');
|
|
|
|
+ Promise.all([http1, http2]).then(res => {
|
|
|
|
+ this.tbLoading = false;
|
|
|
|
+ if (res[0]) {
|
|
|
|
+ this.tbLoading = false;
|
|
|
|
+ this.$message.success({ message: res[0].data.msg });
|
|
this.getInfo();
|
|
this.getInfo();
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ });
|
|
},
|
|
},
|
|
//是否开通
|
|
//是否开通
|
|
- changeIs(e,id){
|
|
|
|
- var url=e==1? 'api/employee/enable':'api/employee/disable';
|
|
|
|
- this.$axios.post(url,{ employee_id:[id]}).then(res => {
|
|
|
|
- if(res){
|
|
|
|
- this.$message.success({message:res.data.msg})
|
|
|
|
|
|
+ changeIs(e, id) {
|
|
|
|
+ var url = e == 1 ? 'api/employee/enable' : 'api/employee/disable';
|
|
|
|
+ this.$axios.post(url, { employee_id: [id] }).then(res => {
|
|
|
|
+ if (res) {
|
|
|
|
+ this.$message.success({ message: res.data.msg });
|
|
}
|
|
}
|
|
this.getEmployee();
|
|
this.getEmployee();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//批量开通权限
|
|
//批量开通权限
|
|
- participation(){
|
|
|
|
- this.$axios.post('api/employee/enable',{ employee_id: this.selectIds}).then(res => {
|
|
|
|
- if(res){
|
|
|
|
|
|
+ participation() {
|
|
|
|
+ this.$axios.post('api/employee/enable', { employee_id: this.selectIds }).then(res => {
|
|
|
|
+ if (res) {
|
|
this.getEmployee();
|
|
this.getEmployee();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -174,16 +184,16 @@ export default {
|
|
},
|
|
},
|
|
//选择员工
|
|
//选择员工
|
|
handleSelectionChange(e) {
|
|
handleSelectionChange(e) {
|
|
- var arr=[];
|
|
|
|
- for(var item in e){
|
|
|
|
|
|
+ var arr = [];
|
|
|
|
+ for (var item in e) {
|
|
arr.push(e[item].id);
|
|
arr.push(e[item].id);
|
|
}
|
|
}
|
|
- this.selectIds=arr;
|
|
|
|
|
|
+ this.selectIds = arr;
|
|
},
|
|
},
|
|
//点击部门
|
|
//点击部门
|
|
handleNodeClick(e) {
|
|
handleNodeClick(e) {
|
|
this.page = 1;
|
|
this.page = 1;
|
|
- this.dept_id=e.id;
|
|
|
|
|
|
+ this.dept_id = e.id;
|
|
},
|
|
},
|
|
//获取部门
|
|
//获取部门
|
|
getDepartment() {
|
|
getDepartment() {
|
|
@@ -212,7 +222,7 @@ export default {
|
|
},
|
|
},
|
|
//页码变更
|
|
//页码变更
|
|
handleCurrentChange: function(val) {
|
|
handleCurrentChange: function(val) {
|
|
- this.page = val ;
|
|
|
|
|
|
+ this.page = val;
|
|
this.getEmployee();
|
|
this.getEmployee();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -220,7 +230,7 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped="scoped">
|
|
<style lang="scss" scoped="scoped">
|
|
-.name{
|
|
|
|
|
|
+.name {
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|