taskWaiting.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. <template>
  2. <view class="task-waiting-container">
  3. <!-- 顶部导航 -->
  4. <u-navbar title="我的待办" :border-bottom="false" bg-color="#3c9cff" title-color="#fff">
  5. <view slot="left" @click="goBack">
  6. <u-icon name="arrow-left" color="#fff" size="22"></u-icon>
  7. </view>
  8. </u-navbar>
  9. <!-- 搜索区域 -->
  10. <view class="search-container">
  11. <u-search
  12. v-model="queryParams.flowName"
  13. placeholder="请输入流程定义名称"
  14. :show-action="true"
  15. action-text="搜索"
  16. :animation="true"
  17. @search="handleQuery"
  18. @custom="handleQuery"
  19. ></u-search>
  20. <!-- 申请人选择 -->
  21. <view class="filter-section">
  22. <view class="filter-item" @click="openUserSelect">
  23. <u-icon name="account" size="20" color="#3c9cff"></u-icon>
  24. <text class="filter-text">
  25. {{
  26. selectedUsers.length > 0
  27. ? `已选择${selectedUsers.length}个申请人`
  28. : '选择申请人'
  29. }}
  30. </text>
  31. <u-badge
  32. v-if="selectedUsers.length > 0"
  33. :count="selectedUsers.length"
  34. :max="99"
  35. ></u-badge>
  36. <u-icon name="arrow-right" size="16" color="#c0c4cc"></u-icon>
  37. </view>
  38. </view>
  39. </view>
  40. <!-- 加载状态 -->
  41. <u-loading-page
  42. :loading="loading && taskList.length === 0"
  43. loading-text="加载中..."
  44. ></u-loading-page>
  45. <!-- 待办任务列表 -->
  46. <view v-if="!loading || taskList.length > 0" class="content-wrapper">
  47. <!-- 空状态 -->
  48. <view v-if="taskList.length === 0 && !loading" class="empty-container">
  49. <u-empty text="暂无待办任务" mode="data"></u-empty>
  50. </view>
  51. <!-- 任务卡片列表 -->
  52. <view v-else class="task-list">
  53. <view v-for="(item, index) in taskList" :key="item.id || index" class="task-card">
  54. <!-- 卡片头部 -->
  55. <view class="card-header">
  56. <view class="task-title">{{ item.flowName || '-' }}</view>
  57. <view class="task-status">
  58. <u-tag
  59. :text="getFlowStatusText(item.flowStatus)"
  60. :type="getFlowStatusType(item.flowStatus)"
  61. size="mini"
  62. ></u-tag>
  63. </view>
  64. </view>
  65. <!-- 卡片内容 -->
  66. <view class="card-content">
  67. <view class="info-item">
  68. <text class="label">流程编码:</text>
  69. <text class="value">{{ item.flowCode || '-' }}</text>
  70. </view>
  71. <view class="info-item">
  72. <text class="label">流程分类:</text>
  73. <text class="value">{{ item.categoryName || '-' }}</text>
  74. </view>
  75. <view class="info-item">
  76. <text class="label">任务名称:</text>
  77. <text class="value">{{ item.nodeName || '-' }}</text>
  78. </view>
  79. <view class="info-item">
  80. <text class="label">申请人:</text>
  81. <text class="value">{{ item.createByName || '-' }}</text>
  82. </view>
  83. <view class="info-item">
  84. <text class="label">办理人:</text>
  85. <view class="assignee-tags">
  86. <template v-if="item.assigneeNames">
  87. <u-tag
  88. v-for="(name, idx) in item.assigneeNames.split(',')"
  89. :key="idx"
  90. :text="name"
  91. type="success"
  92. size="mini"
  93. style="margin-right: 8rpx; margin-bottom: 8rpx"
  94. ></u-tag>
  95. </template>
  96. <u-tag v-else text="无" type="info" size="mini"></u-tag>
  97. </view>
  98. </view>
  99. <view class="info-item">
  100. <text class="label">创建时间:</text>
  101. <text class="value">{{ formatTime(item.createTime) }}</text>
  102. </view>
  103. </view>
  104. <!-- 操作按钮 -->
  105. <view class="card-actions">
  106. <view class="action-btn primary-btn" @click="handleApproval(item)">
  107. <u-icon name="edit-pen" size="16" color="#3c9cff"></u-icon>
  108. <text class="btn-text">办理</text>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. <!-- 滚动加载更多 -->
  114. <u-loadmore
  115. v-if="taskList.length > 0"
  116. :status="loadmoreStatus"
  117. :load-text="{
  118. loadmore: '轻轻上拉',
  119. loading: '努力加载中',
  120. nomore: '没有更多了',
  121. }"
  122. @loadmore="loadMore"
  123. ></u-loadmore>
  124. </view>
  125. <!-- 申请人选择弹窗 -->
  126. <u-popup
  127. :show="userSelectDialog.visible"
  128. mode="bottom"
  129. :round="14"
  130. @close="cancelUserSelect"
  131. >
  132. <view class="user-select-popup">
  133. <view class="popup-header">
  134. <text class="popup-title">选择申请人</text>
  135. <u-icon
  136. name="close"
  137. @click="cancelUserSelect"
  138. size="24"
  139. color="#909399"
  140. ></u-icon>
  141. </view>
  142. <view class="popup-content">
  143. <u-search
  144. v-model="userSearchKeyword"
  145. placeholder="搜索用户名或姓名"
  146. :show-action="false"
  147. @input="searchUsers"
  148. style="height: 60rpx !important"
  149. ></u-search>
  150. <scroll-view scroll-y class="user-list">
  151. <view
  152. v-for="user in userList"
  153. :key="user.userId"
  154. class="user-item"
  155. @click="toggleUserSelect(user)"
  156. >
  157. <view class="user-info">
  158. <u-avatar :text="getAvatarText(user.nickName)" size="40"></u-avatar>
  159. <view class="user-details">
  160. <text class="user-name">{{ user.nickName }}</text>
  161. <text class="user-username">{{ user.userName }}</text>
  162. </view>
  163. </view>
  164. <u-checkbox
  165. v-model="user.selected"
  166. @change="onCheckboxChange(user, $event)"
  167. @click.stop
  168. ></u-checkbox>
  169. </view>
  170. </scroll-view>
  171. </view>
  172. <view class="popup-footer">
  173. <u-button @click="cancelUserSelect" type="info" size="default">取消</u-button>
  174. <u-button @click="confirmUserSelect" type="primary" size="default">
  175. 确定
  176. </u-button>
  177. </view>
  178. </view>
  179. </u-popup>
  180. </view>
  181. </template>
  182. <script>
  183. import { request } from '@/common/request.js';
  184. import { getDict, getDictTagType } from '@/common/dict.js';
  185. export default {
  186. name: 'TaskWaiting',
  187. data() {
  188. return {
  189. loading: false,
  190. taskList: [],
  191. total: 0,
  192. loadmoreStatus: 'loadmore', // loadmore, loading, nomore
  193. // 查询参数
  194. queryParams: {
  195. pageNum: 1,
  196. pageSize: 10,
  197. flowName: '', // 流程定义名称
  198. createByIds: [], // 申请人IDs
  199. },
  200. // 流程状态字典
  201. flowStatusDict: [],
  202. // 申请人选择相关
  203. userSelectDialog: {
  204. visible: false,
  205. },
  206. selectedUsers: [], // 已选择的申请人
  207. userList: [], // 用户列表
  208. userSearchKeyword: '', // 用户搜索关键词
  209. userSearchTimer: null, // 搜索防抖定时器
  210. };
  211. },
  212. async created() {
  213. await this.loadFlowStatusDict();
  214. await this.getList();
  215. },
  216. methods: {
  217. // 返回上一页
  218. goBack() {
  219. uni.navigateBack();
  220. },
  221. // 加载流程状态字典
  222. async loadFlowStatusDict() {
  223. try {
  224. this.flowStatusDict = await getDict('wf_business_status');
  225. console.log('流程状态字典加载完成:', this.flowStatusDict);
  226. } catch (error) {
  227. console.error('加载流程状态字典失败:', error);
  228. }
  229. },
  230. // 获取流程状态显示文本
  231. getFlowStatusText(status) {
  232. if (!this.flowStatusDict || this.flowStatusDict.length === 0) {
  233. // 字典未加载时的降级处理
  234. const statusMap = {
  235. 0: '待提交',
  236. 1: '审批中',
  237. 2: '已通过',
  238. 3: '已拒绝',
  239. 4: '已撤回',
  240. 5: '已终止',
  241. 6: '已作废',
  242. };
  243. return statusMap[status] || '未知';
  244. }
  245. const statusItem = this.flowStatusDict.find((item) => item.value === status);
  246. return statusItem ? statusItem.label : '未知';
  247. },
  248. // 获取流程状态标签类型
  249. getFlowStatusType(status) {
  250. const fallbackMap = {
  251. 0: 'info', // 待提交
  252. 1: 'warning', // 审批中
  253. 2: 'success', // 已通过
  254. 3: 'error', // 已拒绝
  255. 4: 'info', // 已撤回
  256. 5: 'error', // 已终止
  257. 6: 'error', // 已作废
  258. };
  259. return getDictTagType(this.flowStatusDict, status, fallbackMap);
  260. },
  261. // 获取待办任务列表
  262. async getList(isLoadMore = false) {
  263. if (!isLoadMore) {
  264. this.loading = true;
  265. this.queryParams.pageNum = 1;
  266. } else {
  267. this.loadmoreStatus = 'loading';
  268. }
  269. try {
  270. const res = await request({
  271. url: '/workflow/task/pageByTaskWait',
  272. method: 'GET',
  273. params: {
  274. pageNum: this.queryParams.pageNum,
  275. pageSize: this.queryParams.pageSize,
  276. flowName: this.queryParams.flowName || undefined,
  277. createByIds:
  278. this.queryParams.createByIds.length > 0
  279. ? this.queryParams.createByIds
  280. : undefined,
  281. },
  282. });
  283. if (res && res.code === 200) {
  284. const newList = res.rows || [];
  285. if (isLoadMore) {
  286. this.taskList = [...this.taskList, ...newList];
  287. // 判断是否还有更多数据
  288. if (newList.length < this.queryParams.pageSize) {
  289. this.loadmoreStatus = 'nomore';
  290. } else {
  291. this.loadmoreStatus = 'loadmore';
  292. }
  293. } else {
  294. this.taskList = newList;
  295. this.total = res.total || 0;
  296. // 重置加载更多状态
  297. if (this.taskList.length >= this.total) {
  298. this.loadmoreStatus = 'nomore';
  299. } else {
  300. this.loadmoreStatus = 'loadmore';
  301. }
  302. }
  303. } else {
  304. if (!isLoadMore) {
  305. this.taskList = [];
  306. this.total = 0;
  307. }
  308. uni.showToast({
  309. title: res?.msg || '获取数据失败',
  310. icon: 'none',
  311. });
  312. if (isLoadMore) {
  313. this.loadmoreStatus = 'loadmore';
  314. }
  315. }
  316. } catch (error) {
  317. console.error('获取待办任务列表失败:', error);
  318. if (!isLoadMore) {
  319. this.taskList = [];
  320. this.total = 0;
  321. }
  322. uni.showToast({
  323. title: '获取数据失败',
  324. icon: 'none',
  325. });
  326. if (isLoadMore) {
  327. this.loadmoreStatus = 'loadmore';
  328. }
  329. } finally {
  330. if (!isLoadMore) {
  331. this.loading = false;
  332. }
  333. }
  334. },
  335. // 搜索操作
  336. handleQuery() {
  337. this.getList();
  338. },
  339. // 加载更多
  340. loadMore() {
  341. if (this.loadmoreStatus === 'nomore' || this.loadmoreStatus === 'loading') {
  342. return;
  343. }
  344. this.queryParams.pageNum++;
  345. this.getList(true);
  346. },
  347. // 格式化时间
  348. formatTime(timeStr) {
  349. if (!timeStr) return '-';
  350. try {
  351. const date = new Date(timeStr);
  352. if (isNaN(date.getTime())) return timeStr;
  353. const year = date.getFullYear();
  354. const month = String(date.getMonth() + 1).padStart(2, '0');
  355. const day = String(date.getDate()).padStart(2, '0');
  356. const hours = String(date.getHours()).padStart(2, '0');
  357. const minutes = String(date.getMinutes()).padStart(2, '0');
  358. const seconds = String(date.getSeconds()).padStart(2, '0');
  359. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  360. } catch (error) {
  361. console.error('时间格式化失败:', error);
  362. return timeStr;
  363. }
  364. },
  365. // 办理任务
  366. handleApproval(row) {
  367. console.log('办理任务:', row);
  368. // 动态跳转到formPath对应的路径,携带businessId和taskId参数
  369. if (row.formPath) {
  370. // 确保路径以pages开头
  371. let fullPath = row.formPath;
  372. // 统一处理路径:去掉开头的/,然后添加pages前缀
  373. if (!fullPath.startsWith('pages/')) {
  374. // 如果以/开头,先去掉/
  375. if (fullPath.startsWith('/')) {
  376. fullPath = fullPath.substring(1);
  377. }
  378. // 添加pages前缀
  379. fullPath = `pages/${fullPath}`;
  380. }
  381. const url = `/${fullPath}?id=${row.businessId}&taskId=${row.id}&type=approval`;
  382. // 添加调试信息
  383. console.log('办理任务 - 原始formPath:', row.formPath);
  384. console.log('办理任务 - 处理后的fullPath:', fullPath);
  385. console.log('办理任务 - 最终跳转URL:', url);
  386. // 使用navigateTo进行跳转
  387. uni.navigateTo({
  388. url: url,
  389. fail: (err) => {
  390. console.error('办理页面跳转失败:', err);
  391. // 如果跳转失败,使用原有逻辑作为备选
  392. this.fallbackApproval(row);
  393. },
  394. });
  395. } else {
  396. // 如果没有formPath,使用原有逻辑作为备选
  397. this.fallbackApproval(row);
  398. }
  399. },
  400. // 备选办理方法(原有逻辑)
  401. fallbackApproval(row) {
  402. console.log('使用备选办理逻辑:', row);
  403. // 根据表单类型跳转到对应的审批页面
  404. if (row.formCustom === 'Y') {
  405. // 自定义表单
  406. uni.navigateTo({
  407. url: `/pages/workflow/form/custom?businessId=${row.businessId}&taskId=${
  408. row.id
  409. }&formPath=${encodeURIComponent(row.formPath || '')}`,
  410. });
  411. } else {
  412. // 默认表单或其他类型
  413. uni.navigateTo({
  414. url: `/pages/workflow/approval/index?businessId=${row.businessId}&taskId=${row.id}&type=approval`,
  415. });
  416. }
  417. },
  418. // 打开申请人选择
  419. openUserSelect() {
  420. this.userSelectDialog.visible = true;
  421. this.loadUserList();
  422. },
  423. // 取消申请人选择
  424. cancelUserSelect() {
  425. this.userSelectDialog.visible = false;
  426. this.userSearchKeyword = '';
  427. },
  428. // 确认申请人选择
  429. confirmUserSelect() {
  430. // 获取当前弹窗中选中的用户
  431. const currentSelected = this.userList.filter((user) => user.selected);
  432. console.log('确认选择 - 用户列表:', this.userList);
  433. console.log('确认选择 - 选中的用户:', currentSelected);
  434. if (currentSelected.length > 0) {
  435. // 如果有选中的用户,更新已选择的用户列表
  436. this.selectedUsers = currentSelected;
  437. this.queryParams.createByIds = currentSelected.map((user) => user.userId);
  438. console.log('更新选中用户:', this.selectedUsers);
  439. } else {
  440. // 如果没有选中任何用户,清空已选择的用户列表
  441. this.selectedUsers = [];
  442. this.queryParams.createByIds = [];
  443. console.log('清空选中用户');
  444. }
  445. this.userSelectDialog.visible = false;
  446. this.handleQuery();
  447. },
  448. // 切换用户选择状态
  449. toggleUserSelect(user) {
  450. this.$set(user, 'selected', !user.selected);
  451. console.log('切换用户选择:', user.nickName, '选中状态:', user.selected);
  452. },
  453. // checkbox变化处理
  454. onCheckboxChange(user, value) {
  455. console.log('Checkbox变化:', user.nickName, '新值:', value);
  456. this.$set(user, 'selected', value);
  457. },
  458. // 加载用户列表
  459. async loadUserList() {
  460. try {
  461. const res = await request({
  462. url: '/system/user/list',
  463. method: 'GET',
  464. params: {
  465. pageNum: 1,
  466. pageSize: 100,
  467. userName: this.userSearchKeyword || undefined,
  468. nickName: this.userSearchKeyword || undefined,
  469. },
  470. });
  471. if (res && res.code === 200) {
  472. // 每次加载用户列表时,所有用户默认都不选中
  473. this.userList = (res.rows || []).map((user) => ({
  474. ...user,
  475. selected: false,
  476. }));
  477. console.log('加载用户列表完成,用户数量:', this.userList.length);
  478. } else {
  479. this.userList = [];
  480. uni.showToast({
  481. title: res?.msg || '获取用户列表失败',
  482. icon: 'none',
  483. });
  484. }
  485. } catch (error) {
  486. console.error('获取用户列表失败:', error);
  487. this.userList = [];
  488. uni.showToast({
  489. title: '获取用户列表失败',
  490. icon: 'none',
  491. });
  492. }
  493. },
  494. // 搜索用户(防抖处理)
  495. searchUsers() {
  496. if (this.userSearchTimer) {
  497. clearTimeout(this.userSearchTimer);
  498. }
  499. this.userSearchTimer = setTimeout(() => {
  500. this.loadUserList();
  501. }, 500);
  502. },
  503. // 获取头像显示文字(取前两个字符)
  504. getAvatarText(nickName) {
  505. if (!nickName) return '';
  506. // 取前两个字符,如果只有一个字符则返回该字符
  507. return nickName.length > 1 ? nickName.substring(0, 1) : nickName;
  508. },
  509. },
  510. };
  511. </script>
  512. <style lang="scss" scoped>
  513. .task-waiting-container {
  514. background-color: #f5f6fa;
  515. min-height: 100vh;
  516. }
  517. .search-container {
  518. padding: 20rpx;
  519. background-color: #fff;
  520. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  521. }
  522. .filter-section {
  523. margin-top: 20rpx;
  524. }
  525. .filter-item {
  526. display: flex;
  527. align-items: center;
  528. padding: 24rpx;
  529. background-color: #f8f9fa;
  530. border-radius: 12rpx;
  531. border: 1px solid #e4e7ed;
  532. &:active {
  533. background-color: #f0f0f0;
  534. }
  535. }
  536. .filter-text {
  537. flex: 1;
  538. margin-left: 16rpx;
  539. font-size: 28rpx;
  540. color: #303133;
  541. }
  542. .content-wrapper {
  543. padding: 20rpx;
  544. }
  545. .empty-container {
  546. padding: 100rpx 20rpx;
  547. }
  548. .task-list {
  549. display: flex;
  550. flex-direction: column;
  551. gap: 20rpx;
  552. }
  553. .task-card {
  554. background-color: #fff;
  555. border-radius: 16rpx;
  556. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
  557. overflow: hidden;
  558. }
  559. .card-header {
  560. display: flex;
  561. justify-content: space-between;
  562. align-items: center;
  563. padding: 24rpx;
  564. border-bottom: 1px solid #f0f0f0;
  565. }
  566. .task-title {
  567. font-size: 32rpx;
  568. font-weight: bold;
  569. color: #303133;
  570. flex: 1;
  571. }
  572. .task-status {
  573. margin-left: 16rpx;
  574. }
  575. .card-content {
  576. padding: 24rpx;
  577. }
  578. .info-item {
  579. display: flex;
  580. align-items: flex-start;
  581. margin-bottom: 16rpx;
  582. &:last-child {
  583. margin-bottom: 0;
  584. }
  585. }
  586. .label {
  587. font-size: 28rpx;
  588. color: #606266;
  589. min-width: 140rpx;
  590. margin-right: 16rpx;
  591. }
  592. .value {
  593. font-size: 28rpx;
  594. color: #303133;
  595. flex: 1;
  596. word-break: break-all;
  597. }
  598. .assignee-tags {
  599. flex: 1;
  600. display: flex;
  601. flex-wrap: wrap;
  602. align-items: center;
  603. }
  604. .card-actions {
  605. display: flex;
  606. justify-content: flex-end;
  607. padding: 20rpx;
  608. border-top: 1px solid #f0f0f0;
  609. }
  610. .action-btn {
  611. display: flex;
  612. flex-direction: column;
  613. align-items: center;
  614. justify-content: center;
  615. padding: 16rpx 40rpx;
  616. border-radius: 12rpx;
  617. background-color: #f8f9fa;
  618. min-width: 120rpx;
  619. transition: all 0.3s ease;
  620. &:active {
  621. transform: scale(0.95);
  622. opacity: 0.8;
  623. }
  624. }
  625. .btn-text {
  626. font-size: 24rpx;
  627. margin-top: 8rpx;
  628. color: #303133;
  629. font-weight: 500;
  630. }
  631. .primary-btn {
  632. background-color: rgba(60, 156, 255, 0);
  633. .btn-text {
  634. color: #3c9cff;
  635. }
  636. }
  637. // 申请人选择弹窗样式
  638. .user-select-popup {
  639. background-color: #fff;
  640. border-radius: 14rpx 14rpx 0 0;
  641. overflow: hidden;
  642. height: 80vh;
  643. display: flex;
  644. flex-direction: column;
  645. }
  646. .popup-header {
  647. display: flex;
  648. justify-content: space-between;
  649. align-items: center;
  650. padding: 24rpx;
  651. border-bottom: 1px solid #f0f0f0;
  652. flex-shrink: 0; /* 防止头部被压缩 */
  653. }
  654. .popup-title {
  655. font-size: 32rpx;
  656. font-weight: bold;
  657. color: #303133;
  658. }
  659. .popup-content {
  660. flex: 1;
  661. padding: 24rpx 24rpx 0 24rpx; /* 底部不需要padding,由footer提供 */
  662. display: flex;
  663. flex-direction: column;
  664. overflow: hidden; /* 防止内容溢出 */
  665. }
  666. .user-list {
  667. margin-top: 20rpx;
  668. flex: 1; /* 使用弹性布局,自动占满剩余空间 */
  669. overflow-y: auto; /* 添加垂直滚动条 */
  670. min-height: 0; /* 确保flex子元素可以收缩 */
  671. }
  672. .user-item {
  673. display: flex;
  674. align-items: center;
  675. justify-content: space-between;
  676. padding: 20rpx 0;
  677. border-bottom: 1px solid #f8f9fa;
  678. &:last-child {
  679. border-bottom: none;
  680. }
  681. &:active {
  682. background-color: #f8f9fa;
  683. }
  684. }
  685. .user-info {
  686. display: flex;
  687. align-items: center;
  688. flex: 1;
  689. }
  690. .user-details {
  691. margin-left: 20rpx;
  692. flex: 1;
  693. }
  694. .user-name {
  695. display: block;
  696. font-size: 28rpx;
  697. color: #303133;
  698. font-weight: 500;
  699. }
  700. .user-username {
  701. display: block;
  702. font-size: 24rpx;
  703. color: #909399;
  704. margin-top: 4rpx;
  705. }
  706. .popup-footer {
  707. padding: 24rpx;
  708. border-top: 1px solid #f0f0f0;
  709. display: flex;
  710. gap: 20rpx;
  711. flex-shrink: 0; /* 防止底部按钮区域被压缩 */
  712. background-color: #fff; /* 确保背景色一致 */
  713. }
  714. // uview组件样式调整
  715. ::v-deep .u-search {
  716. background-color: #f5f6fa;
  717. /* 清除默认的 flex: 1 */
  718. flex: none;
  719. }
  720. // 弹窗内搜索框样式优化
  721. .popup-content ::v-deep .u-search {
  722. background-color: #f8f9fa;
  723. border-radius: 8rpx;
  724. margin-bottom: 0; /* 移除默认margin */
  725. }
  726. .popup-content ::v-deep .u-search__content {
  727. height: 60rpx; /* 设置搜索框高度 */
  728. border-radius: 8rpx;
  729. }
  730. .popup-content ::v-deep .u-input {
  731. font-size: 28rpx; /* 调整输入框字体大小 */
  732. }
  733. ::v-deep .u-tag {
  734. margin: 0;
  735. }
  736. ::v-deep .u-loadmore {
  737. padding: 40rpx 0;
  738. }
  739. </style>