解决打包报错

This commit is contained in:
1378012178@qq.com 2025-12-23 11:10:24 +08:00
parent 2540cf4818
commit 01568397c5
26 changed files with 0 additions and 6063 deletions

View File

@ -1,72 +0,0 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/canadddirective/canAddDirective/list',
save='/canadddirective/canAddDirective/add',
edit='/canadddirective/canAddDirective/edit',
deleteOne = '/canadddirective/canAddDirective/delete',
deleteBatch = '/canadddirective/canAddDirective/deleteBatch',
importExcel = '/canadddirective/canAddDirective/importExcel',
exportXls = '/canadddirective/canAddDirective/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
*
* @param params
* @param handleSuccess
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
* @param handleSuccess
*/
export const batchDelete = (params, handleSuccess) => {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
* @param isUpdate
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

View File

@ -1,59 +0,0 @@
import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '所属机构',
align: 'center',
dataIndex: 'orgCode_dictText',
},
{
title: '分类标签',
align: 'center',
dataIndex: 'instructionTag',
width: 170,
},
{
title: '服务类别',
align: 'center',
dataIndex: 'category',
width: 170,
},
{
title: '服务类型',
align: 'center',
dataIndex: 'type',
width: 170,
},
{
title: '服务指令',
align: 'center',
dataIndex: 'directiveName',
},
{
title: '周期类型',
align: 'center',
dataIndex: 'cycleType',
width: 120,
},
{
title: '创建日期',
align: 'center',
dataIndex: 'createTime',
width: 160,
},
];
// 高级查询数据
export const superQuerySchema = {
instructionTag: { title: '分类标签', order: 0, view: 'text', type: 'string' },
category: { title: '服务类别', order: 1, view: 'text', type: 'string' },
type: { title: '服务类型', order: 2, view: 'text', type: 'string' },
directiveName: { title: '服务指令', order: 3, view: 'text', type: 'string' },
cycleType: { title: '周期类型', order: 4, view: 'text', type: 'string' },
createTime: { title: '创建日期', order: 5, view: 'datetime', type: 'string' },
orgCode: { title: '所属部门', order: 6, view: 'list', type: 'string', dictTable: 'sys_depart', dictCode: 'org_code', dictText: 'depart_name' },
};

View File

@ -1,227 +0,0 @@
<template>
<div class="p-2">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol" style="padding-top: 20px;">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="orgCode">
<template #label><span title="所属机构">所属机构</span></template>
<j-dict-select-tag placeholder="请选择所属机构" v-model:value="queryParam.orgCode"
dictCode="sys_depart,depart_name,org_code" allow-clear />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
<!-- 表单区域 -->
<CanAddDirectiveModal ref="registerModal" @success="handleSuccess"></CanAddDirectiveModal>
</div>
</template>
<script lang="ts" name="canadddirective-canAddDirective" setup>
import { ref, reactive, onMounted } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './CanAddDirective.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './CanAddDirective.api';
import CanAddDirectiveModal from './components/CanAddDirectiveDetailModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { syncDirective } from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api';
import { useMessage } from '/@/hooks/web/useMessage';
const props = defineProps({
directiveMainOrgInfo: {},
existDirectiveIds: [],
})
const emit = defineEmits(['refreshExistIds']);
const { createMessage, createConfirm } = useMessage();
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '可新增指令',
api: list,
columns,
canResize: false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
pagination: {
current: 1,
pageSize: 15,
pageSizeOptions: ['15','50', '70', '100'],
},
beforeFetch: async (params) => {
queryParam.existDirectiveIds = props.existDirectiveIds.map(item => item.id).join(',')
return Object.assign(params, queryParam);
},
},
exportConfig: {
name: "可新增指令",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: 24,
sm: 4,
xl: 5,
xxl: 5
});
const wrapperCol = reactive({
xs: 24,
sm: 19,
});
/**
* 详情
*/
function handleDetail(record: Recordable) {
console.log("🚀 ~ handleDetail ~ record:", record)
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 镜像
*/
function handlePull(record) {
createConfirm({
iconType: 'warning',
title: '镜像确认',
content: '请确认是否将' + record.orgCode_dictText + '新增的服务指令“' + record.directiveName + '”镜像给当前标准服务指令库:' + props.directiveMainOrgInfo.departName,
okText: '确认',
cancelText: '取消',
onOk: () => {
syncDirective(
record.orgCode,
{
syncIds: record.directiveId,
upIds: '',
syncOrgCodes: props.directiveMainOrgInfo.orgCode,
syncOption: 'all',
}
).then(res => {
createMessage.success('已开始自动同步,可在日志中查看同步结果!')
emit('refreshExistIds', props.directiveMainOrgInfo)
}).catch(() => {
createMessage.error('镜像失败,请稍后再试')
})
}
});
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
{
label: '镜像',
onClick: handlePull.bind(null, record),
}
];
}
/**
* 查询
*/
function searchQuery() {
emit('refreshExistIds', props.directiveMainOrgInfo, false)
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
emit('refreshExistIds', props.directiveMainOrgInfo, false)
}
defineExpose({
searchReset,
reload,
})
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
margin-bottom: 18px;
.table-page-search-submitButtons {
display: block;
margin-bottom: 0px;
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: 18px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
</style>

View File

@ -1,315 +0,0 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer>
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="ConfigService2DirectiveForm">
<a-row v-show="isAudit">
<a-col :span="12">
<a-config-provider :disabled="false">
<a-form-item label="服务指令审核" v-bind="validateInfos.statusVal" id="ConfigServiceDirectiveForm-statusVal"
name="statusVal">
<a-select v-model:value="formData.statusVal" placeholder="请选择审核状态" style="width: 200px"
:disabled="false">
<a-select-option value="auditPass">审核通过</a-select-option>
<a-select-option value="auditFaild">审核不通过</a-select-option>
</a-select>
</a-form-item>
</a-config-provider>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
<JFormContainer :disabled="disabled" style="margin-top: -30px;">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="ConfigService2DirectiveForm">
<a-row v-show="!isEditMedia">
<a-col :span="12">
<a-form-item label="分类标签" v-bind="validateInfos.instructionTagId"
id="ConfigServiceDirectiveForm-instructionTagId" name="instructionTagId">
{{formData.instructionTag}}
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务类别" v-bind="validateInfos.categoryId" id="ConfigServiceDirectiveForm-categoryId"
name="categoryId">
{{formData.category}}
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务类型" v-bind="validateInfos.typeId" id="ConfigServiceDirectiveForm-typeId"
name="typeId">
{{formData.type}}
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务指令名称" v-bind="validateInfos.directiveName"
id="ConfigServiceDirectiveForm-directiveName" name="directiveName">
{{formData.directiveName}}
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="收费价格(元)" v-bind="validateInfos.tollPrice" id="ConfigServiceDirectiveForm-tollPrice"
name="tollPrice">
{{formData.tollPrice}}
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="提成价格(元)" v-bind="validateInfos.comPrice" id="ConfigServiceDirectiveForm-comPrice"
name="comPrice">
{{formData.comPrice}}
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="医保报销" v-bind="validateInfos.izReimbursement"
id="ConfigServiceDirectiveForm-izReimbursement" name="izReimbursement">
{{formData.izReimbursement=='1'?'报销':'不报销'}}
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构优惠" v-bind="validateInfos.izPreferential"
id="ConfigServiceDirectiveForm-izPreferential" name="izPreferential">
{{formData.izPreferential=='1'?'参与':'不参与'}}
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="周期类型" v-bind="validateInfos.cycleType" id="ConfigServiceDirectiveForm-cycleType"
name="cycleType">
<span v-if="formData.cycleType=='1'">日常护理</span>
<span v-if="formData.cycleType=='2'">周期护理</span>
<span v-if="formData.cycleType=='3'">即时护理</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务时长(分钟)" v-bind="validateInfos.serviceDuration"
id="ConfigServiceDirectiveForm-serviceDuration" name="serviceDuration">
{{formData.serviceDuration}}
</a-form-item>
</a-col>
</a-row>
<a-col :span="12">
<a-form-item label="服务指令描述" v-bind="validateInfos.serviceContent"
id="ConfigServiceDirectiveForm-serviceContent" name="serviceContent">
{{formData.serviceContent}}
</a-form-item>
</a-col>
</a-form>
</template>
</JFormContainer>
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted, watch } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { JCheckbox } from '/@/components/Form';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
import { getValueType } from '/@/utils';
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true },
});
const bodyTagDictCode = ref(`nu_config_body_tag,tag_name,id,1=2`)
const emotionTagDictCode = ref(`nu_config_emotion_tag,tag_name,id,1=2`)
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
categoryId: '',
typeId: '',
instructionTagId: '',
directiveName: '',
tollPrice: 0,
comPrice: 0,
izReimbursement: '0',
izPreferential: '0',
chargingFrequency: '',
cycleType: '',
sort: 99,
serviceContent: '',
serviceDuration: '5',
izEnabled: '0',
createBy: '',
createTime: '',
updateBy: '',
updateTime: '',
mp3File: '',
mp4File: '',
previewFile: '',
immediateFile: '',
status: '',
statusVal: undefined,
sysOrgCode: undefined,
instructionTag:'',
category:'',
type:'',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 8 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
const isEditMedia = ref(false)
const isAudit = ref(false)
//
const validatorRules = reactive({
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const disabled = computed(() => {
if (props.formBpm === true) {
if (props.formData.disabled === false) {
return false;
} else {
return true;
}
}
return props.formDisabled;
});
const categoryDictCode = ref('')
const typeDictCode = ref('')
//
const canUploadPreviewImage = computed(() => {
return formData.instructionTagId &&
formData.categoryId &&
formData.typeId &&
formData.directiveName &&
formData.cycleType;
});
//
const instructionComDictCode = ref([])
function upInstructionDictCode(v_) {
instructionComDictCode.value = v_
}
//
const categoryComDictCode = ref([])
function upCategoryDictCode(v_) {
categoryComDictCode.value = v_
}
//
const typeComDictCode = ref([])
function upTypeDictCode(v_) {
typeComDictCode.value = v_
}
//
const cycleTypeComDictCode = ref([])
function upCycleTypeDictCode(v_) {
cycleTypeComDictCode.value = v_
}
watch([instructionComDictCode, categoryComDictCode, typeComDictCode, cycleTypeComDictCode], () => {
// directiveBizPath
}, { deep: true });
const directiveBizPath = computed(() => {
if (!canUploadPreviewImage.value) return '';
//
const instructionTagName_ = instructionComDictCode.value.filter(d => d.value == formData.instructionTagId)?.[0]?.label;
const categoryName_ = categoryComDictCode.value.filter(d => d.value == formData.categoryId)?.[0]?.label;
const typeName_ = typeComDictCode.value.filter(d => d.value == formData.typeId)?.[0]?.label;
const cycleTypeName_ = cycleTypeComDictCode.value.filter(d => d.value == formData.cycleType)?.[0]?.label;
//
return 'directive/' + `${instructionTagName_}/${categoryName_}/${typeName_}/${formData.directiveName}/${cycleTypeName_}`;
});
watch(
() => formData.instructionTagId,
(newInstructionTagId) => {
if (!newInstructionTagId) {
formData.categoryId = ''
formData.typeId = ''
categoryDictCode.value = 'nu_config_service_category,category_name,id,1=2';
} else {
categoryDictCode.value = `nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 and iz_enabled = 0 and instruction_id = '${newInstructionTagId}' order by sort asc`;
}
}
);
watch(
() => formData.categoryId,
(newCategoryId) => {
if (!newCategoryId) {
formData.typeId = ''
typeDictCode.value = 'nu_config_service_type,type_name,id,1=2';
} else {
typeDictCode.value = `nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${newCategoryId}' order by sort asc`;
}
}
);
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
* isEditMedia_是否为编辑指令资源 隐藏业务字段
* isAudit_是否为服务指令那个审核 隐藏业务字段
*/
function edit(record, isEditMedia_ = false, isAudit_ = false) {
console.log("🌊 ~ edit ~ record:", record)
if (!!record.bodyTags) {
// "id = 'id1' or id = 'id2'"
const bodyTagConditions = record.bodyTags.split(',')
.map(id => `id = '${id}'`)
.join(' or ');
bodyTagDictCode.value = `nu_config_body_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 ` +
(bodyTagConditions ? ` and (${bodyTagConditions})` : '') +
` order by sort asc`;
}
if (!!record.emotionTags) {
// "id = 'id1' or id = 'id2'"
const emotionTagConditions = record.emotionTags.split(',')
.map(id => `id = '${id}'`)
.join(' or ');
emotionTagDictCode.value = `nu_config_emotion_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 ` +
(emotionTagConditions ? ` and (${emotionTagConditions})` : '') +
` order by sort asc`;
}
isEditMedia.value = isEditMedia_
isAudit.value = isAudit_
formData.bodyTags = ''
formData.emotionTags = ''
nextTick(() => {
resetFields();
const tmpData = {};
Object.keys(formData).forEach((key) => {
if (record.hasOwnProperty(key)) {
tmpData[key] = record[key]
}
})
//
Object.assign(formData, tmpData);
});
}
defineExpose({
add,
edit,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
padding: 14px;
}
</style>

View File

@ -1,148 +0,0 @@
<template>
<a-drawer :title="title" width="70vw" v-model:visible="visible" :footer-style="{ textAlign: 'right' }" @cancel="handleCancel"
cancelText="关闭" :maskClosable="true">
<template #footer>
<a-button @click="handleCancel">关闭</a-button>
</template>
<CanAddDirectiveForm ref="registerForm" v-if="visible" @ok="submitCallback" :formDisabled="disableSubmit"
:formBpm="false"></CanAddDirectiveForm>
</a-drawer>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose, defineProps } from 'vue';
import CanAddDirectiveForm from './CanAddDirectiveDetail.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
import { queryById } from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api';
const props = defineProps({
});
const title = ref<string>('');
const visible = ref<boolean>(false);
const auditVisible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const auditListRef = ref();
const emit = defineEmits(['register', 'success']);
const opeType = ref('')// add edit editMedia- look audit auditMedia-
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = '详情';
visible.value = true;
queryById({ dataSourceCode: record.orgCode, id: record.directiveId }).then(res => {
res.instructionTag = record.instructionTag;
res.category = record.category;
res.type = record.type;
registerForm.value.edit(res);
})
}
/**
* 审核列表 - 审核
* @param record
*/
function audit(record) {
title.value = '审核';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record, false, true);
});
}
/**
* 打开审核列表
*/
function openAuditList() {
auditVisible.value = true;
auditListRef.value?.open();
}
/**
* 编辑指令资源
* @param record
*/
function editMedia(record) {
title.value = '编辑指令资源';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record, true);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
if (opeType.value == 'audit') {
registerForm.value.submitAudit();
} else {
registerForm.value.submitForm();
}
}
/**
* 暂存
*/
function handleSave() {
registerForm.value.submitForm();
}
/**
* 给审核对应的业务平台同步资源
*/
function handleMediaAsync() {
registerForm.value.syncMediaForBizFunc();
}
/**
* 给所有业务平台同步资源
*/
function handleMediaSyncAllPlat() {
registerForm.value.syncMediaForAllBizFunc();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
/**
* 审核列表-关闭按钮回调事件
*/
function handleAuditCancel() {
auditVisible.value = false;
emit('success')
}
defineExpose({
edit,
editMedia,
disableSubmit,
audit,
openAuditList,
opeType,
});
</script>
<style lang="less">
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>
<style lang="less" scoped></style>

View File

@ -1,445 +0,0 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer>
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="ConfigService2DirectiveForm">
<a-row v-show="isAudit">
<a-col :span="12">
<a-config-provider :disabled="false">
<a-form-item label="服务指令审核" v-bind="validateInfos.statusVal" id="ConfigServiceDirectiveForm-statusVal"
name="statusVal">
<a-select v-model:value="formData.statusVal" placeholder="请选择审核状态" style="width: 200px"
:disabled="false">
<a-select-option value="auditPass">审核通过</a-select-option>
<a-select-option value="auditFaild">审核不通过</a-select-option>
</a-select>
</a-form-item>
</a-config-provider>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
<JFormContainer :disabled="disabled" style="margin-top: -30px;">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="ConfigService2DirectiveForm">
<a-row v-show="!isEditMedia">
<a-col :span="12">
<a-form-item label="分类标签" v-bind="validateInfos.instructionTagId"
id="ConfigServiceDirectiveForm-instructionTagId" name="instructionTagId">
<j-dict-select-tag v-model:value="formData.instructionTagId" :orgCode="formData?.sysOrgCode"
:dictCode="`nu_config_service_instruction_tag,instruction_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`"
placeholder="请选择分类标签" allowClear @upDictCode="upInstructionDictCode" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务类别" v-bind="validateInfos.categoryId" id="ConfigServiceDirectiveForm-categoryId"
name="categoryId">
<j-dict-select-tag type="list" v-model:value="formData.categoryId" :orgCode="formData?.sysOrgCode"
:disabled="!formData.instructionTagId" :dictCode="categoryDictCode" placeholder="请选择服务类别" allow-clear
@upDictCode="upCategoryDictCode" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务类型" v-bind="validateInfos.typeId" id="ConfigServiceDirectiveForm-typeId"
name="typeId">
<j-dict-select-tag type="list" v-model:value="formData.typeId" :dictCode="typeDictCode"
:orgCode="formData?.sysOrgCode" :disabled="!formData.categoryId" placeholder="请选择服务类型" allowClear
@upDictCode="upTypeDictCode" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务指令名称" v-bind="validateInfos.directiveName"
id="ConfigServiceDirectiveForm-directiveName" name="directiveName">
<a-input v-model:value="formData.directiveName" placeholder="请输入服务指令名称" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="收费价格(元)" v-bind="validateInfos.tollPrice" id="ConfigServiceDirectiveForm-tollPrice"
name="tollPrice">
<a-input-number v-model:value="formData.tollPrice" placeholder="请输入收费价格" style="width: 100%"
precision="2" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="提成价格(元)" v-bind="validateInfos.comPrice" id="ConfigServiceDirectiveForm-comPrice"
name="comPrice">
<a-input-number v-model:value="formData.comPrice" placeholder="请输入提成价格" style="width: 100%"
precision="2" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="医保报销" v-bind="validateInfos.izReimbursement"
id="ConfigServiceDirectiveForm-izReimbursement" name="izReimbursement">
<j-dict-select-tag type='radio' v-model:value="formData.izReimbursement" dictCode="med_ins_reimb"
allowClear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构优惠" v-bind="validateInfos.izPreferential"
id="ConfigServiceDirectiveForm-izPreferential" name="izPreferential">
<j-dict-select-tag type='radio' v-model:value="formData.izPreferential"
dictCode="institutional_discount" allowClear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="周期类型" v-bind="validateInfos.cycleType" id="ConfigServiceDirectiveForm-cycleType"
name="cycleType">
<j-dict-select-tag type="list" v-model:value="formData.cycleType" dictCode="period_type"
:orgCode="formData?.sysOrgCode" placeholder="请选择周期类型" allowClear @upDictCode="upCycleTypeDictCode" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务时长(分钟)" v-bind="validateInfos.serviceDuration"
id="ConfigServiceDirectiveForm-serviceDuration" name="serviceDuration">
<a-input-number v-model:value="formData.serviceDuration" :min="5" :max="55" :step="5"
placeholder="请输入服务时长(分钟)" allow-clear />
</a-form-item>
</a-col>
</a-row>
<!-- <a-row v-show="!isEditMedia">
<a-col :span="24">
<a-form-item label="体型标签" id="ConfigServiceDirectiveForm-typeId" :labelCol="labelCol2"
:wrapperCol="wrapperCol2" name="typeId">
<span v-if="!formData.bodyTags">-</span>
<JCheckbox v-else v-model:value="formData.bodyTags" :orgCode="formData?.sysOrgCode"
:dictCode="bodyTagDictCode" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="情绪标签" :labelCol="labelCol2" :wrapperCol="wrapperCol2" name="emoTags">
<span v-if="!formData.emotionTags">-</span>
<JCheckbox v-else v-model:value="formData.emotionTags" :orgCode="formData?.sysOrgCode"
:dictCode="emotionTagDictCode" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="ConfigServiceDirectiveForm-izEnabled"
name="izEnabled">
<j-dict-select-tag type='radio' v-model:value="formData.izEnabled" dictCode="iz_enabled"
placeholder="请选择是否启用"  allowClear />
</a-form-item>
</a-col>
</a-row> -->
<!-- <a-row> -->
<!-- <a-col :span="12">
<a-form-item label="服务指令图片" v-bind="validateInfos.previewFile">
<span v-if="disabled && !formData.previewFile">暂无文件</span>
<JImageUpload v-else :fileMax="1" v-model:value="formData.previewFile"
:disabled="!canUploadPreviewImage" :bizPath="directiveBizPath">
</JImageUpload>
</a-form-item>
</a-col> -->
<a-col :span="12">
<a-form-item label="服务指令描述" v-bind="validateInfos.serviceContent"
id="ConfigServiceDirectiveForm-serviceContent" name="serviceContent">
<a-textarea v-model:value="formData.serviceContent" :rows="2" placeholder="请输入服务指令描述" :autosize="true" />
</a-form-item>
</a-col>
<!-- </a-row> -->
<!-- <a-row v-show="!disabled">
<a-col :span="12">
<a-form-item label="指令音频文件" v-bind="validateInfos.mp3File" id="ConfigServiceDirectiveForm-mp3File">
<j-upload v-model:value="formData.mp3File" accept=".mp3" :maxCount="1"
:disabled="!canUploadPreviewImage" :bizPath="directiveBizPath"></j-upload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="指令视频文件" v-bind="validateInfos.mp4File" id="ConfigServiceDirectiveForm-mp4File">
<j-upload v-model:value="formData.mp4File" accept=".mp4" :maxCount="1"
:disabled="!canUploadPreviewImage" :bizPath="directiveBizPath"></j-upload>
</a-form-item>
</a-col>
</a-row> -->
</a-form>
</template>
</JFormContainer>
<!-- <JFormContainer style="margin-top: -40px;">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="ConfigServiceDirectiveForm">
<a-row>
<a-col :span="12" v-if="!!formData.mp3File">
<a-form-item label="指令音频预览" id="ConfigServiceDirectiveForm-mp3File">
<audio controls disabled="false">
<source :src="getFileAccessHttpUrl(formData.mp3File)">
</audio>
</a-form-item>
</a-col>
<a-col :span="12" v-if="disabled && !formData.mp3File">
<a-form-item label="指令音频预览">
<span>暂无文件</span>
</a-form-item>
</a-col>
<a-col :span="12" v-if="!!formData.mp4File" :push="!!formData.mp3File ? 0 : 12">
<a-form-item label="指令视频预览" id="ConfigServiceDirectiveForm-mp4File">
<video controls>
<source :src="getFileAccessHttpUrl(formData.mp4File)">
</video>
</a-form-item>
</a-col>
<a-col :span="12" v-if="disabled && !formData.mp3File">
<a-form-item label="指令视频预览">
<span>暂无文件</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="即时指令图标" v-bind="validateInfos.immediateFile">
<span v-if="disabled && !formData.immediateFile">暂无文件</span>
<JImageUpload v-else :fileMax="1" v-model:value="formData.immediateFile"
:disabled="!canUploadPreviewImage || disabled" :bizPath="directiveBizPath">
</JImageUpload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer> -->
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted, watch } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { JCheckbox } from '/@/components/Form';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
import { getValueType } from '/@/utils';
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true },
});
const bodyTagDictCode = ref(`nu_config_body_tag,tag_name,id,1=2`)
const emotionTagDictCode = ref(`nu_config_emotion_tag,tag_name,id,1=2`)
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
categoryId: '',
typeId: '',
instructionTagId: '',
directiveName: '',
tollPrice: 0,
comPrice: 0,
izReimbursement: '0',
izPreferential: '0',
chargingFrequency: '',
cycleType: '',
sort: 99,
serviceContent: '',
serviceDuration: '5',
izEnabled: '0',
createBy: '',
createTime: '',
updateBy: '',
updateTime: '',
mp3File: '',
mp4File: '',
previewFile: '',
immediateFile: '',
status: '',
statusVal: undefined,
sysOrgCode: undefined,
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 3 } });
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 20 } });
const confirmLoading = ref<boolean>(false);
const isEditMedia = ref(false)
const isAudit = ref(false)
//
const validatorRules = reactive({
categoryId: [{ required: true, message: '请选择服务类别!' },],
typeId: [{ required: true, message: '请选择服务类型!' },],
instructionTagId: [{ required: true, message: '请选择分类标签!' },],
directiveName: [{ required: true, message: '请输入服务指令名称!' },],
tollPrice: [{ required: true, message: '请输入收费价格!' }, { pattern: /^(([0-9]*)|([0]\.\d{0,4}|[1-9][0-9]*\.\d{0,4}))$/, message: '请输入正确的金额!' },],
comPrice: [{ required: false }, { pattern: /^(([0-9]*)|([0]\.\d{0,4}|[1-9][0-9]*\.\d{0,4}))$/, message: '请输入正确的金额!' },],
izReimbursement: [{ required: true, message: '请选择是否参与医保报销!' },],
izPreferential: [{ required: true, message: '请选择是否参与机构优惠!' },],
// chargingFrequency: [{ required: true, message: '!' },],
cycleType: [{ required: true, message: '请选择周期类型!' },],
// sort: [{ required: true, message: '!' }, { pattern: /^\d+$/, message: '!' },],
serviceDuration: [
{ required: true, message: '请输入服务时长(分钟)!' },
{ pattern: /^\d+$/, message: '请输入正整数!' },
{
validator: (_, value) => {
if (value % 5 !== 0) {
return Promise.reject('请输入5的倍数!');
}
return Promise.resolve();
},
},
{
validator: (_, value) => {
if (value < 5 || value > 55) {
return Promise.reject('请输入5到55之间的值!');
}
return Promise.resolve();
},
},
],
izEnabled: [{ required: true, message: '请选择是否启用!' },],
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const disabled = computed(() => {
if (props.formBpm === true) {
if (props.formData.disabled === false) {
return false;
} else {
return true;
}
}
return props.formDisabled;
});
const categoryDictCode = ref('')
const typeDictCode = ref('')
//
const canUploadPreviewImage = computed(() => {
return formData.instructionTagId &&
formData.categoryId &&
formData.typeId &&
formData.directiveName &&
formData.cycleType;
});
//
const instructionComDictCode = ref([])
function upInstructionDictCode(v_) {
instructionComDictCode.value = v_
}
//
const categoryComDictCode = ref([])
function upCategoryDictCode(v_) {
categoryComDictCode.value = v_
}
//
const typeComDictCode = ref([])
function upTypeDictCode(v_) {
typeComDictCode.value = v_
}
//
const cycleTypeComDictCode = ref([])
function upCycleTypeDictCode(v_) {
cycleTypeComDictCode.value = v_
}
watch([instructionComDictCode, categoryComDictCode, typeComDictCode, cycleTypeComDictCode], () => {
// directiveBizPath
}, { deep: true });
const directiveBizPath = computed(() => {
if (!canUploadPreviewImage.value) return '';
//
const instructionTagName_ = instructionComDictCode.value.filter(d => d.value == formData.instructionTagId)?.[0]?.label;
const categoryName_ = categoryComDictCode.value.filter(d => d.value == formData.categoryId)?.[0]?.label;
const typeName_ = typeComDictCode.value.filter(d => d.value == formData.typeId)?.[0]?.label;
const cycleTypeName_ = cycleTypeComDictCode.value.filter(d => d.value == formData.cycleType)?.[0]?.label;
//
return 'directive/' + `${instructionTagName_}/${categoryName_}/${typeName_}/${formData.directiveName}/${cycleTypeName_}`;
});
watch(
() => formData.instructionTagId,
(newInstructionTagId) => {
if (!newInstructionTagId) {
formData.categoryId = ''
formData.typeId = ''
categoryDictCode.value = 'nu_config_service_category,category_name,id,1=2';
} else {
categoryDictCode.value = `nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 and iz_enabled = 0 and instruction_id = '${newInstructionTagId}' order by sort asc`;
}
}
);
watch(
() => formData.categoryId,
(newCategoryId) => {
if (!newCategoryId) {
formData.typeId = ''
typeDictCode.value = 'nu_config_service_type,type_name,id,1=2';
} else {
typeDictCode.value = `nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${newCategoryId}' order by sort asc`;
}
}
);
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
* isEditMedia_是否为编辑指令资源 隐藏业务字段
* isAudit_是否为服务指令那个审核 隐藏业务字段
*/
function edit(record, isEditMedia_ = false, isAudit_ = false) {
console.log("🌊 ~ edit ~ record:", record)
if (!!record.bodyTags) {
// "id = 'id1' or id = 'id2'"
const bodyTagConditions = record.bodyTags.split(',')
.map(id => `id = '${id}'`)
.join(' or ');
bodyTagDictCode.value = `nu_config_body_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 ` +
(bodyTagConditions ? ` and (${bodyTagConditions})` : '') +
` order by sort asc`;
}
if (!!record.emotionTags) {
// "id = 'id1' or id = 'id2'"
const emotionTagConditions = record.emotionTags.split(',')
.map(id => `id = '${id}'`)
.join(' or ');
emotionTagDictCode.value = `nu_config_emotion_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 ` +
(emotionTagConditions ? ` and (${emotionTagConditions})` : '') +
` order by sort asc`;
}
isEditMedia.value = isEditMedia_
isAudit.value = isAudit_
formData.bodyTags = ''
formData.emotionTags = ''
nextTick(() => {
resetFields();
const tmpData = {};
Object.keys(formData).forEach((key) => {
if (record.hasOwnProperty(key)) {
tmpData[key] = record[key]
}
})
//
Object.assign(formData, tmpData);
});
}
defineExpose({
add,
edit,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
padding: 14px;
}
</style>

View File

@ -1,145 +0,0 @@
<template>
<a-drawer :title="title" width="70vw" v-model:visible="visible" :footer-style="{ textAlign: 'right' }" @cancel="handleCancel"
cancelText="关闭" :maskClosable="true">
<template #footer>
<a-button @click="handleCancel">关闭</a-button>
</template>
<CanAddDirectiveForm ref="registerForm" v-if="visible" @ok="submitCallback" :formDisabled="disableSubmit"
:formBpm="false"></CanAddDirectiveForm>
</a-drawer>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose, defineProps } from 'vue';
import CanAddDirectiveForm from './CanAddDirectiveForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
import { queryById } from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api';
const props = defineProps({
});
const title = ref<string>('');
const visible = ref<boolean>(false);
const auditVisible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const auditListRef = ref();
const emit = defineEmits(['register', 'success']);
const opeType = ref('')// add edit editMedia- look audit auditMedia-
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = '详情';
visible.value = true;
queryById({ dataSourceCode: record.orgCode, id: record.directiveId }).then(res => {
registerForm.value.edit(res);
})
}
/**
* 审核列表 - 审核
* @param record
*/
function audit(record) {
title.value = '审核';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record, false, true);
});
}
/**
* 打开审核列表
*/
function openAuditList() {
auditVisible.value = true;
auditListRef.value?.open();
}
/**
* 编辑指令资源
* @param record
*/
function editMedia(record) {
title.value = '编辑指令资源';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record, true);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
if (opeType.value == 'audit') {
registerForm.value.submitAudit();
} else {
registerForm.value.submitForm();
}
}
/**
* 暂存
*/
function handleSave() {
registerForm.value.submitForm();
}
/**
* 给审核对应的业务平台同步资源
*/
function handleMediaAsync() {
registerForm.value.syncMediaForBizFunc();
}
/**
* 给所有业务平台同步资源
*/
function handleMediaSyncAllPlat() {
registerForm.value.syncMediaForAllBizFunc();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
/**
* 审核列表-关闭按钮回调事件
*/
function handleAuditCancel() {
auditVisible.value = false;
emit('success')
}
defineExpose({
edit,
editMedia,
disableSubmit,
audit,
openAuditList,
opeType,
});
</script>
<style lang="less">
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>
<style lang="less" scoped></style>

View File

@ -1,77 +0,0 @@
export const selectedColumns = [
{
title: '分类标签',
align: 'center',
dataIndex: 'instructionTagId_dictText',
width: 90,
},
{
title: '服务类别',
align: 'center',
dataIndex: 'categoryId_dictText',
width: 100, // 添加固定宽度
},
{
title: '服务类型',
align: 'center',
dataIndex: 'typeId_dictText',
width: 120, // 添加固定宽度
},
{
title: '服务指令名称',
align: 'center',
dataIndex: 'directiveName',
width: 150, // 添加固定宽度
},
{
title: '体型标签',
align: 'center',
dataIndex: 'bodyTagList',
width: 150,
ellipsis: true, // 确保内容过长时显示省略号
},
{
title: '情绪标签',
align: 'center',
dataIndex: 'emotionTagList',
width: 150,
ellipsis: true, // 确保内容过长时显示省略号
},
{
title: '周期类型',
align: 'center',
dataIndex: 'cycleType_dictText',
width: 100, // 添加固定宽度
},
{
title: '服务时长(分钟)',
align: 'center',
dataIndex: 'serviceDuration',
width: 135,
},
{
title: '是否启用',
align: 'center',
dataIndex: 'izEnabled_dictText',
width: 100,
},
{
title: '预览图片',
align: 'center',
dataIndex: 'previewFileMedia',
width: 120, // 添加固定宽度
},
{
title: '即时指令图片',
align: 'center',
dataIndex: 'immediateFileMedia',
width: 150, // 添加固定宽度
},
{
title: '操作',
dataIndex: 'action',
key: 'action',
width: 60,
fixed: 'right',
},
];

View File

@ -1,81 +0,0 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/services/serviceDirective/list',
save='/services/serviceDirective/add',
edit='/services/serviceDirective/edit',
deleteOne = '/services/serviceDirective/delete',
deleteBatch = '/services/serviceDirective/deleteBatch',
importExcel = '/services/serviceDirective/importExcel',
exportXls = '/services/serviceDirective/exportXls',
async = '/services/serviceDirective/async',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
*
* @param params
* @param handleSuccess
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
* @param handleSuccess
*/
export const batchDelete = (params, handleSuccess) => {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
* @param isUpdate
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}
/**
*
* @param params
*/
export const asyncFunc = (params) => {
return defHttp.post({ url: Api.async, params }, { isTransformResponse: false });
}

View File

@ -1,123 +0,0 @@
import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '分类标签',
align: 'center',
dataIndex: 'instructionTagId_dictText',
width: 100,
// customCell: (record, index, column) => {
// if (record.instructionRowSpan != null) {
// return { rowSpan: record.instructionRowSpan };
// }
// },
},
{
title: '服务类别',
align: 'center',
dataIndex: 'categoryId_dictText',
// customCell: (record, index, column) => {
// if (record.categoryRowSpan != null) {
// return { rowSpan: record.categoryRowSpan };
// }
// },
},
{
title: '服务类型',
align: 'center',
dataIndex: 'typeId_dictText',
// customCell: (record, index, column) => {
// if (record.typeRowSpan != null) {
// return { rowSpan: record.typeRowSpan };
// }
// },
},
{
title: '服务指令名称',
align: 'center',
dataIndex: 'directiveName',
},
{
title: '体型标签',
align: 'center',
dataIndex: 'bodyTagList',
width: 150,
ellipsis: false,
format(text, record, index) {
if (!!text && text.length > 0) {
return text.map((item) => item.tagName).join('、');
} else {
return '-';
}
},
},
{
title: '情绪标签',
align: 'center',
dataIndex: 'emotionTagList',
width: 150,
ellipsis: false,
format(text, record, index) {
if (!!text && text.length > 0) {
return text.map((item) => item.tagName).join('、');
} else {
return '-';
}
},
},
{
title: '周期类型',
align: 'center',
dataIndex: 'cycleType_dictText',
},
{
title: '服务时长(分钟)',
align: 'center',
dataIndex: 'serviceDuration',
width: 135,
},
{
title: '是否启用',
align: 'center',
dataIndex: 'izEnabled_dictText',
width: 100,
},
{
title: '预览图片',
align: 'center',
dataIndex: 'previewFileMedia',
},
{
title: '即时指令图片',
align: 'center',
dataIndex: 'immediateFileMedia',
},
];
// 高级查询数据
export const superQuerySchema = {
categoryId: { title: '服务类别', order: 0, view: 'list', type: 'string', dictCode: '' },
typeId: { title: '服务类型', order: 1, view: 'list', type: 'string', dictCode: '' },
instructionTagId: { title: '分类标签', order: 2, view: 'list', type: 'string', dictCode: 'instruction_tag' },
directiveName: { title: '服务指令名称', order: 3, view: 'text', type: 'string' },
tollPrice: { title: '收费价格', order: 4, view: 'number', type: 'number' },
comPrice: { title: '提成价格', order: 5, view: 'number', type: 'number' },
izReimbursement: { title: '医保报销', order: 6, view: 'radio', type: 'string', dictCode: '' },
izPreferential: { title: '机构优惠', order: 7, view: 'radio', type: 'string', dictCode: '' },
chargingFrequency: { title: '收费频次', order: 8, view: 'list', type: 'string', dictCode: '' },
cycleType: { title: '周期类型', order: 9, view: 'list', type: 'string', dictCode: '' },
sort: { title: '排序', order: 10, view: 'number', type: 'number' },
serviceContent: { title: '服务说明', order: 11, view: 'textarea', type: 'string' },
serviceDuration: { title: '服务时长(分钟)', order: 12, view: 'text', type: 'string' },
izEnabled: { title: '是否启用', order: 13, view: 'radio', type: 'string', dictCode: '' },
createBy: { title: '创建人', order: 14, view: 'text', type: 'string' },
createTime: { title: '创建日期', order: 15, view: 'datetime', type: 'string' },
updateBy: { title: '更新人', order: 16, view: 'text', type: 'string' },
updateTime: { title: '更新日期', order: 17, view: 'datetime', type: 'string' },
mp3File: { title: '语音文件', order: 18, view: 'file', type: 'string' },
mp4File: { title: '视频文件', order: 19, view: 'file', type: 'string' },
};

View File

@ -1,300 +0,0 @@
<template>
<div class="p-2">
<BasicTable @register="registerTable" :scroll="{ y: '56vh' }" :rowClassName="getRowClassName" size="small">
<template #tableTitle></template>
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
<template v-if="column.dataIndex === 'previewFileMedia'">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<img v-else :src="testOrgInfo.url + text" style="max-height: 50px;max-width: 80px;">
</template>
<template v-if="column.dataIndex === 'immediateFileMedia'">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<img v-else :src="testOrgInfo.url + text" style="max-height: 50px;max-width: 80px;">
</template>
</template>
</BasicTable>
<ConfigServiceDirectiveModal ref="registerModal" :testOrgInfo="testOrgInfo" @success="handleSuccess"></ConfigServiceDirectiveModal>
<a-modal v-model:visible="showVideoModal" title="视频播放" :footer="null" @cancel="closeVideoModal"
:bodyStyle="{ maxHeight: '80vh', overflow: 'auto' }">
<video controls style="width: 100%; max-height: 70vh; display: block; margin: 0 auto;">
<source :src="videoUrl">
您的浏览器不支持视频播放
</video>
</a-modal>
</div>
</template>
<script lang="ts" name="serviceDirective-configServiceDirective" setup>
import { ref, reactive, watch } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './ConfigServiceDirective.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ConfigServiceDirective.api';
import ConfigServiceDirectiveModal from './components/ConfigServiceDirectiveModal.vue'
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
const props = defineProps({
queryParams: {
type: Object,
default: () => ({})
},
initialDataIds: { // ID
type: Array,
default: () => []
},
testOrgInfo: {//
type: Object,
default: () => ({})
}
});
const emit = defineEmits(['select-change']);
const queryParam = reactive<any>({});
const registerModal = ref();
const selectedRowIds = ref<Set<string | number>>(new Set());
const allSelectedItems = ref<Map<string | number, any>>(new Map());
//
const getRowClassName = (record) => {
return selectedRowIds.value.has(record.id) ? 'selected-row' : '';
};
//
const toggleSelect = (record) => {
if (selectedRowIds.value.has(record.id)) {
selectedRowIds.value.delete(record.id);
allSelectedItems.value.delete(record.id);
} else {
selectedRowIds.value.add(record.id);
allSelectedItems.value.set(record.id, record);
}
updateSelectedItems();
};
//
const removeSelected = (record) => {
if (props.initialDataIds.includes(record.id)) {
return;
}
selectedRowIds.value.delete(record.id);
allSelectedItems.value.delete(record.id);
updateSelectedItems();
};
//
const removeSelectedItem = (id: string | number) => {
selectedRowIds.value.delete(id);
allSelectedItems.value.delete(id);
updateSelectedItems();
};
//
const updateSelectedItems = () => {
emit('select-change', new Map(allSelectedItems.value));
};
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
watch(() => props.queryParams, (newParams) => {
reload();
}, { deep: true });
//
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '服务指令',
api: list,
columns,
size: 'small',
showTableSetting: false,
canResize: false,
useSearchForm: false,
showIndexColumn: true,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: async (params) => {
Object.assign(params, props.queryParams);
params.dataSourceCode = import.meta.env.VITE_SYTJGBM;
params.column = 'createTime'
params.order = 'desc'
params.selectedRowIds = Array.from(selectedRowIds.value)
return params;
},
},
exportConfig: {
name: "服务指令",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
function getTableAction(record) {
const actions = [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}
];
if (selectedRowIds.value.has(record.id)) {
actions.push({
label: '移除',
color: 'error',
disabled: props.initialDataIds.includes(record.id),
onClick: () => {
removeSelected(record);
}
});
} else {
actions.push({
label: '选择',
onClick: () => {
toggleSelect(record);
}
});
}
return actions;
}
function getDropDownAction(record) {
return [];
}
const showVideoModal = ref(false);
const videoUrl = ref('');
const openVideoModal = (url) => {
videoUrl.value = getFileAccessHttpUrl(url);
showVideoModal.value = true;
};
const closeVideoModal = () => {
showVideoModal.value = false;
videoUrl.value = '';
};
//
const updateSelection = (selectedRecords: any[]) => {
selectedRowIds.value.clear();
allSelectedItems.value.clear();
if (selectedRecords && selectedRecords.length > 0) {
selectedRecords.forEach(record => {
selectedRowIds.value.add(record.id);
allSelectedItems.value.set(record.id, record);
});
}
//
if (registerTable) {
registerTable.toggleRowSelection?.(Array.from(selectedRowIds.value), true);
}
};
// script
const getAllData = async (queryParams) => {
try {
//
const params = {
...queryParams,
pageNo: 1,
pageSize: -1,
dataSourceCode: import.meta.env.VITE_SYTJGBM,
column: 'createTime',
order: 'desc'
};
const res = await list(params);
return res.records || [];
} catch (error) {
console.error("获取全部数据失败:", error);
return [];
}
};
//
defineExpose({
removeSelectedItem,
updateSelection,
reload,
getAllData //
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
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%;
}
}
audio::-webkit-media-controls-timeline {
display: none;
}
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
display: none;
}
:deep(.ant-table-title) {
display: none !important;
}
:deep(.selected-row) {
background-color: #e6f7ff !important;
&:hover td {
background-color: #e6f7ff !important;
}
}
</style>

View File

@ -1,369 +0,0 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="ConfigServiceDirectiveForm">
<a-row>
<a-col :span="12">
<a-form-item label="分类标签" v-bind="validateInfos.instructionTagId"
id="ConfigServiceDirectiveForm-instructionTagId" name="instructionTagId">
<j-dict-select-tag v-model:value="formData.instructionTagId" :orgCode="orgCodeParam"
dictCode="instruction_tag" placeholder="请选择分类标签" allowClear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务类别" v-bind="validateInfos.categoryId" id="ConfigServiceDirectiveForm-categoryId"
name="categoryId">
<j-dict-select-tag type="list" v-model:value="formData.categoryId" :orgCode="orgCodeParam"
:dictCode="`nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`"
placeholder="请选择服务类别" allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务类型" v-bind="validateInfos.typeId" id="ConfigServiceDirectiveForm-typeId"
name="typeId">
<j-dict-select-tag type="list" v-model:value="formData.typeId" :dictCode="typeDictCode"
:orgCode="orgCodeParam" placeholder="请选择服务类型" allowClear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务指令名称" v-bind="validateInfos.directiveName"
id="ConfigServiceDirectiveForm-directiveName" name="directiveName">
<a-input v-model:value="formData.directiveName" placeholder="请输入服务指令名称" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="收费价格(元)" v-bind="validateInfos.tollPrice" id="ConfigServiceDirectiveForm-tollPrice"
name="tollPrice">
<a-input-number v-model:value="formData.tollPrice" placeholder="请输入收费价格" style="width: 100%"
precision="2" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="提成价格(元)" v-bind="validateInfos.comPrice" id="ConfigServiceDirectiveForm-comPrice"
name="comPrice">
<a-input-number v-model:value="formData.comPrice" placeholder="请输入提成价格" style="width: 100%"
precision="2" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="医保报销" v-bind="validateInfos.izReimbursement"
id="ConfigServiceDirectiveForm-izReimbursement" name="izReimbursement">
<j-dict-select-tag type='radio' v-model:value="formData.izReimbursement" :orgCode="orgCodeParam"
dictCode="med_ins_reimb" allowClear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构优惠" v-bind="validateInfos.izPreferential"
id="ConfigServiceDirectiveForm-izPreferential" name="izPreferential">
<j-dict-select-tag type='radio' v-model:value="formData.izPreferential" :orgCode="orgCodeParam"
dictCode="institutional_discount" allowClear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="周期类型" v-bind="validateInfos.cycleType" id="ConfigServiceDirectiveForm-cycleType"
name="cycleType">
<j-dict-select-tag type="list" v-model:value="formData.cycleType" :orgCode="orgCodeParam"
dictCode="period_type" placeholder="请选择周期类型" allowClear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务时长(分钟)" v-bind="validateInfos.serviceDuration"
id="ConfigServiceDirectiveForm-serviceDuration" name="serviceDuration">
<a-input-number v-model:value="formData.serviceDuration" :min="5" :max="55" :step="5"
placeholder="请输入服务时长(分钟)" allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务说明" v-bind="validateInfos.serviceContent"
id="ConfigServiceDirectiveForm-serviceContent" name="serviceContent">
<a-textarea v-model:value="formData.serviceContent" :rows="2" placeholder="请输入服务说明" />
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<a-form-item label="体型标签" id="ConfigServiceDirectiveForm-typeId" :labelCol="labelCol2"
:wrapperCol="wrapperCol2" name="typeId">
<JCheckbox v-model:value="formData.bodyTags" :orgCode="orgCodeParam"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="情绪标签" :labelCol="labelCol2" :wrapperCol="wrapperCol2" name="emoTags">
<JCheckbox v-model:value="formData.emotionTags" :orgCode="orgCodeParam"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="ConfigServiceDirectiveForm-izEnabled"
name="izEnabled">
<j-dict-select-tag type='radio' v-model:value="formData.izEnabled" :orgCode="orgCodeParam"
dictCode="iz_enabled" placeholder="请选择是否启用"  allowClear />
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-item label="预览图片">
<span v-if="!formData.previewFileMedia" style="font-size: 12px;font-style: italic;">无文件</span>
<img v-else :src="testOrgInfo.url + formData.previewFileMedia"
style="max-height: 100px;max-width: 100px;">
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="即时指令图片" v-bind="validateInfos.immediateFile">
<span v-if="!formData.immediateFileMedia" style="font-size: 12px;font-style: italic;">无文件</span>
<img v-else :src="testOrgInfo.url + formData.immediateFileMedia"
style="max-height: 100px;max-width: 100px;">
</a-form-item>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
<JFormContainer>
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="ConfigServiceDirectiveForm">
<a-row>
<a-col :span="12" v-if="!!formData.mp3FileMedia">
<a-form-item label="语音预览">
<audio controls disabled="false">
<source :src="testOrgInfo.url + formData.mp3FileMedia">
</audio>
</a-form-item>
</a-col>
<a-col :span="12" v-if="!!formData.mp4FileMedia" :push="!!formData.mp3FileMedia ? 0 : 12">
<a-form-item label="视频预览">
<video controls>
<source :src="testOrgInfo.url + formData.mp4FileMedia">
</video>
</a-form-item>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, watch } from 'vue';
import { useMessage } from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { JCheckbox } from '/@/components/Form';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../ConfigServiceDirective.api';
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
const orgCodeParam = import.meta.env.VITE_SYTJGBM
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true },
testOrgInfo: {//
type: Object,
default: () => ({})
}
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
categoryId: '',
typeId: '',
instructionTagId: '',
directiveName: '',
tollPrice: 0,
comPrice: 0,
izReimbursement: '0',
izPreferential: '0',
chargingFrequency: '',
cycleType: '',
sort: 99,
serviceContent: '',
serviceDuration: '5',
izEnabled: '0',
createBy: '',
createTime: '',
updateBy: '',
updateTime: '',
mp3File: '',
mp4File: '',
previewFile: '',
immediateFile: '',
previewFileMedia: '',
immediateFileMedia: '',
mp3FileMedia: '',
mp4FileMedia: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 3 } });
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 20 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = reactive({
categoryId: [{ required: true, message: '请选择服务类别!' },],
typeId: [{ required: true, message: '请选择服务类型!' },],
instructionTagId: [{ required: true, message: '请选择分类标签!' },],
directiveName: [{ required: true, message: '请输入服务指令名称!' },],
tollPrice: [{ required: true, message: '请输入收费价格!' }, { pattern: /^(([0-9]*)|([0]\.\d{0,4}|[1-9][0-9]*\.\d{0,4}))$/, message: '请输入正确的金额!' },],
comPrice: [{ required: false }, { pattern: /^(([0-9]*)|([0]\.\d{0,4}|[1-9][0-9]*\.\d{0,4}))$/, message: '请输入正确的金额!' },],
izReimbursement: [{ required: true, message: '请选择是否参与医保报销!' },],
izPreferential: [{ required: true, message: '请选择是否参与机构优惠!' },],
// chargingFrequency: [{ required: true, message: '!' },],
cycleType: [{ required: true, message: '请选择周期类型!' },],
// sort: [{ required: true, message: '!' }, { pattern: /^\d+$/, message: '!' },],
serviceDuration: [
{ required: true, message: '请输入服务时长(分钟)!' },
{ pattern: /^\d+$/, message: '请输入正整数!' },
{
validator: (_, value) => {
if (value % 5 !== 0) {
return Promise.reject('请输入5的倍数!');
}
return Promise.resolve();
},
},
{
validator: (_, value) => {
if (value < 5 || value > 55) {
return Promise.reject('请输入5到55之间的值!');
}
return Promise.resolve();
},
},
],
izEnabled: [{ required: true, message: '请选择是否启用!' },],
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const disabled = computed(() => {
if (props.formBpm === true) {
if (props.formData.disabled === false) {
return false;
} else {
return true;
}
}
return props.formDisabled;
});
const typeDictCode = ref('')
watch(
() => formData.categoryId,
(newCategoryId) => {
if (!newCategoryId) {
formData.typeId = '';
typeDictCode.value = 'nu_config_service_type,type_name,id,1=2';
} else {
typeDictCode.value = `nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${newCategoryId}' order by sort asc`;
}
}
);
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
*/
function edit(record) {
formData.bodyTags = ''
formData.emotionTags = ''
nextTick(() => {
resetFields();
const tmpData = {};
Object.keys(formData).forEach((key) => {
if (record.hasOwnProperty(key)) {
tmpData[key] = record[key]
}
})
//
Object.assign(formData, tmpData);
});
}
/**
* 提交数据
*/
async function submitForm() {
try {
//
await validate();
} catch ({ errorFields }) {
if (errorFields) {
const firstField = errorFields[0];
if (firstField) {
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
}
}
return Promise.reject(errorFields);
}
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = formData;
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
//
if (model.comPrice != 0 && model.tollPrice < model.comPrice) {
createMessage.warning('提成价格不能高于收费价格!');
confirmLoading.value = false;
retrun;
}
await saveOrUpdate(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
padding: 14px;
}
</style>

View File

@ -1,87 +0,0 @@
<template>
<j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk"
:okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"
:maskClosable="false">
<ConfigServiceDirectiveForm ref="registerForm" v-if="visible" :testOrgInfo="testOrgInfo" @ok="submitCallback"
:formDisabled="disableSubmit" :formBpm="false"></ConfigServiceDirectiveForm>
</j-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import ConfigServiceDirectiveForm from './ConfigServiceDirectiveForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
import { array } from 'vue-types';
const title = ref<string>('');
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
const props = defineProps({
testOrgInfo: {//
type: Object,
default: () => ({})
}
});
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style lang="less">
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>
<style lang="less" scoped></style>

View File

@ -1,427 +0,0 @@
<template>
<!--
platType:只查询对应机构类型的机构 业务机构ywjg 试验机构syjg
selectedSize已选择条数
hasSearchConditions是否存在搜索条件
viewTypeChanged源数据全部已选择未选择变更时的钩子函数
orgChanged机构变更钩子
handleAsync同步数据按钮
handleAddAll全部添加按钮
handleRemoveAll全部移除按钮
-->
<SyncComponent ref="syncComRef" :platType="'ywjg'" :syncType="'directive'" :selectedSize="Array.from(selectedItems.values()).length"
:hasSearchConditions="hasSearchConditions" :showReloadBtn="false" @viewTypeChanged="viewTypeChanged" @orgChanged="orgChanged"
@handleAsync="handleAsync" @handleAddAll="handleAddAll" @handleRemoveAll="handleRemoveAll">
<!-- 表单 -->
<template #searchFormSlot>
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="instructionTagId">
<template #label><span title="分类标签">分类标签</span></template>
<j-dict-select-tag v-model:value="queryParam.instructionTagId" :orgCode="sourceOrgCode"
dictCode="instruction_tag" :ignoreDisabled="true" placeholder="请选分类标签" allowClear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="categoryId">
<template #label><span title="服务类别">服务类别</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.categoryId"
:orgCode="sourceOrgCode"
:dictCode="`nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`"
:ignoreDisabled="true" placeholder="请选择服务类别" allow-clear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="typeId">
<template #label><span title="服务类型">服务类型</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.typeId" :orgCode="sourceOrgCode"
:dictCode="`nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`"
placeholder="请选择服务类型" :ignoreDisabled="true" allowClear />
</a-form-item>
</a-col>
<!-- <template v-if="toggleSearchStatus"> -->
<a-col :lg="6">
<a-form-item name="directiveName">
<template #label><span title="服务指令">服务指令</span></template>
<JInput v-model:value="queryParam.directiveName" placeholder="请输入服务指令名称" allowClear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="bodyTags">
<template #label><span title="体型标签">体型标签</span></template>
<JSelectMultiple type="list" v-model:value="queryParam.bodyTags" :orgCode="sourceOrgCode"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`"
:ignoreDisabled="true" placeholder="请选择体型标签" allowClear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="emotionTags">
<template #label><span title="情绪标签">情绪标签</span></template>
<JSelectMultiple type="list" v-model:value="queryParam.emotionTags" :orgCode="sourceOrgCode"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`"
:ignoreDisabled="true" placeholder="请选择情绪标签" allowClear />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined"
@click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</template>
<!-- 试验田数据列表 -->
<template #sourceTableSlot>
<ConfigServiceDirectiveList ref="listComRef" :testOrgInfo="testOrgInfo" :queryParams="queryParam"
:initialDataIds="initialDataIds" @select-change="handleSelectChange" />
</template>
<!-- 需要同步的机构的数据列表 -->
<template #businessTableSlot>
<a-table size="small" :columns="selectedColumns" :dataSource="Array.from(selectedItems.values())"
:pagination="false" :scroll="{ y: '55vh' }">
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'action'">
<a-popconfirm placement="left" ok-text="确认" cancel-text="取消"
@confirm="handleRemoveFromRight(record.id)">
<template #title>
<span>是否确认移除</span>
</template>
<a-button type="link" danger size="small"
:disabled="initialDataIds.includes(record.id)">移除</a-button>
</a-popconfirm>
</template>
<template v-else-if="column.dataIndex === 'mp3File'">
<span v-if="!record.mp3File" style="font-size: 12px;font-style: italic;">无文件</span>
<audio controls v-else style="width: 100%; max-width: 300px; height: 40px;">
<source :src="getFileAccessHttpUrl(record.mp3File)">
</audio>
</template>
<template v-else-if="column.dataIndex === 'mp4File'">
<span v-if="!record.mp4File" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else type="primary" size="small" @click="openVideoModal(record.mp4File)">
播放视频
</a-button>
</template>
<template v-else-if="column.dataIndex === 'bodyTagList'">
<span v-if="!record.bodyTagList || record.bodyTagList.length === 0"
style="font-size: 12px;font-style: italic;">-</span>
<template v-else>
{{record.bodyTagList.map(item => item.tagName).join('、')}}
</template>
</template>
<template v-else-if="column.dataIndex === 'emotionTagList'">
<span v-if="!record.emotionTagList || record.emotionTagList.length === 0"
style="font-size: 12px;font-style: italic;">-</span>
<template v-else>
{{record.emotionTagList.map(item => item.tagName).join('、')}}
</template>
</template>
<template v-else-if="column.dataIndex === 'previewFileMedia'">
<span v-if="!record.previewFileMedia" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="testOrgInfo.url + record.previewFileMedia"
style="max-width: 50px; max-height: 50px;" />
</template>
<template v-else-if="column.dataIndex === 'immediateFileMedia'">
<span v-if="!record.immediateFileMedia" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="testOrgInfo.url + record.immediateFileMedia"
style="max-width: 50px; max-height: 50px;" />
</template>
</template>
</a-table>
</template>
</SyncComponent>
<a-modal v-model:visible="showVideoModal" title="视频播放" :footer="null" @cancel="closeVideoModal"
:bodyStyle="{ maxHeight: '80vh', overflow: 'auto' }">
<video controls style="width: 100%; max-height: '70vh'; display: block; margin: 0 auto;">
<source :src="videoUrl">
您的浏览器不支持视频播放
</video>
</a-modal>
</template>
<script setup name="synchronization-directive2" lang="ts">
/**
*说明
* 如何获取当前机构信息 syncComRef?.value?.orgData
*/
import { ref, reactive, computed, onBeforeMount } from 'vue'
import SyncComponent from '/@/components/Sync/SyncComponent.vue'
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
import { useMessage } from "/@/hooks/web/useMessage";
import { getOrgInfo } from '/@/api/common/api';
//
import { list, asyncFunc } from './directiveCom/ConfigServiceDirective.api';
import ConfigServiceDirectiveList from './directiveCom/ConfigServiceDirectiveList.vue'
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'
import { selectedColumns } from './directive.data';
// >>>>>>>>>>>>>
const { createMessage } = useMessage();
const syncComRef = ref(null)
const sourceOrgCode = import.meta.env.VITE_SYTJGBM
const labelCol = reactive({
xs: 24,
sm: 4,
xl: 6,
xxl: 5
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
const testOrgInfo = ref({})
// <<<<<<<<<<<<<
// >>>>>>>>>>>>>
const listComRef = ref();
const initialDataIds = ref<string[]>([]);//
const selectedItems = ref(new Map<string | number, any>());//
const queryParam = ref({ viewType: 'all' })//
const showVideoModal = ref(false);
const videoUrl = ref('');
//
const hasSearchConditions = computed(() => {
return Object.keys(queryParam.value).some(key =>
key !== 'viewType' && queryParam.value[key] !== undefined && queryParam.value[key] !== ''
);
});
/**
* 机构变更
*/
const orgChanged = async (org) => {
//
selectedItems.value.clear();
//
initialDataIds.value = [];
try {
//
const res = await list({ dataSourceCode: org.orgCode, pageNo: 1, pageSize: -1 });
//
if (res.records && res.records.length > 0) {
const newRecords = res.records;
newRecords.forEach(record => {
selectedItems.value.set(record.id, record);
if (!syncComRef?.value?.orgData?.operationStartTime || new Date() >= new Date(syncComRef?.value?.orgData?.operationStartTime)) {
initialDataIds.value.push(record.id);
}
});
//
listComRef.value?.updateSelection?.(newRecords);
} else {
//
selectedItems.value.clear();
listComRef.value?.updateSelection?.([]);
}
//
syncComRef?.value?.resetOrgSelectedCon(false);
} catch (err) {
createMessage.error('机构数据查询失败');
//
selectedItems.value.clear();
listComRef.value?.updateSelection?.([]);
}
}
/**
* 查询
*/
function searchQuery() {
listComRef.value.reload();
}
/**
* 重置
* 子组件代码会自动触发reload方法
* watch(() => props.queryParams, (newParams) => {
reload();
}, { deep: true });
*/
function searchReset() {
let vt = queryParam.value.viewType
queryParam.value = { viewType: vt }
}
/**
* 源数据的全部已选择未选择变更时触发
* @param v_ allselectedunselected
*/
const viewTypeChanged = (v_) => {
queryParam.value.viewType = v_
//queryParam
}
const handleSelectChange = (items: Map<string | number, any>) => {
selectedItems.value = new Map(items);
};
const handleRemoveFromRight = (key: string | number) => {
selectedItems.value.delete(key);
listComRef.value?.removeSelectedItem?.(key);
};
const openVideoModal = (url: string) => {
videoUrl.value = getFileAccessHttpUrl(url);
showVideoModal.value = true;
};
const closeVideoModal = () => {
showVideoModal.value = false;
videoUrl.value = '';
};
//
const handleAsync = async () => {
let idStr = Array.from(selectedItems.value.keys()).join(',')
if (!idStr) {
createMessage.warning("未选择数据!");
return
}
let izInc = true
if (!!syncComRef?.value?.orgData?.operationStartTime) izInc = new Date() >= new Date(syncComRef?.value?.orgData?.operationStartTime)
let params = {
orgCode: syncComRef?.value?.orgData?.orgCode,
izInc,
idStr
}
await asyncFunc(params)
//
if (!syncComRef?.value?.orgData?.operationStartTime || new Date() >= new Date(syncComRef?.value?.orgData?.operationStartTime)) {
// ID
const syncedIds = Array.from(selectedItems.value.keys());
// initialDataIdsID
syncedIds.forEach(id => {
if (!initialDataIds.value.includes(id)) {
initialDataIds.value.push(id);
}
});
}
//
syncComRef?.value?.refreshHistory()
createMessage.success("同步结果请在同步历史中查看!");
};
//
const handleAddAll = async () => {
try {
//
const allData = await listComRef.value?.getAllData?.(queryParam.value);
if (allData && allData.length > 0) {
//
const newItems = allData.filter(item => !selectedItems.value.has(item.id));
if (newItems.length === 0) {
createMessage.info("没有新的数据可以添加");
return;
}
//
newItems.forEach(item => {
selectedItems.value.set(item.id, item);
});
//
listComRef.value?.updateSelection?.(Array.from(selectedItems.value.values()));
createMessage.success(`已添加 ${newItems.length} 条数据`);
} else {
createMessage.info("没有查询到数据");
}
} catch (error) {
createMessage.error("获取全部数据失败");
}
}
//
const handleRemoveAll = () => {
if (selectedItems.value.size === 0) {
createMessage.info("当前没有已选数据");
return;
}
//
if (!syncComRef?.value?.orgData.value?.operationStartTime || new Date() >= new Date(syncComRef?.value?.orgData.value?.operationStartTime)) {
// Map
const newSelectedItems = new Map();
//
selectedItems.value.forEach((value, key) => {
if (initialDataIds.value.includes(key)) {
newSelectedItems.set(key, value);
}
});
selectedItems.value = newSelectedItems;
listComRef.value?.updateSelection?.(Array.from(newSelectedItems.values()));
} else {
selectedItems.value.clear();
listComRef.value?.updateSelection?.([]);
}
createMessage.success("已移除所有已选数据");
}
// <<<<<<<<<<<<<
onBeforeMount(() => {
getOrgInfo({ orgCode: import.meta.env.VITE_SYTJGBM }).then(res => {
testOrgInfo.value = res
})
})
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
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%;
}
}
.selected-list-container {
:deep(.ant-table) {
width: 100% !important;
max-width: 100%;
}
}
</style>

View File

@ -1,158 +0,0 @@
<template>
<div>
<a-row>
<a-col v-for="(item, index) in orgTableList.records" :key="item.id" :xs="24" :sm="24"
:md="props.layout == 'full' ? 12 : 8" :lg="props.layout == 'full' ? 12 : 8" :xl="props.layout == 'full' ? 8 : 8"
:xxl="props.layout == 'full' ? 6 : 8" :xxxl="props.layout == 'full' ? 4 : 8"
:style="{ 'padding-right': ((index + 1) % 4 != 0) ? '14px' : '0px', 'padding-bottom': '14px' }">
<OrgCard :orgInfo="item" :layout="props.layout" :showMainTile="props.showMainTile" :showInfo="props.showInfo"
:showHldy="props.showHldy"
:is-selected="selectedOrgs.some(org => org.orgCode === item.orgCode)"
:is-directive-selected="directiveMainSelectedOrg?.orgCode === item.orgCode"
:is-directive-main="dmOrg?.orgCode === item.orgCode" :show-detail="props.showDetail"
:clickable="props.showChoose || props.showDirectiveChoose" @click="handleCardClick" @detail="handleDetail"
@info="handleInfo" @hldy="handleHldy" />
</a-col>
<a-col v-if="orgTableList.length == 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;"
v-show="props.layout == 'full' && pageSize != -1">
<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>
</div>
</template>
<script setup lang="ts" name="synchronization-directive2">
import { ref, reactive, onMounted } from 'vue'
import { Pagination } from 'ant-design-vue'
import { getOrgInfo } from '/@/views/admin/orgapplyinfo/OrgApplyInfo.api'
import OrgCard from '/@/components/OrgCard/OrgCardCom.vue'
const props = defineProps({
showChoose: { type: Boolean, default: false },
pageSize: { type: Number, default: 8 },
showDetail: { type: Boolean, default: false },
showInfo: { type: Boolean, default: false },
title: { type: String, default: '' },
allowMultipleSelection: { type: Boolean, default: false },
layout: { type: String, default: 'full' },
excludeOrgCode: { type: String, default: '' },
showDirectiveMain: { type: Boolean, default: false },
showDirectiveChoose: { type: Boolean, default: false },
showDMTip: { type: Boolean, default: false },
showMainTile: { type: Boolean, default: true },///
showHldy: { type: Boolean, default: false },//
})
const emit = defineEmits(['handleOrgDetail', 'handleOrgChoose', 'handleOrgInfo','handleHldy'])
const orgTableList = ref<any>({ records: [], total: 0 })
const queryParam = reactive<any>({})
const pageParams = ref({ pageNo: 1, pageSize: props.pageSize })
const directiveMainSelectedOrg = ref<any>(null)
const dmOrg = ref<any>('')
const selectedOrgs = ref<any[]>([])
function handleCardClick(item: any) {
if (props.showDirectiveChoose) {
directiveMainSelectedOrg.value = item
emit('handleOrgChoose', item)
}
if (props.showChoose) {
if (props.allowMultipleSelection) {
if (selectedOrgs.value.some(selected => selected.orgCode === item.orgCode)) {
selectedOrgs.value = selectedOrgs.value.filter(selected => selected.orgCode !== item.orgCode)
} else {
selectedOrgs.value.push(item)
}
} else {
selectedOrgs.value = [item]
}
}
}
function commitOrgsInfo() {
emit('handleOrgChoose', selectedOrgs.value)
}
function handleDetail(item: any) {
emit('handleOrgDetail', item)
}
function handleInfo(item: any) {
emit('handleOrgInfo', item)
}
function handleHldy(item: any) {
emit('handleHldy', item)
}
function reload() {
directiveMainSelectedOrg.value = {}
queryParam.pageSize = pageParams.value.pageSize
queryParam.pageNo = pageParams.value.pageNo
queryParam.title = props.title
if (props.layout == 'half') {
queryParam.pageSize = -1
}
getOrgInfo(queryParam).then(res => {
res.records = res.records.filter(o => o.orgCode != props.excludeOrgCode)
orgTableList.value = res
if (props.showDirectiveChoose || props.showDMTip) {
const defaultSelected = res.records.find(item => item.izDirectiveMain === 'Y')
if (defaultSelected) {
dmOrg.value = defaultSelected
emit('handleOrgChoose', defaultSelected)
}
}
})
}
function searchReset() {
queryParam.title = null
if (props.layout == 'half') {
queryParam.pageSize = -1
}
getOrgInfo(queryParam).then(res => {
res.records = res.records.filter(o => o.orgCode != props.excludeOrgCode)
orgTableList.value = res
})
}
function checkAllOrEmpty(isCheckAll = true) {
if (isCheckAll) {
orgTableList.value.records.forEach(item => {
if (!selectedOrgs.value.some(selected => selected.orgCode === item.orgCode)) {
selectedOrgs.value.push(item);
}
});
} else {
selectedOrgs.value = [];
}
emit('handleOrgChoose', selectedOrgs.value);
}
function resetSeleted(orgs: any[]) {
selectedOrgs.value = [...orgs]
}
onMounted(() => {
reload()
})
defineExpose({
reload,
searchReset,
selectedOrgs,
checkAllOrEmpty,
commitOrgsInfo,
resetSeleted
})
</script>

View File

@ -1,41 +0,0 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
const { createConfirm } = useMessage();
enum Api {
list = '/services/serviceDirective/list',
listByDS = '/services/serviceDirective/listByDS',
queryById = '/services/serviceDirective/queryById',
syncDirective = '/services/serviceDirective/syncDirective',
idListByDS = '/services/serviceDirective/idListByDS',
}
/**
*
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
export const queryById = (params) => defHttp.get({ url: Api.queryById, params });
/**
* -
* @param params
*/
export const listByDS = (params) => defHttp.get({ url: Api.listByDS, params });
/**
*
* @param params id
* @returns
*/
export const idListByDS = (params) => defHttp.get({ url: Api.idListByDS, params });
/**
*
* @param params
* @returns
*/
export const syncDirective = (dataSourceCode: string, params: any) => {
return defHttp.post({ url: `${Api.syncDirective}?dataSourceCode=${encodeURIComponent(dataSourceCode)}`, params });
};

View File

@ -1,444 +0,0 @@
import { BasicColumn } from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
{
title: '分类标签',
align: 'center',
dataIndex: 'instructionTagId_dictText',
customCell: (record, index, column) => {
if (record.instructionRowSpan != null) {
return { rowSpan: record.instructionRowSpan };
}
},
},
{
title: '服务类别',
align: 'center',
dataIndex: 'categoryId_dictText',
customCell: (record, index, column) => {
if (record.categoryRowSpan != null) {
return { rowSpan: record.categoryRowSpan };
}
},
},
{
title: '服务类型',
align: 'center',
dataIndex: 'typeId_dictText',
customCell: (record, index, column) => {
if (record.typeRowSpan != null) {
return { rowSpan: record.typeRowSpan };
}
},
},
{
title: '服务指令',
align: 'center',
dataIndex: 'directiveName',
},
// {
// title: '体型标签',
// align: 'center',
// dataIndex: 'bodyTagList',
// ellipsis: false,
// defaultHidden: false,
// format(text, record, index) {
// if (!!text) {
// return text.map((item) => item.tagName).join('、');
// } else {
// return '-';
// }
// },
// },
// {
// title: '情绪标签',
// align: 'center',
// dataIndex: 'emotionTagList',
// ellipsis: false,
// defaultHidden: false,
// format(text, record, index) {
// if (!!text) {
// return text.map((item) => item.tagName).join('、');
// } else {
// return '-';
// }
// },
// },
{
title: '收费价格',
align: 'center',
dataIndex: 'tollPrice',
defaultHidden: true,
},
{
title: '提成价格',
align: 'center',
dataIndex: 'comPrice',
defaultHidden: true,
},
{
title: '医保报销',
align: 'center',
dataIndex: 'izReimbursement_dictText',
defaultHidden: true,
},
{
title: '机构优惠',
align: 'center',
dataIndex: 'izPreferential_dictText',
defaultHidden: true,
},
{
title: '周期类型',
align: 'center',
dataIndex: 'cycleType_dictText',
},
{
title: '服务时长(分钟)',
align: 'center',
dataIndex: 'serviceDuration',
},
{
title: '是否启用',
align: 'center',
dataIndex: 'izEnabled_dictText',
},
];
export const sourceColumns: BasicColumn[] = [
{
title: '状态',
align: 'center',
dataIndex: 'izExist',
width: 70,
fixed: 'left',
},
{
title: '分类标签',
align: 'center',
dataIndex: 'instructionTagId_dictText',
customCell: (record, index, column) => {
if (record.instructionRowSpan != null) {
return { rowSpan: record.instructionRowSpan };
}
},
},
{
title: '服务类别',
align: 'center',
dataIndex: 'categoryId_dictText',
customCell: (record, index, column) => {
if (record.categoryRowSpan != null) {
return { rowSpan: record.categoryRowSpan };
}
},
},
{
title: '服务类型',
align: 'center',
dataIndex: 'typeId_dictText',
customCell: (record, index, column) => {
if (record.typeRowSpan != null) {
return { rowSpan: record.typeRowSpan };
}
},
},
{
title: '服务指令',
align: 'center',
dataIndex: 'directiveName',
},
// {
// title: '体型标签',
// align: 'center',
// dataIndex: 'bodyTagList',
// ellipsis: false,
// // defaultHidden: true,
// format(text, record, index) {
// if (!!text) {
// return text.map((item) => item.tagName).join('、');
// } else {
// return '-';
// }
// },
// },
// {
// title: '情绪标签',
// align: 'center',
// dataIndex: 'emotionTagList',
// ellipsis: false,
// // defaultHidden: true,
// format(text, record, index) {
// if (!!text) {
// return text.map((item) => item.tagName).join('、');
// } else {
// return '-';
// }
// },
// },
{
title: '收费价格',
align: 'center',
dataIndex: 'tollPrice',
defaultHidden: true,
},
{
title: '提成价格',
align: 'center',
dataIndex: 'comPrice',
defaultHidden: true,
},
{
title: '医保报销',
align: 'center',
dataIndex: 'izReimbursement_dictText',
defaultHidden: true,
},
{
title: '机构优惠',
align: 'center',
dataIndex: 'izPreferential_dictText',
defaultHidden: true,
},
{
title: '周期类型',
align: 'center',
dataIndex: 'cycleType_dictText',
},
{
title: '服务时长(分钟)',
align: 'center',
dataIndex: 'serviceDuration',
},
];
export const targetSourceColumns: BasicColumn[] = [
{
title: '分类标签',
align: 'center',
dataIndex: 'instructionTagId_dictText',
customCell: (record, index, column) => {
if (record.instructionRowSpan != null) {
return { rowSpan: record.instructionRowSpan };
}
},
},
{
title: '服务类别',
align: 'center',
dataIndex: 'categoryId_dictText',
customCell: (record, index, column) => {
if (record.categoryRowSpan != null) {
return { rowSpan: record.categoryRowSpan };
}
},
},
{
title: '服务类型',
align: 'center',
dataIndex: 'typeId_dictText',
customCell: (record, index, column) => {
if (record.typeRowSpan != null) {
return { rowSpan: record.typeRowSpan };
}
},
},
{
title: '服务指令',
align: 'center',
dataIndex: 'directiveName',
},
// {
// title: '体型标签',
// align: 'center',
// dataIndex: 'bodyTagList',
// ellipsis: false,
// // defaultHidden: true,
// format(text, record, index) {
// if (!!text) {
// return text.map((item) => item.tagName).join('、');
// } else {
// return '-';
// }
// },
// },
// {
// title: '情绪标签',
// align: 'center',
// dataIndex: 'emotionTagList',
// ellipsis: false,
// // defaultHidden: true,
// format(text, record, index) {
// if (!!text) {
// return text.map((item) => item.tagName).join('、');
// } else {
// return '-';
// }
// },
// },
{
title: '收费价格',
align: 'center',
dataIndex: 'tollPrice',
defaultHidden: true,
},
{
title: '提成价格',
align: 'center',
dataIndex: 'comPrice',
defaultHidden: true,
},
{
title: '医保报销',
align: 'center',
dataIndex: 'izReimbursement_dictText',
defaultHidden: true,
},
{
title: '机构优惠',
align: 'center',
dataIndex: 'izPreferential_dictText',
defaultHidden: true,
},
{
title: '周期类型',
align: 'center',
dataIndex: 'cycleType_dictText',
},
{
title: '服务时长(分钟)',
align: 'center',
dataIndex: 'serviceDuration',
},
];
export const targetColumns: BasicColumn[] = [
{
title: '分类标签',
align: 'center',
dataIndex: 'instructionTagId_dictText',
customCell: (record, index, column) => {
if (record.instructionRowSpan != null) {
return { rowSpan: record.instructionRowSpan };
}
},
},
{
title: '服务类别',
align: 'center',
dataIndex: 'categoryId_dictText',
customCell: (record, index, column) => {
if (record.categoryRowSpan != null) {
return { rowSpan: record.categoryRowSpan };
}
},
},
{
title: '服务类型',
align: 'center',
dataIndex: 'typeId_dictText',
customCell: (record, index, column) => {
if (record.typeRowSpan != null) {
return { rowSpan: record.typeRowSpan };
}
},
},
{
title: '服务指令',
align: 'center',
dataIndex: 'directiveName',
},
// {
// title: '体型标签',
// align: 'center',
// dataIndex: 'bodyTagList',
// ellipsis: false,
// // defaultHidden: true,
// format(text, record, index) {
// if (!!text) {
// return text.map((item) => item.tagName).join('、');
// } else {
// return '-';
// }
// },
// },
// {
// title: '情绪标签',
// align: 'center',
// dataIndex: 'emotionTagList',
// ellipsis: false,
// // defaultHidden: true,
// format(text, record, index) {
// if (!!text) {
// return text.map((item) => item.tagName).join('、');
// } else {
// return '-';
// }
// },
// },
{
title: '收费价格',
align: 'center',
dataIndex: 'tollPrice',
defaultHidden: true,
},
{
title: '提成价格',
align: 'center',
dataIndex: 'comPrice',
defaultHidden: true,
},
{
title: '医保报销',
align: 'center',
dataIndex: 'izReimbursement_dictText',
defaultHidden: true,
},
{
title: '机构优惠',
align: 'center',
dataIndex: 'izPreferential_dictText',
defaultHidden: true,
},
{
title: '周期类型',
align: 'center',
dataIndex: 'cycleType_dictText',
},
{
title: '服务时长(分钟)',
align: 'center',
dataIndex: 'serviceDuration',
},
{
title: '同步类型',
align: 'center',
dataIndex: 'izExist',
width: 80,
fixed: 'right',
},
];
// 高级查询数据
export const superQuerySchema = {
categoryId: { title: '服务类别', order: 0, view: 'list', type: 'string', dictCode: '' },
typeId: { title: '服务类型', order: 1, view: 'list', type: 'string', dictCode: '' },
instructionTagId: { title: '分类标签', order: 2, view: 'list', type: 'string', dictCode: 'instruction_tag' },
directiveName: { title: '服务指令', order: 3, view: 'text', type: 'string' },
tollPrice: { title: '收费价格', order: 4, view: 'number', type: 'number' },
comPrice: { title: '提成价格', order: 5, view: 'number', type: 'number' },
izReimbursement: { title: '医保报销', order: 6, view: 'radio', type: 'string', dictCode: '' },
izPreferential: { title: '机构优惠', order: 7, view: 'radio', type: 'string', dictCode: '' },
chargingFrequency: { title: '收费频次', order: 8, view: 'list', type: 'string', dictCode: '' },
cycleType: { title: '周期类型', order: 9, view: 'list', type: 'string', dictCode: '' },
sort: { title: '排序', order: 10, view: 'number', type: 'number' },
serviceContent: { title: '服务说明', order: 11, view: 'textarea', type: 'string' },
serviceDuration: { title: '服务时长(分钟)', order: 12, view: 'text', type: 'string' },
izEnabled: { title: '是否启用', order: 13, view: 'radio', type: 'string', dictCode: '' },
createBy: { title: '创建人', order: 14, view: 'text', type: 'string' },
createTime: { title: '创建日期', order: 15, view: 'datetime', type: 'string' },
updateBy: { title: '更新人', order: 16, view: 'text', type: 'string' },
updateTime: { title: '更新日期', order: 17, view: 'datetime', type: 'string' },
mp3File: { title: '语音文件', order: 18, view: 'file', type: 'string' },
mp4File: { title: '视频文件', order: 19, view: 'file', type: 'string' },
};

View File

@ -1,247 +0,0 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol" style="padding-top: 20px;">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="instructionTagId">
<template #label><span title="分类标签">分类标签</span></template>
<j-dict-select-tag v-model:value="queryParam.instructionTagId"
:dictCode="`nu_config_service_instruction_tag,instruction_name,id,del_flag = 0 and iz_enabled = 'Y' order by sort asc`"
:orgCode="queryParam.dataSourceCode" :ignoreDisabled="true" placeholder="请选分类标签" allowClear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="categoryId">
<template #label><span title="服务类别">服务类别</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.categoryId" :orgCode="queryParam.dataSourceCode"
:dictCode="`nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 'Y' and instruction_id = '${queryParam.instructionTagId || ''}' order by sort asc`"
:ignoreDisabled="true" placeholder="请选择服务类别" allow-clear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="typeId">
<template #label><span title="服务类型">服务类型</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.typeId" :orgCode="queryParam.dataSourceCode"
:dictCode="`nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 'Y' and category_id = '${queryParam.categoryId || ''}' order by sort asc`"
placeholder="请选择服务类型" :ignoreDisabled="true" allowClear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="directiveName">
<template #label><span title="服务指令">服务指令</span></template>
<JInput v-model:value="queryParam.directiveName" placeholder="请输入服务指令名称" allowClear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="cycleType">
<template #label><span title="周期类型">周期类型</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.cycleType" :orgCode="queryParam.dataSourceCode"
dictCode="period_type" placeholder="请选择周期类型" :ignoreDisabled="true" allowClear />
</a-form-item>
</a-col>
<!-- <a-col :lg="6">
<a-form-item name="bodyTags">
<template #label><span title="体型标签">体型标签</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.bodyTags"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = '0' and iz_enabled = 'Y' order by sort asc`" :ignoreDisabled="true"
placeholder="请选择体型标签" allowClear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="emotionTags">
<template #label><span title="情绪标签">情绪标签</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.emotionTags"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = '0' and iz_enabled = 'Y' order by sort asc`" :ignoreDisabled="true"
placeholder="请选择情绪标签" allowClear />
</a-form-item>
</a-col> -->
<!-- <a-col :lg="6">
<a-form-item name="izEnabled">
<template #label><span title="是否启用">是否启用</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.izEnabled" dictCode="iz_enabled"
:ignoreDisabled="true" placeholder="请选择是否启用" allowClear />
</a-form-item>
</a-col> -->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
<div v-show="!!sourceOrgName" style="margin-left: 14px;">
<span style="font-size:13px;color:#6b7280;">源平台</span>
<span
style="padding:4px 8px;border-radius:12px;background:#f8fafc;border:1px solid #e6eef8;font-size:14px;font-weight:500;">
{{ sourceOrgName }}
</span>
<span style="margin:0 6px;color:#9ca3af;">|</span>
<span style="font-size:13px;color:#6b7280;">目标平台</span>
<span
style="padding:4px 8px;border-radius:12px;background:#f1f5f9;border:1px solid #e6eef8;font-size:14px;font-weight:500;">
{{ targetOrgName }}
</span>
</div>
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
<template v-if="column.dataIndex === 'bodyTagList'">
<span :title="text.map((item) => item.tagName).join('、')">{{text.map((item) =>
item.tagName).join('、')}}</span>
</template>
<template v-if="column.dataIndex === 'emotionTagList'">
<span :title="text.map((item) => item.tagName).join('、')">{{text.map((item) =>
item.tagName).join('、')}}</span>
</template>
</template>
</BasicTable>
</div>
</template>
<script lang="ts" name="serviceDirective-configServiceDirective" setup>
import { ref, reactive, onMounted } from 'vue';
import { BasicTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './ConfigServiceDirective.data';
import { listByDS } from './ConfigServiceDirective.api';
import { useUserStore } from '/@/store/modules/user';
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { cloneDeep } from "lodash-es";
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
const sourceOrgName = ref()//-
const targetOrgName = ref()//-
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '服务指令',
api: listByDS,
columns,
canResize: false,
useSearchForm: false,
showIndexColumn: true,
showActionColumn: false,
immediate: false,
pagination: {
current: 1,
pageSize: 15,
pageSizeOptions: ['15', '50', '70', '100'],
},
beforeFetch: async (params) => {
queryParam.izEnabled = 'Y'
return Object.assign(params, queryParam);
},
actionColumn: {
width: 160,
fixed: 'right',
},
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: 24,
sm: 6,
xl: 6,
xxl: 6
});
const wrapperCol = reactive({
xs: 24,
sm: 18,
});
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
function init(record) {
queryParam.queryIds = record.queryIds
queryParam.dataSourceCode = record.orgCode;
sourceOrgName.value = record.sourceOrgName
targetOrgName.value = record.targetOrgName
reload();
}
defineExpose({
init,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
margin-bottom: 14px;
.table-page-search-submitButtons {
display: block;
margin-bottom: 14px;
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: 14px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
audio::-webkit-media-controls-timeline {
display: none;
}
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
display: none;
}
.btnPrivate {
height: 34px;
margin-left: 4px;
}
</style>

View File

@ -1,71 +0,0 @@
<template>
<!-- <j-modal :title="title" width="75vw" :visible="visible" @cancel="handleCancel" cancelText="关闭" :maskClosable="false">
<ConfigServiceDirectiveList ref="registerForm" v-if="visible" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ConfigServiceDirectiveList>
</j-modal> -->
<a-drawer :title="title" width="80vw" v-model:visible="visible" v-if="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
<ConfigServiceDirectiveList ref="registerForm" v-if="visible" @ok="submitCallback" :formDisabled="disableSubmit"
:formBpm="false"></ConfigServiceDirectiveList>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose, defineProps } from 'vue';
import ConfigServiceDirectiveList from './ConfigServiceDirectiveList.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const props = defineProps({
sysUrlValue: { type: String, default: '' },
});
const title = ref<string>('');
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 编辑
* @param record
*/
function init(record) {
title.value = '详情';
visible.value = true;
nextTick(() => {
registerForm.value.init(record);
});
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
init,
disableSubmit,
});
</script>
<style lang="less">
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>
<style lang="less" scoped></style>

View File

@ -1,567 +0,0 @@
<template>
<div class="p-2" style="overflow-x: hidden;">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="5">
<a-form-item name="instructionTagId">
<template #label><span title="分类标签">分类标签</span></template>
<j-dict-select-tag v-model:value="queryParam.instructionTagId" :disabled="!showJSCom"
:orgCode="sourceOrgInfo?.orgCode"
:dictCode="`nu_config_service_instruction_tag,instruction_name,id,del_flag = 0 and iz_enabled = 'Y' order by sort asc`"
placeholder="请选择分类标签" allowClear :ignoreDisabled="true" @select="reload()" />
<!-- <span v-else>请选择源平台</span> -->
</a-form-item>
</a-col>
<a-col :lg="5">
<a-form-item name="categoryId">
<template #label><span title="服务类别">服务类别</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.categoryId" :disabled="!showJSCom"
:orgCode="sourceOrgInfo?.orgCode"
:dictCode="`nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 'Y' and instruction_id = '${queryParam.instructionTagId || ''}' order by sort asc`"
placeholder="请选择服务类别" allowClear :ignoreDisabled="true" @select="reload()" />
</a-form-item>
</a-col>
<a-col :lg="5">
<a-form-item name="typeId">
<template #label><span title="服务类型">服务类型</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.typeId" :disabled="!showJSCom"
:orgCode="sourceOrgInfo?.orgCode"
:dictCode="`nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 'Y' and category_id = '${queryParam.categoryId || ''}' order by sort asc`"
placeholder="请选择服务类型" allowClear :ignoreDisabled="true" @select="reload()" />
</a-form-item>
</a-col>
<a-col :lg="5">
<a-form-item name="directiveName">
<template #label><span title="服务指令">服务指令</span></template>
<JInput v-model:value="queryParam.directiveName" placeholder="请输入服务指令名称" allowClear />
</a-form-item>
</a-col>
<!-- <a-col :lg="6">
<a-form-item name="bodyTags">
<template #label><span title="体型标签">体型标签</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.bodyTags"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = '0' and iz_enabled = 'Y' order by sort asc`" :ignoreDisabled="true"
placeholder="请选择体型标签" allowClear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="emotionTags">
<template #label><span title="情绪标签">情绪标签</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.emotionTags"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = '0' and iz_enabled = 'Y' order by sort asc`" :ignoreDisabled="true"
placeholder="请选择情绪标签" allowClear />
</a-form-item>
</a-col> -->
<!-- <a-col :lg="6">
<a-form-item name="izEnabled">
<template #label><span title="是否启用">是否启用</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.izEnabled" dictCode="iz_enabled"
:ignoreDisabled="true" placeholder="请选择是否启用" allowClear @select="reload()" />
</a-form-item>
</a-col> -->
<a-col :xl="4" :lg="4" :md="4" :sm="4">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<!-- <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button> -->
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<a-row :gutter="24">
<a-col :lg="12" :sm="24" style="padding: 0;">
<!-- 引用表格 -->
<a-tag color="blue">源平台 - {{ sourceOrgInfo.departName }}</a-tag>
<a-divider type="vertical" style="background-color: #CDCDCF;margin-left:5px;margin-right:10px;" />
<a-radio-group v-model:value="sourceType" size="small" @change="sourceTypeChanged">
<a-radio-button value="all">全部</a-radio-button>
<a-radio-button value="unsel">可同步</a-radio-button>
</a-radio-group>
<a-divider type="vertical" style="background-color: #CDCDCF;margin-left:10px;margin-right:10px;" />
<a-button type="primary" @click="selectAll" size="small">一键全选</a-button>
<BasicTable @register="registerTable" :dataSource="leftList" size="small" :rowClassName="rowClassName" style="padding-left:0;"
:columns="targetChooseType == 'one' ? sourceColumns : targetSourceColumns" :scroll="{ y: '57vh' }">
<template #tableTitle></template>
<template v-slot:bodyCell="{ column, record, index, text }">
<!-- <template v-if="column.dataIndex === 'bodyTagList'">
<span :title="text.map((item) => item.tagName).join('、')">{{text.map((item) =>
item.tagName).join('、')}}</span>
</template>
<template v-if="column.dataIndex === 'emotionTagList'">
<span :title="text.map((item) => item.tagName).join('、')">{{text.map((item) =>
item.tagName).join('、')}}</span>
</template> -->
<template v-if="column.dataIndex === 'izExist'">
<a-tag v-if="rightSourceList.some(item => item.id === record.id)" color="orange">已存在</a-tag>
<a-tag v-else>可新增</a-tag>
<!-- <span v-if="rightSourceList.some(item => item.id === record.id)" style="color: #EFBD48;">已存在</span>
<span v-else>可新增</span> -->
</template>
</template>
<template #action="{ record }">
<a-button type="link" v-if="!selectedRecordIds.includes(record.id)" @click="selectRecord(record)"
size="small">选择</a-button>
<!-- :disabled="rightSourceList.some(item => item.id === record.id)" -->
<a-button type="link" v-else @click="removeRecord(record)" size="small">移除</a-button>
</template>
</BasicTable>
</a-col>
<a-col :lg="12" :sm="24" style="padding:0px;">
<a-tag v-if="targetChooseType == 'one'" color="green">
目标平台 - {{ targetOrgs[0]?.departName }} - 已选择 {{ rightNeedAddList.length }}
</a-tag>
<a-tag v-else color="green" style="margin-left: 10px;margin-top: 10px;">
已选择 {{ rightNeedAddList.length }}
</a-tag>
<a-divider v-if="targetChooseType == 'one'" type="vertical" style="background-color: #CDCDCF;margin-left:5px;margin-right:10px;" />
<a-radio-group v-if="targetChooseType == 'one'" v-model:value="targetType" size="small"
@change="targetTypeChanged">
<a-radio-button value="exist">已有</a-radio-button>
<a-radio-button value="needsync">待同步</a-radio-button>
</a-radio-group>
<a-divider type="vertical" style="background-color: #CDCDCF;margin-left:10px;margin-right:10px;" />
<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> -->
<BasicTable bordered style="padding-left:0;"
:dataSource="targetChooseType == 'one' ? (targetType == 'needsync' ? rightNeedAddList : rightSourceList) : rightNeedAddList"
:columns="targetChooseType == 'one' ? (targetType == 'needsync' ? targetColumns : targetSourceColumns) : targetSourceColumns"
size="small" :scroll="{ y: '57vh' }"
:pagination="{ current: 1, pageSize: 15, total: targetType == 'needsync' ? rightNeedAddList.length :rightSourceList.length, showSizeChanger: true, pageSizeOptions: ['15', '50', '70', '100'] }">
<template v-slot:bodyCell="{ column, record, index, text }">
<template v-if="column.dataIndex === 'izExist'">
<a-tag v-if="rightSourceList.some(item => item.id === record.id)" color="orange">更新</a-tag>
<a-tag v-else color="green">新增</a-tag>
<!-- <span v-if="rightSourceList.some(item => item.id === record.id)" style="color: #EFBD48;">待更新</span>
<span v-else>待新增</span> -->
</template>
</template>
</BasicTable>
</a-col>
</a-row>
</div>
<a-modal v-model:visible="visible" width="30vw" title="数据同步确认" :ok-text="'确认'" :cancel-text="'取消'" @ok="handleOk"
@cancel="handleCancel">
<!-- 指定机构同步 -->
<div style="padding: 20px;" v-if="targetChooseType == 'one'">
<p>目标机构 {{ targetOrg?.departName }}</p>
<p>新增服务指令 {{ getNewCount() }} </p>
<p>更新服务指令 {{ getUpdateCount() }} </p>
<!-- <span>请选择"新增指令"需要同步的内容</span>
<a-radio-group v-model:value="syncOption">
<a-radio value="all">全部</a-radio>
<a-radio value="business">业务字段</a-radio>
<a-radio value="media">指令资源</a-radio>
</a-radio-group> -->
</div>
<!-- 批量同步 -->
<div style="padding: 20px;" v-else>
<p>同步服务指令 {{ rightNeedAddList.length }} </p>
<!-- <span>请选择"服务指令"需要同步的内容</span>
<a-radio-group v-model:value="syncOption">
<a-radio value="all">全部</a-radio>
<a-radio value="business">业务字段</a-radio>
<a-radio value="media">指令资源</a-radio>
</a-radio-group> -->
</div>
</a-modal>
</template>
<script lang="ts" name="serviceDirective-configServiceDirective" setup>
import { ref, reactive, onMounted, watch } from 'vue';
import { BasicTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, sourceColumns, superQuerySchema, targetSourceColumns, targetColumns } from './ConfigServiceDirective.data';
import { listByDS } from './ConfigServiceDirective.api';
import { useUserStore } from '/@/store/modules/user';
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { cloneDeep } from "lodash-es";
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { useMessage } from '/@/hooks/web/useMessage';
import { syncDirective } from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api';
const { createConfirm } = useMessage();
const props = defineProps({
targetOrgs: [],//
targetChooseType: '',
})
const leftList = ref<any[]>([]); //
const rightSourceList = ref<any[]>([]); //
const rightNeedAddList = ref<any[]>([]); //
const sourceOrgInfo = ref({})//
const sourceType = ref('all')//
const targetType = ref('needsync')//
const showJSCom = ref(false)
const selectedRecordIds = ref<string[]>([]); // ID
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
const targetOrg = ref()//
const { createMessage } = useMessage();
const visible = ref(false);
const syncOption = ref('all');
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '服务指令',
api: listByDS,
canResize: false,
useSearchForm: false,
showIndexColumn: true,
showTableSetting: false,
immediate: false,
pagination: {
current: 1,
pageSize: 15,
pageSizeOptions: ['15', '50', '70', '100'],
},
beforeFetch: async (params) => {
queryParam.izEnabled = 'Y'
return Object.assign(params, queryParam);
},
actionColumn: {
width: 60,
fixed: 'right',
},
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: 24,
sm: 6,
xl: 6,
xxl: 6
});
const wrapperCol = reactive({
xs: 24,
sm: 18,
});
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
function init(record) {
sourceOrgInfo.value = record.orgInfo
//
{
rightNeedAddList.value = []
leftList.value = []
selectedRecordIds.value = []
formRef.value.resetFields();
selectedRowKeys.value = [];
sourceType.value = 'all'
targetType.value = 'needsync'
}
queryParam.dataSourceCode = record.orgInfo.orgCode;
reload();
}
function resetTargetData() {
//
{
rightNeedAddList.value = []
selectedRecordIds.value = []
formRef.value.resetFields();
selectedRowKeys.value = [];
sourceType.value = 'all'
targetType.value = 'needsync'
}
}
function initTargetList(record) {
targetOrg.value = {}
// - +
if (!!record.orgCode) {
targetOrg.value = record
resetTargetData()
listByDS({
dataSourceCode: record.orgCode,
pageNo: 1,
pageSize: -1,
}).then(res => {
rightNeedAddList.value = []
selectedRecordIds.value = []
rightSourceList.value = res.records
// selectedRecordIds.value = rightSourceList.value?.map(d => d.id)
})
}
}
//
function selectRecord(record: any) {
if (!selectedRecordIds.value.includes(record.id)) {
selectedRecordIds.value.push(record.id); // ID
rightNeedAddList.value.push(record); //
leftList.value = leftList.value.filter(item => item.id !== record.id); //
rightNeedAddList.value = [...rightNeedAddList.value]; //
leftList.value = [...leftList.value]; //
}
}
//
function removeRecord(record: any) {
// rightSourceList
// if (rightSourceList.value.some(item => item.id === record.id)) {
// return;
// }
if (selectedRecordIds.value.includes(record.id)) {
selectedRecordIds.value = selectedRecordIds.value.filter(id => id !== record.id); // ID
leftList.value.push(record); //
rightNeedAddList.value = rightNeedAddList.value.filter(item => item.id !== record.id); //
rightNeedAddList.value = [...rightNeedAddList.value]; //
leftList.value = [...leftList.value]; //
}
}
//
function rowClassName(record: any) {
return selectedRecordIds.value.includes(record.id) ? 'selected-row' : '';
}
/**
* 一键全选将所有左侧数据移至右侧
*/
function selectAll() {
listByDS({
...queryParam,
pageNo: 1,
pageSize: -1,
}).then(res => {
const allRecords = res.records || [];
// rightSourceList
const unselectedRecords = allRecords.filter(record =>
!selectedRecordIds.value.includes(record.id)
// && !rightSourceList.value.some(item => item.id === record.id)
);
if (unselectedRecords.length) {
//
rightNeedAddList.value.push(...unselectedRecords);
// id id
selectedRecordIds.value.push(...unselectedRecords.map(r => r.id));
//
rightNeedAddList.value = [...rightNeedAddList.value];
selectedRecordIds.value = [...selectedRecordIds.value];
}
})
}
/**
* 全部移除将右侧数据移回左侧
*/
function removeAll() {
rightNeedAddList.value = []; //
// selectedRecordIds.value = rightSourceList.value?.map(d => d.id)
selectedRecordIds.value = []
}
//all/unsel
function sourceTypeChanged(val_) {
if (val_.target.value == 'all') {
//
queryParam.excludeIds = null
} else {
//
queryParam.excludeIds = selectedRecordIds.value.join(',')
}
reload()
}
//exist/needsync
function targetTypeChanged(val_) {
}
watch(
() => queryParam.directiveName,
(newVal) => {
reload()
}
);
function controlShowJSCom() {
showJSCom.value = false
setTimeout(() => {
showJSCom.value = true
}, 1000)
}
function cleanTargetSourceData() {
if (rightSourceList.value?.length) {
rightSourceList.value = []
selectedRecordIds.value = []
}
}
//
function syncFunc() {
if (props.targetChooseType == 'one') {
if (!targetOrg.value || !targetOrg.value.orgCode) {
createMessage.warning('请选择目标平台')
return
}
} else {
if (!props.targetOrgs.length) {
createMessage.warning('请选择目标平台')
return
}
}
if (!rightNeedAddList.value?.length) {
createMessage.warning('请选择需要同步的指令')
return
} else {
visible.value = true
}
}
//
function handleOk() {
let params = {}
if (props.targetChooseType == 'one') {
params = {
syncIds: rightNeedAddList.value
.filter(item => !rightSourceList.value.some(sourceItem => sourceItem.id === item.id))
.map(item => item.id)
.join(','),
upIds: rightNeedAddList.value
.filter(item => rightSourceList.value.some(sourceItem => sourceItem.id === item.id))
.map(item => item.id)
.join(','),
syncOrgCodes: targetOrg.value.orgCode,
syncOption: syncOption.value,
}
} else {
params = {
syncIds: rightNeedAddList.value.map(item => item.id).join(','),
upIds: '',
syncOrgCodes: props.targetOrgs.map(item => item.orgCode).join(','),
syncOption: syncOption.value,
}
}
syncDirective(sourceOrgInfo.value.orgCode, params)
createMessage.success('已开始自动同步!')
visible.value = false
}
//
function handleCancel() {
visible.value = false
}
//
function getNewCount() {
if (!rightNeedAddList.value || !rightSourceList.value) return 0;
return rightNeedAddList.value.filter(item =>
!rightSourceList.value.some(sourceItem => sourceItem.id === item.id)
).length;
}
//
function getUpdateCount() {
if (!rightNeedAddList.value || !rightSourceList.value) return 0;
return rightNeedAddList.value.filter(item =>
rightSourceList.value.some(sourceItem => sourceItem.id === item.id)
).length;
}
defineExpose({
init,
rightNeedAddList,
controlShowJSCom,
initTargetList,
cleanTargetSourceData,
syncFunc,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
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%;
}
}
audio::-webkit-media-controls-timeline {
display: none;
}
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
display: none;
}
.btnPrivate {
height: 34px;
margin-left: 4px;
}
/* 添加深度选择器确保样式能穿透组件 */
:deep(.ant-table-tbody) {
tr.selected-row {
td {
background-color: #e6f7ff !important;
}
&:hover td {
background-color: #e6f7ff !important;
}
}
}
:deep .ant-table-title {
display: none;
}
:deep .jeecg-basic-table-form-container .ant-form {
padding: 0px;
padding-right: 20px;
}
</style>

View File

@ -1,373 +0,0 @@
<template>
<div class="p-2" style="overflow-x: hidden;">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="instructionTagId">
<template #label><span title="分类标签">分类标签</span></template>
<j-dict-select-tag v-model:value="queryParam.instructionTagId" v-if="showJSCom"
:orgCode="sourceOrgInfo?.orgCode"
:dictCode="`nu_config_service_instruction_tag,instruction_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`"
placeholder="请选择分类标签" allowClear :ignoreDisabled="true" @select="reload()" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="categoryId">
<template #label><span title="服务类别">服务类别</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.categoryId" v-if="showJSCom"
:orgCode="sourceOrgInfo?.orgCode"
:dictCode="`nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 and instruction_id = '${queryParam.instructionTagId || ''}' order by sort asc`"
placeholder="请选择服务类别" allowClear :ignoreDisabled="true" @select="reload()" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="typeId">
<template #label><span title="服务类型">服务类型</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.typeId" v-if="showJSCom"
:orgCode="sourceOrgInfo?.orgCode"
:dictCode="`nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${queryParam.categoryId || ''}' order by sort asc`"
placeholder="请选择服务类型" allowClear :ignoreDisabled="true" @select="reload()" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="directiveName">
<template #label><span title="服务指令">服务指令</span></template>
<JInput v-model:value="queryParam.directiveName" placeholder="请输入服务指令名称" allowClear />
</a-form-item>
</a-col>
<!-- <a-col :lg="6">
<a-form-item name="bodyTags">
<template #label><span title="体型标签">体型标签</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.bodyTags"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`" :ignoreDisabled="true"
placeholder="请选择体型标签" allowClear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="emotionTags">
<template #label><span title="情绪标签">情绪标签</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.emotionTags"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`" :ignoreDisabled="true"
placeholder="请选择情绪标签" allowClear />
</a-form-item>
</a-col> -->
<!-- <a-col :lg="6">
<a-form-item name="izEnabled">
<template #label><span title="是否启用">是否启用</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.izEnabled" dictCode="iz_enabled"
:ignoreDisabled="true" placeholder="请选择是否启用" allowClear @select="reload()" />
</a-form-item>
</a-col> -->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<!-- <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button> -->
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<a-row :gutter="24" style="margin-top: -10px;padding-left: 20px;padding-right: 20px;">
<a-col :lg="3" :push="21">
<a-button type="primary" @click="selectAll">一键全选</a-button>
<a-button type="default" @click="removeAll" style="margin-left: 8px">全部移除</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="padding-left: 20px;padding-right: 20px;">
<a-col :lg="12" :sm="24">
<!-- 引用表格 -->
<a-tag color="blue" style="margin-left: 10px;margin-top: 10px;">源数据 - {{ sourceOrgInfo.departName }}</a-tag>
<a-radio-group v-model:value="sourceType" size="small" @change="sourceTypeChanged">
<a-radio-button value="all">全部</a-radio-button>
<a-radio-button value="unsel">未选择</a-radio-button>
</a-radio-group>
<BasicTable @register="registerTable" :dataSource="leftList" size="small" :rowClassName="rowClassName"
:scroll="{ y: '46vh' }">
<template #tableTitle></template>
<template v-slot:bodyCell="{ column, record, index, text }">
<template v-if="column.dataIndex === 'bodyTagList'">
<span :title="text.map((item) => item.tagName).join('、')">{{text.map((item) =>
item.tagName).join('、')}}</span>
</template>
<template v-if="column.dataIndex === 'emotionTagList'">
<span :title="text.map((item) => item.tagName).join('、')">{{text.map((item) =>
item.tagName).join('、')}}</span>
</template>
</template>
<template #action="{ record }">
<a-button type="link" v-if="!selectedRecordIds.includes(record.id)" @click="selectRecord(record)"
size="small">选择</a-button>
<a-button type="link" v-else @click="removeRecord(record)" size="small">移除</a-button>
</template>
</BasicTable>
</a-col>
<a-col :lg="12" :sm="24">
<a-tag color="green" style="margin-left: 10px;margin-top: 10px;">已选择 {{ rightList.length }} </a-tag>
<BasicTable :dataSource="rightList" :columns="sourceColumns" size="small" :scroll="{ y: '46vh' }"
:pagination="{ current: 1, pageSize: 50, total: rightList.length, showSizeChanger: true, pageSizeOptions: ['15', '50', '70', '100'] }">
</BasicTable>
</a-col>
</a-row>
</div>
</template>
<script lang="ts" name="serviceDirective-configServiceDirective" setup>
import { ref, reactive, onMounted, watch } from 'vue';
import { BasicTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, sourceColumns, superQuerySchema } from './ConfigServiceDirective.data';
import { listByDS } from './ConfigServiceDirective.api';
import { useUserStore } from '/@/store/modules/user';
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { cloneDeep } from "lodash-es";
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
const leftList = ref<any[]>([]); //
const rightList = ref<any[]>([]); //
const sourceOrgInfo = ref({})//
const sourceType = ref('all')
const showJSCom = ref(false)
const selectedRecordIds = ref<string[]>([]); // ID
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '服务指令',
api: listByDS,
columns: sourceColumns,
canResize: false,
useSearchForm: false,
showIndexColumn: true,
showTableSetting: false,
immediate: false,
pagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['15', '50', '70', '100'],
},
beforeFetch: async (params) => {
queryParam.izEnabled = '0'
return Object.assign(params, queryParam);
},
actionColumn: {
width: 80,
fixed: 'right',
},
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: 24,
sm: 6,
xl: 6,
xxl: 6
});
const wrapperCol = reactive({
xs: 24,
sm: 18,
});
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
function init(record) {
sourceOrgInfo.value = record.orgInfo
//
{
rightList.value = []
leftList.value = []
selectedRecordIds.value = []
formRef.value.resetFields();
selectedRowKeys.value = [];
sourceType.value = 'all'
}
queryParam.dataSourceCode = record.orgInfo.orgCode;
reload();
}
//
function selectRecord(record: any) {
if (!selectedRecordIds.value.includes(record.id)) {
selectedRecordIds.value.push(record.id); // ID
rightList.value.push(record); //
leftList.value = leftList.value.filter(item => item.id !== record.id); //
rightList.value = [...rightList.value]; //
leftList.value = [...leftList.value]; //
}
}
//
function removeRecord(record: any) {
if (selectedRecordIds.value.includes(record.id)) {
selectedRecordIds.value = selectedRecordIds.value.filter(id => id !== record.id); // ID
leftList.value.push(record); //
rightList.value = rightList.value.filter(item => item.id !== record.id); //
rightList.value = [...rightList.value]; //
leftList.value = [...leftList.value]; //
}
}
//
function rowClassName(record: any) {
return selectedRecordIds.value.includes(record.id) ? 'selected-row' : '';
}
/**
* 一键全选将所有左侧数据移至右侧
*/
function selectAll() {
listByDS({
...queryParam,
pageNo: 1,
pageSize: -1,
}).then(res => {
const allRecords = res.records || [];
//
const unselectedRecords = allRecords.filter(record => !selectedRecordIds.value.includes(record.id));
if (unselectedRecords.length) {
//
rightList.value.push(...unselectedRecords);
// id id
selectedRecordIds.value.push(...unselectedRecords.map(r => r.id));
//
rightList.value = [...rightList.value];
selectedRecordIds.value = [...selectedRecordIds.value];
}
})
}
/**
* 全部移除将右侧数据移回左侧
*/
function removeAll() {
rightList.value = []; //
selectedRecordIds.value = []
}
function sourceTypeChanged(val_) {
if (val_.target.value == 'all') {
//
queryParam.excludeIds = null
} else {
//
queryParam.excludeIds = selectedRecordIds.value.join(',')
}
reload()
}
watch(
() => queryParam.directiveName,
(newVal) => {
reload()
}
);
function controlShowJSCom() {
showJSCom.value = false
setTimeout(() => {
showJSCom.value = true
}, 1000)
}
defineExpose({
init,
rightList,
controlShowJSCom,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
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%;
}
}
audio::-webkit-media-controls-timeline {
display: none;
}
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
display: none;
}
.btnPrivate {
height: 34px;
margin-left: 4px;
}
/* 添加深度选择器确保样式能穿透组件 */
:deep(.ant-table-tbody) {
tr.selected-row {
td {
background-color: #e6f7ff !important;
}
&:hover td {
background-color: #e6f7ff !important;
}
}
}
:deep .ant-table-title {
display: none;
}
:deep .jeecg-basic-table-form-container .ant-form {
padding: 0px;
padding-right: 20px;
}
</style>

View File

@ -1,29 +0,0 @@
import { defHttp } from '/@/utils/http/axios';
enum Api {
categoryList = '/services/serviceCategory/configServiceCategory/list',
typeList = '/services/ServiceType/configServiceType/list',
bodyTagsList = '/services/directiveTag/bodyTag/list',
emotionTagsList = '/services/directiveTag/emotionTag/list',
}
/**
*
*/
export const categoryList = () => defHttp.get({ url: Api.categoryList });
/**
*
*/
export const typeList = () => defHttp.get({ url: Api.typeList });
/**
*
*/
export const bodyTagsList = () => defHttp.get({ url: Api.bodyTagsList });
/**
*
*/
export const emotionTagsList = () => defHttp.get({ url: Api.emotionTagsList });

View File

@ -1,429 +0,0 @@
<template>
<div class="p-2">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="title">
<template #label><span title="机构名称">机构名称</span></template>
<a-input placeholder="请输入机构名称" v-model:value="queryParam.title" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
</a-col>
<a-col :lg="12" style="text-align: right;">
<a-button type="primary" preIcon="ant-design:cloud-sync-outlined" @click="handleJingxiang"
style="margin-right: 10px;">镜像</a-button>
<a-button type="primary" preIcon="ant-design:file-text-twotone" @click="handleViewLogs"
style="margin-right: 10px;">日志</a-button>
<a-button type="primary" preIcon="ant-design:safety-certificate-twotone" @click="handleDirectiveMainFunc"
style="margin-right: 10px;">标准指令库</a-button>
<a-button type="primary" preIcon="ant-design:copy-outlined" @click="handleDirectiveBackups"
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="handleLookNewDirectives">新增指令</a-button> -->
<!-- </a-badge> -->
</a-col>
</a-row>
</a-form>
</div>
<OrgListCom ref="orgListComRef" :title="queryParam.title" @handleOrgDetail="handleDetail" :showDetail=true
:showDMTip="true">
</OrgListCom>
<ConfigServiceDirectiveListModal ref="configServiceDirectiveListModal" />
<SyncStepListModal ref="syncStepListModal" />
<!-- <a-modal v-model:visible="logsVisible" title="日志" width="90vw"
:bodyStyle="{ height: '70vh', display: 'flex', flexDirection: 'column', overflow: 'auto' }"
wrapClassName="org-list-modal" @cancel="handleCancelLogs">
<a-row>
<a-col :span="2" :push="22" style="margin-top: 15px;margin-left: 60px;">
<a-button type="primary" @click="handleRefreshLogs" title="刷新">
刷新
</a-button>
</a-col>
</a-row>
<template #footer>
<a-button @click="handleCancelLogs" type="primary">关闭</a-button>
</template>
<AsyncListComponent ref="logsRef"></AsyncListComponent>
</a-modal> -->
<a-drawer title="日志" width="85vw" v-model:visible="logsVisible"
:bodyStyle="{ height: '70vh', display: 'flex', padding: '14px', flexDirection: 'column', overflow: 'auto' }"
wrapClassName="org-list-modal" @cancel="handleCancelLogs">
<a-row style="overflow-x: hidden !important; background-color: white;">
<a-col :span="2" :push="22" style="margin-top: 18px;margin-left: 30px;">
<a-button type="primary" @click="handleRefreshLogs" title="刷新">
刷新
</a-button>
</a-col>
<a-col :span="24">
<AsyncListComponent ref="logsRef" :type="'directive'" @handleDetail="handleDetail"></AsyncListComponent>
</a-col>
</a-row>
<template #footer>
<a-button @click="handleCancelLogs" type="primary" style="float:right;">关闭</a-button>
</template>
</a-drawer>
<!-- 标准指令库 -->
<a-drawer v-model:visible="directiveMainVisible" title="标准指令库" width="85vw" :footer-style="{ textAlign: 'right' }"
:bodyStyle="{ height: '70vh', display: 'flex', padding: '14px', flexDirection: 'column', overflow: 'auto' }"
wrapClassName="org-list-modal" @cancel="handleCanceldirectiveMain">
<template #footer>
<a-button @click="handleCanceldirectiveMain" type="primary" style="margin-right: 10px;">关闭</a-button>
<a-button @click="handleAsyncdirectiveMain" type="primary">确认</a-button>
</template>
<OrgListCom ref="directiveMainComRef" :showDirectiveMain=true :showDirectiveChoose="true"
@handleOrgDetail="handleDetail" :showDetail=true @handleOrgChoose="directiveMainFunc">
</OrgListCom>
</a-drawer>
<!-- 新增指令 -->
<a-drawer v-model:visible="newDirectiveVisible" title="新增指令" width="85vw" :footer-style="{ textAlign: 'right' }"
:bodyStyle="{ height: '80vh', display: 'flex', padding: '14px', flexDirection: 'column', overflow: 'auto' }"
wrapClassName="org-list-modal" @cancel="handleCancelNewDirective">
<template #footer>
<a-button @click="handleCancelNewDirective" type="primary">关闭</a-button>
<!-- <a-button @click="handleAsyncNewDirective" type="primary">同步</a-button> -->
</template>
<div style="padding:0px 8px;">
<CanAddDirectiveList ref="canAddDirectiveRef" :directiveMainOrgInfo="directiveMainOrgInfo"
:existDirectiveIds="existDirectiveIds" @refreshExistIds="refreshDMExistedIds"></CanAddDirectiveList>
</div>
</a-drawer>
<!-- 指令备份 -->
<a-drawer v-model:visible="directiveBackupsOpen" title="指令备份" width="85vw" :footer-style="{ textAlign: 'right' }"
:bodyStyle="{ padding: '14px', height: '80vh', display: 'flex', flexDirection: 'column', overflow: 'auto' }"
wrapClassName="org-list-modal" @cancel="handleDirectiveBackupsClose">
<template #footer>
<a-button @click="handleDirectiveBackupsClose" type="primary">关闭</a-button>
</template>
<div>
<DirectiveBkMainList v-if="directiveBackupsOpen" ref="backupsRef"></DirectiveBkMainList>
</div>
</a-drawer>
</div>
</template>
<script setup name="synchronization-directive2" lang="ts">
import { ref, reactive, computed, onMounted, watch } from 'vue'
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
//
import { list, asyncFunc, departList } from '@/views/services/serviceDirective/ConfigServiceDirective.api';
import { Pagination } from 'ant-design-vue';
import ConfigServiceDirectiveListModal from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirectiveListModal.vue';
import SyncStepListModal from '/@/views/synchronization/directive/syncStep/SyncStepListModal.vue';
//
import { getOrgInfo } from '/@/views/admin/orgapplyinfo/OrgApplyInfo.api';
//
import OrgListCom from '/@/views/synchronization/directive/orgCom/OrgListCom.vue'
//
import CanAddDirectiveList from '/@/views/synchronization/directive/canadddirective/CanAddDirectiveList.vue'
import { useMessage } from '/@/hooks/web/useMessage';
import AsyncListComponent from '@/components/dataAsync/AsyncMainList0731.vue'
import { getDirectiveMain, changeDirectiveMain } from '/@/api/common/api'
import { idListByDS } from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api';
import { nextTick } from 'process';
import DirectiveBkMainList from '/@/views/services/directivebk/DirectiveBkMainList.vue'
const { createMessage } = useMessage()
const canAddDirectiveRef = ref()
const newDirectiveVisible = ref(false)
const directiveMainComRef = ref();
const newDirectiveRef = ref()
const logsRef = ref()
const formRef = ref();
const configServiceDirectiveListModal = ref();
const syncStepListModal = ref();
const orgTableList = ref<any>([]);
const queryParam = reactive<any>({});
const pageParams = ref({ pageNo: 1, pageSize: 8 })
const orgListComRef = ref()
const logsVisible = ref(false)
const directiveMainVisible = ref(false)
const { createConfirm } = useMessage();
const existDirectiveIds = ref([])//id
const directiveMainOrgInfo = ref()
const directiveBackupsOpen = ref(false)
const backupsRef = ref()//
const labelCol = reactive({
xs: 24,
sm: 4,
xl: 6,
xxl: 4
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
/**
* 镜像
*/
function handleJingxiang() {
syncStepListModal.value.init(null);
syncStepListModal.value.disableSubmit = true;
}
/**
* 详情
* @param record
*/
function handleDetail(record) {
configServiceDirectiveListModal.value.disableSubmit = true;
configServiceDirectiveListModal.value.init(record);
}
/**
* 查询
*/
function searchQuery() {
orgListComRef.value?.reload();
}
function reload() {
//
queryParam.pageSize = pageParams.value.pageSize;
queryParam.pageNo = pageParams.value.pageNo;
getOrgInfo(queryParam).then(res => {
orgTableList.value = res;
});
}
/**
* 重置
*/
function searchReset() {
queryParam.title = null
orgListComRef.value?.searchReset()
}
/**
* 日志
*/
function handleViewLogs() {
logsVisible.value = true
handleRefreshLogs()
}
function handleLookNewDirectives() {
newDirectiveVisible.value = true
refreshDMExistedIds(directiveMainOrgInfo.value, true)
}
//
function handleCancelLogs() {
logsVisible.value = false
}
//
function handleRefreshLogs() {
logsRef.value?.searchQuery()
}
/**
* 关闭新增指令
*/
function handleCancelNewDirective() {
newDirectiveVisible.value = false
}
/**
* 同步新增指令
*/
function handleAsyncNewDirective() {
// newDirectiveRef
}
/**
* 打开指令库
*/
function handleDirectiveMainFunc() {
directiveMainVisible.value = true
directiveMainComRef.value?.reload();
}
/**
* 关闭指令库
*/
function handleCanceldirectiveMain() {
directiveMainVisible.value = false
}
//
function refreshDMExistedIds(dmOrgInfo, izReset = false, izQuery = true) {
idListByDS({ dataSourceCode: dmOrgInfo.orgCode }).then(res => {
existDirectiveIds.value = res.records
if (izReset) {
canAddDirectiveRef.value?.searchReset()
} else {
canAddDirectiveRef.value?.reload()
}
})
}
/**
* 查看指令备份
*/
function handleDirectiveBackups() {
directiveBackupsOpen.value = true
}
/**
* 关闭指令备份
*/
function handleDirectiveBackupsClose() {
directiveBackupsOpen.value = false
}
watch(directiveMainOrgInfo, (newValue, oldValue) => {
if (newValue) {
refreshDMExistedIds(newValue)
}
}, { deep: true })
const tempDM = ref()
/**
* 指令库对应机构信息
*/
function directiveMainFunc(orgInfo_) {
tempDM.value = orgInfo_
}
/**
* 确认指令库
*/
function handleAsyncdirectiveMain() {
// createConfirm({
// iconType: 'warning',
// title: '',
// content: '' + tempDM.value.departName,
// okText: '',
// cancelText: '',
// onOk: () => {
directiveMainOrgInfo.value = tempDM.value
changeDirectiveMain(directiveMainOrgInfo.value.orgCode).then(() => {
createMessage.success('标准指令库已变更')
handleCanceldirectiveMain()
canAddDirectiveRef.value?.reload()
orgListComRef.value?.reload()
}).catch(() => {
createMessage.error('指令库变更失败,请稍后再试')
})
// }
// });
}
//
function getDirectiveMainOrgInfo() {
getDirectiveMain().then(res => {
directiveMainOrgInfo.value = res
})
}
//
onMounted(() => {
reload();
getDirectiveMainOrgInfo()
orgListComRef.value?.reload();
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
margin-bottom: 14px;
.table-page-search-submitButtons {
display: block;
margin-bottom: 0px;
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: 14px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
.cardTitle {
background: #1ea0fa;
width: 100%;
margin: -28px -24px;
padding-top: 15px;
border-radius: 5px 5px 0px 0px;
color: white;
height: 55px;
display: block;
position: absolute;
}
.zxClass {
font-size: 12px;
background: linear-gradient(to right, #1ea0fa, #017de9);
border-radius: 8px;
height: 25px;
color: white;
line-height: 25px;
}
.lxClass {
font-size: 14px;
background: linear-gradient(to right, #cccccc, #cccccc);
border-radius: 8px;
height: 35px;
color: white;
line-height: 35px;
}
.tbClass {
background: #f6f6f6;
padding: 8px;
border-radius: 5px;
}
.antTitle {
margin-top: 10px;
display: block;
font-size: 12px;
}
.ellipsis-one-lines {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
/* 限制文本为2行 */
overflow: hidden;
text-overflow: ellipsis;
}
.content-refresh-btn {
position: absolute;
top: 60px;
right: 20px;
z-index: 1;
}
</style>

View File

@ -1,450 +0,0 @@
<template>
<div class="container2 jeecg-basic-table-form-container">
<div class="left">
<a-card class="top">
<div class="source-platform">
<span class="section-title">源平台</span>
<!-- <a-button type="link" @click="showSourceOrgListModal" size="small">请选择</a-button> -->
</div>
<div class="selected-orgs" v-if="!!orgInfo.length">
<a-card :headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }">
<a-row style="font-weight: normal; margin-bottom: 12px;">
<a-col :span="18" style="font-size: 14px;">
<div>
<span style="font-weight: bold;">{{ orgInfo[0]?.departName }}</span>
</div>
</a-col>
<a-col :span="6" style="text-align: right;">
<div style="display: flex; align-items: center; justify-content: flex-end; gap: 8px;">
<div class="zxClass" style="min-width: 25px;">{{ orgInfo[0]?.orgCode }}</div>
</div>
</a-col>
</a-row>
<a-divider />
<p>加盟时间{{ orgInfo[0]?.franchiseTime?.substring(0, 10) }}</p>
<p>机构负责人{{ orgInfo[0]?.orgLeader }}</p>
<p>负责人电话{{ orgInfo[0]?.orgLeaderPhone }}</p>
<p class="ellipsis-one-lines" :title="orgInfo[0]?.comRegisterAddress">机构地址{{ orgInfo[0]?.comRegisterAddress
}}</p>
</a-card>
</div>
<a-empty v-else :description="'暂未选择'" />
</a-card>
<a-card class="bottom">
<div class="source-platform">
<span class="section-title">目标平台</span>
<div>
<a-radio-group v-model:value="targetChooseType" size="small" @change="targetChooseTypeChanged">
<a-radio-button value="one">指定</a-radio-button>
<a-radio-button value="multi">批量</a-radio-button>
</a-radio-group>
<!-- <a-divider type="vertical" style="background-color: #CDCDCF" /> -->
<a-button type="link" @click="showTargetOrgListModal" size="small" :disabled="initLoading">请选择</a-button>
</div>
</div>
<div class="selected-orgs" ref="selectedOrgsContainer" style="height: 46vh; overflow: auto;"
v-if="!!syncOrgs.length">
<a-card v-for="orgItem of syncOrgs" class="org-card"
:class="{ 'selected-card': selectedTargetOrgs.some(org => org.orgCode === orgItem.orgCode), 'org-card': true }"
:headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }"
@click="handleTargetOrgChange(orgItem)">
<a-row style="font-weight: normal; margin-bottom: 12px;">
<a-col :span="18" style="font-size: 14px;">
<div>
<span style="font-weight: bold;">{{ orgItem.departName }}</span>
</div>
</a-col>
<a-col :span="6" style="text-align: right;">
<div style="display: flex; align-items: center; justify-content: flex-end; gap: 8px;">
<div class="zxClass" style="min-width: 25px;">{{ orgItem.orgCode }}</div>
</div>
</a-col>
</a-row>
<a-divider />
<p>加盟时间{{ orgItem?.franchiseTime?.substring(0, 10) }}</p>
<p>机构负责人{{ orgItem?.orgLeader }}</p>
<p>负责人电话{{ orgItem?.orgLeaderPhone }}</p>
<p class="ellipsis-one-lines" :title="orgItem?.comRegisterAddress">机构地址{{ orgItem?.comRegisterAddress
}}</p>
</a-card>
</div>
<a-empty style="margin-top: 50px;" v-else :description="'暂未选择'" />
</a-card>
</div>
<a-card class="right">
<div class="zljx-platform">
<span class="section-title">指令镜像</span>
<div class="directive-choose-wrapper">
<DirectiveChooseCom v-show="!!orgInfo.length" ref="directiveChooseRef" :targetChooseType="targetChooseType"
:targetOrgs="selectedTargetOrgs">
</DirectiveChooseCom>
</div>
</div>
</a-card>
<a-modal v-model:visible="sourceOrgListVisible" title="请选择源平台" width="90vw"
:bodyStyle="{ padding: '14px', height: '70vh', display: 'flex', flexDirection: 'column', overflow: 'auto' }"
wrapClassName="org-list-modal" @cancel="handleCancelSource">
<template #footer>
<a-button @click="handleCancelSource" type="primary">取消</a-button>
<a-button @click="handleGetSource" type="primary">确认</a-button>
</template>
<OrgListCom class="step-content" ref="sourceOrgListComRef" @handleOrgChoose="handleSourceOrgChoose"
:showChoose="true" />
</a-modal>
<a-modal v-model:visible="targetOrgListVisible" title="请选择目标平台(复选)" width="90vw" @cancel="handleCancelTarget"
:bodyStyle="{ padding: '14px', height: '70vh', display: 'flex', flexDirection: 'column', overflow: 'auto' }">
<template #footer>
<a-button @click="handleCancelTarget" type="primary">取消</a-button>
<a-button @click="handleGetTarget" type="primary">确认</a-button>
</template>
<OrgListCom class="step-content" ref="targetOrgListComRef" @handleOrgChoose="handleTargetOrgChoose"
:showChoose="true" :allowMultipleSelection="true" :pageSize="-1" :excludeOrgCode="orgInfo[0]?.orgCode" />
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { ref, nextTick, watch, onMounted } from 'vue';
import OrgListCom from '/@/views/synchronization/directive/orgCom/OrgListCom.vue';
import DirectiveChooseCom from '/@/views/synchronization/directive/serviceDirective/DirectiveChooseCom.vue'
import { getDirectiveMain } from '/@/api/common/api'
import { getOrgInfo } from '/@/views/admin/orgapplyinfo/OrgApplyInfo.api'
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage, createConfirm } = useMessage();
const sourceOrgListVisible = ref(false);
const targetOrgListVisible = ref(false);
const sourceOrgListComRef = ref();
const targetOrgListComRef = ref();
const orgInfo = ref([])
const syncOrgs = ref([])
const directiveChooseRef = ref()
const selectedTargetOrgs = ref([])//
const targetChooseType = ref('one')
const selectedOrgsContainer = ref<HTMLElement>();
const emit = defineEmits(['changeSyncText']);
const initLoading = ref(false)
//
function showSourceOrgListModal() {
sourceOrgListComRef.value?.reload()
targetOrgListComRef.value?.reload()
sourceOrgListVisible.value = true;
}
//
function showTargetOrgListModal() {
sourceOrgListComRef.value?.reload()
targetOrgListComRef.value?.reload()
targetOrgListVisible.value = true;
}
//
function resetTargetOrgs(orgInfo_) {
//
const syncOrgsIndex = syncOrgs.value.findIndex(
org => org.orgCode === orgInfo_.orgCode
);
if (syncOrgsIndex >= 0) {
//
syncOrgs.value.splice(syncOrgsIndex, 1);
}
syncOrgs.value = [...syncOrgs.value];
//
const selectedTargetOrgsIndex = selectedTargetOrgs.value.findIndex(
org => org.orgCode === orgInfo_.orgCode
);
if (selectedTargetOrgsIndex >= 0) {
//
selectedTargetOrgs.value.splice(selectedTargetOrgsIndex, 1);
}
selectedTargetOrgs.value = [...selectedTargetOrgs.value];
//""""
if (targetChooseType.value == 'one' && !!syncOrgs.value?.length && selectedTargetOrgsIndex >= 0) {
selectedTargetOrgs.value = [{ ...syncOrgs.value?.[0] }]
//
nextTick(() => {
if (selectedOrgsContainer.value) {
selectedOrgsContainer.value.scrollTop = 0;
}
});
}
}
//
function handleSourceOrgChoose(orgInfo_) {
//
resetTargetOrgs(orgInfo_[0])
orgInfo.value = orgInfo_
//
targetOrgListComRef.value?.resetSeleted(syncOrgs.value)
directiveChooseRef.value?.controlShowJSCom()
//
if (selectedTargetOrgs.value.length) {
if (targetChooseType.value == 'one') {
directiveChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
directiveChooseRef.value?.initTargetList(selectedTargetOrgs.value[0])
}
} else {
directiveChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
}
}
//
function handleTargetOrgChoose(orgInfo_) {
if (!syncOrgs.value || syncOrgs.value.length == 0) {
if (targetChooseType.value == 'one' && orgInfo_.length > 0) {
selectedTargetOrgs.value = [{ ...orgInfo_[0] }]
directiveChooseRef.value?.initTargetList(orgInfo_[0])
}
}
syncOrgs.value = orgInfo_
}
function handleCancelSource() {
sourceOrgListVisible.value = false;
sourceOrgListComRef.value?.resetSeleted(orgInfo.value)
}
function handleCancelTarget() {
targetOrgListVisible.value = false;
targetOrgListComRef.value?.resetSeleted(syncOrgs.value)
}
///
function handleTargetOrgChange(org_) {
if (targetChooseType.value == 'one') {
selectedTargetOrgs.value = [{ ...org_ }]
directiveChooseRef.value?.initTargetList(org_)
} else {
//
const index = selectedTargetOrgs.value.findIndex(
org => org.orgCode === org_.orgCode
);
if (index >= 0) {
//
selectedTargetOrgs.value.splice(index, 1);
} else {
//
selectedTargetOrgs.value.push(org_);
}
//
selectedTargetOrgs.value = [...selectedTargetOrgs.value];
// directiveChooseRef.value?.cleanTargetSourceData()
}
}
// /
function targetChooseTypeChanged(val_) {
if (val_.target.value == 'one' && !!syncOrgs.value?.length) {
selectedTargetOrgs.value = [{ ...syncOrgs.value?.[0] }]
//
nextTick(() => {
if (selectedOrgsContainer.value) {
selectedOrgsContainer.value.scrollTop = 0;
}
});
}
emit('changeSyncText', val_.target.value)
}
//
function handleGetSource() {
sourceOrgListComRef.value?.commitOrgsInfo()
handleCancelSource()
}
//
function handleGetTarget() {
targetOrgListComRef.value?.commitOrgsInfo()
handleCancelTarget()
}
function syncFunc() {
directiveChooseRef.value?.syncFunc()
}
defineExpose({
syncFunc
});
onMounted(async () => {
initLoading.value = true
orgInfo.value = []
let dmInfo_ = await getDirectiveMain()
console.log("🌊 ~ dmInfo_:", dmInfo_)
let dmAllInfo_ = await getOrgInfo({ orgCode: dmInfo_.orgCode })
if (!dmAllInfo_.records[0]) {
createMessage.error('请先设置标准指令库!')
} else {
orgInfo.value.push(dmAllInfo_.records[0])
initLoading.value = false
handleSourceOrgChoose(dmAllInfo_.records)
}
})
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
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%;
}
}
.container2 {
display: flex;
margin: 14px;
max-height: 85vh;
}
.left {
display: flex;
flex-direction: column;
width: 18%;
margin-right: 14px;
}
.source-platform {
display: flex;
align-items: center;
justify-content: space-between;
}
.zljx-platform {
display: flex;
flex-direction: column;
/* 改为垂直排列 */
gap: 8px;
/* 添加间距 */
.section-title {
font-size: 14px;
font-weight: 600;
color: #333;
position: relative;
padding-left: 12px;
}
.directive-choose-wrapper {
width: 100%;
/* 可以根据需要添加其他样式 */
}
}
.section-title {
font-size: 14px;
font-weight: 600;
color: #333;
position: relative;
padding-left: 12px;
}
.left .top {
flex: 0 0 28%;
margin-bottom: 14px;
}
.left .bottom {
flex: 1;
}
.right {
flex: 1;
width: 80%;
max-height: 85vh;
}
:deep .ant-card-body {
padding: 12px;
}
.step-content {
// overflow: auto;
height: 70vh;
}
.zxClass {
font-size: 12px;
background: linear-gradient(to right, #1ea0fa, #017de9);
border-radius: 8px;
height: 25px;
color: white;
line-height: 25px;
padding: 0 8px;
/* 增加内边距 */
flex-shrink: 0;
/* 防止被压缩 */
}
.tbClass {
background: #f6f6f6;
padding: 8px;
border-radius: 5px;
}
.antTitle {
margin-top: 10px;
display: block;
font-size: 12px;
}
.ellipsis-one-lines {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
.selected-card {
border: 2px solid #1890ff;
box-shadow: 0 0 8px rgba(24, 144, 255, 0.3);
}
.directive-selected-card {
border: 2px solid #1890FF;
box-shadow: 0 0 8px rgba(37, 149, 255, 0.3);
}
.org-card {
margin-top: 8px;
&:hover {
border-color: #55a9f8;
/* 这是悬停时的蓝色边框 */
box-shadow: 0 2px 8px rgba(37, 149, 255, 0.3);
/* 这是悬停时的淡蓝色阴影 */
}
}
:deep .ant-divider {
margin: 0 0 8px 0;
}
</style>

View File

@ -1,124 +0,0 @@
<template>
<!-- <j-modal :title="title" :visible="visible" :fullscreen="true" width="100vw" :bodyStyle="{ padding: 0 }"
: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"
v-show="!!registerForm && (registerForm?.stepVal == 0 || registerForm?.stepVal == 1 || registerForm?.stepVal == 2)">下一步</a-button>
<a-button @click="registerForm?.syncFunc" type="primary"
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" @changeSyncText="changeSyncText"/>
</j-modal> -->
<a-drawer :title="title" width="100vw" v-model:visible="visible" :closable="true" :bodyStyle="{ padding: 0 }" :maskClosable="false" :keyboard="false"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<SyncStepList ref="registerForm" v-if="visible" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"
:fullscreen="true" style="height:100vh;" @closeModal="closeModal" @changeSyncText="changeSyncText"/>
<template #footer>
<a-button @click="handleCancel" style="margin-right: 10px;">关闭</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"
v-show="!!registerForm && (registerForm?.stepVal == 0 || registerForm?.stepVal == 1 || registerForm?.stepVal == 2)">下一步</a-button>
<a-button @click="registerForm?.syncFunc" type="primary"
v-show="!!registerForm && registerForm?.stepVal == 3">确认</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose, defineProps } from 'vue';
import SyncStepList from './SyncStepList.vue';
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const props = defineProps({
sysUrlValue: { type: String, default: '' },
});
const emit = defineEmits(['register', 'success']);
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()
}
/**
* 编辑或初始化弹窗
*/
function init(record: any) {
title.value = '镜像';
visible.value = true;
nextTick(() => {
// registerForm.value?.init(record);
});
}
/**
* 子组件提交完成回调
*/
function submitCallback() {
visible.value = false;
emit('success');
}
/**
* 上一步
*/
function previousStep() {
registerForm.value?.changeStepVal(false)
}
/**
* 下一步
*/
function nextStep() {
registerForm.value?.changeStepVal(true)
}
/**
* 取消按钮回调
*/
function handleCancel() {
visible.value = false;
}
function closeModal() {
visible.value = false;
}
defineExpose({
init,
disableSubmit,
});
</script>
<style lang="less" scoped>
.modal-fullscreen :deep(.ant-modal) {
max-width: 100vw !important;
width: 100vw !important;
top: 0 !important;
margin: 0 !important;
}
.modal-fullscreen :deep(.ant-modal-body) {
padding: 0 !important;
height: 100vh !important;
}
</style>

View File

@ -1,255 +0,0 @@
<template>
<div class="p-2" style="padding: 10px;">
<a-steps v-model:current="stepVal" size="small" style="margin: 0; width: 95%; margin: 0 auto;">
<a-step title="功能说明" disabled />
<a-step title="选择源数据业务平台" disabled />
<a-step title="选择服务指令" disabled />
<a-step title="选择目标业务平台" disabled />
</a-steps>
</div>
<!-- 第一步功能说明 -->
<div v-show="stepVal === 0" class="step1-container">
<div class="step1-box">
<InfoCircleOutlined class="step1-icon" />
<h3 class="step1-heading">服务指令同步 · 镜像功能</h3>
<ul class="step1-points">
<li><b>作用</b>服务指令分发至业务平台</li>
<li><b>流程</b>选择源数据业务平台 选择服务指令 选择目标业务平台</li>
<li><b>确认</b>点击右下角确认按钮开始自动同步</li>
<li><b>注意</b>如有不熟悉功能按键可在对应界面上方查看操作指引</li>
</ul>
</div>
</div>
<!-- 第二步选择源数据机构 -->
<div v-show="stepVal === 1">
<div style="margin: 10px 0 16px 100px; display: flex; align-items: center; font-size: 16px; color: #8B0000;">
<InfoCircleOutlined style="color: #1890ff; margin-right: 6px;" />
<span
style="padding-right: 60px;">操作指引1如何选择源数据平台点击对应机构卡片即可2如何进入服务指令选择页面请点击页面右下方下一步按钮3详情按钮查看对应平台现有服务指令</span>
</div>
<OrgListCom class="step-content" ref="orgListComRef" :showChoose="true" @handleOrgDetail="handleDetail"
@handleOrgChoose="orgSourceChangedFunc" />
</div>
<!-- 第三步选择服务指令 -->
<div v-show="stepVal === 2">
<div style="margin: 10px 0 16px 100px; display: flex; align-items: center; font-size: 16px; color: #8B0000;">
<InfoCircleOutlined style="color: #1890ff; margin-right: 6px;" />
<span
style="padding-right: 60px;">操作指引1如何选择服务指令将需要同步的服务指令通过选择一键全选按钮添加至右侧已选择列表中,如需移除请点击移除全部移除按钮2搜索区域可对左侧列表进行筛选3左侧列表上方全部/未选择可快速切换源数据列表便于更清晰的查看需要处理的服务指令</span>
</div>
<DirectiveChooseCom ref="directiveChooseRef"></DirectiveChooseCom>
</div>
<!-- 第四步选择目标机构 -->
<div v-show="stepVal === 3" style="overflow-x: hidden;">
<div style="margin: 10px 0 16px 100px; display: flex; align-items: center; font-size: 16px; color: #8B0000;">
<InfoCircleOutlined style="color: #1890ff; margin-right: 6px;" />
<span
style="padding-right: 60px;">操作指引1如何选择目标业务平台在右侧卡片中通过点击卡片方式选择需要同步指令的目标平台可多选也可通过全选/清空功能按钮进行快捷操作2左侧列表为待同步服务指令3点击右下方确认按钮开始自动同步同步只会将对应平台未有指令进行新增不会改变其原有指令字段</span>
</div>
<a-row :gutter="24" style="padding-left: 20px;padding-right: 20px;">
<a-col :lg="12" :sm="24">
<!-- 引用表格 -->
<a-tag color="green" style="margin-left: 10px;margin-top: 10px;">待同步 {{ leftList?.length }} </a-tag>
<BasicTable :dataSource="leftList" :columns="columns" size="small" :scroll="{ y: '61vh' }"
:showIndexColumn="false"
:pagination="{ current: 1, pageSize: 50, total: leftList.length, showSizeChanger: true, pageSizeOptions: ['15', '50', '70', '100'] }">
</BasicTable>
</a-col>
<a-col :lg="12" :sm="24">
<div style="display: flex; justify-content: space-between; align-items: center; margin-top: 10px;">
<!-- 目标平台标签保持在当前位置 -->
<a-tag color="orange" style="margin-left: 20px;">
目标平台 - 已选择 {{ targetOrgListComRef?.selectedOrgs?.length }}
</a-tag>
<!-- 两个按钮靠右显示 -->
<div style="margin-right: 30px;">
<a-button type="primary" size="small" style="margin-left: 10px;"
@click="targetOrgListComRef?.checkAllOrEmpty(true)">全选</a-button>
<a-button type="primary" size="small" style="margin-left: 10px;"
@click="targetOrgListComRef?.checkAllOrEmpty(false)">清空</a-button>
</div>
</div>
<OrgListCom ref="targetOrgListComRef" :layout="'half'" :excludeOrgCode="orgInfo[0]?.orgCode"
:allowMultipleSelection="true" :showChoose="true" @handleOrgDetail="handleDetail"
@handleOrgChoose="orgTargetChangedFunc" />
</a-col>
</a-row>
</div>
<ConfigServiceDirectiveListModal class="step-content" ref="configServiceDirectiveListModal" />
</template>
<script lang="ts" setup>
import { ref, watch, toRaw } from 'vue';
import { InfoCircleOutlined } from '@ant-design/icons-vue';
import OrgListCom from '/@/views/synchronization/directive/orgCom/OrgListCom.vue';
import ConfigServiceDirectiveListModal from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirectiveListModal.vue';
import DirectiveChooseCom from '/@/views/synchronization/directive/serviceDirective/DirectiveChooseCom.vue'
import { useMessage } from '/@/hooks/web/useMessage';
import { columns } from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirective.data';
import { BasicTable } from '/@/components/Table';
import { syncDirective } from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api';
const emit = defineEmits(['closeModal']);
const stepVal = ref(0);
const configServiceDirectiveListModal = ref();
const orgInfo = ref([])
const { createMessage } = useMessage();
const directiveChooseRef = ref()
const leftList = ref<any[]>([]);
const targetOrgListComRef = ref()
const syncOrgs = ref([])
function init(record: any) {
}
function handleDetail(record: any) {
configServiceDirectiveListModal.value.init(record);
configServiceDirectiveListModal.value.disableSubmit = true;
}
function changeStepVal(isAdd) {
if (isAdd) {
if (stepVal.value == 1 && orgInfo.value.length < 1) {
createMessage.warning('请选择源数据机构!');
return
}
if (stepVal.value == 2) {
if (toRaw(directiveChooseRef.value?.rightList).length == 0) {
createMessage.warning('请选择服务指令!');
return
} else {
leftList.value = [...directiveChooseRef.value?.rightList];
}
}
stepVal.value = stepVal.value + 1
} else {
stepVal.value = stepVal.value - 1
}
}
///
function orgSourceChangedFunc(orgInfo_) {
orgInfo.value = orgInfo_
directiveChooseRef.value?.controlShowJSCom()
targetOrgListComRef.value?.reload()
directiveChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
}
///
function orgTargetChangedFunc(orgInfo_) {
syncOrgs.value = orgInfo_
}
watch(
() => stepVal.value,
(newstepVal, oldValue) => {
if (newstepVal == 2 && oldValue == 1) {
// targetOrgListComRef.value?.reload()
// directiveChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
}
if (newstepVal == 3) {
targetOrgListComRef.value?.checkAllOrEmpty(false)
}
}
);
//
function syncFunc() {
if (!targetOrgListComRef.value?.selectedOrgs?.length) {
createMessage.warning('请选择目标平台')
} else {
syncDirective({
dataSourceCode: orgInfo.value[0].orgCode,
syncIds: leftList.value.map(d => d.id).join(','),
syncOrgCodes: syncOrgs.value.map(o => o.orgCode).join(','),
})
createMessage.success('已开始自动同步')
emit('closeModal')
}
}
defineExpose({
init,
stepVal,
changeStepVal,
syncFunc,
});
</script>
<style lang="less" scoped>
.step1-container {
display: flex;
justify-content: center;
align-items: center;
margin-top: 120px;
}
.step1-box {
background: #fff;
padding: 24px;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
text-align: center;
max-width: 500px;
width: 100%;
}
.step1-icon {
font-size: 48px;
color: #1890FF;
margin-bottom: 16px;
}
.step1-heading {
font-size: 22px;
margin-bottom: 16px;
color: #333;
}
.step1-points {
list-style: none;
padding: 0;
margin: 0;
text-align: left;
}
.step1-points li {
font-size: 16px;
line-height: 1.8;
padding-left: 24px;
position: relative;
margin-bottom: 12px;
}
.step1-points li::before {
content: counter(item) ".";
counter-increment: item;
position: absolute;
left: 0;
top: 0;
font-weight: bold;
color: #1890FF;
}
ul.step1-points {
counter-reset: item;
}
.step-content {
padding: 0 100px;
}
/* 步骤条样式 */
:deep(.ant-steps) {
padding: 0;
}
:deep(.ant-steps-item) {
margin: 0;
}
</style>