submitDetail.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845
  1. <template>
  2. <view class="page_body">
  3. <!-- 头部 -->
  4. <nav-bar height="96" title="提交材料" :onlyTitle="true" :showHeaderborder="true" @GoBack="GoBack"></nav-bar>
  5. <view class="page_content_height">
  6. <view class="page_content padding_btm">
  7. <view class="task_title">{{state?.details?.taskName}}</view>
  8. <view class="task_class_collect">
  9. <text class="class_item">{{state?.details?.departmentName}}</text>
  10. <text class="class_item">{{state?.details?.materialCategoryName}}</text>
  11. <text class="class_item">{{state?.details?.createdBy}}</text>
  12. </view>
  13. <view class="task_time">
  14. <view class="time_day">
  15. <text class="time_item">{{state?.details?.startTime}}</text>
  16. <text class="time_item">至</text>
  17. <text class="time_item">{{state?.details?.endTime}}</text>
  18. <text class="time_item" v-if="state?.details?.taskStatus === 1 && remainingDays(state?.details?.endTime) > 0">剩余{{remainingDays(state?.details?.endTime)}}天</text>
  19. </view>
  20. <view :class="['task_status', statusClassMap[state?.details?.taskStatus]]">
  21. {{taskStatusMap[state?.details?.taskStatus]}}
  22. </view>
  23. </view>
  24. <view :class="['task_desc',{'over':!state.isExpand}]">
  25. 采集要求:{{state?.details?.collectionRequire}}
  26. </view>
  27. <view class="task_desc_all">
  28. 采集要求:{{state?.details?.collectionRequire}}
  29. </view>
  30. <view class="expand_btn" v-if="state.showExpandBtn" @click="toggleExpand"><text
  31. class="expand_text">{{!state.isExpand?'展开':'收起'}}</text><uni-icons class="expand_icon"
  32. :type="!state.isExpand?'down':'up'"></uni-icons></view>
  33. </view>
  34. <!-- 间隔 -->
  35. <view class="row_gap"></view>
  36. <view class="page_content">
  37. <view class="target_status">
  38. <view class="target_tag">
  39. <template v-for="text in ['departmentName','departmentGroupName','subjectName','gradeName','classTypeName','className']">
  40. <text class="info_text" v-if="state?.targetFileList?.[text]" :key="text">{{state?.targetFileList?.[text]}}</text>
  41. </template>
  42. </view>
  43. <template v-if="state?.details?.auditMechanism === 1">
  44. <view v-if="state?.targetFileList?.targetStatus=== 1" class="status_tag notSubmitList">
  45. <text>待提交</text>
  46. </view>
  47. <view v-if="state?.targetFileList?.targetStatus=== 3" class="status_tag reviewReasonList">
  48. <text>已驳回</text>
  49. </view>
  50. <view v-if="state?.targetFileList?.targetStatus=== 2" class="status_tag notReviewList">
  51. <text>审核中</text>
  52. </view>
  53. <view v-if="state?.targetFileList?.targetStatus=== 4" class="status_tag reviewList">
  54. <text>已提交</text>
  55. </view>
  56. </template>
  57. <template v-if="state?.details?.auditMechanism === 0">
  58. <view v-if="state?.targetFileList?.targetStatus=== 1" class="status_tag notSubmitList">
  59. <text>待提交</text>
  60. </view>
  61. <view v-else class="status_tag reviewList">
  62. <text>已提交</text>
  63. </view>
  64. </template>
  65. </view>
  66. <!-- 上传按钮 提交状态 1待提交 2审核中 3已驳回 4已提交 -->
  67. <!-- maxSize:单文件上限 MB;0 表示不限制 maxCount:列表最多文件数 -->
  68. <kex-file-uploader
  69. ref="fileUploader"
  70. v-model="files"
  71. mode="headless"
  72. :max-count="20"
  73. :maxSize="100"
  74. formats="doc,docx,xls,xlsx,ppt,pptx,png,jpg,jpeg,gif,bmp">
  75. </kex-file-uploader>
  76. <view class="upload_box" @click="FileChooseUploader" v-if="state?.targetFileList?.targetStatus === 1 && state?.details?.taskStatus !== 2">
  77. <image class="upload_icon" src="@/static/image/icon/upload_icon.png"></image>
  78. <view class="upload_text">
  79. <view class="upload_title">点击上传文件</view>
  80. <view class="upload_desc">支持Word、Excel、PPT、图片(最大100MB)</view>
  81. </view>
  82. </view>
  83. <view class="upload_box" v-if="(state?.targetFileList?.targetStatus === 2 || state?.targetFileList?.targetStatus === 4) && state?.details?.taskStatus !== 2">
  84. <image class="upload_icon" src="@/static/image/icon/upload_locked.png"></image>
  85. <view class="upload_text">
  86. <view class="upload_title">点击重新编辑可再提交</view>
  87. <view class="upload_desc">支持Word、Excel、PPT、图片(最大100MB)</view>
  88. </view>
  89. </view>
  90. <view class="upload_box" v-if="state?.targetFileList?.targetStatus === 3 && state?.details?.taskStatus !== 2">
  91. <image class="upload_icon" src="@/static/image/icon/upload_locked.png"></image>
  92. <view class="upload_text">
  93. <view class="upload_title">请先删除全部文件,再提交调整后的合规材料</view>
  94. <view class="upload_desc">支持Word、Excel、PPT、图片(最大100MB)</view>
  95. </view>
  96. </view>
  97. <view class="upload_box" v-if="state?.details?.taskStatus == 2">
  98. <image class="upload_icon" src="@/static/image/icon/upload_locked.png"></image>
  99. <view class="upload_text">
  100. <view class="upload_title">已结束不可再提交</view>
  101. <view class="upload_desc">支持Word、Excel、PPT、图片(最大100MB)</view>
  102. </view>
  103. </view>
  104. <view class="list_item" @click="PreviewFile(item)" v-for="item in (state?.targetFileList?.taskTargetFileVos || [])" :Key="item.id">
  105. <image class="file_icon" src="@/static/image/icon/file.png"></image>
  106. <view class="file_info">
  107. <view class="file_name">{{item.fileName}}</view>
  108. <view class="file_size">
  109. <text>{{getFileSize(item.fileSize)}}</text>
  110. <text>{{ item.createTime }}</text>
  111. </view>
  112. </view>
  113. <view class="file_btn">
  114. <text @click.stop="HandleDeleteFileList(item)" :class="['del',{'disabled':state?.targetFileList?.targetStatus === 2 || state?.targetFileList?.targetStatus === 4}]">删除</text>
  115. <text class="download" @click.stop="ToDownloadFile(item)">下载</text>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <view class="page_foot" v-if="state?.details?.taskStatus!=2">
  121. <!-- 提交状态 1待提交 2审核中 3已驳回 4已提交 -->
  122. <template v-if="(state?.targetFileList?.targetStatus === 1 || state?.targetFileList?.targetStatus === 3)">
  123. <view @click="DeleteAllFiles" :class="['del',{'disabled':!state?.targetFileList?.taskTargetFileVos?.length}]">删除全部</view>
  124. <view :class="['submit',{'disabled':state?.targetFileList?.targetStatus === 3}]" @click="UpdateTaskTarget">提交</view>
  125. </template>
  126. <template v-else>
  127. <view class="del disabled">删除全部</view>
  128. <view class="submit" @click="UpdateTaskTargetReset">重新编辑</view>
  129. </template>
  130. </view>
  131. <!-- 删除确认框 -->
  132. <popupDialog ref="popupConfirmDialogRef" :showFootBorder="true" :content="state.confirmDialog.content" @DialogConfirm="DialogConfirm" />
  133. <!-- 提示框 -->
  134. <popupPreviewFile ref="popupDialogRef" :filePath="state.previewPopup.filePath"></popupPreviewFile>
  135. <!-- 文件、图片下载 -->
  136. <ss-download ref="ssdownload"></ss-download>
  137. </view>
  138. </template>
  139. <script setup>
  140. import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue';
  141. import ssDownload from '@/uni_modules/ss-download/components/ss-download/ss-download.vue';
  142. import popupDialog from '@/components/popupDialog.vue';
  143. import popupPreviewFile from '@/components/popupPreviewFile.vue';
  144. import navBar from '@/components/navBar.vue';
  145. import { remainingDays,getFileSize } from '@/common/common.js';
  146. import {getTaskTargetFileList,DeleteFileList,DelTaskTargetFileList,updateTaskTarget,uploadTaskTargetFileList} from '@/reqApi/notification.js';
  147. import {onLoad} from '@dcloudio/uni-app';
  148. import config from '@/config.js'; // 引入配置文件
  149. import {
  150. reactive,
  151. ref,
  152. nextTick,
  153. getCurrentInstance,
  154. onMounted
  155. } from 'vue';
  156. const state = reactive({
  157. taskId: '', //任务id
  158. targetId:'',//
  159. auditStatus:'',//审核状态
  160. showExpandBtn: false, //是否显示展开按钮
  161. isExpand: false, //是否展开
  162. details: {}, //详情信息
  163. targetFileList:{},
  164. confirmDialog:{
  165. type:'',
  166. content:'',
  167. fileUrls:[],
  168. targetFileIds:[]
  169. },
  170. previewPopup:{
  171. filePath:''
  172. }
  173. });
  174. const popupConfirmDialogRef = ref(null);
  175. const popupDialogRef = ref(null);
  176. const fileUploader = ref(null);
  177. const ssdownload = ref(null);
  178. const files = ref([]);
  179. const token = ref(uni.getStorageSync('token'));
  180. const apiBaseUrl = ref('');
  181. const statusClassMap = {
  182. 1: 'status_published',
  183. 2: 'status_closed'
  184. };
  185. const taskStatusMap = {
  186. 1: '进行中',
  187. 2: '已结束'
  188. };
  189. onLoad((option) => {
  190. state.taskId = option.taskId;
  191. state.targetId = option.targetId;
  192. state.auditStatus = Number(option.auditStatus);
  193. })
  194. onMounted(() => {
  195. state.details = uni.getStorageSync('submitMaterialDetailInfo') || {};
  196. uni.removeStorageSync('isLoadSubmitMaterialTaskDetail');//返回是否重新更新任务详情数据
  197. uni.removeStorageSync('isLoadSubmitMaterialIndex');//返回是否重新更新提交材料首页
  198. getApiBaseUrl();//上传接口地址
  199. checkTextOverflow();
  200. GetTaskTargetFileList(true);
  201. });
  202. //上传接口地址
  203. const getApiBaseUrl = () => {
  204. if (process.env.NODE_ENV === 'development') {//本地开发环境
  205. const SYSTEM_INFO = uni.getSystemInfoSync();//获取系统信息的同步接口
  206. apiBaseUrl.value = SYSTEM_INFO.uniPlatform === 'web' ? config.proxyBaseUrl:config.apiBaseUrl;//读取配置文件的apiBaseUrl变量
  207. } else {//生产/测试环境
  208. apiBaseUrl.value = config.apiBaseUrl
  209. }
  210. }
  211. //选择文件上传
  212. const FileChooseUploader = () => {
  213. fileUploader.value.chooseFile({//选择上传文件
  214. count: 1,
  215. success: (files) => {
  216. fileUploader.value.upload({//上传单个文件
  217. url:`${apiBaseUrl.value}/api/v1/teach/oss/file/oss/upload_file_list`,
  218. file: files[0],
  219. name: 'files',
  220. header: {Authorization: token.value},
  221. formData: {
  222. taskId:state.taskId,
  223. targetId:state.targetId
  224. },
  225. method: 'POST',
  226. withCredentials: true, // iOS 本地测远程且要带 cookie
  227. success: (res) => {
  228. const result = JSON.parse(res.result);
  229. const fileInfoList = result.data.map(item => ({
  230. ...item,
  231. filePath: item.fileUrl
  232. }))
  233. UploadTargetFileList(fileInfoList);
  234. }
  235. });
  236. }
  237. })
  238. }
  239. //具体采集任务保存上传的文件地址
  240. const UploadTargetFileList = (fileInfoList) => {
  241. uploadTaskTargetFileList({
  242. fileInfoList,
  243. taskId:state.taskId,
  244. targetId:state.targetId
  245. }).then(res=>{
  246. if (res.code === 200) {
  247. uni.showToast({
  248. title: '上传成功!',
  249. icon: 'none'
  250. });
  251. GetTaskTargetFileList(false,'upload');
  252. }
  253. })
  254. }
  255. //预览
  256. const PreviewFile = (item) => {
  257. console.log(item)
  258. const fileType = item.fileType;
  259. if(IsImageExts(fileType)){//图片预览
  260. state.previewPopup.filePath = item.filePath;
  261. popupDialogRef.value.OpenDialog();
  262. }else{//文件预览
  263. // 1. 先下载文件到本地临时目录
  264. uni.downloadFile({
  265. url: item.filePath,
  266. success: (downloadRes) => {
  267. if (downloadRes.statusCode === 200) {
  268. // 2. 下载成功后,得到临时文件路径 tempFilePath
  269. const localPath = downloadRes.tempFilePath;
  270. // 3. 构造 file 对象(必须有 path)
  271. const fileObj = {
  272. name: item.fileName,
  273. path: localPath, // 关键字段
  274. size: item.fileSize // 可选
  275. };
  276. // 4. 调用 kex-file-uploader 的 openDocument 方法预览
  277. fileUploader.value?.openDocument({
  278. file: fileObj,
  279. success: () => console.log('预览成功'),
  280. fail: (err) => console.error('预览失败', err)
  281. });
  282. }
  283. },
  284. fail: (err) => {
  285. uni.showToast({ title: '文件下载失败', icon: 'none' });
  286. }
  287. });
  288. }
  289. }
  290. //判断是否是图片
  291. const IsImageExts = (fileType) => {
  292. const type = fileType?.toLowerCase();
  293. const imageExts = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp','svg', 'tiff', 'tif', 'ico', 'avif', 'heic', 'heif'];
  294. return imageExts.includes(type)
  295. }
  296. //下载
  297. const ToDownloadFile = (item) => {
  298. const fileType = IsImageExts(item.fileType)?'1':'2';//1:图片 2 文档 3 视频
  299. ssdownload?.value?.toDownload({
  300. type:fileType,
  301. src:item.filePath,
  302. fileName:item.fileName
  303. });
  304. }
  305. const checkTextOverflow = () => {
  306. nextTick(() => {
  307. const instance = getCurrentInstance();
  308. // 安全保护
  309. if (!instance || !instance.proxy) {
  310. // 备用方案:全局查询(要求元素 class 唯一)
  311. let taskDescAllHeight = 0,
  312. taskDescHeight = 0;
  313. const query = uni.createSelectorQuery();
  314. query.select('.task_desc_all').boundingClientRect((rect) => {
  315. taskDescAllHeight = rect?.height || 0;
  316. });
  317. query.select('.task_desc').boundingClientRect((rect) => {
  318. taskDescHeight = rect?.height || 0;
  319. });
  320. query.select('.page_content_data').boundingClientRect((rect) => {
  321. state.searchBoxTop = rect?.top || 0;
  322. });
  323. query.exec(() => {
  324. // 所有回调执行完毕后触发
  325. state.showExpandBtn = taskDescAllHeight > taskDescHeight + 1;
  326. });
  327. return;
  328. }
  329. let taskDescAllHeight = 0,
  330. taskDescHeight = 0;
  331. const query = uni.createSelectorQuery().in(instance.proxy);
  332. query.select('.task_desc_all').boundingClientRect((rect) => {
  333. taskDescAllHeight = rect?.height || 0;
  334. });
  335. query.select('.task_desc').boundingClientRect((rect) => {
  336. taskDescHeight = rect?.height || 0;
  337. });
  338. query.select('.page_content_data').boundingClientRect((rect) => {
  339. state.searchBoxTop = rect?.top || 0;
  340. });
  341. query.exec(() => {
  342. // 所有回调执行完毕后触发
  343. state.showExpandBtn = taskDescAllHeight > taskDescHeight + 1;
  344. });
  345. });
  346. }
  347. // 展开收起切换
  348. const toggleExpand = () => {
  349. state.isExpand = !state.isExpand;
  350. }
  351. //获取当前教师提交的文件列表
  352. const GetTaskTargetFileList = (init,type) => {
  353. getTaskTargetFileList(state.targetId).then(res=>{
  354. if(res.code == 200){
  355. state.targetFileList = res.data || {};
  356. //对比审核状态是否发生变化同时更新缓存数据
  357. if(!init){
  358. uni.setStorageSync('isLoadSubmitMaterialIndex',true);//返回是否重新更新提交材料首页
  359. updateCacheData(type);
  360. }
  361. }
  362. })
  363. }
  364. //单个删除
  365. const HandleDeleteFileList = (item) => {
  366. if(state?.targetFileList?.targetStatus === 2 || state?.targetFileList?.targetStatus === 4){
  367. return false
  368. }
  369. const { filePath, id } = item;
  370. state.confirmDialog = {
  371. type:'del',
  372. content:'是否删除当前文件?',
  373. fileUrls:[filePath],
  374. targetFileIds:[id]
  375. };
  376. popupConfirmDialogRef.value.OpenDialog();
  377. }
  378. //删除全部
  379. const DeleteAllFiles = () => {
  380. let fileUrls = [],targetFileIds = [];
  381. const taskTargetFileVos = state?.targetFileList?.taskTargetFileVos || [];
  382. if(taskTargetFileVos.length > 0){
  383. taskTargetFileVos.forEach(item => {
  384. fileUrls.push(item.filePath);
  385. targetFileIds.push(item.id)
  386. })
  387. state.confirmDialog = {
  388. type:'del',
  389. content:'是否删除全部当前文件?',
  390. fileUrls:fileUrls,
  391. targetFileIds:targetFileIds
  392. };
  393. popupConfirmDialogRef.value.OpenDialog();
  394. }
  395. }
  396. //提交
  397. const UpdateTaskTarget = () => {
  398. const taskTargetFileVos = state?.targetFileList?.taskTargetFileVos || [];
  399. if(taskTargetFileVos.length == 0){
  400. uni.showToast({
  401. title: '请上传提交文件!',
  402. icon: 'none'
  403. });
  404. return false
  405. }
  406. state.confirmDialog = {
  407. type:'submit',
  408. content:'是否提交当前任务?',
  409. fileUrls:[],
  410. targetFileIds:[]
  411. };
  412. popupConfirmDialogRef.value.OpenDialog();
  413. }
  414. //重新提交
  415. const UpdateTaskTargetReset = () => {
  416. state.confirmDialog = {
  417. type:'submit',
  418. content:'是否重新编辑当前任务?',
  419. fileUrls:[],
  420. targetFileIds:[]
  421. };
  422. popupConfirmDialogRef.value.OpenDialog();
  423. }
  424. //确定删除 确定提交
  425. const DialogConfirm = () => {
  426. if(state.confirmDialog.type == 'del'){//单个删除 批量删除
  427. DelFileList();
  428. }else if(state.confirmDialog.type == 'submit') {//提交
  429. submitTaskTarget();
  430. }
  431. }
  432. const DelFileList = async() => {
  433. const res = await DeleteFileList({ fileUrls: state.confirmDialog.fileUrls })
  434. if (res.code !== 200) {
  435. uni.showToast({
  436. title: res.msg,
  437. icon: 'none'
  438. });
  439. return false
  440. }
  441. const resData = await DelTaskTargetFileList({
  442. targetId: state.targetId,
  443. targetFileIds: state.confirmDialog.targetFileIds
  444. })
  445. if (resData.code === 200) {
  446. uni.showToast({
  447. title: '删除成功!',
  448. icon: 'none'
  449. });
  450. GetTaskTargetFileList(false,'del');
  451. }
  452. }
  453. //提交
  454. const submitTaskTarget = () => {
  455. updateTaskTarget(state.targetId).then(res => {
  456. if (res.code === 200) {
  457. uni.showToast({
  458. title: '提交成功!',
  459. icon: 'none'
  460. });
  461. GetTaskTargetFileList(false,'submit');
  462. }
  463. })
  464. }
  465. //对比审核状态是否发生变化同时更新缓存数据
  466. const updateCacheData = (type) => {
  467. const targetStatus = state?.targetFileList?.targetStatus;
  468. let taskTargetList = state?.details?.taskTargetVos || [];
  469. if (state.auditStatus !== targetStatus) {
  470. // 状态变化,删除目标项
  471. taskTargetList.forEach(item=>{
  472. if(item.id == state.targetId){
  473. item.isShow = 1;//删除状态
  474. }
  475. })
  476. } else {
  477. // 状态未变且非提交(上传或删除)操作,更新文件列表
  478. if (type !== 'submit'){
  479. const targetItem = taskTargetList.find(item => item.id === state.targetId);
  480. if (targetItem) {
  481. targetItem.taskTargetFileVos = state?.targetFileList?.taskTargetFileVos || [];
  482. targetItem.fileNum = targetItem.taskTargetFileVos.length;
  483. }
  484. }else{
  485. taskTargetList.forEach(item=>{
  486. if(item.id == state.targetId){
  487. item.isShow = 0;//显示
  488. }
  489. })
  490. }
  491. }
  492. // 关键:将结果写回 state
  493. if (state?.details) {
  494. state.details.taskTargetVos = taskTargetList;
  495. uni.setStorageSync('submitMaterialDetailInfo',state.details);
  496. uni.setStorageSync('isLoadSubmitMaterialTaskDetail',true);//返回是否重新更新任务详情数据
  497. }
  498. }
  499. //返回
  500. const GoBack = () => {
  501. uni.navigateBack({
  502. delta: 1
  503. });
  504. }
  505. </script>
  506. <style scoped lang="scss">
  507. .page_body{
  508. height: 100%;
  509. }
  510. .page_content_height{
  511. display: flex;
  512. flex-direction: column;
  513. width: 100%;
  514. height: calc(100% - 240rpx);
  515. overflow: auto;
  516. }
  517. .page_content {
  518. &.padding_btm {
  519. padding-bottom: 24rpx;
  520. .task_title {
  521. font-weight: 500;
  522. font-size: 32rpx;
  523. color: #333333;
  524. margin-top: 24rpx;
  525. }
  526. .task_class_collect {
  527. display: inline-flex;
  528. align-items: center;
  529. flex-wrap: wrap;
  530. width: 100%;
  531. margin-top: 16rpx;
  532. gap: 16rpx;
  533. .class_item {
  534. font-weight: 400;
  535. font-size: 24rpx;
  536. color: #999999;
  537. }
  538. }
  539. .task_time {
  540. display: flex;
  541. align-items: flex-start;
  542. width: 100%;
  543. margin-top: 16rpx;
  544. .time_day {
  545. display: inline-flex;
  546. align-items: center;
  547. flex-wrap: wrap;
  548. flex: 1;
  549. .time_item {
  550. font-weight: 400;
  551. font-size: 24rpx;
  552. line-height: 48rpx;
  553. color: #999999;
  554. &:nth-child(2) {
  555. margin: 0 8rpx;
  556. }
  557. &:nth-child(4) {
  558. color: #2E64FA;
  559. margin-left: 16rpx;
  560. }
  561. }
  562. }
  563. .task_status {
  564. display: inline-flex;
  565. align-items: center;
  566. height: 48rpx;
  567. padding: 0 12rpx;
  568. border-radius: 8rpx;
  569. font-weight: 400;
  570. font-size: 24rpx;
  571. &.status_pending {
  572. background: rgba(46, 100, 250, 0.1);
  573. color: #2E64FA;
  574. }
  575. &.status_published {
  576. background: rgba(82, 196, 26, 0.1);
  577. color: #2BC644;
  578. }
  579. &.status_closed {
  580. background: #6666661a;
  581. color: #666666;
  582. }
  583. }
  584. }
  585. .task_desc {
  586. margin-top: 24rpx;
  587. display: flex;
  588. width: 100%;
  589. padding-top: 24rpx;
  590. border-top: 2rpx solid #F3F3F3;
  591. font-weight: 400;
  592. font-size: 28rpx;
  593. color: #999999;
  594. line-height: 44rpx;
  595. box-sizing: border-box;
  596. position: relative;
  597. &.over {
  598. max-height: 168rpx;
  599. overflow: hidden;
  600. transition: all 0.25s;
  601. display: -webkit-box;
  602. -webkit-line-clamp: 3;
  603. -webkit-box-orient: vertical;
  604. }
  605. }
  606. .task_desc_all {
  607. display: flex;
  608. width: 100%;
  609. padding-top: 24rpx;
  610. border-top: 2rpx solid #F3F3F3;
  611. font-weight: 400;
  612. font-size: 28rpx;
  613. color: #999999;
  614. line-height: 44rpx;
  615. box-sizing: border-box;
  616. position: absolute;
  617. left: -9999px;
  618. top: 0;
  619. visibility: hidden; // 不可见但占据空间(不影响布局,因为absolute)
  620. pointer-events: none;
  621. }
  622. .expand_btn {
  623. width: 100%;
  624. height: 40rpx;
  625. background-color: #FFFFFF;
  626. display: flex;
  627. justify-content: flex-end;
  628. align-items: center;
  629. .expand_text {
  630. font-weight: 400;
  631. font-size: 28rpx;
  632. color: #2E64FA;
  633. margin-right: 8rpx;
  634. }
  635. .expand_icon {
  636. font-size: 32rpx !important;
  637. color: #2E64FA !important;
  638. }
  639. }
  640. }
  641. }
  642. .row_gap {
  643. background-color: #F8F9FD;
  644. width: 100%;
  645. height: 24rpx;
  646. }
  647. .target_status {
  648. width: 100%;
  649. display: flex;
  650. align-items: center;
  651. padding: 24rpx 0;
  652. border-bottom: 2rpx solid #F3F3F3;
  653. .target_tag{
  654. flex: 1;
  655. font-weight: 500;
  656. font-size: 32rpx;
  657. color: #333333;
  658. .info_text{
  659. flex-shrink: 0;
  660. margin-right: 12rpx;
  661. }
  662. }
  663. .status_tag{
  664. font-size: 24rpx;
  665. text-align: center;
  666. padding: 8rpx 12rpx;
  667. font-weight: 400;
  668. border-radius: 8rpx;
  669. flex-shrink: 0;
  670. &.notSubmitList {
  671. background: rgba(46,100,250,0.1);
  672. color: #2E64FA;
  673. }
  674. &.notReviewList {
  675. background: rgba(251,159,52,0.1);
  676. color: #FB9F34;
  677. }
  678. &.reviewReasonList {
  679. background: rgba(245,108,108,0.1);
  680. color: #F56C6C;
  681. }
  682. &.reviewList {
  683. background: rgba(43,198,68,0.1);
  684. color: #2BC644;
  685. }
  686. }
  687. }
  688. .upload_box{
  689. margin-top: 24rpx;
  690. width: 100%;
  691. background-color: #FAFBFF;
  692. border-radius: 20rpx;
  693. border: 2rpx dashed #CCCED4;
  694. display: flex;
  695. box-sizing: border-box;
  696. align-items: center;
  697. padding: 22rpx 0 22rpx 40rpx;
  698. .upload_icon{
  699. width: 64rpx;
  700. height: 64rpx;
  701. margin-right: 24rpx;
  702. flex-shrink: 0;
  703. }
  704. .upload_text{
  705. flex:1;
  706. display: flex;
  707. flex-direction: column;
  708. .upload_title{
  709. font-weight: 400;
  710. font-size: 28rpx;
  711. color: #666666;
  712. }
  713. .upload_desc{
  714. margin-top: 8rpx;
  715. font-weight: 400;
  716. font-size: 20rpx;
  717. color: #CCCED4;
  718. }
  719. }
  720. }
  721. .list_item {
  722. display: flex;
  723. align-items: center;
  724. width: 100%;
  725. padding: 20rpx 24rpx;
  726. background: #FFFFFF;
  727. border-radius: 20rpx;
  728. border: 2rpx solid #EBEEF5;
  729. box-sizing: border-box;
  730. margin-top: 24rpx;
  731. gap:20rpx;
  732. .file_icon{
  733. flex-shrink: 0;
  734. width: 80rpx;
  735. height: 80rpx;
  736. }
  737. .file_info{
  738. flex:1;
  739. display: flex;
  740. flex-direction: column;
  741. overflow: hidden;
  742. .file_name{
  743. width: 100%;
  744. font-weight: 500;
  745. font-size: 28rpx;
  746. color: #333333;
  747. overflow: hidden;
  748. white-space: nowrap;
  749. text-overflow: ellipsis;
  750. }
  751. .file_size{
  752. display: flex;
  753. width: 100%;
  754. gap: 20rpx;
  755. font-weight: 400;
  756. font-size: 24rpx;
  757. color: #999999;
  758. margin-top: 8rpx;
  759. }
  760. }
  761. .file_btn{
  762. flex-shrink: 0;
  763. display: flex;
  764. gap:24rpx;
  765. font-weight: 400;
  766. font-size: 28rpx;
  767. .del{
  768. color: #F56C6C;
  769. &.disabled{
  770. color: #C0C4CC;
  771. }
  772. }
  773. .download{
  774. color: #2E64FA;
  775. }
  776. }
  777. }
  778. .page_foot{
  779. position: fixed;
  780. display: flex;
  781. align-items: center;
  782. left: 0;
  783. right: 0;
  784. bottom: 0;
  785. padding: 0 24rpx;
  786. height: 130rpx;
  787. background-color: #FFFFFF;
  788. gap: 32rpx;
  789. .del{
  790. display: flex;
  791. align-items: center;
  792. justify-content: center;
  793. width: 240rpx;
  794. height: 90rpx;
  795. box-sizing: border-box;
  796. border-radius: 8rpx;
  797. border: 2rpx solid #F56C6C;
  798. font-weight: 400;
  799. font-size: 28rpx;
  800. color: #F56C6C;
  801. &.disabled{
  802. color: #C0C4CC;
  803. border: 2rpx solid #C0C4CC;
  804. }
  805. }
  806. .submit {
  807. flex:1;
  808. height: 90rpx;
  809. background-color: #2E64FA;
  810. border-radius: 8rpx;
  811. display: flex;
  812. justify-content: center;
  813. align-items: center;
  814. font-weight: 500;
  815. font-size: 28rpx;
  816. color: #FFFFFF;
  817. &.disabled{
  818. background-color: #C0C4CC;
  819. }
  820. }
  821. }
  822. </style>