taskDetail.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140
  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.doctorVO.taskNum ||'0'}} </text>任务</view>
  136. <view class="stat-item"><text class="num">{{ detail.doctorVO.balance||'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" :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">
  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,doCreateAudit} from '@/api/audit.js'
  248. import { info } from '@/api/task.js';
  249. // import { getTaskFinishAuditInfo,detail} from '@/api/task.js';
  250. import { detail} from '@/api/audit.js';
  251. export default {
  252. data() {
  253. return {
  254. // 仅获取微信小程序状态栏高度,无多余逻辑
  255. statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
  256. taskId: '',
  257. // 任务基础信息
  258. taskData: {
  259. },
  260. // 任务信息
  261. taskInfo: {
  262. },
  263. // 内容信息
  264. contentInfo: {
  265. },
  266. // 客户信息列表
  267. clientList: [
  268. ],
  269. // 补充材料
  270. supplementMaterial: {
  271. deliverableName: '-',
  272. description: '-',
  273. attachment: {
  274. }
  275. },
  276. // 审批信息
  277. createApprovalInfo: [],
  278. completeApprovalInfo: [],
  279. activeTab: 'create',
  280. taskId:'',
  281. taskId2:'',
  282. detail:{},
  283. createStatus:'',
  284. completeStatus:'',
  285. auditStatus:'',
  286. userInfo:{},
  287. showRejectPopup:false,//是否展示驳回弹窗
  288. rejectReason:'',//驳回原因
  289. }
  290. },
  291. computed: {
  292. currentApprovalInfo() {
  293. return this.activeTab === 'create' ? this.createApprovalInfo : this.completeApprovalInfo
  294. }
  295. },
  296. onLoad(options) {
  297. console.log("任务详情数据",options)
  298. if (options.taskId) {
  299. this.taskId = options.taskId
  300. this.loadData(this.taskId,'create')
  301. }
  302. if (options.taskId2) {
  303. this.taskId2 = options.taskId2
  304. this.loadData(this.taskId2,'complete')
  305. }
  306. if (options.id) {
  307. const id = options.id
  308. this.info(id);
  309. }
  310. // 初始化 auditStatus
  311. this.auditStatus = this.createStatus;
  312. this.userInfo = uni.getStorageSync('userInfo')
  313. },
  314. methods: { // 打开驳回弹窗
  315. openRejectPopup() {
  316. // 直接打开驳回弹窗
  317. this.showRejectPopup = true
  318. },
  319. // 确认驳回
  320. async handleConfirmReject() {
  321. if (!this.rejectReason.trim()) {
  322. uni.showToast({
  323. title: '请输入驳回意见',
  324. icon: 'none'
  325. })
  326. return
  327. }
  328. try {
  329. uni.showLoading({
  330. title: '提交中...'
  331. })
  332. console.log("this.userInfo",this.userInfo)
  333. // 根据当前标签选择不同的审核接口
  334. const auditApi = this.activeTab === 'create' ? doCreateAudit : doAudit;
  335. // 调用审核接口,传递action=2表示驳回
  336. const res = await auditApi({
  337. auditId: this.activeTab === 'create' ? this.taskId : this.taskId2,
  338. userId: this.userInfo.userId,
  339. userType: 0,
  340. action: 2,
  341. comment: this.rejectReason,
  342. companyId: this.userInfo.companyId
  343. })
  344. uni.hideLoading()
  345. if (res.code === 200) {
  346. uni.showToast({
  347. title: res.data.message,
  348. icon: 'none'
  349. })
  350. // 关闭弹窗
  351. this.showRejectPopup = false
  352. // 重置输入
  353. this.rejectReason = ''
  354. // 重新加载数据
  355. this.loadData()
  356. } else {
  357. uni.showToast({
  358. title: res.msg || '驳回失败',
  359. icon: 'none'
  360. })
  361. }
  362. } catch (e) {
  363. uni.hideLoading()
  364. console.error('驳回失败', e)
  365. uni.showToast({
  366. title: '驳回失败,请稍后重试',
  367. icon: 'none'
  368. })
  369. }
  370. },
  371. // 审批通过
  372. async handleNext() {
  373. try {
  374. uni.showLoading({
  375. title: '提交中...'
  376. })
  377. console.log("this.userInfo",this.userInfo)
  378. // 根据当前标签选择不同的审核接口
  379. const auditApi = this.activeTab === 'create' ? doCreateAudit : doAudit;
  380. // 调用审核接口,传递action=1表示通过
  381. const res = await auditApi({
  382. auditId: this.activeTab === 'create' ? this.taskId : this.taskId2,
  383. userId: this.userInfo.userId,
  384. userType: 0,
  385. action: 1,
  386. comment: "",
  387. companyId: this.userInfo.companyId
  388. })
  389. uni.hideLoading()
  390. if (res.code === 200) {
  391. uni.showToast({
  392. title: res.data.message,
  393. icon: 'none'
  394. })
  395. // 审核通过后,再次调用对应的审核接口
  396. try {
  397. const res2 = await auditApi({
  398. auditId: this.activeTab === 'create' ? this.taskId : this.taskId2,
  399. userId: this.userInfo.userId,
  400. userType: 0,
  401. action: 1,
  402. comment: "",
  403. companyId: this.userInfo.companyId
  404. })
  405. console.log('第二次调用审核接口返回:', res2)
  406. } catch (e2) {
  407. console.error('第二次调用审核接口失败', e2)
  408. }
  409. // 重新加载数据
  410. // this.loadData()
  411. } else {
  412. uni.showToast({
  413. title: res.msg || '审批通过失败',
  414. icon: 'none'
  415. })
  416. }
  417. } catch (e) {
  418. uni.hideLoading()
  419. console.error('审批通过失败', e)
  420. uni.showToast({
  421. title: '审批通过失败,请稍后重试',
  422. icon: 'none'
  423. })
  424. }
  425. },
  426. goBack() {
  427. uni.navigateBack()
  428. },
  429. switchTab(tab) {
  430. this.activeTab = tab
  431. // 根据切换的标签更新 auditStatus
  432. this.auditStatus = tab === 'create' ? this.createStatus : this.completeStatus
  433. },
  434. info(id){
  435. info(id).then(res=>{
  436. if(res.code===200){
  437. this.detail = res.data
  438. console.log("任务详情",this.detail)
  439. }
  440. })},
  441. async loadData(taskId,type) {
  442. // 如果没有传递参数,根据当前选中的标签加载对应的数据
  443. if (!taskId || !type) {
  444. if (this.activeTab === 'create' && this.taskId) {
  445. await this.loadData(this.taskId, 'create');
  446. }
  447. if (this.activeTab === 'complete' && this.taskId2) {
  448. await this.loadData(this.taskId2, 'complete');
  449. }
  450. return;
  451. }
  452. try {
  453. uni.showLoading({
  454. title: '加载中...'
  455. })
  456. // 调用接口获取任务详情
  457. const res = await detail({ auditId:taskId})
  458. uni.hideLoading()
  459. if (res.code === 200) {
  460. // 处理返回的数据
  461. const data = res.data.auditFlows
  462. if(type==='create'){
  463. this.createApprovalInfo = data?.map(item => ({
  464. name: item.auditUserName || '审批人',
  465. status: item.statusName || '-',
  466. statusColor: this.getAuditStatusColor(item.status),
  467. time: item.auditTime || ''
  468. })) || []
  469. this.createStatus = res.data.audit.status
  470. // 如果当前选中的是创建审批标签,更新 auditStatus
  471. if (this.activeTab === 'create') {
  472. this.auditStatus = this.createStatus;
  473. }
  474. }
  475. if(type==='complete'){
  476. this.completeApprovalInfo = data?.map(item => ({
  477. name: item.auditUserName || '审批人',
  478. status: item.statusName || '-',
  479. statusColor: this.getAuditStatusColor(item.status),
  480. time: item.auditTime || ''
  481. })) || []
  482. this.completeStatus = res.data.audit.status
  483. // 如果当前选中的是完成审批标签,更新 auditStatus
  484. if (this.activeTab === 'complete') {
  485. this.auditStatus = this.completeStatus;
  486. }
  487. }
  488. } else {
  489. uni.showToast({
  490. title: '获取任务详情失败',
  491. icon: 'none'
  492. })
  493. }
  494. } catch (e) {
  495. uni.hideLoading()
  496. console.error('加载数据失败', e)
  497. uni.showToast({
  498. title: '网络错误',
  499. icon: 'none'
  500. })
  501. }
  502. },
  503. getAuditStatusText(status) {
  504. // 根据审核状态获取状态文本
  505. const statusMap = {
  506. 0: '待审核',
  507. 1: '已通过',
  508. 2: '已驳回'
  509. }
  510. return statusMap[status] || '-'
  511. },
  512. getAuditStatusColor(status) {
  513. // 根据审核状态获取状态颜色
  514. const colorMap = {
  515. 1: '#FF9800',
  516. 2: '#4CAF50',
  517. 3: '#F44336'
  518. }
  519. return colorMap[status] || '#999'
  520. },
  521. // 复制到剪贴板
  522. copyToClipboard(text) {
  523. uni.setClipboardData({
  524. data: text,
  525. success() {
  526. uni.showToast({
  527. title: '复制成功',
  528. icon: 'success'
  529. })
  530. }
  531. })
  532. },
  533. // 下载附件
  534. downloadAttachment(materialLink) {
  535. if (!materialLink) {
  536. uni.showToast({
  537. title: '附件链接不存在',
  538. icon: 'none'
  539. })
  540. return
  541. }
  542. uni.showLoading({
  543. title: '下载中...'
  544. })
  545. uni.downloadFile({
  546. url: materialLink,
  547. success: (res) => {
  548. if (res.statusCode === 200) {
  549. uni.saveFile({
  550. tempFilePath: res.tempFilePath,
  551. success: (saveRes) => {
  552. uni.hideLoading()
  553. uni.showToast({
  554. title: '下载成功',
  555. icon: 'success'
  556. })
  557. },
  558. fail: (err) => {
  559. uni.hideLoading()
  560. uni.showToast({
  561. title: '保存失败',
  562. icon: 'none'
  563. })
  564. }
  565. })
  566. } else {
  567. uni.hideLoading()
  568. uni.showToast({
  569. title: '下载失败',
  570. icon: 'none'
  571. })
  572. }
  573. },
  574. fail: (err) => {
  575. uni.hideLoading()
  576. uni.showToast({
  577. title: '下载失败',
  578. icon: 'none'
  579. })
  580. }
  581. })
  582. },
  583. // 格式化文件大小
  584. formatFileSize(bytes) {
  585. if (bytes === 0) return '0 B';
  586. const k = 1024;
  587. const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
  588. const i = Math.floor(Math.log(bytes) / Math.log(k));
  589. return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
  590. }
  591. }
  592. }
  593. </script>
  594. <style lang="scss" scoped>
  595. .material-item {
  596. margin-bottom: 20px;
  597. padding: 15px;
  598. background: #fff;
  599. border-radius: 8px;
  600. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  601. }
  602. .material-header {
  603. margin-bottom: 15px;
  604. padding-bottom: 10px;
  605. border-bottom: 1px solid #f0f0f0;
  606. }
  607. .material-title {
  608. font-size: 16px;
  609. font-weight: 600;
  610. color: #333;
  611. }
  612. .empty-material {
  613. padding: 40px 0;
  614. text-align: center;
  615. color: #999;
  616. font-size: 14px;
  617. }
  618. .container {
  619. min-height: 100vh;
  620. background: #f5f5f5;
  621. display: flex;
  622. flex-direction: column;
  623. height: auto;
  624. &::before {
  625. content: '';
  626. position: absolute;
  627. top: 0;
  628. left: 0;
  629. right: 0;
  630. width: 100%;
  631. height: 532rpx;
  632. background: linear-gradient(180deg, rgba(56, 139, 255, 0.79) 0%, rgba(56, 139, 255, 0) 100%);
  633. }
  634. }
  635. .top {
  636. display: flex;
  637. justify-content: center;
  638. align-items: center;
  639. height: 88rpx;
  640. position: relative;
  641. font-weight: 600;
  642. font-size: 36rpx;
  643. color: #FFFFFF;
  644. .return {
  645. position: absolute;
  646. left: 32rpx;
  647. width: 40rpx;
  648. height: 40rpx;
  649. }
  650. }
  651. .content {
  652. flex: 1;
  653. padding: 24rpx 24rpx 120rpx;
  654. box-sizing: border-box;
  655. }
  656. /* 任务卡片样式 */
  657. .task-card {
  658. background: #fff;
  659. border-radius: 16rpx;
  660. padding: 24rpx;
  661. margin-bottom: 24rpx;
  662. .card-header {
  663. .card-title {
  664. font-weight: 500;
  665. font-size: 36rpx;
  666. color: #333333;
  667. margin-bottom: 24rpx;
  668. }
  669. }
  670. .card-meta {
  671. display: flex;
  672. align-items: center;
  673. gap: 16rpx;
  674. font-size: 24rpx;
  675. color: #666;
  676. .meta-tag {
  677. border-radius: 8rpx 8rpx 8rpx 8rpx;
  678. border: 2rpx solid rgba(56, 139, 255, 0.4);
  679. padding: 4rpx 8rpx;
  680. color: #388BFF;
  681. }
  682. }
  683. }
  684. /* 通用信息区块样式 */
  685. .info-section {
  686. background: #fff;
  687. border-radius: 16rpx;
  688. padding: 24rpx;
  689. margin-bottom: 24rpx;
  690. .section-header {
  691. display: flex;
  692. align-items: center;
  693. margin-bottom: 24rpx;
  694. .section-indicator {
  695. width: 6rpx;
  696. height: 32rpx;
  697. background: #388BFF;
  698. border-radius: 3rpx;
  699. margin-right: 16rpx;
  700. }
  701. .section-title {
  702. font-weight: 600;
  703. font-size: 32rpx;
  704. color: #333333;
  705. }
  706. }
  707. .info-list {
  708. .info-item {
  709. display: flex;
  710. margin-bottom: 24rpx;
  711. &:last-child {
  712. margin-bottom: 0;
  713. }
  714. .info-label {
  715. width: 50%;
  716. font-size: 28rpx;
  717. color: #666;
  718. flex-shrink: 0;
  719. }
  720. .info-value {
  721. flex: 1;
  722. text-align: end;
  723. font-size: 28rpx;
  724. color: #333;
  725. }
  726. .copy-btn {
  727. margin-left: 16rpx;
  728. color: #2196F3;
  729. font-size: 24rpx;
  730. cursor: pointer;
  731. }
  732. .column {
  733. flex-direction: column;
  734. }
  735. .attachment-item {
  736. margin-top: 24rpx;
  737. display: flex;
  738. justify-content: space-between;
  739. align-items: center;
  740. gap: 16rpx;
  741. background: #F7F8FA;
  742. border-radius: 16rpx 16rpx 16rpx 16rpx;
  743. .left {
  744. display: flex;
  745. align-items: center;
  746. .img {
  747. width: 72rpx;
  748. height: 72rpx;
  749. margin-right: 24rpx;
  750. }
  751. .txt-item {
  752. .attachment-name {
  753. font-size: 28rpx;
  754. color: #333;
  755. }
  756. .attachment-size {
  757. font-size: 24rpx;
  758. color: #999;
  759. }
  760. }
  761. }
  762. .download-btn {
  763. width: 32rpx;
  764. height: 32rpx;
  765. }
  766. }
  767. }
  768. }
  769. }
  770. /* 客户信息样式 */
  771. .client-list {
  772. .client-item {
  773. display: flex;
  774. justify-content: space-between;
  775. align-items: center;
  776. padding: 16rpx 0;
  777. &:last-child {
  778. border-bottom: none;
  779. }
  780. .client-info {
  781. display: flex;
  782. align-items: center;
  783. .avatar {
  784. width: 88rpx;
  785. height: 88rpx;
  786. margin-right: 24rpx;
  787. }
  788. .client-txt {
  789. .client-name {
  790. font-size: 28rpx;
  791. font-weight: 500;
  792. color: #333;
  793. .client-level {
  794. margin-left: 8rpx;
  795. padding: 2rpx 8rpx;
  796. background: #FFF6E5;
  797. color: #C89743;
  798. font-size: 22rpx;
  799. border-radius: 8rpx;
  800. }
  801. }
  802. }
  803. .client-hospital {
  804. font-size: 24rpx;
  805. color: #666;
  806. margin-top: 4rpx;
  807. display: flex;
  808. align-items: center;
  809. .line {
  810. width: 2rpx;
  811. height: 28rpx;
  812. background: #EAEBEE;
  813. margin: 0 24rpx;
  814. }
  815. }
  816. }
  817. .client-stats {
  818. display: flex;
  819. gap: 24rpx;
  820. font-size: 24rpx;
  821. color: #999999;
  822. .stat-item {
  823. display: flex;
  824. flex-direction: column;
  825. align-items: center;
  826. .num {
  827. font-weight: 500;
  828. font-size: 28rpx;
  829. color: #333333;
  830. }
  831. }
  832. }
  833. }
  834. }
  835. /* 审批信息样式 */
  836. .approval-list {
  837. .approval-item {
  838. position: relative;
  839. padding-left: 24rpx;
  840. margin-bottom: 68rpx;
  841. display: flex;
  842. align-items: center;
  843. justify-content: space-between;
  844. &:last-child {
  845. margin-bottom: 0;
  846. }
  847. .left {
  848. display: flex;
  849. align-items: center;
  850. .avatar-box {
  851. width: 80rpx;
  852. height: 80rpx;
  853. margin-right: 32rpx;
  854. position: relative;
  855. .avatar {
  856. width: 100%;
  857. height: 100%;
  858. }
  859. .icon {
  860. position: absolute;
  861. bottom: 0;
  862. right: 0;
  863. width: 32rpx;
  864. height: 32rpx;
  865. }
  866. }
  867. .approval-user {
  868. gap: 12rpx;
  869. .user-name {
  870. font-weight: 500;
  871. font-size: 28rpx;
  872. color: #333;
  873. }
  874. .user-status {
  875. font-size: 24rpx;
  876. }
  877. }
  878. }
  879. .approval-time {
  880. font-size: 24rpx;
  881. color: #999;
  882. margin-top: 4rpx;
  883. }
  884. }
  885. .approval-line {
  886. position: absolute;
  887. left: 64rpx;
  888. bottom: -64rpx;
  889. width: 1rpx;
  890. height: 56rpx;
  891. background: #BFD8FF;
  892. }
  893. }
  894. .reason {
  895. font-size: 28rpx;
  896. color: #666666;
  897. line-height: 40rpx;
  898. margin-left: 136rpx;
  899. }
  900. /* 审批标签样式 */
  901. .audit-tabs {
  902. display: flex;
  903. margin: 24rpx 0;
  904. border-radius: 8rpx;
  905. background-color: #F7F8FA;
  906. overflow: hidden;
  907. }
  908. .audit-tab {
  909. flex: 1;
  910. text-align: center;
  911. padding: 16rpx 0;
  912. font-size: 28rpx;
  913. color: #666666;
  914. transition: all 0.3s ease;
  915. cursor: pointer;
  916. }
  917. .audit-tab.active {
  918. background-color: #4080FF;
  919. color: #FFFFFF;
  920. font-weight: 500;
  921. }
  922. .bottom-bar {
  923. position: fixed;
  924. bottom: 0;
  925. left: 0;
  926. right: 0;
  927. background: #fff;
  928. padding: 24rpx 32rpx;
  929. border-top: 1rpx solid #F2F3F5;
  930. z-index: 100;
  931. display: flex;
  932. align-items: center;
  933. .action-buttons {
  934. display: flex;
  935. flex: 1;
  936. justify-content: space-between;
  937. .btn {
  938. width: 292rpx;
  939. height: 88rpx;
  940. display: flex;
  941. align-items: center;
  942. justify-content: center;
  943. font-size: 32rpx;
  944. font-weight: 500;
  945. border-radius: 200rpx 200rpx 200rpx 200rpx;
  946. cursor: pointer;
  947. display: flex;
  948. align-items: center;
  949. &.btn-cancel {
  950. background: #fff;
  951. border: 2rpx solid #CF3546;
  952. color: #CF3546;
  953. }
  954. &.btn-submit {
  955. background: #388BFF;
  956. color: #fff;
  957. }
  958. .icon {
  959. width: 32rpx;
  960. height: 32rpx;
  961. margin-right: 16rpx;
  962. }
  963. }
  964. }
  965. }// 弹窗样式
  966. .reject-popup-content {
  967. padding: 32rpx;
  968. box-sizing: border-box;
  969. overflow: hidden;
  970. border-radius: 24rpx 24rpx 0 0;
  971. .popup-header {
  972. display: flex;
  973. justify-content: center;
  974. align-items: center;
  975. margin-bottom: 32rpx;
  976. position: relative;
  977. .popup-title {
  978. font-size: 32rpx;
  979. font-weight: bold;
  980. color: #333;
  981. }
  982. .close {
  983. position: absolute;
  984. right: 0;
  985. width: 44rpx;
  986. height: 44rpx;
  987. }
  988. }
  989. .input-area {
  990. margin-bottom: 40rpx;
  991. .reason-input {
  992. min-height: 120rpx;
  993. padding: 20rpx;
  994. background: #F7F8FA;
  995. border-radius: 12rpx;
  996. font-size: 28rpx;
  997. color: #333;
  998. width: 100%; // 新增:确保输入框宽度100%
  999. box-sizing: border-box;
  1000. }
  1001. }
  1002. .btn-group {
  1003. display: flex;
  1004. gap: 24rpx;
  1005. .button {
  1006. width: 332rpx;
  1007. height: 80rpx;
  1008. flex: 1;
  1009. border-radius: 200rpx;
  1010. font-size: 28rpx;
  1011. text-align: center;
  1012. line-height: 80rpx;
  1013. }
  1014. .reject {
  1015. color: #388BFF;
  1016. background: #FFFFFF;
  1017. border-radius: 200rpx 200rpx 200rpx 200rpx;
  1018. border: 2rpx solid #388BFF;
  1019. }
  1020. .confirm {
  1021. background: #388BFF;
  1022. color: #FFFFFF;
  1023. }
  1024. }
  1025. }
  1026. </style>