1、调整进销存-付款单功能中图片的上传目录层级结构

2、调整员工管理-员工管理功能中图片的上传目录层级结构
3、调整服务指令-服务指令功能中图片的上传目录层级结构
4、调整长者管理-标签管理功能中图片的上传目录层级结构
This commit is contained in:
1378012178@qq.com 2025-11-25 10:52:53 +08:00
parent 1eab38b0b5
commit 0ca51f25c3
5 changed files with 78 additions and 30 deletions

View File

@ -21,6 +21,7 @@ enum Api {
getOrgUrlByOrgCode = '/sys/api/getOrgUrlByOrgCode',
getMediaUrlByOrgCode = '/sys/api/getMediaUrlByOrgCode',
uploadPre = '/sys/common/upload/pre',
queryUpBizPrefix = 'api/sysUtils/queryUpBizPrefix',
}
/**
@ -209,3 +210,11 @@ export const getOrgInfo = () => {
export const uploadPre = (params) => {
return defHttp.post({ url: Api.uploadPre, params }, { isTransformResponse: false });
};
/**
* /
* @param params
*/
export const queryUpBizPrefix = () => {
return defHttp.get({ url: Api.queryUpBizPrefix }, { isTransformResponse: false });
};

View File

@ -1,6 +1,6 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="true">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="EmployeesApplyForm">
@ -12,11 +12,20 @@
<a-col :span="12">
<a-form-item label="头像" v-bind="validateInfos.headPath"
id="BizEmployeesInfoForm-headPath" name="headPath">
<j-image-upload :fileMax="1" :bizPath="`employeesHead`" text="头像"
<j-image-upload :fileMax="1" :bizPath="upBizPrefix + '/ygxx/yg'" text="头像"
v-model:value="formData.headPath"></j-image-upload>
</a-form-item>
</a-col>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
<JFormContainer :disabled="true" style="margin-top:-63px ;">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="EmployeesApplyForm">
<a-row class="card-class">
<a-col :span="12">
<a-form-item label="姓名" v-bind="validateInfos.name" id="EmployeesApplyForm-name"
name="name">
@ -329,6 +338,7 @@ import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../BizEmployeesInfo.api';
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import { queryUpBizPrefix } from '/@/api/common/api'
const props = defineProps({
formDisabled: { type: Boolean, default: false },
@ -340,6 +350,7 @@ const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const ageVal = ref()
const upBizPrefix = ref('')
const formData = reactive<Record<string, any>>({
id: '',
name: '',
@ -505,6 +516,12 @@ function handleComputedAge(ageText) {
return age >= 0 ? age : 0; //
}
onMounted(() => {
queryUpBizPrefix().then(res => {
upBizPrefix.value = res.result
})
})
defineExpose({
add,
edit,

View File

@ -32,8 +32,8 @@
<a-form-item label="图标" v-bind="validateInfos.pic" id="ElderTagForm-pic" name="pic">
<!-- <JImageUploadToOpe v-if="opeType == 'dmlook'" :fileMax="1" v-model:value="dmlookVal">
</JImageUploadToOpe> -->
<JImageUploadToOpe :toOpe="true" :bizPath="'eldertag'" :fileMax="1" v-model:value="formData.pic"
:disabled="!!formData.id || !isMain">
<JImageUploadToOpe :toOpe="true" :bizPath="upBizPrefix + '/zzxx/zzbq'" :fileMax="1"
v-model:value="formData.pic" :disabled="!!formData.id || !isMain">
</JImageUploadToOpe>
</a-form-item>
</a-col>
@ -41,8 +41,8 @@
<a-form-item label="焦点图标" v-bind="validateInfos.picFocus" id="ElderTagForm-picFocus" name="picFocus">
<!-- <JImageUploadToOpe v-if="opeType == 'dmlook'" :fileMax="1" v-model:value="dmlookVal">
</JImageUploadToOpe> -->
<JImageUploadToOpe :toOpe="true" :bizPath="'eldertag'" :fileMax="1" v-model:value="formData.picFocus"
:disabled="!!formData.id || !isMain">
<JImageUploadToOpe :toOpe="true" :bizPath="upBizPrefix + '/zzxx/zzbq'" :fileMax="1"
v-model:value="formData.picFocus" :disabled="!!formData.id || !isMain">
</JImageUploadToOpe>
</a-form-item>
</a-col>
@ -75,6 +75,7 @@ import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue'
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
import JImageUploadToOpe from '/@/components/Form/src/jeecg/components/JImageUploadToOpe.vue';
import { queryUpBizPrefix } from '/@/api/common/api'
const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS
const props = defineProps({
@ -88,6 +89,7 @@ const props = defineProps({
const dmlookVal = ref('')
const defaultBodyPic = import.meta.env.VITE_DEFAULT_ELDER_TAG_BODY_PIC
const defaultEmoPic = import.meta.env.VITE_DEFAULT_ELDER_TAG_EMO_PIC
const upBizPrefix = ref('')
const onPriceKeydown = (e: KeyboardEvent) => {
const key = e.key;
//
@ -258,6 +260,12 @@ defineExpose({
edit,
submitForm,
});
onMounted(() => {
queryUpBizPrefix().then(res => {
upBizPrefix.value = res.result
})
})
</script>
<style lang="less" scoped>
@ -266,15 +274,15 @@ defineExpose({
}
.card-class {
padding-top: 24px;
padding-bottom: 24px;
padding-left: 14px;
padding-right: 14px;
// background-color: rgba(255, 255, 255, 0.9);
background-color: #fcfdff;
border-radius: 10px;
// box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px;
margin-bottom: 14px;
padding-top: 24px;
padding-bottom: 24px;
padding-left: 14px;
padding-right: 14px;
// background-color: rgba(255, 255, 255, 0.9);
background-color: #fcfdff;
border-radius: 10px;
// box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px;
margin-bottom: 14px;
}
</style>

View File

@ -18,7 +18,7 @@
</a-form>
</template>
</JFormContainer>
<JFormContainer :disabled="true" style="margin-top:-60px ;">
<JFormContainer :disabled="true" style="margin-top:-63px ;">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="NuInvoicingFkdMainForm">
@ -61,12 +61,14 @@
</a-col>
<a-col :span="12">
<a-form-item label="付款凭证" v-bind="validateInfos.fkpz" id="NuInvoicingFkdMainForm-fkpz" name="fkpz">
<j-image-upload :fileMax="disabled ? 1 : 0" v-model:value="formData.fkpz"></j-image-upload>
<j-image-upload :fileMax="disabled ? 1 : 0" :bizPath="upBizPrefix + '/jxc/fkd'"
v-model:value="formData.fkpz"></j-image-upload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="发票" v-bind="validateInfos.fp" id="NuInvoicingFkdMainForm-fp" name="fp">
<j-image-upload :fileMax="disabled ? 1 : 0" v-model:value="formData.fp"></j-image-upload>
<j-image-upload :fileMax="disabled ? 1 : 0" :bizPath="upBizPrefix + '/jxc/fkd'"
v-model:value="formData.fp"></j-image-upload>
</a-form-item>
</a-col>
</a-row>
@ -91,7 +93,7 @@
</template>
</JFormContainer>
<CgdTableList :cgdId="cgdIdsValue" :zongJinE="formData.totalPrice"/>
<CgdTableList :cgdId="cgdIdsValue" :zongJinE="formData.totalPrice" />
</a-spin>
</template>
@ -105,6 +107,7 @@ import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
import CgdTableList from './CgdTableList.vue';
import { queryUpBizPrefix } from '/@/api/common/api'
const props = defineProps({
formDisabled: { type: Boolean, default: false },
@ -114,6 +117,7 @@ const props = defineProps({
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const upBizPrefix = ref('')
const formData = reactive<Record<string, any>>({
id: '',
fkdNo: '',
@ -247,6 +251,12 @@ defineExpose({
edit,
submitForm,
});
onMounted(() => {
queryUpBizPrefix().then(res => {
upBizPrefix.value = res.result
})
})
</script>
<style lang="less" scoped>

View File

@ -123,34 +123,34 @@
</a-col>
<a-col :span="24" v-show="directiveMediaBtnValue == 1">
<JImageUploadtz v-if="opeType == 'dmlook'"
:value="!!formData.previewFileSmall ? formData.previewFileSmall : defaultPreSmallPic"
maxCount="1" :disabled="disabled || !isMain" />
:value="!!formData.previewFileSmall ? formData.previewFileSmall : defaultPreSmallPic" 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=" formData.mp3File" maxCount="1"
<JUploadMP3 v-if="opeType == 'dmlook'" :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=" formData.mp4File" maxCount="1"
fileType="mp4" :disabled="disabled || !isMain" />
<JUploadMP4 v-if="opeType == 'dmlook'" :value="formData.mp4File" maxCount="1" fileType="mp4"
:disabled="disabled || !isMain" />
<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 ? formData.immediateFile : defaultImmediatePic"
maxCount="1" :disabled="disabled || !isMain" />
:value="!!formData.immediateFile ? formData.immediateFile : defaultImmediatePic" 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 ? formData.immediateFileFocus : defaultImmediatePic"
:value="!!formData.immediateFileFocus ? formData.immediateFileFocus : defaultImmediatePic"
maxCount="1" :disabled="disabled || !isMain" />
<JImageUploadtz v-else v-model:value="formData.immediateFileFocus" :toOpe="true"
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" :disabled="disabled || !isMain" />
@ -203,6 +203,7 @@ import DirectiveRadioCom from './DirectiveRadioCom.vue'
import { QuestionCircleOutlined } from '@ant-design/icons-vue';
import { DownOutlined } from '@ant-design/icons-vue';
import { uploadUrl } from '/@/api/common/api';
import { queryUpBizPrefix } from '/@/api/common/api'
const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS
const showDescription = ref(false);
@ -215,6 +216,7 @@ const defaultPrePic = import.meta.env.VITE_DEFAULT_DIRECTIVE_PRE_PIC
const defaultPreSmallPic = import.meta.env.VITE_DEFAULT_DIRECTIVE_PRESMALL_PIC
const defaultImmediatePic = import.meta.env.VITE_DEFAULT_DIRECTIVE_IM_PIC
const fileList = ref([])
const upBizPrefix = ref('')
const onPriceKeydown = (e: KeyboardEvent) => {
const key = e.key;
//
@ -411,7 +413,7 @@ function upEmotionTagsDictCode(v_) {
}
watch([instructionComDictCode, categoryComDictCode, typeComDictCode, cycleTypeComDictCode, upBodyTagsComDictCode, upEmotionTagsComDictCode], () => {
watch([instructionComDictCode, categoryComDictCode, typeComDictCode, cycleTypeComDictCode, upBodyTagsComDictCode, upEmotionTagsComDictCode, upBizPrefix], () => {
// formComputedData
}, { deep: true });
@ -440,7 +442,7 @@ const formComputedData = computed(() => {
return {
// mediaFileSavePath: `directive/${instructionName}/${categoryName}/${typeName}/${cycleTypeName}/${formData.directiveName}`,
mediaFileSavePath: `directive/${instructionName}/${categoryName}/${typeName}`,
mediaFileSavePath: upBizPrefix.value + `/directive/${instructionName}/${categoryName}/${typeName}`,
instructionName,
categoryName,
typeName,
@ -667,7 +669,9 @@ function mediaBtnChanged(v_) {
}
onMounted(() => {
queryUpBizPrefix().then(res => {
upBizPrefix.value = res.result
})
})
defineExpose({