| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972 |
- <template>
- <view class="content">
- <!-- 项目总览 -->
- <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('总的')">催办</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">催办</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('未完成')">催办</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.proname1 }}</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>
- </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:'',//本月结束时间
- }
- },
- 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) {
- uni.setStorageSync('roleId', res.data.roleId)
- var roleId=res.data.roleId
- that.getRole(roleId)
- console.log(uni.getStorageSync('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').then(res => {
- if (res.code==200) {
- // uni.setStorageSync('roleId', res.data.roleId)
- console.log(uni.getStorageSync('roleId'),'数据')
- } 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.weekEnd]
- 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)
- uni.navigateTo({
- url:'/pages/project/projectX?data='+query
- })
- },
- // 催办
- 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=[]
- 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.weekEnd
- }else if(that.change2==2){
- var time1=that.monthStart
- var time2=that.monthEnd
- }
- uni.showLoading({
- title: '加载中',
- mask: true, // 是否显示透明蒙层,防止触摸穿透
- });
- var data={
- "type": null, // 1我关注的我收藏的、3我负责的、4我协办的、null
- "project": {
- "projectName": null, // 项目名称
- "projectFrom": null, // 项目来源
- "projectLevel":null, // 项目等级
- "state": null, // 1、正常在办,2、预警在办,3、超时在办,4、正常办结,5、超时办结
- "organize": null, // 主办单位-单选
- "coOrganize": null, // 协办单位-多选
- "sposonerName": null, // 主办人
- "coSposonerName": 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)
- 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.weekEnd]
- 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.weekEnd]
- 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.weekEnd]
- 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.weekEnd]
- 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.weekEnd]
- 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',data).then(res => {
- if (res.code==200) {
- console.log(res,data,'项目')
- this.yujinList=res.data
- } else {
- uni.showToast({
- title: res.message,
- icon: 'none',
- duration:800
- });
- }
- uni.hideLoading();
- });
- },
-
- //获得本周的开始时间:
- 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 + 1 - day));
- },
- //获得本周的结束时间:
- 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;
- }
- </style>
|