服务指令同步

This commit is contained in:
1378012178@qq.com 2025-07-30 17:02:29 +08:00
parent 11373acd11
commit dd291f05ad
4 changed files with 38 additions and 7 deletions

View File

@ -128,8 +128,8 @@
</a-radio-group>
<a-divider type="vertical" style="background-color: #CDCDCF" />
<a-button type="primary" @click="removeAll" size="small">全部移除</a-button>
<a-divider type="vertical" style="background-color: #CDCDCF" />
<a-button type="warning" @click="syncFunc" size="small">同步</a-button>
<!-- <a-divider type="vertical" style="background-color: #CDCDCF" />
<a-button type="warning" @click="syncFunc" size="small">同步</a-button> -->
<BasicTable
:dataSource="targetChooseType == 'one' ? (targetType == 'needsync' ? rightNeedAddList : rightSourceList) : rightNeedAddList"
:columns="targetChooseType == 'one' ? (targetType == 'needsync' ? targetColumns : targetSourceColumns) : targetSourceColumns"
@ -493,6 +493,7 @@ defineExpose({
controlShowJSCom,
initTargetList,
cleanTargetSourceData,
syncFunc,
});
</script>

View File

@ -21,14 +21,14 @@
style="margin-right: 10px;">镜像</a-button>
<a-badge :count="609" 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-col>
</a-row>
</a-form>
</div>
<OrgListCom ref="orgListComRef" :title="queryParam.title" @handleOrgDetail="handleDetail">
<OrgListCom ref="orgListComRef" :title="queryParam.title" @handleOrgDetail="handleDetail" :showDetail=true>
</OrgListCom>
<ConfigServiceDirectiveListModal ref="configServiceDirectiveListModal" />
@ -48,7 +48,9 @@ import SyncStepListModal from '/@/views/synchronization/directive/syncStep/SyncS
import { getOrgInfo } from '/@/views/admin/orgapplyinfo/OrgApplyInfo.api';
//
import OrgListCom from '/@/views/synchronization/directive/orgCom/OrgListCom.vue'
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
const formRef = ref();
const configServiceDirectiveListModal = ref();
const syncStepListModal = ref();
@ -107,6 +109,9 @@ function searchReset() {
orgListComRef.value?.searchReset()
}
function handleLookNewDirectives(){
createMessage.warning('功能开发中')
}
//
onMounted(() => {
reload();

View File

@ -81,7 +81,7 @@
</div>
</div>
</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' }"
wrapClassName="org-list-modal" @cancel="handleCancelSource">
<template #footer>
@ -91,7 +91,7 @@
<OrgListCom class="step-content" ref="sourceOrgListComRef" @handleOrgChoose="handleSourceOrgChoose"
:showChoose="true" />
</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>
<a-button @click="handleCancelTarget" type="primary">取消</a-button>
<a-button @click="handleGetTarget" type="primary">确认</a-button>
@ -117,6 +117,7 @@ const directiveChooseRef = ref()
const selectedTargetOrgs = ref([])//
const targetChooseType = ref('one')
const selectedOrgsContainer = ref<HTMLElement>();
const emit = defineEmits(['changeSyncText']);
//
function showSourceOrgListModal() {
@ -177,6 +178,7 @@ function handleSourceOrgChoose(orgInfo_) {
//
if (selectedTargetOrgs.value.length) {
if (targetChooseType.value == 'one') {
directiveChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
directiveChooseRef.value?.initTargetList(selectedTargetOrgs.value[0])
}
} else {
@ -240,6 +242,7 @@ function targetChooseTypeChanged(val_) {
}
});
}
emit('changeSyncText',val_.target.value)
}
//
@ -253,6 +256,15 @@ function handleGetTarget() {
targetOrgListComRef.value?.commitOrgsInfo()
handleCancelTarget()
}
function syncFunc(){
directiveChooseRef.value?.syncFunc()
}
defineExpose({
syncFunc
});
</script>
<style lang="less" scoped>

View File

@ -3,6 +3,7 @@
:maskClosable="false" :keyboard="false" wrapClassName="modal-fullscreen" @cancel="handleCancel">
<template #footer>
<a-button @click="handleCancel">关闭</a-button>
<a-button @click="handleSyncFunc">{{syncText}}</a-button>
<a-button @click="previousStep"
v-show="!!registerForm && (registerForm?.stepVal == 1 || registerForm?.stepVal == 2 || registerForm?.stepVal == 3)">上一步</a-button>
<a-button @click="nextStep"
@ -11,7 +12,7 @@
v-show="!!registerForm && registerForm?.stepVal == 3">确认</a-button>
</template>
<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>
</template>
@ -29,7 +30,19 @@ const title = ref<string>('');
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
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()
}
/**
* 编辑或初始化弹窗
*/