|
@@ -64,6 +64,15 @@
|
|
|
v-hasPermi="['qw:user:sync']"
|
|
|
>同步企微员工和部门</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ size="mini"
|
|
|
+ @click="synNameOpen=true"
|
|
|
+ v-hasPermi="['qw:user:sync']"
|
|
|
+ >同步企微员工名称</el-button>
|
|
|
+ </el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -178,6 +187,26 @@
|
|
|
<el-button @click="synOpen=false">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="选择企微主体" :visible.sync="synNameOpen" width="800px" append-to-body>
|
|
|
+
|
|
|
+ <el-form label-width="80px">
|
|
|
+ <el-form-item label="企微公司" prop="corpId">
|
|
|
+ <el-select v-model="synNameform.corpId" placeholder="企微公司" >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in myQwCompanyList"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="synNameSubmitForm">确 定</el-button>
|
|
|
+ <el-button @click="synNameOpen=false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<!-- 添加或修改参数配置对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
@@ -371,10 +400,11 @@ import { getToken } from "@/utils/auth";
|
|
|
import { treeselect } from "@/api/company/companyDept";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
-import {bindQwUser, getQwUserList, addQwUser, getQwUser, getQwUserByIds} from '@/api/qw/user';
|
|
|
+import {bindQwUser, getQwUserList, addQwUser, getQwUser, getQwUserByIds,addQwUserName} from '@/api/qw/user';
|
|
|
import { syncDept } from '@/api/qw/qwDept';
|
|
|
import { getMyQwUserList,getMyQwCompanyList } from "@/api/qw/user";
|
|
|
import selectUser from "@/views/company/components/selectQwUser.vue";
|
|
|
+import { getConfigByKey } from "@/api/company/companyConfig";
|
|
|
export default {
|
|
|
name: "User",
|
|
|
components: { Treeselect ,selectUser},
|
|
@@ -394,6 +424,8 @@ export default {
|
|
|
ids: [],
|
|
|
synform:{corpId:null},
|
|
|
synOpen:false,
|
|
|
+ synNameform:{corpId:null},
|
|
|
+ synNameOpen:false,
|
|
|
// 非单个禁用
|
|
|
single: true,
|
|
|
// 非多个禁用
|
|
@@ -441,6 +473,7 @@ export default {
|
|
|
citysAreaList:[],
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
+ form1: {},
|
|
|
defaultProps: {
|
|
|
children: "children",
|
|
|
label: "label",
|
|
@@ -533,6 +566,9 @@ export default {
|
|
|
this.getDicts("sys_qw_user_status").then(response => {
|
|
|
this.qwStatusOptions = response.data;
|
|
|
});
|
|
|
+ getConfigByKey("his.login").then(response => {
|
|
|
+ this.form1 =JSON.parse(response.data.configValue);
|
|
|
+ });
|
|
|
getCitysAreaList().then(res=>{
|
|
|
this.citysAreaList=res.data;
|
|
|
})
|
|
@@ -705,7 +741,8 @@ export default {
|
|
|
this.roleOptions = response.roles;
|
|
|
this.open = true;
|
|
|
this.title = "添加员工";
|
|
|
- this.form.password = "ylrz147..";
|
|
|
+ this.form.password = this.form1.loginPassword;
|
|
|
+ console.log(" this.form1 ", this.form1)
|
|
|
});
|
|
|
},
|
|
|
qwBind(row){
|
|
@@ -824,24 +861,41 @@ export default {
|
|
|
synSubmitForm() {
|
|
|
this.synOpen=false;
|
|
|
this.loading=true;
|
|
|
- this.msgSuccess("");
|
|
|
+ /*this.msgSuccess("");
|
|
|
|
|
|
let loadingRock = this.$loading({
|
|
|
lock: true,
|
|
|
text: '同步中.....请等待.....请不要重复点击!!',
|
|
|
spinner: 'el-icon-loading',
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
- });
|
|
|
+ });*/
|
|
|
|
|
|
|
|
|
addQwUser(this.synform.corpId).then(response => {
|
|
|
- this.msgSuccess("同步成功");
|
|
|
+ //this.msgSuccess("同步成功");
|
|
|
+ this.msgSuccess("正在同步中...");
|
|
|
this.getList();
|
|
|
this.synOpen=false;
|
|
|
}).finally(()=>{
|
|
|
this.loading=false;
|
|
|
this.synOpen=false;
|
|
|
- loadingRock.close();
|
|
|
+ //loadingRock.close();
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ synNameSubmitForm() {
|
|
|
+ this.synNameOpen=false;
|
|
|
+ this.loading=true;
|
|
|
+
|
|
|
+ addQwUserName(this.synNameform.corpId).then(response => {
|
|
|
+ // this.msgSuccess("同步成功");
|
|
|
+ this.msgSuccess("正在同步中...");
|
|
|
+ this.getList();
|
|
|
+ this.synNameOpen=false;
|
|
|
+ }).finally(()=>{
|
|
|
+ this.loading=false;
|
|
|
+ this.synNameOpen=false;
|
|
|
+ //loadingRock.close();
|
|
|
});
|
|
|
},
|
|
|
/**
|