gradeApplication.vue 23 KB

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