服务指令-给所有业务平台更新指令资源

This commit is contained in:
1378012178@qq.com 2025-07-17 09:38:49 +08:00
parent d58a778106
commit 43f1dd7894
6 changed files with 208 additions and 165 deletions

View File

@ -15,6 +15,7 @@ enum Api {
async = '/services/serviceDirective/async', async = '/services/serviceDirective/async',
departList = '/sys/sysDepart/list', departList = '/sys/sysDepart/list',
syncMediaForBiz = '/services/serviceDirective/syncMediaForBiz', syncMediaForBiz = '/services/serviceDirective/syncMediaForBiz',
syncMediaForAllBiz= '/services/serviceDirective/syncMediaForAllBiz',
} }
/** /**
@ -98,4 +99,12 @@ export const asyncFunc = (params) => {
*/ */
export const syncMediaForBiz = (params) => { export const syncMediaForBiz = (params) => {
return defHttp.post({ url: Api.syncMediaForBiz, params }); return defHttp.post({ url: Api.syncMediaForBiz, params });
}; };
/**
*
* @param params
*/
export const syncMediaForAllBiz = (params) => {
return defHttp.post({ url: Api.syncMediaForAllBiz, params });
};

View File

@ -316,7 +316,7 @@ function handleSuperQuery(params) {
*/ */
function handleAdd() { function handleAdd() {
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.auditSaveMeida = false; registerModal.value.opeType = 'add';
registerModal.value.add(); registerModal.value.add();
} }
@ -325,7 +325,7 @@ function handleAdd() {
*/ */
function handleEdit(record: Recordable) { function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.auditSaveMeida = false; registerModal.value.opeType = 'edit';
registerModal.value.edit(record); registerModal.value.edit(record);
} }
@ -334,7 +334,7 @@ function handleEdit(record: Recordable) {
*/ */
function handleMedia(record: Recordable) { function handleMedia(record: Recordable) {
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.auditSaveMeida = false; registerModal.value.opeType = 'editMedia';
registerModal.value.editMedia(record); registerModal.value.editMedia(record);
} }
@ -343,7 +343,7 @@ function handleMedia(record: Recordable) {
*/ */
function handleDetail(record: Recordable) { function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true; registerModal.value.disableSubmit = true;
registerModal.value.auditSaveMeida = false; registerModal.value.opeType = 'look';
registerModal.value.edit(record); registerModal.value.edit(record);
} }

View File

@ -206,7 +206,7 @@ import { JCheckbox } from '/@/components/Form';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue'; import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue'; import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
import { getValueType } from '/@/utils'; import { getValueType } from '/@/utils';
import { saveOrUpdate, audit, syncMediaForBiz } from '../ConfigServiceDirective.api'; import { saveOrUpdate, audit, syncMediaForBiz, syncMediaForAllBiz } from '../ConfigServiceDirective.api';
import { Form } from 'ant-design-vue'; import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue'; import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'; import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
@ -491,7 +491,7 @@ function submitAudit() {
} }
/** /**
* 同步媒体资源给业务平台 * 同步媒体资源给指令所有者对应业务平台
* *
*/ */
function syncMediaForBizFunc() { function syncMediaForBizFunc() {
@ -506,12 +506,29 @@ function syncMediaForBizFunc() {
}); });
} }
/**
* 同步媒体资源给所有业务平台
*
*/
function syncMediaForAllBizFunc() {
formData.mediaFileSavePath = directiveBizPath
syncMediaForAllBiz(formData)
.then((res) => {
createMessage.success('操作成功!');
emit('ok');
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({ defineExpose({
add, add,
edit, edit,
submitForm, submitForm,
submitAudit, submitAudit,
syncMediaForBizFunc, syncMediaForBizFunc,
syncMediaForAllBizFunc
}); });
</script> </script>

View File

@ -1,12 +1,13 @@
<template> <template>
<j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk" <j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk"
:okButtonProps="{ class: { 'jee-hidden': (disableSubmit && !isAudit) } }" @cancel="handleCancel" cancelText="关闭" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"
:maskClosable="false"> :maskClosable="false">
<template #footer> <template #footer>
<a-button @click="handleCancel">关闭</a-button> <a-button @click="handleCancel">关闭</a-button>
<a-button @click="handleOk" v-show="!auditSaveMeida">确定</a-button> <a-button @click="handleOk" v-show="opeType == 'edit' || opeType == 'audit'">确定</a-button>
<a-button @click="handleSave" v-show="auditSaveMeida">暂存</a-button> <a-button @click="handleSave" v-show="opeType == 'editMedia' || opeType == 'auditMedia'">暂存</a-button>
<a-button type="primary" @click="handleMediaAsync" v-show="auditSaveMeida">同步</a-button> <a-button type="primary" @click="handleMediaAsync" v-show="opeType == 'auditMedia'">同步</a-button>
<a-button type="primary" @click="handleMediaSyncAllPlat" v-show="opeType == 'editMedia'">同步</a-button>
</template> </template>
<ConfigServiceDirectiveForm ref="registerForm" v-if="visible" @ok="submitCallback" :formDisabled="disableSubmit" <ConfigServiceDirectiveForm ref="registerForm" v-if="visible" @ok="submitCallback" :formDisabled="disableSubmit"
:formBpm="false"></ConfigServiceDirectiveForm> :formBpm="false"></ConfigServiceDirectiveForm>
@ -29,12 +30,10 @@ const title = ref<string>('');
const visible = ref<boolean>(false); const visible = ref<boolean>(false);
const auditVisible = ref<boolean>(false); const auditVisible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false); const disableSubmit = ref<boolean>(false);
const isAudit = ref<boolean>(false);
const auditSaveMeida = ref<boolean>(false);
const registerForm = ref(); const registerForm = ref();
const auditListRef = ref(); const auditListRef = ref();
const emit = defineEmits(['register', 'success']); const emit = defineEmits(['register', 'success']);
const opeType = ref('')// add edit editMedia- look audit auditMedia-
/** /**
* 新增 * 新增
@ -53,7 +52,6 @@ function add() {
*/ */
function edit(record) { function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑'; title.value = disableSubmit.value ? '详情' : '编辑';
isAudit.value = false
visible.value = true; visible.value = true;
nextTick(() => { nextTick(() => {
registerForm.value.edit(record); registerForm.value.edit(record);
@ -66,7 +64,6 @@ function edit(record) {
*/ */
function audit(record) { function audit(record) {
title.value = '审批'; title.value = '审批';
isAudit.value = true
visible.value = true; visible.value = true;
nextTick(() => { nextTick(() => {
registerForm.value.edit(record, false, true); registerForm.value.edit(record, false, true);
@ -97,7 +94,7 @@ function editMedia(record) {
* 确定按钮点击事件 * 确定按钮点击事件
*/ */
function handleOk() { function handleOk() {
if (isAudit.value) { if (opeType.value == 'audit') {
registerForm.value.submitAudit(); registerForm.value.submitAudit();
} else { } else {
registerForm.value.submitForm(); registerForm.value.submitForm();
@ -112,12 +109,19 @@ function handleSave() {
} }
/** /**
* 业务同步资源 * 审核对应的业务平台同步资源
*/ */
function handleMediaAsync() { function handleMediaAsync() {
registerForm.value.syncMediaForBizFunc(); registerForm.value.syncMediaForBizFunc();
} }
/**
* 给所有业务平台同步资源
*/
function handleMediaSyncAllPlat() {
registerForm.value.syncMediaForAllBizFunc();
}
/** /**
* form保存回调事件 * form保存回调事件
*/ */
@ -147,9 +151,8 @@ defineExpose({
editMedia, editMedia,
disableSubmit, disableSubmit,
audit, audit,
isAudit,
openAuditList, openAuditList,
auditSaveMeida, opeType,
}); });
</script> </script>

View File

@ -128,8 +128,7 @@ const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDat
*/ */
function handleAudit(record: Recordable) { function handleAudit(record: Recordable) {
registerModal.value.disableSubmit = true; registerModal.value.disableSubmit = true;
registerModal.value.isAudit = true; registerModal.value.opeType = 'audit';
registerModal.value.auditSaveMeida = false;
registerModal.value.audit(record); registerModal.value.audit(record);
} }
@ -145,7 +144,7 @@ function handleSuccess() {
*/ */
function handleMedia(record: Recordable) { function handleMedia(record: Recordable) {
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.auditSaveMeida = true; registerModal.value.opeType = 'auditMedia';
registerModal.value.editMedia(record); registerModal.value.editMedia(record);
} }

View File

@ -1,68 +1,72 @@
<template> <template>
<div class="p-2"> <div class="p-2">
<!--查询区域--> <!--查询区域-->
<div class="jeecg-basic-table-form-container"> <div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
<a-row :gutter="24"> :wrapper-col="wrapperCol">
<a-col :lg="6"> <a-row :gutter="24">
<a-form-item name="title"> <a-col :lg="6">
<template #label><span title="机构名称">机构名称</span></template> <a-form-item name="title">
<a-input placeholder="请输入机构名称" v-model:value="queryParam.title" allow-clear ></a-input> <template #label><span title="机构名称">机构名称</span></template>
</a-form-item> <a-input placeholder="请输入机构名称" v-model:value="queryParam.title" allow-clear></a-input>
</a-col> </a-form-item>
<a-col :lg="6" > </a-col>
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button> <a-col :lg="6">
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button> <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
</a-col> <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
<a-col :lg="12" style="text-align: right;"> style="margin-left: 8px">重置</a-button>
<a-button type="primary" preIcon="ant-design:cloud-sync-outlined" @click="handleJingxiang">镜像</a-button> </a-col>
</a-col> <a-col :lg="12" style="text-align: right;">
</a-row> <a-button type="primary" preIcon="ant-design:cloud-sync-outlined" @click="handleJingxiang">镜像</a-button>
</a-form> </a-col>
</div>
<a-row>
<a-col v-for="item in orgTableList.records" :key="item.id" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title>
<a-row style="font-weight: normal;">
<a-col :span="22" style="font-size: 14px;padding-top: 4px;">
<div><span style="font-weight: bold;">{{item.departName}}</span></div>
</a-col>
<a-col :span="2" style="text-align: center;padding-top: 4px;">
<div class="zxClass">{{item.orgCode}}</div>
</a-col>
</a-row>
</template>
<p>加盟时间{{item.operationStartTime.substring(0,10)}}</p>
<p>机构负责人{{item.createBy}}</p>
<p>负责人电话{{item.mobile}}</p>
<p class="ellipsis-one-lines" :title="item.address">机构地址{{item.address}}</p>
<a-divider />
<p style="text-align:center;">
<span style="display:inline-block;cursor: pointer;" @click="handleDetail(item)">
<span class="tbClass"><img src="../../../assets/images/a14.png" style="width:20px;" /></span><br/>
<span class="antTitle">详情</span>
</span>
</p>
</a-card>
</a-col>
<a-col v-if="orgTableList.total==0" >
<div style="margin: 30px auto;">
<a-empty />
</div>
</a-col>
</a-row> </a-row>
<div </a-form>
style="float:right;bottom: 20px;z-index: 999;padding: 8px 16px;border-radius: 4px;display: flex;align-items: center;">
<span style="margin-right: 10px;"> {{ orgTableList.total }} 条数据</span>
<Pagination showLessItems v-model:current="pageParams.pageNo" :pageSize="pageParams.pageSize" size="small"
show-quick-jumper :total="orgTableList.total" @change="reload" />
</div>
<ConfigServiceDirectiveListModal ref="configServiceDirectiveListModal" />
<SyncStepListModal ref="syncStepListModal" />
</div> </div>
<a-row>
<a-col v-for="item in orgTableList.records" :key="item.id" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6"
style="padding: 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '60px', padding: '0 24px' }"
:bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title>
<a-row style="font-weight: normal;">
<a-col :span="22" style="font-size: 14px;padding-top: 4px;">
<div><span style="font-weight: bold;">{{ item.departName }}</span></div>
</a-col>
<a-col :span="2" style="text-align: center;padding-top: 4px;">
<div class="zxClass">{{ item.orgCode }}</div>
</a-col>
</a-row>
</template>
<p>加盟时间{{ item.operationStartTime.substring(0, 10) }}</p>
<p>机构负责人{{ item.createBy }}</p>
<p>负责人电话{{ item.mobile }}</p>
<p class="ellipsis-one-lines" :title="item.address">机构地址{{ item.address }}</p>
<a-divider />
<p style="text-align:center;">
<span style="display:inline-block;cursor: pointer;" @click="handleDetail(item)">
<span class="tbClass"><img src="../../../assets/images/a14.png" style="width:20px;" /></span><br />
<span class="antTitle">详情</span>
</span>
</p>
</a-card>
</a-col>
<a-col v-if="orgTableList.total == 0">
<div style="margin: 30px auto;">
<a-empty />
</div>
</a-col>
</a-row>
<div
style="float:right;bottom: 20px;z-index: 999;padding: 8px 16px;border-radius: 4px;display: flex;align-items: center;">
<span style="margin-right: 10px;"> {{ orgTableList.total }} 条数据</span>
<Pagination showLessItems v-model:current="pageParams.pageNo" :pageSize="pageParams.pageSize" size="small"
show-quick-jumper :total="orgTableList.total" @change="reload" />
</div>
<ConfigServiceDirectiveListModal ref="configServiceDirectiveListModal" />
<SyncStepListModal ref="syncStepListModal" />
</div>
</template> </template>
<script setup name="synchronization-directive2" lang="ts"> <script setup name="synchronization-directive2" lang="ts">
@ -70,8 +74,8 @@ import { ref, reactive, computed, onMounted } from 'vue'
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue"; import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
import { getOrgInfo } from '/@/api/common/api'; import { getOrgInfo } from '/@/api/common/api';
// //
import { list, asyncFunc,departList } from '@/views/services/serviceDirective/ConfigServiceDirective.api'; import { list, asyncFunc, departList } from '@/views/services/serviceDirective/ConfigServiceDirective.api';
import { Pagination } from 'ant-design-vue'; import { Pagination } from 'ant-design-vue';
import ConfigServiceDirectiveListModal from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirectiveListModal.vue'; import ConfigServiceDirectiveListModal from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirectiveListModal.vue';
import SyncStepListModal from '/@/views/synchronization/directive/syncStep/SyncStepListModal.vue'; import SyncStepListModal from '/@/views/synchronization/directive/syncStep/SyncStepListModal.vue';
@ -83,89 +87,96 @@ const queryParam = reactive<any>({});
const pageParams = ref({ pageNo: 1, pageSize: 8 }) const pageParams = ref({ pageNo: 1, pageSize: 8 })
const labelCol = reactive({ const labelCol = reactive({
xs:24, xs: 24,
sm:4, sm: 4,
xl:6, xl: 6,
xxl:4 xxl: 4
}); });
const wrapperCol = reactive({ const wrapperCol = reactive({
xs: 24, xs: 24,
sm: 20, sm: 20,
}); });
/** /**
* 镜像 * 镜像
*/ */
function handleJingxiang() { function handleJingxiang() {
syncStepListModal.value.init(null); syncStepListModal.value.init(null);
syncStepListModal.value.disableSubmit = true; syncStepListModal.value.disableSubmit = true;
} }
/** /**
* 详情 * 详情
* @param record * @param record
*/ */
function handleDetail(record) { function handleDetail(record) {
configServiceDirectiveListModal.value.init(record); configServiceDirectiveListModal.value.init(record);
configServiceDirectiveListModal.value.disableSubmit = true; configServiceDirectiveListModal.value.disableSubmit = true;
} }
/** /**
* 查询 * 查询
*/ */
function searchQuery() { function searchQuery() {
reload(); reload();
} }
function reload() { function reload() {
// //
queryParam.pageSize = pageParams.value.pageSize; queryParam.pageSize = pageParams.value.pageSize;
queryParam.pageNo = pageParams.value.pageNo; queryParam.pageNo = pageParams.value.pageNo;
departList(queryParam).then(res => { departList(queryParam).then(res => {
orgTableList.value = res; orgTableList.value = res;
});
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
//
reload();
}
//
onMounted(() => {
reload();
}); });
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
//
reload();
}
//
onMounted(() => {
reload();
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.jeecg-basic-table-form-container { .jeecg-basic-table-form-container {
padding: 0; padding: 0;
.table-page-search-submitButtons {
display: block; .table-page-search-submitButtons {
margin-bottom: 24px; display: block;
white-space: nowrap; margin-bottom: 24px;
} white-space: nowrap;
.query-group-cust{
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help){
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
} }
.cardTitle{
.query-group-cust {
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help) {
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
.cardTitle {
background: #1ea0fa; background: #1ea0fa;
width: 100%; width: 100%;
margin: -28px -24px; margin: -28px -24px;
@ -176,8 +187,9 @@ function handleDetail(record) {
display: block; display: block;
position: absolute; position: absolute;
} }
.zxClass{
font-size:12px; .zxClass {
font-size: 12px;
background: linear-gradient(to right, #1ea0fa, #017de9); background: linear-gradient(to right, #1ea0fa, #017de9);
border-radius: 8px; border-radius: 8px;
height: 25px; height: 25px;
@ -185,20 +197,22 @@ function handleDetail(record) {
line-height: 25px; line-height: 25px;
} }
.lxClass{ .lxClass {
font-size:14px; font-size: 14px;
background: linear-gradient(to right, #cccccc, #cccccc); background: linear-gradient(to right, #cccccc, #cccccc);
border-radius: 8px; border-radius: 8px;
height: 35px; height: 35px;
color: white; color: white;
line-height: 35px; line-height: 35px;
} }
.tbClass{
.tbClass {
background: #f6f6f6; background: #f6f6f6;
padding: 8px; padding: 8px;
border-radius: 5px; border-radius: 5px;
} }
.antTitle{
.antTitle {
margin-top: 10px; margin-top: 10px;
display: block; display: block;
font-size: 12px; font-size: 12px;
@ -207,7 +221,8 @@ function handleDetail(record) {
.ellipsis-one-lines { .ellipsis-one-lines {
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 1; /* 限制文本为2行 */ -webkit-line-clamp: 1;
/* 限制文本为2行 */
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }