This commit is contained in:
yangjun 2025-10-09 14:53:20 +08:00
commit 7a6d6dc85d
18 changed files with 998 additions and 920 deletions

View File

@ -6,7 +6,7 @@ VITE_PUBLIC_PATH = /
# 跨域代理,您可以配置多个 ,请注意,没有换行符
VITE_PROXY = [["/nursing-unit_101","http://localhost:8091/nursing-unit_101"],["/upload","http://localhost:3300/upload"]]
VITE_PROXY = [["/nursing-unit_101","http://localhost:8091/nursing-unit_101"],["/upload","http://localhost:3300/upload"],["/opeexup","http://localhost:8081/opeapi/"]]
#后台接口全路径地址(必填)
VITE_GLOB_DOMAIN_URL=http://localhost:8091/nursing-unit_101
@ -20,6 +20,9 @@ VITE_GLOB_API_URL_PREFIX=
#微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
VITE_APP_SUB_jeecg-app-1 = '//localhost:8091'
# 管理平台静态资源路径
VITE_OPE_MEDIA_ADDRESS = 'https://www.focusnu.com/media/upFiles/'
# 长者标签-体型标签默认图片
VITE_DEFAULT_ELDER_TAG_BODY_PIC = 'https://www.focusnu.com/media/default/bodyDefault.png'
# 长者标签-情绪标签默认图片

View File

@ -6,7 +6,7 @@ VITE_PUBLIC_PATH = /
# 跨域代理,您可以配置多个 ,请注意,没有换行符
VITE_PROXY = [["/nursing-unit_102","http://localhost:8092/nursing-unit_102"],["/upload","http://localhost:3300/upload"]]
VITE_PROXY = [["/nursing-unit_102","http://localhost:8092/nursing-unit_102"],["/upload","http://localhost:3300/upload"],["/opeexup","http://localhost:8081/opeapi/"]]
#后台接口全路径地址(必填)
VITE_GLOB_DOMAIN_URL=http://localhost:8092/nursing-unit_102
@ -20,6 +20,9 @@ VITE_GLOB_API_URL_PREFIX=
#微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
VITE_APP_SUB_jeecg-app-1 = '//localhost:8092'
# 管理平台静态资源路径
VITE_OPE_MEDIA_ADDRESS = 'https://www.focusnu.com/media/upFiles/'
# 长者标签-体型标签默认图片
VITE_DEFAULT_ELDER_TAG_BODY_PIC = 'https://www.focusnu.com/media/default/bodyDefault.png'
# 长者标签-情绪标签默认图片

View File

@ -6,7 +6,7 @@ VITE_PUBLIC_PATH = /
# 跨域代理,您可以配置多个 ,请注意,没有换行符
VITE_PROXY = [["/nursing-unit_103","http://localhost:8093/nursing-unit_103"],["/upload","http://localhost:3300/upload"]]
VITE_PROXY = [["/nursing-unit_103","http://localhost:8093/nursing-unit_103"],["/upload","http://localhost:3300/upload"],["/opeexup","http://localhost:8081/opeapi/"]]
#后台接口全路径地址(必填)
VITE_GLOB_DOMAIN_URL=http://localhost:8093/nursing-unit_103
@ -20,6 +20,9 @@ VITE_GLOB_API_URL_PREFIX=
#微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
VITE_APP_SUB_jeecg-app-1 = '//localhost:8092'
# 管理平台静态资源路径
VITE_OPE_MEDIA_ADDRESS = 'https://www.focusnu.com/media/upFiles/'
# 长者标签-体型标签默认图片
VITE_DEFAULT_ELDER_TAG_BODY_PIC = 'https://www.focusnu.com/media/default/bodyDefault.png'
# 长者标签-情绪标签默认图片

View File

@ -4,6 +4,9 @@ VITE_USE_MOCK = false
# 发布路径
VITE_PUBLIC_PATH = /biz101
# 跨域代理,您可以配置多个 ,请注意,没有换行符
VITE_PROXY = [["/opeexup","https://www.focusnu.com/opeapi/"]]
# 是否启用gzip或brotli压缩
# 选项值: gzip | brotli | none
# 如果需要多个可以使用“,”分隔
@ -21,6 +24,9 @@ VITE_GLOB_DOMAIN_URL=https://www.focusnu.com/nursingunit101
# 接口父路径前缀
VITE_GLOB_API_URL_PREFIX=
# 管理平台静态资源路径
VITE_OPE_MEDIA_ADDRESS = 'https://www.focusnu.com/media/upFiles/'
# 长者标签-体型标签默认图片
VITE_DEFAULT_ELDER_TAG_BODY_PIC = 'https://www.focusnu.com/media/default/bodyDefault.png'
# 长者标签-情绪标签默认图片

View File

@ -20,6 +20,7 @@ enum Api {
getApiAddressByOrgCode = '/sys/api/getApiAddressByOrgCode',
getOrgUrlByOrgCode = '/sys/api/getOrgUrlByOrgCode',
getMediaUrlByOrgCode = '/sys/api/getMediaUrlByOrgCode',
uploadPre = '/sys/common/upload/pre',
}
/**
@ -200,3 +201,11 @@ export const uploadMyFile = (url, data) => {
export const getOrgInfo = () => {
return defHttp.get({ url: Api.getOrgInfo });
};
/**
*
* @param params
*/
export const uploadPre = (params) => {
return defHttp.post({ url: Api.uploadPre, params }, { isTransformResponse: false });
};

View File

@ -1,26 +1,16 @@
<template>
<div class="clearfix">
<a-upload-dragger
:listType="listType"
accept="image/*"
:multiple="multiple"
:action="uploadUrl"
:headers="headers"
:data="{ biz: bizPath }"
v-model:fileList="uploadFileList"
:beforeUpload="beforeUpload"
:disabled="disabled"
:showUploadList="false"
@change="handleChange"
@preview="handlePreview"
>
<a-upload-dragger :listType="listType" accept="image/*" :multiple="multiple" :action="currentUploadUrl"
:data="{ biz: bizPath, ...extraUploadData }" :headers="headers" v-model:fileList="uploadFileList"
:beforeUpload="beforeUpload" :disabled="disabled" :showUploadList="false" @change="handleChange"
@preview="handlePreview">
<div v-if="uploadVisible">
<div v-if="listType == 'picture-card'">
<div class="upload-area" style="padding: 20px;">
<p class="upload-text">点击或者拖拽上传</p>
<p class="upload-hint">
<div class="upload-icon">
<img src="../../../../../assets/upload/picture.png"style="width: 40px; height: 40px;" />
<img src="../../../../../assets/upload/picture.png" style="width: 40px; height: 40px;" />
</div>
<span class="divider">文件大小不超过10MB</span>
<span class="divider">|</span>
@ -42,10 +32,10 @@
</a-button>
</div>
</a-upload-dragger>
<div class="custom-upload-list" v-if="uploadFileList.length > 0">
<div v-for="(file, index) in uploadFileList" :key="file.uid" >
<div class="custom-upload-list" v-if="uploadFileList.length > 0">
<div v-for="(file, index) in uploadFileList" :key="file.uid">
<div style="margin-top: 20px;">
<img :src="file.url?file.url:file.r" style="width: 200px; height: 200px;" >
<img :src="file.url ? file.url : file.r" style="width: 200px; height: 200px;">
</div>
<div style="margin-top: 20px;">
{{ file.name }}
@ -56,35 +46,27 @@
</div>
</div>
</div>
<a-modal
:open="previewVisible"
:width="modalWidth"
:bodyStyle="{ padding: 0, display: 'flex', justifyContent: 'center', alignItems: 'center' }"
:footer="null"
@cancel="handleCancel"
>
<img
ref="previewImgRef"
class="preview-img"
:src="previewImage"
@load="handleImageLoad"
/>
<a-modal :open="previewVisible" :width="modalWidth"
:bodyStyle="{ padding: 0, display: 'flex', justifyContent: 'center', alignItems: 'center' }" :footer="null"
@cancel="handleCancel">
<img ref="previewImgRef" class="preview-img" :src="previewImage" @load="handleImageLoad" />
</a-modal>
</div>
</template>
<script lang="ts">
import { defineComponent, PropType, ref, reactive, watchEffect, computed, unref, watch, onMounted, nextTick } from 'vue';
import { LoadingOutlined, UploadOutlined } from '@ant-design/icons-vue';
import { useRuleFormItem } from '/@/hooks/component/useFormItem';
import { propTypes } from '/@/utils/propTypes';
import { useAttrs } from '/@/hooks/core/useAttrs';
import { useMessage } from '/@/hooks/web/useMessage';
import { getFileAccessHttpUrl, getHeaders, getRandom } from '/@/utils/common/compUtils';
import { uploadUrl } from '/@/api/common/api';
import { getToken } from '/@/utils/auth';
import { defineComponent, PropType, ref, reactive, watchEffect, computed, unref, watch, onMounted, nextTick } from 'vue';
import { LoadingOutlined, UploadOutlined } from '@ant-design/icons-vue';
import { useRuleFormItem } from '/@/hooks/component/useFormItem';
import { propTypes } from '/@/utils/propTypes';
import { useAttrs } from '/@/hooks/core/useAttrs';
import { useMessage } from '/@/hooks/web/useMessage';
import { getFileAccessHttpUrl, getHeaders, getRandom } from '/@/utils/common/compUtils';
import { uploadUrl, uploadPre } from '/@/api/common/api';
import { getToken } from '/@/utils/auth';
import { Upload } from 'ant-design-vue';
const { createMessage, createErrorModal } = useMessage();
export default defineComponent({
const { createMessage, createErrorModal } = useMessage();
export default defineComponent({
name: 'JImageUpload',
components: { LoadingOutlined, UploadOutlined },
inheritAttrs: false,
@ -121,12 +103,21 @@
required: false,
default: 1,
},
//
toOpe: {
type: Boolean,
required: false,
default: false,
}
},
emits: ['options-change', 'change', 'update:value'],
setup(props, { emit, refs }) {
const emitData = ref<any[]>([]);
const attrs = useAttrs();
const [state] = useRuleFormItem(props, 'value', 'change', emitData);
const currentUploadUrl = ref(uploadUrl);
const extraUploadData = ref<Record<string, any>>({});
//
const getFileName = (path) => {
if (path.lastIndexOf('\\') >= 0) {
@ -212,14 +203,28 @@
/**
* 上传前校验
*/
function beforeUpload(file) {
async function beforeUpload(file) {
let fileType = file.type;
console.log("🚀 ~ beforeUpload ~ fileType:", fileType)
if (fileType.indexOf('image') < 0) {
createMessage.info('请上传图片');
uploadFileList.value = [];
return false;
}
if (props.toOpe) {
let res = await uploadPre({ fileName: file.name, fileSize: file.size });
if (res.result == 500) {
createMessage.info('服务暂时不可用,请稍后重试');
return Upload.LIST_IGNORE;
} else {
//
currentUploadUrl.value = '/opeexup/sys/common/static/upload/export';
extraUploadData.value = { name: res.result, size: file.size };
}
} else {
//
currentUploadUrl.value = uploadUrl;
extraUploadData.value = {};
}
return true;
}
/**
* 文件上传结果回调
@ -319,8 +324,8 @@
previewVisible.value = false;
}
//
const handleImageLoad = () => {
//
const handleImageLoad = () => {
if (!previewImgRef.value) return;
const img = previewImgRef.value;
@ -330,7 +335,7 @@ const handleImageLoad = () => {
//
const ratio = Math.min(maxWidth / img.naturalWidth, maxHeight / img.naturalHeight, 1);
modalWidth.value = `${img.naturalWidth * ratio}px`;
};
};
return {
@ -352,24 +357,28 @@ const handleImageLoad = () => {
previewImgRef,
modalWidth,
props,
removeFile
removeFile,
currentUploadUrl,
extraUploadData,
};
},
});
});
</script>
<style scoped>
.ant-upload-select-picture-card i {
.ant-upload-select-picture-card i {
font-size: 32px;
color: #999;
}
}
.ant-upload-select-picture-card .ant-upload-text {
.ant-upload-select-picture-card .ant-upload-text {
margin-top: 8px;
color: #666;
}
}
/* 确保 Modal 内容区域填满 */
.imgView .ant-modal-body {
height: 80vh; /* 限制模态框高度,避免超出屏幕 */
height: 80vh;
/* 限制模态框高度,避免超出屏幕 */
display: flex;
align-items: center;
justify-content: center;
@ -388,28 +397,34 @@ const handleImageLoad = () => {
.preview-img {
max-width: 100%;
max-height: 100%;
object-fit: contain; /* 保持比例,不拉伸 */
object-fit: contain;
/* 保持比例,不拉伸 */
}
:deep(.ant-upload-wrapper .ant-upload-drag .ant-upload) {
padding: 0px !important;
}
:deep(.ant-upload-drag ) {
:deep(.ant-upload-drag) {
border: 0px !important;
}
.upload-text {
font-size: 16px;
color: rgba(74, 69, 69, 0.85);
margin-bottom: 8px;
}
.upload-icon {
margin: 16px;
}
.divider{
font-size:12px;color:rgb(189, 189, 189);
.divider {
font-size: 12px;
color: rgb(189, 189, 189);
}
:deep(.ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item){
:deep(.ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item) {
position: relative;
height: 240px !important;
padding: 8px;
@ -421,7 +436,8 @@ const handleImageLoad = () => {
justify-content: center;
flex-direction: column;
}
:deep(.ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item .ant-upload-list-item-thumbnail){
:deep(.ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item .ant-upload-list-item-thumbnail) {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@ -431,6 +447,7 @@ const handleImageLoad = () => {
text-align: center;
flex: none;
}
:deep(.ant-upload-wrapper .ant-upload-list .ant-upload-list-item .ant-upload-list-item-name) {
overflow: hidden;
white-space: nowrap;
@ -439,5 +456,4 @@ const handleImageLoad = () => {
transition: all 0.3s;
margin-top: -20px;
}
</style>

View File

@ -1,19 +1,9 @@
<template>
<div ref="containerRef" :class="`${prefixCls}-container`">
<a-upload-dragger
accept="audio/mp3"
:headers="headers"
:multiple="multiple"
:action="uploadUrl"
:fileList="fileList"
:disabled="disabled"
v-bind="bindProps"
:beforeUpload="beforeUpload"
:showUploadList="false"
@remove="onRemove"
@change="onFileChange"
@preview="onFilePreview"
>
<a-upload-dragger accept="audio/mp3" :headers="headers" :multiple="multiple" :action="currentUploadUrl"
:data="{ biz: bizPath, ...extraUploadData }" :fileList="fileList" :disabled="disabled" v-bind="bindProps"
:beforeUpload="beforeUpload" :showUploadList="false" @remove="onRemove" @change="onFileChange"
@preview="onFilePreview">
<template v-if="isImageMode">
<div v-if="!isMaxCount">
<Icon icon="ant-design:plus-outlined" />
@ -42,7 +32,7 @@
</a-upload-dragger>
<!-- 文件回显 -->
<div class="custom-upload-list" v-if="fileList.length > 0">
<div v-for="(file, index) in fileList" :key="file.uid" >
<div v-for="(file, index) in fileList" :key="file.uid">
<div style="margin-top: 20px;">
<audio ref="audioPlayer" controls :src="file.url"></audio>
</div>
@ -58,25 +48,26 @@
</template>
<script lang="ts" setup>
import { ref, reactive, computed, watch, nextTick, createApp,unref } from 'vue';
import { Icon } from '/@/components/Icon';
import { getToken } from '/@/utils/auth';
import { uploadUrl } from '/@/api/common/api';
import { propTypes } from '/@/utils/propTypes';
import { useMessage } from '/@/hooks/web/useMessage';
import { createImgPreview } from '/@/components/Preview/index';
import { useAttrs } from '/@/hooks/core/useAttrs';
import { useDesign } from '/@/hooks/web/useDesign';
import { UploadTypeEnum } from './upload.data';
import { getFileAccessHttpUrl, getHeaders } from '/@/utils/common/compUtils';
import UploadItemActions from './components/UploadItemActions.vue';
import { InboxOutlined } from '@ant-design/icons-vue';
import { ref, reactive, computed, watch, nextTick, createApp, unref } from 'vue';
import { Icon } from '/@/components/Icon';
import { getToken } from '/@/utils/auth';
import { uploadUrl, uploadPre } from '/@/api/common/api';
import { propTypes } from '/@/utils/propTypes';
import { useMessage } from '/@/hooks/web/useMessage';
import { createImgPreview } from '/@/components/Preview/index';
import { useAttrs } from '/@/hooks/core/useAttrs';
import { useDesign } from '/@/hooks/web/useDesign';
import { UploadTypeEnum } from './upload.data';
import { getFileAccessHttpUrl, getHeaders } from '/@/utils/common/compUtils';
import UploadItemActions from './components/UploadItemActions.vue';
import { InboxOutlined } from '@ant-design/icons-vue';
import { Upload } from 'ant-design-vue';
const { createMessage, createConfirm } = useMessage();
const { prefixCls } = useDesign('j-upload');
const attrs = useAttrs();
const emit = defineEmits(['change', 'update:value']);
const props = defineProps({
const { createMessage, createConfirm } = useMessage();
const { prefixCls } = useDesign('j-upload');
const attrs = useAttrs();
const emit = defineEmits(['change', 'update:value']);
const props = defineProps({
value: propTypes.oneOfType([propTypes.string, propTypes.array]),
text: propTypes.string.def('上传'),
fileType: propTypes.string.def(UploadTypeEnum.all),
@ -102,33 +93,41 @@
disabled: propTypes.bool.def(false),
//
replaceLastOne: propTypes.bool.def(false),
});
//
toOpe: {
type: Boolean,
required: false,
default: false,
}
});
const headers = getHeaders();
const fileList = ref<any[]>([]);
const uploadGoOn = ref<boolean>(true);
// refs
const containerRef = ref();
//
const isMaxCount = computed(() => props.maxCount > 0 && fileList.value.length >= props.maxCount);
//
const isImageMode = computed(() => props.fileType === UploadTypeEnum.image);
//
const buttonDisabled = computed(()=>{
if(props.disabled === true){
const headers = getHeaders();
const fileList = ref<any[]>([]);
const uploadGoOn = ref<boolean>(true);
const currentUploadUrl = ref(uploadUrl);
const extraUploadData = ref<Record<string, any>>({});
// refs
const containerRef = ref();
//
const isMaxCount = computed(() => props.maxCount > 0 && fileList.value.length >= props.maxCount);
//
const isImageMode = computed(() => props.fileType === UploadTypeEnum.image);
//
const buttonDisabled = computed(() => {
if (props.disabled === true) {
return true;
}
if(isMaxCount.value === true){
if(props.replaceLastOne === true){
if (isMaxCount.value === true) {
if (props.replaceLastOne === true) {
return false
}else{
} else {
return true;
}
}
return false
});
// props attrs
const bindProps = computed(() => {
});
// props attrs
const bindProps = computed(() => {
//update-begin-author:liusq date:20220411 for: [issue/455]accept
const bind: any = Object.assign({}, props, unref(attrs));
//update-end-author:liusq date:20220411 for: [issue/455]accept
@ -147,12 +146,12 @@
bind.accept = 'image/*';
}
return bind;
});
function removeFile(index) {
});
function removeFile(index) {
fileList.value.splice(index, 1);
}
}
watch(
watch(
() => props.value,
(val) => {
if (Array.isArray(val)) {
@ -172,14 +171,14 @@
}
},
{ immediate: true }
);
);
watch(fileList, () => nextTick(() => addActionsListener()), { immediate: true });
watch(fileList, () => nextTick(() => addActionsListener()), { immediate: true });
const antUploadItemCls = 'ant-upload-list-item';
const antUploadItemCls = 'ant-upload-list-item';
// Listener
function addActionsListener() {
// Listener
function addActionsListener() {
if (!isImageMode.value) {
return;
}
@ -193,10 +192,10 @@
uploadItem.addEventListener('mouseover', onAddActionsButton);
}
}
}
}
//
function onAddActionsButton(event) {
//
function onAddActionsButton(event) {
const getUploadItem = () => {
for (const path of event.path) {
if (path.classList.contains(antUploadItemCls)) {
@ -228,10 +227,10 @@
actions[0].appendChild(div);
uploadItem.setAttribute('data-has-actions', 'true');
uploadItem.removeEventListener('mouseover', onAddActionsButton);
}
}
//
function parsePathsValue(paths) {
//
function parsePathsValue(paths) {
if (!paths || paths.length == 0) {
fileList.value = [];
return;
@ -248,10 +247,10 @@
});
}
fileList.value = list;
}
}
//
function parseArrayValue(array) {
//
function parseArrayValue(array) {
if (!array || array.length == 0) {
fileList.value = [];
return;
@ -268,22 +267,39 @@
});
}
fileList.value = list;
}
}
/**
/**
* 上传前校验
*/
function beforeUpload(file) {
async function beforeUpload(file) {
let fileType = file.type;
console.log("🚀 ~ beforeUpload ~ fileType:", fileType)
console.log("🚀 ~ beforeUpload ~ file:", file)
if (fileType.indexOf('audio') < 0) {
createMessage.info('请上传MP3文件');
fileList.value = [];
return false;
}
if (props.toOpe) {
let res = await uploadPre({ fileName: file.name, fileSize: file.size });
if (res.result == 500) {
createMessage.info('服务暂时不可用,请稍后重试');
return Upload.LIST_IGNORE;
} else {
//
currentUploadUrl.value = '/opeexup/sys/common/static/upload/export';
extraUploadData.value = { biz: props.bizPath, name: res.result, size: file.size };
console.log("🌊 ~ beforeUpload ~ extraUploadData.value:", extraUploadData.value)
}
//
function onBeforeUpload(file) {
} else {
//
currentUploadUrl.value = uploadUrl;
extraUploadData.value = { biz: props.bizPath };
}
return true;
}
//
function onBeforeUpload(file) {
uploadGoOn.value = true;
if (isImageMode.value) {
if (file.type.indexOf('image') < 0) {
@ -297,10 +313,10 @@
return props.beforeUpload(file);
}
return true;
}
}
//
function onRemove() {
//
function onRemove() {
if (props.removeConfirm) {
return new Promise((resolve) => {
createConfirm({
@ -313,10 +329,10 @@
});
}
return true;
}
}
// uploadchange
function onFileChange(info) {
// uploadchange
function onFileChange(info) {
console.log("🚀 ~ onFileChange ~ info:", info.file)
var file = info.file;
let fileType = file.type;
@ -350,9 +366,9 @@
}
return file;
});
}else{
successFileList = fileListTemp.filter(item=>{
return item.uid!=info.file.uid;
} else {
successFileList = fileListTemp.filter(item => {
return item.uid != info.file.uid;
});
createMessage.error(`${info.file.name} 上传失败.`);
}
@ -379,7 +395,7 @@
fileSize: item.size,
};
newFileList.push(fileJson);
}else{
} else {
return;
}
}
@ -388,9 +404,9 @@
//update-end---author:liusq ---date:20230914 for[issues/5327]UploadreturnUrlfalse'[object Object]' ------------
}
}
}
}
function handlePathChange() {
function handlePathChange() {
let uploadFiles = fileList.value;
let path = '';
if (!uploadFiles || uploadFiles.length == 0) {
@ -408,51 +424,51 @@
path = pathList.join(',');
}
emitValue(path);
}
}
//
function onFilePreview(file) {
//
function onFilePreview(file) {
if (isImageMode.value) {
createImgPreview({ imageList: [file.url], maskClosable: true });
} else {
window.open(file.url);
}
}
}
function emitValue(value) {
function emitValue(value) {
emit('change', value);
emit('update:value', value);
}
}
function uidGenerator() {
function uidGenerator() {
return '-' + parseInt(Math.random() * 10000 + 1, 10);
}
}
function getFileName(path) {
function getFileName(path) {
if (path.lastIndexOf('\\') >= 0) {
let reg = new RegExp('\\\\', 'g');
path = path.replace(reg, '/');
}
return path.substring(path.lastIndexOf('/') + 1);
}
//
const uploadVisible = computed(() => {
}
//
const uploadVisible = computed(() => {
if (props['maxCount'] === 0) {
return true;
}
return fileList.value.length < props['maxCount'];
});
});
defineExpose({
defineExpose({
addActionsListener,
});
});
</script>
<style lang="less">
//noinspection LessUnresolvedVariable
@prefix-cls: ~'@{namespace}-j-upload';
//noinspection LessUnresolvedVariable
@prefix-cls: ~'@{namespace}-j-upload';
.@{prefix-cls} {
.@{prefix-cls} {
&-container {
position: relative;
@ -471,11 +487,14 @@
.upload-download-handler {
right: 6px !important;
}
/* update-end-author:taoyan date:2022-5-24 for:VUEN-1093详情界面 图片下载按钮显示不全*/
}
.ant-upload-text-icon {
color: @primary-color;
}
.ant-upload-list-item {
.upload-actions-container {
position: absolute;
@ -522,26 +541,32 @@
}
}
}
}
}
.ant-upload-wrapper .ant-upload-drag .ant-upload {
padding: 0px !important;
}
.ant-upload-drag {
border: 0px !important;
}
.upload-text {
font-size: 16px;
color: rgba(74, 69, 69, 0.85);
margin-bottom: 8px;
}
.upload-icon {
margin: 16px;
}
.divider{
font-size:12px;color:rgb(189, 189, 189);
.divider {
font-size: 12px;
color: rgb(189, 189, 189);
}
:deep(.ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item){
:deep(.ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item) {
position: relative;
height: 240px !important;
padding: 8px;
@ -553,7 +578,8 @@
justify-content: center;
flex-direction: column;
}
:deep(.ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item .ant-upload-list-item-thumbnail){
:deep(.ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item .ant-upload-list-item-thumbnail) {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@ -563,6 +589,7 @@
text-align: center;
flex: none;
}
:deep(.ant-upload-wrapper .ant-upload-list .ant-upload-list-item .ant-upload-list-item-name) {
overflow: hidden;
white-space: nowrap;
@ -579,5 +606,4 @@
background: #f1f7ff;
text-align: center;
}
</style>

View File

@ -228,26 +228,26 @@ function getTableAction(record) {
label: '邀请',
onClick: handleInvite.bind(null, record),
},
{
label: '获取身份证',
onClick: handleAcquireIdenCard.bind(null, record),
ifShow: () => {
//hasCardZmPathhasCardFmPath 1 0 2 /null/undefined
let result = false
if (record.hasCardZmPath == '2' || record.hasCardFmPath == '2') {
//
return false;
}
if (record.hasCardZmPath == '1' && record.hasCardFmPath == '1') {
//
return false;
}
if (record.hasCardZmPath == null || record.hasCardZmPath == undefined || record.hasCardFmPath == null || record.hasCardFmPath == undefined) {
result = true
}
return result
}
}
// {
// label: '',
// onClick: handleAcquireIdenCard.bind(null, record),
// ifShow: () => {
// //hasCardZmPathhasCardFmPath 1 0 2 /null/undefined
// let result = false
// if (record.hasCardZmPath == '2' || record.hasCardFmPath == '2') {
// //
// return false;
// }
// if (record.hasCardZmPath == '1' && record.hasCardFmPath == '1') {
// //
// return false;
// }
// if (record.hasCardZmPath == null || record.hasCardZmPath == undefined || record.hasCardFmPath == null || record.hasCardFmPath == undefined) {
// result = true
// }
// return result
// }
// }
];
}

View File

@ -128,12 +128,12 @@
</a-col>
<a-col :span="12">
<a-form-item label="身份证正面">
<j-image-upload :fileMax="1" v-model:value="formData.cardZmPath" disabled></j-image-upload>
<j-image-upload :fileMax="1" :value="opeMediaAddress + formData.cardZmPath" disabled></j-image-upload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身份证反面">
<j-image-upload :fileMax="1" v-model:value="formData.cardFmPath" disabled></j-image-upload>
<j-image-upload :fileMax="1" :value="opeMediaAddress + formData.cardFmPath" disabled></j-image-upload>
</a-form-item>
</a-col>
</a-row>

View File

@ -152,14 +152,14 @@
<a-col :span="12">
<a-form-item label="身份证正面" v-bind="validateInfos.idCardPositive"
id="BizEmployeesInfoForm-idCardPositive" name="idCardPositive">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`" v-model:value="formData.idCardPositive"
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`" :value="opeMediaAddress + formData.idCardPositive"
disabled></j-image-upload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身份证反面" v-bind="validateInfos.idCardNegative"
id="BizEmployeesInfoForm-idCardNegative" name="idCardNegative">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`" v-model:value="formData.idCardNegative"
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`":value="opeMediaAddress + formData.idCardNegative"
disabled></j-image-upload>
</a-form-item>
</a-col>
@ -171,7 +171,7 @@
<a-form-item label="健康证正面" v-bind="validateInfos.healthCertificatePositive"
id="BizEmployeesInfoForm-healthCertificatePositive" name="healthCertificatePositive">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`"
v-model:value="formData.healthCertificatePositive" disabled></j-image-upload>
:value="opeMediaAddress + formData.healthCertificatePositive" disabled></j-image-upload>
</a-form-item>
</a-col>
<!-- <a-col :span="12">
@ -189,14 +189,14 @@
<a-col :span="12">
<a-form-item label="银行卡正面" v-bind="validateInfos.bankPositive"
id="BizEmployeesInfoForm-bankPositive" name="bankPositive">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`" v-model:value="formData.bankPositive"
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`" :value="opeMediaAddress + formData.bankPositive"
disabled></j-image-upload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="银行卡反面" v-bind="validateInfos.bankNegative"
id="BizEmployeesInfoForm-bankNegative" name="bankNegative">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`" v-model:value="formData.bankNegative"
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`" :value="opeMediaAddress + formData.bankNegative"
disabled></j-image-upload>
</a-form-item>
</a-col>
@ -207,7 +207,7 @@
<a-col :span="24">
<a-form-item label="资质证" v-bind="validateInfos.qualification"
id="BizEmployeesInfoForm-qualification" name="qualification" :labelCol="labelCol3">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`" v-model:value="formData.qualification"
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`" :value="opeMediaAddress + formData.qualification"
disabled></j-image-upload>
</a-form-item>
</a-col>
@ -219,7 +219,7 @@
<a-form-item label="无犯罪证明" v-bind="validateInfos.noCrimeCertificate"
id="BizEmployeesInfoForm-noCrimeCertificate" name="noCrimeCertificate" :labelCol="labelCol3">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`"
v-model:value="formData.noCrimeCertificate" disabled></j-image-upload>
:value="opeMediaAddress + formData.noCrimeCertificate" disabled></j-image-upload>
</a-form-item>
</a-col>
</a-row>
@ -294,11 +294,13 @@ import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../EmployeesApply.api';
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true }
});
const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);

View File

@ -1,6 +1,6 @@
<template>
<a-drawer :title="title" width="70vw" :visible="visible" :closable="true" :footer-style="{ textAlign: 'right' }"
@close="handleCancel">
:bodyStyle="{ padding: '14px' }" @close="handleCancel">
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
@ -11,15 +11,15 @@
</a-drawer>
<!-- 可邀请邀请列表 -->
<a-drawer :title="'邀请'" width="70vw" :visible="invidedVisible" :closable="true" :footer-style="{ textAlign: 'right' }"
@close="handleInvidedCancel">
:bodyStyle="{ padding: '14px' }" @close="handleInvidedCancel">
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleInvidedCancel">关闭</a-button>
</template>
<NuEmployeesAdvisoryInfoList v-if="invidedVisible" ref="invidedRef" @reload="submitCallback" />
</a-drawer>
<!-- 员工信息变更审核 -->
<a-drawer :title="title" width="70vw" :visible="upInfoVisible" :closable="true" :footer-style="{ textAlign: 'right' }"
@close="handleUpInfoCancel">
<a-drawer :title="'审核'" width="70vw" :visible="upInfoVisible" :closable="true" :footer-style="{ textAlign: 'right' }"
:bodyStyle="{ padding: '14px' }" @close="handleUpInfoCancel">
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleUpInfoCancel">关闭</a-button>
<a-button type="primary" @click="handleUpInfoOk">确认</a-button>

View File

@ -1,24 +1,5 @@
<template>
<div class="container2">
<a-form ref="formRef" layout="horizontal" :model="formData" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="审核结果" name="status" v-bind="validateInfos.status">
<a-select v-model:value="formData.status" style="width: 200px" placeholder="请选择审核结果">
<a-select-option value="modifyPass">审核通过</a-select-option>
<a-select-option value="modifyFail">审核驳回</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" v-if="formData.status == 'modifyFail'">
<a-form-item label="驳回原因" name="auditContent" v-bind="validateInfos.auditContent">
<a-textarea :maxlength="50" show-count v-model:value="formData.auditContent" placeholder="请输入驳回原因(如驳回)"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
</a-form>
<a-row>
<a-col :span="24" style="padding-top: 10px;padding-left: 30px;padding-right: 30px;">
<a-table :dataSource="filteredTableData" :columns="columns" :pagination="false" bordered size="small"
@ -28,10 +9,10 @@
<span>{{ applyObj[record.d1] }}</span>
</template>
<template v-if="column.dataIndex === 'd2' && isImg(record.d1)">
<JImageUpload :fileMax="1" v-model:value="record.d2" disabled></JImageUpload>
<JImageUpload :fileMax="1" :value="opeMediaAddress + record.d2" disabled></JImageUpload>
</template>
<template v-if="column.dataIndex === 'd3' && isImg(record.d1)">
<JImageUpload :fileMax="1" v-model:value="record.d3" disabled></JImageUpload>
<JImageUpload :fileMax="1" :value="opeMediaAddress + record.d3" disabled></JImageUpload>
</template>
<template
v-if="column.dataIndex === 'd2' && (record.d1 == 'orgProvince' || record.d1 == 'orgCity' || record.d1 == 'orgDistrict')">
@ -57,6 +38,24 @@
</a-table>
</a-col>
</a-row>
<a-form style="margin-top: 14px;height: 100px;" ref="formRef" layout="horizontal" :model="formData" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="审核结果" name="status" v-bind="validateInfos.status">
<a-select v-model:value="formData.status" style="width: 200px" placeholder="请选择审核结果">
<a-select-option value="modifyPass">审核通过</a-select-option>
<a-select-option value="modifyFail">审核驳回</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" v-if="formData.status == 'modifyFail'">
<a-form-item label="驳回原因" name="auditContent" v-bind="validateInfos.auditContent">
<a-textarea :maxlength="50" show-count v-model:value="formData.auditContent" placeholder="请输入驳回原因(如驳回)"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
</template>
@ -69,6 +68,7 @@ import { getModifyInfo, auditSubmit } from '../EmployeesApply.api';
import { useMessage } from '/@/hooks/web/useMessage';
import { initDictOptions } from '/@/utils/dict';
const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS
const formRef = ref();
const AForm = Form;
const AFormItem = Form.Item;
@ -242,7 +242,7 @@ defineExpose({
<style lang="less" scoped>
.container2 {
padding: 16px;
// padding: 16px;
}
.antd-modal-form {

View File

@ -175,14 +175,14 @@
<a-form-item label="身份证正面" v-bind="validateInfos.idCardPositive"
id="BizEmployeesInfoForm-idCardPositive" name="idCardPositive">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`"
v-model:value="formData.idCardPositive" disabled></j-image-upload>
:value="opeMediaAddress + formData.idCardPositive" disabled></j-image-upload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身份证反面" v-bind="validateInfos.idCardNegative"
id="BizEmployeesInfoForm-idCardNegative" name="idCardNegative">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`"
v-model:value="formData.idCardNegative" disabled></j-image-upload>
:value="opeMediaAddress + formData.idCardNegative" disabled></j-image-upload>
</a-form-item>
</a-col>
</a-row>
@ -194,7 +194,7 @@
id="BizEmployeesInfoForm-healthCertificatePositive"
name="healthCertificatePositive">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`"
v-model:value="formData.healthCertificatePositive"
:value="opeMediaAddress + formData.healthCertificatePositive"
disabled></j-image-upload>
</a-form-item>
</a-col>
@ -216,14 +216,14 @@
<a-form-item label="银行卡正面" v-bind="validateInfos.bankPositive"
id="BizEmployeesInfoForm-bankPositive" name="bankPositive">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`"
v-model:value="formData.bankPositive" disabled></j-image-upload>
:value="opeMediaAddress + formData.bankPositive" disabled></j-image-upload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="银行卡反面" v-bind="validateInfos.bankNegative"
id="BizEmployeesInfoForm-bankNegative" name="bankNegative">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`"
v-model:value="formData.bankNegative" disabled></j-image-upload>
:value="opeMediaAddress + formData.bankNegative" disabled></j-image-upload>
</a-form-item>
</a-col>
</a-row>
@ -235,7 +235,7 @@
id="BizEmployeesInfoForm-qualification" name="qualification"
:labelCol="labelCol3">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`"
v-model:value="formData.qualification" disabled></j-image-upload>
:value="opeMediaAddress + formData.qualification" disabled></j-image-upload>
</a-form-item>
</a-col>
</a-row>
@ -247,7 +247,7 @@
id="BizEmployeesInfoForm-noCrimeCertificate" name="noCrimeCertificate"
:labelCol="labelCol3">
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`"
v-model:value="formData.noCrimeCertificate"
:value="opeMediaAddress + formData.noCrimeCertificate"
disabled></j-image-upload>
</a-form-item>
</a-col>
@ -272,11 +272,13 @@ import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../BizEmployeesInfo.api';
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true }
});
const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);

View File

@ -9,7 +9,7 @@
<SectionDivider :title="'长者信息'" />
</a-col>
<a-col :span="12">
<a-form-item label="nuId" v-bind="validateInfos.nuId" id="ElderInfoForm-nuId" name="nuId">
<a-form-item label="NUID" v-bind="validateInfos.nuId" id="ElderInfoForm-nuId" name="nuId">
<!-- <a-input v-model:value="formData.nuId" placeholder="请输入护理单元" allow-clear ></a-input> -->
<span>{{ formData.nuId }}</span>
</a-form-item>
@ -110,13 +110,13 @@
<a-col :span="12">
<a-form-item label="身份证正面" v-bind="validateInfos.idCardPositive" id="ElderInfoForm-idCardPositive"
name="idCardPositive">
<j-image-upload :fileMax="1" v-model:value="formData.idCardPositive"></j-image-upload>
<j-image-upload :fileMax="1" :value="opeMediaAddress + formData.idCardPositive"></j-image-upload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身份证反面" v-bind="validateInfos.idCardNegative" id="ElderInfoForm-idCardNegative"
name="idCardNegative">
<j-image-upload :fileMax="1" v-model:value="formData.idCardNegative"></j-image-upload>
<j-image-upload :fileMax="1" :value="opeMediaAddress + formData.idCardNegative"></j-image-upload>
</a-form-item>
</a-col>
<a-col :span="12">
@ -164,6 +164,7 @@ const props = defineProps({
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true }
});
const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);

View File

@ -1,6 +1,6 @@
<template>
<a-drawer :title="title" width="70vw" :visible="visible" :closable="true" :footer-style="{ textAlign: 'right' }"
@close="handleCancel">
:bodyStyle="{ padding: '14px' }" @close="handleCancel">
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
@ -10,7 +10,7 @@
</ElderInfoForm>
</a-drawer>
<!-- 长者信息变更审核 -->
<a-drawer :title="title" width="70vw" :visible="elderUpInfoVisible" :closable="true"
<a-drawer :title="title" width="70vw" :visible="elderUpInfoVisible" :closable="true" :bodyStyle="{ padding: '14px' }"
:footer-style="{ textAlign: 'right' }" @close="handleElderUpInfoCancel">
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleElderUpInfoCancel">关闭</a-button>
@ -21,7 +21,7 @@
</a-drawer>
<!-- 监护人信息变更审核 -->
<a-drawer :title="title" width="70vw" :visible="upInfoVisible" :closable="true" :footer-style="{ textAlign: 'right' }"
@close="handleUpInfoCancel">
:bodyStyle="{ padding: '14px' }" @close="handleUpInfoCancel">
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleUpInfoCancel">关闭</a-button>
<a-button type="primary" @click="handleUpInfoOk">确认</a-button>

View File

@ -1,24 +1,5 @@
<template>
<div class="container2">
<a-form ref="formRef" layout="horizontal" :model="formData" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="审核结果" name="status" v-bind="validateInfos.status">
<a-select v-model:value="formData.status" style="width: 200px" placeholder="请选择审核结果">
<a-select-option value="modifyPass">审核通过</a-select-option>
<a-select-option value="modifyFail">审核驳回</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" v-if="formData.status == 'modifyFail'">
<a-form-item label="驳回原因" name="auditContent" v-bind="validateInfos.auditContent">
<a-textarea :maxlength="50" show-count v-model:value="formData.auditContent" placeholder="请输入驳回原因(如驳回)"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
</a-form>
<a-row>
<a-col :span="24" style="padding-top: 10px;padding-left: 30px;padding-right: 30px;">
<a-table :dataSource="filteredTableData" :columns="columns" :pagination="false" bordered size="small"
@ -28,10 +9,10 @@
<span>{{ applyObj[record.d1] }}</span>
</template>
<template v-if="column.dataIndex === 'd2' && isImg(record.d1)">
<JImageUpload :fileMax="1" v-model:value="record.d2" disabled></JImageUpload>
<JImageUpload :fileMax="1" :value="opeMediaAddress + record.d2" disabled></JImageUpload>
</template>
<template v-if="column.dataIndex === 'd3' && isImg(record.d1)">
<JImageUpload :fileMax="1" v-model:value="record.d3" disabled></JImageUpload>
<JImageUpload :fileMax="1" :value="opeMediaAddress + record.d3" disabled></JImageUpload>
</template>
<template
v-if="column.dataIndex === 'd2' && (record.d1 == 'orgProvince' || record.d1 == 'orgCity' || record.d1 == 'orgDistrict')">
@ -57,6 +38,24 @@
</a-table>
</a-col>
</a-row>
<a-form style="margin-top: 14px;height: 100px;" ref="formRef" layout="horizontal" :model="formData" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="审核结果" name="status" v-bind="validateInfos.status">
<a-select v-model:value="formData.status" style="width: 200px" placeholder="请选择审核结果">
<a-select-option value="modifyPass">审核通过</a-select-option>
<a-select-option value="modifyFail">审核驳回</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" v-if="formData.status == 'modifyFail'">
<a-form-item label="驳回原因" name="auditContent" v-bind="validateInfos.auditContent">
<a-textarea :maxlength="50" show-count v-model:value="formData.auditContent" placeholder="请输入驳回原因(如驳回)"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
</template>
@ -69,6 +68,7 @@ import { getModifyInfo, elderAudit } from '../ElderInfo.api'
import { useMessage } from '/@/hooks/web/useMessage';
import { initDictOptions } from '/@/utils/dict';
const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS
const formRef = ref();
const AForm = Form;
const AFormItem = Form.Item;
@ -243,7 +243,7 @@ defineExpose({
<style lang="less" scoped>
.container2 {
padding: 16px;
// padding: 16px;
}
.antd-modal-form {

View File

@ -1,24 +1,5 @@
<template>
<div class="container2">
<a-form ref="formRef" layout="horizontal" :model="formData" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="审核结果" name="status" v-bind="validateInfos.status">
<a-select v-model:value="formData.status" style="width: 200px" placeholder="请选择审核结果">
<a-select-option value="modifyPass">审核通过</a-select-option>
<a-select-option value="modifyFail">审核驳回</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" v-if="formData.status == 'modifyFail'">
<a-form-item label="驳回原因" name="auditContent" v-bind="validateInfos.auditContent">
<a-textarea :maxlength="50" show-count v-model:value="formData.auditContent" placeholder="请输入驳回原因(如驳回)"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
</a-form>
<a-row>
<a-col :span="24" style="padding-top: 10px;padding-left: 30px;padding-right: 30px;">
<a-table :dataSource="filteredTableData" :columns="columns" :pagination="false" bordered size="small"
@ -57,6 +38,24 @@
</a-table>
</a-col>
</a-row>
<a-form style="margin-top: 14px;height: 100px;" ref="formRef" layout="horizontal" :model="formData" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="审核结果" name="status" v-bind="validateInfos.status">
<a-select v-model:value="formData.status" style="width: 200px" placeholder="请选择审核结果">
<a-select-option value="modifyPass">审核通过</a-select-option>
<a-select-option value="modifyFail">审核驳回</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" v-if="formData.status == 'modifyFail'">
<a-form-item label="驳回原因" name="auditContent" v-bind="validateInfos.auditContent">
<a-textarea :maxlength="50" show-count v-model:value="formData.auditContent" placeholder="请输入驳回原因(如驳回)"
style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
</template>
@ -243,7 +242,7 @@ defineExpose({
<style lang="less" scoped>
.container2 {
padding: 16px;
// padding: 16px;
}
.antd-modal-form {

View File

@ -116,42 +116,44 @@
<a-row style="padding: 0px 20px;">
<a-col :span="24" v-show="directiveMediaBtnValue == 0">
<JImageUploadtz v-if="opeType == 'dmlook'"
:value="!!formData.previewFile ? mediaApiAddress + formData.previewFile : defaultPrePic" maxCount="1"
:disabled="disabled || !isMain" />
<JImageUploadtz v-else v-model:value="formData.previewFile" maxCount="1"
:value="!!formData.previewFile ? opeMediaAddress + formData.previewFile : defaultPrePic" maxCount="1"
:disabled="disabled || !isMain" />
<JImageUploadtz v-else v-model:value="formData.previewFile" maxCount="1" :toOpe="true"
:bizPath="formComputedData.mediaFileSavePath" :disabled="disabled || !isMain" />
</a-col>
<a-col :span="24" v-show="directiveMediaBtnValue == 1">
<JImageUploadtz v-if="opeType == 'dmlook'"
:value="!!formData.previewFileSmall ? mediaApiAddress + formData.previewFileSmall : defaultPreSmallPic"
:value="!!formData.previewFileSmall ? opeMediaAddress + formData.previewFileSmall : defaultPreSmallPic"
maxCount="1" :disabled="disabled || !isMain" />
<JImageUploadtz v-else v-model:value="formData.previewFileSmall" maxCount="1"
:disabled="disabled || !isMain" />
<JImageUploadtz v-else v-model:value="formData.previewFileSmall" maxCount="1" :toOpe="true"
:bizPath="formComputedData.mediaFileSavePath" :disabled="disabled || !isMain" />
</a-col>
<a-col :span="24" v-show="directiveMediaBtnValue == 2">
<JUploadMP3 v-if="opeType == 'dmlook'" :value="mediaApiAddress + formData.mp3File" maxCount="1"
<JUploadMP3 v-if="opeType == 'dmlook'" :value="opeMediaAddress + formData.mp3File" maxCount="1"
:disabled="disabled || !isMain" />
<JUploadMP3 v-else v-model:value="formData.mp3File" maxCount="1" :disabled="disabled || !isMain" />
<JUploadMP3 v-else v-model:value="formData.mp3File" :toOpe="true"
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" :disabled="disabled || !isMain" />
</a-col>
<a-col :span="24" v-show="directiveMediaBtnValue == 3">
<JUploadMP4 v-if="opeType == 'dmlook'" :value="mediaApiAddress + formData.mp4File" maxCount="1"
<JUploadMP4 v-if="opeType == 'dmlook'" :value="opeMediaAddress + formData.mp4File" maxCount="1"
fileType="mp4" :disabled="disabled || !isMain" />
<JUploadMP4 v-else v-model:value="formData.mp4File" maxCount="1" fileType="mp4"
<JUploadMP4 v-else v-model:value="formData.mp4File" :toOpe="true"
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" fileType="mp4"
:disabled="disabled || !isMain" />
</a-col>
<a-col :span="24" v-show="directiveMediaBtnValue == 4">
<JImageUploadtz v-if="opeType == 'dmlook'"
:value="!!formData.immediateFile ? mediaApiAddress + formData.immediateFile : defaultImmediatePic"
:value="!!formData.immediateFile ? opeMediaAddress + formData.immediateFile : defaultImmediatePic"
maxCount="1" :disabled="disabled || !isMain" />
<JImageUploadtz v-else v-model:value="formData.immediateFile" maxCount="1"
:disabled="disabled || !isMain" />
<JImageUploadtz v-else v-model:value="formData.immediateFile" :toOpe="true"
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" :disabled="disabled || !isMain" />
</a-col>
<a-col :span="24" v-show="directiveMediaBtnValue == 5">
<JImageUploadtz v-if="opeType == 'dmlook'"
:value="!!formData.immediateFileFocus ? mediaApiAddress + formData.immediateFileFocus : defaultImmediatePic"
:value="!!formData.immediateFileFocus ? opeMediaAddress + formData.immediateFileFocus : defaultImmediatePic"
maxCount="1" :disabled="disabled || !isMain" />
<JImageUploadtz v-else v-model:value="formData.immediateFileFocus" maxCount="1"
:disabled="disabled || !isMain" />
<JImageUploadtz v-else v-model:value="formData.immediateFileFocus" :toOpe="true"
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" :disabled="disabled || !isMain" />
</a-col>
</a-row>
<a-row style="padding: 20px;">
@ -202,6 +204,7 @@ import { QuestionCircleOutlined } from '@ant-design/icons-vue';
import { DownOutlined } from '@ant-design/icons-vue';
import { uploadUrl } from '/@/api/common/api';
const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS
const showDescription = ref(false);
//
@ -370,9 +373,10 @@ const typeDictCode = ref('')
const canUploadPreviewImage = computed(() => {
return formData.instructionTagId &&
formData.categoryId &&
formData.typeId &&
formData.directiveName &&
formData.cycleType;
formData.typeId
// &&
// formData.directiveName &&
// formData.cycleType;
});
//
@ -418,8 +422,11 @@ const formComputedData = computed(() => {
//
const instructionName = instructionComDictCode.value.find(d => d.value == formData.instructionTagId)?.label || '';
console.log("🌊 ~ instructionName:", instructionName)
const categoryName = categoryComDictCode.value.find(d => d.value == formData.categoryId)?.label || '';
console.log("🌊 ~ categoryName:", categoryName)
const typeName = typeComDictCode.value.find(d => d.value == formData.typeId)?.label || '';
console.log("🌊 ~ typeName:", typeName)
const cycleTypeName = cycleTypeComDictCode.value.find(d => d.value == formData.cycleType)?.label || '';
//
@ -432,7 +439,8 @@ const formComputedData = computed(() => {
};
return {
mediaFileSavePath: `directive/${instructionName}/${categoryName}/${typeName}/${cycleTypeName}/${formData.directiveName}`,
// mediaFileSavePath: `directive/${instructionName}/${categoryName}/${typeName}/${cycleTypeName}/${formData.directiveName}`,
mediaFileSavePath: `directive/${instructionName}/${categoryName}/${typeName}`,
instructionName,
categoryName,
typeName,