Commit 0dd8bd46 authored by Mac's avatar Mac

1

parent d29114b5
......@@ -77,7 +77,8 @@
<div class="col-2 q-table__title">员工管理</div>
<q-space />
<div class="page-option">
<!-- <q-btn color="accent" size="sm" class="q-mr-md" label="同步到微信" @click="synchronization()" /> -->
<q-btn color="accent" size="sm" class="q-mr-md" label="同步到微信" @click="synchronization()"
v-if="DeptEmpEnable==1" />
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增员工" @click="EditManager(null,0)" />
<q-btn-dropdown outline size="sm" color="dark" label="更多">
......@@ -182,7 +183,7 @@
<q-item-label>重置密码</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="khHandover(props.row)">
<q-item clickable v-close-popup @click="khHandover(props.row)" v-if='DeptEmpEnable==1'>
<q-item-section>
<q-item-label>客户交接</q-item-label>
</q-item-section>
......@@ -228,7 +229,7 @@
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn class="q-mr-md" label="取消" @click="isDetails=false" />
<q-btn color="accent" class="q-mr-md" label="确定" @click="saveOrderInfo()" :loading="jtloading"/>
<q-btn color="accent" class="q-mr-md" label="确定" @click="saveOrderInfo()" :loading="jtloading" />
</q-card-actions>
</q-card>
......@@ -247,7 +248,8 @@
} from '../../api/school/index'
import {
SetSynvEduEmployee,
setUserCoustomerTransfer
setUserCoustomerTransfer,
getWeChatConfigInfo
} from '../../api/system/wechat';
import {
BatchResetUserPassword
......@@ -284,7 +286,7 @@
return {
currentUrl: "",
isDetails: false,
jtloading:false,
jtloading: false,
columns: [{
name: 'desc',
required: true,
......@@ -422,7 +424,8 @@
ChannelTransfer: '1'
},
Employeelist: [],
AllEmployeelist: []
AllEmployeelist: [],
DeptEmpEnable: 0,//是否显示企业微信信息 1 显示
}
},
mounted() {
......@@ -433,7 +436,7 @@
this.queryPostList(0);
this.getLeaveState();
this.queryEmployee()
this.getmicrodeploy()//获取企业微信的配置
},
methods: {
resetSearch() {
......@@ -747,6 +750,14 @@
});
},
synchronization() {
this.$q.dialog({
title: '提示信息',
message: '是否同步员工数据到企业微信里?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
Loading.show({
message: '数据正在同步中,请稍后进入企业微信查看',
spinner: QSpinnerPie
......@@ -767,6 +778,10 @@
Loading.hide()
})
}).onCancel(() => {
});
},
queryEmployee() {//下拉人员列表
......@@ -813,7 +828,7 @@
})
return
}
if(this.joinMsg.CustomerTransfer ==2 && this.joinMsg.ChannelTransfer==2){
if (this.joinMsg.CustomerTransfer == 2 && this.joinMsg.ChannelTransfer == 2) {
this.$q.notify({
type: 'negative',
message: `转移目标必须选择一项`,
......@@ -823,7 +838,7 @@
}
this.jtloading = true
setUserCoustomerTransfer(this.joinMsg).then(res => {
if(res.Code==1)
if (res.Code == 1)
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
......@@ -840,6 +855,13 @@
})
},
getmicrodeploy() {
getWeChatConfigInfo({}).then(res => {
if (res.Code == 1) {
this.DeptEmpEnable = res.Data.DeptEmpEnable
}
})
}
},
}
......
......@@ -34,7 +34,7 @@
<div class="col-2 q-table__title">部门信息</div>
<q-space />
<div class="page-option">
<!-- <q-btn color="accent" size="sm" class="q-mr-md" label="同步到微信" @click="synchronization()" /> -->
<q-btn color="accent" size="sm" class="q-mr-md" label="同步到微信" @click="synchronization()" v-if="DeptEmpEnable==1" />
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增部门" @click="EditDept(null)" />
<q-btn color="secondary" flat size="sm" icon="iconfont icon-zuzhijiagou" label="组织机构图"
@click="gotoRelation()" />
......@@ -83,6 +83,7 @@
} from '../../api/system/dept'
import {
setSyncEduDepartment,
getWeChatConfigInfo
} from '../../api/system/wechat';
import {
getSchoolDropdown,
......@@ -196,12 +197,16 @@
schoolList: [], //校区列表
DeptTierList: [], //部门层级
DeptTreeList: [], //部门树形结构列表
DeptEmpEnable: 0,//是否显示企业微信信息 1 显示
}
},
created() {
this.queryDeptTier();
this.queryDeptTree();
this.getSchool();
this.getmicrodeploy()//获取企业微信的配置
},
mounted() {
this.currentUrl = this.$route.path;
......@@ -304,9 +309,17 @@
this.isShowDeptForm = true;
},
synchronization(){
this.$q.dialog({
title: '提示信息',
message: '是否同步部门数据到企业微信里?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
Loading.show({
message: '数据正在同步中,请稍后进入企业微信查看',
spinner:QSpinnerPie
spinner: QSpinnerPie
})
setSyncEduDepartment({}).then(res => {
if (res.Code == 1) {
......@@ -320,10 +333,14 @@
Loading.hide()
}
})
.catch(err=>{
.catch(err => {
Loading.hide()
})
}).onCancel(() => {
});
},
//关闭弹窗
......@@ -370,6 +387,13 @@
returnData(data) {
this.msg.School_Id = data;
this.resetSearch()
},
getmicrodeploy() {
getWeChatConfigInfo({}).then(res => {
if (res.Code == 1) {
this.DeptEmpEnable = res.Data.DeptEmpEnable
}
})
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment