uploadEditMyHonor.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654
  1. <template>
  2. <view class="page_body">
  3. <!-- 头部 -->
  4. <nav-bar height="96" :title="state.title" :onlyTitle="true" :showHeaderborder="true" @GoBack="GoBack"></nav-bar>
  5. <view :class="['page_content',{'view':state.type=='view'}]">
  6. <uni-forms ref="valiForm" :class="['forms_style',{'view':state.type=='view'}]" :rules="rules" :model="state.formData" border labelWidth="160rpx" label-align="right">
  7. <uni-forms-item label="荣誉类型:" required name="honorTypeValue">
  8. <template v-if="state.type=='view'">{{state.formData.honorTypeValue}}</template>
  9. <uni-data-select v-else v-model="state.formData.honorTypeValue" :clear="false" placeholder="请选择荣誉类型" :disabled="state.type=='upload'?false:true" :localdata="state.honorTypeData" style="width: 400rpx;" @change="ChangeDataSelect"></uni-data-select>
  10. </uni-forms-item>
  11. <template v-for="item in state.dynamicFormData">
  12. <uni-forms-item :label="`${item.dictName}:`" required :name="`input_${item.id}`">
  13. <template v-if="state.type=='view'">
  14. <template v-if="item.dictType == 1 || item.dictType == 2">{{state.formData[`${item.dictShowType}_${item.id}`]}}</template>
  15. <uni-dateformat v-else :date="state.formData[`${item.dictShowType}_${item.id}`]" format="yyyy-MM-dd"></uni-dateformat>
  16. </template>
  17. <template v-else>
  18. <uni-easyinput v-if="item.dictType == 1" v-model="state.formData[`${item.dictShowType}_${item.id}`]" :disabled="item.onlyRead == 1" :maxlength="100" :placeholder="`请输入${item.dictName}`" :style="{width: item.dictName=='获奖人'?'400rpx':''}" />
  19. <uni-data-select v-else-if="item.dictType == 2" v-model="state.formData[`${item.dictShowType}_${item.id}`]" :clear="false" :placeholder="`请选择${item.dictName}`" :localdata="item.dictList" style="width: 400rpx;"></uni-data-select>
  20. <uni-datetime-picker v-else type="date" :end="todayStr" :clear-icon="false" v-model="state.formData[`${item.dictShowType}_${item.id}`]" placeholder=" " style="width: 400rpx;" />
  21. </template>
  22. </uni-forms-item>
  23. </template>
  24. <uni-forms-item label="荣誉证书:" required name="certPicDatas">
  25. <uv-upload :maxCount="state.type=='view'?state?.formData?.certPicDatas?.length:50" :deletable="state.type!='view'" :fileList="state.formData.certPicDatas" width="240rpx" height="140rpx" multiple :previewFullImage="true" @AfterRead="AfterRead" @delete="DeletePic">
  26. <view class="upload_btn" v-if="state.type!='view'">
  27. <uni-icons class="upload_btn_icon" type="plusempty"></uni-icons>
  28. <view class="upload_btn_text">上传荣誉证书</view>
  29. </view>
  30. </uv-upload>
  31. </uni-forms-item>
  32. <uni-forms-item label="佐证材料:">
  33. <template v-if="state.type=='view'">
  34. <view class="upload_file_list_item" v-for="item in state.formData.docDatas" :key="item.createdAt">
  35. <image class="list_item_icon" src="/static/image/icon/file.png"></image>
  36. <view class="list_item_content">
  37. <view class="item_content_title">{{item.documentName}}</view>
  38. <view class="item_content_info">
  39. <view class="size">{{item.fileSize}}</view>
  40. <view class="time">{{item.createdAt}}</view>
  41. </view>
  42. </view>
  43. <view class="list_item_preview" @click="PreviewFile(item)">预览</view>
  44. </view>
  45. </template>
  46. <template v-else>
  47. <!-- maxSize:单文件上限 MB;0 表示不限制 maxCount:列表最多文件数 -->
  48. <kex-file-uploader ref="fileUploader" mode="headless" :max-count="20" :maxSize="100"></kex-file-uploader>
  49. <view class="upload_file_btn" @click="ChooseUploadFile">
  50. <uni-icons class="upload_file_btn_icon" type="plusempty"></uni-icons>
  51. <view class="upload_file_btn_text">上传佐证材料</view>
  52. </view>
  53. <view class="upload_file_list_item" v-for="item in state.formData.docDatas" :key="item.createdAt" @click="PreviewFile(item)">
  54. <image class="list_item_icon" src="/static/image/icon/file.png"></image>
  55. <view class="list_item_content">
  56. <view class="item_content_title">{{item.documentName}}</view>
  57. <view class="item_content_info">
  58. <view class="size">{{item.fileSize}}</view>
  59. <view class="time">{{item.createdAt}}</view>
  60. </view>
  61. </view>
  62. <uni-icons class="list_item_close" type="close" @click.stop="state.formData.docDatas.splice(i, 1)"></uni-icons>
  63. </view>
  64. </template>
  65. </uni-forms-item>
  66. <uni-forms-item label="驳回原因 :" v-if="state.formData.overruleContent">
  67. {{state.formData.overruleContent}}
  68. </uni-forms-item>
  69. <uni-forms-item label="审核人:" v-if="state.type=='view'">
  70. {{state.formData.reviewTeacherName}}
  71. </uni-forms-item>
  72. </uni-forms>
  73. </view>
  74. <view class="page_foot" v-if="state.type!='view'"><button class="btn_submit" type="primary" :loading="state.loading" @click="honorTypeConfirm">确认</button></view>
  75. </view>
  76. <!-- 提示框 -->
  77. <popupPreviewFile ref="popupDialogRef" :filePath="state.previewPopup.filePath"></popupPreviewFile>
  78. <!-- 文件、图片下载 -->
  79. <ss-download ref="ssdownload"></ss-download>
  80. </template>
  81. <script setup>
  82. import navBar from '@/components/navBar.vue';
  83. import uniForms from '@/uni_modules/uni-forms/components/uni-forms/uni-forms.vue';
  84. import uniFormsItem from '@/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue';
  85. import uniEasyinput from '@/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue';
  86. import uniDataSelect from '@/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue';
  87. import uniDatetimePicker from '@/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue';
  88. import uniDateformat from '@/uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat.vue';
  89. import uvUpload from '@/uni_modules/uv-upload/components/uv-upload/uv-upload.vue';
  90. import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue';
  91. import ssDownload from '@/uni_modules/ss-download/components/ss-download/ss-download.vue';
  92. import popupPreviewFile from '@/components/popupPreviewFile.vue';
  93. import {queryHonorTypeDictList,queryHonorDataDetailById,addHonorCertData,updateHonorCertData} from '@/reqApi/teacherHonor.js';
  94. import { unioformDateTransform,fileSizeConvert } from '@/common/common.js';
  95. import config from '@/config.js'; // 引入配置文件
  96. import {
  97. reactive,
  98. ref,
  99. onMounted,
  100. nextTick
  101. } from 'vue';
  102. import { onLoad } from '@dcloudio/uni-app';
  103. const state = reactive({
  104. id:'',//荣誉类型id
  105. title:'',//标题
  106. type:'',
  107. formData: {
  108. honorTypeValue: '',//荣誉类型id
  109. certPicDatas:[],//荣誉证书
  110. docDatas:[],//佐证材料
  111. overruleContent:'',//驳回原因
  112. reviewTeacherName:''//审核人
  113. },
  114. honorTypeData:[],//荣誉类型下拉
  115. dynamicFormData:[],//动态表单
  116. dictDatas:[],//动态表单传参
  117. loading:false,
  118. previewPopup:{
  119. filePath:''
  120. }
  121. })
  122. const todayStr = ref(new Date().toISOString().split('T')[0]);
  123. const rules = ref({
  124. honorTypeValue: { rules: [{ required: true, errorMessage: '请选择荣誉类型' }] },
  125. certPicDatas: { rules: [{ required: true, errorMessage: '请上传荣誉证书' }] },
  126. });
  127. const fileUploader = ref(null);
  128. const popupDialogRef = ref(null);
  129. const ssdownload = ref(null);
  130. const token = ref(uni.getStorageSync('token'));
  131. const apiBaseUrl = ref('');
  132. onLoad(async(option) => {
  133. state.id = option.id;
  134. state.type = option.type;
  135. getApiBaseUrl();
  136. uni.setStorageSync('isLoadMyHonorList', false);//返回列表页是否重新加载我的荣誉列表
  137. await GetHonorTypeDictList(option.type);//查询荣誉类型下拉数据
  138. if(option.type == 'upload'){
  139. state.title = '上传荣誉';
  140. }else{
  141. if(option.type == 'edit'){
  142. state.title = '修改荣誉';
  143. }else {
  144. state.title = decodeURIComponent(option.honorName);
  145. }
  146. GetHonorDataDetailById();
  147. }
  148. })
  149. //上传接口地址
  150. const getApiBaseUrl = () => {
  151. if (process.env.NODE_ENV === 'development') {//本地开发环境
  152. const SYSTEM_INFO = uni.getSystemInfoSync();//获取系统信息的同步接口
  153. apiBaseUrl.value = SYSTEM_INFO.uniPlatform === 'web' ? config.proxyBaseUrl:config.apiBaseUrl;//读取配置文件的apiBaseUrl变量
  154. } else {//生产/测试环境
  155. apiBaseUrl.value = config.apiBaseUrl
  156. }
  157. }
  158. //查询荣誉类型下拉数据
  159. const GetHonorTypeDictList = async (type) => {
  160. await queryHonorTypeDictList().then(res=>{
  161. if(res.code == 200){
  162. const honorTypeData = res?.data?.honorTypeDictBOS || [];
  163. honorTypeData.forEach(item=>{
  164. item.value = item.id;
  165. item.text = item.honorTypeName;
  166. const honorTypeDictData = item?.honorTypeDictBOS || [];
  167. honorTypeDictData.forEach(itemList=>{
  168. if(itemList.dictType == 2){//单选
  169. itemList.dictShowType = 'radio';
  170. const dictList = itemList?.dictList || [];
  171. dictList.forEach(dic=>{
  172. dic.text = dic.dictName;
  173. dic.value = dic.id
  174. })
  175. }else if(itemList.dictType == 1){//输入框
  176. itemList.dictShowType = 'input';
  177. }else{//日期
  178. itemList.dictShowType = 'datetime';
  179. }
  180. })
  181. })
  182. state.honorTypeData = honorTypeData;//荣誉类型下拉数据;
  183. if(type == 'upload'){//荣誉类型默认值
  184. state.formData.honorTypeValue = honorTypeData?.[0].value || '';//荣誉类型默认值
  185. const honorTypeDictData = honorTypeData?.[0]?.honorTypeDictBOS || [];
  186. SetDynamicFormData(honorTypeDictData);//设置动态表单
  187. }
  188. }else{
  189. state.honorTypeData = [];
  190. }
  191. })
  192. }
  193. //设置动态表单的值
  194. const SetDynamicFormData = (honorTypeDictData) => {
  195. honorTypeDictData.forEach(item=>{
  196. if(item.dictType == 2){//单选
  197. state.formData[`${item.dictShowType}_${item.id}`] = '';
  198. rules.value[`${item.dictShowType}_${item.id}`] = { rules: [{ required: true, errorMessage: `请选择${item.dictName}` }] };
  199. }else {//输入框 日期
  200. const value = item?.dictList?.[0]?.dictName || '';
  201. state.formData[`${item.dictShowType}_${item.id}`] = value;
  202. const placeholder = item.dictType == 1 ? '请输入' : '请选择';
  203. rules.value[`${item.dictShowType}_${item.id}`] = { rules: [{ required: true, errorMessage: `${placeholder}${item.dictName}` }] };
  204. }
  205. })
  206. state.dynamicFormData = honorTypeDictData;//动态表单
  207. }
  208. //改变荣誉类型
  209. const ChangeDataSelect = (val) => {
  210. const selectedHonorType = state.honorTypeData.find(item=>item.id == val);
  211. const honorTypeDictData = selectedHonorType?.honorTypeDictBOS || [];
  212. SetDynamicFormData(honorTypeDictData)
  213. }
  214. //查看荣誉详情接口
  215. const GetHonorDataDetailById = () => {
  216. queryHonorDataDetailById(state.id).then(res=>{
  217. if(res.code == 200){
  218. const honorTypeId = res?.data?.honorTypeId || '';
  219. const honorTypeName = res?.data?.honorTypeName || '';
  220. state.formData.honorTypeValue = state.type=='view'?honorTypeName:honorTypeId;//荣誉类型默认值
  221. //给动态表单设置值
  222. const selectedHonorType = state.honorTypeData.find(item=>item.id == honorTypeId);
  223. const honorTypeDictData = selectedHonorType?.honorTypeDictBOS || [];
  224. state.dynamicFormData = honorTypeDictData;//动态表单
  225. const honorDataList = res?.data?.honorDataList || '';
  226. honorDataList.forEach(item=>{
  227. if(item.dictType == 2){//单选
  228. state.formData[`radio_${item.honorDictLibNameId}`] = state.type!='view'?item.honorDictLibValueId:item.honorDictLibValue;
  229. }else {//输入框 日期
  230. const type = item.dictType == 1 ? 'input' : 'datetime';
  231. state.formData[`${type}_${item.honorDictLibNameId}`] = item.honorDictLibValue;
  232. }
  233. })
  234. const honorDataCertList = res?.data?.honorDataCertList || [];//荣誉证书
  235. state.formData.certPicDatas = honorDataCertList.map(item=>({
  236. ...item,
  237. url:item.picUrl
  238. }));//荣誉证书
  239. state.formData.docDatas = res?.data?.supportDocumentList || [];//佐证材料
  240. state.formData.overruleContent = res?.data?.overruleContent || '';//驳回原因
  241. state.formData.reviewTeacherName = res?.data?.reviewTeacherName || '';//审核人
  242. }
  243. })
  244. }
  245. //提交
  246. const honorTypeConfirm = () => {
  247. for (const key in rules.value) {
  248. if (state.formData?.[key] === "" || state.formData?.[key] === null || state.formData?.[key]&&state.formData?.[key]?.length === 0) {
  249. const errorMessage = rules.value[key].rules[0].errorMessage;
  250. uni.showToast({
  251. title: errorMessage,
  252. icon: 'none'
  253. })
  254. return false
  255. }
  256. }
  257. state.loading = true;
  258. const certPicDatas = state.formData.certPicDatas.map(item=>({
  259. name:item.picName,
  260. url:item.url,
  261. fileSize:item?.fileSize || '',
  262. time:item?.time || '',
  263. }))
  264. const docDatas = state.formData.docDatas.map(item=>({
  265. name:item.documentName,
  266. url:item.documentUrl,
  267. fileSize:item.fileSize,
  268. time:item.createdAt,
  269. }))
  270. const dictDatas = [];
  271. state.dynamicFormData.forEach(item=>{
  272. if(item.dictType == 2){//单选
  273. const valueData = state.formData[`${item.dictShowType}_${item.id}`];
  274. const dictList = item?.dictList || [];
  275. const valueName = dictList.find(dic=>dic.id == valueData);
  276. dictDatas.push({
  277. keyId: item.id,
  278. keyName: item.dictName,
  279. valueId: valueData,
  280. valueName: valueName?.dictName || ''
  281. })
  282. }else{
  283. let valueData = state.formData[`${item.dictShowType}_${item.id}`];
  284. if(state.type == 'upload' && Number(item.dictType) === 0){
  285. valueData = valueData + ' 00:00:00'
  286. }
  287. const dictList = item?.dictList || [];
  288. dictDatas.push({
  289. keyId: item.id,
  290. keyName: item.dictName,
  291. valueId: dictList?.[0]?.id,
  292. valueName: valueData
  293. })
  294. }
  295. })
  296. let params = {
  297. certPicDatas: certPicDatas,
  298. dictDatas: dictDatas,
  299. docDatas:docDatas,
  300. honorTypeId: state.formData.honorTypeValue
  301. }
  302. if(state.id){
  303. params.id = state.id;
  304. updateHonorCertData(params).then(res=>{
  305. if(res.code == 200){
  306. uni.showToast({
  307. title: '修改成功!',
  308. icon: 'none'
  309. })
  310. uni.setStorageSync('isLoadMyHonorList', true);//返回列表页是否重新加载我的荣誉列表
  311. GoBack();
  312. }
  313. }).finally(()=>{
  314. state.loading = false;
  315. })
  316. }else{//新建
  317. addHonorCertData(params).then(res=>{
  318. if(res.code == 200){
  319. uni.showToast({
  320. title: '上传成功!',
  321. icon: 'none'
  322. })
  323. uni.setStorageSync('isLoadMyHonorList', true);//返回列表页是否重新加载我的荣誉列表
  324. GoBack();
  325. }
  326. }).finally(()=>{
  327. state.loading = false;
  328. })
  329. }
  330. }
  331. // 删除图片
  332. const DeletePic = (event) => {
  333. state.formData.certPicDatas.splice(event.index, 1);
  334. }
  335. // 新增图片
  336. const AfterRead = async(event) => {
  337. // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
  338. let lists = [].concat(event.file);
  339. let fileListLen = state.formData.certPicDatas.length;
  340. lists.map((item) => {
  341. state.formData.certPicDatas.push({
  342. ...item,
  343. status: 'uploading',
  344. message: '上传中1'
  345. })
  346. })
  347. for (let i = 0; i < lists.length; i++) {
  348. const result = await uploadFilePromise(lists[i].url);
  349. if(result.code == 200){
  350. let item = state.formData.certPicDatas[fileListLen]
  351. state.formData.certPicDatas.splice(fileListLen, 1, Object.assign(item, {
  352. status: 'success',
  353. message: '',
  354. picName: result?.data?.fileName,
  355. url:result?.data?.url,
  356. fileSize:fileSizeConvert(lists?.[i]?.size || 0),
  357. time:unioformDateTransform(new Date())
  358. }))
  359. fileListLen++
  360. }
  361. }
  362. }
  363. const uploadFilePromise = (url) => {
  364. return new Promise((resolve, reject) => {
  365. let a = uni.uploadFile({
  366. url: `${apiBaseUrl.value}/api/v1/teach/oss/file/oss/upload_filesSele`,
  367. filePath: url,
  368. name: 'file',
  369. header:{
  370. Authorization:token.value
  371. },
  372. success: (res) => {
  373. const resdata = JSON.parse(res.data);
  374. resolve(resdata)
  375. }
  376. });
  377. })
  378. }
  379. //上传 图片 视频 文档
  380. const ChooseUploadFile = () => {
  381. fileUploader.value.chooseFile({//选择上传文件
  382. count: 1,
  383. success: (files) => {
  384. fileUploader.value.upload({//上传单个文件
  385. url:`${apiBaseUrl.value}/api/v1/teach/oss/file/oss/upload_filesSele`,
  386. file: files[0],
  387. name: 'file',
  388. header: {Authorization: token.value},
  389. method: 'POST',
  390. withCredentials: true, // iOS 本地测远程且要带 cookie
  391. success: (res) => {
  392. const result = JSON.parse(res.result);
  393. state.formData.docDatas.push({
  394. documentName:result.data.fileName,
  395. documentUrl:result.data.url,
  396. fileSize:fileSizeConvert(files?.[0]?.size || 0),
  397. createdAt:unioformDateTransform(new Date())
  398. })
  399. }
  400. });
  401. }
  402. })
  403. }
  404. //预览
  405. const PreviewFile = (item) => {
  406. const fileType = item?.documentName?.split('.')?.[1] || '';
  407. if(IsImageExts(fileType)){//图片预览
  408. state.previewPopup.filePath = item.documentUrl;
  409. popupDialogRef.value.OpenDialog();
  410. }else{//文件预览
  411. ToDownloadFile(item)
  412. }
  413. }
  414. //判断是否是图片
  415. const IsImageExts = (fileType) => {
  416. const type = fileType?.toLowerCase();
  417. const imageExts = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp','svg', 'tiff', 'tif', 'ico', 'avif', 'heic', 'heif'];
  418. return imageExts.includes(type)
  419. }
  420. //判断是不是视频
  421. const IsVideoExts = (fileType) => {
  422. const type = fileType?.toLowerCase();
  423. const videoExts = [
  424. 'mp4', 'avi', 'mov', 'wmv', 'flv', 'mkv',
  425. 'webm', 'm4v', '3gp', 'mpeg', 'mpg', 'mts',
  426. 'm2ts', 'ts', 'vob', 'ogv', 'ogg', 'rm', 'rmvb'
  427. ];
  428. return videoExts.includes(type)
  429. }
  430. //下载
  431. const ToDownloadFile = (item) => {
  432. const fileType = item?.documentName?.split('.')?.[1] || '';
  433. let type = '';
  434. if(IsImageExts(fileType)){
  435. type = '1';//1:图片 2 文档 3 视频
  436. }else if(IsVideoExts(fileType)){
  437. type = '3';
  438. }else{
  439. type = '2';
  440. }
  441. ssdownload?.value?.toDownload({
  442. type:fileType,
  443. src:item.documentUrl,
  444. fileName:item.documentName
  445. });
  446. }
  447. const GoBack = () => {
  448. uni.navigateBack({
  449. delta: 1
  450. });
  451. }
  452. </script>
  453. <style lang="scss" scoped>
  454. .page_body{
  455. height: 100%;
  456. min-height: auto;
  457. overflow: hidden;
  458. }
  459. .page_content{
  460. height: calc(100% - 250rpx);
  461. overflow: auto;
  462. &.view{
  463. height: calc(100% - 96rpx);
  464. }
  465. }
  466. .forms_style{
  467. &.view{
  468. :deep(.uni-forms-item){
  469. &.uni-forms-item--border{
  470. .uni-forms-item__label{
  471. padding-top: 0rpx;
  472. }
  473. }
  474. }
  475. }
  476. :deep(.uni-forms-item){
  477. &.uni-forms-item--border{
  478. border-top: 0;
  479. border-bottom: 2rpx solid #F3F3F3;
  480. .uni-forms-item__label{
  481. align-items: flex-start;
  482. padding-top: 16rpx;
  483. }
  484. }
  485. .uv-upload__wrap{
  486. // flex-direction: row-reverse;
  487. gap: 24rpx 32rpx;
  488. .uv-upload__wrap__preview{
  489. background-color: #FFFFFF;
  490. border-radius: 20rpx;
  491. border: 2rpx solid #CED1D8;
  492. box-sizing: border-box;
  493. margin: 0;
  494. .uv-upload__deletable{
  495. top:10rpx;
  496. right: 10rpx;
  497. background-color: transparent;
  498. height: 32rpx;
  499. width: 32rpx;
  500. border: 2rpx solid #999999;
  501. border-radius: 50%;
  502. .uvicon-close{
  503. color:#999999 !important;
  504. font-size: 11rpx !important;
  505. }
  506. }
  507. .uv-upload__deletable__icon{
  508. transform: scale(1);
  509. top:50%;
  510. right: 50%;
  511. transform: translate(50%, -50%);
  512. }
  513. .uv-upload__success{
  514. border-width: 20rpx;
  515. }
  516. }
  517. .upload_btn{
  518. width: 240rpx;
  519. height: 140rpx;
  520. background-color: #FAFBFF;
  521. border-radius: 20rpx;
  522. border: 2rpx solid #CCCED4;
  523. box-sizing: border-box;
  524. display: flex;
  525. flex-direction: column;
  526. align-items: center;
  527. justify-content: center;
  528. .upload_btn_icon{
  529. font-size: 40rpx !important;
  530. color: #CCCED4 !important;
  531. }
  532. .upload_btn_text{
  533. margin-top: 16rpx;
  534. font-weight: 400;
  535. font-size: 24rpx;
  536. color: #CCCED4;
  537. }
  538. }
  539. }
  540. .upload_file_btn{
  541. width: 100%;
  542. height: 120rpx;
  543. display: flex;
  544. justify-content: center;
  545. flex-direction: column;
  546. align-items: center;
  547. background-color: #FAFBFF;
  548. border-radius: 20rpx;
  549. border: 2rpx dashed #CCCED4;
  550. .upload_file_btn_icon{
  551. font-size: 40rpx !important;
  552. color: #CCCED4 !important;
  553. }
  554. .upload_file_btn_text{
  555. font-weight: 400;
  556. font-size: 24rpx;
  557. color: #CCCED4;
  558. margin-top: 8rpx;
  559. }
  560. }
  561. .upload_file_list_item{
  562. display: flex;
  563. align-items: center;
  564. width: 100%;
  565. min-height: 120rpx;
  566. padding: 20rpx 24rpx;
  567. background-color: #FFFFFF;
  568. border-radius: 20rpx;
  569. border: 2rpx solid #EBEEF5;
  570. box-sizing: border-box;
  571. margin-top: 24rpx;
  572. .list_item_icon {
  573. width: 80rpx;
  574. height: 80rpx;
  575. margin-right: 20rpx;
  576. flex-shrink: 0;
  577. }
  578. .list_item_content {
  579. flex: 1;
  580. // width: 0;
  581. // overflow: hidden;
  582. .item_content_title {
  583. width: 100%;
  584. font-weight: 500;
  585. font-size: 28rpx;
  586. color: #333333;
  587. word-break: break-all;
  588. // white-space: nowrap;
  589. // overflow: hidden;
  590. // text-overflow: ellipsis;
  591. // word-break: keep-all; /* ✅ 防止意外换行 */
  592. }
  593. .item_content_info {
  594. display: flex;
  595. flex-wrap: wrap;
  596. align-items: center;
  597. gap: 4rpx 20rpx;
  598. margin-top: 8rpx;
  599. .size {
  600. font-weight: 400;
  601. font-size: 24rpx;
  602. color: #999999;
  603. flex-shrink: 0;
  604. }
  605. .time {
  606. font-size: 24rpx;
  607. color: #999999;
  608. flex-shrink: 0;
  609. }
  610. }
  611. }
  612. .list_item_close {
  613. flex-shrink: 0;
  614. color: #999999 !important;
  615. font-size: 48rpx !important;
  616. }
  617. .list_item_preview{
  618. flex-shrink: 0;
  619. font-weight: 400;
  620. font-size: 28rpx;
  621. color: #2E64FA;
  622. }
  623. }
  624. }
  625. }
  626. .page_foot{
  627. position: fixed;
  628. left:0;
  629. right: 0;
  630. bottom: 0;
  631. padding: 20rpx 24rpx;
  632. background-color:#FFFFFF;
  633. .btn_submit{
  634. width: 100%;
  635. height: 88rpx;
  636. display: flex;
  637. justify-content: center;
  638. align-items: center;
  639. background-color: #2E64FA !important;
  640. border-radius: 20rpx;
  641. color: #FFFFFF;
  642. font-size: 28rpx;
  643. }
  644. }
  645. </style>