createTask.vue 24 KB

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