|
@@ -2,8 +2,11 @@
|
|
<div>
|
|
<div>
|
|
<BasicTable @register="registerTable" :loading="loading">
|
|
<BasicTable @register="registerTable" :loading="loading">
|
|
<template #toolbar v-if="permCode === '001'">
|
|
<template #toolbar v-if="permCode === '001'">
|
|
- <a-button type="primary" @click="handleRefresh" :loading="refreshLoading" :disabled="refreshLoading">
|
|
|
|
- {{ t('wechat.wx.refreshWorkPhone') }}
|
|
|
|
|
|
+ <a-button type="primary" @click="handleRefreshWorkPhone" :loading="refreshWorkPhoneLoading" :disabled="refreshWorkPhoneLoading">
|
|
|
|
+ 同步企微
|
|
|
|
+ </a-button>
|
|
|
|
+ <a-button type="primary" @click="handleRefreshWxWorkPhone" :loading="refreshWxWorkPhoneLoading" :disabled="refreshWxWorkPhoneLoading">
|
|
|
|
+ 同步个微
|
|
</a-button>
|
|
</a-button>
|
|
<a-button type="primary" @click="handleCreate">
|
|
<a-button type="primary" @click="handleCreate">
|
|
{{ t('wechat.wx.addWx') }}
|
|
{{ t('wechat.wx.addWx') }}
|
|
@@ -217,7 +220,7 @@
|
|
import { getPermCode } from '@/api/sys/user';
|
|
import { getPermCode } from '@/api/sys/user';
|
|
import { useDrawer } from '@/components/Drawer';
|
|
import { useDrawer } from '@/components/Drawer';
|
|
import WxDrawer from './WxDrawer.vue';
|
|
import WxDrawer from './WxDrawer.vue';
|
|
- import { getServerList, RefreshWorkPhone } from '@/api/wechat/server';
|
|
|
|
|
|
+ import { getServerList, RefreshWorkPhone, RefreshQxWorkPhone } from '@/api/wechat/server';
|
|
import { getContactList } from '@/api/wechat/contact';
|
|
import { getContactList } from '@/api/wechat/contact';
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useI18n } from 'vue-i18n';
|
|
|
|
|
|
@@ -245,7 +248,8 @@
|
|
const blackWhiteModalVisible = ref(false);
|
|
const blackWhiteModalVisible = ref(false);
|
|
const tokenVisible = ref(false);
|
|
const tokenVisible = ref(false);
|
|
const loading = ref(false); // 添加 loading 状态
|
|
const loading = ref(false); // 添加 loading 状态
|
|
- const refreshLoading = ref(false);
|
|
|
|
|
|
+ const refreshWorkPhoneLoading = ref(false);
|
|
|
|
+ const refreshWxWorkPhoneLoading = ref(false);
|
|
const recordId = ref(undefined);
|
|
const recordId = ref(undefined);
|
|
const blackWhiteForm = reactive({
|
|
const blackWhiteForm = reactive({
|
|
allowList: [],
|
|
allowList: [],
|
|
@@ -478,11 +482,18 @@
|
|
isUpdate: !isUpdate.value,
|
|
isUpdate: !isUpdate.value,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- // 同步工作手机
|
|
|
|
- async function handleRefresh() {
|
|
|
|
- refreshLoading.value = true
|
|
|
|
|
|
+ // 同步个微
|
|
|
|
+ async function handleRefreshWorkPhone() {
|
|
|
|
+ refreshWorkPhoneLoading.value = true
|
|
|
|
+ await RefreshQxWorkPhone()
|
|
|
|
+ refreshWorkPhoneLoading.value = false
|
|
|
|
+ reload()
|
|
|
|
+ }
|
|
|
|
+ // 同步企微
|
|
|
|
+ async function handleRefreshWxWorkPhone() {
|
|
|
|
+ refreshWxWorkPhoneLoading.value = true
|
|
await RefreshWorkPhone()
|
|
await RefreshWorkPhone()
|
|
- refreshLoading.value = false
|
|
|
|
|
|
+ refreshWxWorkPhoneLoading.value = false
|
|
reload()
|
|
reload()
|
|
}
|
|
}
|
|
function handleSwitchChange(checked, event) {
|
|
function handleSwitchChange(checked, event) {
|