index.vue 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033
  1. <template>
  2. <view>
  3. <view class="content" v-if="shouye==1">
  4. <!-- 项目总览 -->
  5. <view class="projectAll">
  6. <view class="all-text">项目总览</view>
  7. <view class="all-more" @click="takeMore">查看更多</view>
  8. <view class="all-select">
  9. <view class="all-list" style="margin-left: 15rpx;" v-if="change==0">今日</view>
  10. <view class="all-list2" style="margin-left: 15rpx;" v-else @click="changeTime(0)">今日</view>
  11. <view class="all-list" style="margin-left: 25rpx;" v-if="change==1">本周</view>
  12. <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime(1)">本周</view>
  13. <view class="all-list" style="margin-left: 25rpx;" v-if="change==2">本月</view>
  14. <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime(2)">本月</view>
  15. </view>
  16. <view class="all-num">
  17. <view class="shuzi" v-for="(item,index) in allList.slice(0,5)">
  18. <view class="shu-num">{{item.num}}</view>
  19. <view>
  20. <template v-if="item.state==1">正常在办</template>
  21. <template v-if="item.state==2">预警在办</template>
  22. <template v-if="item.state==3">超时在办</template>
  23. <template v-if="item.state==4">正常办结</template>
  24. <template v-if="item.state==5">超时办结</template>
  25. <template v-if="item.state==6">项目总数</template>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- 项目列表 -->
  31. <!-- <view class="projectlist" style="height: 100%;">
  32. <view class="all-text">项目列表</view>
  33. <view class="all-cui" @click="cuiban('总的')" v-if="allcuiban==1">催办</view>
  34. <view class="all-more" style="margin: -59rpx 0 0 581rpx;" @click="takeMore">查看更多</view>
  35. <view class="all-select">
  36. <view class="all-list" style="margin-left: 15rpx;" v-if="change2==0">今日</view>
  37. <view class="all-list2" style="margin-left: 15rpx;" v-else @click="changeTime2(0)">今日</view>
  38. <view class="all-list" style="margin-left: 25rpx;" v-if="change2==1">本周</view>
  39. <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime2(1)">本周</view>
  40. <view class="all-list" style="margin-left: 25rpx;" v-if="change2==2">本月</view>
  41. <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime2(2)">本月</view>
  42. </view> -->
  43. <!-- 列表 -->
  44. <!-- <view class="projectL" v-for="(item,index) in list" :key="index" @click="XiangPro(item)">
  45. <view class="projectName">{{item.projectName}}</view>
  46. <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>
  47. <view style="margin: 10rpx 0 0 19rpx;">结束时间:{{item.endTime}}</view>
  48. <view style="margin: 20rpx 0 0 19rpx;">参与成员:{{item.coSposonerName}}</view>
  49. <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' />
  50. <view class="projectLine" v-if="list.length>=1&&(index<=list.length-1)"></view>
  51. </view>
  52. </view> -->
  53. <!-- 未完成清单 -->
  54. <view class="projectlist" style="height: 100%;">
  55. <view class="all-text">未完成清单</view>
  56. <view class="wei-title1 title1" v-if="qingdan==0">
  57. <view>问题清单</view>
  58. <view class="wei-line1"></view>
  59. </view>
  60. <view class="title1" style="rgba(0, 0, 0, 1)" v-else @click="qingQie(0)">
  61. 问题清单
  62. <view class="wei-line1" style="background: rgba(255, 255, 255, 1);"></view>
  63. </view>
  64. <view class="wei-title1 title2" v-if="qingdan==1">
  65. <view>预警清单</view>
  66. <view class="wei-line1"></view>
  67. </view>
  68. <view class="title2" style="rgba(0, 0, 0, 1)" v-else @click="qingQie(1)">
  69. 预警清单
  70. <view class="wei-line1" style="background: rgba(255, 255, 255, 1);"></view>
  71. </view>
  72. <view class="all-cui" style="margin: -35px 0 0 581rpx;" @click="cuiban('未完成')" v-if="allcuiban==1">催办</view>
  73. <view class="all-select">
  74. <view class="all-list" style="margin-left: 15rpx;" v-if="change3==0">今日</view>
  75. <view class="all-list2" style="margin-left: 15rpx;" v-else @click="changeTime3(0)">今日</view>
  76. <view class="all-list" style="margin-left: 25rpx;" v-if="change3==1">本周</view>
  77. <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime3(1)">本周</view>
  78. <view class="all-list" style="margin-left: 25rpx;" v-if="change3==2">本月</view>
  79. <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime3(2)">本月</view>
  80. </view>
  81. <!-- 未完成清单表格 -->
  82. <view style="margin: 24rpx 0 0 20rpx;width: 710rpx;">
  83. <uni-table ref="table" emptyText="暂无更多数据"
  84. style="width:710rpx;table-layout: fixed; word-wrap: break-word;">
  85. <uni-tr style="background-color: rgba(245, 246, 250, 1);color: rgba(90, 96, 127, 1);font-size: 24rpx;">
  86. <uni-th align="center">姓名</uni-th>
  87. <uni-th align="center">项目名称</uni-th>
  88. <uni-th align="center">项目任务</uni-th>
  89. <uni-th align="center">情况状态</uni-th>
  90. </uni-tr>
  91. <uni-tr v-for="(item, index) in tableNo" :key="index" style="color: rgba(0, 0, 0, 1);">
  92. <uni-td align="center">{{ item.headerName }}</uni-td>
  93. <uni-td align="center">
  94. <view class="name">{{ item.projectName }}</view>
  95. </uni-td>
  96. <uni-td align="center">{{ item.taskName }}</uni-td>
  97. <uni-td align="center">{{ item.projectLevel }}</uni-td>
  98. </uni-tr>
  99. </uni-table>
  100. </view>
  101. </view>
  102. <!-- 部门排行榜 -->
  103. <view class="projectlist" style="height: 100%;">
  104. <view class="all-text">部门排行榜</view>
  105. <view class="wei-title1 title1" v-if="bumen==0">
  106. <view>评分</view>
  107. <view class="wei-line1" style="margin: 10rpx 0 0 -8rpx;"></view>
  108. </view>
  109. <view class="title1" style="rgba(0, 0, 0, 1)" v-else @click="bumenQie(0)">
  110. 评分
  111. <view class="wei-line1" style="background: rgba(255, 255, 255, 1);"></view>
  112. </view>
  113. <view class="wei-title1 title2" v-if="bumen==1">
  114. <view>完成率</view>
  115. <view class="wei-line1" style="margin: 10rpx 0 0 4rpx;"></view>
  116. </view>
  117. <view class="title2" style="rgba(0, 0, 0, 1)" v-else @click="bumenQie(1)">
  118. 完成率
  119. <view class="wei-line1" style="background: rgba(255, 255, 255, 1);"></view>
  120. </view>
  121. <view class="all-select">
  122. <view class="all-list" style="margin-left: 15rpx;" v-if="change4==0">今日</view>
  123. <view class="all-list2" style="margin-left: 15rpx;" v-else @click="changeTime4(0)">今日</view>
  124. <view class="all-list" style="margin-left: 25rpx;" v-if="change4==1">本周</view>
  125. <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime4(1)">本周</view>
  126. <view class="all-list" style="margin-left: 25rpx;" v-if="change4==2">本月</view>
  127. <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime4(2)">本月</view>
  128. </view>
  129. <!-- 部门排行榜表格 -->
  130. <view style="margin: 24rpx 0 0 20rpx;width: 710rpx;">
  131. <uni-table ref="table" emptyText="暂无更多数据"
  132. style="width:710rpx;table-layout: fixed; word-wrap: break-word;">
  133. <uni-tr style="background-color: rgba(245, 246, 250, 1);color: rgba(90, 96, 127, 1);font-size: 24rpx;">
  134. <uni-th align="center">排行</uni-th>
  135. <uni-th align="center">部门名称</uni-th>
  136. <uni-th align="center">评分</uni-th>
  137. </uni-tr>
  138. <uni-tr v-for="(item, index) in tableData" :key="index" style="color: rgba(0, 0, 0, 1);">
  139. <uni-td align="center">{{ item.id }}</uni-td>
  140. <uni-td align="center">
  141. <view class="name">{{ item.name }}</view>
  142. </uni-td>
  143. <uni-td align="center">{{ item.num }}</uni-td>
  144. </uni-tr>
  145. </uni-table>
  146. </view>
  147. </view>
  148. <!-- 消息预警推送汇总 -->
  149. <view class="projectlist" style="height: 100%;">
  150. <view class="all-text">消息预警推送汇总</view>
  151. <view class="wei-title1 title1" v-if="yujin==0">
  152. <view>汇总</view>
  153. <view class="wei-line1" style="margin: 10rpx 0 0 -8rpx;"></view>
  154. </view>
  155. <view class="title1" style="rgba(0, 0, 0, 1)" v-else @click="yujinQie(0)">
  156. 汇总
  157. <view class="wei-line1" style="background: rgba(255, 255, 255, 1);"></view>
  158. </view>
  159. <view class="wei-title1 title2" v-if="yujin==1">
  160. <view>明细</view>
  161. <view class="wei-line1" style="margin: 10rpx 0 0 -8rpx;"></view>
  162. </view>
  163. <view class="title2" style="rgba(0, 0, 0, 1)" v-else @click="yujinQie(1)">
  164. 明细
  165. <view class="wei-line1" style="background: rgba(255, 255, 255, 1);"></view>
  166. </view>
  167. <view class="all-select">
  168. <view class="all-list" style="margin-left: 15rpx;" v-if="change5==0">今日</view>
  169. <view class="all-list2" style="margin-left: 15rpx;" v-else @click="changeTime5(0)">今日</view>
  170. <view class="all-list" style="margin-left: 25rpx;" v-if="change5==1">本周</view>
  171. <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime5(1)">本周</view>
  172. <view class="all-list" style="margin-left: 25rpx;" v-if="change5==2">本月</view>
  173. <view class="all-list2" style="margin-left: 25rpx;" v-else @click="changeTime5(2)">本月</view>
  174. </view>
  175. <!-- 汇总表格 -->
  176. <view style="margin: 24rpx 0 0 20rpx;width: 710rpx;" v-if="yujin==0">
  177. <view class="hui-kuang" v-for="(item,index) in xiaoban" :key="index">
  178. <view class="hui-left">{{item.organize}}</view>
  179. <view>
  180. <view class="hui-center">{{item.mtype}}</view>
  181. <view class="hui-center">{{item.num}}次</view>
  182. </view>
  183. <view>
  184. <view class="hui-center">预警次数</view>
  185. <view class="hui-center">{{item.num2}}次</view>
  186. </view>
  187. </view>
  188. </view>
  189. <!-- 消息预警推送汇总明细表格 -->
  190. <view style="margin: 24rpx 0 0 20rpx;width: 710rpx;" v-if="yujin==1">
  191. <uni-table ref="table" emptyText="暂无更多数据"
  192. style="width:710rpx;table-layout: fixed; word-wrap: break-word;">
  193. <uni-tr style="background-color: rgba(245, 246, 250, 1);color: rgba(90, 96, 127, 1);font-size: 24rpx;">
  194. <uni-th align="center">项目</uni-th>
  195. <uni-th align="center">任务</uni-th>
  196. <uni-th align="center">类型</uni-th>
  197. <uni-th align="center">发生时间</uni-th>
  198. <uni-th align="center">部门</uni-th>
  199. <uni-th align="center">姓名</uni-th>
  200. </uni-tr>
  201. <uni-tr v-for="(item, index) in yujinList" :key="index" style="color: rgba(0, 0, 0, 1);">
  202. <uni-td align="center">{{ item.projectName }}</uni-td>
  203. <uni-td align="center">
  204. <view class="name">{{ item.taskName }}</view>
  205. </uni-td>
  206. <uni-td align="center">{{ item.mtype }}</uni-td>
  207. <uni-td align="center">{{item.createTime}}</uni-td>
  208. <uni-td align="center">
  209. <view class="name">{{ item.organize }}</view>
  210. </uni-td>
  211. <uni-td align="center">{{ item.userName }}</uni-td>
  212. </uni-tr>
  213. </uni-table>
  214. </view>
  215. <view style="width: 100%;height:120rpx;"></view>
  216. </view>
  217. </view>
  218. <view v-if="shouye==0" class="content">
  219. <image src="../../static/img/quesheng.png" class="quesheng"></image>
  220. <view style="color: rgba(87, 146, 240, 1);">暂无内容</view>
  221. </view>
  222. </view>
  223. </template>
  224. <script>
  225. export default {
  226. data() {
  227. return {
  228. allList:[],
  229. change:0,//项目总览
  230. change2:0,//项目列表
  231. change3:0,//未完成清单
  232. change4:0,//部门排行榜
  233. bumen:0,//0评分,1完成率
  234. change5:0,//预警消息
  235. yujin:0,//0汇总,1明细
  236. list:[],
  237. qingdan:0,//未完成清单
  238. tableNo:[],//未完成清单
  239. // 部门排行榜
  240. tableData:[],
  241. // 校办
  242. xiaoban:[],
  243. yujinList:[],//预警明细
  244. nowDate:new Date().toISOString().slice(0, 10),//今日
  245. weekStart:'',//本周开始时间
  246. weekEnd:'',//本周结束时间
  247. monthStart:'',//本月开始时间
  248. monthEnd:'',//本月结束时间
  249. shouye:1,//首页
  250. allcuiban:1,//一键催办
  251. acuiban:1,//是否催办
  252. weidu:[],
  253. page:1,
  254. size:10,
  255. totalCount:0,
  256. }
  257. },
  258. onLoad() {
  259. this.getUser()
  260. this.weekStart=this.getStartDayOfWeek(this.nowDate)
  261. this.weekEnd=this.getEndDayOfWeek(this.nowDate)
  262. this.monthStart=this.getStartDayOfMonth(this.nowDate)
  263. this.monthEnd=this.getEndDayOfMonth(this.nowDate)
  264. //项目总览
  265. this.getStateLb()
  266. //项目列表
  267. // this.getList()
  268. //未完成清单
  269. this.getNoQingdan()
  270. //部门排行
  271. this.getCcoreBank()
  272. this.getWanBank()
  273. //预警
  274. this.getYujinAll()
  275. this.getYujinXi()
  276. },
  277. methods: {
  278. //查看更多项目
  279. takeMore(){
  280. uni.switchTab({
  281. url:'/pages/project/index'
  282. })
  283. },
  284. //获取个人信息
  285. getUser(){
  286. let that = this
  287. uni.showLoading({
  288. title: '加载中',
  289. mask: true, // 是否显示透明蒙层,防止触摸穿透
  290. });
  291. that.$Request.postT('/api/sysUser/queryOwn').then(res => {
  292. if (res.code==200) {
  293. uni.setStorageSync('roleId', res.data.roleId)
  294. var roleId=res.data.roleId
  295. that.getRole(roleId)
  296. console.log(uni.getStorageSync('roleId'),'数据')
  297. } else {
  298. uni.showToast({
  299. title: res.message,
  300. icon: 'none',
  301. duration:800
  302. });
  303. }
  304. uni.hideLoading();
  305. });
  306. },
  307. //查询角色权限
  308. getRole(roleId){
  309. let that = this
  310. uni.showLoading({
  311. title: '加载中',
  312. mask: true, // 是否显示透明蒙层,防止触摸穿透
  313. });
  314. var data={
  315. roleId:roleId
  316. }
  317. that.$Request.postT('/api/sysRole/queryMenuByRole',data).then(res => {
  318. if (res.code==200) {
  319. this.shouye=res.data[0].state
  320. this.allcuiban=res.data[1].menuLists[0].state
  321. this.acuiban=res.data[1].menuLists[3].state
  322. // uni.setStorageSync('roleId', res.data.roleId)
  323. console.log(uni.getStorageSync('roleId'),'数据')
  324. } else {
  325. uni.showToast({
  326. title: res.message,
  327. icon: 'none',
  328. duration:800
  329. });
  330. }
  331. uni.hideLoading();
  332. });
  333. },
  334. //项目总览
  335. //切换
  336. changeTime(a){
  337. this.change=a
  338. this.getStateLb()
  339. },
  340. //查看项目总览信息
  341. getStateLb(){
  342. this.allList=[]
  343. let that = this
  344. if(that.change==0){
  345. var time=[]
  346. time=[that.nowDate,that.nowDate+' 24:00:00']
  347. var time11=time.join(",")
  348. }else if(that.change==1){
  349. var time=[]
  350. time=[that.weekStart,that.nowDate+' 24:00:00']
  351. var time11=time.join(",")
  352. }else if(that.change==2){
  353. var time11='本月'
  354. }
  355. uni.showLoading({
  356. title: '加载中',
  357. mask: true, // 是否显示透明蒙层,防止触摸穿透
  358. });
  359. var data={
  360. "organize": null,
  361. "timeType": time11,// 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】,null全部
  362. }
  363. that.$Request.postJson('/api/sysProject/queryTjByState',data).then(res => {
  364. if (res.code==200) {
  365. console.log(res,data,'项目')
  366. this.allList=res.data
  367. } else {
  368. uni.showToast({
  369. title: res.message,
  370. icon: 'none',
  371. duration:800
  372. });
  373. }
  374. uni.hideLoading();
  375. });
  376. },
  377. //项目列表
  378. changeTime2(a){
  379. this.change2=a
  380. // this.getList()
  381. },
  382. //查看项目详情
  383. XiangPro(item){
  384. //传参对象,使用encodeURIComponent编码
  385. let str = JSON.stringify(item)
  386. //注意这里——————————————————————
  387. str = str.replace(/%/g, '%25')
  388. //这里———————————————————————————
  389. let query = encodeURIComponent(str)
  390. let t2=JSON.stringify(this.weidu)
  391. //这里———————————————————————————
  392. let query2 = encodeURIComponent(t2)
  393. uni.navigateTo({
  394. url:'/pages/project/projectX?data='+query+'&weidu='+query2
  395. })
  396. },
  397. // 催办
  398. cuiban(item){
  399. if(item=='总的'){
  400. var ids=[]
  401. this.list.map(item =>{
  402. ids.push(item.id)
  403. })
  404. var idd=ids.join(",")
  405. }else if(item=='未完成'){
  406. var ids=[]
  407. this.tableNo.map(item =>{
  408. ids.push(item.id)
  409. })
  410. var idd=ids.join(",")
  411. }else{
  412. var idd=item.id
  413. }
  414. let that = this
  415. uni.showModal({
  416. title: '提示',
  417. content: '确定催办项目吗?',
  418. success: function(res) {
  419. if (res.confirm) {
  420. console.log('用户点击确定');
  421. uni.showLoading({
  422. title: '加载中',
  423. mask: true, // 是否显示透明蒙层,防止触摸穿透
  424. });
  425. let data={
  426. projectIds:idd,
  427. }
  428. that.$Request.postT('/api/sysProject/urge',data).then(res => {
  429. if (res.code==200) {
  430. uni.showToast({
  431. title: '催办成功',
  432. icon: 'none',
  433. duration:800
  434. });
  435. setTimeout(function() {
  436. // that.getList()
  437. }, 1000)
  438. } else {
  439. uni.showToast({
  440. title: res.message,
  441. icon: 'none',
  442. duration:800
  443. });
  444. }
  445. uni.hideLoading();
  446. });
  447. } else if (res.cancel) {
  448. console.log('用户点击取消');
  449. }
  450. }
  451. })
  452. },
  453. getList(){
  454. this.list=[]
  455. this.weidu=[]
  456. let that = this
  457. if(that.change2==0){
  458. var time1=that.nowDate
  459. var time2=that.nowDate+' 24:00:00'
  460. }else if(that.change2==1){
  461. var time1=that.weekStart
  462. var time2=that.nowDate+' 24:00:00'//that.weekEnd
  463. }else if(that.change2==2){
  464. var time1=that.monthStart
  465. var time2=that.monthEnd
  466. }
  467. uni.showLoading({
  468. title: '加载中',
  469. mask: true, // 是否显示透明蒙层,防止触摸穿透
  470. });
  471. var data={
  472. "type": null, // 3我负责的、4我协办的、5创建的、6我分管的
  473. "project": {
  474. "projectName": null, // 项目名称
  475. "projectFrom": null, // 项目来源
  476. "projectLevel":null, // 项目等级
  477. "state": null, // 1、正常在办,2、预警在办,3、超时在办,4、正常办结,5、超时办结
  478. "organize": null, // 主办单位-单选
  479. "coOrganize": null, // 协办单位-多选
  480. "sposonerName": null, // 主办人
  481. "coSposonerName": null, // 协办人
  482. "scoreState": null, // 是否已评分:1已评分,0未评分,null全部
  483. "collect": null, // 是否已关注,1收藏,0未收藏,null全部
  484. "hasTask": null, // 是否有任务:1有任务,0没有认为,null全部
  485. "isScore": null // 是否我评分,1是我,0不是我,null全部
  486. },
  487. "t1": time1, // 创建开始时间
  488. "t2": time2, // 创建结束时间
  489. "t3": null, // 周期开始时间
  490. "t4": null, // 周期结束时间
  491. "t5": null, // 完成开始时间
  492. "t6": null // 完成结束时间
  493. }
  494. that.$Request.postJson('/api/sysProject/queryPage?page=1&rows=2',data).then(res => {
  495. if (res.code==200) {
  496. that.list=res.data.project.rows.slice(0,2)
  497. that.weidu=res.data.config
  498. console.log(that.list,'数据')
  499. } else {
  500. uni.showToast({
  501. title: res.message,
  502. icon: 'none',
  503. duration:800
  504. });
  505. }
  506. uni.hideLoading();
  507. });
  508. },
  509. //未完成清单
  510. changeTime3(a){
  511. this.change3=a
  512. this.getNoQingdan()
  513. },
  514. qingQie(a){
  515. this.qingdan=a
  516. this.getNoQingdan()
  517. },
  518. //未完成清单
  519. getNoQingdan(){
  520. this.tableNo=[]
  521. let that = this
  522. if(that.change3==0){
  523. var time=[]
  524. time=[that.nowDate,that.nowDate+' 24:00:00']
  525. var time11=time.join(",")
  526. }else if(that.change3==1){
  527. var time=[]
  528. time=[that.weekStart,that.nowDate+' 24:00:00']
  529. var time11=time.join(",")
  530. }else if(that.change3==2){
  531. var time=[]
  532. time=[that.monthStart,that.monthEnd]
  533. var time11=time.join(",")
  534. }
  535. if(that.qingdan==0){
  536. var wenti=1
  537. }else if(that.qingdan==1){
  538. var wenti=2
  539. }
  540. uni.showLoading({
  541. title: '加载中',
  542. mask: true, // 是否显示透明蒙层,防止触摸穿透
  543. });
  544. var data={
  545. "createBy": wenti, // 1问题清单,2预警清单
  546. "updateBy": time11,// 时间类型:
  547. }
  548. that.$Request.postJson('/api/sysTask/queryProblemAndWarmList',data).then(res => {
  549. if (res.code==200) {
  550. console.log(res,data,'项目')
  551. this.tableNo=res.data
  552. } else {
  553. uni.showToast({
  554. title: res.message,
  555. icon: 'none',
  556. duration:800
  557. });
  558. }
  559. uni.hideLoading();
  560. });
  561. },
  562. //部门评分排行榜
  563. changeTime4(a){
  564. this.change4=a
  565. if(this.bumen==0){
  566. this.getCcoreBank()
  567. }else{
  568. this.getWanBank()
  569. }
  570. },
  571. bumenQie(a){
  572. this.bumen=a
  573. if(this.bumen==0){
  574. this.getCcoreBank()
  575. }else{
  576. this.getWanBank()
  577. }
  578. },
  579. //部门评分
  580. getCcoreBank(){
  581. this.tableData=[]
  582. let that = this
  583. if(that.change4==0){
  584. var time=[]
  585. time=[that.nowDate,that.nowDate+' 24:00:00']
  586. var time11=time.join(",")
  587. }else if(that.change4==1){
  588. var time=[]
  589. time=[that.weekStart,that.nowDate+' 24:00:00']
  590. var time11=time.join(",")
  591. }else if(that.change4==2){
  592. var time11='本月'
  593. }
  594. uni.showLoading({
  595. title: '加载中',
  596. mask: true, // 是否显示透明蒙层,防止触摸穿透
  597. });
  598. var data={
  599. "organize": null,
  600. "timeType": time11,// 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】,null全部
  601. }
  602. that.$Request.postJson('/api/sysTask/queryDepartScoreBank',data).then(res => {
  603. if (res.code==200) {
  604. console.log(res,data,'项目')
  605. this.tableData=res.data
  606. } else {
  607. uni.showToast({
  608. title: res.message,
  609. icon: 'none',
  610. duration:800
  611. });
  612. }
  613. uni.hideLoading();
  614. });
  615. },
  616. //部门完成率
  617. getWanBank(){
  618. this.tableData=[]
  619. let that = this
  620. if(that.change4==0){
  621. var time=[]
  622. time=[that.nowDate,that.nowDate+' 24:00:00']
  623. var time11=time.join(",")
  624. }else if(that.change4==1){
  625. var time=[]
  626. time=[that.weekStart,that.nowDate+' 24:00:00']
  627. var time11=time.join(",")
  628. }else if(that.change4==2){
  629. var time11='本月'
  630. }
  631. uni.showLoading({
  632. title: '加载中',
  633. mask: true, // 是否显示透明蒙层,防止触摸穿透
  634. });
  635. var data={
  636. "organize": null,
  637. "timeType": time11,// 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】,null全部
  638. }
  639. that.$Request.postJson('/api/sysTask/queryDepartFinishBank',data).then(res => {
  640. if (res.code==200) {
  641. console.log(res,data,'项目')
  642. this.tableData=res.data
  643. } else {
  644. uni.showToast({
  645. title: res.message,
  646. icon: 'none',
  647. duration:800
  648. });
  649. }
  650. uni.hideLoading();
  651. });
  652. },
  653. //消息预警推送
  654. changeTime5(a){
  655. this.change5=a
  656. if(this.yujin==0){
  657. this.getYujinAll()
  658. }else{
  659. this.getYujinXi()
  660. }
  661. },
  662. yujinQie(a){
  663. this.yujin=a
  664. if(this.yujin==0){
  665. this.getYujinAll()
  666. }else{
  667. this.getYujinXi()
  668. }
  669. },
  670. //预警汇总
  671. getYujinAll(){
  672. this.xiaoban=[]
  673. let that = this
  674. if(that.change5==0){
  675. var time=[]
  676. time=[that.nowDate,that.nowDate+' 24:00:00']
  677. var time11=time.join(",")
  678. }else if(that.change5==1){
  679. var time=[]
  680. time=[that.weekStart,that.nowDate+' 24:00:00']
  681. var time11=time.join(",")
  682. }else if(that.change5==2){
  683. var time11='本月'
  684. }
  685. uni.showLoading({
  686. title: '加载中',
  687. mask: true, // 是否显示透明蒙层,防止触摸穿透
  688. });
  689. var data={
  690. "organize": null, // 主办部门
  691. "projectName": null, // 项目名称
  692. "projectFrom": null, // 项目来源
  693. "projectLevel": null, // 项目等级
  694. "state": null, // 1、正常在办,2、预警在办,3、超时在办,4、正常办结,5、超时办结
  695. "coOrganize": null, // 协办单位
  696. "sposonerName": null, // 主办人
  697. "coSposonerName": null, // 协办人
  698. "updateBy": time11 // 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】
  699. }
  700. that.$Request.postJson('/api/sysProject/queryMessageTj',data).then(res => {
  701. if (res.code==200) {
  702. console.log(res,data,'项目')
  703. this.xiaoban=res.data
  704. } else {
  705. uni.showToast({
  706. title: res.message,
  707. icon: 'none',
  708. duration:800
  709. });
  710. }
  711. uni.hideLoading();
  712. });
  713. },
  714. //预警明细
  715. getYujinXi(){
  716. // this.yujinList=[]
  717. let that = this
  718. if(that.change5==0){
  719. var time=[]
  720. time=[that.nowDate,that.nowDate+' 24:00:00']
  721. var time11=time.join(",")
  722. }else if(that.change5==1){
  723. var time=[]
  724. time=[that.weekStart,that.nowDate+' 24:00:00']
  725. var time11=time.join(",")
  726. }else if(that.change5==2){
  727. var time11='本月'
  728. }
  729. uni.showLoading({
  730. title: '加载中',
  731. mask: true, // 是否显示透明蒙层,防止触摸穿透
  732. });
  733. var data={
  734. "organize": null, // 主办部门
  735. "projectName": null, // 项目名称
  736. "projectFrom": null, // 项目来源
  737. "projectLevel": null, // 项目等级
  738. "state": null, // 1、正常在办,2、预警在办,3、超时在办,4、正常办结,5、超时办结
  739. "coOrganize": null, // 协办单位
  740. "sposonerName": null, // 主办人
  741. "coSposonerName": null, // 协办人
  742. "updateBy": time11 // 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】
  743. }
  744. that.$Request.postJson('/api/sysProject/queryMessage?page='+that.page+'&rows='+that.size,data).then(res => {
  745. if (res.code==200) {
  746. console.log(res,data,'项目')
  747. that.totalCount = res.data.total
  748. if (that.page == 1) {
  749. that.yujinList = res.data.rows
  750. } else {
  751. that.yujinList = that.yujinList.concat(res.data.rows)
  752. }
  753. } else {
  754. uni.showToast({
  755. title: res.message,
  756. icon: 'none',
  757. duration:800
  758. });
  759. }
  760. uni.hideLoading();
  761. });
  762. },
  763. // 上拉加载
  764. onReachBottom: function() {
  765. if(this.yujin==1){
  766. if(this.yujinList.length < this.totalCount){
  767. this.page = this.page + 1;
  768. this.getYujinXi()
  769. } else {
  770. uni.showToast({
  771. title: '已经最后一页啦',
  772. icon: 'none'
  773. })
  774. }
  775. }
  776. },
  777. onPullDownRefresh: function() {
  778. if(this.yujin==1){
  779. this.page = 1;
  780. this.getYujinXi()
  781. }
  782. },
  783. //获得7天前的开始时间:
  784. getStartDayOfWeek(time) {
  785. let now = new Date(time); // 当前日期
  786. let nowDayOfWeek = now.getDay(); // 今天本周的第几天
  787. let day = nowDayOfWeek || 7;
  788. let nowDay = now.getDate(); // 当前日
  789. let nowMonth = now.getMonth(); // 当前月
  790. return this.formatDate(new Date(now.getFullYear(), nowMonth, nowDay -6));
  791. },
  792. //获得本周的结束时间:
  793. getEndDayOfWeek(time) {
  794. let now = new Date(time); // 当前日期
  795. let nowDayOfWeek = now.getDay(); // 今天本周的第几天
  796. let day = nowDayOfWeek || 7;
  797. let nowDay = now.getDate(); // 当前日
  798. let nowMonth = now.getMonth(); // 当前月
  799. return this.formatDate(new Date(now.getFullYear(), nowMonth, nowDay + 7 - day));
  800. },
  801. //获得本月的开始时间:
  802. getStartDayOfMonth(time) {
  803. let now = new Date(time); // 当前日期
  804. let nowDay = now.getDate(); // 当前日
  805. let nowMonth = now.getMonth(); // 当前月
  806. return this.formatDate(new Date(now.getFullYear(), nowMonth, 1));
  807. },
  808. //获得本月的结束时间:
  809. getEndDayOfMonth(time) {
  810. let now = new Date(time); // 当前日期
  811. let nowDayOfWeek = now.getDay(); // 今天本周的第几天
  812. let day = nowDayOfWeek || 7;
  813. let nowDay = now.getDate(); // 当前日
  814. let nowMonth = now.getMonth(); // 当前月
  815. return this.formatDate(new Date(now.getFullYear(), nowMonth+1, 0));
  816. },
  817. // 日期格式化
  818. formatDate(date) {
  819. let myyear = date.getFullYear();
  820. let mymonth = date.getMonth() + 1;
  821. let myweekday = date.getDate();
  822. if (mymonth < 10) {
  823. mymonth = '0' + mymonth;
  824. }
  825. if (myweekday < 10) {
  826. myweekday = '0' + myweekday;
  827. }
  828. return (myyear + '-' + mymonth + '-' + myweekday);
  829. },
  830. }
  831. }
  832. </script>
  833. <style>
  834. .content {
  835. display: flex;
  836. flex-direction: column;
  837. align-items: center;
  838. justify-content: center;
  839. }
  840. /* 项目总览 */
  841. .projectAll{
  842. margin-top: 26rpx;
  843. width: 100%;
  844. height: 350rpx;
  845. background: #FFFFFF;
  846. }
  847. .all-text{
  848. margin: 27rpx 0 0 19rpx;
  849. font-size: 32rpx;
  850. font-weight: 500;
  851. color: rgba(0, 0, 0, 1);
  852. }
  853. .all-more{
  854. margin: -47rpx 0 0 581rpx;
  855. width: 149rpx;
  856. height: 59rpx;
  857. border-radius: 92rpx;
  858. background: #0061FF;
  859. font-size: 28rpx;
  860. color: rgba(255, 255, 255, 1);
  861. line-height: 59rpx;
  862. text-align: center;
  863. }
  864. .all-select{
  865. display: flex;
  866. margin: 31rpx 0 0 19rpx;
  867. width: 712rpx;
  868. height: 90rpx;
  869. border-radius: 7rpx;
  870. background: rgba(242, 247, 255, 1);
  871. align-items: center;
  872. }
  873. .all-list{
  874. width: 211rpx;
  875. height: 71rpx;
  876. border-radius: 7rpx;
  877. background: rgba(0, 97, 255, 0.1);
  878. border: 1rpx solid rgba(0, 97, 255, 1);
  879. font-size: 28rpx;
  880. line-height: 71rpx;
  881. color: rgba(0, 97, 255, 1);
  882. text-align: center;
  883. }
  884. .all-list2{
  885. width: 211rpx;
  886. height: 71rpx;
  887. border-radius: 7rpx;
  888. font-size: 28rpx;
  889. line-height: 71rpx;
  890. color: rgba(56, 56, 56, 1);
  891. text-align: center;
  892. }
  893. .all-num{
  894. display: flex;
  895. margin: 31rpx 0 0 19rpx;
  896. width: 712rpx;
  897. }
  898. .shuzi{
  899. width: 20%;
  900. text-align: center;
  901. font-size: 24rpx;
  902. font-weight: 400;
  903. color: rgba(128, 128, 128, 1);
  904. }
  905. .shu-num{
  906. font-size: 40rpx;
  907. color: rgba(0, 0, 0, 1);
  908. font-weight: 500;
  909. }
  910. /* 项目列表 */
  911. .projectlist{
  912. margin-top: 20rpx;
  913. width: 100%;
  914. height: 741rpx;
  915. background: #FFFFFF;
  916. }
  917. .all-cui{
  918. margin: -47rpx 0 0 412rpx;
  919. width: 149rpx;
  920. height: 59rpx;
  921. border-radius: 92rpx;
  922. border: 1rpx solid rgba(0, 97, 255, 1);
  923. font-size: 28rpx;
  924. color: rgba(0, 97, 255, 1);
  925. line-height: 59rpx;
  926. text-align: center;
  927. }
  928. /* 列表 */
  929. .projectL{
  930. margin-top: 10rpx;
  931. width: 100%;
  932. font-size: 24rpx;
  933. color: rgba(0, 0, 0, 1);
  934. }
  935. .projectName{
  936. margin: 45rpx 0 0 20rpx;
  937. font-size: 28rpx;
  938. font-weight: 500;
  939. }
  940. >>>.uni-progress-bar {
  941. border-radius: 129rpx;
  942. }
  943. >>>.uni-progress-inner-bar {
  944. border-radius: 129rpx;
  945. }
  946. >>>.uni-progress-info {
  947. margin-top: 0;
  948. margin-bottom: 0;
  949. min-width: 2em;
  950. margin-left: 15px;
  951. font-size: 24rpx;
  952. color: rgba(0, 0, 0, 1);
  953. }
  954. >>>uni-progress {
  955. width: 90%;
  956. margin: 25rpx 0 0 20rpx;
  957. }
  958. .projectLine{
  959. margin: 40rpx 0 0 20rpx;
  960. width: 711rpx;
  961. height: 1rpx;
  962. background: rgba(230, 230, 230, 1);
  963. }
  964. /* 未完成清单 */
  965. .wei-title1{
  966. color: rgba(0, 97, 255, 1);
  967. }
  968. .title1{
  969. margin: 37rpx 0 0 20rpx;
  970. font-size: 28rpx;
  971. }
  972. .title2{
  973. margin: -29px 0 0 197rpx;
  974. font-size: 28rpx;
  975. }
  976. .wei-line1{
  977. margin: 10rpx 0 0 15rpx;
  978. width: 79rpx;
  979. height: 8rpx;
  980. border-radius: 75rpx;
  981. background: rgba(0, 97, 255, 1);
  982. }
  983. >>>.uni-table[data-v-6cd49106] {
  984. position: relative;
  985. width: 710rpx;
  986. border-radius: 5px;
  987. background-color: #fff;
  988. box-sizing: border-box;
  989. display: table;
  990. /* overflow-x: inherit; */
  991. }
  992. /* 消息预警汇总表格 */
  993. .hui-kuang{
  994. display: flex;
  995. width: 710rpx;
  996. height: 120rpx;
  997. /* border: 1rpx solid rgba(215, 219, 236, 1); */
  998. font-size: 24rpx;
  999. color: rgba(90, 96, 127, 1);
  1000. }
  1001. .hui-left{
  1002. width: 171rpx;
  1003. height: 120rpx;
  1004. background: rgba(245, 246, 250, 1);
  1005. line-height: 120rpx;
  1006. text-align: center;
  1007. }
  1008. .hui-center{
  1009. width: 270rpx;
  1010. height: 60rpx;
  1011. border: 1rpx solid rgba(215, 219, 236, 1);
  1012. line-height: 60rpx;
  1013. text-align: center;
  1014. }
  1015. .quesheng{
  1016. margin-top: 300rpx;
  1017. width: 480rpx;
  1018. height: 558rpx;
  1019. }
  1020. </style>