fillTask.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915
  1. <template>
  2. <view class="container">
  3. <Step :step="currentStep" :stepsData="currentText" />
  4. <scroll-view class="content" scroll-y>
  5. <!-- 驳回意见提示 -->
  6. <view class="rejection-banner" v-if="rejectionInfo">
  7. <view class="rejection-icon">✕</view>
  8. <view class="rejection-text">驳回意见: {{ rejectionInfo }}</view>
  9. </view>
  10. <!-- 基本信息 -->
  11. <view class="form-section">
  12. <view class="form-item">
  13. <view class="form-label">
  14. <text class="required">*</text>
  15. <text>任务归属</text>
  16. </view>
  17. <view class="form-input picker-input" :class="{ placeholder: !formData.institution }"
  18. @click="showTaskPopup=true">
  19. {{ formData.institution || '请选择任务归属' }}
  20. <image class="icon" src="/static/image/icon_more.png"></image>
  21. </view>
  22. </view>
  23. <view class="form-item">
  24. <view class="form-label">
  25. <text class="required">*</text>
  26. <text>归属项目</text>
  27. </view>
  28. <view class="form-input picker-input" :class="{ placeholder: !formData.belongingProject }"
  29. @click="showBelongingPopup = true">
  30. {{ formData.belongingProject || '请选择归属项目' }}
  31. <image class="icon" src="/static/image/icon_more.png"></image>
  32. </view>
  33. </view>
  34. <view class="form-item">
  35. <view class="form-label">
  36. <text class="required">*</text>
  37. <text>费用分摊</text>
  38. </view>
  39. <view class="form-input picker-input" :class="{ placeholder: !formData.costAllocation }"
  40. @click="showPicker('费用分摊',costColumns)">
  41. {{ formData.costAllocation || '请选择费用分摊主体' }}
  42. <image class="icon" src="/static/image/icon_more.png"></image>
  43. </view>
  44. </view>
  45. <view class="form-item">
  46. <view class="form-label">
  47. <text>添加任务备注</text>
  48. </view>
  49. <EvanSwitch v-model="formData.addRemark"></EvanSwitch>
  50. </view>
  51. <view class="form-item">
  52. <view class="form-label">
  53. <text class="required">*</text>
  54. <text>归属类型</text>
  55. </view>
  56. <text class="txt">院内</text>
  57. </view>
  58. <view class="form-item">
  59. <view class="form-label">
  60. <text class="required">*</text>
  61. <text>任务类型</text>
  62. </view>
  63. <view class="form-input picker-input" :class="{ placeholder: !formData.taskType }"
  64. @click="showPicker('任务类型',taskTypeColumns)">
  65. {{ formData.taskType || '请选择任务类型' }}
  66. <image class="icon" src="/static/image/icon_more.png"></image>
  67. </view>
  68. </view>
  69. <view class="form-item">
  70. <view class="form-label">
  71. <text class="required">*</text>
  72. <text>计划开始时间</text>
  73. </view>
  74. <picker mode="date" :value="formData.planStartTime" fields="day" @change="onPlanStartTimeChange">
  75. <view class="form-input picker-input" :class="{ placeholder: !formData.planStartTime }">
  76. {{ formData.planStartTime || '请选择计划开始时间' }}
  77. <image class="icon" src="/static/image/icon_more.png"></image>
  78. </view>
  79. </picker>
  80. </view>
  81. <view class="form-item">
  82. <view class="form-label">
  83. <text class="required">*</text>
  84. <text>计划结束时间</text>
  85. </view>
  86. <picker mode="date" :value="formData.planEndTime" fields="day" @change="onPlanEndTimeChange">
  87. <view class="form-input picker-input" :class="{ placeholder: !formData.planEndTime }">
  88. {{ formData.planEndTime || '请选择计划结束时间' }}
  89. <image class="icon" src="/static/image/icon_more.png"></image>
  90. </view>
  91. </picker>
  92. </view>
  93. <!-- 观看方式 -->
  94. <view class="form-item">
  95. <view class="form-label">
  96. <text class="required">*</text>
  97. <text>观看方式</text>
  98. </view>
  99. <view class="radio-group">
  100. <label class="radio-item" :class="{ active: formData.viewMode === '公开' }"
  101. @click="formData.viewMode = '公开'">
  102. <image class="radio-circle" v-if="formData.viewMode === '公开'"
  103. src="/static/image/icon_circle_sel.png"></image>
  104. <image class="radio-circle" v-else src="/static/image/icon_circle.png"></image>
  105. <text>公开</text>
  106. </label>
  107. <label class="radio-item" :class="{ active: formData.viewMode === '加密' }"
  108. @click="formData.viewMode = '加密'">
  109. <image class="radio-circle" v-if="formData.viewMode === '加密'"
  110. src="/static/image/icon_circle_sel.png"></image>
  111. <image class="radio-circle" v-else src="/static/image/icon_circle.png"></image>
  112. <text>加密</text>
  113. </label>
  114. </view>
  115. </view>
  116. <!-- 观看要求 -->
  117. <view class="form-item">
  118. <view class="form-label">
  119. <text class="required">*</text>
  120. <text>观看要求</text>
  121. </view>
  122. <view class="radio-group">
  123. <label class="radio-item" :class="{ active: formData.viewRequire === '登录账户' }"
  124. @click="formData.viewRequire = '登录账户'">
  125. <!-- <view class="radio-circle" :class="{ checked: formData.viewRequire === '登录账户' }"></view> -->
  126. <image class="radio-circle" v-if="formData.viewRequire === '登录账户'"
  127. src="/static/image/icon_circle_sel.png"></image>
  128. <image class="radio-circle" v-else src="/static/image/icon_circle.png"></image>
  129. <text>登录账户</text>
  130. </label>
  131. <label class="radio-item" :class="{ active: formData.viewRequire === '认证客户' }"
  132. @click="formData.viewRequire = '认证客户'">
  133. <image class="radio-circle" v-if="formData.viewRequire === '认证客户'"
  134. src="/static/image/icon_circle_sel.png"></image>
  135. <image class="radio-circle" v-else src="/static/image/icon_circle.png"></image>
  136. <text>认证客户</text>
  137. </label>
  138. </view>
  139. </view>
  140. </view>
  141. <view class="form-section">
  142. <!-- 直播间标题 -->
  143. <view class="form-item">
  144. <view class="form-label">
  145. <text class="required">*</text>
  146. <text>直播间标题</text>
  147. </view>
  148. <view class="form-input">
  149. <input v-model="formData.roomTitle" placeholder="请输入直播间标题" />
  150. </view>
  151. </view>
  152. <!-- 封面图 -->
  153. <view class="form-item column baseline">
  154. <view class="form-label">
  155. <text class="required">*</text>
  156. <text>封面图</text>
  157. </view>
  158. <view class="upload-area" @click="chooseCoverImage">
  159. <image v-if="formData.coverImage" :src="formData.coverImage" class="cover-image" />
  160. <view v-else class="upload-placeholder">
  161. <text>点击上传封面图</text>
  162. </view>
  163. <image v-if="formData.coverImage" class="delete-icon" src="/static/image/icon_cross.png"
  164. @click.stop="deleteCoverImage" />
  165. </view>
  166. </view>
  167. </view>
  168. <view class="form-section">
  169. <!-- 申请补充讲者任务 -->
  170. <view class="form-item">
  171. <view class="form-label">
  172. <text class="required">*</text>
  173. <text>申请补充讲者任务</text>
  174. </view>
  175. <EvanSwitch v-model="formData.applySpeaker"></EvanSwitch>
  176. </view>
  177. </view>
  178. </scroll-view>
  179. <view class="next-button" @click="toNext">下一步</view>
  180. <!-- 通用选择器 -->
  181. <u-picker :title='pickerTitle' :show="showPickerVisible" confirmColor='#576B95' ref="uPicker"
  182. :columns="pickerData" @confirm="confirm" @cancel="cancel">
  183. </u-picker>
  184. <!-- 归属项目弹窗 -->
  185. <u-popup :show="showBelongingPopup" mode="bottom" round="20" @close="closePopup" closeable>
  186. <view class="popup-content p32">
  187. <view class="popup-header">
  188. <text class="title">归属项目</text>
  189. </view>
  190. <view class="search-box">
  191. <image class="icon" src="/static/image/search.png"></image>
  192. <u-input v-model="searchKeyword" placeholder="请输入归属项目" border="none" clearable />
  193. </view>
  194. <scroll-view scroll-y class="project-list">
  195. <view v-for="(project, index) in filteredProjects" :key="index" class="project-item"
  196. :class="{ active: selectedIndex === index }" @tap="selectProject(project, index)">
  197. <text class="project-name">{{ project.name }}</text>
  198. <image class="icon" src="/static/image/icon_right.png"></image>
  199. </view>
  200. </scroll-view>
  201. </view>
  202. </u-popup>
  203. <!-- 任务归属弹窗 -->
  204. <u-popup :show="showTaskPopup" mode="bottom" round="16" @close="showTaskPopup = false" safeAreaInsetBottom>
  205. <view class="popup-content">
  206. <view class="popup-header">
  207. <text class="popup-title">任务归属</text>
  208. <image class="close-icon" src="/static/image/icon_cross.png" @click="showTaskPopup=false"></image>
  209. </view>
  210. <view class="two-level-container">
  211. <scroll-view class="primary-list" scroll-y>
  212. <view v-for="(item, index) in primaryOptions" :key="index" class="primary-item"
  213. :class="{ 'primary-active': activePrimaryIndex === index }"
  214. @click="handlePrimarySelect(index)">
  215. <text class="primary-text">{{ item.name }}</text>
  216. </view>
  217. </scroll-view>
  218. <scroll-view class="secondary-list" scroll-y>
  219. <view v-for="(subItem, subIndex) in currentSecondaryOptions" :key="subIndex"
  220. class="secondary-item" :class="{ 'secondary-active': selectedSecondaryItem === subItem }"
  221. @click="handleSecondarySelect(subItem)">
  222. <text class="secondary-text">{{ subItem }}</text>
  223. <u-icon v-if="selectedSecondaryItem === subItem" name="checkbox-mark" color="#2979ff"
  224. size="20" />
  225. </view>
  226. </scroll-view>
  227. </view>
  228. <view class="popup-footer">
  229. <button class="confirm-btn" @click="handleConfirm">确定</button>
  230. </view>
  231. </view>
  232. </u-popup>
  233. </view>
  234. </template>
  235. <script>
  236. import Step from '@/pages_task/components/step.vue'
  237. import EvanSwitch from '@/components/evan-switch.vue'
  238. export default {
  239. components: {
  240. Step,
  241. EvanSwitch
  242. },
  243. data() {
  244. return {
  245. showTaskPopup: false,
  246. primaryOptions: [{
  247. id: 1,
  248. name: '中药事业部',
  249. children: ['中药一部', '中药二部', '中药三部', '中药四部']
  250. },
  251. {
  252. id: 2,
  253. name: '事业1组',
  254. children: ['事业1组-项目部', '事业1组-市场部', '事业1组-技术部']
  255. },
  256. {
  257. id: 3,
  258. name: '学术研究部',
  259. children: ['学术研究一部', '学术研究二部', '学术研究三部']
  260. },
  261. {
  262. id: 4,
  263. name: '湖南省药学服务公司',
  264. children: ['药学服务一部', '药学服务二部', '药学服务三部']
  265. },
  266. {
  267. id: 5,
  268. name: '医药事业部',
  269. children: ['医药一部', '医药二部', '医药三部']
  270. },
  271. {
  272. id: 6,
  273. name: '医疗事业部',
  274. children: ['医疗一部', '医疗二部', '医疗三部']
  275. },
  276. {
  277. id: 7,
  278. name: '健康管理部',
  279. children: ['健康管理一部', '健康管理二部']
  280. },
  281. {
  282. id: 8,
  283. name: '医疗事业部',
  284. children: ['医疗一部', '医疗二部', '医疗三部']
  285. },
  286. {
  287. id: 9,
  288. name: '健康管理部',
  289. children: ['健康管理一部', '健康管理二部']
  290. }
  291. ],
  292. activePrimaryIndex: 0,
  293. currentSecondaryOptions: [],
  294. selectedSecondaryItem: '',
  295. selectedPrimaryItem: null,
  296. selectedIndex: -1,
  297. selectedProject: null,
  298. belongingprojects: [{
  299. name: '学术交流项目'
  300. },
  301. {
  302. name: '科学调研项目'
  303. },
  304. {
  305. name: '2026年1月医学研究项目'
  306. },
  307. {
  308. name: '2026年2月医学研究项目'
  309. },
  310. {
  311. name: '2026年3月医学研究项目'
  312. }
  313. ],
  314. searchKeyword: '',
  315. showBelongingPopup: false,
  316. showPickerVisible: false,
  317. costColumns: [
  318. ['主体1', '主体2', '主体3']
  319. ],
  320. taskTypeColumns: [
  321. ['类型1', '类型2', '类型3']
  322. ],
  323. currentStep: 1,
  324. currentText: [{
  325. id: 1,
  326. stepNumber: 1,
  327. title: '填写任务'
  328. },
  329. {
  330. id: 2,
  331. stepNumber: 2,
  332. title: '积分设置'
  333. }
  334. ],
  335. rejectionInfo: '',
  336. // 核心修复:所有表单字段统一放在formData里
  337. formData: {
  338. costAllocation: '',
  339. planStartTime: '',
  340. planEndTime: '',
  341. institution: '',
  342. belongingProject: '',
  343. taskType: '',
  344. addRemark: false,
  345. viewMode: '公开', // 观看方式默认值
  346. viewRequire: '登录账户', // 观看要求默认值
  347. roomTitle: '', // 直播间标题
  348. coverImage: '', // 封面图
  349. applySpeaker: true // 申请补充讲者任务
  350. },
  351. pickerTitle: '默认标题',
  352. pickerData: []
  353. }
  354. },
  355. onLoad(options) {
  356. if (options.rejectionInfo) {
  357. this.rejectionInfo = decodeURIComponent(options.rejectionInfo)
  358. }
  359. // 初始化二级选项
  360. this.currentSecondaryOptions = this.primaryOptions[0]?.children || []
  361. },
  362. computed: {
  363. filteredProjects() {
  364. if (!this.searchKeyword.trim()) {
  365. return this.belongingprojects;
  366. }
  367. return this.belongingprojects.filter(project =>
  368. project.name.includes(this.searchKeyword)
  369. );
  370. }
  371. },
  372. methods: {
  373. // 封面图上传
  374. chooseCoverImage() {
  375. uni.chooseImage({
  376. count: 1,
  377. sizeType: ['compressed'],
  378. sourceType: ['album', 'camera'],
  379. success: (res) => {
  380. this.formData.coverImage = res.tempFilePaths[0]
  381. }
  382. })
  383. },
  384. // 删除封面图
  385. deleteCoverImage() {
  386. this.formData.coverImage = ''
  387. },
  388. // 一级分类选择
  389. handlePrimarySelect(index) {
  390. this.activePrimaryIndex = index;
  391. this.currentSecondaryOptions = this.primaryOptions[index].children || [];
  392. this.selectedSecondaryItem = '';
  393. },
  394. // 二级分类选择
  395. handleSecondarySelect(item) {
  396. this.selectedSecondaryItem = item;
  397. this.selectedPrimaryItem = this.primaryOptions[this.activePrimaryIndex];
  398. },
  399. // 任务归属确认
  400. handleConfirm() {
  401. if (this.selectedSecondaryItem) {
  402. const displayText = `${this.selectedPrimaryItem.name} > ${this.selectedSecondaryItem}`;
  403. this.formData.institution = displayText;
  404. this.showTaskPopup = false;
  405. } else {
  406. uni.showToast({
  407. title: '请选择二级部门',
  408. icon: 'none'
  409. });
  410. }
  411. },
  412. // 关闭归属项目弹窗
  413. closePopup() {
  414. this.showBelongingPopup = false;
  415. this.searchKeyword = '';
  416. this.selectedIndex = -1;
  417. },
  418. // 选择归属项目
  419. selectProject(project, index) {
  420. this.selectedIndex = index;
  421. this.selectedProject = project;
  422. this.formData.belongingProject = project.name;
  423. setTimeout(() => {
  424. this.showBelongingPopup = false;
  425. this.searchKeyword = '';
  426. this.selectedIndex = -1;
  427. }, 300);
  428. },
  429. // 打开通用选择器
  430. showPicker(title, data) {
  431. this.pickerData = data
  432. this.pickerTitle = title
  433. this.showPickerVisible = true
  434. },
  435. // 通用选择器确认
  436. confirm(e) {
  437. if (e.value && e.value.length > 0) {
  438. if (this.pickerTitle === '费用分摊') {
  439. this.formData.costAllocation = e.value[0]
  440. } else if (this.pickerTitle === '任务类型') {
  441. this.formData.taskType = e.value[0]
  442. }
  443. }
  444. this.showPickerVisible = false
  445. },
  446. // 通用选择器取消
  447. cancel() {
  448. this.showPickerVisible = false
  449. },
  450. // 下一步
  451. toNext() {
  452. uni.navigateTo({
  453. url: '/pages_task/editSelectCustomer'
  454. })
  455. },
  456. // 计划开始时间选择
  457. onPlanStartTimeChange(e) {
  458. this.formData.planStartTime = e.detail.value
  459. },
  460. // 计划结束时间选择
  461. onPlanEndTimeChange(e) {
  462. this.formData.planEndTime = e.detail.value
  463. }
  464. }
  465. }
  466. </script>
  467. <style lang="scss" scoped>
  468. .column {
  469. flex-direction: column;
  470. }
  471. .baseline {
  472. align-items: baseline !important;
  473. }
  474. // 页面容器样式
  475. .container {
  476. min-height: 100vh;
  477. background: #F7F8FA;
  478. display: flex;
  479. flex-direction: column;
  480. position: relative;
  481. // 顶部渐变背景
  482. &::before {
  483. content: '';
  484. position: absolute;
  485. top: 0;
  486. left: 0;
  487. right: 0;
  488. width: 100%;
  489. height: 544rpx;
  490. background: linear-gradient(180deg, #E4EFFE 0%, rgba(228, 239, 254, 0) 100%);
  491. }
  492. // 滚动内容区
  493. .content {
  494. flex: 1;
  495. box-sizing: border-box;
  496. // 驳回提示
  497. .rejection-banner {
  498. display: flex;
  499. align-items: center;
  500. padding: 24rpx;
  501. background: #FF5030;
  502. color: #fff;
  503. margin: 24rpx;
  504. border-radius: 8rpx;
  505. .rejection-icon {
  506. width: 40rpx;
  507. height: 40rpx;
  508. border-radius: 50%;
  509. background: rgba(255, 255, 255, 0.3);
  510. display: flex;
  511. align-items: center;
  512. justify-content: center;
  513. font-size: 24rpx;
  514. margin-right: 16rpx;
  515. }
  516. .rejection-text {
  517. flex: 1;
  518. font-size: 28rpx;
  519. line-height: 1.5;
  520. }
  521. }
  522. // 表单区域
  523. .form-section {
  524. background: #fff;
  525. margin: 20rpx;
  526. border-radius: 24rpx;
  527. padding: 32rpx;
  528. // 表单项
  529. .form-item {
  530. display: flex;
  531. justify-content: space-between;
  532. align-items: center;
  533. border-bottom: 1px solid #EBEDF0;
  534. padding: 30rpx 0;
  535. &:last-child {
  536. border-bottom: 0;
  537. }
  538. // 表单标签
  539. .form-label {
  540. display: flex;
  541. align-items: center;
  542. font-size: 28rpx;
  543. color: #333;
  544. margin-bottom: 16rpx;
  545. .required {
  546. color: #CF3546;
  547. margin-right: 4rpx;
  548. }
  549. }
  550. // 纯文本展示
  551. .txt {
  552. font-size: 28rpx;
  553. color: #333333;
  554. }
  555. // 输入框容器
  556. .form-input {
  557. flex: 1;
  558. font-size: 28rpx;
  559. color: #C8C9CC;
  560. text-align: end;
  561. &.placeholder {
  562. color: #C8C9CC;
  563. }
  564. &.picker-input {
  565. display: flex;
  566. align-items: center;
  567. justify-content: flex-end;
  568. }
  569. .icon {
  570. width: 36rpx;
  571. height: 36rpx;
  572. }
  573. }
  574. // 单选组样式(嵌套到form-item里)
  575. .radio-group {
  576. display: flex;
  577. gap: 40rpx;
  578. .radio-item {
  579. display: flex;
  580. align-items: center;
  581. font-size: 28rpx;
  582. .radio-circle {
  583. width: 36rpx;
  584. height: 36rpx;
  585. border-radius: 50%;
  586. margin-right: 16rpx;
  587. }
  588. }
  589. }
  590. // 上传区域样式(嵌套到form-item里)
  591. .upload-area {
  592. position: relative;
  593. width: 200rpx;
  594. height: 120rpx;
  595. border: 1rpx dashed #C8C9CC;
  596. border-radius: 8rpx;
  597. display: flex;
  598. align-items: center;
  599. justify-content: center;
  600. .cover-image {
  601. width: 100%;
  602. height: 100%;
  603. border-radius: 8rpx;
  604. }
  605. .upload-placeholder {
  606. color: #C8C9CC;
  607. font-size: 24rpx;
  608. }
  609. .delete-icon {
  610. position: absolute;
  611. top: -12rpx;
  612. right: -12rpx;
  613. width: 32rpx;
  614. height: 32rpx;
  615. background: #fff;
  616. border-radius: 50%;
  617. }
  618. }
  619. }
  620. }
  621. }
  622. // 下一步按钮
  623. .next-button {
  624. text-align: center;
  625. font-size: 32rpx;
  626. color: #FFFFFF;
  627. height: 88rpx;
  628. line-height: 88rpx;
  629. background: #388BFF;
  630. border-radius: 200rpx;
  631. margin: 32rpx;
  632. }
  633. }
  634. // 弹窗样式
  635. ::v-deep .u-popup__content {
  636. border-radius: 40rpx 40rpx 0 0 !important;
  637. }
  638. .popup-content {
  639. border-radius: 40rpx 40rpx 0rpx 0rpx;
  640. height: 70vh;
  641. background-color: #fff;
  642. .popup-header {
  643. padding: 40rpx 30rpx 20rpx;
  644. text-align: center;
  645. .close-icon {
  646. width: 44rpx;
  647. height: 44rpx;
  648. position: absolute;
  649. right: 32rpx;
  650. }
  651. flex-shrink: 0;
  652. .title,
  653. .popup-title {
  654. font-size: 32rpx;
  655. font-weight: 600;
  656. color: #333;
  657. }
  658. }
  659. .search-box {
  660. display: flex;
  661. align-items: center;
  662. background: #F7F8FA;
  663. border-radius: 38rpx;
  664. padding: 16rpx 28rpx;
  665. margin-bottom: 24rpx;
  666. .icon {
  667. width: 26rpx;
  668. height: 26rpx;
  669. margin-right: 10rpx;
  670. }
  671. }
  672. .project-list {
  673. height: calc(100% - 200rpx);
  674. .project-item {
  675. display: flex;
  676. justify-content: space-between;
  677. align-items: center;
  678. padding: 28rpx 0;
  679. font-size: 28rpx;
  680. border-bottom: 1rpx solid #eee;
  681. &:active {
  682. background-color: #f9f9f9;
  683. }
  684. &.active {
  685. .project-name {
  686. font-weight: 500;
  687. color: #388BFF;
  688. }
  689. .icon {
  690. opacity: 1;
  691. }
  692. }
  693. .project-name {
  694. color: #333;
  695. transition: all 0.2s ease;
  696. }
  697. .icon {
  698. width: 36rpx;
  699. height: 36rpx;
  700. opacity: 0;
  701. transition: opacity 0.2s ease;
  702. }
  703. }
  704. }
  705. .two-level-container {
  706. display: flex;
  707. flex: 1;
  708. border-top: 1rpx solid #f5f5f5;
  709. .primary-list {
  710. width: 40%;
  711. background-color: #f8f9fa;
  712. .primary-item {
  713. padding: 28rpx 20rpx;
  714. background: #F2F3F5;
  715. &:active {
  716. background: #FFFFFF;
  717. }
  718. &.primary-active {
  719. position: relative;
  720. background-color: #fff;
  721. &::before {
  722. content: '';
  723. position: absolute;
  724. top: 50%;
  725. left: 0;
  726. transform: translateY(-50%);
  727. width: 8rpx;
  728. height: 32rpx;
  729. background: #388BFF;
  730. }
  731. .primary-text {
  732. font-weight: 500;
  733. }
  734. }
  735. .primary-text {
  736. font-size: 28rpx;
  737. color: #666;
  738. }
  739. }
  740. }
  741. .secondary-list {
  742. width: 60%;
  743. padding: 0 20rpx;
  744. .secondary-item {
  745. display: flex;
  746. justify-content: space-between;
  747. align-items: center;
  748. padding: 28rpx 10rpx;
  749. font-size: 28rpx;
  750. color: #333;
  751. &.secondary-active {
  752. font-weight: 500;
  753. color: #388BFF;
  754. }
  755. }
  756. }
  757. }
  758. .popup-footer {
  759. padding: 20rpx 30rpx 40rpx;
  760. background-color: #fff;
  761. border-top: 1rpx solid #f5f5f5;
  762. flex-shrink: 0;
  763. .confirm-btn {
  764. width: 100%;
  765. height: 88rpx;
  766. line-height: 88rpx;
  767. background-color: #2979ff;
  768. color: #fff;
  769. font-size: 32rpx;
  770. border-radius: 200rpx;
  771. &:active {
  772. opacity: 0.8;
  773. }
  774. }
  775. }
  776. }
  777. // 暗黑模式适配
  778. @media (prefers-color-scheme: dark) {
  779. .popup-content {
  780. background-color: #1e1e1e;
  781. .popup-header {
  782. .title,
  783. .popup-title {
  784. color: #fff;
  785. }
  786. }
  787. .two-level-container {
  788. .primary-list {
  789. background-color: #2d2d2d;
  790. border-right-color: #3d3d3d;
  791. .primary-item {
  792. border-bottom-color: #3d3d3d;
  793. &:active {
  794. background-color: #3d3d3d;
  795. }
  796. &.primary-active {
  797. background-color: #3d3d3d;
  798. .primary-text {
  799. color: #2979ff;
  800. }
  801. }
  802. .primary-text {
  803. color: #ccc;
  804. }
  805. }
  806. }
  807. .secondary-list {
  808. .secondary-item {
  809. border-bottom-color: #3d3d3d;
  810. &:active {
  811. background-color: #3d3d3d;
  812. }
  813. &.secondary-active {
  814. background-color: #2d2d2d;
  815. }
  816. .secondary-text {
  817. color: #fff;
  818. }
  819. }
  820. }
  821. }
  822. .popup-footer {
  823. background-color: #1e1e1e;
  824. border-top-color: #3d3d3d;
  825. }
  826. }
  827. }
  828. </style>