Commit 1efa3d6e by yancanhua

feat: 自定义上传修改

1 parent a6a361df
Pipeline #88 for 1efa3d6e failed in 0 seconds
...@@ -7,33 +7,41 @@ export {} ...@@ -7,33 +7,41 @@ export {}
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
ButtonSelect: typeof import('./components/CustomizeForm/buttonSelect.vue')['default'] ButtonSelect: typeof import('./components/customizeForm/buttonSelect.vue')['default']
CustomizeUploadFile: typeof import('./components/CustomizeForm/customizeUploadFile.vue')['default'] CustomizeUploadFile: typeof import('./components/customizeForm/customizeUploadFile.vue')['default']
Index: typeof import('./components/CustomizeForm/Index.vue')['default'] Index: typeof import('./components/customizeForm/Index.vue')['default']
Layouts: typeof import('./layouts/index.vue')['default'] Layouts: typeof import('./layouts/index.vue')['default']
PageTitle: typeof import('./components/PageTitle.vue')['default'] PageTitle: typeof import('./components/PageTitle.vue')['default']
PageTop: typeof import('./components/PageTop.vue')['default'] PageTop: typeof import('./components/PageTop.vue')['default']
RadioSelect: typeof import('./components/customizeForm/radioSelect.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']
SelectDatePicker: typeof import('./components/CustomizeForm/selectDatePicker.vue')['default'] SelectDatePicker: typeof import('./components/customizeForm/selectDatePicker.vue')['default']
SelectDropdown: typeof import('./components/CustomizeForm/selectDropdown.vue')['default'] SelectDropdown: typeof import('./components/customizeForm/selectDropdown.vue')['default']
VanActionSheet: typeof import('vant/es')['ActionSheet'] VanActionSheet: typeof import('vant/es')['ActionSheet']
VanButton: typeof import('vant/es')['Button'] VanButton: typeof import('vant/es')['Button']
VanCheckbox: typeof import('vant/es')['Checkbox'] VanCheckbox: typeof import('vant/es')['Checkbox']
VanDatePicker: typeof import('vant/es')['DatePicker']
VanEmpty: typeof import('vant/es')['Empty'] VanEmpty: typeof import('vant/es')['Empty']
VanField: typeof import('vant/es')['Field'] VanField: typeof import('vant/es')['Field']
VanForm: typeof import('vant/es')['Form']
VanIcon: typeof import('vant/es')['Icon'] VanIcon: typeof import('vant/es')['Icon']
VanImage: typeof import('vant/es')['Image'] VanImage: typeof import('vant/es')['Image']
VanList: typeof import('vant/es')['List'] VanList: typeof import('vant/es')['List']
VanLoading: typeof import('vant/es')['Loading'] VanLoading: typeof import('vant/es')['Loading']
VanPicker: typeof import('vant/es')['Picker']
VanPopup: typeof import('vant/es')['Popup']
VanProgress: typeof import('vant/es')['Progress'] VanProgress: typeof import('vant/es')['Progress']
VanPullRefresh: typeof import('vant/es')['PullRefresh'] VanPullRefresh: typeof import('vant/es')['PullRefresh']
VanRadio: typeof import('vant/es')['Radio']
VanRadioGroup: typeof import('vant/es')['RadioGroup']
VanSearch: typeof import('vant/es')['Search'] VanSearch: typeof import('vant/es')['Search']
VanSkeleton: typeof import('vant/es')['Skeleton'] VanSkeleton: typeof import('vant/es')['Skeleton']
VanSlider: typeof import('vant/es')['Slider'] VanSlider: typeof import('vant/es')['Slider']
VanTabbar: typeof import('vant/es')['Tabbar'] VanTabbar: typeof import('vant/es')['Tabbar']
VanTabbarItem: typeof import('vant/es')['TabbarItem'] VanTabbarItem: typeof import('vant/es')['TabbarItem']
VanTag: typeof import('vant/es')['Tag'] VanTag: typeof import('vant/es')['Tag']
VanUploader: typeof import('vant/es')['Uploader']
WorkOrderStatusTags: typeof import('./components/WorkOrderStatusTags.vue')['default'] WorkOrderStatusTags: typeof import('./components/WorkOrderStatusTags.vue')['default']
} }
} }
...@@ -66,11 +66,13 @@ function updateData() { ...@@ -66,11 +66,13 @@ function updateData() {
<span v-if="item.required === 1" class="isRequired">*</span> <span v-if="item.required === 1" class="isRequired">*</span>
<span>{{ item.nodeName }}</span> <span>{{ item.nodeName }}</span>
</div> </div>
<div v-if="validationRules.maxCount && validationRules.maxCount.length > 1 && item.interactionType == 'image_upload'" class="titleTip"> <div v-if="validationRules.maxCount && validationRules.maxCount.length > 1 && item.interactionType == 'image_upload'"
class="titleTip">
有损伤请拍摄图片,无损伤请忽略 有损伤请拍摄图片,无损伤请忽略
</div> </div>
</div> </div>
<input ref="fileInputRef" :accept="item.interactionType == 'image_upload' ? 'image/*' : 'video/*'" class="hidden-input" type="file" @change="onFileChange"> <input ref="fileInputRef" :accept="item.interactionType == 'image_upload' ? 'image/*' : 'video/*'"
class="hidden-input" type="file" @change="onFileChange">
<div class="uploadPage"> <div class="uploadPage">
<div v-if="(validationRules.maxCount || 3) > pickerValue.length" class="uploadBox" @click="pickFile"> <div v-if="(validationRules.maxCount || 3) > pickerValue.length" class="uploadBox" @click="pickFile">
<van-icon name="plus" size="24" color="#999999" class="plusBox" /> <van-icon name="plus" size="24" color="#999999" class="plusBox" />
...@@ -83,6 +85,7 @@ function updateData() { ...@@ -83,6 +85,7 @@ function updateData() {
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!