| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031 |
- <template>
- <view>
- <view class="content" v-if="shouye==1">
- <!-- 项目总览 -->
- <view class="projectAll">
- <view class="all-text">项目总览</view>
- <view class="all-more" @click="takeMore">查看更多</view>
- <view class="all-select">
- <view class="all-list" style="margin-left: 15rpx;" v-if="change==0">今日</view>
- <view class="all-list2" style="margin-left: 15rpx;" v-else @click="changeTime(0)">今日</view>
- <view class="all-list" style="margin-left: 25rpx;" v-if="change==1">本周</view>
- <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime(1)">本周</view>
- <view class="all-list" style="margin-left: 25rpx;" v-if="change==2">本月</view>
- <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime(2)">本月</view>
- </view>
- <view class="all-num">
- <view class="shuzi" v-for="(item,index) in allList.slice(0,5)">
- <view class="shu-num">{{item.num}}</view>
- <view>
- <template v-if="item.state==1">正常在办</template>
- <template v-if="item.state==2">预警在办</template>
- <template v-if="item.state==3">超时在办</template>
- <template v-if="item.state==4">正常办结</template>
- <template v-if="item.state==5">超时办结</template>
- <template v-if="item.state==6">项目总数</template>
- </view>
- </view>
- </view>
- </view>
- <!-- 项目列表 -->
- <!-- <view class="projectlist" style="height: 100%;">
- <view class="all-text">项目列表</view>
- <view class="all-cui" @click="cuiban('总的')" v-if="allcuiban==1">催办</view>
- <view class="all-more" style="margin: -59rpx 0 0 581rpx;" @click="takeMore">查看更多</view>
- <view class="all-select">
- <view class="all-list" style="margin-left: 15rpx;" v-if="change2==0">今日</view>
- <view class="all-list2" style="margin-left: 15rpx;" v-else @click="changeTime2(0)">今日</view>
- <view class="all-list" style="margin-left: 25rpx;" v-if="change2==1">本周</view>
- <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime2(1)">本周</view>
- <view class="all-list" style="margin-left: 25rpx;" v-if="change2==2">本月</view>
- <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime2(2)">本月</view>
- </view> -->
- <!-- 列表 -->
- <!-- <view class="projectL" v-for="(item,index) in list" :key="index" @click="XiangPro(item)">
- <view class="projectName">{{item.projectName}}</view>
- <view class="all-cui" style="margin: -44rpx 0 0 581rpx;" @click.stop="cuiban(item)" v-if="(item.state==1||item.state==2||item.state==3) && acuiban==1">催办</view>
- <view style="margin: 10rpx 0 0 19rpx;">结束时间:{{item.endTime}}</view>
- <view style="margin: 20rpx 0 0 19rpx;">参与成员:{{item.coSposonerName}}</view>
- <progress v-if="item.progress!='/'" :percent="item.progress" activeColor="rgba(0, 97, 255, 1)" border-radius="50" stroke-width="12" show-info font-size='12' active='true' />
- <view class="projectLine" v-if="list.length>=1&&(index<=list.length-1)"></view>
- </view>
- </view> -->
- <!-- 未完成清单 -->
- <view class="projectlist" style="height: 100%;">
- <view class="all-text">未完成清单</view>
- <view class="wei-title1 title1" v-if="qingdan==0">
- <view>问题清单</view>
- <view class="wei-line1"></view>
- </view>
- <view class="title1" style="rgba(0, 0, 0, 1)" v-else @click="qingQie(0)">
- 问题清单
- <view class="wei-line1" style="background: rgba(255, 255, 255, 1);"></view>
- </view>
- <view class="wei-title1 title2" v-if="qingdan==1">
- <view>预警清单</view>
- <view class="wei-line1"></view>
- </view>
- <view class="title2" style="rgba(0, 0, 0, 1)" v-else @click="qingQie(1)">
- 预警清单
- <view class="wei-line1" style="background: rgba(255, 255, 255, 1);"></view>
- </view>
- <view class="all-cui" style="margin: -35px 0 0 581rpx;" @click="cuiban('未完成')" v-if="allcuiban==1">催办</view>
- <view class="all-select">
- <view class="all-list" style="margin-left: 15rpx;" v-if="change3==0">今日</view>
- <view class="all-list2" style="margin-left: 15rpx;" v-else @click="changeTime3(0)">今日</view>
- <view class="all-list" style="margin-left: 25rpx;" v-if="change3==1">本周</view>
- <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime3(1)">本周</view>
- <view class="all-list" style="margin-left: 25rpx;" v-if="change3==2">本月</view>
- <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime3(2)">本月</view>
- </view>
- <!-- 未完成清单表格 -->
- <view style="margin: 24rpx 0 0 20rpx;width: 710rpx;">
- <uni-table ref="table" emptyText="暂无更多数据"
- style="width:710rpx;table-layout: fixed; word-wrap: break-word;">
- <uni-tr style="background-color: rgba(245, 246, 250, 1);color: rgba(90, 96, 127, 1);font-size: 24rpx;">
- <uni-th align="center">姓名</uni-th>
- <uni-th align="center">项目名称</uni-th>
- <uni-th align="center">项目任务</uni-th>
- <uni-th align="center">情况状态</uni-th>
- </uni-tr>
- <uni-tr v-for="(item, index) in tableNo" :key="index" style="color: rgba(0, 0, 0, 1);">
- <uni-td align="center">{{ item.headerName }}</uni-td>
- <uni-td align="center">
- <view class="name">{{ item.projectName }}</view>
- </uni-td>
- <uni-td align="center">{{ item.taskName }}</uni-td>
- <uni-td align="center">{{ item.projectLevel }}</uni-td>
- </uni-tr>
- </uni-table>
- </view>
-
- </view>
- <!-- 部门排行榜 -->
- <view class="projectlist" style="height: 100%;">
- <view class="all-text">部门排行榜</view>
- <view class="wei-title1 title1" v-if="bumen==0">
- <view>评分</view>
- <view class="wei-line1" style="margin: 10rpx 0 0 -8rpx;"></view>
- </view>
- <view class="title1" style="rgba(0, 0, 0, 1)" v-else @click="bumenQie(0)">
- 评分
- <view class="wei-line1" style="background: rgba(255, 255, 255, 1);"></view>
- </view>
- <view class="wei-title1 title2" v-if="bumen==1">
- <view>完成率</view>
- <view class="wei-line1" style="margin: 10rpx 0 0 4rpx;"></view>
- </view>
- <view class="title2" style="rgba(0, 0, 0, 1)" v-else @click="bumenQie(1)">
- 完成率
- <view class="wei-line1" style="background: rgba(255, 255, 255, 1);"></view>
- </view>
- <view class="all-select">
- <view class="all-list" style="margin-left: 15rpx;" v-if="change4==0">今日</view>
- <view class="all-list2" style="margin-left: 15rpx;" v-else @click="changeTime4(0)">今日</view>
- <view class="all-list" style="margin-left: 25rpx;" v-if="change4==1">本周</view>
- <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime4(1)">本周</view>
- <view class="all-list" style="margin-left: 25rpx;" v-if="change4==2">本月</view>
- <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime4(2)">本月</view>
- </view>
- <!-- 部门排行榜表格 -->
- <view style="margin: 24rpx 0 0 20rpx;width: 710rpx;">
- <uni-table ref="table" emptyText="暂无更多数据"
- style="width:710rpx;table-layout: fixed; word-wrap: break-word;">
- <uni-tr style="background-color: rgba(245, 246, 250, 1);color: rgba(90, 96, 127, 1);font-size: 24rpx;">
- <uni-th align="center">排行</uni-th>
- <uni-th align="center">部门名称</uni-th>
- <uni-th align="center">评分</uni-th>
- </uni-tr>
- <uni-tr v-for="(item, index) in tableData" :key="index" style="color: rgba(0, 0, 0, 1);">
- <uni-td align="center">{{ item.id }}</uni-td>
- <uni-td align="center">
- <view class="name">{{ item.name }}</view>
- </uni-td>
- <uni-td align="center">{{ item.num }}</uni-td>
- </uni-tr>
- </uni-table>
- </view>
-
- </view>
- <!-- 消息预警推送汇总 -->
- <view class="projectlist" style="height: 100%;">
- <view class="all-text">消息预警推送汇总</view>
- <view class="wei-title1 title1" v-if="yujin==0">
- <view>汇总</view>
- <view class="wei-line1" style="margin: 10rpx 0 0 -8rpx;"></view>
- </view>
- <view class="title1" style="rgba(0, 0, 0, 1)" v-else @click="yujinQie(0)">
- 汇总
- <view class="wei-line1" style="background: rgba(255, 255, 255, 1);"></view>
- </view>
- <view class="wei-title1 title2" v-if="yujin==1">
- <view>明细</view>
- <view class="wei-line1" style="margin: 10rpx 0 0 -8rpx;"></view>
- </view>
- <view class="title2" style="rgba(0, 0, 0, 1)" v-else @click="yujinQie(1)">
- 明细
- <view class="wei-line1" style="background: rgba(255, 255, 255, 1);"></view>
- </view>
- <view class="all-select">
- <view class="all-list" style="margin-left: 15rpx;" v-if="change5==0">今日</view>
- <view class="all-list2" style="margin-left: 15rpx;" v-else @click="changeTime5(0)">今日</view>
- <view class="all-list" style="margin-left: 25rpx;" v-if="change5==1">本周</view>
- <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime5(1)">本周</view>
- <view class="all-list" style="margin-left: 25rpx;" v-if="change5==2">本月</view>
- <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime5(2)">本月</view>
- </view>
- <!-- 汇总表格 -->
- <view style="margin: 24rpx 0 0 20rpx;width: 710rpx;" v-if="yujin==0">
- <view class="hui-kuang" v-for="(item,index) in xiaoban" :key="index">
- <view class="hui-left">{{item.organize}}</view>
- <view>
- <view class="hui-center">{{item.mtype}}</view>
- <view class="hui-center">{{item.num}}次</view>
- </view>
- <view>
- <view class="hui-center">预警次数</view>
- <view class="hui-center">{{item.num2}}次</view>
- </view>
- </view>
- </view>
- <!-- 消息预警推送汇总明细表格 -->
- <view style="margin: 24rpx 0 0 20rpx;width: 710rpx;" v-if="yujin==1">
- <uni-table ref="table" emptyText="暂无更多数据"
- style="width:710rpx;table-layout: fixed; word-wrap: break-word;">
- <uni-tr style="background-color: rgba(245, 246, 250, 1);color: rgba(90, 96, 127, 1);font-size: 24rpx;">
- <uni-th align="center">项目</uni-th>
- <uni-th align="center">任务</uni-th>
- <uni-th align="center">类型</uni-th>
- <uni-th align="center">发生时间</uni-th>
- <uni-th align="center">部门</uni-th>
- <uni-th align="center">姓名</uni-th>
- </uni-tr>
- <uni-tr v-for="(item, index) in yujinList" :key="index" style="color: rgba(0, 0, 0, 1);">
- <uni-td align="center">{{ item.projectName }}</uni-td>
- <uni-td align="center">
- <view class="name">{{ item.taskName }}</view>
- </uni-td>
- <uni-td align="center">{{ item.mtype }}</uni-td>
- <uni-td align="center">{{item.createTime}}</uni-td>
- <uni-td align="center">
- <view class="name">{{ item.organize }}</view>
- </uni-td>
- <uni-td align="center">{{ item.userName }}</uni-td>
- </uni-tr>
- </uni-table>
- </view>
- <view style="width: 100%;height:120rpx;"></view>
- </view>
- </view>
- <view v-if="shouye==0" class="content">
- <image src="../../static/img/quesheng.png" class="quesheng"></image>
- <view style="color: rgba(87, 146, 240, 1);">暂无内容</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- allList:[],
- change:0,//项目总览
- change2:0,//项目列表
- change3:0,//未完成清单
- change4:0,//部门排行榜
- bumen:0,//0评分,1完成率
- change5:0,//预警消息
- yujin:0,//0汇总,1明细
- list:[],
- qingdan:0,//未完成清单
- tableNo:[],//未完成清单
- // 部门排行榜
- tableData:[],
-
- // 校办
- xiaoban:[],
- yujinList:[],//预警明细
- nowDate:new Date().toISOString().slice(0, 10),//今日
- weekStart:'',//本周开始时间
- weekEnd:'',//本周结束时间
- monthStart:'',//本月开始时间
- monthEnd:'',//本月结束时间
-
- shouye:1,//首页
- allcuiban:1,//一键催办
- acuiban:1,//是否催办
-
- weidu:[],
-
- page:1,
- size:10,
- totalCount:0,
- }
- },
- onLoad() {
- this.getUser()
- this.weekStart=this.getStartDayOfWeek(this.nowDate)
- this.weekEnd=this.getEndDayOfWeek(this.nowDate)
- this.monthStart=this.getStartDayOfMonth(this.nowDate)
- this.monthEnd=this.getEndDayOfMonth(this.nowDate)
- //项目总览
- this.getStateLb()
- //项目列表
- // this.getList()
- //未完成清单
- this.getNoQingdan()
- //部门排行
- this.getCcoreBank()
- this.getWanBank()
- //预警
- this.getYujinAll()
- this.getYujinXi()
- },
- methods: {
- //查看更多项目
- takeMore(){
- uni.switchTab({
- url:'/pages/project/index'
- })
- },
- //获取个人信息
- getUser(){
- let that = this
- uni.showLoading({
- title: '加载中',
- mask: true, // 是否显示透明蒙层,防止触摸穿透
- });
- that.$Request.postT('/api/sysUser/queryOwn').then(res => {
- if (res.code==200) {
- sessionStorage.setItem('roleId',res.data.roleId)
- var roleId=res.data.roleId
- that.getRole(roleId)
- console.log(sessionStorage.getItem("roleId"),'数据')
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration:800
- });
- }
- uni.hideLoading();
- });
- },
- //查询角色权限
- getRole(roleId){
- let that = this
- uni.showLoading({
- title: '加载中',
- mask: true, // 是否显示透明蒙层,防止触摸穿透
- });
- var data={
- roleId:roleId
- }
- that.$Request.postT('/api/sysRole/queryMenuByRole',data).then(res => {
- if (res.code==200) {
- this.shouye=res.data[0].state
- this.allcuiban=res.data[1].menuLists[0].state
- this.acuiban=res.data[1].menuLists[3].state
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration:800
- });
- }
- uni.hideLoading();
- });
- },
- //项目总览
- //切换
- changeTime(a){
- this.change=a
- this.getStateLb()
- },
- //查看项目总览信息
- getStateLb(){
- this.allList=[]
- let that = this
- if(that.change==0){
- var time=[]
- time=[that.nowDate,that.nowDate+' 24:00:00']
- var time11=time.join(",")
- }else if(that.change==1){
- var time=[]
- time=[that.weekStart,that.nowDate+' 24:00:00']
- var time11=time.join(",")
- }else if(that.change==2){
- var time11='本月'
- }
- uni.showLoading({
- title: '加载中',
- mask: true, // 是否显示透明蒙层,防止触摸穿透
- });
- var data={
- "organize": null,
- "timeType": time11,// 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】,null全部
- }
- that.$Request.postJson('/api/sysProject/queryTjByState',data).then(res => {
- if (res.code==200) {
- console.log(res,data,'项目')
- this.allList=res.data
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration:800
- });
- }
- uni.hideLoading();
- });
- },
- //项目列表
- changeTime2(a){
- this.change2=a
- // this.getList()
- },
- //查看项目详情
- XiangPro(item){
- //传参对象,使用encodeURIComponent编码
- let str = JSON.stringify(item)
- //注意这里——————————————————————
- str = str.replace(/%/g, '%25')
- //这里———————————————————————————
- let query = encodeURIComponent(str)
-
- let t2=JSON.stringify(this.weidu)
- //这里———————————————————————————
- let query2 = encodeURIComponent(t2)
- uni.navigateTo({
- url:'/pages/project/projectX?data='+query+'&weidu='+query2
- })
- },
- // 催办
- cuiban(item){
- if(item=='总的'){
- var ids=[]
- this.list.map(item =>{
- ids.push(item.id)
- })
- var idd=ids.join(",")
- }else if(item=='未完成'){
- var ids=[]
- this.tableNo.map(item =>{
- ids.push(item.id)
- })
- var idd=ids.join(",")
- }else{
- var idd=item.id
- }
- let that = this
- uni.showModal({
- title: '提示',
- content: '确定催办项目吗?',
- success: function(res) {
- if (res.confirm) {
- console.log('用户点击确定');
- uni.showLoading({
- title: '加载中',
- mask: true, // 是否显示透明蒙层,防止触摸穿透
- });
- let data={
- projectIds:idd,
- }
- that.$Request.postT('/api/sysProject/urge',data).then(res => {
- if (res.code==200) {
- uni.showToast({
- title: '催办成功',
- icon: 'none',
- duration:800
- });
- setTimeout(function() {
- // that.getList()
- }, 1000)
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration:800
- });
- }
- uni.hideLoading();
- });
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- })
- },
- getList(){
- this.list=[]
- this.weidu=[]
- let that = this
- if(that.change2==0){
- var time1=that.nowDate
- var time2=that.nowDate+' 24:00:00'
- }else if(that.change2==1){
- var time1=that.weekStart
- var time2=that.nowDate+' 24:00:00'//that.weekEnd
- }else if(that.change2==2){
- var time1=that.monthStart
- var time2=that.monthEnd
- }
- uni.showLoading({
- title: '加载中',
- mask: true, // 是否显示透明蒙层,防止触摸穿透
- });
- var data={
- "type": null, // 3我负责的、4我协办的、5创建的、6我分管的
- "project": {
- "projectName": null, // 项目名称
- "projectFrom": null, // 项目来源
- "projectLevel":null, // 项目等级
- "state": null, // 1、正常在办,2、预警在办,3、超时在办,4、正常办结,5、超时办结
- "organize": null, // 主办单位-单选
- "coOrganize": null, // 协办单位-多选
- "sposonerName": null, // 主办人
- "coSposonerName": null, // 协办人
- "scoreState": null, // 是否已评分:1已评分,0未评分,null全部
- "collect": null, // 是否已关注,1收藏,0未收藏,null全部
- "hasTask": null, // 是否有任务:1有任务,0没有认为,null全部
- "isScore": null // 是否我评分,1是我,0不是我,null全部
- },
- "t1": time1, // 创建开始时间
- "t2": time2, // 创建结束时间
- "t3": null, // 周期开始时间
- "t4": null, // 周期结束时间
- "t5": null, // 完成开始时间
- "t6": null // 完成结束时间
- }
- that.$Request.postJson('/api/sysProject/queryPage?page=1&rows=2',data).then(res => {
- if (res.code==200) {
- that.list=res.data.project.rows.slice(0,2)
- that.weidu=res.data.config
- console.log(that.list,'数据')
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration:800
- });
- }
- uni.hideLoading();
- });
- },
- //未完成清单
- changeTime3(a){
- this.change3=a
- this.getNoQingdan()
- },
- qingQie(a){
- this.qingdan=a
- this.getNoQingdan()
- },
- //未完成清单
- getNoQingdan(){
- this.tableNo=[]
- let that = this
- if(that.change3==0){
- var time=[]
- time=[that.nowDate,that.nowDate+' 24:00:00']
- var time11=time.join(",")
- }else if(that.change3==1){
- var time=[]
- time=[that.weekStart,that.nowDate+' 24:00:00']
- var time11=time.join(",")
- }else if(that.change3==2){
- var time=[]
- time=[that.monthStart,that.monthEnd]
- var time11=time.join(",")
- }
- if(that.qingdan==0){
- var wenti=1
- }else if(that.qingdan==1){
- var wenti=2
- }
- uni.showLoading({
- title: '加载中',
- mask: true, // 是否显示透明蒙层,防止触摸穿透
- });
- var data={
- "createBy": wenti, // 1问题清单,2预警清单
- "updateBy": time11,// 时间类型:
- }
- that.$Request.postJson('/api/sysTask/queryProblemAndWarmList',data).then(res => {
- if (res.code==200) {
- console.log(res,data,'项目')
- this.tableNo=res.data
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration:800
- });
- }
- uni.hideLoading();
- });
- },
- //部门评分排行榜
- changeTime4(a){
- this.change4=a
- if(this.bumen==0){
- this.getCcoreBank()
- }else{
- this.getWanBank()
- }
- },
- bumenQie(a){
- this.bumen=a
- if(this.bumen==0){
- this.getCcoreBank()
- }else{
- this.getWanBank()
- }
- },
- //部门评分
- getCcoreBank(){
- this.tableData=[]
- let that = this
- if(that.change4==0){
- var time=[]
- time=[that.nowDate,that.nowDate+' 24:00:00']
- var time11=time.join(",")
- }else if(that.change4==1){
- var time=[]
- time=[that.weekStart,that.nowDate+' 24:00:00']
- var time11=time.join(",")
- }else if(that.change4==2){
- var time11='本月'
- }
- uni.showLoading({
- title: '加载中',
- mask: true, // 是否显示透明蒙层,防止触摸穿透
- });
- var data={
- "organize": null,
- "timeType": time11,// 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】,null全部
- }
- that.$Request.postJson('/api/sysTask/queryDepartScoreBank',data).then(res => {
- if (res.code==200) {
- console.log(res,data,'项目')
- this.tableData=res.data
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration:800
- });
- }
- uni.hideLoading();
- });
- },
- //部门完成率
- getWanBank(){
- this.tableData=[]
- let that = this
- if(that.change4==0){
- var time=[]
- time=[that.nowDate,that.nowDate+' 24:00:00']
- var time11=time.join(",")
- }else if(that.change4==1){
- var time=[]
- time=[that.weekStart,that.nowDate+' 24:00:00']
- var time11=time.join(",")
- }else if(that.change4==2){
- var time11='本月'
- }
- uni.showLoading({
- title: '加载中',
- mask: true, // 是否显示透明蒙层,防止触摸穿透
- });
- var data={
- "organize": null,
- "timeType": time11,// 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】,null全部
- }
- that.$Request.postJson('/api/sysTask/queryDepartFinishBank',data).then(res => {
- if (res.code==200) {
- console.log(res,data,'项目')
- this.tableData=res.data
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration:800
- });
- }
- uni.hideLoading();
- });
- },
- //消息预警推送
- changeTime5(a){
- this.change5=a
- if(this.yujin==0){
- this.getYujinAll()
- }else{
- this.getYujinXi()
- }
- },
- yujinQie(a){
- this.yujin=a
- if(this.yujin==0){
- this.getYujinAll()
- }else{
- this.getYujinXi()
- }
- },
- //预警汇总
- getYujinAll(){
- this.xiaoban=[]
- let that = this
- if(that.change5==0){
- var time=[]
- time=[that.nowDate,that.nowDate+' 24:00:00']
- var time11=time.join(",")
- }else if(that.change5==1){
- var time=[]
- time=[that.weekStart,that.nowDate+' 24:00:00']
- var time11=time.join(",")
- }else if(that.change5==2){
- var time11='本月'
- }
- uni.showLoading({
- title: '加载中',
- mask: true, // 是否显示透明蒙层,防止触摸穿透
- });
- var data={
- "organize": null, // 主办部门
- "projectName": null, // 项目名称
- "projectFrom": null, // 项目来源
- "projectLevel": null, // 项目等级
- "state": null, // 1、正常在办,2、预警在办,3、超时在办,4、正常办结,5、超时办结
- "coOrganize": null, // 协办单位
- "sposonerName": null, // 主办人
- "coSposonerName": null, // 协办人
- "updateBy": time11 // 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】
- }
- that.$Request.postJson('/api/sysProject/queryMessageTj',data).then(res => {
- if (res.code==200) {
- console.log(res,data,'项目')
- this.xiaoban=res.data
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration:800
- });
- }
- uni.hideLoading();
- });
- },
- //预警明细
- getYujinXi(){
- // this.yujinList=[]
- let that = this
- if(that.change5==0){
- var time=[]
- time=[that.nowDate,that.nowDate+' 24:00:00']
- var time11=time.join(",")
- }else if(that.change5==1){
- var time=[]
- time=[that.weekStart,that.nowDate+' 24:00:00']
- var time11=time.join(",")
- }else if(that.change5==2){
- var time11='本月'
- }
- uni.showLoading({
- title: '加载中',
- mask: true, // 是否显示透明蒙层,防止触摸穿透
- });
- var data={
- "organize": null, // 主办部门
- "projectName": null, // 项目名称
- "projectFrom": null, // 项目来源
- "projectLevel": null, // 项目等级
- "state": null, // 1、正常在办,2、预警在办,3、超时在办,4、正常办结,5、超时办结
- "coOrganize": null, // 协办单位
- "sposonerName": null, // 主办人
- "coSposonerName": null, // 协办人
- "updateBy": time11 // 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】
- }
- that.$Request.postJson('/api/sysProject/queryMessage?page='+that.page+'&rows='+that.size,data).then(res => {
- if (res.code==200) {
- console.log(res,data,'项目')
- that.totalCount = res.data.total
- if (that.page == 1) {
- that.yujinList = res.data.rows
- } else {
- that.yujinList = that.yujinList.concat(res.data.rows)
- }
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration:800
- });
- }
- uni.hideLoading();
- });
- },
- // 上拉加载
- onReachBottom: function() {
- if(this.yujin==1){
- if(this.yujinList.length < this.totalCount){
- this.page = this.page + 1;
- this.getYujinXi()
- } else {
- uni.showToast({
- title: '已经最后一页啦',
- icon: 'none'
- })
- }
- }
-
- },
- onPullDownRefresh: function() {
- if(this.yujin==1){
- this.page = 1;
- this.getYujinXi()
- }
- },
-
- //获得7天前的开始时间:
- getStartDayOfWeek(time) {
- let now = new Date(time); // 当前日期
- let nowDayOfWeek = now.getDay(); // 今天本周的第几天
- let day = nowDayOfWeek || 7;
- let nowDay = now.getDate(); // 当前日
- let nowMonth = now.getMonth(); // 当前月
- return this.formatDate(new Date(now.getFullYear(), nowMonth, nowDay -6));
- },
- //获得本周的结束时间:
- getEndDayOfWeek(time) {
- let now = new Date(time); // 当前日期
- let nowDayOfWeek = now.getDay(); // 今天本周的第几天
- let day = nowDayOfWeek || 7;
- let nowDay = now.getDate(); // 当前日
- let nowMonth = now.getMonth(); // 当前月
- return this.formatDate(new Date(now.getFullYear(), nowMonth, nowDay + 7 - day));
- },
- //获得本月的开始时间:
- getStartDayOfMonth(time) {
- let now = new Date(time); // 当前日期
- let nowDay = now.getDate(); // 当前日
- let nowMonth = now.getMonth(); // 当前月
- return this.formatDate(new Date(now.getFullYear(), nowMonth, 1));
- },
- //获得本月的结束时间:
- getEndDayOfMonth(time) {
- let now = new Date(time); // 当前日期
- let nowDayOfWeek = now.getDay(); // 今天本周的第几天
- let day = nowDayOfWeek || 7;
- let nowDay = now.getDate(); // 当前日
- let nowMonth = now.getMonth(); // 当前月
- return this.formatDate(new Date(now.getFullYear(), nowMonth+1, 0));
- },
- // 日期格式化
- formatDate(date) {
- let myyear = date.getFullYear();
- let mymonth = date.getMonth() + 1;
- let myweekday = date.getDate();
- if (mymonth < 10) {
- mymonth = '0' + mymonth;
- }
- if (myweekday < 10) {
- myweekday = '0' + myweekday;
- }
- return (myyear + '-' + mymonth + '-' + myweekday);
- },
- }
- }
- </script>
- <style>
- .content {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- }
- /* 项目总览 */
- .projectAll{
- margin-top: 26rpx;
- width: 100%;
- height: 350rpx;
- background: #FFFFFF;
- }
- .all-text{
- margin: 27rpx 0 0 19rpx;
- font-size: 32rpx;
- font-weight: 500;
- color: rgba(0, 0, 0, 1);
- }
- .all-more{
- margin: -47rpx 0 0 581rpx;
- width: 149rpx;
- height: 59rpx;
- border-radius: 92rpx;
- background: #0061FF;
- font-size: 28rpx;
- color: rgba(255, 255, 255, 1);
- line-height: 59rpx;
- text-align: center;
- }
- .all-select{
- display: flex;
- margin: 31rpx 0 0 19rpx;
- width: 712rpx;
- height: 90rpx;
- border-radius: 7rpx;
- background: rgba(242, 247, 255, 1);
- align-items: center;
- }
- .all-list{
- width: 211rpx;
- height: 71rpx;
- border-radius: 7rpx;
- background: rgba(0, 97, 255, 0.1);
- border: 1rpx solid rgba(0, 97, 255, 1);
- font-size: 28rpx;
- line-height: 71rpx;
- color: rgba(0, 97, 255, 1);
- text-align: center;
- }
- .all-list2{
- width: 211rpx;
- height: 71rpx;
- border-radius: 7rpx;
- font-size: 28rpx;
- line-height: 71rpx;
- color: rgba(56, 56, 56, 1);
- text-align: center;
- }
- .all-num{
- display: flex;
- margin: 31rpx 0 0 19rpx;
- width: 712rpx;
- }
- .shuzi{
- width: 20%;
- text-align: center;
- font-size: 24rpx;
- font-weight: 400;
- color: rgba(128, 128, 128, 1);
- }
- .shu-num{
- font-size: 40rpx;
- color: rgba(0, 0, 0, 1);
- font-weight: 500;
- }
- /* 项目列表 */
- .projectlist{
- margin-top: 20rpx;
- width: 100%;
- height: 741rpx;
- background: #FFFFFF;
- }
- .all-cui{
- margin: -47rpx 0 0 412rpx;
- width: 149rpx;
- height: 59rpx;
- border-radius: 92rpx;
- border: 1rpx solid rgba(0, 97, 255, 1);
- font-size: 28rpx;
- color: rgba(0, 97, 255, 1);
- line-height: 59rpx;
- text-align: center;
- }
- /* 列表 */
- .projectL{
- margin-top: 10rpx;
- width: 100%;
- font-size: 24rpx;
- color: rgba(0, 0, 0, 1);
- }
- .projectName{
- margin: 45rpx 0 0 20rpx;
- font-size: 28rpx;
- font-weight: 500;
- }
- >>>.uni-progress-bar {
- border-radius: 129rpx;
- }
- >>>.uni-progress-inner-bar {
- border-radius: 129rpx;
- }
- >>>.uni-progress-info {
- margin-top: 0;
- margin-bottom: 0;
- min-width: 2em;
- margin-left: 15px;
- font-size: 24rpx;
- color: rgba(0, 0, 0, 1);
- }
- >>>uni-progress {
- width: 90%;
- margin: 25rpx 0 0 20rpx;
- }
- .projectLine{
- margin: 40rpx 0 0 20rpx;
- width: 711rpx;
- height: 1rpx;
- background: rgba(230, 230, 230, 1);
- }
- /* 未完成清单 */
- .wei-title1{
- color: rgba(0, 97, 255, 1);
- }
- .title1{
- margin: 37rpx 0 0 20rpx;
- font-size: 28rpx;
- }
- .title2{
- margin: -29px 0 0 197rpx;
- font-size: 28rpx;
- }
- .wei-line1{
- margin: 10rpx 0 0 15rpx;
- width: 79rpx;
- height: 8rpx;
- border-radius: 75rpx;
- background: rgba(0, 97, 255, 1);
- }
- >>>.uni-table[data-v-6cd49106] {
- position: relative;
- width: 710rpx;
- border-radius: 5px;
- background-color: #fff;
- box-sizing: border-box;
- display: table;
- /* overflow-x: inherit; */
- }
- /* 消息预警汇总表格 */
- .hui-kuang{
- display: flex;
- width: 710rpx;
- height: 120rpx;
- /* border: 1rpx solid rgba(215, 219, 236, 1); */
- font-size: 24rpx;
- color: rgba(90, 96, 127, 1);
- }
- .hui-left{
- width: 171rpx;
- height: 120rpx;
- background: rgba(245, 246, 250, 1);
- line-height: 120rpx;
- text-align: center;
- }
- .hui-center{
- width: 270rpx;
- height: 60rpx;
- border: 1rpx solid rgba(215, 219, 236, 1);
- line-height: 60rpx;
- text-align: center;
- }
- .quesheng{
- margin-top: 300rpx;
- width: 480rpx;
- height: 558rpx;
- }
- </style>
|