服务指令同步
This commit is contained in:
parent
11373acd11
commit
dd291f05ad
|
@ -128,8 +128,8 @@
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
<a-divider type="vertical" style="background-color: #CDCDCF" />
|
<a-divider type="vertical" style="background-color: #CDCDCF" />
|
||||||
<a-button type="primary" @click="removeAll" size="small">全部移除</a-button>
|
<a-button type="primary" @click="removeAll" size="small">全部移除</a-button>
|
||||||
<a-divider type="vertical" style="background-color: #CDCDCF" />
|
<!-- <a-divider type="vertical" style="background-color: #CDCDCF" />
|
||||||
<a-button type="warning" @click="syncFunc" size="small">同步</a-button>
|
<a-button type="warning" @click="syncFunc" size="small">同步</a-button> -->
|
||||||
<BasicTable
|
<BasicTable
|
||||||
:dataSource="targetChooseType == 'one' ? (targetType == 'needsync' ? rightNeedAddList : rightSourceList) : rightNeedAddList"
|
:dataSource="targetChooseType == 'one' ? (targetType == 'needsync' ? rightNeedAddList : rightSourceList) : rightNeedAddList"
|
||||||
:columns="targetChooseType == 'one' ? (targetType == 'needsync' ? targetColumns : targetSourceColumns) : targetSourceColumns"
|
:columns="targetChooseType == 'one' ? (targetType == 'needsync' ? targetColumns : targetSourceColumns) : targetSourceColumns"
|
||||||
|
@ -493,6 +493,7 @@ defineExpose({
|
||||||
controlShowJSCom,
|
controlShowJSCom,
|
||||||
initTargetList,
|
initTargetList,
|
||||||
cleanTargetSourceData,
|
cleanTargetSourceData,
|
||||||
|
syncFunc,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -21,14 +21,14 @@
|
||||||
style="margin-right: 10px;">镜像</a-button>
|
style="margin-right: 10px;">镜像</a-button>
|
||||||
<a-badge :count="609" style="margin-right: 10px;">
|
<a-badge :count="609" style="margin-right: 10px;">
|
||||||
<a-button type="primary" preIcon="ant-design:eye-outlined" style="margin-right: 10px;"
|
<a-button type="primary" preIcon="ant-design:eye-outlined" style="margin-right: 10px;"
|
||||||
@click="handleJingxiang">查看可新增指令</a-button>
|
@click="handleLookNewDirectives">查看可新增指令</a-button>
|
||||||
</a-badge>
|
</a-badge>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<OrgListCom ref="orgListComRef" :title="queryParam.title" @handleOrgDetail="handleDetail">
|
<OrgListCom ref="orgListComRef" :title="queryParam.title" @handleOrgDetail="handleDetail" :showDetail=true>
|
||||||
</OrgListCom>
|
</OrgListCom>
|
||||||
|
|
||||||
<ConfigServiceDirectiveListModal ref="configServiceDirectiveListModal" />
|
<ConfigServiceDirectiveListModal ref="configServiceDirectiveListModal" />
|
||||||
|
@ -48,7 +48,9 @@ import SyncStepListModal from '/@/views/synchronization/directive/syncStep/SyncS
|
||||||
import { getOrgInfo } from '/@/views/admin/orgapplyinfo/OrgApplyInfo.api';
|
import { getOrgInfo } from '/@/views/admin/orgapplyinfo/OrgApplyInfo.api';
|
||||||
//机构列表
|
//机构列表
|
||||||
import OrgListCom from '/@/views/synchronization/directive/orgCom/OrgListCom.vue'
|
import OrgListCom from '/@/views/synchronization/directive/orgCom/OrgListCom.vue'
|
||||||
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
|
||||||
|
const { createMessage } = useMessage();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const configServiceDirectiveListModal = ref();
|
const configServiceDirectiveListModal = ref();
|
||||||
const syncStepListModal = ref();
|
const syncStepListModal = ref();
|
||||||
|
@ -107,6 +109,9 @@ function searchReset() {
|
||||||
orgListComRef.value?.searchReset()
|
orgListComRef.value?.searchReset()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleLookNewDirectives(){
|
||||||
|
createMessage.warning('功能开发中')
|
||||||
|
}
|
||||||
// 自动请求并暴露内部方法
|
// 自动请求并暴露内部方法
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
reload();
|
reload();
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
<a-modal v-model:visible="sourceOrgListVisible" title="选择源平台" width="90vw"
|
<a-modal v-model:visible="sourceOrgListVisible" title="请选择源平台" width="90vw"
|
||||||
:bodyStyle="{ padding: '0', height: '70vh', display: 'flex', flexDirection: 'column', overflow: 'hidden' }"
|
:bodyStyle="{ padding: '0', height: '70vh', display: 'flex', flexDirection: 'column', overflow: 'hidden' }"
|
||||||
wrapClassName="org-list-modal" @cancel="handleCancelSource">
|
wrapClassName="org-list-modal" @cancel="handleCancelSource">
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
<OrgListCom class="step-content" ref="sourceOrgListComRef" @handleOrgChoose="handleSourceOrgChoose"
|
<OrgListCom class="step-content" ref="sourceOrgListComRef" @handleOrgChoose="handleSourceOrgChoose"
|
||||||
:showChoose="true" />
|
:showChoose="true" />
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<a-modal v-model:visible="targetOrgListVisible" title="选择源平台" width="90vw" @cancel="handleCancelTarget">
|
<a-modal v-model:visible="targetOrgListVisible" title="请选择目标平台(复选)" width="90vw" @cancel="handleCancelTarget">
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<a-button @click="handleCancelTarget" type="primary">取消</a-button>
|
<a-button @click="handleCancelTarget" type="primary">取消</a-button>
|
||||||
<a-button @click="handleGetTarget" type="primary">确认</a-button>
|
<a-button @click="handleGetTarget" type="primary">确认</a-button>
|
||||||
|
@ -117,6 +117,7 @@ const directiveChooseRef = ref()
|
||||||
const selectedTargetOrgs = ref([])//已选择目标平台
|
const selectedTargetOrgs = ref([])//已选择目标平台
|
||||||
const targetChooseType = ref('one')
|
const targetChooseType = ref('one')
|
||||||
const selectedOrgsContainer = ref<HTMLElement>();
|
const selectedOrgsContainer = ref<HTMLElement>();
|
||||||
|
const emit = defineEmits(['changeSyncText']);
|
||||||
|
|
||||||
// 显示机构列表弹窗
|
// 显示机构列表弹窗
|
||||||
function showSourceOrgListModal() {
|
function showSourceOrgListModal() {
|
||||||
|
@ -177,6 +178,7 @@ function handleSourceOrgChoose(orgInfo_) {
|
||||||
//是否已选择目标平台 否则为初始化原平台
|
//是否已选择目标平台 否则为初始化原平台
|
||||||
if (selectedTargetOrgs.value.length) {
|
if (selectedTargetOrgs.value.length) {
|
||||||
if (targetChooseType.value == 'one') {
|
if (targetChooseType.value == 'one') {
|
||||||
|
directiveChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
|
||||||
directiveChooseRef.value?.initTargetList(selectedTargetOrgs.value[0])
|
directiveChooseRef.value?.initTargetList(selectedTargetOrgs.value[0])
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -240,6 +242,7 @@ function targetChooseTypeChanged(val_) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
emit('changeSyncText',val_.target.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
//源平台机构变更确认
|
//源平台机构变更确认
|
||||||
|
@ -253,6 +256,15 @@ function handleGetTarget() {
|
||||||
targetOrgListComRef.value?.commitOrgsInfo()
|
targetOrgListComRef.value?.commitOrgsInfo()
|
||||||
handleCancelTarget()
|
handleCancelTarget()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function syncFunc(){
|
||||||
|
directiveChooseRef.value?.syncFunc()
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
syncFunc
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
:maskClosable="false" :keyboard="false" wrapClassName="modal-fullscreen" @cancel="handleCancel">
|
:maskClosable="false" :keyboard="false" wrapClassName="modal-fullscreen" @cancel="handleCancel">
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<a-button @click="handleCancel">关闭</a-button>
|
<a-button @click="handleCancel">关闭</a-button>
|
||||||
|
<a-button @click="handleSyncFunc">{{syncText}}</a-button>
|
||||||
<a-button @click="previousStep"
|
<a-button @click="previousStep"
|
||||||
v-show="!!registerForm && (registerForm?.stepVal == 1 || registerForm?.stepVal == 2 || registerForm?.stepVal == 3)">上一步</a-button>
|
v-show="!!registerForm && (registerForm?.stepVal == 1 || registerForm?.stepVal == 2 || registerForm?.stepVal == 3)">上一步</a-button>
|
||||||
<a-button @click="nextStep"
|
<a-button @click="nextStep"
|
||||||
|
@ -11,7 +12,7 @@
|
||||||
v-show="!!registerForm && registerForm?.stepVal == 3">确认</a-button>
|
v-show="!!registerForm && registerForm?.stepVal == 3">确认</a-button>
|
||||||
</template>
|
</template>
|
||||||
<SyncStepList ref="registerForm" v-if="visible" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"
|
<SyncStepList ref="registerForm" v-if="visible" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"
|
||||||
:fullscreen="true" style="height:100vh;" @closeModal="closeModal" />
|
:fullscreen="true" style="height:100vh;" @closeModal="closeModal" @changeSyncText="changeSyncText"/>
|
||||||
</j-modal>
|
</j-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -29,7 +30,19 @@ const title = ref<string>('');
|
||||||
const visible = ref<boolean>(false);
|
const visible = ref<boolean>(false);
|
||||||
const disableSubmit = ref<boolean>(false);
|
const disableSubmit = ref<boolean>(false);
|
||||||
const registerForm = ref<InstanceType<typeof SyncStepList>>();
|
const registerForm = ref<InstanceType<typeof SyncStepList>>();
|
||||||
|
const syncText = ref('同步')
|
||||||
|
|
||||||
|
function changeSyncText(v_){
|
||||||
|
if(v_ == 'one'){
|
||||||
|
syncText.value = '同步'
|
||||||
|
}else{
|
||||||
|
syncText.value = '批量同步'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSyncFunc(){
|
||||||
|
registerForm.value?.syncFunc()
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 编辑或初始化弹窗
|
* 编辑或初始化弹窗
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue