gradeApplication.vue 23 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024
  1. <template>
  2. <view class="container">
  3. <scroll-view class="content" scroll-y>
  4. <!-- 驳回意见提示 -->
  5. <view class="rejection-banner" v-if="rejectionInfo">
  6. <view class="rejection-icon">✕</view>
  7. <view class="rejection-text">驳回意见: {{ rejectionInfo }}</view>
  8. </view>
  9. <!-- 基本信息 -->
  10. <view class="form-section">
  11. <view class="form-item">
  12. <view class="form-label">
  13. <text class="required">*</text>
  14. <text>学术头衔</text>
  15. </view>
  16. <view class="form-input picker-input" :class="{ placeholder: !formData.academicTitle }"
  17. @click="showPicker('学术头衔', 'doctor_academic_title')">
  18. {{ formData.academicTitle || '请选择' }}
  19. <image class="icon" src="/static/image/icon_more.png"></image>
  20. </view>
  21. </view>
  22. <view class="form-item">
  23. <view class="form-label">
  24. <text class="required">*</text>
  25. <text>学术任职(多选)</text>
  26. </view>
  27. <view class="form-input picker-input" :class="{ placeholder: !formData.academicPositions }"
  28. @click="showPicker('学术任职', 'doctor_academic_position')">
  29. {{ formData.academicPositions || '请选择' }}
  30. <image class="icon" src="/static/image/icon_more.png"></image>
  31. </view>
  32. </view>
  33. <view class="form-item">
  34. <view class="form-label">
  35. <text class="required">*</text>
  36. <text>国际性期刊论文/著作数</text>
  37. </view>
  38. <input type="number" class="input" v-model="formData.internationalPapers"></input>
  39. </view>
  40. <view class="form-item">
  41. <view class="form-label">
  42. <text class="required">*</text>
  43. <text>全国性期刊论文/著作数</text>
  44. </view>
  45. <input type="number" class="input" v-model="formData.nationalPapers"></input>
  46. </view>
  47. <view class="form-item">
  48. <view class="form-label">
  49. <text class="required">*</text>
  50. <text>学术研究(多选)</text>
  51. </view>
  52. <view class="form-input picker-input" :class="{ placeholder: !formData.researchAreas }"
  53. @click="showPicker('学术研究', 'doctor_research_area')">
  54. {{ formData.researchAreas || '请选择' }}
  55. <image class="icon" src="/static/image/icon_more.png"></image>
  56. </view>
  57. </view>
  58. <view class="form-item">
  59. <view class="form-label">
  60. <text class="required">*</text>
  61. <text>临床工作经验年数</text>
  62. </view>
  63. <input type="number" class="input" v-model="formData.clinicalExperience"></input>
  64. </view>
  65. <view class="form-item">
  66. <view class="form-label">
  67. <text class="required">*</text>
  68. <text>学位</text>
  69. </view>
  70. <view class="form-input picker-input" :class="{ placeholder: !formData.degree }"
  71. @click="showPicker('学位', 'doctor_degree')">
  72. {{ formData.degree || '请选择' }}
  73. <image class="icon" src="/static/image/icon_more.png"></image>
  74. </view>
  75. </view>
  76. <view class="form-item">
  77. <view class="form-label">
  78. <text class="required">*</text>
  79. <text>申请级别</text>
  80. </view>
  81. <view class="form-input picker-input" :class="{ placeholder: !formData.applicationLevel }"
  82. @click="showPicker('申请级别', 'doctor_apply_level')">
  83. {{ formData.applicationLevel || '请选择' }}
  84. <image class="icon" src="/static/image/icon_more.png"></image>
  85. </view>
  86. </view>
  87. <view class="form-item column">
  88. <view class="form-label">
  89. <text class="required">*</text>
  90. <text>证明材料</text>
  91. </view>
  92. <view class="form-tips">如医院官网简介、论文截图、聘书等</view>
  93. <view class="upload-proof" @click="chooseProofImages">
  94. <view v-if="formData.proofImages && formData.proofImages.length > 0" class="uploaded-images">
  95. <view v-for="(image, index) in formData.proofImages" :key="index"
  96. class="uploaded-image-item">
  97. <image :src="image" mode="aspectFill"></image>
  98. <view class="image-delete" @click.stop="deleteProofImage(index)">×</view>
  99. </view>
  100. <view class="upload-placeholder">
  101. <image src="/static/image/icon_camera.png" mode="aspectFill"></image>
  102. </view>
  103. </view>
  104. <view v-else class="upload-placeholder">
  105. <image src="/static/image/icon_camera.png" mode="aspectFill"></image>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. </scroll-view>
  111. <view class="next-button" @click="submitForm">提交</view>
  112. <u-picker v-if="showPickerVisible" :title='pickerTitle' :show="true" confirmColor='#576B95' ref="uPicker"
  113. :columns="pickerData" @confirm="confirm" @cancel="cancel">
  114. </u-picker>
  115. <!-- 多选弹窗 -->
  116. <u-popup :show="showMultiSelectPopup" mode="bottom" round="20rpx" :closeable="false">
  117. <view class="u-popup-content">
  118. <view class="popup-header">
  119. <text class="popup-title">{{ multiSelectTitle }}</text>
  120. <text class="popup-close" @click="closeMultiSelectPopup">×</text>
  121. </view>
  122. <view class="popup-body">
  123. <view class="tag-group">
  124. <view v-for="(item, index) in multiSelectData" :key="index" class="tag-item"
  125. :class="{ active: selectedItems.includes(item) }" @click="toggleItem(item)">
  126. {{ item }}
  127. </view>
  128. </view>
  129. </view>
  130. <view class="popup-footer">
  131. <view class="popup-btn cancel-btn" @click="closeMultiSelectPopup">取消</view>
  132. <view class="popup-btn confirm-btn" @click="confirmMultiSelect">确定</view>
  133. </view>
  134. </view>
  135. </u-popup>
  136. </view>
  137. </template>
  138. <script>
  139. import utils from '@/utils/common.js'
  140. import {
  141. apply
  142. } from '@/api/speaker';
  143. export default {
  144. data() {
  145. return {
  146. academicTitle: [], //学术头衔
  147. academicPosition: [], //学术任职
  148. academicResearch: [], //学术研究
  149. degree: [], //学位
  150. applyLevel: [], //申请级别
  151. showPickerVisible: false,
  152. pickerData: [],
  153. pickerTitle: '',
  154. // 多选相关
  155. showMultiSelectPopup: false,
  156. multiSelectTitle: '',
  157. multiSelectData: [],
  158. selectedItems: [],
  159. currentMultiSelectType: '',
  160. // 申请级别选项
  161. applicationLevelColumns: [
  162. ['一级', '二级', '三级', '四级']
  163. ],
  164. rejectionInfo: '',
  165. formData: {
  166. // 学术信息
  167. academicTitle: '', // 学术头衔
  168. academicPositions: '', // 学术任职
  169. internationalPapers: 0, // 国际性期刊论文/著作数
  170. nationalPapers: 0, // 全国性期刊论文/著作数
  171. researchAreas: '', // 学术研究
  172. clinicalExperience: 0, // 临床工作经验年数
  173. degree: '', // 学位
  174. applicationLevel: '', // 申请级别
  175. proofImages: [] // 证明材料图片
  176. },
  177. pickerTitle: '默认标题',
  178. pickerData: [],
  179. userInfo: {},
  180. doctorId: null
  181. }
  182. },
  183. onLoad: async function(options) {
  184. try {
  185. console.log("options", options)
  186. this.doctorId = options.doctorId;
  187. this.academicTitle = await utils.getDicts("doctor_academic_title"); //学术头衔
  188. this.academicPosition = await utils.getDicts("doctor_academic_position"); //学术任职
  189. this.academicResearch = await utils.getDicts("doctor_academic_research"); //学术研究
  190. this.degree = await utils.getDicts("doctor_degree"); //学位
  191. this.applyLevel = await utils.getDicts("doctor_apply_level"); //申请级别
  192. } catch (e) {
  193. console.log('获取字典数据失败:', e)
  194. }
  195. if (options.rejectionInfo) {
  196. this.rejectionInfo = decodeURIComponent(options.rejectionInfo)
  197. }
  198. // 获取用户信息
  199. this.userInfo = uni.getStorageSync('userInfo') || '{}'
  200. },
  201. methods: {
  202. // 选择证明材料图片
  203. chooseProofImages() {
  204. uni.chooseImage({
  205. count: 9, // 最多选择9张
  206. sizeType: ['compressed'],
  207. sourceType: ['album', 'camera'],
  208. success: (res) => {
  209. // 上传图片
  210. this.uploadImages(res.tempFilePaths)
  211. }
  212. })
  213. },
  214. // 上传图片
  215. async uploadImages(tempFilePaths) {
  216. try {
  217. uni.showLoading({
  218. title: '上传中...'
  219. })
  220. const uploadedImages = []
  221. // 从storage获取动态域名
  222. const baseUrl = uni.getStorageSync('requestPath')
  223. // 逐个上传图片
  224. for (const tempFilePath of tempFilePaths) {
  225. // 使用uni.uploadFile上传图片
  226. const uploadRes = await new Promise((resolve, reject) => {
  227. uni.uploadFile({
  228. url: `${baseUrl}/system/file/upload`,
  229. filePath: tempFilePath,
  230. name: 'file',
  231. formData: {
  232. bizType: 'DOCTOR_APPLY'
  233. },
  234. header: {
  235. 'AppToken': uni.getStorageSync('AppToken')
  236. },
  237. success: (res) => {
  238. // 解析上传结果
  239. const data = JSON.parse(res.data)
  240. if (data.code === 200) {
  241. console.log('上传成功:', data.data)
  242. resolve(data.data)
  243. } else {
  244. reject(new Error(data.message || '上传失败'))
  245. }
  246. },
  247. fail: (err) => {
  248. reject(err)
  249. }
  250. })
  251. })
  252. // 将上传成功的图片路径添加到数组
  253. uploadedImages.push(uploadRes.fileUrl)
  254. }
  255. // 更新表单数据
  256. this.formData.proofImages = [...this.formData.proofImages, ...uploadedImages]
  257. uni.hideLoading()
  258. uni.showToast({
  259. icon: 'success',
  260. title: '上传成功'
  261. })
  262. } catch (e) {
  263. uni.hideLoading()
  264. uni.showToast({
  265. icon: 'none',
  266. title: '上传失败'
  267. })
  268. }
  269. },
  270. // 删除证明材料图片
  271. deleteProofImage(index) {
  272. this.formData.proofImages.splice(index, 1)
  273. },
  274. // 显示选择器
  275. showPicker(title, type) {
  276. // 处理多选情况
  277. if (type === 'doctor_academic_position' || type === 'doctor_research_area') {
  278. // 获取数据
  279. let dictData = []
  280. if (type === 'doctor_academic_position') {
  281. dictData = this.academicPosition.map(item => item.dictLabel)
  282. } else if (type === 'doctor_research_area') {
  283. dictData = this.academicResearch.map(item => item.dictLabel)
  284. }
  285. // 设置多选数据
  286. this.multiSelectData = dictData
  287. this.multiSelectTitle = title
  288. this.currentMultiSelectType = type
  289. // 初始化已选项
  290. if (type === 'doctor_academic_position') {
  291. this.selectedItems = this.formData.academicPositions ? this.formData.academicPositions.split(',') :
  292. []
  293. } else if (type === 'doctor_research_area') {
  294. this.selectedItems = this.formData.researchAreas ? this.formData.researchAreas.split(',') : []
  295. }
  296. // 显示多选弹窗
  297. this.showMultiSelectPopup = true
  298. } else {
  299. // 单选情况,保持原有逻辑
  300. // 先隐藏选择器,确保下次显示时重新创建
  301. this.showPickerVisible = false
  302. // 根据字典类型获取对应的数据
  303. let dictData = []
  304. if (type === 'doctor_academic_title') {
  305. dictData = this.academicTitle.map(item => item.dictLabel)
  306. } else if (type === 'doctor_degree') {
  307. dictData = this.degree.map(item => item.dictLabel)
  308. } else if (type === 'doctor_apply_level') {
  309. dictData = this.applyLevel.map(item => item.dictLabel)
  310. }
  311. // 设置数据
  312. this.pickerData = [dictData]
  313. this.pickerTitle = title
  314. // 延迟显示选择器,确保数据已更新
  315. setTimeout(() => {
  316. this.showPickerVisible = true
  317. }, 50)
  318. }
  319. },
  320. // 选择器确认
  321. confirm(e) {
  322. if (e.value && e.value.length > 0) {
  323. if (this.pickerTitle === '学术头衔') {
  324. this.formData.academicTitle = e.value[0]
  325. } else if (this.pickerTitle === '学术任职') {
  326. this.formData.academicPositions = e.value[0]
  327. } else if (this.pickerTitle === '学术研究') {
  328. this.formData.researchAreas = e.value[0]
  329. } else if (this.pickerTitle === '学位') {
  330. this.formData.degree = e.value[0]
  331. } else if (this.pickerTitle === '申请级别') {
  332. this.formData.applicationLevel = e.value[0]
  333. }
  334. }
  335. // 关闭选择器
  336. this.showPickerVisible = false
  337. },
  338. // 选择器取消
  339. cancel() {
  340. // 关闭选择器
  341. this.showPickerVisible = false
  342. },
  343. // 多选相关方法
  344. // 切换选项
  345. toggleItem(item) {
  346. const index = this.selectedItems.indexOf(item)
  347. if (index > -1) {
  348. // 取消选择
  349. this.selectedItems.splice(index, 1)
  350. } else {
  351. // 添加选择
  352. this.selectedItems.push(item)
  353. }
  354. },
  355. // 关闭多选弹窗
  356. closeMultiSelectPopup() {
  357. this.showMultiSelectPopup = false
  358. },
  359. // 确认多选结果
  360. confirmMultiSelect() {
  361. const selectedValues = this.selectedItems.join(',')
  362. if (this.currentMultiSelectType === 'doctor_academic_position') {
  363. this.formData.academicPositions = selectedValues
  364. } else if (this.currentMultiSelectType === 'doctor_research_area') {
  365. this.formData.researchAreas = selectedValues
  366. }
  367. this.showMultiSelectPopup = false
  368. },
  369. // 提交表单
  370. submitForm() {
  371. // 验证表单数据
  372. if (!this.formData.academicTitle) {
  373. uni.showToast({
  374. icon: 'none',
  375. title: '请选择学术头衔'
  376. })
  377. return
  378. }
  379. if (!this.formData.degree) {
  380. uni.showToast({
  381. icon: 'none',
  382. title: '请选择学位'
  383. })
  384. return
  385. }
  386. if (!this.formData.applicationLevel) {
  387. uni.showToast({
  388. icon: 'none',
  389. title: '请选择申请级别'
  390. })
  391. return
  392. }
  393. if (this.formData.proofImages.length === 0) {
  394. uni.showToast({
  395. icon: 'none',
  396. title: '请上传证明材料'
  397. })
  398. return
  399. }
  400. // 构建表单数据
  401. const formData = {
  402. // 基础字段
  403. id: 0,
  404. doctorId: this.doctorId || '',
  405. companyId: this.userInfo.companyId || 0,
  406. companyName: this.userInfo.companyName || '',
  407. // 学术信息
  408. academicTitle: this.formData.academicTitle,
  409. academicPosition: this.formData.academicPositions,
  410. internationalPapers: parseInt(this.formData.internationalPapers) || 0,
  411. nationalPapers: parseInt(this.formData.nationalPapers) || 0,
  412. academicResearch: this.formData.researchAreas,
  413. clinicalExperienceYears: parseInt(this.formData.clinicalExperience) || 0,
  414. degree: this.formData.degree,
  415. applyLevel: this.formData.applicationLevel,
  416. // 状态字段
  417. status: 0,
  418. deleted: 0,
  419. auditInstanceId: 0,
  420. // 证明材料
  421. materials: this.formData.proofImages.map((url, index) => {
  422. return {
  423. id: 0,
  424. companyId: this.userInfo.companyId || 0,
  425. applyId: 0,
  426. fileUrl: url,
  427. fileName: `proof_${index + 1}.jpg`,
  428. fileSize: 0,
  429. fileType: 'image/jpeg',
  430. sortOrder: index + 1,
  431. deleted: 0
  432. }
  433. })
  434. }
  435. // 调用apply接口提交表单
  436. uni.showLoading({
  437. title: '提交中...'
  438. })
  439. apply(formData).then(res => {
  440. uni.hideLoading()
  441. if (res.code === 200) {
  442. uni.showToast({
  443. icon: 'success',
  444. title: '提交成功'
  445. })
  446. uni.redirectTo({
  447. url: '/pages_task/success'
  448. })
  449. // 提交成功后返回上一页
  450. // setTimeout(() => {
  451. // uni.navigateBack()
  452. // }, 1500)
  453. } else {
  454. uni.showToast({
  455. icon: 'none',
  456. title: res.message || '提交失败'
  457. })
  458. }
  459. }).catch(err => {
  460. uni.hideLoading()
  461. uni.showToast({
  462. icon: 'none',
  463. title: '网络错误,请重试'
  464. })
  465. })
  466. }
  467. }
  468. }
  469. </script>
  470. <style lang="scss" scoped>
  471. .container {
  472. min-height: 100vh;
  473. background: #ffffff;
  474. display: flex;
  475. flex-direction: column;
  476. position: relative;
  477. .content {
  478. flex: 1;
  479. box-sizing: border-box;
  480. .rejection-banner {
  481. display: flex;
  482. align-items: center;
  483. padding: 24rpx;
  484. background: #FF5030;
  485. color: #fff;
  486. margin: 24rpx;
  487. border-radius: 8rpx;
  488. .rejection-icon {
  489. width: 40rpx;
  490. height: 40rpx;
  491. border-radius: 50%;
  492. background: rgba(255, 255, 255, 0.3);
  493. display: flex;
  494. align-items: center;
  495. justify-content: center;
  496. font-size: 24rpx;
  497. margin-right: 16rpx;
  498. }
  499. .rejection-text {
  500. flex: 1;
  501. font-size: 28rpx;
  502. line-height: 1.5;
  503. }
  504. }
  505. .form-section {
  506. background: #fff;
  507. margin: 20rpx;
  508. border-radius: 16rpx;
  509. padding: 32rpx;
  510. .form-item {
  511. display: flex;
  512. justify-content: space-between;
  513. align-items: center;
  514. border-bottom: 1px solid #EBEDF0;
  515. padding: 30rpx 0;
  516. &:last-child {
  517. border-bottom: 0;
  518. }
  519. &.column {
  520. display: flex;
  521. flex-direction: column;
  522. justify-content: baseline;
  523. align-items: baseline;
  524. }
  525. .input {
  526. text-align: end;
  527. font-size: 28rpx;
  528. color: #C8C9CC;
  529. }
  530. .form-label {
  531. display: flex;
  532. align-items: center;
  533. font-size: 28rpx;
  534. color: #333;
  535. .required {
  536. color: #CF3546;
  537. margin-right: 4rpx;
  538. }
  539. }
  540. .form-tips {
  541. font-size: 24rpx;
  542. color: #999999;
  543. margin: 12rpx 0 24rpx;
  544. }
  545. .upload-proof {
  546. margin-top: 16rpx;
  547. .uploaded-images {
  548. display: flex;
  549. flex-wrap: wrap;
  550. gap: 20rpx;
  551. .uploaded-image-item {
  552. width: 160rpx;
  553. height: 160rpx;
  554. border-radius: 16rpx;
  555. position: relative;
  556. image {
  557. width: 100%;
  558. height: 100%;
  559. border-radius: 12rpx;
  560. }
  561. .image-delete {
  562. position: absolute;
  563. top: -12rpx;
  564. right: -12rpx;
  565. width: 40rpx;
  566. height: 40rpx;
  567. background: rgba(0, 0, 0, 0.6);
  568. color: #FFFFFF;
  569. border-radius: 50%;
  570. display: flex;
  571. align-items: center;
  572. justify-content: center;
  573. font-size: 32rpx;
  574. font-weight: bold;
  575. z-index: 1;
  576. }
  577. }
  578. }
  579. .upload-placeholder {
  580. width: 160rpx;
  581. height: 160rpx;
  582. background: #F7F8FA;
  583. border-radius: 16rpx;
  584. display: flex;
  585. flex-direction: column;
  586. align-items: center;
  587. justify-content: center;
  588. image {
  589. width: 48rpx;
  590. height: 48rpx;
  591. }
  592. .camera-icon {
  593. font-size: 48rpx;
  594. color: #CCCCCC;
  595. margin-bottom: 16rpx;
  596. }
  597. .upload-text {
  598. font-size: 24rpx;
  599. color: #999999;
  600. }
  601. }
  602. }
  603. .txt {
  604. font-size: 28rpx;
  605. color: #333333;
  606. }
  607. .form-input {
  608. flex: 1;
  609. font-size: 28rpx;
  610. color: #C8C9CC;
  611. &.placeholder {
  612. color: #C8C9CC;
  613. }
  614. &.picker-input {
  615. display: flex;
  616. align-items: center;
  617. justify-content: flex-end;
  618. }
  619. .icon {
  620. width: 36rpx;
  621. height: 36rpx;
  622. }
  623. }
  624. }
  625. }
  626. }
  627. .next-button {
  628. text-align: center;
  629. font-size: 32rpx;
  630. color: #FFFFFF;
  631. height: 88rpx;
  632. line-height: 88rpx;
  633. background: #388BFF;
  634. border-radius: 200rpx;
  635. margin: 32rpx;
  636. }
  637. /* 多选弹窗样式 */
  638. .u-popup-content {
  639. background: #fff;
  640. border-radius: 20rpx 20rpx 0 0;
  641. max-height: 80vh;
  642. display: flex;
  643. flex-direction: column;
  644. width: 100%;
  645. }
  646. .popup-header {
  647. display: flex;
  648. justify-content: space-between;
  649. align-items: center;
  650. padding: 32rpx;
  651. border-bottom: 1px solid #EBEDF0;
  652. }
  653. .popup-title {
  654. font-size: 32rpx;
  655. font-weight: bold;
  656. color: #333;
  657. }
  658. .popup-close {
  659. font-size: 40rpx;
  660. color: #999;
  661. cursor: pointer;
  662. }
  663. .popup-body {
  664. padding: 32rpx;
  665. flex: 1;
  666. overflow-y: auto;
  667. }
  668. .tag-group {
  669. display: flex;
  670. flex-wrap: wrap;
  671. gap: 16rpx;
  672. }
  673. .tag-item {
  674. padding: 16rpx 32rpx;
  675. border: 2rpx solid #DCDFE6;
  676. border-radius: 40rpx;
  677. font-size: 28rpx;
  678. color: #666;
  679. cursor: pointer;
  680. transition: all 0.3s;
  681. white-space: nowrap;
  682. }
  683. .tag-item.active {
  684. background: #388BFF;
  685. border-color: #388BFF;
  686. color: #fff;
  687. }
  688. .popup-footer {
  689. display: flex;
  690. }
  691. .popup-btn {
  692. flex: 1;
  693. gap: 20rpx;
  694. text-align: center;
  695. height: 88rpx;
  696. line-height: 88rpx;
  697. border: none;
  698. font-size: 28rpx;
  699. cursor: pointer;
  700. border-radius: 40rpx;
  701. }
  702. .cancel-btn {
  703. background: #fff;
  704. color: #666;
  705. border: 2rpx solid #DCDFE6;
  706. }
  707. .confirm-btn {
  708. background: #388BFF;
  709. color: #fff;
  710. }
  711. }
  712. ::v-deep .u-popup__content {
  713. border-radius: 40rpx 40rpx 0 0 !important;
  714. }
  715. .popup-content {
  716. border-radius: 40rpx 40rpx 0rpx 0rpx;
  717. height: 70vh;
  718. background-color: #fff;
  719. .popup-header {
  720. padding: 40rpx 30rpx 20rpx;
  721. text-align: center;
  722. .close-icon {
  723. width: 44rpx;
  724. height: 44rpx;
  725. position: absolute;
  726. right: 32rpx;
  727. }
  728. flex-shrink: 0;
  729. .title {
  730. font-size: 32rpx;
  731. font-weight: 600;
  732. color: #333;
  733. }
  734. .popup-title {
  735. font-size: 32rpx;
  736. font-weight: 600;
  737. color: #333;
  738. }
  739. }
  740. .search-box {
  741. display: flex;
  742. align-items: center;
  743. background: #F7F8FA;
  744. border-radius: 38rpx;
  745. padding: 16rpx 28rpx;
  746. margin-bottom: 24rpx;
  747. .icon {
  748. width: 26rpx;
  749. height: 26rpx;
  750. margin-right: 10rpx;
  751. }
  752. }
  753. .project-list {
  754. height: calc(100% - 200rpx);
  755. .project-item {
  756. display: flex;
  757. justify-content: space-between;
  758. align-items: center;
  759. padding: 28rpx 0;
  760. font-size: 28rpx;
  761. border-bottom: 1rpx solid #eee;
  762. &:active {
  763. background-color: #f9f9f9;
  764. }
  765. &.active {
  766. .project-name {
  767. font-weight: 500;
  768. color: #388BFF;
  769. }
  770. .icon {
  771. opacity: 1;
  772. }
  773. }
  774. .project-name {
  775. color: #333;
  776. transition: all 0.2s ease;
  777. }
  778. .icon {
  779. width: 36rpx;
  780. height: 36rpx;
  781. opacity: 0;
  782. transition: opacity 0.2s ease;
  783. }
  784. }
  785. }
  786. .two-level-container {
  787. display: flex;
  788. flex: 1;
  789. border-top: 1rpx solid #f5f5f5;
  790. .primary-list {
  791. width: 40%;
  792. background-color: #f8f9fa;
  793. .primary-item {
  794. padding: 28rpx 20rpx;
  795. background: #F2F3F5;
  796. &:active {
  797. background: #FFFFFF;
  798. }
  799. &.primary-active {
  800. position: relative;
  801. background-color: #fff;
  802. &::before {
  803. content: '';
  804. position: absolute;
  805. top: 50%;
  806. left: 0;
  807. transform: translateY(-50%);
  808. width: 8rpx;
  809. height: 32rpx;
  810. background: #388BFF;
  811. }
  812. .primary-text {
  813. font-weight: 500;
  814. }
  815. }
  816. .primary-text {
  817. font-size: 28rpx;
  818. color: #666;
  819. }
  820. }
  821. }
  822. .secondary-list {
  823. width: 60%;
  824. padding: 0 20rpx;
  825. .secondary-item {
  826. display: flex;
  827. justify-content: space-between;
  828. align-items: center;
  829. padding: 28rpx 10rpx;
  830. font-size: 28rpx;
  831. color: #333;
  832. &.secondary-active {
  833. font-weight: 500;
  834. color: #388BFF;
  835. }
  836. }
  837. }
  838. }
  839. .popup-footer {
  840. padding: 20rpx 30rpx 40rpx;
  841. background-color: #fff;
  842. border-top: 1rpx solid #f5f5f5;
  843. flex-shrink: 0;
  844. .confirm-btn {
  845. width: 100%;
  846. height: 88rpx;
  847. line-height: 88rpx;
  848. background-color: #2979ff;
  849. color: #fff;
  850. font-size: 32rpx;
  851. border-radius: 200rpx 200rpx 200rpx 200rpx;
  852. &:active {
  853. opacity: 0.8;
  854. }
  855. }
  856. }
  857. }
  858. @media (prefers-color-scheme: dark) {
  859. .popup-content {
  860. background-color: #1e1e1e;
  861. .popup-header {
  862. .title,
  863. .popup-title {
  864. color: #fff;
  865. }
  866. }
  867. .two-level-container {
  868. .primary-list {
  869. background-color: #2d2d2d;
  870. border-right-color: #3d3d3d;
  871. .primary-item {
  872. border-bottom-color: #3d3d3d;
  873. &:active {
  874. background-color: #3d3d3d;
  875. }
  876. &.primary-active {
  877. background-color: #3d3d3d;
  878. .primary-text {
  879. color: #2979ff;
  880. }
  881. }
  882. .primary-text {
  883. color: #ccc;
  884. }
  885. }
  886. }
  887. .secondary-list {
  888. .secondary-item {
  889. border-bottom-color: #3d3d3d;
  890. &:active {
  891. background-color: #3d3d3d;
  892. }
  893. &.secondary-active {
  894. background-color: #2d2d2d;
  895. }
  896. .secondary-text {
  897. color: #fff;
  898. }
  899. }
  900. }
  901. }
  902. .popup-footer {
  903. background-color: #1e1e1e;
  904. border-top-color: #3d3d3d;
  905. }
  906. }
  907. }
  908. </style>