Explorar o código

修改页面位置

zyj hai 1 ano
pai
achega
e4b21970c0

+ 116 - 0
pages/ypczk/index/index.scss

@@ -0,0 +1,116 @@
+.view_container{
+	// overflow: auto;
+}
+
+.leaderIndex{
+	.leaderIndex_header{
+		background: linear-gradient(180deg, rgba(189, 162, 115, 1) 0%, rgba(255, 255, 255, 1) 100%);
+		height: 450rpx;
+		.info{
+			display: flex;
+			padding: 10rpx 10rpx 20rpx 10rpx;
+			.info_img{
+				width:100rpx;
+				height:100rpx;
+				border-radius:50%;
+				background-color:white;
+				.headImg{
+					margin-left: auto;
+					margin-right: auto;
+					width: 80rpx;
+					height: 80rpx;
+				}
+			}
+			.userName{
+				font-size: 20px;
+				font-weight: 500;
+				color: rgba(255, 255, 255, 1);
+				text-align: center;
+				padding-left: 20rpx;
+				padding-right: 40rpx;
+			}
+			.eyeIcon{
+				width: 60rpx;
+				height: 60rpx;
+			}
+		}
+		.slogan{
+			display:flex;
+			align-items: center;
+			justify-content: center;
+			.slogan_img{
+				width: 670rpx;
+				height: 290rpx;
+			}
+		}
+	}
+	.leaderIndex_title{
+		display: flex;
+		padding-left: 30rpx;
+		.title_left{
+			display:flex;
+			align-items: center;
+			justify-content: center;
+			.uni-badge--x{
+				padding-left: 5rpx;
+			}
+		}
+		.title_right{
+			padding-left: 400rpx;
+			right: 20rpx;
+			.right_text{
+				font-size: 17px;
+				font-weight: 400;
+				color: rgba(153, 153, 153, 1);
+				padding-right: 5rpx;
+			}
+		}
+	}
+	.leaderIndex_list{
+		.list_title{
+			display: flex;
+			.statusIcon{
+				height: 50rpx;
+				width: 50rpx;
+				margin-right: 20rpx;
+			}
+			.showIcon{
+				margin-left: 10rpx;
+				width: 45rpx;
+				height: 45rpx;
+			}
+		}
+		.list_content{
+			flex: 1;
+			margin-left: 68rpx;
+			.list_item{
+				display: inline-block;
+				width: 100%;
+				padding-top: 3rpx;
+				padding-bottom: 3rpx;
+				.list_item_text{
+					position: absolute;
+					right: 30rpx;
+				}
+			}
+		}
+		.list_button{
+			border-top: 0.5px solid rgba(221, 221, 221, 1);
+			.button_group{
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				.button_item{
+					flex: 1;
+					text-align: center;
+					color: rgba(190, 163, 117, 1);
+					font-size: 17px;
+					font-weight: 400;
+				}
+				.button_item:first-child{
+					border-right: 0.5px solid rgba(221, 221, 221, 1);
+				}
+			}
+		}
+	}
+}

+ 152 - 0
pages/ypczk/index/leaderIndex.vue

@@ -0,0 +1,152 @@
+<!-- 首页-组长 -->
+<template>
+	<view class="view_container leaderIndex">
+		<!-- 头部 -->
+		<view class="leaderIndex_header">
+			<view class="info">
+				<view class="info_img">
+					<image :src="pageData.headImg" class="headImg"></image>
+				</view>
+				<text class="userName">{{pageData.userName}}</text>
+				<image :src="eyeIcon.nowIcon" class="eyeIcon" @click="changeState('header')"></image>
+			</view>
+			<view class="slogan">
+				<image src="/static/slogan_header_img.png" class="slogan_img"></image>
+			</view>
+		</view>
+		<!-- 标题 -->
+		<view class="leaderIndex_title">
+			<view class="title_left">
+				<text>任务列表</text>
+				<!-- <uni-badge class="uni-badge-left-margin" :text="pageData.taskNum" /> -->
+			</view>
+			<view class="title_right" @click="toDetail">
+				<text class="right_text">查看全部</text>
+				<uni-icons type="right"></uni-icons>
+			</view>
+		</view>
+		<!-- 列表 -->
+		<view class="leaderIndex_list">
+			<uni-card v-for="(item,index) in pageData.taskList" padding="10rpx 0">
+				<view class="list_title">
+					<image :src="item.taskStatusIcon" class="statusIcon"></image>
+					<view>{{item.name}}</view>
+					<image :src="showIcon.nowIcon" class="showIcon" @click="changeState('list')"></image>
+				</view>
+				<view class="list_content">
+					<text class="list_item">任务编号<text class="list_item_text">{{item.taskNumber}}</text></text>
+					<text class="list_item">组长<text class="list_item_text">{{item.zzName}}</text></text>
+					<text class="list_item">待质控代煎企业<text class="list_item_text">{{item.bzkOrgName}}</text></text>
+					<text class="list_item">地址<text class="list_item_text">{{item.address}}</text></text>
+					<text class="list_item">完成日期<text class="list_item_text">{{item.finishTime}}</text></text>
+				</view>
+				<view class="list_button">
+					<view class="button_group">
+						<view class="button_item" @click="signTask">签收</view>
+						<view class="button_item" @click="starTask">开始质控</view>
+					</view>
+				</view>
+			</uni-card>
+		</view>
+	</view>
+</template>
+
+<script setup>
+import http from '@/utils/request';
+import { reactive } from "vue";
+import {onLoad,onShow,onUnload,onPullDownRefresh} from "@dcloudio/uni-app";
+
+const pageData=reactive({
+	headImg:'/static/logo.png',
+	userName:'王军',
+	taskNum:2,
+	taskList:[]
+})
+
+const eyeIcon=reactive({
+	nowIcon:'',
+	showIcon:'/static/whiteDisplay.png',
+	hideIcon:'/static/whiteHide.png'
+})
+
+const showIcon=reactive({
+	nowIcon:'',
+	showIcon:'/static/blackDisplay.png',
+	hideIcon:'/static/blackHide.png'
+})
+
+const statusIcon=reactive({
+	daiIcon:'/static/dai_icon.png',
+	wanIcon:'/static/wan_icon.png',
+	zhiIcon:'/static/zhi_icon.png'
+})
+
+// 切换显示与隐藏
+const changeState=(type)=>{
+	if(type=='header'){
+		console.log("头部切换")
+		if(eyeIcon.nowIcon==eyeIcon.hideIcon){
+			eyeIcon.nowIcon=eyeIcon.showIcon
+		}else{
+			eyeIcon.nowIcon=eyeIcon.hideIcon
+		}
+	}else if(type=='list'){
+		console.log("列表切换")
+		if(showIcon.nowIcon==showIcon.hideIcon){
+			showIcon.nowIcon=showIcon.showIcon
+		}else{
+			showIcon.nowIcon=showIcon.hideIcon
+		}
+	}
+}
+
+// 跳转到任务详情
+const toDetail=()=>{
+	console.log("跳转到任务详情")
+}
+
+// 签收
+const starTask=()=>{
+	console.log("签收")
+}
+
+// 开始质控
+const signTask=()=>{
+	console.log("开始质控")
+}
+
+onPullDownRefresh(()=>{
+	console.log("下拉刷新")
+	setTimeout(uni.stopPullDownRefresh(),2000)
+	
+})
+
+const getTaskData=()=>{
+	http.get("app-api/findList").then(res=>{
+		console.log(res)
+		pageData.taskList=res
+		pageData.taskList.forEach(item=>{
+			item.finishTime=item.wcrq1.slice(2) +' ~ '+item.wcrq2.slice(0,-2)
+			if(item.status=='7003'){
+				item.taskStatusIcon=statusIcon.daiIcon
+			}else if(item.status=='7004'){
+				item.taskStatusIcon=statusIcon.wanIcon
+			}else{
+				item.taskStatusIcon=statusIcon.zhiIcon
+			}
+		})
+		console.log(pageData.taskList)
+	})
+}
+
+onShow(()=>{
+	eyeIcon.nowIcon=eyeIcon.hideIcon
+	showIcon.nowIcon=showIcon.hideIcon
+	getTaskData()
+})
+</script>
+
+
+<style lang="scss" scoped>
+@import 'index.scss'
+</style>

+ 16 - 0
pages/ypczk/zkTask/index.scss

@@ -0,0 +1,16 @@
+.qualitycontrolTask{
+	.flightTask{
+		.flightTask_list{
+			border-top: 0.5px solid rgba(221, 221, 221, 1);
+			padding-top: 5rpx;
+			.flightTask_list_item{
+				display: inline-block;
+				width: 100%;
+				.flightTask_list_item_text{
+					position: absolute;
+					right: 38rpx;
+				}
+			}
+		}
+	}
+}

+ 65 - 0
pages/ypczk/zkTask/zkTask.vue

@@ -0,0 +1,65 @@
+<template>
+	<view class="qualitycontrolTask">
+		<!-- 飞行质控任务 -->
+		<view class="flightTask">
+			<uni-card>
+				<uni-section :title="pageData.todayDate+'飞行质控任务'" type="line">
+					<template v-slot:right>
+						<image style="width: 50rpx; height: 50rpx;" :src="showIcon.nowIcon" @click="changeState()"></image>
+					</template>
+				</uni-section>
+				<view class="flightTask_list">
+					<text class="flightTask_list_item">被质控代煎企业<text class="flightTask_list_item_text">{{pageData.flightTask.orgName}}</text></text>
+					<text class="flightTask_list_item">组长<text class="flightTask_list_item_text">{{pageData.flightTask.orgName}}</text></text>
+					<text class="flightTask_list_item">组员<text class="flightTask_list_item_text">{{pageData.flightTask.orgName}}</text></text>
+					<text class="flightTask_list_item">地址<text class="flightTask_list_item_text">{{pageData.flightTask.orgName}}</text></text>
+				</view>
+			</uni-card>
+		</view>
+		<!-- 代配作业质控 -->
+		<view>
+			
+		</view>
+		<!-- 代煎作业质控 -->
+		<view></view>
+		<!-- 代煎企业作业环境质控 -->
+		<view></view>
+	</view>
+</template>
+
+<script setup>
+import { reactive } from "vue";
+import {onLoad,onShow,onUnload,onPullDownRefresh} from "@dcloudio/uni-app";
+
+const pageData=reactive({
+	todayDate:'20230405',
+	flightTask:{
+		orgName:'机构',
+	},
+	deliveryTask:[],
+	friedTask:[],
+	environmentTask:[]
+})
+
+const showIcon=reactive({
+	nowIcon:'',
+	showIcon:'/static/blackDisplay.png',
+	hideIcon:'/static/blackHide.png'
+})
+
+const changeState=()=>{
+	if(showIcon.nowIcon==showIcon.showIcon){
+		showIcon.nowIcon=showIcon.hideIcon
+	}else{
+		showIcon.nowIcon=showIcon.showIcon
+	}
+}
+
+onShow(()=>{
+	showIcon.nowIcon=showIcon.hideIcon
+})
+</script>
+
+<style lang="scss" scoped>
+@import './index.scss'
+</style>