Compare commits

...

2 Commits

Author SHA1 Message Date
1378012178@qq.com 109de00181 Merge branch 'master' of http://47.115.223.229:8888/yangjun/hldy_vue 2025-06-19 15:01:26 +08:00
1378012178@qq.com d9ed613e48 1、机构信息增加字段、调整机构/部门切换时字段的显隐
2、媒体资源管理功能调整
3、修复媒体资源同步BUG
2025-06-19 15:01:19 +08:00
23 changed files with 854 additions and 1727 deletions

View File

@ -20,6 +20,8 @@ VITE_GLOB_API_URL_PREFIX=
#微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径 #微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
VITE_APP_SUB_jeecg-app-1 = '//localhost:8092' VITE_APP_SUB_jeecg-app-1 = '//localhost:8092'
# 试验田机构编码
VITE_SYTJGBM = '101'
# 填写后将作为乾坤子应用启动主应用注册时AppName需保持一致放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动 # 填写后将作为乾坤子应用启动主应用注册时AppName需保持一致放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3 #VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3

View File

@ -21,6 +21,8 @@ VITE_GLOB_DOMAIN_URL=https://www.focusnu.com/nursing-unit
# 接口父路径前缀 # 接口父路径前缀
VITE_GLOB_API_URL_PREFIX= VITE_GLOB_API_URL_PREFIX=
# 试验田机构编码
VITE_SYTJGBM = '101'
# 填写后将作为乾坤子应用启动主应用注册时AppName需保持一致放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动 # 填写后将作为乾坤子应用启动主应用注册时AppName需保持一致放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3 #VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3

View File

@ -16,6 +16,7 @@ enum Api {
getTableList = '/sys/user/queryUserComponentData', getTableList = '/sys/user/queryUserComponentData',
getCategoryData = '/sys/category/loadAllData', getCategoryData = '/sys/category/loadAllData',
getNuList = '/iot/cameraInfo/nuList', //后期调整 getNuList = '/iot/cameraInfo/nuList', //后期调整
getOrgInfo = '/api/common/getOrgInfo',//根据机构编码获取机构信息
} }
/** /**
@ -164,3 +165,11 @@ export const getFileblob = (url, parameter) => {
export const uploadMyFile = (url, data) => { export const uploadMyFile = (url, data) => {
return defHttp.uploadMyFile(url, data); return defHttp.uploadMyFile(url, data);
}; };
/**
*
* @param params orgCode
*/
export const getOrgInfo = (params) => {
return defHttp.get({ url: Api.getOrgInfo, params });
};

View File

@ -125,15 +125,15 @@
<a-row> <a-row>
<a-col :span="sourceScreenSpan"> <a-col :span="sourceScreenSpan">
<div style="height: 16px;margin-left: 15px;"> <div style="height: 16px;margin-left: 15px;">
<a-tag color="#87d068">源数据</a-tag> <a-tag color="#2DB7F5">源数据</a-tag>
<a-radio-group v-model:value="viewType" size="small" style="margin-left: 10px;" <a-radio-group v-model:value="viewType" size="small" style="margin-left: 10px;"
@change="emit('viewTypeChanged', viewType)"> @change="emit('viewTypeChanged', viewType)">
<a-radio-button value="all">全部</a-radio-button> <a-radio-button value="all">全部</a-radio-button>
<a-radio-button value="selected">已选择</a-radio-button> <a-radio-button value="selected">已选择</a-radio-button>
<a-radio-button value="unselected">未选择</a-radio-button> <a-radio-button value="unselected">未选择</a-radio-button>
</a-radio-group> </a-radio-group>
<slot name="sourceTableSlot"></slot>
</div> </div>
<slot name="sourceTableSlot"></slot>
</a-col> </a-col>
<a-col :span="selectedScreenSpan"> <a-col :span="selectedScreenSpan">
<div style="height: 31px;margin-left: 4px;"> <div style="height: 31px;margin-left: 4px;">
@ -145,14 +145,14 @@
</a-tag> </a-tag>
</div> </div>
<a-card size="small" :bordered="false" class="selected-list-container"> <a-card size="small" :bordered="false" class="selected-list-container">
<slot name="businessTableSlot">111</slot> <slot name="businessTableSlot"></slot>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="asyncHistory" tab="同步历史"> <a-tab-pane key="asyncHistory" tab="同步历史">
<AsyncListComponent ref="asyncHistoryRef"></AsyncListComponent> <AsyncListComponent ref="asyncHistoryRef" :orgCode="orgData.orgCode"></AsyncListComponent>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
<div class="toggle-button-container"> <div class="toggle-button-container">
@ -168,7 +168,7 @@
<a-button type="primary" size="small" @click="handleSelectAll" v-show="tabActiveKey == 'dataAsync'" <a-button type="primary" size="small" @click="handleSelectAll" v-show="tabActiveKey == 'dataAsync'"
style="margin-left: 8px">全部添加</a-button> style="margin-left: 8px">全部添加</a-button>
<a-divider type="vertical" style="background-color: #CDCDCF" v-show="tabActiveKey == 'dataAsync'" /> <a-divider type="vertical" style="background-color: #CDCDCF" v-show="tabActiveKey == 'dataAsync'" />
<a-button type="error" size="small" @click="handleRemoveAll" v-show="tabActiveKey == 'dataAsync'" <a-button type="primary" size="small" @click="handleRemoveAll" v-show="tabActiveKey == 'dataAsync'"
style="margin-left: 8px">全部移除</a-button> style="margin-left: 8px">全部移除</a-button>
<a-divider type="vertical" style="background-color: #CDCDCF" v-show="tabActiveKey == 'dataAsync'" /> <a-divider type="vertical" style="background-color: #CDCDCF" v-show="tabActiveKey == 'dataAsync'" />
<a-button type="primary" size="small" @click.stop="handleRestore" <a-button type="primary" size="small" @click.stop="handleRestore"
@ -207,20 +207,19 @@
</template> </template>
<script lang="ts" name="synchronization-directive" setup> <script lang="ts" name="synchronization-directive" setup>
import { ref, onMounted, computed, onBeforeMount, reactive } from 'vue'; import { ref, onMounted, computed } from 'vue';
import { initDictOptions } from '/@/utils/dict';
import { queryDepartTreeSync } from '/@/api/common/api'; import { queryDepartTreeSync } from '/@/api/common/api';
import { Empty } from 'ant-design-vue'; import { Empty } from 'ant-design-vue';
import { Modal } from 'ant-design-vue'; import { Modal } from 'ant-design-vue';
import { useMessage } from "/@/hooks/web/useMessage"; import { useMessage } from "/@/hooks/web/useMessage";
import AsyncListComponent from '@/components/dataAsync/AsyncMainList.vue' import AsyncListComponent from '@/components/dataAsync/AsyncMainList.vue'
import { number } from 'vue-types';
const props = defineProps({ const props = defineProps({
selectedSize: 0 selectedSize: 0,
hasSearchConditions: false,
}); });
const emit = defineEmits(['changeShowJMCom', 'viewTypeChanged', 'sourceOrgCodeChanged', 'orgChanged']); const emit = defineEmits(['viewTypeChanged', 'orgChanged', 'handleAsync', 'handleAddAll', 'handleRemoveAll']);
interface OrganizationData { interface OrganizationData {
id?: string; id?: string;
@ -235,12 +234,6 @@ interface OrganizationData {
address?: string; address?: string;
} }
onBeforeMount(async () => {
const dictData = await initDictOptions('org_code')
emit('sourceOrgCodeChanged', dictData.filter(d => d.text == 'shi_yan_tian')[0].value)
emit('changeShowJMCom', true)
})
const initialDataIds = ref<Array<string | number>>([]);
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE; const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
const toggleSearchStatus = ref<boolean>(true); const toggleSearchStatus = ref<boolean>(true);
@ -251,8 +244,6 @@ const orgTable = ref<OrganizationData[]>([]);
const orgData = ref<OrganizationData | null>(null); const orgData = ref<OrganizationData | null>(null);
const showVideoModal = ref(false); const showVideoModal = ref(false);
const videoUrl = ref(''); const videoUrl = ref('');
const selectedItems = ref(new Map<string | number, any>());
const listComRef = ref();
const orgSelectedCon = ref(true) const orgSelectedCon = ref(true)
const tabActiveKey = ref('dataAsync') const tabActiveKey = ref('dataAsync')
const asyncHistoryRef = ref(null) const asyncHistoryRef = ref(null)
@ -295,6 +286,7 @@ const handleOrgSelected = async (org) => {
cancelText: '取消', cancelText: '取消',
onOk: async () => { onOk: async () => {
await loadOrgData(org); await loadOrgData(org);
refreshHistory()
}, },
}); });
} else { } else {
@ -305,7 +297,6 @@ const handleOrgSelected = async (org) => {
const loadOrgData = async (org) => { const loadOrgData = async (org) => {
// //
orgData.value = org; orgData.value = org;
emit('orgChanged', org) emit('orgChanged', org)
}; };
@ -326,41 +317,15 @@ const handleAsync = () => {
okText: '确认', okText: '确认',
cancelText: '取消', cancelText: '取消',
onOk: async () => { onOk: async () => {
let idStr = Array.from(selectedItems.value.keys()).join(',') //
if (!idStr) { emit('handleAsync', null);
createMessage.warning("未选择数据!");
return
}
let izInc = true
if (!!orgData.value?.operationStartTime) izInc = new Date() >= new Date(orgData.value?.operationStartTime)
let params = {
orgCode: orgData.value?.orgCode,
izInc,
idStr
}
await asyncFunc(params)
//
if (!orgData.value?.operationStartTime || new Date() >= new Date(orgData.value?.operationStartTime)) {
// ID
const syncedIds = Array.from(selectedItems.value.keys());
// initialDataIdsID
syncedIds.forEach(id => {
if (!initialDataIds.value.includes(id)) {
initialDataIds.value.push(id);
}
});
}
//
refreshHistory()
createMessage.success("同步结果请在同步历史中查看!");
}, },
}); });
} };
// //
const refreshHistory = () => { const refreshHistory = () => {
asyncHistoryRef.value?.searchQuery()
} }
@ -369,74 +334,22 @@ const viewType = ref('all')
// //
const handleSelectAll = async () => { const handleSelectAll = async () => {
// if (!orgData.value) { if (!orgData.value) {
// createMessage.warning(""); createMessage.warning("请先选择机构");
// return; return;
// } }
emit('handleAddAll', null)
// 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("");
// console.error(":", error);
// }
}; };
// //
const handleRemoveAll = () => { const handleRemoveAll = () => {
if (selectedItems.value.size === 0) {
createMessage.info("当前没有已选数据");
return;
}
Modal.confirm({ Modal.confirm({
title: '确认移除', title: '确认移除',
content: '确定要移除所有已选数据吗?', content: '确定要移除所有已选数据吗?',
okText: '确认', okText: '确认',
cancelText: '取消', cancelText: '取消',
onOk: () => { onOk: () => {
// emit('handleRemoveAll', null)
if (!orgData.value?.operationStartTime || new Date() >= new Date(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("已移除所有已选数据");
} }
}); });
}; };
@ -466,13 +379,7 @@ const handleRestore = async () => {
}); });
}; };
//
const hasSearchConditions = computed(() => {
return true
// return Object.keys(queryParam.value).some(key =>
// key !== 'viewType' && queryParam.value[key] !== undefined && queryParam.value[key] !== ''
// );
});
onMounted(() => { onMounted(() => {
queryDepartTreeSync({ platType: 'ywjg' }).then(res => { queryDepartTreeSync({ platType: 'ywjg' }).then(res => {
@ -482,7 +389,8 @@ onMounted(() => {
defineExpose({ defineExpose({
orgData, orgData,
resetOrgSelectedCon resetOrgSelectedCon,
refreshHistory,
}); });
</script> </script>
@ -497,7 +405,7 @@ defineExpose({
} }
.selected-list-container { .selected-list-container {
height: calc(100vh - 350px); height: calc(100vh - 310px);
overflow: auto; overflow: auto;
:deep(.ant-table) { :deep(.ant-table) {
@ -786,4 +694,11 @@ defineExpose({
} }
} }
} }
// padding
.org-card {
:deep(.ant-descriptions-item-content) {
padding: 20px;
}
}
</style> </style>

View File

@ -51,6 +51,9 @@ import { asyncMaincolumns, asyncStatusColumns } from './AsyncMain.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './AsyncMain.api'; import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './AsyncMain.api';
import AsyncMainModal from './components/AsyncMainModal.vue' import AsyncMainModal from './components/AsyncMainModal.vue'
const props = defineProps({
orgCode: 'orgCode'
});
const queryParam = reactive<any>({}); const queryParam = reactive<any>({});
const registerModal = ref(); const registerModal = ref();
//table //table
@ -65,6 +68,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
showActionColumn: false, showActionColumn: false,
beforeFetch: async (params) => { beforeFetch: async (params) => {
queryParam.type = 'directive' queryParam.type = 'directive'
queryParam.orgCode = props.orgCode
return Object.assign(params, queryParam); return Object.assign(params, queryParam);
}, },
}, },

View File

@ -1,16 +1,17 @@
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage"; import { useMessage } from '/@/hooks/web/useMessage';
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/mediamanage/mediaManage/list', list = '/mediamanage/mediaManage/list',
save='/mediamanage/mediaManage/add', save = '/mediamanage/mediaManage/add',
edit='/mediamanage/mediaManage/edit', edit = '/mediamanage/mediaManage/edit',
deleteOne = '/mediamanage/mediaManage/delete', deleteOne = '/mediamanage/mediaManage/delete',
deleteBatch = '/mediamanage/mediaManage/deleteBatch', deleteBatch = '/mediamanage/mediaManage/deleteBatch',
importExcel = '/mediamanage/mediaManage/importExcel', importExcel = '/mediamanage/mediaManage/importExcel',
exportXls = '/mediamanage/mediaManage/exportXls', exportXls = '/mediamanage/mediaManage/exportXls',
getUrl = '/mediamanage/mediaManage/getUrl',
} }
/** /**
@ -35,11 +36,11 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
* @param params * @param params
* @param handleSuccess * @param handleSuccess
*/ */
export const deleteOne = (params,handleSuccess) => { export const deleteOne = (params, handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
handleSuccess(); handleSuccess();
}); });
} };
/** /**
* *
@ -54,12 +55,12 @@ export const batchDelete = (params, handleSuccess) => {
okText: '确认', okText: '确认',
cancelText: '取消', cancelText: '取消',
onOk: () => { onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
handleSuccess(); handleSuccess();
}); });
} },
}); });
} };
/** /**
* *
@ -69,4 +70,10 @@ export const batchDelete = (params, handleSuccess) => {
export const saveOrUpdate = (params, isUpdate) => { export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save; let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false }); return defHttp.post({ url: url, params }, { isTransformResponse: false });
} };
/**
*
* @param params
*/
export const getUrl = () => defHttp.get({ url: Api.getUrl });

View File

@ -15,6 +15,11 @@ export const columns: BasicColumn[] = [
align: "center", align: "center",
dataIndex: 'descr' dataIndex: 'descr'
}, },
{
title: '系统功能',
align: "center",
dataIndex: 'sysFunc_dictText'
},
{ {
title: '文件类型', title: '文件类型',
align: "center", align: "center",

View File

@ -8,14 +8,21 @@
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="name"> <a-form-item name="name">
<template #label><span title="名称">名称</span></template> <template #label><span title="名称">名称</span></template>
<JInput v-model:value="queryParam.name" placeholder="请输入名称"/> <JInput v-model:value="queryParam.name" placeholder="请输入名称" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="sysFunc">
<template #label><span title="系统功能">系统功能</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.sysFunc" dictCode="sys_function"
placeholder="请选择系统功能" allowClear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="fileType"> <a-form-item name="fileType">
<template #label><span title="文件类型">文件类型</span></template> <template #label><span title="文件类型">文件类型</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.fileType" dictCode="file_type" <j-dict-select-tag type='list' v-model:value="queryParam.fileType" dictCode="file_type"
placeholder="请选择文件类型" allowClear /> placeholder="请选择文件类型" allowClear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -55,25 +62,45 @@
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" /> <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
</template> </template>
<template v-slot:bodyCell="{ column, record, index, text }"> <template v-slot:bodyCell="{ column, record, index, text }">
<template v-if="column.dataIndex === 'filePath'">
<!-- 图片 -->
<img style="max-width: 120px; max-height: 80px;" v-if="record.fileType === 'image'"
:src="transPreviewUrl(record)" :alt="record.fileName || 'Image'">
<!-- 音频 -->
<audio style="max-width: 120px; max-height: 80px;" v-if="record.fileType === 'audio'" controls
:src="transPreviewUrl(record)">
您的浏览器不支持 audio 标签
</audio>
<!-- 视频 -->
<video style="max-width: 120px; max-height: 80px;" v-if="record.fileType === 'video'" controls
:src="transPreviewUrl(record)">
您的浏览器不支持 video 标签
</video>
<!-- 文档 -->
<span v-if="record.fileType === 'document'">-</span>
</template>
</template> </template>
</BasicTable> </BasicTable>
<!-- 表单区域 --> <!-- 表单区域 -->
<MediaManageModal ref="registerModal" @success="handleSuccess"></MediaManageModal> <MediaManageModal ref="registerModal" :urlPrefix="urlPrefix" @success="handleSuccess"></MediaManageModal>
</div> </div>
</template> </template>
<script lang="ts" name="mediamanage-mediaManage" setup> <script lang="ts" name="mediamanage-mediaManage" setup>
import { ref, reactive } from 'vue'; import { ref, reactive, onMounted } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage'; import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './MediaManage.data'; import { columns, superQuerySchema } from './MediaManage.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './MediaManage.api'; import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getUrl } from './MediaManage.api';
import { downloadFile } from '/@/utils/common/renderUtils'; import { downloadFile } from '/@/utils/common/renderUtils';
import MediaManageModal from './components/MediaManageModal.vue' import MediaManageModal from './components/MediaManageModal.vue'
import { useUserStore } from '/@/store/modules/user'; import { useUserStore } from '/@/store/modules/user';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue"; import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
const formRef = ref(); const formRef = ref();
const queryParam = reactive<any>({}); const queryParam = reactive<any>({});
@ -117,7 +144,7 @@ const wrapperCol = reactive({
xs: 24, xs: 24,
sm: 20, sm: 20,
}); });
const urlPrefix = ref('')//+
// //
const superQueryConfig = reactive(superQuerySchema); const superQueryConfig = reactive(superQuerySchema);
@ -226,9 +253,23 @@ function searchReset() {
reload(); reload();
} }
/**
* 转化资源路径
* @param url_ 路径
*/
function transPreviewUrl(record) {
if (record.izNetUrl == 'net') {
return urlPrefix.value + record.filePath
} else {
return record.filePath
}
}
onMounted(() => {
getUrl().then(res => {
urlPrefix.value = res
})
})
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

View File

@ -15,6 +15,12 @@
<a-textarea v-model:value="formData.descr" :rows="4" placeholder="请输入备注" /> <a-textarea v-model:value="formData.descr" :rows="4" placeholder="请输入备注" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24">
<a-form-item label="系统功能" v-bind="validateInfos.sysFunc" id="MediaManageForm-sysFunc" name="sysFunc">
<j-dict-select-tag type='list' v-model:value="formData.sysFunc" @change="sysFuncChanged"
dictCode="sys_function" placeholder="请选择系统功能" allowClear />
</a-form-item>
</a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="文件类型" v-bind="validateInfos.fileType" id="MediaManageForm-fileType" name="fileType"> <a-form-item label="文件类型" v-bind="validateInfos.fileType" id="MediaManageForm-fileType" name="fileType">
<j-dict-select-tag type='list' v-model:value="formData.fileType" dictCode="file_type" <j-dict-select-tag type='list' v-model:value="formData.fileType" dictCode="file_type"
@ -22,26 +28,45 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="文件上传" v-bind="validateInfos.filePath" id="MediaManageForm-filePath"> <a-form-item label="资源类型" v-bind="validateInfos.izNetUrl" id="MediaManageForm-izNetUrl" name="izNetUrl">
<j-dict-select-tag type='radio' v-model:value="formData.izNetUrl" dictCode="iz_net_url" allowClear
:disabled="formData.sysFunc == 'directive'" @change="handleFileTypeChange" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item :label="handleFileUploadLableName(formData.izNetUrl)" v-bind="validateInfos.filePath"
id="MediaManageForm-filePath">
<div v-if="formData.fileType && formData.izNetUrl == 'net'"
style="color: #999; margin-bottom: 8px; padding-left: 8px;">
当前协议域名为{{ urlPrefix }}
</div>
<a-textarea v-if="formData.fileType && (formData.izNetUrl == 'net' || formData.izNetUrl == 'full_url')"
v-model:value="formData.filePath" :rows="2" placeholder="请输入资源地址" style="margin-bottom: 10px;" />
<!-- 未选择文件类型时的提示 --> <!-- 未选择文件类型时的提示 -->
<div v-if="!formData.fileType" class="upload-tip"> <div v-if="!formData.fileType" class="upload-tip">
<span style="color: red; line-height: 32px;">请先选择文件类型</span> <span style="color: red; line-height: 32px;">请先选择文件类型</span>
</div> </div>
<!-- 图片上传组件 --> <!-- 图片上传组件 -->
<j-image-upload v-if="formData.fileType === 'image'" v-model:value="formData.filePath" :number="1" <template v-if="formData.fileType === 'image'">
multiple="1" :fileSize="10" accept=".png,.jpg,.jpeg" @change="handleFileChange"> <j-image-upload v-if="formData.izNetUrl == 'local'" v-model:value="formData.filePath" :number="1"
</j-image-upload> multiple="1" :fileSize="10" accept=".png,.jpg,.jpeg" @change="handleFileChange">
</j-image-upload>
<!-- 图片预览 -->
<div v-if="formData.filePath && formData.izNetUrl != 'local'" class="media-preview">
<img :src="transUrl(formData)" style="max-width: 100%; max-height: 300px;">
</div>
</template>
<!-- 视频上传组件 --> <!-- 视频上传组件 -->
<template v-if="formData.fileType === 'video'"> <template v-if="formData.fileType === 'video'">
<j-upload v-model:value="formData.filePath" :fileSize="100" :multiple="false" :maxCount="1" <j-upload v-if="formData.izNetUrl == 'local'" v-model:value="formData.filePath" :fileSize="100"
accept=".mp4" @change="handleFileChange"> :multiple="false" :maxCount="1" accept=".mp4" @change="handleFileChange">
</j-upload> </j-upload>
<!-- 视频预览 --> <!-- 视频预览 -->
<div v-if="formData.filePath" class="media-preview"> <div v-if="formData.filePath && previewShow" class="media-preview">
<video controls style="max-width: 100%; max-height: 300px;"> <video controls style="max-width: 100%; max-height: 300px;">
<source :src="getFileAccessHttpUrl(formData.filePath)" type="video/mp4"> <source :src="transUrl(formData)" type="video/mp4">
您的浏览器不支持视频播放 您的浏览器不支持视频播放
</video> </video>
</div> </div>
@ -49,13 +74,13 @@
<!-- 音频上传组件 --> <!-- 音频上传组件 -->
<template v-if="formData.fileType === 'audio'"> <template v-if="formData.fileType === 'audio'">
<j-upload v-model:value="formData.filePath" :fileSize="50" :multiple="false" :maxCount="1" <j-upload v-if="formData.izNetUrl == 'local'" v-model:value="formData.filePath" :fileSize="50"
accept=".mp3" @change="handleFileChange"> :multiple="false" :maxCount="1" accept=".mp3" @change="handleFileChange">
</j-upload> </j-upload>
<!-- 音频预览 --> <!-- 音频预览 -->
<div v-if="formData.filePath" class="media-preview"> <div v-if="formData.filePath && previewShow" class="media-preview">
<audio controls style="width: 100%;"> <audio controls style="width: 100%;">
<source :src="getFileAccessHttpUrl(formData.filePath)" type="audio/mpeg"> <source :src="transUrl(formData)" type="audio/mpeg">
您的浏览器不支持音频播放 您的浏览器不支持音频播放
</audio> </audio>
</div> </div>
@ -76,7 +101,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed } from 'vue'; import { ref, reactive, defineExpose, nextTick, defineProps, computed, watch } from 'vue';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { getValueType } from '/@/utils'; import { getValueType } from '/@/utils';
@ -91,7 +116,8 @@ import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
const props = defineProps({ const props = defineProps({
formDisabled: { type: Boolean, default: false }, formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) }, formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true } formBpm: { type: Boolean, default: true },
urlPrefix: { type: String, default: '' },
}); });
const formRef = ref(); const formRef = ref();
const useForm = Form.useForm; const useForm = Form.useForm;
@ -100,17 +126,19 @@ const formData = reactive<Record<string, any>>({
id: '', id: '',
name: '', name: '',
descr: '', descr: '',
sysFunc: '',
fileType: '', fileType: '',
filePath: '', filePath: '',
izNetUrl: 'local',
}); });
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } }); const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } }); const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false); const confirmLoading = ref<boolean>(false);
// //
const validatorRules = reactive({ const validatorRules = reactive({
fileType: [{ required: true, message: '请输入文件类型!' },], fileType: [{ required: true, message: '请输入文件类型!' },],
filePath: [{ required: true, message: '请输入文件预览!' },], filePath: [{ required: true, message: '请上传文件/填写资源路径' },],
}); });
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false }); const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
@ -195,6 +223,18 @@ async function submitForm() {
} }
} }
} }
// +filePath
if (model.izNetUrl == 'net') {
if (props.urlPrefix.endsWith('/')) {
if (model.filePath.startsWith('/')) {
model.filePath = model.filePath.replace('/', '')
}
} else {
if (!model.filePath.startsWith('/')) {
model.filePath = '/' + model.filePath
}
}
}
await saveOrUpdate(model, isUpdate.value) await saveOrUpdate(model, isUpdate.value)
.then((res) => { .then((res) => {
if (res.success) { if (res.success) {
@ -209,6 +249,52 @@ async function submitForm() {
}); });
} }
function handleFileUploadLableName(v_) {
if (v_ == 'local') {
return '文件上传'
} else if (v_ == 'net') {
return '网络资源路径(不包含协议域名)'
} else if (v_ == 'full_url') {
return '完整网络资源地址'
} else {
return '文件上传'
}
}
const previewShow = ref(false)
watch(
() => formData.filePath,
(newVal, oldVal) => {
previewShow.value = false
setTimeout(() => {
previewShow.value = true
}, 500)
},
{
immediate: false,
deep: true
}
);
function transUrl(record) {
if (record.izNetUrl == 'local') {
return getFileAccessHttpUrl(record.filePath)
} else if (record.izNetUrl == 'net') {
return props.urlPrefix + record.filePath
} else {
return record.filePath
}
}
/**
* 系统功能变更
*/
function sysFuncChanged() {
if (formData.sysFunc == 'directive') {
formData.izNetUrl = 'net'
}
}
defineExpose({ defineExpose({
add, add,
edit, edit,

View File

@ -1,77 +1,83 @@
<template> <template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> <j-modal :title="title" :width="width" :visible="visible" @ok="handleOk"
<MediaManageForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></MediaManageForm> :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<MediaManageForm ref="registerForm" :urlPrefix="urlPrefix" @ok="submitCallback" :formDisabled="disableSubmit"
:formBpm="false" v-if="visible">
</MediaManageForm>
</j-modal> </j-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue'; import { ref, nextTick, defineExpose, defineProps } from 'vue';
import MediaManageForm from './MediaManageForm.vue' import MediaManageForm from './MediaManageForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue'; import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/** const props = defineProps({
* 新增 urlPrefix: { type: String, default: '' },
*/ });
function add() { const title = ref<string>('');
title.value = '新增'; const width = ref<number>(1000);
visible.value = true; const visible = ref<boolean>(false);
nextTick(() => { const disableSubmit = ref<boolean>(false);
registerForm.value.add(); const registerForm = ref();
}); const emit = defineEmits(['register', 'success']);
}
/**
* 编辑
* @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() { function add() {
handleCancel(); title.value = '新增';
emit('success'); visible.value = true;
} nextTick(() => {
registerForm.value.add();
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
}); });
}
/**
* 编辑
* @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> </script>
<style lang="less"> <style lang="less">
/**隐藏样式-modal确定按钮 */ /**隐藏样式-modal确定按钮 */
.jee-hidden { .jee-hidden {
display: none !important; display: none !important;
} }
</style> </style>
<style lang="less" scoped></style> <style lang="less" scoped></style>

View File

@ -1,67 +1,72 @@
import {BasicColumn} from '/@/components/Table'; import { BasicColumn } from '/@/components/Table';
import {FormSchema} from '/@/components/Table'; import { FormSchema } from '/@/components/Table';
import { rules} from '/@/utils/helper/validator'; import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils'; import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils'; import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{
title: '审批状态',
align: "center",
dataIndex: 'status_dictText'
},
{ {
title: '咨询人姓名', title: '咨询人姓名',
align: "center", align: 'center',
dataIndex: 'name' dataIndex: 'name',
}, },
{ {
title: '性别', title: '性别',
align: "center", align: 'center',
dataIndex: 'sex' dataIndex: 'sex',
}, },
{ {
title: '联系电话', title: '联系电话',
align: "center", align: 'center',
dataIndex: 'tel' dataIndex: 'tel',
}, },
{ {
title: '申请日期', title: '申请日期',
align: "center", align: 'center',
dataIndex: 'createTime' dataIndex: 'createTime',
}, },
{ {
title: '机构地址', title: '机构地址',
align: "center", align: 'center',
dataIndex: 'orgAddress' dataIndex: 'orgAddress',
}, },
{ {
title: '机构负责人电话', title: '机构负责人电话',
align: "center", align: 'center',
dataIndex: 'orgLeaderPhone' dataIndex: 'orgLeaderPhone',
}, },
{ {
title: '机构房屋性质', title: '机构房屋性质',
align: "center", align: 'center',
dataIndex: 'orgPropertyType' dataIndex: 'orgPropertyType',
}, },
{ {
title: '机构建筑面积', title: '机构建筑面积',
align: "center", align: 'center',
dataIndex: 'orgBuildingArea' dataIndex: 'orgBuildingArea',
},
{
title: '审批状态',
align: 'center',
dataIndex: 'status_dictText',
},
{
title: '审批备注',
align: 'center',
dataIndex: 'content',
}, },
]; ];
// 高级查询数据 // 高级查询数据
export const superQuerySchema = { export const superQuerySchema = {
tel: {title: '联系电话',order: 2,view: 'text', type: 'string',}, tel: { title: '联系电话', order: 2, view: 'text', type: 'string' },
status: {title: '状态 1审核中 2审核完成 3驳回 ',order: 3,view: 'list', type: 'string',dictCode: '',}, status: { title: '状态 1审核中 2审核完成 3驳回 ', order: 3, view: 'list', type: 'string', dictCode: '' },
createTime: {title: '创建日期',order: 5,view: 'datetime', type: 'string',}, createTime: { title: '创建日期', order: 5, view: 'datetime', type: 'string' },
izEntry: {title: '机构是否入驻0否 1是(是否入驻过)',order: 7,view: 'list', type: 'string',dictCode: '',}, izEntry: { title: '机构是否入驻0否 1是(是否入驻过)', order: 7, view: 'list', type: 'string', dictCode: '' },
name: {title: '咨询人姓名',order: 8,view: 'text', type: 'string',}, name: { title: '咨询人姓名', order: 8, view: 'text', type: 'string' },
sex: {title: '性别',order: 9,view: 'text', type: 'string',}, sex: { title: '性别', order: 9, view: 'text', type: 'string' },
orgAddress: {title: '机构地址',order: 24,view: 'text', type: 'string',}, orgAddress: { title: '机构地址', order: 24, view: 'text', type: 'string' },
orgLeaderPhone: {title: '机构负责人电话',order: 27,view: 'text', type: 'string',}, orgLeaderPhone: { title: '机构负责人电话', order: 27, view: 'text', type: 'string' },
orgPropertyType: {title: '机构房屋性质',order: 29,view: 'text', type: 'string',}, orgPropertyType: { title: '机构房屋性质', order: 29, view: 'text', type: 'string' },
orgBuildingArea: {title: '机构建筑面积',order: 30,view: 'number', type: 'number',}, orgBuildingArea: { title: '机构建筑面积', order: 30, view: 'number', type: 'number' },
}; };

View File

@ -187,7 +187,8 @@ function getTableAction(record) {
{ {
label: '审批', label: '审批',
onClick: handleEdit.bind(null, record), onClick: handleEdit.bind(null, record),
auth: 'orgapplyinfo:nu_org_apply_info:edit' auth: 'orgapplyinfo:nu_org_apply_info:edit',
disabled: record.status == '0' || record.status == '2'
}, },
]; ];
} }

View File

@ -111,13 +111,13 @@
<a-col :span="12"> <a-col :span="12">
<a-form-item label="身份证正面" v-bind="validateInfos.cardZmPath" id="OrgApplyInfoForm-cardZmPath" <a-form-item label="身份证正面" v-bind="validateInfos.cardZmPath" id="OrgApplyInfoForm-cardZmPath"
name="cardZmPath"> name="cardZmPath">
<a-input v-model:value="formData.cardZmPath" placeholder="请输入身份证正面" allow-clear></a-input> <JImageUpload :fileMax="1" v-model:value="formData.cardZmPath"></JImageUpload>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="身份证反面" v-bind="validateInfos.cardFmPath" id="OrgApplyInfoForm-cardFmPath" <a-form-item label="身份证反面" v-bind="validateInfos.cardFmPath" id="OrgApplyInfoForm-cardFmPath"
name="cardFmPath"> name="cardFmPath">
<a-input v-model:value="formData.cardFmPath" placeholder="请输入身份证反面" allow-clear></a-input> <JImageUpload :fileMax="1" v-model:value="formData.cardFmPath"></JImageUpload>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -126,7 +126,7 @@
<a-col :span="12"> <a-col :span="12">
<a-form-item label="营业执照照片" v-bind="validateInfos.comBusinessLicense" <a-form-item label="营业执照照片" v-bind="validateInfos.comBusinessLicense"
id="OrgApplyInfoForm-comBusinessLicense" name="comBusinessLicense"> id="OrgApplyInfoForm-comBusinessLicense" name="comBusinessLicense">
<a-input v-model:value="formData.comBusinessLicense" placeholder="请输入营业执照照片" allow-clear></a-input> <JImageUpload :fileMax="1" v-model:value="formData.comBusinessLicense"></JImageUpload>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -179,12 +179,12 @@
<a-input v-model:value="formData.orgLeaderPhone" placeholder="请输入机构负责人电话" allow-clear></a-input> <a-input v-model:value="formData.orgLeaderPhone" placeholder="请输入机构负责人电话" allow-clear></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <!-- <a-col :span="12">
<a-form-item label="机构楼宇牌号" v-bind="validateInfos.orgBuildingNumber" <a-form-item label="机构楼宇牌号" v-bind="validateInfos.orgBuildingNumber"
id="OrgApplyInfoForm-orgBuildingNumber" name="orgBuildingNumber"> id="OrgApplyInfoForm-orgBuildingNumber" name="orgBuildingNumber">
<a-input v-model:value="formData.orgBuildingNumber" placeholder="请输入机构楼宇牌号" allow-clear></a-input> <a-input v-model:value="formData.orgBuildingNumber" placeholder="请输入机构楼宇牌号" allow-clear></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col> -->
<a-col :span="12"> <a-col :span="12">
<a-form-item label="机构房屋性质" v-bind="validateInfos.orgPropertyType" id="OrgApplyInfoForm-orgPropertyType" <a-form-item label="机构房屋性质" v-bind="validateInfos.orgPropertyType" id="OrgApplyInfoForm-orgPropertyType"
name="orgPropertyType"> name="orgPropertyType">
@ -217,6 +217,7 @@ import { saveOrUpdate } from '../OrgApplyInfo.api';
import { Form } from 'ant-design-vue'; import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue'; import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import TencentMap from '/@/components/TencentMap/TencentMap.vue'; import TencentMap from '/@/components/TencentMap/TencentMap.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
const props = defineProps({ const props = defineProps({
formDisabled: { type: Boolean, default: false }, formDisabled: { type: Boolean, default: false },

View File

@ -69,50 +69,11 @@ export const columns: BasicColumn[] = [
} }
}, },
}, },
// {
// title: '收费价格',
// align: 'center',
// dataIndex: 'tollPrice',
// width: 100,
// },
// {
// title: '提成价格',
// align: "center",
// dataIndex: 'comPrice'
// },
// {
// title: '医保报销',
// align: 'center',
// dataIndex: 'izReimbursement_dictText',
// width: 100,
// },
// {
// title: '机构优惠',
// align: 'center',
// dataIndex: 'izPreferential_dictText',
// width: 100,
// },
// {
// title: '收费频次',
// align: 'center',
// dataIndex: 'chargingFrequency_dictText',
// },
{ {
title: '周期类型', title: '周期类型',
align: 'center', align: 'center',
dataIndex: 'cycleType_dictText', dataIndex: 'cycleType_dictText',
}, },
// {
// title: '排序',
// align: "center",
// sorter: true,
// dataIndex: 'sort'
// },
// {
// title: '服务说明',
// align: "center",
// dataIndex: 'serviceContent'
// },
{ {
title: '服务时长(分钟)', title: '服务时长(分钟)',
align: 'center', align: 'center',
@ -125,49 +86,15 @@ export const columns: BasicColumn[] = [
dataIndex: 'izEnabled_dictText', dataIndex: 'izEnabled_dictText',
width: 100, width: 100,
}, },
{
title: '语音文件',
align: 'center',
dataIndex: 'mp3File',
},
{
title: '视频文件',
align: 'center',
dataIndex: 'mp4File',
},
// {
// title: '创建人',
// align: "center",
// dataIndex: 'createBy'
// },
// {
// title: '创建日期',
// align: "center",
// sorter: true,
// dataIndex: 'createTime'
// },
// {
// title: '更新人',
// align: "center",
// dataIndex: 'updateBy'
// },
// {
// title: '更新日期',
// align: "center",
// sorter: true,
// dataIndex: 'updateTime'
// },
{ {
title: '预览图片', title: '预览图片',
align: 'center', align: 'center',
dataIndex: 'previewFile', dataIndex: 'previewFileMedia',
customRender: render.renderImage,
}, },
{ {
title: '即时指令图片', title: '即时指令图片',
align: 'center', align: 'center',
dataIndex: 'immediateFile', dataIndex: 'immediateFileMedia',
customRender: render.renderImage,
}, },
]; ];

View File

@ -8,22 +8,18 @@
</template> </template>
<template v-slot:bodyCell="{ column, record, index, text }"> <template v-slot:bodyCell="{ column, record, index, text }">
<template v-if="column.dataIndex === 'mp3File'"> <template v-if="column.dataIndex === 'previewFileMedia'">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<audio controls v-else style="width: 100%; max-width: 300px; height: 40px;"> <img v-else :src="testOrgInfo.url + text" style="max-height: 50px;max-width: 80px;">
<source :src="getFileAccessHttpUrl(text)">
</audio>
</template> </template>
<template v-if="column.dataIndex === 'mp4File'"> <template v-if="column.dataIndex === 'immediateFileMedia'">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<template v-else> <img v-else :src="testOrgInfo.url + text" style="max-height: 50px;max-width: 80px;">
<a-button type="primary" @click="openVideoModal(text)">播放视频</a-button>
</template>
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
<ConfigServiceDirectiveModal ref="registerModal" @success="handleSuccess"></ConfigServiceDirectiveModal> <ConfigServiceDirectiveModal ref="registerModal" :testOrgInfo="testOrgInfo" @success="handleSuccess"></ConfigServiceDirectiveModal>
<a-modal v-model:visible="showVideoModal" title="视频播放" :footer="null" @cancel="closeVideoModal" <a-modal v-model:visible="showVideoModal" title="视频播放" :footer="null" @cancel="closeVideoModal"
:bodyStyle="{ padding: '0', maxHeight: '80vh', overflow: 'auto' }"> :bodyStyle="{ padding: '0', maxHeight: '80vh', overflow: 'auto' }">
@ -52,6 +48,10 @@ const props = defineProps({
initialDataIds: { // ID initialDataIds: { // ID
type: Array, type: Array,
default: () => [] default: () => []
},
testOrgInfo: {//
type: Object,
default: () => ({})
} }
}); });
@ -126,10 +126,10 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
}, },
beforeFetch: async (params) => { beforeFetch: async (params) => {
Object.assign(params, props.queryParams); Object.assign(params, props.queryParams);
params.dataSourceCode = 'A002'; params.dataSourceCode = import.meta.env.VITE_SYTJGBM;
params.column = 'createTime' params.column = 'createTime'
params.order = 'desc' params.order = 'desc'
params.selectedRowIds = Array.from(selectedRowIds.value) params.selectedRowIds = Array.from(selectedRowIds.value)
return params; return params;
}, },
}, },
@ -222,8 +222,8 @@ const getAllData = async (queryParams) => {
const params = { const params = {
...queryParams, ...queryParams,
pageNo: 1, pageNo: 1,
pageSize: 9999, // pageSize: -1,
dataSourceCode: 'A002', dataSourceCode: import.meta.env.VITE_SYTJGBM,
column: 'createTime', column: 'createTime',
order: 'desc' order: 'desc'
}; };

View File

@ -8,15 +8,14 @@
<a-col :span="12"> <a-col :span="12">
<a-form-item label="分类标签" v-bind="validateInfos.instructionTagId" <a-form-item label="分类标签" v-bind="validateInfos.instructionTagId"
id="ConfigServiceDirectiveForm-instructionTagId" name="instructionTagId"> id="ConfigServiceDirectiveForm-instructionTagId" name="instructionTagId">
<j-dict-select-tag v-model:value="formData.instructionTagId" v-if="showJMCom" :orgCode="orgCodeParam" <j-dict-select-tag v-model:value="formData.instructionTagId" :orgCode="orgCodeParam"
dictCode="instruction_tag" placeholder="请选择分类标签" allowClear /> dictCode="instruction_tag" placeholder="请选择分类标签" allowClear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="服务类别" v-bind="validateInfos.categoryId" id="ConfigServiceDirectiveForm-categoryId" <a-form-item label="服务类别" v-bind="validateInfos.categoryId" id="ConfigServiceDirectiveForm-categoryId"
name="categoryId"> name="categoryId">
<j-dict-select-tag type="list" v-model:value="formData.categoryId" v-if="showJMCom" <j-dict-select-tag type="list" v-model:value="formData.categoryId" :orgCode="orgCodeParam"
:orgCode="orgCodeParam"
:dictCode="`nu_config_service_category,category_name,id,del_flag = 0 order by sort asc`" :dictCode="`nu_config_service_category,category_name,id,del_flag = 0 order by sort asc`"
placeholder="请选择服务类别" allow-clear /> placeholder="请选择服务类别" allow-clear />
</a-form-item> </a-form-item>
@ -24,7 +23,7 @@
<a-col :span="12"> <a-col :span="12">
<a-form-item label="服务类型" v-bind="validateInfos.typeId" id="ConfigServiceDirectiveForm-typeId" <a-form-item label="服务类型" v-bind="validateInfos.typeId" id="ConfigServiceDirectiveForm-typeId"
name="typeId"> name="typeId">
<j-dict-select-tag type="list" v-model:value="formData.typeId" :dictCode="typeDictCode" v-if="showJMCom" <j-dict-select-tag type="list" v-model:value="formData.typeId" :dictCode="typeDictCode"
:orgCode="orgCodeParam" placeholder="请选择服务类型" allowClear /> :orgCode="orgCodeParam" placeholder="请选择服务类型" allowClear />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -51,22 +50,22 @@
<a-col :span="12"> <a-col :span="12">
<a-form-item label="医保报销" v-bind="validateInfos.izReimbursement" <a-form-item label="医保报销" v-bind="validateInfos.izReimbursement"
id="ConfigServiceDirectiveForm-izReimbursement" name="izReimbursement"> id="ConfigServiceDirectiveForm-izReimbursement" name="izReimbursement">
<j-dict-select-tag type='radio' v-model:value="formData.izReimbursement" v-if="showJMCom" <j-dict-select-tag type='radio' v-model:value="formData.izReimbursement" :orgCode="orgCodeParam"
:orgCode="orgCodeParam" dictCode="med_ins_reimb" allowClear /> dictCode="med_ins_reimb" allowClear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="机构优惠" v-bind="validateInfos.izPreferential" <a-form-item label="机构优惠" v-bind="validateInfos.izPreferential"
id="ConfigServiceDirectiveForm-izPreferential" name="izPreferential"> id="ConfigServiceDirectiveForm-izPreferential" name="izPreferential">
<j-dict-select-tag type='radio' v-model:value="formData.izPreferential" v-if="showJMCom" <j-dict-select-tag type='radio' v-model:value="formData.izPreferential" :orgCode="orgCodeParam"
:orgCode="orgCodeParam" dictCode="institutional_discount" allowClear /> dictCode="institutional_discount" allowClear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="周期类型" v-bind="validateInfos.cycleType" id="ConfigServiceDirectiveForm-cycleType" <a-form-item label="周期类型" v-bind="validateInfos.cycleType" id="ConfigServiceDirectiveForm-cycleType"
name="cycleType"> name="cycleType">
<j-dict-select-tag type="list" v-model:value="formData.cycleType" v-if="showJMCom" <j-dict-select-tag type="list" v-model:value="formData.cycleType" :orgCode="orgCodeParam"
:orgCode="orgCodeParam" dictCode="period_type" placeholder="请选择周期类型" allowClear /> dictCode="period_type" placeholder="请选择周期类型" allowClear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -84,81 +83,40 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<!-- <a-col :span="12">
<a-form-item label="排序" v-bind="validateInfos.sort" id="ConfigServiceDirectiveForm-sort" name="sort">
<a-input-number v-model:value="formData.sort" placeholder="请输入排序" style="width: 100%" />
</a-form-item>
</a-col> -->
<a-col :span="24"> <a-col :span="24">
<a-form-item label="体型标签" id="ConfigServiceDirectiveForm-typeId" :labelCol="labelCol2" <a-form-item label="体型标签" id="ConfigServiceDirectiveForm-typeId" :labelCol="labelCol2"
:wrapperCol="wrapperCol2" name="typeId"> :wrapperCol="wrapperCol2" name="typeId">
<JCheckbox v-model:value="formData.bodyTags" v-if="showJMCom" :orgCode="orgCodeParam" <JCheckbox v-model:value="formData.bodyTags" :orgCode="orgCodeParam"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = 0 order by sort asc`" /> :dictCode="`nu_config_body_tag,tag_name,id,del_flag = 0 order by sort asc`" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="情绪标签" :labelCol="labelCol2" :wrapperCol="wrapperCol2" name="emoTags"> <a-form-item label="情绪标签" :labelCol="labelCol2" :wrapperCol="wrapperCol2" name="emoTags">
<JCheckbox v-model:value="formData.emotionTags" v-if="showJMCom" :orgCode="orgCodeParam" <JCheckbox v-model:value="formData.emotionTags" :orgCode="orgCodeParam"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = 0 order by sort asc`" /> :dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = 0 order by sort asc`" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="ConfigServiceDirectiveForm-izEnabled" <a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="ConfigServiceDirectiveForm-izEnabled"
name="izEnabled"> name="izEnabled">
<j-dict-select-tag type='radio' v-model:value="formData.izEnabled" v-if="showJMCom" <j-dict-select-tag type='radio' v-model:value="formData.izEnabled" :orgCode="orgCodeParam"
:orgCode="orgCodeParam" dictCode="iz_enabled" placeholder="请选择是否启用"  allowClear /> dictCode="iz_enabled" placeholder="请选择是否启用"  allowClear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- <a-col :span="12">
<a-form-item label="创建人" v-bind="validateInfos.createBy" id="ConfigServiceDirectiveForm-createBy"
name="createBy">
<a-input v-model:value="formData.createBy" placeholder="请输入创建人" disabled allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="创建日期" v-bind="validateInfos.createTime" id="ConfigServiceDirectiveForm-createTime"
name="createTime">
<a-date-picker placeholder="请选择创建日期" v-model:value="formData.createTime" showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="更新人" v-bind="validateInfos.updateBy" id="ConfigServiceDirectiveForm-updateBy"
name="updateBy">
<a-input v-model:value="formData.updateBy" placeholder="请输入更新人" disabled allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="更新日期" v-bind="validateInfos.updateTime" id="ConfigServiceDirectiveForm-updateTime"
name="updateTime">
<a-date-picker placeholder="请选择更新日期" v-model:value="formData.updateTime" showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled allow-clear />
</a-form-item>
</a-col> -->
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="预览图片" v-bind="validateInfos.previewFile"> <a-form-item label="预览图片">
<JImageUpload :fileMax="1" v-model:value="formData.previewFile"></JImageUpload> <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-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="即时指令图片" v-bind="validateInfos.immediateFile"> <a-form-item label="即时指令图片" v-bind="validateInfos.immediateFile">
<JImageUpload :fileMax="1" v-model:value="formData.immediateFile"></JImageUpload> <span v-if="!formData.immediateFileMedia" style="font-size: 12px;font-style: italic;">无文件</span>
</a-form-item> <img v-else :src="testOrgInfo.url + formData.immediateFileMedia"
</a-col> style="max-height: 100px;max-width: 100px;">
</a-row>
<a-row>
<a-col :span="12">
<a-form-item label="语音文件" v-bind="validateInfos.mp3File" id="ConfigServiceDirectiveForm-mp3File"
name="mp3File">
<j-upload v-model:value="formData.mp3File" accept=".mp3" :disabled="true" :maxCount="1"></j-upload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="视频文件" v-bind="validateInfos.mp4File" id="ConfigServiceDirectiveForm-mp4File"
name="mp4File">
<j-upload v-model:value="formData.mp4File" accept=".mp4" :disabled="true" :maxCount="1"></j-upload>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -170,17 +128,17 @@
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="ConfigServiceDirectiveForm"> name="ConfigServiceDirectiveForm">
<a-row> <a-row>
<a-col :span="12" v-if="!!formData.mp3File"> <a-col :span="12" v-if="!!formData.mp3FileMedia">
<a-form-item label="语音预览" id="ConfigServiceDirectiveForm-mp3File" name="mp3File"> <a-form-item label="语音预览">
<audio controls disabled="false"> <audio controls disabled="false">
<source :src="getFileAccessHttpUrl(formData.mp3File)"> <source :src="testOrgInfo.url + formData.mp3FileMedia">
</audio> </audio>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12" v-if="!!formData.mp4File" :push="!!formData.mp3File ? 0 : 12"> <a-col :span="12" v-if="!!formData.mp4FileMedia" :push="!!formData.mp3FileMedia ? 0 : 12">
<a-form-item label="视频预览" id="ConfigServiceDirectiveForm-mp4File" name="mp4File"> <a-form-item label="视频预览">
<video controls> <video controls>
<source :src="getFileAccessHttpUrl(formData.mp4File)"> <source :src="testOrgInfo.url + formData.mp4FileMedia">
</video> </video>
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -192,8 +150,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted, watch, onBeforeMount } from 'vue'; import { ref, reactive, defineExpose, nextTick, defineProps, computed, watch } from 'vue';
import { initDictOptions } from '/@/utils/dict';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { JCheckbox } from '/@/components/Form'; import { JCheckbox } from '/@/components/Form';
@ -205,18 +162,16 @@ import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue'; import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'; import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
const orgCodeParam = ref('') const orgCodeParam = import.meta.env.VITE_SYTJGBM
const showJMCom = ref(false)
onBeforeMount(async () => {
const dictData = await initDictOptions('org_code')
orgCodeParam.value = dictData.filter(d => d.text == 'shi_yan_tian')[0].value
showJMCom.value = true
})
const props = defineProps({ const props = defineProps({
formDisabled: { type: Boolean, default: false }, formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) }, formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true } formBpm: { type: Boolean, default: true },
testOrgInfo: {//
type: Object,
default: () => ({})
}
}); });
const formRef = ref(); const formRef = ref();
const useForm = Form.useForm; const useForm = Form.useForm;
@ -245,6 +200,10 @@ const formData = reactive<Record<string, any>>({
mp4File: '', mp4File: '',
previewFile: '', previewFile: '',
immediateFile: '', immediateFile: '',
previewFileMedia: '',
immediateFileMedia: '',
mp3FileMedia: '',
mp4FileMedia: '',
}); });
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } }); const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });

View File

@ -1,78 +1,87 @@
<template> <template>
<j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭" :maskClosable="false"> <j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk"
<ConfigServiceDirectiveForm ref="registerForm" v-if="visible" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ConfigServiceDirectiveForm> :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> </j-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue'; import { ref, nextTick, defineExpose } from 'vue';
import ConfigServiceDirectiveForm from './ConfigServiceDirectiveForm.vue' import ConfigServiceDirectiveForm from './ConfigServiceDirectiveForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue'; import JModal from '/@/components/Modal/src/JModal/JModal.vue';
import { array } from 'vue-types'; 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 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,
function add() { default: () => ({})
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() { function add() {
handleCancel(); title.value = '新增';
emit('success'); visible.value = true;
} nextTick(() => {
registerForm.value.add();
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
}); });
}
/**
* 编辑
* @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> </script>
<style lang="less"> <style lang="less">
/**隐藏样式-modal确定按钮 */ /**隐藏样式-modal确定按钮 */
.jee-hidden { .jee-hidden {
display: none !important; display: none !important;
} }
</style> </style>
<style lang="less" scoped></style> <style lang="less" scoped></style>

File diff suppressed because it is too large Load Diff

View File

@ -1,327 +0,0 @@
<template>
<SyncComponent ref="syncComRef" :selectedSize="Array.from(selectedItems.values()).length"
@changeShowJMCom="changeShowJMCom" @sourceOrgCodeChanged="sourceOrgCodeChanged"
@viewTypeChanged="viewTypeChanged" @orgChanged="orgChanged">
<!-- 表单 -->
<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="categoryId">
<template #label><span title="服务类别">服务类别</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.categoryId" v-if="showJMCom"
:orgCode="sourceOrgCode"
:dictCode="`nu_config_service_category,category_name,id,del_flag = 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" v-if="showJMCom"
:orgCode="sourceOrgCode"
:dictCode="`nu_config_service_type,type_name,id,del_flag = 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="instructionTagId">
<template #label><span title="分类标签">分类标签</span></template>
<j-dict-select-tag v-model:value="queryParam.instructionTagId" v-if="showJMCom"
:orgCode="sourceOrgCode" dictCode="instruction_tag" :ignoreDisabled="true"
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" v-if="showJMCom"
:orgCode="sourceOrgCode"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = '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" v-if="showJMCom"
:orgCode="sourceOrgCode"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = '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 @select-change="handleSelectChange" ref="listComRef" :queryParams="queryParam"
:initialDataIds="initialDataIds" />
</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 === 'previewFile'">
<span v-if="!record.previewFile" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getFileAccessHttpUrl(record.previewFile)"
style="max-width: 100px; max-height: 60px;" />
</template>
<template v-else-if="column.dataIndex === 'immediateFile'">
<span v-if="!record.immediateFile" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getFileAccessHttpUrl(record.immediateFile)"
style="max-width: 100px; max-height: 60px;" />
</template>
</template>
</a-table>
</template>
</SyncComponent>
<a-modal v-model:visible="showVideoModal" title="视频播放" :footer="null" @cancel="closeVideoModal"
:bodyStyle="{ padding: '0', 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">
//
import { ref, reactive } 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 { list, asyncFunc } from '@/views/services/serviceDirective/ConfigServiceDirective.api';
import ConfigServiceDirectiveList from '@/views/services/serviceDirective/ConfigServiceDirectiveList.vue'
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'
import { selectedColumns } from './org.data';
//
// >>>>>>>>>>>>>
const { createMessage } = useMessage();
const syncComRef = ref(null)
const sourceOrgCode = ref('')
const showJMCom = ref(false)
const labelCol = reactive({
xs: 24,
sm: 4,
xl: 6,
xxl: 5
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
/**
* 获取到了试验田的机构编码
* @param v_
*/
const sourceOrgCodeChanged = (v_) => {
sourceOrgCode.value = v_
}
/**
* 是否展示设计dict的cj框架封装的组件因为需要获取的是对应试验田的数据字典当接口数据请求未返回时如果展示组件会报错
* 跟sourceOrgCodeChanged方法相配合
* @param v_
*/
const changeShowJMCom = (v_) => {
showJMCom.value = v_
}
// <<<<<<<<<<<<<
/**
* 机构变更
*/
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.value?.operationStartTime || new Date() >= new Date(syncComRef.value.orgData.value?.operationStartTime)) {
initialDataIds.value.push(record.id);
}
});
//
listComRef.value?.updateSelection?.(newRecords);
} else {
//
selectedItems.value.clear();
listComRef.value?.updateSelection?.([]);
}
//
syncComRef.value.resetOrgSelectedCon(false);
console.log("🌊 ~ orgChanged ~ selectedItems.value:", selectedItems.value)
} catch (err) {
console.error('机构数据查询失败:', err);
createMessage.error('机构数据查询失败');
//
selectedItems.value.clear();
listComRef.value?.updateSelection?.([]);
}
}
// >>>>>>>>>>>>>
// <<<<<<<<<<<<<
// >>>>>>>>>>>>>
const listComRef = ref();
const selectedItems = ref(new Map<string | number, any>());
const queryParam = ref({ viewType: 'all' })//
const initialDataIds = ref<string[]>([]);
const showVideoModal = ref(false);
const videoUrl = ref('');
/**
* 查询
*/
function searchQuery() {
listComRef.value.reload();
}
/**
* 重置
*/
function searchReset() {
let vt = queryParam.value.viewType
queryParam.value = { viewType: vt }
listComRef.value?.reload();
}
/**
* 源数据的全部已选择未选择变更时触发
* @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 = '';
};
// <<<<<<<<<<<<<
</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

@ -55,28 +55,16 @@ export const selectedColumns = [
dataIndex: 'izEnabled_dictText', dataIndex: 'izEnabled_dictText',
width: 100, width: 100,
}, },
{
title: '语音文件',
align: 'center',
dataIndex: 'mp3File',
width: 200, // 添加固定宽度
},
{
title: '视频文件',
align: 'center',
dataIndex: 'mp4File',
width: 120, // 添加固定宽度
},
{ {
title: '预览图片', title: '预览图片',
align: 'center', align: 'center',
dataIndex: 'previewFile', dataIndex: 'previewFileMedia',
width: 120, // 添加固定宽度 width: 120, // 添加固定宽度
}, },
{ {
title: '即时指令图片', title: '即时指令图片',
align: 'center', align: 'center',
dataIndex: 'immediateFile', dataIndex: 'immediateFileMedia',
width: 150, // 添加固定宽度 width: 150, // 添加固定宽度
}, },
{ {

View File

@ -74,10 +74,18 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
field: 'orgCode', field: 'orgCode',
show: false, show: false,
}, },
{
field: 'url',
show: !isChild,
},
{ {
field: 'orgCategory', field: 'orgCategory',
componentProps: { options: categoryOptions }, componentProps: { options: categoryOptions },
}, },
{
field: 'payableAmount',
show: !isChild,
},
]); ]);
let record = unref(data?.record); let record = unref(data?.record);

View File

@ -2,7 +2,7 @@
<a-card :bordered="false" style="height: 100%"> <a-card :bordered="false" style="height: 100%">
<div class="j-table-operator" style="width: 100%"> <div class="j-table-operator" style="width: 100%">
<a-button type="primary" preIcon="ant-design:plus-outlined" @click="onAddDepart">新增机构</a-button> <a-button type="primary" preIcon="ant-design:plus-outlined" @click="onAddDepart">新增机构</a-button>
<a-button type="primary" preIcon="ant-design:plus-outlined" @click="onAddChildDepart()">新增区域</a-button> <a-button type="primary" preIcon="ant-design:plus-outlined" @click="onAddChildDepart()">新增部门</a-button>
<!-- <a-upload name="file" :showUploadList="false" :customRequest="onImportXls"> <!-- <a-upload name="file" :showUploadList="false" :customRequest="onImportXls">
<a-button type="primary" preIcon="ant-design:import-outlined">导入</a-button> <a-button type="primary" preIcon="ant-design:import-outlined">导入</a-button>
</a-upload> </a-upload>

View File

@ -3,31 +3,34 @@ import { FormSchema } from '/@/components/Form';
// 部门基础表单 // 部门基础表单
export function useBasicFormSchema() { export function useBasicFormSchema() {
const basicFormSchema: FormSchema[] = [ const basicFormSchema: FormSchema[] = [
{
field: 'departName',
label: '名称',
component: 'Input',
componentProps: {
placeholder: '请输入机构/部门名称',
},
rules: [{ required: true, message: '机构名称不能为空' }],
},
{ {
field: 'parentId', field: 'parentId',
label: '上级', label: '上级',
component: 'TreeSelect', component: 'TreeSelect',
ifShow: (v_) => {
return !!v_.values.parentId;
},
componentProps: { componentProps: {
treeData: [], treeData: [],
placeholder: '无', placeholder: '无',
dropdownStyle: { maxHeight: '200px', overflow: 'auto' }, dropdownStyle: { maxHeight: '200px', overflow: 'auto' },
}, },
}, },
{
field: 'departName',
label: '名称',
component: 'Input',
componentProps: {
placeholder: '请输入名称',
},
rules: [{ required: true, message: '名称不能为空' }],
},
{ {
field: 'orgCode', field: 'orgCode',
label: '编码', label: '编码',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入机构编码', placeholder: '请输入编码',
}, },
}, },
{ {
@ -36,41 +39,83 @@ export function useBasicFormSchema() {
component: 'RadioButtonGroup', component: 'RadioButtonGroup',
componentProps: { options: [] }, componentProps: { options: [] },
}, },
{
field: 'url',
label: '协议域名',
component: 'Input',
ifShow: (v_) => {
return !v_.values.parentId;
},
componentProps: {
placeholder: '请输入协议域名',
},
},
{ {
field: 'province', field: 'province',
label: '省份', label: '省份',
component: 'Input', component: 'Input',
ifShow: (v_) => {
return !v_.values.parentId;
},
slot: 'province', slot: 'province',
}, },
{ {
field: 'city', field: 'city',
label: '城市', label: '城市',
component: 'Input', component: 'Input',
ifShow: (v_) => {
return !v_.values.parentId;
},
slot: 'city', slot: 'city',
}, },
{ {
field: 'district', field: 'district',
label: '区县', label: '区县',
component: 'Input', component: 'Input',
ifShow: (v_) => {
return !v_.values.parentId;
},
slot: 'district', slot: 'district',
}, },
{ {
field: 'platType', field: 'platType',
label: '业务平台类型', label: '业务平台类型',
defaultValue:'ywjg', defaultValue: 'ywjg',
component: 'JDictSelectTag', component: 'JDictSelectTag',
componentProps: { ifShow: (v_) => {
dictCode: 'iz_test_site' return !v_.values.parentId;
}, },
rules:[{ componentProps: {
required: true, dictCode: 'iz_test_site',
message: '请选择平台类型' },
}] rules: [
{
required: true,
message: '请选择平台类型',
},
],
},
{
field: 'payableAmount',
label: '入住应缴金额',
component: 'InputNumber',
ifShow: (v_) => {
return !v_.values.parentId;
},
rules: [
{
required: true,
message: '请填写护理单元长者入住应缴金额',
},
],
}, },
{ {
field: 'operationStartTime', field: 'operationStartTime',
label: '运营开始时间', label: '运营开始时间',
component: 'DatePicker', component: 'DatePicker',
ifShow: (v_) => {
return !v_.values.parentId;
},
componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
style: { style: {
@ -82,6 +127,9 @@ export function useBasicFormSchema() {
field: 'operationEndTime', field: 'operationEndTime',
label: '运营到期时间', label: '运营到期时间',
component: 'DatePicker', component: 'DatePicker',
ifShow: (v_) => {
return !v_.values.parentId;
},
componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
style: { style: {
@ -93,6 +141,9 @@ export function useBasicFormSchema() {
field: 'contractStartTime', field: 'contractStartTime',
label: '合同开始时间', label: '合同开始时间',
component: 'DatePicker', component: 'DatePicker',
ifShow: (v_) => {
return !v_.values.parentId;
},
componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
style: { style: {
@ -104,6 +155,9 @@ export function useBasicFormSchema() {
field: 'contractEndTime', field: 'contractEndTime',
label: '合同到期时间', label: '合同到期时间',
component: 'DatePicker', component: 'DatePicker',
ifShow: (v_) => {
return !v_.values.parentId;
},
componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
style: { style: {
@ -131,6 +185,9 @@ export function useBasicFormSchema() {
field: 'address', field: 'address',
label: '地址', label: '地址',
component: 'Input', component: 'Input',
ifShow: (v_) => {
return !v_.values.parentId;
},
componentProps: { componentProps: {
placeholder: '请输入地址', placeholder: '请输入地址',
}, },
@ -153,6 +210,9 @@ export function useBasicFormSchema() {
field: 'picUrl', field: 'picUrl',
label: '机构图片', label: '机构图片',
component: 'JImageUpload', component: 'JImageUpload',
ifShow: (v_) => {
return !v_.values.parentId;
},
}, },
]; ];
return { basicFormSchema }; return { basicFormSchema };
@ -163,9 +223,7 @@ export const orgCategoryOptions = {
// 一级部门 // 一级部门
root: [{ value: '1', label: '机构' }], root: [{ value: '1', label: '机构' }],
// 子级部门 // 子级部门
child: [ child: [{ value: '2', label: '部门' }],
{ value: '2', label: '区域' },
],
}; };
export const tplinkUseFormSchema: FormSchema[] = [ export const tplinkUseFormSchema: FormSchema[] = [
@ -180,7 +238,7 @@ export const tplinkUseFormSchema: FormSchema[] = [
label: '所属机构', label: '所属机构',
component: 'Input', component: 'Input',
required: true, required: true,
dynamicDisabled: true dynamicDisabled: true,
}, },
{ {
field: 'tumsProjectId', field: 'tumsProjectId',
@ -194,7 +252,7 @@ export const tplinkUseFormSchema: FormSchema[] = [
label: '所属项目', label: '所属项目',
component: 'Input', component: 'Input',
required: true, required: true,
dynamicDisabled: true dynamicDisabled: true,
}, },
{ {
field: 'tumsUsername', field: 'tumsUsername',
@ -213,7 +271,8 @@ export const tplinkUseFormSchema: FormSchema[] = [
message: '请输入登录密码', message: '请输入登录密码',
}, },
{ {
pattern: /^(?!.*(.)\1{2})(?=(?:.*[0-9].*[A-Z])|(?:.*[0-9].*[a-z])|(?:.*[0-9].*[~!@#$%^&*()_+={[}\]|\\:;'"<,>.?/ -])|(?:.*[A-Z].*[a-z])|(?:.*[A-Z].*[~!@#$%^&*()_+={[}\]|\\:;'"<,>.?/ -])|(?:.*[a-z].*[~!@#$%^&*()_+={[}\]|\\:;'"<,>.?/ -]))[0-9A-Za-z~!@#$%^&*()_+={[}\]|\\:;'"<,>.?/ -]{8,64}$/, pattern:
/^(?!.*(.)\1{2})(?=(?:.*[0-9].*[A-Z])|(?:.*[0-9].*[a-z])|(?:.*[0-9].*[~!@#$%^&*()_+={[}\]|\\:;'"<,>.?/ -])|(?:.*[A-Z].*[a-z])|(?:.*[A-Z].*[~!@#$%^&*()_+={[}\]|\\:;'"<,>.?/ -])|(?:.*[a-z].*[~!@#$%^&*()_+={[}\]|\\:;'"<,>.?/ -]))[0-9A-Za-z~!@#$%^&*()_+={[}\]|\\:;'"<,>.?/ -]{8,64}$/,
message: '密码由8位数字、大小写字母和特殊符号组成!', message: '密码由8位数字、大小写字母和特殊符号组成!',
}, },
], ],