form表单新增业务类型

master
于肖磊 2025-10-23 13:49:37 +08:00
parent 426d165606
commit 6abfd9a946
5 changed files with 16 additions and 7 deletions

View File

@ -83,7 +83,7 @@
</view>
<!-- 上传视频或图片 -->
<view v-else-if="['upload-img', 'upload-video'].includes(item.key)" :class="flex_direction == 'row' ? 'padding-vertical-sm' : ''">
<component-upload :propValue="item.com_data" :propType="item.key == 'upload-img' ? 'img' : ( item.key == 'upload-video' ? 'video' : 'file')" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="item.id" :propMobile="mobile" :propStyle="component_style" :propDirection="flex_direction" @dataCheck="data_check"></component-upload>
<component-upload :propValue="item.com_data" :propType="item.key == 'upload-img' ? 'img' : ( item.key == 'upload-video' ? 'video' : 'file')" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="item.id" :propMobile="mobile" :propStyle="component_style" :propDirection="flex_direction" :propBusiness="propBusiness" @dataCheck="data_check"></component-upload>
</view>
<!-- 定位 -->
<view v-else-if="item.key == 'position'">
@ -117,7 +117,7 @@
<!-- #ifdef H5 || MP-WEIXIN || MP-QQ -->
<!-- 上传文件 -->
<view v-else-if="item.key == 'upload-attachments'">
<component-upload :propValue="item.com_data" propType="file" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="item.id" :propMobile="mobile" :propStyle="component_style" :propDirection="flex_direction" @dataCheck="data_check"></component-upload>
<component-upload :propValue="item.com_data" propType="file" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="item.id" :propMobile="mobile" :propStyle="component_style" :propDirection="flex_direction" :propBusiness="propBusiness" @dataCheck="data_check"></component-upload>
</view>
<!-- #endif -->
<!-- #ifdef APP-PLUS || H5 || MP-WEIXIN -->

View File

@ -66,7 +66,7 @@
</view>
<!-- 上传视频或图片 -->
<view v-else-if="['upload-img', 'upload-video'].includes(data_item.key)" :class="propDirection == 'row' ? 'padding-vertical-sm' : ''">
<component-upload :propValue="data_item.com_data" :propType="data_item.key == 'upload-img' ? 'img' : ( data_item.key == 'upload-video' ? 'video' : 'file')" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="data_item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" @dataCheck="data_check"></component-upload>
<component-upload :propValue="data_item.com_data" :propType="data_item.key == 'upload-img' ? 'img' : ( data_item.key == 'upload-video' ? 'video' : 'file')" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="data_item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" :propBusiness="propBusiness" @dataCheck="data_check"></component-upload>
</view>
<!-- 定位 -->
<view v-else-if="data_item.key == 'position'">
@ -75,7 +75,7 @@
<!-- #ifdef H5 || MP-WEIXIN || MP-QQ -->
<!-- 上传文件 -->
<view v-else-if="data_item.key == 'upload-attachments'">
<component-upload :propValue="data_item.com_data" propType="file" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="data_item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" @dataCheck="data_check"></component-upload>
<component-upload :propValue="data_item.com_data" propType="file" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="data_item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" :propBusiness="propBusiness" @dataCheck="data_check"></component-upload>
</view>
<!-- #endif -->
</view>

View File

@ -83,7 +83,7 @@
</view>
<!-- 上传视频或图片 -->
<view v-else-if="['upload-img', 'upload-video'].includes(item.key)" :class="propDirection == 'row' ? 'padding-vertical-sm' : ''">
<component-upload :propValue="item.com_data" :propType="item.key == 'upload-img' ? 'img' : ( item.key == 'upload-video' ? 'video' : 'file')" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" @dataCheck="data_check"></component-upload>
<component-upload :propValue="item.com_data" :propType="item.key == 'upload-img' ? 'img' : ( item.key == 'upload-video' ? 'video' : 'file')" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" :propBusiness="propBusiness" @dataCheck="data_check"></component-upload>
</view>
<!-- 定位 -->
<view v-else-if="item.key == 'position'">
@ -92,7 +92,7 @@
<!-- #ifdef H5 || MP-WEIXIN || MP-QQ -->
<!-- 上传文件 -->
<view v-else-if="item.key == 'upload-attachments'">
<component-upload :propValue="item.com_data" propType="file" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" @dataCheck="data_check"></component-upload>
<component-upload :propValue="item.com_data" propType="file" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" :propBusiness="propBusiness" @dataCheck="data_check"></component-upload>
</view>
<!-- #endif -->
<view v-if="!isEmpty(item.com_data.common_config.error_text)" class="field-invalid-info">{{ item.com_data.common_config.error_text }}</view>

View File

@ -106,6 +106,10 @@
type: [String, Number],
default: 0,
},
propBusiness: {
type: [String, Number],
default: '',
}
},
data() {
return {
@ -165,6 +169,7 @@
formData: {
action: action,
path_type: self.propPathType,
business: this.propBusiness
},
success: function (res) {
success++;

View File

@ -1,5 +1,5 @@
<template>
<uploads :propKey="propKey" :propType="propType" :propData="form_value" :propMaxNum="max_num" :propPathType="pathType" :propBorderStyle="border_style" @call-back="call_back"></uploads>
<uploads :propKey="propKey" :propType="propType" :propData="form_value" :propMaxNum="max_num" :propPathType="pathType" :propBorderStyle="border_style" :propBusiness="propBusiness" @call-back="call_back"></uploads>
</template>
<script>
@ -37,6 +37,10 @@
propIsCustom: {
type: Boolean,
default: false,
},
propBusiness: {
type: [String, Number],
default: '',
}
},
data() {