taskDetail.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146
  1. <template>
  2. <view class="container">
  3. <view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
  4. <view class="top">
  5. <image class="return" @click="goBack" src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/back_white.png"></image>
  6. <text>任务详情</text>
  7. </view>
  8. <scroll-view class="content" scroll-y>
  9. <!-- 任务卡片 -->
  10. <view class="task-card">
  11. <view class="card-header">
  12. <view class="card-title">{{ detail.taskName||'-' }}</view>
  13. </view>
  14. <view class="card-meta">
  15. <view class="meta-tag">{{ detail.taskTypeName||'-' }}</view>
  16. <view class="meta-id">ID:{{ detail.taskNo||'-' }}</view>
  17. </view>
  18. </view>
  19. <!-- 任务信息 -->
  20. <view class="info-section">
  21. <view class="section-header">
  22. <view class="section-indicator"></view>
  23. <text class="section-title">任务信息</text>
  24. </view>
  25. <view class="info-list">
  26. <view class="info-item">
  27. <text class="info-label">费用分摊:</text>
  28. <text class="info-value">{{ detail.costShareName||'-' }}</text>
  29. </view>
  30. <view class="info-item">
  31. <text class="info-label">归属项目:</text>
  32. <text class="info-value">{{ detail.projectName ||'-' }}</text>
  33. </view>
  34. <view class="info-item">
  35. <text class="info-label">归属部门:</text>
  36. <text class="info-value">{{ detail.deptName ||'-' }}</text>
  37. </view>
  38. <view class="info-item">
  39. <text class="info-label">归属产品:</text>
  40. <text class="info-value">{{ detail.productName ||'-' }}</text>
  41. </view>
  42. <!-- <view class="info-item">
  43. <text class="info-label">申请补充直播任务:</text>
  44. <text class="info-value">{{ detail.applySupplementLive ||'-' }}</text>
  45. </view>
  46. <view class="info-item">
  47. <text class="info-label">补充任务直播间ID:</text>
  48. <text class="info-value">{{ detail.supplementRoomId ||'-' }}</text>
  49. </view>
  50. <view class="info-item">
  51. <text class="info-label">申请补充任务原因:</text>
  52. <text class="info-value">{{ detail.supplementReason ||'-' }}</text>
  53. </view> -->
  54. </view>
  55. </view>
  56. <!-- 内容信息 -->
  57. <view class="info-section">
  58. <view class="section-header">
  59. <view class="section-indicator"></view>
  60. <text class="section-title">内容信息</text>
  61. </view>
  62. <view class="info-list">
  63. <view class="info-item">
  64. <text class="info-label">交付物名称:</text>
  65. <text class="info-value">{{ detail.deliverableName ||'-' }}</text>
  66. </view>
  67. <view class="info-item">
  68. <text class="info-label">交付物ID:</text>
  69. <text class="info-value">{{ detail.deliverableId||'-' }}</text>
  70. </view>
  71. <!-- <view class="info-item">
  72. <text class="info-label">直播间地址:</text>
  73. <text class="info-value">{{ detail.liveRoomUrl ||'-' }}</text>
  74. <text class="copy-btn" @click="copyToClipboard(contentInfo.liveRoomUrl)">复制</text>
  75. </view>
  76. <view class="info-item">
  77. <text class="info-label">推流地址:</text>
  78. <text class="info-value">{{ detail.pushUrl ||'-' }}</text>
  79. <text class="copy-btn" @click="copyToClipboard(contentInfo.pushUrl)">复制</text>
  80. </view>
  81. <view class="info-item">
  82. <text class="info-label">开播地址:</text>
  83. <text class="info-value">{{ detail.startUrl||'-' }}</text>
  84. <text class="copy-btn" @click="copyToClipboard(contentInfo.startUrl)">复制</text>
  85. </view>
  86. <view class="info-item">
  87. <text class="info-label">直播回放:</text>
  88. <text class="info-value">{{ detail.liveReplay ||'-' }}</text>
  89. </view>
  90. <view class="info-item">
  91. <text class="info-label">播放视频:</text>
  92. <text class="info-value">{{ detail.playVideo||'-' }}</text>
  93. </view>
  94. <view class="info-item">
  95. <text class="info-label">下载视频:</text>
  96. <text class="info-value">{{ detail.downloadVideo||'-' }}</text>
  97. </view>
  98. <view class="info-item">
  99. <text class="info-label">观众人数:</text>
  100. <text class="info-value">{{ detail.viewerCount||'0' }}</text>
  101. </view>
  102. <view class="info-item">
  103. <text class="info-label">有效观看:</text>
  104. <text class="info-value">{{ detail.validView||'-' }}</text>
  105. </view>
  106. <view class="info-item">
  107. <text class="info-label">情况说明:</text>
  108. <text class="info-value">{{ detail.description||'-' }}</text>
  109. </view> -->
  110. </view>
  111. </view>
  112. <!-- 客户信息 -->
  113. <view class="info-section">
  114. <view class="section-header">
  115. <view class="section-indicator"></view>
  116. <text class="section-title">客户信息</text>
  117. </view>
  118. <view class="client-list">
  119. <view class="client-item" >
  120. <view class="client-info">
  121. <image class="avatar" src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/my_heads_icon.png"></image>
  122. <view class="client-txt">
  123. <view class="client-name">
  124. {{ detail.doctorVO.doctorName||'-' }}
  125. <text class="client-level" v-if="detail.doctorVO.jobTitle">{{ detail.doctorVO.jobTitle }}</text>
  126. </view>
  127. <view class="client-hospital">
  128. <text>{{ detail.doctorVO.institution ||'-'}} </text>
  129. <view class="line"></view>
  130. <text>{{ detail.doctorVO.department ||'-'}}</text>
  131. </view>
  132. </view>
  133. </view>
  134. <view class="client-stats">
  135. <view class="stat-item"><text class="num">{{detail.taskCount ||'0'}} </text>任务</view>
  136. <view class="stat-item"><text class="num">{{ detail.taskIntegral||'0' }} </text>积分</view>
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. <!-- 补充材料 -->
  142. <view class="info-section">
  143. <view class="section-header">
  144. <view class="section-indicator"></view>
  145. <text class="section-title">补充材料</text>
  146. </view>
  147. <view class="info-list">
  148. <template v-if="detail.materialInfoList && detail.materialInfoList.length > 0">
  149. <view v-for="(material, index) in detail.materialInfoList" :key="index" class="material-item">
  150. <view class="material-header">
  151. <text class="material-title" v-if="detail.materialInfoList.length > 1">材料 {{ index + 1 }}</text>
  152. </view>
  153. <view class="info-item">
  154. <text class="info-label">交付物名称:</text>
  155. <text class="info-value">{{ material.materialName || '-' }}</text>
  156. </view>
  157. <view class="info-item">
  158. <text class="info-label">情况说明:</text>
  159. <text class="info-value">{{ material.materialDesc || '-' }}</text>
  160. </view>
  161. <view class="info-item column">
  162. <text class="info-label">附件:</text>
  163. <view class="attachment-item" v-if="material.materialLink">
  164. <view class="left">
  165. <image class="img" src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_attachment.png"></image>
  166. <view class="txt-item">
  167. <view class="attachment-name">{{ material.materialLink || '-' }}</view>
  168. <view class="attachment-size">{{ formatFileSize(material.fileSize || 0) }}</view>
  169. </view>
  170. </view>
  171. <image class="download-btn" @click="downloadAttachment(material.materialLink)"
  172. src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_downlad.png"></image>
  173. </view>
  174. </view>
  175. </view>
  176. </template>
  177. <view v-else class="empty-material">
  178. <text>暂无补充材料</text>
  179. </view>
  180. </view>
  181. </view>
  182. <!-- 审批信息 -->
  183. <view class="info-section">
  184. <view class="section-header">
  185. <view class="section-indicator"></view>
  186. <text class="section-title">审批信息</text>
  187. </view>
  188. <view class="audit-tabs">
  189. <view class="audit-tab" :class="{ active: activeTab === 'create' }" @click="switchTab('create')">创建任务审批</view>
  190. <view class="audit-tab" v-if="detail.createAuditStatus!=0" :class="{ active: activeTab === 'complete' }" @click="switchTab('complete')">完成任务审批</view>
  191. </view>
  192. <view class="approval-list">
  193. <view class="approval-item" v-for="(item, index) in currentApprovalInfo" :key="index">
  194. <view class="left">
  195. <view class="avatar-box">
  196. <image class="avatar" src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/my_heads_icon.png"></image>
  197. <image class="icon" v-if="item.status=='待审核'" src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_wait.png"></image>
  198. <image class="icon" v-if="item.status=='已通过'" src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_pass.png"></image>
  199. <image class="icon" v-if="item.status=='已驳回'" src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_refuse.png"></image>
  200. </view>
  201. <view class="approval-user">
  202. <view class="user-name">{{ item.name }}</view>
  203. <view class="user-status" :style="{ color: item.statusColor }">{{ item.status }}</view>
  204. </view>
  205. </view>
  206. <text class="approval-time">{{ item.time }}</text>
  207. <view class="approval-line" v-if="index < currentApprovalInfo.length - 1"></view>
  208. </view>
  209. <view v-if="currentApprovalInfo.length === 0" class="empty-approval">
  210. <text>暂无审批信息</text>
  211. </view>
  212. </view>
  213. </view>
  214. </scroll-view>
  215. <view class="bottom-bar" v-if="auditStatus==1&&detailType==='audit'">
  216. <view class="action-buttons">
  217. <view class="btn btn-cancel" @click="openRejectPopup">
  218. <image class="icon" src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_approval_no.png"></image>
  219. <text>驳回</text>
  220. </view>
  221. <view class="btn btn-submit" @click="handleNext">
  222. <image class="icon" src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_approval_yes.png"></image>
  223. <text>通过</text>
  224. </view>
  225. </view>
  226. </view>
  227. <!-- 驳回弹窗 -->
  228. <u-popup :show="showRejectPopup" mode="bottom" round="24" z-index="9999999">
  229. <view class="reject-popup-content">
  230. <view class="popup-header">
  231. <text class="popup-title">驳回</text>
  232. <image @click="showRejectPopup = false;" class="close" src="https://ysrw-1395926010.cos.ap-chengdu.myqcloud.com/image/icon_close.png"></image>
  233. </view>
  234. <view class="input-area">
  235. <textarea v-model="rejectReason" placeholder="请输入驳回意见" class="reason-input" :auto-height="true"
  236. maxlength="200" />
  237. </view>
  238. <view class="btn-group">
  239. <view class="button reject" @click="showRejectPopup = false">取消</view>
  240. <view class="button confirm" @click="handleConfirmReject ">确认驳回</view>
  241. </view>
  242. </view>
  243. </u-popup>
  244. </view>
  245. </template>
  246. <script>
  247. import { doAudit
  248. // ,doCreateAudit
  249. } from '@/api/audit.js'
  250. import { info } from '@/api/task.js';
  251. import { detail} from '@/api/audit.js';
  252. export default {
  253. data() {
  254. return {
  255. // 仅获取微信小程序状态栏高度,无多余逻辑
  256. statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
  257. taskId: '',
  258. // 任务基础信息
  259. taskData: {
  260. },
  261. // 任务信息
  262. taskInfo: {
  263. },
  264. // 内容信息
  265. contentInfo: {
  266. },
  267. // 客户信息列表
  268. clientList: [
  269. ],
  270. // 补充材料
  271. supplementMaterial: {
  272. deliverableName: '-',
  273. description: '-',
  274. attachment: {
  275. }
  276. },
  277. // 审批信息
  278. createApprovalInfo: [],
  279. completeApprovalInfo: [],
  280. activeTab: 'create',
  281. taskId:'',
  282. taskId2:'',
  283. detail:{},
  284. createStatus:'',
  285. completeStatus:'',
  286. auditStatus:'',
  287. userInfo:{},
  288. showRejectPopup:false,//是否展示驳回弹窗
  289. rejectReason:'',//驳回原因
  290. detailType:''//详情type
  291. }
  292. },
  293. computed: {
  294. currentApprovalInfo() {
  295. return this.activeTab === 'create' ? this.createApprovalInfo : this.completeApprovalInfo
  296. }
  297. },
  298. onLoad(options) {
  299. console.log("任务详情数据",options)
  300. if (options.taskId) {
  301. this.taskId = options.taskId
  302. this.loadData(this.taskId,'create')
  303. }
  304. if (options.taskId2) {
  305. this.taskId2 = options.taskId2
  306. this.loadData(this.taskId2,'complete')
  307. }
  308. if (options.id) {
  309. const id = options.id
  310. this.info(id);
  311. }
  312. if(options.type){
  313. this.detailType = options.type
  314. }
  315. // 初始化 auditStatus
  316. this.auditStatus = this.createStatus;
  317. this.userInfo = uni.getStorageSync('userInfo')
  318. },
  319. methods: { // 打开驳回弹窗
  320. openRejectPopup() {
  321. // 直接打开驳回弹窗
  322. this.showRejectPopup = true
  323. },
  324. // 确认驳回
  325. async handleConfirmReject() {
  326. if (!this.rejectReason.trim()) {
  327. uni.showToast({
  328. title: '请输入驳回意见',
  329. icon: 'none'
  330. })
  331. return
  332. }
  333. try {
  334. uni.showLoading({
  335. title: '提交中...'
  336. })
  337. console.log("this.userInfo",this.userInfo)
  338. // 根据当前标签选择不同的审核接口
  339. // const auditApi = this.activeTab === 'create' ? doCreateAudit : doAudit;
  340. const auditApi = doAudit;
  341. // 调用审核接口,传递action=2表示驳回
  342. const res = await auditApi({
  343. auditId: this.activeTab === 'create' ? this.taskId : this.taskId2,
  344. userId: this.userInfo.userId,
  345. userType: 0,
  346. action: 2,
  347. comment: this.rejectReason,
  348. companyId: this.userInfo.companyId
  349. })
  350. uni.hideLoading()
  351. if (res.code === 200) {
  352. uni.showToast({
  353. title: res.data.message,
  354. icon: 'none'
  355. })
  356. // 关闭弹窗
  357. this.showRejectPopup = false
  358. // 重置输入
  359. this.rejectReason = ''
  360. // 重新加载数据
  361. this.loadData()
  362. } else {
  363. uni.showToast({
  364. title: res.msg || '驳回失败',
  365. icon: 'none'
  366. })
  367. }
  368. } catch (e) {
  369. uni.hideLoading()
  370. console.error('驳回失败', e)
  371. uni.showToast({
  372. title: '驳回失败,请稍后重试',
  373. icon: 'none'
  374. })
  375. }
  376. },
  377. // 审批通过
  378. async handleNext() {
  379. try {
  380. uni.showLoading({
  381. title: '提交中...'
  382. })
  383. console.log("this.userInfo",this.userInfo)
  384. // 根据当前标签选择不同的审核接口
  385. // const auditApi = this.activeTab === 'create' ? doCreateAudit : doAudit;
  386. const auditApi = doAudit;
  387. // 调用审核接口,传递action=1表示通过
  388. const res = await auditApi({
  389. auditId: this.activeTab === 'create' ? this.taskId : this.taskId2,
  390. userId: this.userInfo.userId,
  391. userType: 0,
  392. action: 1,
  393. comment: "",
  394. companyId: this.userInfo.companyId
  395. })
  396. uni.hideLoading()
  397. if (res.code === 200) {
  398. uni.showToast({
  399. title: res.data.message,
  400. icon: 'none'
  401. })
  402. // 审核通过后,再次调用对应的审核接口
  403. try {
  404. const res2 = await auditApi({
  405. auditId: this.activeTab === 'create' ? this.taskId : this.taskId2,
  406. userId: this.userInfo.userId,
  407. userType: 0,
  408. action: 1,
  409. comment: "",
  410. companyId: this.userInfo.companyId
  411. })
  412. console.log('第二次调用审核接口返回:', res2)
  413. } catch (e2) {
  414. console.error('第二次调用审核接口失败', e2)
  415. }
  416. // 重新加载数据
  417. // this.loadData()
  418. } else {
  419. uni.showToast({
  420. title: res.msg || '审批通过失败',
  421. icon: 'none'
  422. })
  423. }
  424. } catch (e) {
  425. uni.hideLoading()
  426. console.error('审批通过失败', e)
  427. uni.showToast({
  428. title: '审批通过失败,请稍后重试',
  429. icon: 'none'
  430. })
  431. }
  432. },
  433. goBack() {
  434. uni.navigateBack()
  435. },
  436. switchTab(tab) {
  437. this.activeTab = tab
  438. // 根据切换的标签更新 auditStatus
  439. this.auditStatus = tab === 'create' ? this.createStatus : this.completeStatus
  440. },
  441. info(id){
  442. info(id).then(res=>{
  443. if(res.code===200){
  444. this.detail = res.data
  445. console.log("任务详情",this.detail)
  446. }
  447. })},
  448. async loadData(taskId,type) {
  449. // 如果没有传递参数,根据当前选中的标签加载对应的数据
  450. if (!taskId || !type) {
  451. if (this.activeTab === 'create' && this.taskId) {
  452. await this.loadData(this.taskId, 'create');
  453. }
  454. if (this.activeTab === 'complete' && this.taskId2) {
  455. await this.loadData(this.taskId2, 'complete');
  456. }
  457. return;
  458. }
  459. try {
  460. uni.showLoading({
  461. title: '加载中...'
  462. })
  463. // 调用接口获取任务详情
  464. const res = await detail({ auditId:taskId})
  465. uni.hideLoading()
  466. if (res.code === 200) {
  467. // 处理返回的数据
  468. const data = res.data.auditFlows
  469. if(type==='create'){
  470. this.createApprovalInfo = data?.map(item => ({
  471. name: item.auditUserName || '审批人',
  472. status: item.statusName || '-',
  473. statusColor: this.getAuditStatusColor(item.status),
  474. time: item.auditTime || ''
  475. })) || []
  476. this.createStatus = res.data.audit.status
  477. // 如果当前选中的是创建审批标签,更新 auditStatus
  478. if (this.activeTab === 'create') {
  479. this.auditStatus = this.createStatus;
  480. }
  481. }
  482. if(type==='complete'){
  483. this.completeApprovalInfo = data?.map(item => ({
  484. name: item.auditUserName || '审批人',
  485. status: item.statusName || '-',
  486. statusColor: this.getAuditStatusColor(item.status),
  487. time: item.auditTime || ''
  488. })) || []
  489. this.completeStatus = res.data.audit.status
  490. // 如果当前选中的是完成审批标签,更新 auditStatus
  491. if (this.activeTab === 'complete') {
  492. this.auditStatus = this.completeStatus;
  493. }
  494. }
  495. } else {
  496. uni.showToast({
  497. title: '获取任务详情失败',
  498. icon: 'none'
  499. })
  500. }
  501. } catch (e) {
  502. uni.hideLoading()
  503. console.error('加载数据失败', e)
  504. uni.showToast({
  505. title: '网络错误',
  506. icon: 'none'
  507. })
  508. }
  509. },
  510. getAuditStatusText(status) {
  511. // 根据审核状态获取状态文本
  512. const statusMap = {
  513. 0: '待审核',
  514. 1: '已通过',
  515. 2: '已驳回'
  516. }
  517. return statusMap[status] || '-'
  518. },
  519. getAuditStatusColor(status) {
  520. // 根据审核状态获取状态颜色
  521. const colorMap = {
  522. 1: '#FF9800',
  523. 2: '#4CAF50',
  524. 3: '#F44336'
  525. }
  526. return colorMap[status] || '#999'
  527. },
  528. // 复制到剪贴板
  529. copyToClipboard(text) {
  530. uni.setClipboardData({
  531. data: text,
  532. success() {
  533. uni.showToast({
  534. title: '复制成功',
  535. icon: 'success'
  536. })
  537. }
  538. })
  539. },
  540. // 下载附件
  541. downloadAttachment(materialLink) {
  542. if (!materialLink) {
  543. uni.showToast({
  544. title: '附件链接不存在',
  545. icon: 'none'
  546. })
  547. return
  548. }
  549. uni.showLoading({
  550. title: '下载中...'
  551. })
  552. uni.downloadFile({
  553. url: materialLink,
  554. success: (res) => {
  555. if (res.statusCode === 200) {
  556. uni.saveFile({
  557. tempFilePath: res.tempFilePath,
  558. success: (saveRes) => {
  559. uni.hideLoading()
  560. uni.showToast({
  561. title: '下载成功',
  562. icon: 'success'
  563. })
  564. },
  565. fail: (err) => {
  566. uni.hideLoading()
  567. uni.showToast({
  568. title: '保存失败',
  569. icon: 'none'
  570. })
  571. }
  572. })
  573. } else {
  574. uni.hideLoading()
  575. uni.showToast({
  576. title: '下载失败',
  577. icon: 'none'
  578. })
  579. }
  580. },
  581. fail: (err) => {
  582. uni.hideLoading()
  583. uni.showToast({
  584. title: '下载失败',
  585. icon: 'none'
  586. })
  587. }
  588. })
  589. },
  590. // 格式化文件大小
  591. formatFileSize(bytes) {
  592. if (bytes === 0) return '0 B';
  593. const k = 1024;
  594. const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
  595. const i = Math.floor(Math.log(bytes) / Math.log(k));
  596. return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
  597. }
  598. }
  599. }
  600. </script>
  601. <style lang="scss" scoped>
  602. .material-item {
  603. margin-bottom: 20px;
  604. padding: 15px;
  605. background: #fff;
  606. border-radius: 8px;
  607. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  608. }
  609. .material-header {
  610. margin-bottom: 15px;
  611. padding-bottom: 10px;
  612. border-bottom: 1px solid #f0f0f0;
  613. }
  614. .material-title {
  615. font-size: 16px;
  616. font-weight: 600;
  617. color: #333;
  618. }
  619. .empty-material {
  620. padding: 40px 0;
  621. text-align: center;
  622. color: #999;
  623. font-size: 14px;
  624. }
  625. .container {
  626. min-height: 100vh;
  627. background: #f5f5f5;
  628. display: flex;
  629. flex-direction: column;
  630. height: auto;
  631. &::before {
  632. content: '';
  633. position: absolute;
  634. top: 0;
  635. left: 0;
  636. right: 0;
  637. width: 100%;
  638. height: 532rpx;
  639. background: linear-gradient(180deg, rgba(56, 139, 255, 0.79) 0%, rgba(56, 139, 255, 0) 100%);
  640. }
  641. }
  642. .top {
  643. display: flex;
  644. justify-content: center;
  645. align-items: center;
  646. height: 88rpx;
  647. position: relative;
  648. font-weight: 600;
  649. font-size: 36rpx;
  650. color: #FFFFFF;
  651. .return {
  652. position: absolute;
  653. left: 32rpx;
  654. width: 40rpx;
  655. height: 40rpx;
  656. }
  657. }
  658. .content {
  659. flex: 1;
  660. padding: 24rpx 24rpx 120rpx;
  661. box-sizing: border-box;
  662. }
  663. /* 任务卡片样式 */
  664. .task-card {
  665. background: #fff;
  666. border-radius: 16rpx;
  667. padding: 24rpx;
  668. margin-bottom: 24rpx;
  669. .card-header {
  670. .card-title {
  671. font-weight: 500;
  672. font-size: 36rpx;
  673. color: #333333;
  674. margin-bottom: 24rpx;
  675. }
  676. }
  677. .card-meta {
  678. display: flex;
  679. align-items: center;
  680. gap: 16rpx;
  681. font-size: 24rpx;
  682. color: #666;
  683. .meta-tag {
  684. border-radius: 8rpx 8rpx 8rpx 8rpx;
  685. border: 2rpx solid rgba(56, 139, 255, 0.4);
  686. padding: 4rpx 8rpx;
  687. color: #388BFF;
  688. }
  689. }
  690. }
  691. /* 通用信息区块样式 */
  692. .info-section {
  693. background: #fff;
  694. border-radius: 16rpx;
  695. padding: 24rpx;
  696. margin-bottom: 24rpx;
  697. .section-header {
  698. display: flex;
  699. align-items: center;
  700. margin-bottom: 24rpx;
  701. .section-indicator {
  702. width: 6rpx;
  703. height: 32rpx;
  704. background: #388BFF;
  705. border-radius: 3rpx;
  706. margin-right: 16rpx;
  707. }
  708. .section-title {
  709. font-weight: 600;
  710. font-size: 32rpx;
  711. color: #333333;
  712. }
  713. }
  714. .info-list {
  715. .info-item {
  716. display: flex;
  717. margin-bottom: 24rpx;
  718. &:last-child {
  719. margin-bottom: 0;
  720. }
  721. .info-label {
  722. width: 50%;
  723. font-size: 28rpx;
  724. color: #666;
  725. flex-shrink: 0;
  726. }
  727. .info-value {
  728. flex: 1;
  729. text-align: end;
  730. font-size: 28rpx;
  731. color: #333;
  732. }
  733. .copy-btn {
  734. margin-left: 16rpx;
  735. color: #2196F3;
  736. font-size: 24rpx;
  737. cursor: pointer;
  738. }
  739. .column {
  740. flex-direction: column;
  741. }
  742. .attachment-item {
  743. margin-top: 24rpx;
  744. display: flex;
  745. justify-content: space-between;
  746. align-items: center;
  747. gap: 16rpx;
  748. background: #F7F8FA;
  749. border-radius: 16rpx 16rpx 16rpx 16rpx;
  750. .left {
  751. display: flex;
  752. align-items: center;
  753. .img {
  754. width: 72rpx;
  755. height: 72rpx;
  756. margin-right: 24rpx;
  757. }
  758. .txt-item {
  759. .attachment-name {
  760. font-size: 28rpx;
  761. color: #333;
  762. }
  763. .attachment-size {
  764. font-size: 24rpx;
  765. color: #999;
  766. }
  767. }
  768. }
  769. .download-btn {
  770. width: 32rpx;
  771. height: 32rpx;
  772. }
  773. }
  774. }
  775. }
  776. }
  777. /* 客户信息样式 */
  778. .client-list {
  779. .client-item {
  780. display: flex;
  781. justify-content: space-between;
  782. align-items: center;
  783. padding: 16rpx 0;
  784. &:last-child {
  785. border-bottom: none;
  786. }
  787. .client-info {
  788. display: flex;
  789. align-items: center;
  790. .avatar {
  791. width: 88rpx;
  792. height: 88rpx;
  793. margin-right: 24rpx;
  794. }
  795. .client-txt {
  796. .client-name {
  797. font-size: 28rpx;
  798. font-weight: 500;
  799. color: #333;
  800. .client-level {
  801. margin-left: 8rpx;
  802. padding: 2rpx 8rpx;
  803. background: #FFF6E5;
  804. color: #C89743;
  805. font-size: 22rpx;
  806. border-radius: 8rpx;
  807. }
  808. }
  809. }
  810. .client-hospital {
  811. font-size: 24rpx;
  812. color: #666;
  813. margin-top: 4rpx;
  814. display: flex;
  815. align-items: center;
  816. .line {
  817. width: 2rpx;
  818. height: 28rpx;
  819. background: #EAEBEE;
  820. margin: 0 24rpx;
  821. }
  822. }
  823. }
  824. .client-stats {
  825. display: flex;
  826. gap: 24rpx;
  827. font-size: 24rpx;
  828. color: #999999;
  829. .stat-item {
  830. display: flex;
  831. flex-direction: column;
  832. align-items: center;
  833. .num {
  834. font-weight: 500;
  835. font-size: 28rpx;
  836. color: #333333;
  837. }
  838. }
  839. }
  840. }
  841. }
  842. /* 审批信息样式 */
  843. .approval-list {
  844. .approval-item {
  845. position: relative;
  846. padding-left: 24rpx;
  847. margin-bottom: 68rpx;
  848. display: flex;
  849. align-items: center;
  850. justify-content: space-between;
  851. &:last-child {
  852. margin-bottom: 0;
  853. }
  854. .left {
  855. display: flex;
  856. align-items: center;
  857. .avatar-box {
  858. width: 80rpx;
  859. height: 80rpx;
  860. margin-right: 32rpx;
  861. position: relative;
  862. .avatar {
  863. width: 100%;
  864. height: 100%;
  865. }
  866. .icon {
  867. position: absolute;
  868. bottom: 0;
  869. right: 0;
  870. width: 32rpx;
  871. height: 32rpx;
  872. }
  873. }
  874. .approval-user {
  875. gap: 12rpx;
  876. .user-name {
  877. font-weight: 500;
  878. font-size: 28rpx;
  879. color: #333;
  880. }
  881. .user-status {
  882. font-size: 24rpx;
  883. }
  884. }
  885. }
  886. .approval-time {
  887. font-size: 24rpx;
  888. color: #999;
  889. margin-top: 4rpx;
  890. }
  891. }
  892. .approval-line {
  893. position: absolute;
  894. left: 64rpx;
  895. bottom: -64rpx;
  896. width: 1rpx;
  897. height: 56rpx;
  898. background: #BFD8FF;
  899. }
  900. }
  901. .reason {
  902. font-size: 28rpx;
  903. color: #666666;
  904. line-height: 40rpx;
  905. margin-left: 136rpx;
  906. }
  907. /* 审批标签样式 */
  908. .audit-tabs {
  909. display: flex;
  910. margin: 24rpx 0;
  911. border-radius: 8rpx;
  912. background-color: #F7F8FA;
  913. overflow: hidden;
  914. }
  915. .audit-tab {
  916. flex: 1;
  917. text-align: center;
  918. padding: 16rpx 0;
  919. font-size: 28rpx;
  920. color: #666666;
  921. transition: all 0.3s ease;
  922. cursor: pointer;
  923. }
  924. .audit-tab.active {
  925. background-color: #4080FF;
  926. color: #FFFFFF;
  927. font-weight: 500;
  928. }
  929. .bottom-bar {
  930. position: fixed;
  931. bottom: 0;
  932. left: 0;
  933. right: 0;
  934. background: #fff;
  935. padding: 24rpx 32rpx;
  936. border-top: 1rpx solid #F2F3F5;
  937. z-index: 100;
  938. display: flex;
  939. align-items: center;
  940. .action-buttons {
  941. display: flex;
  942. flex: 1;
  943. justify-content: space-between;
  944. .btn {
  945. width: 292rpx;
  946. height: 88rpx;
  947. display: flex;
  948. align-items: center;
  949. justify-content: center;
  950. font-size: 32rpx;
  951. font-weight: 500;
  952. border-radius: 200rpx 200rpx 200rpx 200rpx;
  953. cursor: pointer;
  954. display: flex;
  955. align-items: center;
  956. &.btn-cancel {
  957. background: #fff;
  958. border: 2rpx solid #CF3546;
  959. color: #CF3546;
  960. }
  961. &.btn-submit {
  962. background: #388BFF;
  963. color: #fff;
  964. }
  965. .icon {
  966. width: 32rpx;
  967. height: 32rpx;
  968. margin-right: 16rpx;
  969. }
  970. }
  971. }
  972. }// 弹窗样式
  973. .reject-popup-content {
  974. padding: 32rpx;
  975. box-sizing: border-box;
  976. overflow: hidden;
  977. border-radius: 24rpx 24rpx 0 0;
  978. .popup-header {
  979. display: flex;
  980. justify-content: center;
  981. align-items: center;
  982. margin-bottom: 32rpx;
  983. position: relative;
  984. .popup-title {
  985. font-size: 32rpx;
  986. font-weight: bold;
  987. color: #333;
  988. }
  989. .close {
  990. position: absolute;
  991. right: 0;
  992. width: 44rpx;
  993. height: 44rpx;
  994. }
  995. }
  996. .input-area {
  997. margin-bottom: 40rpx;
  998. .reason-input {
  999. min-height: 120rpx;
  1000. padding: 20rpx;
  1001. background: #F7F8FA;
  1002. border-radius: 12rpx;
  1003. font-size: 28rpx;
  1004. color: #333;
  1005. width: 100%; // 新增:确保输入框宽度100%
  1006. box-sizing: border-box;
  1007. }
  1008. }
  1009. .btn-group {
  1010. display: flex;
  1011. gap: 24rpx;
  1012. .button {
  1013. width: 332rpx;
  1014. height: 80rpx;
  1015. flex: 1;
  1016. border-radius: 200rpx;
  1017. font-size: 28rpx;
  1018. text-align: center;
  1019. line-height: 80rpx;
  1020. }
  1021. .reject {
  1022. color: #388BFF;
  1023. background: #FFFFFF;
  1024. border-radius: 200rpx 200rpx 200rpx 200rpx;
  1025. border: 2rpx solid #388BFF;
  1026. }
  1027. .confirm {
  1028. background: #388BFF;
  1029. color: #FFFFFF;
  1030. }
  1031. }
  1032. }
  1033. </style>