Переглянути джерело

街道界面控制版块显示

“yueshang” 1 рік тому
батько
коміт
bc596a56db
3 змінених файлів з 1368 додано та 1363 видалено
  1. 788 785
      pages/index.vue
  2. 238 236
      pages/mine/index.vue
  3. 342 342
      utils/common.js

+ 788 - 785
pages/index.vue

@@ -1,786 +1,789 @@
-<template>
-	<view style="height: 100%;">
-		<!-- <u-navbar :bgImg="bgImg" title="首页" :titleStyle="{ color:'#fff', letterSpacing:'0.3em',fontSize:'18px'}"  :safeAreaInsetTop="true" ></u-navbar> -->
-		<!-- <navInfo :title="'首页'" :titleStyle="{ color:'#fff', letterSpacing:'0.3em',fontSize:'18px'}"></navInfo>
-		 <view class="bgTopImg">
-			<image slot="right" :src="`${urls}/navBg@2x.png`" class="bgTopImg"></image>
-		</view> -->
-		<view class="container  uni-container"
-			style="display:flex;flex-direction: column;justify-content: space-between;height: 100%;">
-			<view class="nav">
-				<!-- 	<u-scroll-list indicatorColor="#fff0f0" indicatorActiveColor="#f56c6c" >
-				<view class="scroll-list" style="flex-direction: row;">
-					<view class="scroll-list__goods-item" v-for="(item, index) in goodsArr" :key="index"
-						:class="[(index === 4) && 'scroll-list__goods-item--no-margin-right']">
-						<image class="scroll-list__goods-item__image  " :src=" item.thumbnail" mode="">
-						</image> 
-						<text class="scroll-list__goods-item__text">{{ item.name }}</text>
-					</view>
-				</view>
-			</u-scroll-list> -->
-				<view>
-					<u-grid :border="false" col="4" v-if="!isStreetPerson">
-						<u-grid-item v-for="(item, listIndex) in goodsArr" :key="listIndex">
-							<image @click="handleToInfo(item.menuUrl)" class="scroll-list__goods-item__image  "
-								:src="item.thumbnail" mode=""></image>
-							<text class="grid-text">{{ item.name }}</text>
-						</u-grid-item>
-					</u-grid>
-					<u-grid :border="false" col="3" v-else>
-						<u-grid-item v-for="(item, listIndex) in goodsStreet" :key="listIndex">
-							<image @click="handleToInfo(item.menuUrl)" class="scroll-list__goods-item__image  "
-								:src="item.thumbnail" mode=""></image>
-							<text class="grid-text">{{ item.name }}</text>
-						</u-grid-item>
-					</u-grid>
-					<u-toast ref="uToast" />
-				</view>
-			</view>
-			<!-- 		<view style="margin-bottom: 20rpx;">
-			<u-button :plain="true" text="全部已读" @click="cleanUnread" style="width: 23%;float: right;"></u-button>
-		</view> -->
-			<!-- 		<view class="grid-body" v-for="(item, index) in tableDatas" :key="index">
-			<uni-card class="cards">
-				<u-cell-group :border="false">
-					<u-cell :border="false" :title="item.name" :icon="item.icon" :boritemder="false" isLink
-						titleStyle="font-weight:600" rightIconStyle="color:#4CB2B6;font-size: 24rpx;"
-						> 
-						<text slot="value" v-if="tableData.length!=0" @click="cleanUnread" class="weidu">全部已读</text>
-						<text slot="value" style="font-size: 24rpx;color: #4CB2B6;" @click="goInformDetails(item.comType)">更多</text>
-					</u-cell>
-				</u-cell-group>
-				<view v-if="tableData[index]!=''"> 
-					<view v-for="(item1, index1) in tableData" :key="index1"
-						@click.nativite="onNoticeClick(item1)" link
-						>
-						<uni-row class="demo-uni-row padding-top text-sm" :gutter="20"
-							style="margin:0rpx 30rpx 0rpx -24rpx;width: 100%;">
-							<uni-col :span="16">
- 								<u-notice-bar :text="item1.comTitle?item1.comTitle:''" speed="40"></u-notice-bar> 
-								<text class="uni-body text-1cut" v-if="item1.length==0">暂无{{item}}</text>
-							</uni-col>
-							<uni-col :span="8">
- 							</uni-col>
-						</uni-row>
-					</view> 
-				</view>
-				<view v-else class="no-notice"> 暂无{{item.name}}
-				</view>
-			</uni-card>
-		</view>	 -->
-			<!-- 		<view class="grid-body" >
-			<uni-card class="cards" > -->
-			<!-- <u-cell-group :border="false">
-					<u-cell :border="false" title="通知公告" icon="@/static/images/checkActive/tongzhi@2x.png" :boritemder="false" isLink
-						titleStyle="font-weight:600" rightIconStyle="color:#4CB2B6;font-size: 24rpx;">
-						<text slot="value" v-if="tableData.length!=0" @click="cleanUnread" class="weidu">全部已读</text>
-						<text slot="value" style="font-size: 24rpx;color: #4CB2B6;" @click="goInformDetails(item.comType)">更多</text>
-					</u-cell>
-				</u-cell-group> -->
-			<!-- 				<view v-if="tableData.length>0">
-					<view v-for="(item1, index1) in tableData" :key="index1"
-						@click.nativite="onNoticeClick(item1)" link>
-						<uni-row class="demo-uni-row padding-top text-sm" :gutter="20"
-							style="margin:0rpx 30rpx 0rpx -24rpx;width: 100%;">
-							<uni-col :span="16">
- 								<u-notice-bar :text="item1.title?item1.title:''" speed="40"></u-notice-bar> 
-							</uni-col>
-							<uni-col :span="8"> 
-							</uni-col>
-						</uni-row>
-					</view> 
-				</view>
-				<view v-else class="no-notice"> 暂无数据
-				</view>
-			</uni-card>
-		</view> -->
-			<view v-if="tableData">
-				<view class="back-image">
-					<image :src="laba" class="back-notice"></image>
-					<view style="display: flex;padding-top: 40rpx;">
-						<image :src="tongzhi" class="back-size"></image>
-						<view v-if="arrtongzhi.length !=0" @click.nativite="onNoticeClick(arrtongzhi[0])">
-							{{ arrtongzhi[0].title }}
-						</view>
-						<view v-else>暂无通知</view>
-					</view>
-				</view>
-				<!-- <view class="back-image back-image2">
-					<image :src="laba" class="back-notice"></image>
-					<view style="display: flex;padding-top: 40rpx;">
-						<image :src="gonggao" class="back-size"></image>
-						<view v-if="arrgonggao.length != []" @click.nativite="onNoticeClick(arrgonggao[0])">
-							{{ arrgonggao[0].title }}
-						</view>
-						<view v-else>暂无公告</view>
-					</view>
-				</view> -->
-			</view>
-			<view class="">
-				<u-cell-group :border="false">
-					<u-cell :border="false" :boritemder="false" isLink rightIconStyle="color:#4CB2B6;font-size: 24rpx;">
-						<view slot="title" class="u-slot-title">
-							<text class="u-cell-text">待办任务</text>
-						</view>
-						<text slot="value" style="font-size: 28rpx;color: #4CB2B6;" @click="goInformDetails">更多</text>
-					</u-cell>
-				</u-cell-group>
-				<uni-card v-if="tableDatas.length>0">
-					<uni-row class="demo-uni-row" :gutter="20" width="100%">
-						<uni-col :span="24"
-							style="margin-bottom: 10rpx;display: flex;justify-content:space-between;"><text
-								style="font-weight:600;font-size: 34rpx;">{{ tableDatas[0].taskName }}</text>
-							<image :src="zhuanfa" class="back-size back-sizes" @click="forward(tableDatas[0])"></image>
-						</uni-col>
-						<uni-col :span="24" style="margin-bottom: 10rpx;display: flex;"><text
-								style="color:#728F90">任务说明:</text><rich-text
-								:nodes="tableDatas[0].taskContent?tableDatas[0].taskContent:''"
-								class="conts"></rich-text>
-						</uni-col>
-						<uni-col :span="24"><text
-								style="color:#728F90">任务发布者:</text><text>{{tableDatas[0].senderName}}</text>
-						</uni-col>
-					</uni-row>
-					<uni-row class="demo-uni-row" :gutter="20" width="100%">
-						<!-- 						<uni-col :span="24"> -->
-						<view class="flex btn-box" style="width: 50%;float: right;">
-							<u-button shape="circle" size="small" color="#F7C41E" text="查看详情"
-								@click="addClickDetail(tableDatas[0].broadId)" style="margin-right: 10rpx;"></u-button>
-							<u-button shape="circle" size="small" color="#4CB2B6" style="margin-left: 10rpx;" text="去完成"
-								@click="addClickModify(tableDatas[0])"></u-button>
-
-						</view>
-						<!-- </uni-col> -->
-					</uni-row>
-				</uni-card>
-				<uni-card v-else style="text-align:center">
-					今日暂无任务,可前往查看是否有往日任务
-				</uni-card>
-			</view>
-			<!-- 图表-->
-			<view class="charts-box">
-				<!-- 注意:这里的opts是uCharts的配置,eopts是ECharts的配置,不要搞混,如果不需要用在各种小程序端,是不需要传uCharts的opts的,只需要传eopts即可!!!这里加opts是为了覆盖uCharts的rose图的默认图例配置的位置 -->
-				<!-- 	<qiun-data-charts type="column" :eopts="opts" :opts="opts" :chartData="chartsDataLine3"  v-if="chartsDataLine3.series[0].itemStyle.normal.color=='#D2D8E2'"
-					:echartsH5="true" :echartsApp="true" /> -->
-			</view>
-
-		</view>
-		<!-- 单位进来转发任务显示人员 -->
-		<u-popup :show="checkboxShow2" :round="10" @close="checkboxShow2=false" style="position: relative;"
-			mode="center">
-			<view style="width: 90vw;padding: 10px;">
-				<text class="text-xl">检查人员</text>
-				<view class="" class="person-forward" v-if="personInfo">
-					<u-checkbox-group v-model="item.checkboxValue1" v-for="(item, index) in personInfo" :key="index"
-						placement="column" @change="checkboxChange2(item.user_id,$event)">
-						<u-checkbox :customStyle="{marginBottom: '8px'}" :label="item.nickname" :name="item.id">
-						</u-checkbox>
-					</u-checkbox-group>
-
-				</view>
-				<view v-else>
-					此单位下暂无可转发人员
-				</view>
-				<view class="flex flex-direction-row " style="margin: 30rpx 0;">
-					<u-button shape="circle" type="primary" color="#4CB2B6" text="确定" @click="checkboxConfirm2"
-						customStyle="margin-right:20px;padding:0 30px">
-					</u-button>
-					<u-button type="primary" plain color="#4CB2B6" text="取消" shape="circle" @click="checkboxCancel2"
-						customStyle="padding:0 30px">
-					</u-button>
-				</view>
-			</view>
-		</u-popup>
-		<!-- 加载中 -->
-		<isLodingModel></isLodingModel>
-
-		<u-modal :show="show" @confirm="confirm" @cancel="cancel" @close="close" asyncClose closeOnClickOverlay
-			showCancelButton confirmColor="red" :title="title" :content="content" ref="uModal"></u-modal>
-	</view>
-</template>
-<script>
-	import {
-		getNoticeList,
-		getNoticeAllRead,
-		getNoticeOlnyRead,
-		isNeedInfo
-	} from '@/api/notice'; // 通知公告列表
-	import {
-		checkGetPerson, //单位转发任务获取人员
-		taskList, //获取除草稿箱以外的列表  //获取当前日期的任务列表
-		checkSubmitForwardTask, //确认转发任务
-	} from "@/api/check_active";
-	import storage from '@/utils/storage';
-	let that = null;
-	import config from '@/config'
-	const baseUrlImg = config.baseUrlImg
-	export default {
-		data() {
-			return {
-				urls: baseUrlImg,
-				bgImg: `${baseUrlImg}/navBg@2x.png`,
-				opts: {
-					legend: {
-						show: false
-					},
-					color: ["#D2D8E2"],
-					yAxis: {
-						data: [{
-							min: 0,
-							axisLine: false,
-						}],
-						axisLine: false,
-					},
-					disabled: false,
-					xAxis: {
-						axisLine: {
-							show: false
-						},
-					},
-					tooltip: {
-						trigger: 'axis',
-						axisPointer: {
-							type: 'none'
-
-						}
-					},
-					extra: {
-						column: {
-							type: 'group',
-							barBorderRadius: [6, 6, 6, 6],
-							// activeBgColor: "#4CB2B6",
-							// activeBgOpacity:1
-						},
-						tooltip: {
-							horizentalLine: false,
-							splitLine: false
-						}
-					}
-				},
-
-				chartsDataLine3: {},
-				tongzhi: `${baseUrlImg}/tongzhi.png`,
-				gonggao: `${baseUrlImg}/gonggao.png`,
-				laba: `${baseUrlImg}/laba.png`,
-				//import biankuang from '@/static/images/biankuang.png'
-				LoadingModel: false,
-				show: false, //弹出框
-				title: '完善个人信息',
-				content: '个人信息尚未完善,是否完善个人基本信息?',
-				arrtongzhi: [],
-				arrgonggao: [],
-				personInfo: [],
-				checkedList2: [], //检查单位已选择列表
-				// 数据  //数据接口,已读接口(id,全部)---通知列表,详情
-				// tableDatas: [{
-				// 		name: '通知',
-				// 		icon: tongzhi,
-				// 		comType: '1'
-				// 	}
-				// , {
-				// 	name: '公告',
-				// 	icon: gonggao,
-				// 	comType: "2"
-				// }, {
-				// 	name: '指令',
-				// 	icon: zhiling,
-				// 	comType: "3"
-				// },
-				// ],
-				tableDatas: [], //任务数据
-				formData: {
-					pageNo: 1,
-					pageSize: 10,
-					receivDate: '',
-					receiver: this.$store.state.user.id,
-					taskType: "3"
-				},
-				FormDataTask: {
-					"broadId": 0,
-					"deptId": [],
-					"id": 0,
-					"orgId": [],
-					"sender": this.$store.state.user.id,
-					"receiver": [],
-					"status": 0,
-					"taskContent": "",
-					"taskName": "",
-					"taskStatus": 0,
-					"taskType": "" //任务类型 1对应主动检查
-				},
-				zhuanfa: `${baseUrlImg}/zhuanfa.png`,
-				// 通知公告数据
-				tableData: [],
-				// tableData数据加载中
-				loading: false,
-				// echarts数据
-				checkactiveOption: {},
-				goodsArr: [{
-						name: '每日巡查',
-						thumbnail: `${baseUrlImg}/meirixuncha.png`,
-						menuUrl: '/pagesA/fire/inspection_active/index'
-					},
-					{
-						name: '任务派遣',
-						thumbnail: `${baseUrlImg}/zhudongjiancha.png`,
-						menuUrl: `/pagesA/fire/check_active/index?type=2`
-					},
-					{
-						name: '主动检查',
-						thumbnail: `${baseUrlImg}/renwuguanli.png`,
-						menuUrl: `/pagesA/fire/check_inspection/check_inspection`
-					},
-					{
-						name: '隐患管理',
-						thumbnail: `${baseUrlImg}/yinhuanguanli.png`,
-						menuUrl: '/pagesA/fire/hidden_trouble/index'
-					}
-				],
-				goodsStreet: [{
-						name: '街道消防检查',
-						thumbnail: `${baseUrlImg}/fire_street.png`,
-						menuUrl: '/pagesA/fire/fire_inspetItem/fire_inspetItem'
-					},
-					{
-						name: '消防工作档案',
-						thumbnail: `${baseUrlImg}/zhudongjiancha.png`,
-						menuUrl: `/pagesA/fire/archive/nav`
-					},
-					{
-						name: '微型消防站',
-						thumbnail: `${baseUrlImg}/renwuguanli.png`,
-						menuUrl: `/pagesA/fire/fire/fire_station/index`
-					},
-				],
-				checkboxShow2: false,
-				isStreetPerson: false
-			};
-		},
-		// 在 vue页面,向起始页通过事件传递数据
-		onShow: function() {
-			this.getServerData();
-			const date = new Date()
-			this.formData.receivDate = uni.$u.timeFormat(date, 'yyyy-mm-dd')
-			this.getDatas()
-			this.getData()
-			const deptId = uni.getStorageSync('getUserInfo_key').streetInfo ? uni.getStorageSync('getUserInfo_key')
-				.streetInfo
-				.id : ''; //登录用户
-			if (deptId != '') {
-					this.isStreetPerson = true
-					this.$forceUpdate()
-				}else{
-					this.isStreetPerson = false
-				}
-		},
-		onLoad: function(option) {
-
-				that = this;
-			// // 判断用户信息是否需要完善
-			// const value = uni.getStorageSync('getUserInfo_key');
-			// if (
-			// 	value.userRoles.appRoles.length > 0 &&
-			// 	value.userRoles.appRoles[0].role_id != '' &&
-			// 	value.userRoles.appRoles[0].user_id != ''
-			// ) {
-			// 	const appRoleId = value.userRoles.appRoles[0].role_id;
-			// 	const userId = value.userRoles.appRoles[0].user_id;
-			// 	isNeedInfo({
-			// 		appRoleId: appRoleId,
-			// 		userId: userId
-			// 	}).then(response => {
-			// 		if (response.code != 0) {
-			// 			that.show = true;
-			// 		}
-			// 	});
-			// } else {
-			// 	that.show = true;
-			// }
-		},
-		onReady() {},
-		methods: {
-			//图表
-			getServerData() {
-				//区域图
-				this.chartsDataLine3 = {
-					categories: ['提交', '待完成', '审核', '打回', '完成'],
-					series: [{
-						name: "",
-						barWidth: 26,
-						data: [30, 80, 100, 49, 112],
-						itemStyle: {
-							normal: {
-								//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
-								barBorderRadius: [6, 6, 4, 4],
-								color: '#D2D8E2'
-							},
-							emphasis: {
-								color: '#68BCBF' //点击后高亮颜色
-							}
-						}
-					}]
-				}
-
-
-			},
-			// 获取数据
-			getData() {
-				this.$modal.isLoadingModel(true);
-				this.LoadingModel = true;
-				getNoticeList({
-
-				}).then(response => {
-					this.LoadingModel = false;
-					this.$modal.isLoadingModel(this.LoadingModel);
-					// 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
-					// this.tableData = response.data ?? [...this.tableData, ...response.data.list];
-					if (this.tableData && response.data?.list.length > 0) {
-						this.arrtongzhi = response.data.list.filter(i => i.type == 1);
-						this.arrgonggao =response.data.list.filter(i => i.type == 2);
-					}
-					
-					// this.checkactiveGetEchart();
-				});
-			},
-			goInformDetails(val) {
-				//点击更多,查看所有的通知列表
-				// uni.navigateTo({
-				// 	url: '/pagesA/fire/notice/index?id=' + val
-				// });
-				//查看所有的每日任务列表
-				uni.navigateTo({
-					url: '/pagesA/fire/inspection_active/index'
-				});
-
-			},
-			//清楚所有未读
-			cleanUnread() {
-				getNoticeAllRead({
-					userId: this.$store.state.user.id
-				}).then(response => {
-					if (response.data == true) {
-						this.getData();
-					}
-				});
-			},
-			// 单个公告详情点击事件
-			onNoticeClick(val) {
-				getNoticeOlnyRead({
-					id: val.id
-				}).then(response => {
-					if (response.data == true) {
-						this.getData();
-					}
-				});
-				uni.navigateTo({
-					url: `/pagesA/fire/notice/notcice_details/notcice_details?id=${val.id}`,
-					success: function(res) {
-						// 通过eventChannel向被打开页面传送数据
-						res.eventChannel.emit('acceptDataFromOpenerPage', val);
-					}
-				});
-			},
-			// 根据不同的url,进行页面的跳转
-			handleToInfo(url) {
-				this.$tab.navigateTo(url);
-			},
-			// 模态框确认,取消操作
-			confirm() {
-				this.show = false;
-				uni.navigateTo({
-					url: '/pages/mine/info/edit'
-				});
-			},
-			close() {
-				this.show = false;
-			},
-			cancel() {
-				this.show = false;
-			},
-			// ================================================================
-			//查看详情
-			addClickDetail(val) {
-				uni.navigateTo({
-					url: `/pagesA/fire/check_active/check_list/check_list?id=${val}&current=${this.current}`,
-					success: function(res) {
-						res.eventChannel.emit('acceptDataFromOpenerPage', val);
-					}
-				})
-			},
-			//去完成
-			addClickModify(val) {
-				uni.navigateTo({
-					url: `/pagesA/fire/check_active/check_implement/check_implement?broadId=${val.broadId}`,
-					success: function(res) {
-						res.eventChannel.emit('acceptDataFromOpenerPage', val);
-					}
-				})
-			},
-			//转发
-			forward(val) { //展示转发的弹出层
-				this.ids = val.id //当前点击任务的id
-				this.checkboxShow2 = true
-				this.FormDataTask.broadId = val.broadId
-				this.FormDataTask.id = this.ids
-				this.FormDataTask.taskName = val.taskName
-				this.FormDataTask.taskStatus = val.taskStatus
-				this.FormDataTask.taskContent = val.taskContent
-				this.FormDataTask.orgId.push(val.orgId)
-				checkGetPerson({
-					orgId: val.orgId
-				}).then(response => {
-					this.personInfo = response.data
-				})
-			},
-			checkboxChange2(i, n) {
-				if (i && n.length != 0) {
-					this.checkedList2.push(i)
-				} else if (i && n.length == 0) {
-					this.checkedList2 = this.checkedList2.filter(item => item != i)
-				}
-			},
-			//popup检查单位确定============
-			checkboxConfirm2() {
-				checkSubmitForwardTask(JSON.stringify(this.FormDataTask)).then(response => {
-					if (response.data) {
-						this.$modal.msg('转发成功')
-						this.checkboxShow2 = false
-					} else {
-						this.$modal.msgError(response.msg)
-					}
-				})
-			},
-			//popup取消
-			checkboxCancel2() {
-				this.checkboxShow2 = false
-			},
-			getDatas() {
-				this.loading = true
-				this.pageNo = 1
-				taskList(JSON.stringify(this.formData)).then(response => {
-					this.tableDatas = response.data.list
-				})
-			},
-			// =====================================================
-
-
-		}
-	};
-</script>
-<style lang="scss" scoped>
-	.album {
-		@include flex;
-		align-items: flex-start;
-
-		&__avatar {
-			background-color: $u-bg-color;
-			padding: 5px;
-			border-radius: 3px;
-		}
-
-		&__content {
-			margin-left: 10px;
-			flex: 1;
-		}
-	}
-
-	.container {
-		border-radius: 30px 30px 0px 0px;
-		background: #fff;
-		// top:200rpx;
-		z-index: 99;
-		position: relative;
-	}
-
-	body {
-		// background-image: linear-gradient(#4cb2b6, #f0f8f9) !important;
-	}
-
-	uni-page-body {
-		// background-image: linear-gradient(#4cb2b6, #f0f8f9) !important;
-		height: 100% !important;
-		// height: 100%;
-	}
-
-	.grid-body {
-		// height: 30%;
-		margin-bottom: 20rpx;
-	}
-
-	.cards {
-		height: 100%;
-	}
-
-	/deep/.uni-card--shadow {
-		border-radius: 24rpx;
-	}
-
-	/deep/.u-button.data-v-3bf2dba7,
-	.u-grid-item {
-		width: 30%;
-		float: right;
-	}
-
-	/deep/.uni-card--border {
-		border-radius: 24rpx !important;
-		box-shadow: 0px 1px 14px 0px rgba(211, 211, 211, 0.3) !important;
-		border: none !important;
-	}
-
-	::v-deep .u-navbar__content {
-		background-color: #4cb2b6 !important;
-	}
-
-	.container {
-		// height: 90vh !important;
-		// background-image: linear-gradient(#4cb2b6, #f0f8f9);
-	}
-
-	// 已读
-	.read {
-		color: #000;
-		padding-left: 40rpx;
-	}
-
-	.unread {
-		color: red;
-		padding-left: 40rpx;
-	}
-
-	.no-notice {
-		text-align: center;
-	}
-
-	.text {
-		text-align: center;
-		color: #000;
-		font-size: 26rpx;
-		margin-top: 10rpx;
-	}
-
-	.grid-item-box {
-		flex: 1;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		padding: 15px 0;
-	}
-
-	.scroll-list__goods-item__image {
-		width: 85rpx;
-		height: 92rpx;
-	}
-
-	.grid-text {
-		font-size: 11px;
-		color: #383838;
-		padding: 10rpx 0 20rpx 0rpx;
-		/* #ifndef APP-PLUS */
-		box-sizing: border-box;
-		/* #endif */
-	}
-
-	.nav {
-		// margin-bottom: 30rpx;
-
-		.u-grid-item[data-v-99a45d26],
-		.u-grid-item.data-v-99a45d26,
-		.u-grid-item {
-			margin-bottom: 30rpx;
-		}
-	}
-
-	/deep/.uni-col-16.data-v-fff79656,
-	/deep/.uni-col-16[data-v-fff79656] {
-		width: 100%;
-	}
-
-	/deep/.uni-col-16 {
-		width: 100%;
-	}
-
-	/deep/.uni-row {
-		margin: 0 30rpx 10rpx -6rpx !important;
-	}
-
-	/deep/.u-notice-bar {
-		background-color: rgb(235, 246, 247) !important;
-	}
-
-	/deep/.u-notice-bar[data-v-4eff50a7],
-	/deep/.u-notice-bar.data-v-4eff50a7,
-	/deep/.u-notice-bar {
-		border-radius: 20rpx;
-	}
-
-	.yidu {
-		font-size: 24rpx;
-		background-color: #f8f8f8;
-		padding: 10rpx 20rpx;
-		border-radius: 10rpx;
-		color: rgb(255, 178, 62);
-		margin-right: 20rpx;
-	}
-
-	.weidu {
-		font-size: 24rpx;
-		background-color: #f8f8f8;
-		padding: 10rpx 20rpx;
-		border-radius: 10rpx;
-		margin-right: 20rpx;
-		color: #a5a9ac;
-	}
-
-	.back-image {
-		margin-bottom: 20rpx;
-		height: 115rpx;
-		background: url('~@/static/images/biankuang.png') no-repeat;
-		background-size: 100% 115rpx;
-		position: relative;
-	}
-
-	.back-image2 {
-		margin-bottom: 0;
-	}
-
-	.back-size,
-	.back-sizes {
-		width: 60rpx;
-		height: 30rpx;
-		margin: 0 20rpx 0 60rpx;
-	}
-
-	.back-sizes {
-		width: 32rpx;
-		height: 32rpx;
-	}
-
-	.back-notice {
-		position: absolute;
-		top: 0;
-		left: 0;
-		width: 48rpx;
-		height: 52rpx;
-	}
-
-	.charts-box {
-		margin-top: 20rpx;
-		width: 100%;
-		height: 600rpx;
-	}
-
-	/deep/.u-navbar__content__left[data-v-75dad532],
-	/deep/.u-navbar__content__right[data-v-75dad532],
-	/deep/.u-navbar__content__right {
-		display: none !important;
-	}
-
-	.u-cell-text {
-		font-weight: 700;
-		font-size: 32rpx;
-		padding-left: 10rpx;
-		margin-left: -10rpx;
-		border-left: 6rpx solid #4CB2B6;
-	}
+<template>
+	<view style="height: 100%;">
+		<!-- <u-navbar :bgImg="bgImg" title="首页" :titleStyle="{ color:'#fff', letterSpacing:'0.3em',fontSize:'18px'}"  :safeAreaInsetTop="true" ></u-navbar> -->
+		<!-- <navInfo :title="'首页'" :titleStyle="{ color:'#fff', letterSpacing:'0.3em',fontSize:'18px'}"></navInfo>
+		 <view class="bgTopImg">
+			<image slot="right" :src="`${urls}/navBg@2x.png`" class="bgTopImg"></image>
+		</view> -->
+		<view class="container  uni-container"
+			style="display:flex;flex-direction: column;justify-content: space-between;height: 100%;">
+			<view class="nav">
+				<!-- 	<u-scroll-list indicatorColor="#fff0f0" indicatorActiveColor="#f56c6c" >
+				<view class="scroll-list" style="flex-direction: row;">
+					<view class="scroll-list__goods-item" v-for="(item, index) in goodsArr" :key="index"
+						:class="[(index === 4) && 'scroll-list__goods-item--no-margin-right']">
+						<image class="scroll-list__goods-item__image  " :src=" item.thumbnail" mode="">
+						</image> 
+						<text class="scroll-list__goods-item__text">{{ item.name }}</text>
+					</view>
+				</view>
+			</u-scroll-list> -->
+				<view>
+					<u-grid :border="false" col="4" v-if="!isStreet">
+						<u-grid-item v-for="(item, listIndex) in goodsArr" :key="listIndex">
+							<image @click="handleToInfo(item.menuUrl)" class="scroll-list__goods-item__image  "
+								:src="item.thumbnail" mode=""></image>
+							<text class="grid-text">{{ item.name }}</text>
+						</u-grid-item>
+					</u-grid>
+					<u-grid :border="false" col="3" v-else>
+						<u-grid-item v-for="(item, listIndex) in goodsStreet" :key="listIndex">
+							<image @click="handleToInfo(item.menuUrl)" class="scroll-list__goods-item__image  "
+								:src="item.thumbnail" mode=""></image>
+							<text class="grid-text">{{ item.name }}</text>
+						</u-grid-item>
+					</u-grid>
+					<u-toast ref="uToast" />
+				</view>
+			</view>
+			<!-- 		<view style="margin-bottom: 20rpx;">
+			<u-button :plain="true" text="全部已读" @click="cleanUnread" style="width: 23%;float: right;"></u-button>
+		</view> -->
+			<!-- 		<view class="grid-body" v-for="(item, index) in tableDatas" :key="index">
+			<uni-card class="cards">
+				<u-cell-group :border="false">
+					<u-cell :border="false" :title="item.name" :icon="item.icon" :boritemder="false" isLink
+						titleStyle="font-weight:600" rightIconStyle="color:#4CB2B6;font-size: 24rpx;"
+						> 
+						<text slot="value" v-if="tableData.length!=0" @click="cleanUnread" class="weidu">全部已读</text>
+						<text slot="value" style="font-size: 24rpx;color: #4CB2B6;" @click="goInformDetails(item.comType)">更多</text>
+					</u-cell>
+				</u-cell-group>
+				<view v-if="tableData[index]!=''"> 
+					<view v-for="(item1, index1) in tableData" :key="index1"
+						@click.nativite="onNoticeClick(item1)" link
+						>
+						<uni-row class="demo-uni-row padding-top text-sm" :gutter="20"
+							style="margin:0rpx 30rpx 0rpx -24rpx;width: 100%;">
+							<uni-col :span="16">
+ 								<u-notice-bar :text="item1.comTitle?item1.comTitle:''" speed="40"></u-notice-bar> 
+								<text class="uni-body text-1cut" v-if="item1.length==0">暂无{{item}}</text>
+							</uni-col>
+							<uni-col :span="8">
+ 							</uni-col>
+						</uni-row>
+					</view> 
+				</view>
+				<view v-else class="no-notice"> 暂无{{item.name}}
+				</view>
+			</uni-card>
+		</view>	 -->
+			<!-- 		<view class="grid-body" >
+			<uni-card class="cards" > -->
+			<!-- <u-cell-group :border="false">
+					<u-cell :border="false" title="通知公告" icon="@/static/images/checkActive/tongzhi@2x.png" :boritemder="false" isLink
+						titleStyle="font-weight:600" rightIconStyle="color:#4CB2B6;font-size: 24rpx;">
+						<text slot="value" v-if="tableData.length!=0" @click="cleanUnread" class="weidu">全部已读</text>
+						<text slot="value" style="font-size: 24rpx;color: #4CB2B6;" @click="goInformDetails(item.comType)">更多</text>
+					</u-cell>
+				</u-cell-group> -->
+			<!-- 				<view v-if="tableData.length>0">
+					<view v-for="(item1, index1) in tableData" :key="index1"
+						@click.nativite="onNoticeClick(item1)" link>
+						<uni-row class="demo-uni-row padding-top text-sm" :gutter="20"
+							style="margin:0rpx 30rpx 0rpx -24rpx;width: 100%;">
+							<uni-col :span="16">
+ 								<u-notice-bar :text="item1.title?item1.title:''" speed="40"></u-notice-bar> 
+							</uni-col>
+							<uni-col :span="8"> 
+							</uni-col>
+						</uni-row>
+					</view> 
+				</view>
+				<view v-else class="no-notice"> 暂无数据
+				</view>
+			</uni-card>
+		</view> -->
+			<view v-if="tableData">
+				<view class="back-image">
+					<image :src="laba" class="back-notice"></image>
+					<view style="display: flex;padding-top: 40rpx;cursor: pointer;">
+						<image :src="tongzhi" class="back-size"></image>
+						<view v-if="arrtongzhi.length !=0" @click.nativite="onNoticeClick(arrtongzhi[0])">
+							{{ arrtongzhi[0].title }}
+						</view>
+						<view v-else>暂无通知</view>
+					</view>
+				</view>
+				<!-- <view class="back-image back-image2">
+					<image :src="laba" class="back-notice"></image>
+					<view style="display: flex;padding-top: 40rpx;">
+						<image :src="gonggao" class="back-size"></image>
+						<view v-if="arrgonggao.length != []" @click.nativite="onNoticeClick(arrgonggao[0])">
+							{{ arrgonggao[0].title }}
+						</view>
+						<view v-else>暂无公告</view>
+					</view>
+				</view> -->
+			</view>
+			<view class=""  v-if="!isStreet">
+				<u-cell-group :border="false">
+					<u-cell :border="false" :boritemder="false" isLink rightIconStyle="color:#4CB2B6;font-size: 24rpx;">
+						<view slot="title" class="u-slot-title">
+							<text class="u-cell-text">待办任务</text>
+						</view>
+						<text slot="value" style="font-size: 28rpx;color: #4CB2B6;cursor: pointer;" @click="goInformDetails">更多</text>
+					</u-cell>
+				</u-cell-group>
+				<uni-card v-if="tableDatas.length>0">
+					<uni-row class="demo-uni-row" :gutter="20" width="100%">
+						<uni-col :span="24"
+							style="margin-bottom: 10rpx;display: flex;justify-content:space-between;"><text
+								style="font-weight:600;font-size: 34rpx;">{{ tableDatas[0].taskName }}</text>
+							<image :src="zhuanfa" class="back-size back-sizes" @click="forward(tableDatas[0])"></image>
+						</uni-col>
+						<uni-col :span="24" style="margin-bottom: 10rpx;display: flex;"><text
+								style="color:#728F90">任务说明:</text><rich-text
+								:nodes="tableDatas[0].taskContent?tableDatas[0].taskContent:''"
+								class="conts"></rich-text>
+						</uni-col>
+						<uni-col :span="24"><text
+								style="color:#728F90">任务发布者:</text><text>{{tableDatas[0].senderName}}</text>
+						</uni-col>
+					</uni-row>
+					<uni-row class="demo-uni-row" :gutter="20" width="100%">
+						<!-- 						<uni-col :span="24"> -->
+						<view class="flex btn-box" style="width: 50%;float: right;">
+							<u-button shape="circle" size="small" color="#F7C41E" text="查看详情"
+								@click="addClickDetail(tableDatas[0].broadId)" style="margin-right: 10rpx;"></u-button>
+							<u-button shape="circle" size="small" color="#4CB2B6" style="margin-left: 10rpx;" text="去完成"
+								@click="addClickModify(tableDatas[0])"></u-button>
+
+						</view>
+						<!-- </uni-col> -->
+					</uni-row>
+				</uni-card>
+				<uni-card v-else style="text-align:center">
+					今日暂无任务,可前往查看是否有往日任务
+				</uni-card>
+			</view>
+			<!-- 图表-->
+			<view class="charts-box">
+				<!-- 注意:这里的opts是uCharts的配置,eopts是ECharts的配置,不要搞混,如果不需要用在各种小程序端,是不需要传uCharts的opts的,只需要传eopts即可!!!这里加opts是为了覆盖uCharts的rose图的默认图例配置的位置 -->
+				<!-- 	<qiun-data-charts type="column" :eopts="opts" :opts="opts" :chartData="chartsDataLine3"  v-if="chartsDataLine3.series[0].itemStyle.normal.color=='#D2D8E2'"
+					:echartsH5="true" :echartsApp="true" /> -->
+			</view>
+
+		</view>
+		<!-- 单位进来转发任务显示人员 -->
+		<u-popup :show="checkboxShow2" :round="10" @close="checkboxShow2=false" style="position: relative;"
+			mode="center">
+			<view style="width: 90vw;padding: 10px;">
+				<text class="text-xl">检查人员</text>
+				<view class="" class="person-forward" v-if="personInfo">
+					<u-checkbox-group v-model="item.checkboxValue1" v-for="(item, index) in personInfo" :key="index"
+						placement="column" @change="checkboxChange2(item.user_id,$event)">
+						<u-checkbox :customStyle="{marginBottom: '8px'}" :label="item.nickname" :name="item.id">
+						</u-checkbox>
+					</u-checkbox-group>
+
+				</view>
+				<view v-else>
+					此单位下暂无可转发人员
+				</view>
+				<view class="flex flex-direction-row " style="margin: 30rpx 0;">
+					<u-button shape="circle" type="primary" color="#4CB2B6" text="确定" @click="checkboxConfirm2"
+						customStyle="margin-right:20px;padding:0 30px">
+					</u-button>
+					<u-button type="primary" plain color="#4CB2B6" text="取消" shape="circle" @click="checkboxCancel2"
+						customStyle="padding:0 30px">
+					</u-button>
+				</view>
+			</view>
+		</u-popup>
+		<!-- 加载中 -->
+		<isLodingModel></isLodingModel>
+
+		<u-modal :show="show" @confirm="confirm" @cancel="cancel" @close="close" asyncClose closeOnClickOverlay
+			showCancelButton confirmColor="red" :title="title" :content="content" ref="uModal"></u-modal>
+	</view>
+</template>
+<script>
+	import {
+		getNoticeList,
+		getNoticeAllRead,
+		getNoticeOlnyRead,
+		isNeedInfo
+	} from '@/api/notice'; // 通知公告列表
+	import {
+		checkGetPerson, //单位转发任务获取人员
+		taskList, //获取除草稿箱以外的列表  //获取当前日期的任务列表
+		checkSubmitForwardTask, //确认转发任务
+	} from "@/api/check_active";
+	import storage from '@/utils/storage';
+	let that = null;
+	import config from '@/config'
+	const baseUrlImg = config.baseUrlImg
+	export default {
+		data() {
+			return {
+				urls: baseUrlImg,
+				bgImg: `${baseUrlImg}/navBg@2x.png`,
+				isStreet:null,//判断是否是街道人员
+				opts: {
+					legend: {
+						show: false
+					},
+					color: ["#D2D8E2"],
+					yAxis: {
+						data: [{
+							min: 0,
+							axisLine: false,
+						}],
+						axisLine: false,
+					},
+					disabled: false,
+					xAxis: {
+						axisLine: {
+							show: false
+						},
+					},
+					tooltip: {
+						trigger: 'axis',
+						axisPointer: {
+							type: 'none'
+
+						}
+					},
+					extra: {
+						column: {
+							type: 'group',
+							barBorderRadius: [6, 6, 6, 6],
+							// activeBgColor: "#4CB2B6",
+							// activeBgOpacity:1
+						},
+						tooltip: {
+							horizentalLine: false,
+							splitLine: false
+						}
+					}
+				},
+
+				chartsDataLine3: {},
+				tongzhi: `${baseUrlImg}/tongzhi.png`,
+				gonggao: `${baseUrlImg}/gonggao.png`,
+				laba: `${baseUrlImg}/laba.png`,
+				//import biankuang from '@/static/images/biankuang.png'
+				LoadingModel: false,
+				show: false, //弹出框
+				title: '完善个人信息',
+				content: '个人信息尚未完善,是否完善个人基本信息?',
+				arrtongzhi: [],
+				arrgonggao: [],
+				personInfo: [],
+				checkedList2: [], //检查单位已选择列表
+				// 数据  //数据接口,已读接口(id,全部)---通知列表,详情
+				// tableDatas: [{
+				// 		name: '通知',
+				// 		icon: tongzhi,
+				// 		comType: '1'
+				// 	}
+				// , {
+				// 	name: '公告',
+				// 	icon: gonggao,
+				// 	comType: "2"
+				// }, {
+				// 	name: '指令',
+				// 	icon: zhiling,
+				// 	comType: "3"
+				// },
+				// ],
+				tableDatas: [], //任务数据
+				formData: {
+					pageNo: 1,
+					pageSize: 10,
+					receivDate: '',
+					receiver: this.$store.state.user.id,
+					taskType: "3"
+				},
+				FormDataTask: {
+					"broadId": 0,
+					"deptId": [],
+					"id": 0,
+					"orgId": [],
+					"sender": this.$store.state.user.id,
+					"receiver": [],
+					"status": 0,
+					"taskContent": "",
+					"taskName": "",
+					"taskStatus": 0,
+					"taskType": "" //任务类型 1对应主动检查
+				},
+				zhuanfa: `${baseUrlImg}/zhuanfa.png`,
+				// 通知公告数据
+				tableData: [],
+				// tableData数据加载中
+				loading: false,
+				// echarts数据
+				checkactiveOption: {},
+				goodsArr: [{
+						name: '每日巡查',
+						thumbnail: `${baseUrlImg}/meirixuncha.png`,
+						menuUrl: '/pagesA/fire/inspection_active/index'
+					},
+					{
+						name: '任务派遣',
+						thumbnail: `${baseUrlImg}/zhudongjiancha.png`,
+						menuUrl: `/pagesA/fire/check_active/index?type=2`
+					},
+					{
+						name: '主动检查',
+						thumbnail: `${baseUrlImg}/renwuguanli.png`,
+						menuUrl: `/pagesA/fire/check_inspection/check_inspection`
+					},
+					{
+						name: '隐患管理',
+						thumbnail: `${baseUrlImg}/yinhuanguanli.png`,
+						menuUrl: '/pagesA/fire/hidden_trouble/index'
+					}
+				],
+				goodsStreet: [{
+						name: '街道消防检查',
+						thumbnail: `${baseUrlImg}/working/fire_street.png`,
+						menuUrl: '/pagesA/fire/fire_inspetItem/fire_inspetItem'
+					},
+					{
+						name: '消防工作档案',
+						thumbnail: `${baseUrlImg}/working/archive.png`,
+						menuUrl: `/pagesA/fire/archive/nav`
+					},
+					{
+						name: '微型消防站',
+						thumbnail: `${baseUrlImg}/working/fire_extinguishe.png`,
+						menuUrl: `/pagesA/fire/fire_station/index`
+					},
+				],
+				checkboxShow2: false,
+				isStreetPerson: false
+			};
+		},
+		// 在 vue页面,向起始页通过事件传递数据
+		onShow: function() {
+			this.getServerData();
+			this.isStreet = uni.getStorageSync('getUserInfo_key').streetInfo; //登录用户的街道
+			const date = new Date()
+			this.formData.receivDate = uni.$u.timeFormat(date, 'yyyy-mm-dd')
+			this.getDatas()
+			this.getData()
+			const deptId = uni.getStorageSync('getUserInfo_key').streetInfo ? uni.getStorageSync('getUserInfo_key')
+				.streetInfo
+				.id : ''; //登录用户
+			if (deptId != '') {
+					this.isStreetPerson = true
+					this.$forceUpdate()
+				}else{
+					this.isStreetPerson = false
+				}
+		},
+		onLoad: function(option) {
+
+				that = this;
+			
+			// // 判断用户信息是否需要完善
+			// const value = uni.getStorageSync('getUserInfo_key');
+			// if (
+			// 	value.userRoles.appRoles.length > 0 &&
+			// 	value.userRoles.appRoles[0].role_id != '' &&
+			// 	value.userRoles.appRoles[0].user_id != ''
+			// ) {
+			// 	const appRoleId = value.userRoles.appRoles[0].role_id;
+			// 	const userId = value.userRoles.appRoles[0].user_id;
+			// 	isNeedInfo({
+			// 		appRoleId: appRoleId,
+			// 		userId: userId
+			// 	}).then(response => {
+			// 		if (response.code != 0) {
+			// 			that.show = true;
+			// 		}
+			// 	});
+			// } else {
+			// 	that.show = true;
+			// }
+		},
+		onReady() {},
+		methods: {
+			//图表
+			getServerData() {
+				//区域图
+				this.chartsDataLine3 = {
+					categories: ['提交', '待完成', '审核', '打回', '完成'],
+					series: [{
+						name: "",
+						barWidth: 26,
+						data: [30, 80, 100, 49, 112],
+						itemStyle: {
+							normal: {
+								//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
+								barBorderRadius: [6, 6, 4, 4],
+								color: '#D2D8E2'
+							},
+							emphasis: {
+								color: '#68BCBF' //点击后高亮颜色
+							}
+						}
+					}]
+				}
+
+
+			},
+			// 获取数据
+			getData() {
+				this.$modal.isLoadingModel(true);
+				this.LoadingModel = true;
+				getNoticeList({
+
+				}).then(response => {
+					this.LoadingModel = false;
+					this.$modal.isLoadingModel(this.LoadingModel);
+					// 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
+					// this.tableData = response.data ?? [...this.tableData, ...response.data.list];
+					if (this.tableData && response.data?.list.length > 0) {
+						this.arrtongzhi = response.data.list.filter(i => i.type == 1);
+						this.arrgonggao =response.data.list.filter(i => i.type == 2);
+					}
+					
+					// this.checkactiveGetEchart();
+				});
+			},
+			goInformDetails(val) {
+				//点击更多,查看所有的通知列表
+				// uni.navigateTo({
+				// 	url: '/pagesA/fire/notice/index?id=' + val
+				// });
+				//查看所有的每日任务列表
+				uni.navigateTo({
+					url: '/pagesA/fire/inspection_active/index'
+				});
+
+			},
+			//清楚所有未读
+			cleanUnread() {
+				getNoticeAllRead({
+					userId: this.$store.state.user.id
+				}).then(response => {
+					if (response.data == true) {
+						this.getData();
+					}
+				});
+			},
+			// 单个公告详情点击事件
+			onNoticeClick(val) {
+				getNoticeOlnyRead({
+					id: val.id
+				}).then(response => {
+					if (response.data == true) {
+						this.getData();
+					}
+				});
+				uni.navigateTo({
+					url: `/pagesA/fire/notice/notcice_details/notcice_details?id=${val.id}`,
+					success: function(res) {
+						// 通过eventChannel向被打开页面传送数据
+						res.eventChannel.emit('acceptDataFromOpenerPage', val);
+					}
+				});
+			},
+			// 根据不同的url,进行页面的跳转
+			handleToInfo(url) {
+				this.$tab.navigateTo(url);
+			},
+			// 模态框确认,取消操作
+			confirm() {
+				this.show = false;
+				uni.navigateTo({
+					url: '/pages/mine/info/edit'
+				});
+			},
+			close() {
+				this.show = false;
+			},
+			cancel() {
+				this.show = false;
+			},
+			// ================================================================
+			//查看详情
+			addClickDetail(val) {
+				uni.navigateTo({
+					url: `/pagesA/fire/check_active/check_list/check_list?id=${val}&current=${this.current}`,
+					success: function(res) {
+						res.eventChannel.emit('acceptDataFromOpenerPage', val);
+					}
+				})
+			},
+			//去完成
+			addClickModify(val) {
+				uni.navigateTo({
+					url: `/pagesA/fire/check_active/check_implement/check_implement?broadId=${val.broadId}`,
+					success: function(res) {
+						res.eventChannel.emit('acceptDataFromOpenerPage', val);
+					}
+				})
+			},
+			//转发
+			forward(val) { //展示转发的弹出层
+				this.ids = val.id //当前点击任务的id
+				this.checkboxShow2 = true
+				this.FormDataTask.broadId = val.broadId
+				this.FormDataTask.id = this.ids
+				this.FormDataTask.taskName = val.taskName
+				this.FormDataTask.taskStatus = val.taskStatus
+				this.FormDataTask.taskContent = val.taskContent
+				this.FormDataTask.orgId.push(val.orgId)
+				checkGetPerson({
+					orgId: val.orgId
+				}).then(response => {
+					this.personInfo = response.data
+				})
+			},
+			checkboxChange2(i, n) {
+				if (i && n.length != 0) {
+					this.checkedList2.push(i)
+				} else if (i && n.length == 0) {
+					this.checkedList2 = this.checkedList2.filter(item => item != i)
+				}
+			},
+			//popup检查单位确定============
+			checkboxConfirm2() {
+				checkSubmitForwardTask(JSON.stringify(this.FormDataTask)).then(response => {
+					if (response.data) {
+						this.$modal.msg('转发成功')
+						this.checkboxShow2 = false
+					} else {
+						this.$modal.msgError(response.msg)
+					}
+				})
+			},
+			//popup取消
+			checkboxCancel2() {
+				this.checkboxShow2 = false
+			},
+			getDatas() {
+				this.loading = true
+				this.pageNo = 1
+				taskList(JSON.stringify(this.formData)).then(response => {
+					this.tableDatas = response.data.list
+				})
+			},
+			// =====================================================
+
+
+		}
+	};
+</script>
+<style lang="scss" scoped>
+	.album {
+		@include flex;
+		align-items: flex-start;
+
+		&__avatar {
+			background-color: $u-bg-color;
+			padding: 5px;
+			border-radius: 3px;
+		}
+
+		&__content {
+			margin-left: 10px;
+			flex: 1;
+		}
+	}
+
+	.container {
+		border-radius: 30px 30px 0px 0px;
+		background: #fff;
+		// top:200rpx;
+		z-index: 99;
+		position: relative;
+	}
+
+	body {
+		// background-image: linear-gradient(#4cb2b6, #f0f8f9) !important;
+	}
+
+	uni-page-body {
+		// background-image: linear-gradient(#4cb2b6, #f0f8f9) !important;
+		height: 100% !important;
+		// height: 100%;
+	}
+
+	.grid-body {
+		// height: 30%;
+		margin-bottom: 20rpx;
+	}
+
+	.cards {
+		height: 100%;
+	}
+
+	/deep/.uni-card--shadow {
+		border-radius: 24rpx;
+	}
+
+	/deep/.u-button.data-v-3bf2dba7,
+	.u-grid-item {
+		width: 30%;
+		float: right;
+	}
+
+	/deep/.uni-card--border {
+		border-radius: 24rpx !important;
+		box-shadow: 0px 1px 14px 0px rgba(211, 211, 211, 0.3) !important;
+		border: none !important;
+	}
+
+	::v-deep .u-navbar__content {
+		background-color: #4cb2b6 !important;
+	}
+
+	.container {
+		// height: 90vh !important;
+		// background-image: linear-gradient(#4cb2b6, #f0f8f9);
+	}
+
+	// 已读
+	.read {
+		color: #000;
+		padding-left: 40rpx;
+	}
+
+	.unread {
+		color: red;
+		padding-left: 40rpx;
+	}
+
+	.no-notice {
+		text-align: center;
+	}
+
+	.text {
+		text-align: center;
+		color: #000;
+		font-size: 26rpx;
+		margin-top: 10rpx;
+	}
+
+	.grid-item-box {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		padding: 15px 0;
+	}
+
+	.scroll-list__goods-item__image {
+		width: 85rpx;
+		height: 92rpx;
+	}
+
+	.grid-text {
+		font-size: 11px;
+		color: #383838;
+		padding: 10rpx 0 20rpx 0rpx;
+		/* #ifndef APP-PLUS */
+		box-sizing: border-box;
+		/* #endif */
+	}
+
+	.nav {
+		// margin-bottom: 30rpx;
+
+		.u-grid-item[data-v-99a45d26],
+		.u-grid-item.data-v-99a45d26,
+		.u-grid-item {
+			margin-bottom: 30rpx;
+		}
+	}
+
+	/deep/.uni-col-16.data-v-fff79656,
+	/deep/.uni-col-16[data-v-fff79656] {
+		width: 100%;
+	}
+
+	/deep/.uni-col-16 {
+		width: 100%;
+	}
+
+	/deep/.uni-row {
+		margin: 0 30rpx 10rpx -6rpx !important;
+	}
+
+	/deep/.u-notice-bar {
+		background-color: rgb(235, 246, 247) !important;
+	}
+
+	/deep/.u-notice-bar[data-v-4eff50a7],
+	/deep/.u-notice-bar.data-v-4eff50a7,
+	/deep/.u-notice-bar {
+		border-radius: 20rpx;
+	}
+
+	.yidu {
+		font-size: 24rpx;
+		background-color: #f8f8f8;
+		padding: 10rpx 20rpx;
+		border-radius: 10rpx;
+		color: rgb(255, 178, 62);
+		margin-right: 20rpx;
+	}
+
+	.weidu {
+		font-size: 24rpx;
+		background-color: #f8f8f8;
+		padding: 10rpx 20rpx;
+		border-radius: 10rpx;
+		margin-right: 20rpx;
+		color: #a5a9ac;
+	}
+
+	.back-image {
+		margin-bottom: 20rpx;
+		height: 115rpx;
+		background: url('~@/static/images/biankuang.png') no-repeat;
+		background-size: 100% 115rpx;
+		position: relative;
+	}
+
+	.back-image2 {
+		margin-bottom: 0;
+	}
+
+	.back-size,
+	.back-sizes {
+		width: 60rpx;
+		height: 30rpx;
+		margin: 0 20rpx 0 60rpx;
+	}
+
+	.back-sizes {
+		width: 32rpx;
+		height: 32rpx;
+	}
+
+	.back-notice {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 48rpx;
+		height: 52rpx;
+	}
+
+	.charts-box {
+		margin-top: 20rpx;
+		width: 100%;
+		height: 600rpx;
+	}
+
+	/deep/.u-navbar__content__left[data-v-75dad532],
+	/deep/.u-navbar__content__right[data-v-75dad532],
+	/deep/.u-navbar__content__right {
+		display: none !important;
+	}
+
+	.u-cell-text {
+		font-weight: 700;
+		font-size: 32rpx;
+		padding-left: 10rpx;
+		margin-left: -10rpx;
+		border-left: 6rpx solid #4CB2B6;
+	}
 </style>

+ 238 - 236
pages/mine/index.vue

@@ -1,236 +1,238 @@
-<template>
-	<view class="mine-container" :style="{height: `${windowHeight}px`}">
-		<navInfo :title="'个人中心'"></navInfo>	
-		<view class="bgTopImg">
-			<image slot="right"  :src="`${urls}/navBg@2x.png`" class="bgTopImg"></image>
-		</view>
-		<!--顶部个人信息栏-->
-		<view class="header-section">
-			<view class="flex padding justify-between">
-				<view class="flex align-center">
-				</view>
-				<view @click="handleToInfo" class="flex align-center">
-				</view>
-			</view>
-		</view>
-		<view class="content-section">
-			<view class="mine-actions grid col-3 text-center">
-				<view class="photo">
-					<image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round"
-						style="border: 3px solid #4CB2B6;width: 160rpx;height: 160rpx;">
-				</view>
-				<view v-if="name" @click="handleToInfo" class="user-info">
-					<view class="u_title"> 昵称:{{ name }}
-					</view>
-					<view style="height: 2rpx;background-color: #E5E5E5;margin-top: 40rpx;width: 92%;margin-left:4%;">
-					</view>
-				</view>
-				<u-cell-group :border="false" customStyle="margin-top:30rpx">
-					<u-cell :border="false" :icon="bianjiziliao" title="编辑资料" isLink @click.native="handleToEditInfo">
-					</u-cell>
-					<u-cell :border="false" :icon="danweixinxi" @click.native="goUnit" isLink title="单位信息"></u-cell>
-					<u-cell :border="false" :icon="jianchajilu" @click.native="auditRecord" isLink title="工作记录">
-					</u-cell>
-					<u-cell :border="false" :icon="jianchajilu" @click.native="goInstuct" isLink title="操作说明">
-					</u-cell>
-				</u-cell-group>
-				<view v-if="name" class="user-info" style="padding-bottom: 40rpx;">
-					<u-button @click="handleLogout" type="primary" shape="circle" size="default" color="#4CB2B6"
-						text="退出登录">
-					</u-button>
-				</view>
-        </view>
-			</view>
-		</view>
-	</view>
-</template>
-<script>
-	// #ifdef H5
-	import navInfo from '@/pagesA/components/my-nav/nav'
-	// #endif
-	import storage from '@/utils/storage'
-	import {
-		getUserProfile
-	} from "@/api/system/user"
-	import config from '@/config'
-	const baseUrlImg=config.baseUrlImg
-	export default {
-		components: {
-			// #ifdef H5
-			navInfo
-			// #endif
-		},
-		data() {
-			return {
-				urls:baseUrlImg,
-				jianchajilu:`${baseUrlImg}/jianchajilu.png`,
-				bianjiziliao: `${baseUrlImg}/bianjiziliao.png`,
-				danweixinxi:`${baseUrlImg}/danweixinxi.png`,
-				name: this.$store.state.user.name,
-				version: getApp().globalData.config.appInfo.version
-			}
-		},
-		computed: {
-			avatar() {
-				return this.$store.state.user.avatar
-			},
-			windowHeight() {
-				return uni.getSystemInfoSync().windowHeight - 50
-			}
-		},
-		onShow() {
-			this.getUser()
-		},
-		methods: {
-			getUser() {
-				getUserProfile().then(response => {
-					// this.name= response.data
-					this.name = response.data.username
-				})
-			},
-			handleToInfo() {
-				this.$tab.navigateTo('/pages/mine/info/index')
-			},
-			handleToEditInfo() {
-				uni.navigateTo({
-					url: '/pages/mine/info/edit'
-				})
-			},
-			goUnit() {
-				uni.navigateTo({
-					url: '/pagesA/fire/unit_info/index'
-				})
-			},
-			auditRecord() {
-				uni.navigateTo({
-					url:`/pagesB/fire/check_record/index?my=onlymy`
-				})
-			},
-			goInstuct(){
-				uni.navigateTo({
-					url:`/pages/mine/instruct/instruct`
-				})
-			},
-			handleToSetting() {
-				this.$tab.navigateTo('/pages/mine/setting/index')
-			},
-			handleToLogin() {
-				this.$tab.reLaunch('/pages/login')
-			},
-			handleToAvatar() {
-				this.$tab.navigateTo('/pages/mine/avatar/index')
-			},
-			handleLogout() {
-				this.$modal.confirm('确定注销并退出系统吗?').then(() => {
-					this.$store.dispatch('LogOut').then(() => {
-						this.$tab.reLaunch('/pages/index')
-						// this.$tab.reLaunch('/pages/work/index')
-					})
-				})
-			},
-			handleHelp() {
-				this.$tab.navigateTo('/pages/mine/help/index')
-			},
-			handleAbout() {
-				this.$tab.navigateTo('/pages/mine/about/index')
-			},
-			handleJiaoLiuQun() {
-				this.$modal.showToast('微信搜索 naidaguo 后,添加好友后拉你进技术交流群')
-			},
-			handleBuilding() {
-				this.$modal.showToast('模块建设中~')
-			}
-		}
-	}
-</script>
-<style lang="scss" scoped>
-	page {
-		background-color: #f5f6f7;
-	}
-
-	.mine-container {
-		width: 100%;
-		height: 100%;
-
-		.header-section {
-			/*#ifdef H5*/
-				padding: 15px 15px 100rpx 15px;
-			/* #endif */
-			/* #ifdef  MP-WEIXIN*/
-			padding: 15px 15px 240rpx 15px;
-			/* #endif */
-			color: white;
-
-			.login-tip {
-				font-size: 18px;
-				margin-left: 10px;
-			}
-
-			.cu-avatar {
-				border: 2px solid #eaeaea;
-
-				.icon {
-					font-size: 40px;
-				}
-			}
-		}
-
-		.content-section {
-			position: relative;
-			top: -100rpx;
-
-			.user-info {
-				margin-top: 40px;
-				width: 100%;
-
-				.u_title {
-					font-size: 18px;
-					text-align: center;
-					line-height: 40rpx;
-				}
-			}
-
-			.mine-actions {
-				margin: 60rpx 15px;
-				padding: 20px 0px;
-				border-radius: 30px;
-				background-color: white;
-				position: relative;
-				text-align: center;
-				box-shadow: 0px 0px 3px 0px rgba(86, 165, 168, 0.63);
-
-				.photo {
-					position: absolute;
-					left: 50%;
-					top: -80rpx;
-					transform: translate(-120rpx);
-				}
-
-				.action-item {
-					.icon {
-						font-size: 28px;
-					}
-
-					.text {
-						display: block;
-						font-size: 13px;
-					}
-				}
-			}
-		}
-	}
-
-	/deep/.u-cell__title {
-		flex: none !important;
-	}
-
-	/deep/.u-cell__left-icon-wrap[data-v-913eaa32],
-	.u-cell__left-icon-wrap.data-v-913eaa32 {
-		margin-right: 14px;
-	}
-
-	/deep/.u-button[data-v-3bf2dba7],
-	/deep/.u-button.data-v-3bf2dba7,/deep/.u-button {
-		width: 48% !important;
-	}
-</style>
+<template>
+	<view class="mine-container" :style="{height: `${windowHeight}px`}">
+		<navInfo :title="'个人中心'"></navInfo>	
+		<view class="bgTopImg">
+			<image slot="right"  :src="`${urls}/navBg@2x.png`" class="bgTopImg"></image>
+		</view>
+		<!--顶部个人信息栏-->
+		<view class="header-section">
+			<view class="flex padding justify-between">
+				<view class="flex align-center">
+				</view>
+				<view @click="handleToInfo" class="flex align-center">
+				</view>
+			</view>
+		</view>
+		<view class="content-section">
+			<view class="mine-actions grid col-3 text-center">
+				<view class="photo">
+					<image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round"
+						style="border: 3px solid #4CB2B6;width: 160rpx;height: 160rpx;">
+				</view>
+				<view v-if="name" @click="handleToInfo" class="user-info">
+					<view class="u_title"> 昵称:{{ name }}
+					</view>
+					<view style="height: 2rpx;background-color: #E5E5E5;margin-top: 40rpx;width: 92%;margin-left:4%;">
+					</view>
+				</view>
+				<u-cell-group :border="false" customStyle="margin-top:30rpx">
+					<u-cell :border="false" :icon="bianjiziliao" title="编辑资料" isLink @click.native="handleToEditInfo">
+					</u-cell>
+					<u-cell :border="false" :icon="danweixinxi" @click.native="goUnit" isLink title="单位信息" v-if="!isStreet"></u-cell>
+					<u-cell :border="false" :icon="jianchajilu" @click.native="auditRecord" isLink title="工作记录">
+					</u-cell>
+					<u-cell :border="false" :icon="jianchajilu" @click.native="goInstuct" isLink title="操作说明">
+					</u-cell>
+				</u-cell-group>
+				<view v-if="name" class="user-info" style="padding-bottom: 40rpx;">
+					<u-button @click="handleLogout" type="primary" shape="circle" size="default" color="#4CB2B6"
+						text="退出登录">
+					</u-button>
+				</view>
+        </view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	// #ifdef H5
+	import navInfo from '@/pagesA/components/my-nav/nav'
+	// #endif
+	import storage from '@/utils/storage'
+	import {
+		getUserProfile
+	} from "@/api/system/user"
+	import config from '@/config'
+	const baseUrlImg=config.baseUrlImg
+	export default {
+		components: {
+			// #ifdef H5
+			navInfo
+			// #endif
+		},
+		data() {
+			return {
+				urls:baseUrlImg,
+				jianchajilu:`${baseUrlImg}/jianchajilu.png`,
+				bianjiziliao: `${baseUrlImg}/bianjiziliao.png`,
+				danweixinxi:`${baseUrlImg}/danweixinxi.png`,
+				name: this.$store.state.user.name,
+				version: getApp().globalData.config.appInfo.version,
+				isStreet:null
+			}
+		},
+		computed: {
+			avatar() {
+				return this.$store.state.user.avatar
+			},
+			windowHeight() {
+				return uni.getSystemInfoSync().windowHeight - 50
+			}
+		},
+		onShow() {
+			this.getUser()
+				this.isStreet = uni.getStorageSync('getUserInfo_key').streetInfo; //登录用户的街道id
+		},
+		methods: {
+			getUser() {
+				getUserProfile().then(response => {
+					// this.name= response.data
+					this.name = response.data.username
+				})
+			},
+			handleToInfo() {
+				this.$tab.navigateTo('/pages/mine/info/index')
+			},
+			handleToEditInfo() {
+				uni.navigateTo({
+					url: '/pages/mine/info/edit'
+				})
+			},
+			goUnit() {
+				uni.navigateTo({
+					url: '/pagesA/fire/unit_info/index'
+				})
+			},
+			auditRecord() {
+				uni.navigateTo({
+					url:`/pagesB/fire/check_record/index?my=onlymy`
+				})
+			},
+			goInstuct(){
+				uni.navigateTo({
+					url:`/pages/mine/instruct/instruct`
+				})
+			},
+			handleToSetting() {
+				this.$tab.navigateTo('/pages/mine/setting/index')
+			},
+			handleToLogin() {
+				this.$tab.reLaunch('/pages/login')
+			},
+			handleToAvatar() {
+				this.$tab.navigateTo('/pages/mine/avatar/index')
+			},
+			handleLogout() {
+				this.$modal.confirm('确定注销并退出系统吗?').then(() => {
+					this.$store.dispatch('LogOut').then(() => {
+						this.$tab.reLaunch('/pages/index')
+						// this.$tab.reLaunch('/pages/work/index')
+					})
+				})
+			},
+			handleHelp() {
+				this.$tab.navigateTo('/pages/mine/help/index')
+			},
+			handleAbout() {
+				this.$tab.navigateTo('/pages/mine/about/index')
+			},
+			handleJiaoLiuQun() {
+				this.$modal.showToast('微信搜索 naidaguo 后,添加好友后拉你进技术交流群')
+			},
+			handleBuilding() {
+				this.$modal.showToast('模块建设中~')
+			}
+		}
+	}
+</script>
+<style lang="scss" scoped>
+	page {
+		background-color: #f5f6f7;
+	}
+
+	.mine-container {
+		width: 100%;
+		height: 100%;
+
+		.header-section {
+			/*#ifdef H5*/
+				padding: 15px 15px 100rpx 15px;
+			/* #endif */
+			/* #ifdef  MP-WEIXIN*/
+			padding: 15px 15px 240rpx 15px;
+			/* #endif */
+			color: white;
+
+			.login-tip {
+				font-size: 18px;
+				margin-left: 10px;
+			}
+
+			.cu-avatar {
+				border: 2px solid #eaeaea;
+
+				.icon {
+					font-size: 40px;
+				}
+			}
+		}
+
+		.content-section {
+			position: relative;
+			top: -100rpx;
+
+			.user-info {
+				margin-top: 40px;
+				width: 100%;
+
+				.u_title {
+					font-size: 18px;
+					text-align: center;
+					line-height: 40rpx;
+				}
+			}
+
+			.mine-actions {
+				margin: 60rpx 15px;
+				padding: 20px 0px;
+				border-radius: 30px;
+				background-color: white;
+				position: relative;
+				text-align: center;
+				box-shadow: 0px 0px 3px 0px rgba(86, 165, 168, 0.63);
+
+				.photo {
+					position: absolute;
+					left: 50%;
+					top: -80rpx;
+					transform: translate(-120rpx);
+				}
+
+				.action-item {
+					.icon {
+						font-size: 28px;
+					}
+
+					.text {
+						display: block;
+						font-size: 13px;
+					}
+				}
+			}
+		}
+	}
+
+	/deep/.u-cell__title {
+		flex: none !important;
+	}
+
+	/deep/.u-cell__left-icon-wrap[data-v-913eaa32],
+	.u-cell__left-icon-wrap.data-v-913eaa32 {
+		margin-right: 14px;
+	}
+
+	/deep/.u-button[data-v-3bf2dba7],
+	/deep/.u-button.data-v-3bf2dba7,/deep/.u-button {
+		width: 48% !important;
+	}
+</style>

+ 342 - 342
utils/common.js

@@ -1,343 +1,343 @@
-/**
- * 显示消息提示框
- * @param content 提示的标题
- */
-import config from '@/config'
-const baseUrl = config.baseUrl
-import {
-	getAccessToken
-} from '@/utils/auth'
-import loadImage from 'blueimp-load-image';
-export function toast(content) {
-	uni.showToast({
-		icon: 'none',
-		title: content
-	})
-}
-
-/**
- * 显示模态弹窗
- * @param content 提示的标题
- */
-export function showConfirm(content) {
-	return new Promise((resolve, reject) => {
-		uni.showModal({
-			title: '提示',
-			content: content,
-			cancelText: '取消',
-			confirmText: '确定',
-			success: function(res) {
-				resolve(res)
-			}
-		})
-	})
-}
-
-/**
- * 参数处理
- * @param params 参数
- */
-export function tansParams(params) {
-	let result = ''
-	for (const propName of Object.keys(params)) {
-		const value = params[propName]
-		var part = encodeURIComponent(propName) + "="
-		if (value !== null && value !== "" && typeof(value) !== "undefined") {
-			if (typeof value === 'object') {
-				for (const key of Object.keys(value)) {
-					if (value[key] !== null && value[key] !== "" && typeof(value[key]) !== 'undefined') {
-						let params = propName + '[' + key + ']'
-						var subPart = encodeURIComponent(params) + "="
-						result += subPart + encodeURIComponent(value[key]) + "&"
-					}
-				}
-			} else {
-				result += part + encodeURIComponent(value) + "&"
-			}
-		}
-	}
-	return result
-}
-//获取检查项类型
-export function checkType(dictTypeData, dictTypeValue) {
-	let name = []
-	const data = uni.getStorageSync('getlistSimpleDict_key')
-	data.map(v => {
-		if (dictTypeData == v.dictType && dictTypeValue == v.value) {
-			name = v.label
-		}
-	})
-	return name
-}
-//时间戳转换为年月日
-export function shijianc(time) {
-	let date = new Date(time)
-	let Y = date.getFullYear() + '-'
-	let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
-	let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
-	let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
-	let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':'
-	let s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds())
-	return Y + M + D + h + m + s
-}
-//删除
-export function delSure(delInterface, val, context) {
-	uni.showModal({
-		title: '确认删除',
-		content: `是否确认删除?`,
-		success: function(res) {
-			if (res.confirm) {
-				delInterface({
-					id: val
-				}).then(delres => {
-					context.$modal.msg('删除成功')
-				})
-			} else if (res.cancel) {
-				context.$modal.msg('取消删除')
-			}
-			context.loading = true;
-			context.isLoaded = false
-			context.queryParams.pageNo = 1;
-			context.list = []
-			context.getData()
-			context.$forceUpdate()
-		}
-	});
-}
-//9个表的输入框规则
-export function NumericRule() {
-	return [{
-		pattern: /^[0-9]+$/,
-		message: '请输入数字',
-		trigger: ['change', 'blur'],
-	}];
-}
-//拍照npm install blueimp-load-image
-export function takePhotos(vm) {
-	let pictures = [];
-	uni.chooseImage({
-		sourceType: ['camera'], //实现拍照
-		count: 3,
-		sizeType: ['original', 'compressed'],
-		// sourceType: ['album','camera'], //打开系统相册
-		success(res) {
-			  if (res.tempFilePaths.length === 0) {
-			    vm.loading = false;
-			    return;
-			  }else{
-				  vm.loading=true
-			  }
-			if (Array.isArray(res.tempFilePaths)) {
-				res.tempFilePaths.forEach(item => {
-					loadImage(
-						item,
-						function(canvas) {
-							canvas.toBlob(function(blob) {
-								// 压缩后的 Blob 对象
-								const compressedFile = blob;
-								// 将压缩后的文件 `compressedFile` 转换为临时URL
-								const fileUrl = URL.createObjectURL(compressedFile);
-								// 接下来将临时URL作为文件路径上传到服务器
-								uni.uploadFile({
-									url: baseUrl + '/admin-api/infra/file/upload',
-									filePath: fileUrl, // 使用临时URL作为文件路径
-									name: 'file',
-									header: {
-										"Authorization": 'Bearer ' +
-											getAccessToken(),
-									},
-									success: (res) => {
-										vm.loading = false
-										let imgUrl = JSON.parse(res.data);
-										vm.formData.streetRepPicsDOList.push({
-											url: imgUrl.data,
-											feildname: '',
-											repid: ''
-										});
-										vm.$forceUpdate();
-									},
-									fail: (err) => {
-										vm.loading = false
-										this.$modal.msg(err)
-									},
-									complete: () => {
-										vm.loading =
-											false; // 无论成功还是失败,都将loading状态设置为false
-										vm.$forceUpdate();
-									}
-								});
-
-								// 上传完毕后,释放临时URL
-								URL.revokeObjectURL(fileUrl);
-							}, 'image/jpeg', 0.6); // 设置压缩后的图片格式为 JPEG,压缩质量为 0.6
-						}, {
-							canvas: true,
-							maxWidth: 800
-						} // 设置最大宽度为 800px
-					);
-				});
-			}
-		},
-		fail: (err) => {
-			vm.loading = false;
-		},
-	})
-}
-export function choiceStreet(vm) {
-	const deptValue = uni.getStorageSync('getDepartment_key'); //所有部门
-	const deptId = uni.getStorageSync('getUserInfo_key').streetInfo ? uni.getStorageSync('getUserInfo_key').streetInfo
-		.id : ''; //登录用户
-	var newArrar = {}; //新对象
-	if (deptId) {
-		newArrar = deptValue.find((item) => {
-			if (item.id === deptId) {
-				vm.formData.streetId = item.id;
-				vm.formData.streetName = item.qumc;
-			} else {
-				vm.actionsStreet.push({
-					id: item.id,
-					name: item.qumc
-				});
-				vm.actionsMaplist = vm.splitArray(vm.actionsStreet, 9);
-			}
-		})
-		// show1 ='0' 点击将不再显示弹窗
-		vm.show1 = '0'
-	}
-}
-// 下载附件
-export function downSee(appendix) {
-	const fileExt = appendix.substring(appendix.lastIndexOf('.') + 1);
-	//加载框动画
-	uni.showLoading({
-		title: '正在下载……'
-	});
-	// #ifdef H5
-	if (fileExt === 'png' || fileExt === 'jpg') {
-		// 预览图片
-		uni.previewImage({
-			urls: [appendix],
-			// longPressActions: {
-			// itemList: ['发送给朋友', '保存图片', '收藏'],
-			success: function(data) {
-				uni.hideLoading();
-			},
-			fail: function(err) {
-			}
-			// }
-		})
-	} else {
-		const link = document.createElement('a');
-		link.href = appendix;
-		link.download = appendix;
-		document.body.appendChild(link);
-		link.click();
-		link.remove();
-		uni.hideLoading();
-		uni.showToast({
-			icon: 'success',
-			mask: true,
-			title: '文件已下载',
-			duration: 2000
-		});
-	}
-
-	// #endif
-	// #ifdef MP-WEIXIN
-	uni.downloadFile({
-		url: appendix, //下载地址接口返回
-		success: data => {
-			// console.log('打印data', data);
-			if (data.statusCode === 200) {
-				//隐藏加载框
-				// uni.hideLoading();
-				//文件保存到本地
-				uni.getFileSystemManager().saveFile({
-					tempFilePath: data.tempFilePath, //临时路径
-					success: function(res) {
-						// console.log('打印res', res);
-						uni.showToast({
-							icon: 'success',
-							mask: true,
-							title: '文件已保存:' + res.savedFilePath, //保存路径
-							title: '加载成功',
-							duration: 2000
-						});
-						//自动打开文档查看
-						setTimeout(() => {
-							var filePath = res.savedFilePath;
-							uni.openDocument({
-								//新开页面打开文档,支持格式:doc, xls, ppt, pdf, docx, xlsx, pptx。
-								filePath: filePath,
-								fileType: fileExt,
-								showMenu: false,
-								success: function(res) {
-								},
-								fail: function() {
-									uni.showToast({
-										title: '暂不支持打开此类型',
-										duration: 2000,
-										icon: 'none'
-									});
-								}
-							});
-						}, 1000);
-					}
-				});
-			}
-		},
-		fail: err => {
-			uni.showToast({
-				icon: 'none',
-				mask: true,
-				title: '文件下载失败'
-			});
-		}
-	}) // #endif
-}
-
-export function uploadFile(tempFilePaths, i, that) {
-	return new Promise((resolve, reject) => {
-		const loading = uni.showLoading({
-			title: '文件上传中...',
-			mask: true
-		});
-		uni.uploadFile({
-			url: baseUrl + '/admin-api/infra/file/upload', // 后端用于处理图片并返回图片地址及文件的接口
-			filePath: tempFilePaths[i],
-			name: 'file',
-			header: {
-				Authorization: 'Bearer ' + getAccessToken() // 请求token
-			},
-			success: res => {
-				let data = JSON.parse(res.data);
-				
-				// that.formData.attId.push(data.data)
-					that.formData.attId=['']
-					that.formData.attId[0] = data.data
-				uni.showToast({
-					title: '文件上传成功!'
-				});
-				that.loading = false
-			},
-			fail: err => {
-				uni.showToast({
-					icon: 'error',
-					title: '文件上传失败!'
-				});
-				that.loading = false
-			},
-			complete: () => {
-				uni.hideLoading(loading);
-			}
-		});
-	});
-}
-// 图片放大
-export function viewImgBig(i, imgList) {
-	uni.previewImage({
-		urls: imgList,
-		current: i
-	});
-	
+/**
+ * 显示消息提示框
+ * @param content 提示的标题
+ */
+import config from '@/config'
+const baseUrl = config.baseUrl
+import {
+	getAccessToken
+} from '@/utils/auth'
+import loadImage from 'blueimp-load-image';
+export function toast(content) {
+	uni.showToast({
+		icon: 'none',
+		title: content
+	})
+}
+
+/**
+ * 显示模态弹窗
+ * @param content 提示的标题
+ */
+export function showConfirm(content) {
+	return new Promise((resolve, reject) => {
+		uni.showModal({
+			title: '提示',
+			content: content,
+			cancelText: '取消',
+			confirmText: '确定',
+			success: function(res) {
+				resolve(res)
+			}
+		})
+	})
+}
+
+/**
+ * 参数处理
+ * @param params 参数
+ */
+export function tansParams(params) {
+	let result = ''
+	for (const propName of Object.keys(params)) {
+		const value = params[propName]
+		var part = encodeURIComponent(propName) + "="
+		if (value !== null && value !== "" && typeof(value) !== "undefined") {
+			if (typeof value === 'object') {
+				for (const key of Object.keys(value)) {
+					if (value[key] !== null && value[key] !== "" && typeof(value[key]) !== 'undefined') {
+						let params = propName + '[' + key + ']'
+						var subPart = encodeURIComponent(params) + "="
+						result += subPart + encodeURIComponent(value[key]) + "&"
+					}
+				}
+			} else {
+				result += part + encodeURIComponent(value) + "&"
+			}
+		}
+	}
+	return result
+}
+//获取检查项类型
+export function checkType(dictTypeData, dictTypeValue) {
+	let name = []
+	const data = uni.getStorageSync('getlistSimpleDict_key')
+	data.map(v => {
+		if (dictTypeData == v.dictType && dictTypeValue == v.value) {
+			name = v.label
+		}
+	})
+	return name
+}
+//时间戳转换为年月日
+export function shijianc(time) {
+	let date = new Date(time)
+	let Y = date.getFullYear() + '-'
+	let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
+	let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
+	let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
+	let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':'
+	let s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds())
+	return Y + M + D + h + m + s
+}
+//删除
+export function delSure(delInterface, val, context) {
+	uni.showModal({
+		title: '确认删除',
+		content: `是否确认删除?`,
+		success: function(res) {
+			if (res.confirm) {
+				delInterface({
+					id: val
+				}).then(delres => {
+					context.$modal.msg('删除成功')
+				})
+			} else if (res.cancel) {
+				context.$modal.msg('取消删除')
+			}
+			context.loading = true;
+			context.isLoaded = false
+			context.queryParams.pageNo = 1;
+			context.list = []
+			context.getData()
+			context.$forceUpdate()
+		}
+	});
+}
+//9个表的输入框规则
+export function NumericRule() {
+	return [{
+		pattern: /^[0-9]+$/,
+		message: '请输入数字',
+		trigger: ['change', 'blur'],
+	}];
+}
+//拍照npm install blueimp-load-image
+export function takePhotos(vm) {
+	let pictures = [];
+	uni.chooseImage({
+		sourceType: ['camera'], //实现拍照
+		count: 3,
+		sizeType: ['original', 'compressed'],
+		// sourceType: ['album','camera'], //打开系统相册
+		success(res) {
+			  if (res.tempFilePaths.length === 0) {
+			    vm.loading = false;
+			    return;
+			  }else{
+				  vm.loading=true
+			  }
+			if (Array.isArray(res.tempFilePaths)) {
+				res.tempFilePaths.forEach(item => {
+					loadImage(
+						item,
+						function(canvas) {
+							canvas.toBlob(function(blob) {
+								// 压缩后的 Blob 对象
+								const compressedFile = blob;
+								// 将压缩后的文件 `compressedFile` 转换为临时URL
+								const fileUrl = URL.createObjectURL(compressedFile);
+								// 接下来将临时URL作为文件路径上传到服务器
+								uni.uploadFile({
+									url: baseUrl + '/admin-api/infra/file/upload',
+									filePath: fileUrl, // 使用临时URL作为文件路径
+									name: 'file',
+									header: {
+										"Authorization": 'Bearer ' +
+											getAccessToken(),
+									},
+									success: (res) => {
+										vm.loading = false
+										let imgUrl = JSON.parse(res.data);
+										vm.formData.streetRepPicsDOList.push({
+											url: imgUrl.data,
+											feildname: '',
+											repid: ''
+										});
+										vm.$forceUpdate();
+									},
+									fail: (err) => {
+										vm.loading = false
+										this.$modal.msg(err)
+									},
+									complete: () => {
+										vm.loading =
+											false; // 无论成功还是失败,都将loading状态设置为false
+										vm.$forceUpdate();
+									}
+								});
+
+								// 上传完毕后,释放临时URL
+								URL.revokeObjectURL(fileUrl);
+							}, 'image/jpeg', 0.6); // 设置压缩后的图片格式为 JPEG,压缩质量为 0.6
+						}, {
+							canvas: true,
+							maxWidth: 800
+						} // 设置最大宽度为 800px
+					);
+				});
+			}
+		},
+		fail: (err) => {
+			vm.loading = false;
+		},
+	})
+}
+export function choiceStreet(vm) {
+	const deptValue = uni.getStorageSync('getDepartment_key'); //所有部门
+	const deptId = uni.getStorageSync('getUserInfo_key').streetInfo ? uni.getStorageSync('getUserInfo_key').streetInfo
+		.id : ''; //登录用户
+	var newArrar = {}; //新对象
+	if (deptId) {
+		newArrar = deptValue.find((item) => {
+			if (item.id === deptId) {
+				vm.formData.streetId = item.id;
+				vm.formData.streetName = item.qumc;
+			} else {
+				vm.actionsStreet.push({
+					id: item.id,
+					name: item.qumc
+				});
+				vm.actionsMaplist = vm.splitArray(vm.actionsStreet, 9);
+			}
+		})
+		// show1 ='0' 点击将不再显示弹窗
+		vm.show1 = '0'
+	}
+}
+// 下载附件
+export function downSee(appendix) {
+	const fileExt = appendix.substring(appendix.lastIndexOf('.') + 1);
+	//加载框动画
+	uni.showLoading({
+		title: '正在下载……'
+	});
+	// #ifdef H5
+	if (fileExt === 'png' || fileExt === 'jpg') {
+		// 预览图片
+		uni.previewImage({
+			urls: [appendix],
+			// longPressActions: {
+			// itemList: ['发送给朋友', '保存图片', '收藏'],
+			success: function(data) {
+				uni.hideLoading();
+			},
+			fail: function(err) {
+			}
+			// }
+		})
+	} else {
+		const link = document.createElement('a');
+		link.href = appendix;
+		link.download = appendix;
+		document.body.appendChild(link);
+		link.click();
+		link.remove();
+		uni.hideLoading();
+		uni.showToast({
+			icon: 'success',
+			mask: true,
+			title: '文件已下载',
+			duration: 2000
+		});
+	}
+
+	// #endif
+	// #ifdef MP-WEIXIN
+	uni.downloadFile({
+		url: appendix, //下载地址接口返回
+		success: data => {
+			// console.log('打印data', data);
+			if (data.statusCode === 200) {
+				//隐藏加载框
+				// uni.hideLoading();
+				//文件保存到本地
+				uni.getFileSystemManager().saveFile({
+					tempFilePath: data.tempFilePath, //临时路径
+					success: function(res) {
+						// console.log('打印res', res);
+						uni.showToast({
+							icon: 'success',
+							mask: true,
+							title: '文件已保存:' + res.savedFilePath, //保存路径
+							title: '加载成功',
+							duration: 2000
+						});
+						//自动打开文档查看
+						setTimeout(() => {
+							var filePath = res.savedFilePath;
+							uni.openDocument({
+								//新开页面打开文档,支持格式:doc, xls, ppt, pdf, docx, xlsx, pptx。
+								filePath: filePath,
+								fileType: fileExt,
+								showMenu: false,
+								success: function(res) {
+								},
+								fail: function() {
+									uni.showToast({
+										title: '暂不支持打开此类型',
+										duration: 2000,
+										icon: 'none'
+									});
+								}
+							});
+						}, 1000);
+					}
+				});
+			}
+		},
+		fail: err => {
+			uni.showToast({
+				icon: 'none',
+				mask: true,
+				title: '文件下载失败'
+			});
+		}
+	}) // #endif
+}
+
+export function uploadFile(tempFilePaths, i, that) {
+	return new Promise((resolve, reject) => {
+		const loading = uni.showLoading({
+			title: '文件上传中...',
+			mask: true
+		});
+		uni.uploadFile({
+			url: baseUrl + '/admin-api/infra/file/upload', // 后端用于处理图片并返回图片地址及文件的接口
+			filePath: tempFilePaths[i],
+			name: 'file',
+			header: {
+				Authorization: 'Bearer ' + getAccessToken() // 请求token
+			},
+			success: res => {
+				let data = JSON.parse(res.data);
+				
+				// that.formData.attId.push(data.data)
+					that.formData.attId=['']
+					that.formData.attId[0] = data.data
+				uni.showToast({
+					title: '文件上传成功!'
+				});
+				that.loading = false
+			},
+			fail: err => {
+				uni.showToast({
+					icon: 'error',
+					title: '文件上传失败!'
+				});
+				that.loading = false
+			},
+			complete: () => {
+				uni.hideLoading(loading);
+			}
+		});
+	});
+}
+// 图片放大
+export function viewImgBig(i, imgList) {
+	uni.previewImage({
+		urls: imgList,
+		current: i
+	});
+	
 }