liujiaxin hace 18 horas
padre
commit
2cd7a5ab05
Se han modificado 4 ficheros con 264 adiciones y 133 borrados
  1. 1 3
      components/Server.vue
  2. 14 13
      pages/common/launch.vue
  3. 199 111
      pages_speaker/index.vue
  4. 50 6
      pages_task/createTask.vue

+ 1 - 3
components/Server.vue

@@ -168,9 +168,7 @@
 <style lang="scss" scoped>
 .serve{
 	position: fixed;
-	z-index: 9999;
-	// width: 150rpx;
-	// height: 150rpx;
+	z-index: 9;
 	width: 96rpx;
 	height: 96rpx;
 	background: linear-gradient( 0deg, #388BFF 0%, #388BFF 100%);

+ 14 - 13
pages/common/launch.vue

@@ -1,6 +1,5 @@
 <template>
 	<view class="content">
-		[[]]
 		<view class="loadding" v-if="loadding==true">
 			<image src="https://user.test.ylrztop.com/images/logo.png"></image>
 			<text class="text">企业端</text>
@@ -19,20 +18,22 @@
 		methods: {
 			
 			getDicts:function(){
-				dicts().then(
-					res => {
-						if(res.code==200){
-							console.log(res)
-							uni.setStorageSync('dicts',JSON.stringify(res));
+				this.loadding=false
+				this.navigatHandler();
+				// dicts().then(
+				// 	res => {
+				// 		if(res.code==200){
+				// 			console.log(res)
+				// 			uni.setStorageSync('dicts',JSON.stringify(res));
 							
-						}else{
+				// 		}else{
 							 
-						}
-						this.loadding=false;
-						this.navigatHandler();
-					},
-					rej => {}
-				);
+				// 		}
+				// 		this.loadding=false;
+				// 		this.navigatHandler();
+				// 	},
+				// 	rej => {}
+				// );
 			},
 			navigatHandler: function() {
 				uni.reLaunch({

+ 199 - 111
pages_speaker/index.vue

@@ -12,19 +12,40 @@
 		</view>
 		<!-- {{utils.getDictLabelName("doctorPosition",item.doctorPosition)}} -->
 		<!-- 筛选标签栏 -->
-		<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 class="tab">
+			<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" @click="showMemberPopup = true">
+					<text>{{ selectedMemberOption || '全员' }}</text>
+					<image class="w32 h32" src="@/static/image/icon_down.png" mode=""></image>
 				</view>
 			</view>
-			<view class="filter-divider"></view>
-			<view class="filter-btn">
-				<text>全员</text>
-				<image class="w32 h32" src="@/static/image/icon_down.png" mode=""></image>
+			<!-- 成员筛选弹窗 -->
+		<view class="member-popup-overlay" v-if="showMemberPopup" @click="showMemberPopup = false"></view>
+		<view class="member-popup" v-if="showMemberPopup">
+			<view class="member-options">
+				<view class="member-option" :class="{ active: selectedMember === 'all' }" @click="selectMember('all', '全员')">
+					<text>全员</text>
+				</view>
+				<view class="member-option" :class="{ active: selectedMember === 'option1' }" @click="selectMember('option1', '选项1')">
+					<text>选项1</text>
+				</view>
+				<view class="member-option" :class="{ active: selectedMember === 'option2' }" @click="selectMember('option2', '选项2')">
+					<text>选项2</text>
+				</view>
+				<view class="member-option" :class="{ active: selectedMember === 'option3' }" @click="selectMember('option3', '选项3')">
+					<text>选项3</text>
+				</view>
 			</view>
 		</view>
+		</view>
+		
 		<!-- 任务列表 -->
 		<scroll-view class="content" scroll-y>
 			<view class="task-card" v-for="(item, index) in taskList" :key="index" @click="showDetail(item)">
@@ -34,7 +55,8 @@
 						<text class="title-little" v-if="item.account_type">{{item.account_type}}</text>
 						<view class="lable" v-if="item.doctorLevel">{{item.doctorLevel}}</view>
 					</view>
-					<view class="status-tag" :class="item.status === 0 ? 'reviewing' : item.status === 1 ? 'approved' : item.status === 2 ? 'rejected' : 'manual'">
+					<view class="status-tag"
+						:class="item.status === 0 ? 'reviewing' : item.status === 1 ? 'approved' : item.status === 2 ? 'rejected' : 'manual'">
 						{{ item.status === 0 ? '待审核' : item.status === 1 ? '已通过' : item.status === 2 ? '已驳回' : '转人工审核' }}
 					</view>
 				</view>
@@ -51,11 +73,14 @@
 					<view class="txt-container">
 						<text class="txt" :class="{ 'expanded': expandedItems[index] }">
 							<text v-for="(value,idx) in (item.doctorProducts || [])" :key="idx">
-								{{ value.companyUserName }}({{ value.productCode }})<span v-if="idx < (item.doctorProducts || []).length - 1">、</span>
+								{{ value.companyUserName }}({{ value.productCode }})<span
+									v-if="idx < (item.doctorProducts || []).length - 1">、</span>
 							</text>
 						</text>
 					</view>
-					<image v-if="item.doctorProducts && item.doctorProducts.length > 0" class="icon expand-icon" :class="{ 'expanded': expandedItems[index] }" @click.stop="expand(index)" src="/static/image/icon_expand.png" mode=""></image>
+					<image v-if="item.doctorProducts && item.doctorProducts.length > 0" class="icon expand-icon"
+						:class="{ 'expanded': expandedItems[index] }" @click.stop="expand(index)"
+						src="/static/image/icon_expand.png" mode=""></image>
 				</view>
 
 				<view class="card-warning" v-if="item.warning">
@@ -70,10 +95,10 @@
 				<view class="card-tags">
 					<view class="tag-item points-tag" v-if="item.productGroup" @click.stop="showCorrelation=true">
 						<!-- 默认产品组:五级 -->
-						 {{ item.productGroup }}
+						{{ item.productGroup }}
 					</view>
 				</view>
-				<view class="apply-button" v-if="item.status==0" @click.stop="applyLevel(item)">定级申请</view>
+				<view class="apply-button" v-if="item.isApply==0" @click.stop="applyLevel(item)">定级申请</view>
 			</view>
 		</scroll-view>
 
@@ -90,11 +115,11 @@
 				<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 v-for="(tab, index) in identity" :key="index"
+							:class="['tab-item', activeTab === tab.dictValue ? 'active' : '']"
+							@click="switchFilterTab(tab.dictValue)">
+							<text class="tab-text">{{ tab.dictLabel }}</text>
+							<!-- <text v-if="tab.dictValue" class="tab-count">{{ tab.dictValue }}</text> -->
 						</view>
 					</view>
 				</view>
@@ -134,11 +159,14 @@
 				</view>
 			</view>
 		</view>
+
+
 		<Server />
 	</view>
 </template>
 
 <script>
+    import utils from '@/utils/common.js'
 	import Server from '@/components/Server.vue'
 	import {
 		speakerList
@@ -163,27 +191,7 @@
 				showCorrelation: false, //显示关联产品弹窗
 				activeTab: '',
 				// 状态标签
-				statusTabs: [{
-						label: '医生/药剂师',
-						value: 0
-					},
-					{
-						label: '护士',
-						value: 1
-					},
-					{
-						label: '店员',
-						value: 2
-					},
-					{
-						label: '经济学家',
-						value: 3
-					},
-					{
-						label: '其他',
-						value: 4
-					}
-				],
+				identity: {},
 				statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 'px',
 				currentTab: '',
 				showFilter: false,
@@ -195,7 +203,7 @@
 					startDate: '',
 					endDate: ''
 				},
-				searchName:'',
+				searchName: '',
 				tabs: [{
 						label: '全部',
 						value: ''
@@ -216,7 +224,13 @@
 				taskList: [],
 				expandedItems: {},
 				// 搜索防抖定时器
-				searchTimer: null
+				searchTimer: null,
+				// 成员筛选弹窗
+				showMemberPopup: false,
+				// 选中的成员选项
+				selectedMember: 'all',
+				// 选中的成员选项文本
+				selectedMemberOption: '全员'
 			}
 		},
 		watch: {
@@ -241,13 +255,19 @@
 				}, 300)
 			}
 		},
-		onLoad() {
+		async onLoad() {
 			this.loadData();
-			// this.tabs= utils.getDicts("sys_user_sex");
+			try {
+				this.identity = await utils.getDicts("doctor_account_identity_type");//学术头衔
+				console.log("identity内容", this.identity)
+			} catch (e) {
+				console.log('获取字典数据失败:', e)
+				this.identity = []
+			}
 		},
 		onReachBottom() {
 			this.loadMore()
-			
+
 		},
 		methods: {
 			expand(index) {
@@ -301,25 +321,25 @@
 			},
 			// 查看详情
 			showDetail(item) {
-				console.log("item内容",item)
+				console.log("item内容", item)
 				uni.navigateTo({
 					url: `/pages_speaker/lecturerDetail?id=${item.id }`
 				})
 			},
 			async loadData() {
-				console.log("activeTab内容",this.currentTab)
+				console.log("activeTab内容", this.currentTab)
 				try {
 					uni.showLoading({
-							title: '加载中...'
-						})
-					this.userInfo=JSON.parse(uni.getStorageSync('userInfo') || '{}');
-					console.log("userInfo内容",this.userInfo)
+						title: '加载中...'
+					})
+					this.userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
+					console.log("userInfo内容", this.userInfo)
 					const res = await speakerList({
 						companyId: this.userInfo.companyId,
 						page: 1,
 						pageSize: 20,
-						doctorName:this.searchName,
-						status:this.currentTab
+						doctorName: this.searchName,
+						status: this.currentTab
 					})
 					uni.hideLoading()
 					if (res.code === 200 && res.rows) {
@@ -338,15 +358,22 @@
 				// 加载更多数据
 			},
 			// 定级申请
-			 applyLevel(item) {
-				console.log('定级申请',item)
-			uni.navigateTo({
-							url: `/pages_speaker/gradeApplication?id=${item.id}&auditInstanceId=${item.auditInstanceId || item.id}&doctorId=${item.doctorId}`
-						})
+			applyLevel(item) {
+				console.log('定级申请', item)
+				uni.navigateTo({
+					url: `/pages_speaker/gradeApplication?id=${item.id}&auditInstanceId=${item.auditInstanceId || item.id}&doctorId=${item.doctorId}`
+				})
 			},
 			getDefaultData() {
-				return [
-				]
+				return []
+			},
+			// 选择成员选项
+			selectMember(value, label) {
+				this.selectedMember = value
+				this.selectedMemberOption = label
+				this.showMemberPopup = false
+				// 这里可以添加根据选择的成员选项过滤数据的逻辑
+				this.loadData()
 			}
 		}
 	}
@@ -366,6 +393,8 @@
 		flex-direction: column;
 
 		.top-box {
+			position: relative;
+			z-index: 99;
 			padding: 16rpx 32rpx;
 			display: flex;
 			align-items: center;
@@ -442,65 +471,71 @@
 		}
 	}
 
-	.filter-bar {
-		display: flex;
-		align-items: center;
-		background: #fff;
-		padding: 0 40rpx;
+	.tab {
+		position: relative;
+			z-index: 99;
 
-		.filter-tabs {
-			flex: 1;
+		.filter-bar {
 			display: flex;
 			align-items: center;
-			gap: 64rpx;
-			overflow-x: auto;
+			background: #fff;
+			padding: 0 40rpx;
 
-			.tab-item {
-				padding: 24rpx 0;
-				font-size: 28rpx;
-				color: #999999;
-				white-space: nowrap;
-				position: relative;
+			.filter-tabs {
+				flex: 1;
+				display: flex;
+				align-items: center;
+				gap: 64rpx;
+				overflow-x: auto;
 
-				&.active {
-					color: #333333;
-					font-weight: 500;
+				.tab-item {
+					padding: 24rpx 0;
+					font-size: 28rpx;
+					color: #999999;
+					white-space: nowrap;
+					position: relative;
 
-					&::after {
-						content: '';
-						position: absolute;
-						bottom: 0;
-						left: 0;
-						right: 0;
-						height: 6rpx;
-						background: #388BFF;
-						border-radius: 3rpx 3rpx 3rpx 3rpx;
+					&.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-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-btn {
+				display: flex;
+				align-items: center;
+				padding: 24rpx 0;
+				font-size: 28rpx;
+				color: #666666;
 
-			.filter-icon {
-				font-size: 32rpx;
-				color: #333;
+				.filter-icon {
+					font-size: 32rpx;
+					color: #333;
+				}
 			}
 		}
 	}
 
+
 	.content {
 		flex: 1;
 		padding: 24rpx;
@@ -565,14 +600,14 @@
 				}
 
 				&.rejected {
-								background: #FFF4F5;
-								color: #CF3546;
-							}
-							
-							&.manual {
-								background: #E3F2FD;
-								color: #2196F3;
-							}
+					background: #FFF4F5;
+					color: #CF3546;
+				}
+
+				&.manual {
+					background: #E3F2FD;
+					color: #2196F3;
+				}
 			}
 		}
 
@@ -846,4 +881,57 @@
 			}
 		}
 	}
+
+	/* 成员筛选弹窗样式 */
+	.member-popup-overlay {
+		position: fixed;
+		top: 240rpx;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background: rgba(0, 0, 0, 0.5);
+		z-index: 8;
+	}
+
+	.member-popup {
+		position: fixed;
+		top: 160rpx;
+		left: 0;
+		right: 0;
+		background: #fff;
+		border-radius: 0;
+		padding: 32rpx;
+		width: 100%;
+		box-sizing: border-box;
+		box-shadow: none;
+		z-index: 9;
+	}
+
+	.member-options {
+		display: flex;
+		flex-wrap: wrap;
+		gap: 24rpx;
+		border-radius: 70rpx 70rpx 70rpx 70rpx;
+		justify-content: flex-start;
+	}
+
+	.member-option {
+		padding: 24rpx 14rpx;
+		border-radius: 70rpx;
+		font-size: 28rpx;
+		color: #666666;
+		background: #ffffff;
+		border: 1rpx solid #e8e8e8;
+		transition: all 0.2s ease;
+		text-align: center;
+		min-width: 214rpx;
+		box-sizing: border-box;
+
+		&.active {
+			background: rgba(56,139,255,0.15);
+			color: #ffffff;
+			color: #388BFF;
+			border: 1rpx solid #388BFF ;
+		}
+	}
 </style>

+ 50 - 6
pages_task/createTask.vue

@@ -192,7 +192,7 @@
 		queryAllProduct,//获取公司所有产品
 		queryAllData//获取任务类型
 	} from '@/api/task.js';
-
+import utils from '@/utils/common.js'
 	import Step from '@/pages_task/components/step.vue'
 	import EvanSwitch from '@/components/evan-switch.vue'
 	export default {
@@ -202,6 +202,7 @@
 		},
 		data() {
 			return {
+				taskTypeDict:[],//任务类型字典
 				taskType:[],//任务类型
 				companyList:[],//归属项目
 				productList:[],//产品列表
@@ -288,7 +289,16 @@
 				companyId:''
 			}
 		},
-		onLoad(options) {
+
+		onLoad: async function(options) {
+			try {
+				this.taskTypeDict = await utils.getDicts("task_type");//任务类型
+				
+			} catch (e) {
+				console.log('获取字典数据失败:', e)
+			}
+
+
 				this.userInfo=JSON.parse(uni.getStorageSync("userInfo"))||''
 			if (options.rejectionInfo) {
 				this.rejectionInfo = decodeURIComponent(options.rejectionInfo)
@@ -301,8 +311,22 @@
 			console.log(this.userInfo);
 			// 加载信息
 			this.companyId = this.userInfo.companyId || 1
-
 		},
+		// onLoad(options) {
+		// 		this.userInfo=JSON.parse(uni.getStorageSync("userInfo"))||''
+		// 	if (options.rejectionInfo) {
+		// 		this.rejectionInfo = decodeURIComponent(options.rejectionInfo)
+		// 	}
+		// 	// 初始化二级选项
+		// 	this.currentSecondaryOptions = this.primaryOptions[0]?.children || []
+		// 	// 获取用户信息
+		// 	const userInfoStr = uni.getStorageSync('userInfo')
+		// 	this.userInfo = userInfoStr ? JSON.parse(userInfoStr) : {}
+		// 	console.log(this.userInfo);
+		// 	// 加载信息
+		// 	this.companyId = this.userInfo.companyId || 1
+
+		// },
 		computed: {
 			filteredProjects() {
 				if (!this.searchKeyword.trim()) {
@@ -316,7 +340,7 @@
 		methods: {
 			//任务类型
 			queryAllData(){
-				if(!this.formData.productCodeValue){
+				if(!this.id){
 					uni.showToast({
 						title: '请先选择产品',
 						icon: 'none'
@@ -326,7 +350,7 @@
 				let data={
 					companyId:this.userInfo.companyId||'',
 					deptId:this.formData.deptId||'',
-					productCode:this.formData.productCodeValue||'',
+					productId:this.id||'',
 
 				}
 				queryAllData(data).then(res => {
@@ -334,6 +358,23 @@
 						// 处理任务类型
 						this.taskType = res.data || []
 						console.log('company接口返回数据:', res)
+						
+						// 处理taskTypeIds,获取对应的字典数据
+						if (res.data && res.data.length > 0) {
+							const firstData = res.data[0];
+							if (firstData.taskTypeIds) {
+								// 分割taskTypeIds为数组
+								const taskTypeIdsArray = firstData.taskTypeIds.split(',');
+								// 从字典表中筛选出对应的项
+								const filteredTaskTypes = this.taskTypeDict.filter(item => 
+									taskTypeIdsArray.includes(item.dictValue)
+								);
+								// 提取dictLabel并放到taskTypeColumns中
+								const taskTypeLabels = filteredTaskTypes.map(item => item.dictLabel);
+								this.taskTypeColumns = [taskTypeLabels];
+								console.log('处理后的taskTypeColumns:', this.taskTypeColumns);
+							}
+						}
 					}
 				}).catch(err => {
 					console.error('获取任务类型失败:', err);
@@ -482,7 +523,9 @@
 				}else if (title === '任务类型') {
 					// queryAllData()获取任务类型数据
 					await this.queryAllData();
-					data = this.taskType;
+					// 使用处理后的taskTypeColumns作为数据
+					data = this.taskTypeColumns;
+					console.log('任务类型数据:', data);
 				}
 
 				// 处理任务归属和费用分摊数据,将deptStr作为显示文本
@@ -546,6 +589,7 @@
 							this.formData.productCode = selectedItem.productName
 							// 保存productCode到表单
 							this.formData.productCodeValue = selectedItem.productCode
+							this.id=selectedItem.id
 						}
 					}
 				}