| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864 |
- <template>
- <view class="container">
- <view class="top-box">
- <view class="input-item">
- <image class="icon" src="@/static/image/search.png" mode=""></image>
- <input class="" placeholder="请输入讲者姓名" placeholder-class="placeholder" />
- </view>
- <view class="filter-item" @click="showFilter = true">
- <image class="w32 h32 mr4" src="@/static/image/icon_select.png" mode=""></image>
- <text>筛选</text>
- </view>
- </view>
- <!-- 筛选标签栏 -->
- <view class="filter-bar">
- <view class="filter-tabs">
- <view class="tab-item" :class="{ active: currentTab === item.value }" v-for="(item, index) in tabs"
- :key="index" @click="switchTab(item.value)">
- {{ item.label }}
- </view>
- </view>
- <view class="filter-divider"></view>
- <view class="filter-btn">
- <text>全员</text>
- <image class="w32 h32" src="@/static/image/icon_select.png" mode=""></image>
- </view>
- </view>
- <!-- 任务列表 -->
- <scroll-view class="content" scroll-y>
- <view class="task-card" v-for="(item, index) in taskList" :key="index" @click="showDetail(item)">
- <view class="card-header">
- <view class="card-title">
- <text>{{ item.title }}</text>
- <text class="title-little">{{item.titleLittle}}</text>
- <view class="lable">一级</view>
- </view>
- <view class="status-tag" :class="item.status">
- {{ item.statusText }}
- </view>
- </view>
- <view class="row">
- <image class="icon" src="@/static/image/icon_select.png" mode=""></image>
- <text>湖南省人民医院</text>
- <view class="line"></view>
- <text>口腔科</text>
- </view>
- <view class="row">
- <image class="icon" src="/static/image/icon_select.png" mode=""></image>
- <text class="txt">小蜜蜂:张萌(302、403)、王欣欣(3...小蜜蜂:张萌(302、403)、王欣欣</text>
- <image class="icon" src="/static/image/icon_expand.png" mode=""></image>
- </view>
- <view class="card-warning" v-if="item.warning">
- <text class="warning-icon">⚠</text>
- <text>{{ item.warning }}</text>
- </view>
- <view class="card-rejection" v-if="item.rejectionReason">
- <image class="w28 h28 mr8" src="@/static/image/icon_wrong.png" mode=""></image>
- <text>驳回原因: {{ item.rejectionReason }}</text>
- </view>
- <view class="card-tags">
- <view class="tag-item points-tag" @click.stop="showCorrelation=true">
- 默认产品组:五级
- </view>
- </view>
- <view class="apply-button">定级申请</view>
- </view>
- </scroll-view>
- <!-- 身份筛选 -->
- <view class="filter-popup" v-if="showFilter" @click="closeFilter">
- <view class="filter-content" @click.stop>
- <view class="filter-header">
- <view class="filter-title">筛选</view>
- <image class="filter-close-btn" src="@/static/image/icon_close.png" @click="closeFilter" mode="">
- </image>
- </view>
- <!-- 身份筛选 -->
- <view class="filter-group">
- <view class="group-label">账号身份</view>
- <view class="tabs-container">
- <view v-for="(tab, index) in statusTabs" :key="index"
- :class="['tab-item', activeTab === tab.value ? 'active' : '']"
- @click="switchFilterTab(tab.value)">
- <text class="tab-text">{{ tab.label }}</text>
- <text v-if="tab.count" class="tab-count">{{ tab.count }}</text>
- </view>
- </view>
- </view>
- <!-- 操作按钮 -->
- <view class="filter-actions">
- <view class="reset-btn" @click="resetFilters">重置</view>
- <view class="confirm-btn" @click="confirmFilters">确定</view>
- </view>
- </view>
- </view>
- <!-- 关联产品 -->
- <view class="filter-popup" v-if="showCorrelation" @click="showCorrelation = false">
- <view class="filter-content correlation-content" @click.stop>
- <view class="filter-header">
- <view class="filter-title">关联产品</view>
- <image class="filter-close-btn" src="@/static/image/icon_close.png" @click="showCorrelation = false"
- mode="">
- </image>
- </view>
- <!-- 注意:这里移出了 filter-header -->
- <view class="popup-content">
- <view class="head-item item">
- <view class="left">小蜜蜂</view>
- <view class="right">关联产品</view>
- </view>
- <view class="item" v-for="(row, index) in productData" :key="index">
- <view class="left">{{ row.assistant }}</view>
- <view class="right">
- <text v-for="(product, idx) in row.products" :key="idx" class="product-tag">
- {{ product }}<span v-if="idx < row.products.length - 1">、</span>
- </text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <Server />
- </view>
- </template>
- <script>
- import Server from '@/components/Server.vue'
- import {
- getAirClassroomList
- } from '@/api-js/airClassroom'
- export default {
- components: {
- Server
- },
- data() {
- return {
- productData: [{
- assistant: '王小明',
- products: ['302', '403', '202', '301']
- },
- {
- assistant: '李洋',
- products: ['301']
- }
- ],
- showCorrelation: false, //显示关联产品弹窗
- activeTab: '',
- // 状态标签
- statusTabs: [{
- label: '医生/药剂师',
- value: 0
- },
- {
- label: '护士',
- value: 1
- },
- {
- label: '店员',
- value: 2
- },
- {
- label: '经济学家',
- value: 3
- },
- {
- label: '其他',
- value: 4
- }
- ],
- statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 'px',
- currentTab: 0,
- showFilter: false,
- dateRange: {
- startDate: '',
- endDate: ''
- },
- tempDateRange: {
- startDate: '',
- endDate: ''
- },
- tabs: [{
- label: '全部',
- value: 'all'
- },
- {
- label: '待审核',
- value: 'reviewing'
- },
- {
- label: '已通过',
- value: 'approved'
- },
- {
- label: '已驳回',
- value: 'rejected'
- }
- ],
- taskList: []
- }
- },
- watch: {
- showFilter(newVal) {
- if (newVal) {
- // 打开弹窗时,同步临时日期范围为当前日期范围
- this.tempDateRange = {
- startDate: this.dateRange.startDate,
- endDate: this.dateRange.endDate
- }
- }
- }
- },
- onLoad() {
- this.loadData()
- },
- onReachBottom() {
- this.loadMore()
- },
- methods: {
- goBack() {
- uni.navigateBack()
- },
- switchTab(value) {
- this.currentTab = value
- this.loadData()
- },
- // 弹窗筛选栏切换
- switchFilterTab(value) {
- this.activeTab = value
- },
- closeFilter() {
- // 关闭弹窗时,恢复临时日期范围为当前日期范围
- this.tempDateRange = {
- startDate: this.dateRange.startDate,
- endDate: this.dateRange.endDate
- }
- this.showFilter = false
- },
- onStartDateChange(e) {
- this.tempDateRange.startDate = e.detail.value
- },
- onEndDateChange(e) {
- this.tempDateRange.endDate = e.detail.value
- },
- resetFilters() {
- this.activeTab = '';
- },
- confirmFilters() {
- // 验证日期范围
- if (this.tempDateRange.startDate && this.tempDateRange.endDate) {
- if (new Date(this.tempDateRange.startDate) > new Date(this.tempDateRange.endDate)) {
- uni.showToast({
- icon: 'none',
- title: '开始时间不能大于结束时间'
- })
- return
- }
- }
- this.dateRange = {
- startDate: this.tempDateRange.startDate,
- endDate: this.tempDateRange.endDate
- }
- this.showFilter = false
- this.loadData()
- },
- goComplete(item) {
- uni.navigateTo({
- url: `/pages_task/completeTask?id=${item.id}`
- })
- },
- goEdit(item) {
- uni.navigateTo({
- url: `/pages_task/completeTask?id=${item.id}&edit=true`
- })
- },
- // 查看详情
- showDetail(item) {
- uni.navigateTo({
- url: `/pages_task/taskDetail?id=${item.id}`
- })
- },
- async loadData() {
- try {
- uni.showLoading({
- title: '加载中...'
- })
- const res = await getAirClassroomList({
- status: this.currentTab,
- startDate: this.dateRange.startDate,
- endDate: this.dateRange.endDate,
- page: 1,
- pageSize: 20
- })
- uni.hideLoading()
- if (res.code === 200 && res.data) {
- this.taskList = res.data.list || this.getDefaultData()
- } else {
- this.taskList = this.getDefaultData()
- }
- } catch (e) {
- uni.hideLoading()
- console.error('加载数据失败', e)
- this.taskList = this.getDefaultData()
- }
- },
- async loadMore() {
- // 加载更多数据
- },
- getDefaultData() {
- return [{
- id: 1,
- title: '王小明',
- titleLittle: '主治医师',
- videoType: '长视频',
- category: '学术',
- points: '10',
- count: '1',
- startTime: '2025-9-20 13:55',
- endTime: '2025-9-20 13:55',
- createTime: '2025-9-20 13:55',
- status: 'approved',
- statusText: '已通过'
- },
- {
- id: 2,
- title: '王小明',
- titleLittle: '主治医师',
- videoType: '长视频',
- category: '学术',
- points: '10',
- count: '1',
- startTime: '2025-9-20 13:55',
- endTime: '2025-9-20 13:55',
- createTime: '2025-9-20 13:55',
- status: 'approved',
- statusText: '已通过',
- warning: '有效观看不足5人'
- },
- {
- id: 3,
- title: '王小明',
- titleLittle: '主治医师',
- videoType: '短视频',
- category: '学术',
- points: '10',
- count: '1',
- startTime: '2025-9-20 13:55',
- endTime: '2025-9-20 13:55',
- createTime: '2025-9-20 13:55',
- status: 'approved',
- statusText: '待审核'
- },
- {
- id: 4,
- title: '王小明',
- titleLittle: '主治医师',
- videoType: '文章',
- category: '学术',
- points: '10',
- count: '1',
- startTime: '2025-9-20 13:55',
- endTime: '2025-9-20 13:55',
- createTime: '2025-9-20 13:55',
- status: 'rejected',
- statusText: '已驳回',
- rejectionReason: '医师资质不够'
- },
- {
- id: 5,
- title: '王小明',
- titleLittle: '主治医师',
- videoType: '长视频',
- category: '学术',
- points: '10',
- count: '1',
- startTime: '2025-9-20 13:55',
- endTime: '2025-9-20 13:55',
- createTime: '2025-9-20 13:55',
- status: 'approved',
- statusText: '已通过'
- }
- ]
- }
- }
- }
- </script>
- <style lang="stylus">
- .placeholder {
- color: #C8C9CC !important;
- font-size: 28rpx;
- color: #C8C9CC;
- }
- </style>
- <style lang="scss" scoped>
- .container {
- min-height: 100vh;
- background: #f5f5f5;
- display: flex;
- flex-direction: column;
- .top-box {
- padding: 16rpx 32rpx;
- display: flex;
- align-items: center;
- background: #ffffff;
- .input-item {
- display: flex;
- align-items: center;
- flex: 1;
- height: 72rpx;
- background: #F7F8FA;
- border-radius: 38rpx 38rpx 38rpx 38rpx;
- .icon {
- width: 26rpx;
- height: 26rpx;
- margin: 0 10rpx 0 28rpx;
- }
- }
- .filter-item {
- margin-left: 24rpx;
- display: flex;
- align-items: center;
- font-size: 28rpx;
- color: #999999;
- }
- }
- }
- .status-bar {
- width: 100%;
- background: #fff;
- }
- .header {
- position: relative;
- height: 88rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- background: #fff;
- border-bottom: 1rpx solid #f0f0f0;
- .back-btn {
- position: absolute;
- left: 24rpx;
- width: 40rpx;
- height: 40rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .title {
- font-size: 36rpx;
- font-weight: bold;
- color: #333;
- }
- .header-right {
- position: absolute;
- right: 24rpx;
- display: flex;
- align-items: center;
- gap: 16rpx;
- .more-icon {
- font-size: 32rpx;
- color: #333;
- }
- }
- }
- .filter-bar {
- display: flex;
- align-items: center;
- background: #fff;
- padding: 0 40rpx;
- .filter-tabs {
- flex: 1;
- display: flex;
- align-items: center;
- gap: 64rpx;
- overflow-x: auto;
- .tab-item {
- padding: 24rpx 0;
- font-size: 28rpx;
- color: #999999;
- white-space: nowrap;
- position: relative;
- &.active {
- color: #333333;
- font-weight: 500;
- &::after {
- content: '';
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- height: 6rpx;
- background: #388BFF;
- border-radius: 3rpx 3rpx 3rpx 3rpx;
- }
- }
- }
- }
- .filter-divider {
- width: 1rpx;
- height: 40rpx;
- background: #e0e0e0;
- margin: 0 16rpx;
- }
- .filter-btn {
- display: flex;
- align-items: center;
- padding: 24rpx 0;
- font-size: 28rpx;
- color: #666666;
- .filter-icon {
- font-size: 32rpx;
- color: #333;
- }
- }
- }
- .content {
- flex: 1;
- padding: 24rpx;
- box-sizing: border-box;
- }
- .task-card {
- background: #fff;
- border-radius: 16rpx;
- padding: 24rpx;
- margin-bottom: 24rpx;
- .card-header {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- margin-bottom: 16rpx;
- .card-title {
- flex: 1;
- font-size: 32rpx;
- font-weight: 600;
- color: #333;
- display: flex;
- align-items: center;
- .title-little {
- font-size: 24rpx;
- color: #666666;
- margin-left: 36rpx;
- }
- .lable {
- margin-left: 16rpx;
- padding: 2rpx 12rpx;
- font-weight: 500;
- font-size: 22rpx;
- color: #C89743;
- background: #FFF6E5;
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- }
- }
- .status-tag {
- padding: 8rpx 16rpx;
- border-radius: 20rpx;
- font-size: 24rpx;
- // &.pending {
- // background: #E3F2FD;
- // color: #2196F3;
- // }
- &.reviewing {
- background: #FFFBEA;
- color: #FAAB0C;
- }
- &.approved {
- background: #E6FAEF;
- color: #07C160;
- }
- &.rejected {
- background: #FFF4F5;
- color: #CF3546;
- }
- }
- }
- .card-tags {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- gap: 12rpx;
- margin-top: 20rpx;
- .tag-item {
- padding: 8rpx 16rpx;
- background: #FFFAF4;
- border-radius: 8rpx;
- font-size: 24rpx;
- color: #5D410F;
- display: flex;
- align-items: center;
- &.points-tag {
- color: #388BFF;
- background: transparent;
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- border: 2rpx solid rgba(56, 139, 255, 0.4);
- }
- }
- }
- .row {
- display: flex;
- align-items: center;
- margin-bottom: 20rpx;
- font-size: 28rpx;
- color: #666666;
- .icon {
- width: 32rpx;
- height: 32rpx;
- margin-right: 16rpx;
- }
- .line {
- width: 2rpx;
- height: 28rpx;
- background: #EAEBEE;
- border-radius: 0rpx 0rpx 0rpx 0rpx;
- margin: 0 24rpx;
- }
- .txt {
- flex: 1;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- .apply-button {
- padding: 12rpx 40rpx;
- font-weight: 500;
- font-size: 28rpx;
- color: #FFFFFF;
- background: #388BFF;
- border-radius: 34rpx 34rpx 34rpx 34rpx;
- width: fit-content;
- margin-left: auto;
- }
- .card-warning {
- display: flex;
- align-items: center;
- gap: 8rpx;
- padding: 12rpx;
- background: #FFF3E0;
- border-radius: 8rpx;
- margin-bottom: 16rpx;
- font-size: 26rpx;
- color: #FF9800;
- .warning-icon {
- font-size: 28rpx;
- }
- }
- .card-rejection {
- display: flex;
- align-items: center;
- gap: 8rpx;
- padding: 10rpx 20rpx;
- background: #FFF4F5;
- border-radius: 8rpx;
- margin-bottom: 16rpx;
- font-size: 26rpx;
- color: #F44336;
- .rejection-icon {
- font-size: 28rpx;
- }
- }
- }
- .filter-popup {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.5);
- z-index: 999;
- display: flex;
- align-items: flex-end;
- }
- .filter-content {
- width: 100%;
- background: #fff;
- border-radius: 24rpx 24rpx 0 0;
- padding: 32rpx;
- display: flex;
- flex-direction: column;
- max-height: 80vh;
- .popup-content {
- .item {
- height: 88rpx;
- display: flex;
- align-items: center;
- font-weight: 400;
- font-size: 28rpx;
- color: #333333;
- padding-left: 32rpx;
- }
- .head-item {
- font-weight: 600;
- color: #666666;
- }
- .left {
- width: 20%;
- }
- .right {
- flex: 1;
- }
- }
- /* 限制最大高度 */
- .filter-header {
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 32rpx;
- position: relative;
- flex-shrink: 0;
- /* 防止标题区域被压缩 */
- .filter-title {
- font-size: 32rpx;
- font-weight: bold;
- color: #333;
- text-align: center;
- }
- .filter-close-btn {
- position: absolute;
- right: 0;
- width: 44rpx;
- height: 44rpx;
- }
- }
- .filter-group {
- margin-bottom: 32rpx;
- .group-label {
- font-size: 28rpx;
- font-weight: bold;
- color: #333;
- margin-bottom: 20rpx;
- }
- .tabs-container {
- display: inline-flex;
- align-items: center;
- gap: 32rpx;
- flex-wrap: wrap;
- .tab-item {
- display: flex;
- align-items: center;
- gap: 8rpx;
- padding: 12rpx 0;
- position: relative;
- .tab-text {
- font-size: 28rpx;
- color: #666666;
- }
- .tab-count {
- font-size: 24rpx;
- color: #999999;
- background: #f5f6fa;
- padding: 2rpx 8rpx;
- border-radius: 12rpx;
- min-width: 32rpx;
- text-align: center;
- border: 2rpx solid transparent;
- }
- &.active {
- color: #333333;
- background: rgba(56, 139, 255, 0.15);
- border-radius: 70rpx 70rpx 70rpx 70rpx;
- border: 2rpx solid #388BFF;
- padding: 14rpx 32rpx;
- }
- }
- }
- }
- .filter-actions {
- display: flex;
- gap: 24rpx;
- margin-top: 40rpx;
- padding-top: 24rpx;
- flex-shrink: 0;
- .reset-btn,
- .confirm-btn {
- flex: 1;
- height: 80rpx;
- line-height: 80rpx;
- text-align: center;
- border-radius: 200rpx 200rpx 200rpx 200rpx;
- font-size: 28rpx;
- }
- .reset-btn {
- background: #fff;
- color: #388BFF;
- border: 2rpx solid #388BFF;
- }
- .confirm-btn {
- background: #388BFF;
- color: #fff;
- }
- }
- }
- </style>
|