index.vue 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031
  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. sessionStorage.setItem('roleId',res.data.roleId)
  294. var roleId=res.data.roleId
  295. that.getRole(roleId)
  296. console.log(sessionStorage.getItem("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. } else {
  323. uni.showToast({
  324. title: res.message,
  325. icon: 'none',
  326. duration:800
  327. });
  328. }
  329. uni.hideLoading();
  330. });
  331. },
  332. //项目总览
  333. //切换
  334. changeTime(a){
  335. this.change=a
  336. this.getStateLb()
  337. },
  338. //查看项目总览信息
  339. getStateLb(){
  340. this.allList=[]
  341. let that = this
  342. if(that.change==0){
  343. var time=[]
  344. time=[that.nowDate,that.nowDate+' 24:00:00']
  345. var time11=time.join(",")
  346. }else if(that.change==1){
  347. var time=[]
  348. time=[that.weekStart,that.nowDate+' 24:00:00']
  349. var time11=time.join(",")
  350. }else if(that.change==2){
  351. var time11='本月'
  352. }
  353. uni.showLoading({
  354. title: '加载中',
  355. mask: true, // 是否显示透明蒙层,防止触摸穿透
  356. });
  357. var data={
  358. "organize": null,
  359. "timeType": time11,// 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】,null全部
  360. }
  361. that.$Request.postJson('/api/sysProject/queryTjByState',data).then(res => {
  362. if (res.code==200) {
  363. console.log(res,data,'项目')
  364. this.allList=res.data
  365. } else {
  366. uni.showToast({
  367. title: res.message,
  368. icon: 'none',
  369. duration:800
  370. });
  371. }
  372. uni.hideLoading();
  373. });
  374. },
  375. //项目列表
  376. changeTime2(a){
  377. this.change2=a
  378. // this.getList()
  379. },
  380. //查看项目详情
  381. XiangPro(item){
  382. //传参对象,使用encodeURIComponent编码
  383. let str = JSON.stringify(item)
  384. //注意这里——————————————————————
  385. str = str.replace(/%/g, '%25')
  386. //这里———————————————————————————
  387. let query = encodeURIComponent(str)
  388. let t2=JSON.stringify(this.weidu)
  389. //这里———————————————————————————
  390. let query2 = encodeURIComponent(t2)
  391. uni.navigateTo({
  392. url:'/pages/project/projectX?data='+query+'&weidu='+query2
  393. })
  394. },
  395. // 催办
  396. cuiban(item){
  397. if(item=='总的'){
  398. var ids=[]
  399. this.list.map(item =>{
  400. ids.push(item.id)
  401. })
  402. var idd=ids.join(",")
  403. }else if(item=='未完成'){
  404. var ids=[]
  405. this.tableNo.map(item =>{
  406. ids.push(item.id)
  407. })
  408. var idd=ids.join(",")
  409. }else{
  410. var idd=item.id
  411. }
  412. let that = this
  413. uni.showModal({
  414. title: '提示',
  415. content: '确定催办项目吗?',
  416. success: function(res) {
  417. if (res.confirm) {
  418. console.log('用户点击确定');
  419. uni.showLoading({
  420. title: '加载中',
  421. mask: true, // 是否显示透明蒙层,防止触摸穿透
  422. });
  423. let data={
  424. projectIds:idd,
  425. }
  426. that.$Request.postT('/api/sysProject/urge',data).then(res => {
  427. if (res.code==200) {
  428. uni.showToast({
  429. title: '催办成功',
  430. icon: 'none',
  431. duration:800
  432. });
  433. setTimeout(function() {
  434. // that.getList()
  435. }, 1000)
  436. } else {
  437. uni.showToast({
  438. title: res.message,
  439. icon: 'none',
  440. duration:800
  441. });
  442. }
  443. uni.hideLoading();
  444. });
  445. } else if (res.cancel) {
  446. console.log('用户点击取消');
  447. }
  448. }
  449. })
  450. },
  451. getList(){
  452. this.list=[]
  453. this.weidu=[]
  454. let that = this
  455. if(that.change2==0){
  456. var time1=that.nowDate
  457. var time2=that.nowDate+' 24:00:00'
  458. }else if(that.change2==1){
  459. var time1=that.weekStart
  460. var time2=that.nowDate+' 24:00:00'//that.weekEnd
  461. }else if(that.change2==2){
  462. var time1=that.monthStart
  463. var time2=that.monthEnd
  464. }
  465. uni.showLoading({
  466. title: '加载中',
  467. mask: true, // 是否显示透明蒙层,防止触摸穿透
  468. });
  469. var data={
  470. "type": null, // 3我负责的、4我协办的、5创建的、6我分管的
  471. "project": {
  472. "projectName": null, // 项目名称
  473. "projectFrom": null, // 项目来源
  474. "projectLevel":null, // 项目等级
  475. "state": null, // 1、正常在办,2、预警在办,3、超时在办,4、正常办结,5、超时办结
  476. "organize": null, // 主办单位-单选
  477. "coOrganize": null, // 协办单位-多选
  478. "sposonerName": null, // 主办人
  479. "coSposonerName": null, // 协办人
  480. "scoreState": null, // 是否已评分:1已评分,0未评分,null全部
  481. "collect": null, // 是否已关注,1收藏,0未收藏,null全部
  482. "hasTask": null, // 是否有任务:1有任务,0没有认为,null全部
  483. "isScore": null // 是否我评分,1是我,0不是我,null全部
  484. },
  485. "t1": time1, // 创建开始时间
  486. "t2": time2, // 创建结束时间
  487. "t3": null, // 周期开始时间
  488. "t4": null, // 周期结束时间
  489. "t5": null, // 完成开始时间
  490. "t6": null // 完成结束时间
  491. }
  492. that.$Request.postJson('/api/sysProject/queryPage?page=1&rows=2',data).then(res => {
  493. if (res.code==200) {
  494. that.list=res.data.project.rows.slice(0,2)
  495. that.weidu=res.data.config
  496. console.log(that.list,'数据')
  497. } else {
  498. uni.showToast({
  499. title: res.message,
  500. icon: 'none',
  501. duration:800
  502. });
  503. }
  504. uni.hideLoading();
  505. });
  506. },
  507. //未完成清单
  508. changeTime3(a){
  509. this.change3=a
  510. this.getNoQingdan()
  511. },
  512. qingQie(a){
  513. this.qingdan=a
  514. this.getNoQingdan()
  515. },
  516. //未完成清单
  517. getNoQingdan(){
  518. this.tableNo=[]
  519. let that = this
  520. if(that.change3==0){
  521. var time=[]
  522. time=[that.nowDate,that.nowDate+' 24:00:00']
  523. var time11=time.join(",")
  524. }else if(that.change3==1){
  525. var time=[]
  526. time=[that.weekStart,that.nowDate+' 24:00:00']
  527. var time11=time.join(",")
  528. }else if(that.change3==2){
  529. var time=[]
  530. time=[that.monthStart,that.monthEnd]
  531. var time11=time.join(",")
  532. }
  533. if(that.qingdan==0){
  534. var wenti=1
  535. }else if(that.qingdan==1){
  536. var wenti=2
  537. }
  538. uni.showLoading({
  539. title: '加载中',
  540. mask: true, // 是否显示透明蒙层,防止触摸穿透
  541. });
  542. var data={
  543. "createBy": wenti, // 1问题清单,2预警清单
  544. "updateBy": time11,// 时间类型:
  545. }
  546. that.$Request.postJson('/api/sysTask/queryProblemAndWarmList',data).then(res => {
  547. if (res.code==200) {
  548. console.log(res,data,'项目')
  549. this.tableNo=res.data
  550. } else {
  551. uni.showToast({
  552. title: res.message,
  553. icon: 'none',
  554. duration:800
  555. });
  556. }
  557. uni.hideLoading();
  558. });
  559. },
  560. //部门评分排行榜
  561. changeTime4(a){
  562. this.change4=a
  563. if(this.bumen==0){
  564. this.getCcoreBank()
  565. }else{
  566. this.getWanBank()
  567. }
  568. },
  569. bumenQie(a){
  570. this.bumen=a
  571. if(this.bumen==0){
  572. this.getCcoreBank()
  573. }else{
  574. this.getWanBank()
  575. }
  576. },
  577. //部门评分
  578. getCcoreBank(){
  579. this.tableData=[]
  580. let that = this
  581. if(that.change4==0){
  582. var time=[]
  583. time=[that.nowDate,that.nowDate+' 24:00:00']
  584. var time11=time.join(",")
  585. }else if(that.change4==1){
  586. var time=[]
  587. time=[that.weekStart,that.nowDate+' 24:00:00']
  588. var time11=time.join(",")
  589. }else if(that.change4==2){
  590. var time11='本月'
  591. }
  592. uni.showLoading({
  593. title: '加载中',
  594. mask: true, // 是否显示透明蒙层,防止触摸穿透
  595. });
  596. var data={
  597. "organize": null,
  598. "timeType": time11,// 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】,null全部
  599. }
  600. that.$Request.postJson('/api/sysTask/queryDepartScoreBank',data).then(res => {
  601. if (res.code==200) {
  602. console.log(res,data,'项目')
  603. this.tableData=res.data
  604. } else {
  605. uni.showToast({
  606. title: res.message,
  607. icon: 'none',
  608. duration:800
  609. });
  610. }
  611. uni.hideLoading();
  612. });
  613. },
  614. //部门完成率
  615. getWanBank(){
  616. this.tableData=[]
  617. let that = this
  618. if(that.change4==0){
  619. var time=[]
  620. time=[that.nowDate,that.nowDate+' 24:00:00']
  621. var time11=time.join(",")
  622. }else if(that.change4==1){
  623. var time=[]
  624. time=[that.weekStart,that.nowDate+' 24:00:00']
  625. var time11=time.join(",")
  626. }else if(that.change4==2){
  627. var time11='本月'
  628. }
  629. uni.showLoading({
  630. title: '加载中',
  631. mask: true, // 是否显示透明蒙层,防止触摸穿透
  632. });
  633. var data={
  634. "organize": null,
  635. "timeType": time11,// 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】,null全部
  636. }
  637. that.$Request.postJson('/api/sysTask/queryDepartFinishBank',data).then(res => {
  638. if (res.code==200) {
  639. console.log(res,data,'项目')
  640. this.tableData=res.data
  641. } else {
  642. uni.showToast({
  643. title: res.message,
  644. icon: 'none',
  645. duration:800
  646. });
  647. }
  648. uni.hideLoading();
  649. });
  650. },
  651. //消息预警推送
  652. changeTime5(a){
  653. this.change5=a
  654. if(this.yujin==0){
  655. this.getYujinAll()
  656. }else{
  657. this.getYujinXi()
  658. }
  659. },
  660. yujinQie(a){
  661. this.yujin=a
  662. if(this.yujin==0){
  663. this.getYujinAll()
  664. }else{
  665. this.getYujinXi()
  666. }
  667. },
  668. //预警汇总
  669. getYujinAll(){
  670. this.xiaoban=[]
  671. let that = this
  672. if(that.change5==0){
  673. var time=[]
  674. time=[that.nowDate,that.nowDate+' 24:00:00']
  675. var time11=time.join(",")
  676. }else if(that.change5==1){
  677. var time=[]
  678. time=[that.weekStart,that.nowDate+' 24:00:00']
  679. var time11=time.join(",")
  680. }else if(that.change5==2){
  681. var time11='本月'
  682. }
  683. uni.showLoading({
  684. title: '加载中',
  685. mask: true, // 是否显示透明蒙层,防止触摸穿透
  686. });
  687. var data={
  688. "organize": null, // 主办部门
  689. "projectName": null, // 项目名称
  690. "projectFrom": null, // 项目来源
  691. "projectLevel": null, // 项目等级
  692. "state": null, // 1、正常在办,2、预警在办,3、超时在办,4、正常办结,5、超时办结
  693. "coOrganize": null, // 协办单位
  694. "sposonerName": null, // 主办人
  695. "coSposonerName": null, // 协办人
  696. "updateBy": time11 // 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】
  697. }
  698. that.$Request.postJson('/api/sysProject/queryMessageTj',data).then(res => {
  699. if (res.code==200) {
  700. console.log(res,data,'项目')
  701. this.xiaoban=res.data
  702. } else {
  703. uni.showToast({
  704. title: res.message,
  705. icon: 'none',
  706. duration:800
  707. });
  708. }
  709. uni.hideLoading();
  710. });
  711. },
  712. //预警明细
  713. getYujinXi(){
  714. // this.yujinList=[]
  715. let that = this
  716. if(that.change5==0){
  717. var time=[]
  718. time=[that.nowDate,that.nowDate+' 24:00:00']
  719. var time11=time.join(",")
  720. }else if(that.change5==1){
  721. var time=[]
  722. time=[that.weekStart,that.nowDate+' 24:00:00']
  723. var time11=time.join(",")
  724. }else if(that.change5==2){
  725. var time11='本月'
  726. }
  727. uni.showLoading({
  728. title: '加载中',
  729. mask: true, // 是否显示透明蒙层,防止触摸穿透
  730. });
  731. var data={
  732. "organize": null, // 主办部门
  733. "projectName": null, // 项目名称
  734. "projectFrom": null, // 项目来源
  735. "projectLevel": null, // 项目等级
  736. "state": null, // 1、正常在办,2、预警在办,3、超时在办,4、正常办结,5、超时办结
  737. "coOrganize": null, // 协办单位
  738. "sposonerName": null, // 主办人
  739. "coSposonerName": null, // 协办人
  740. "updateBy": time11 // 时间类型:有:【最近7日】,【本月】,【本季度】,【2024-12-01,2024-12-30】
  741. }
  742. that.$Request.postJson('/api/sysProject/queryMessage?page='+that.page+'&rows='+that.size,data).then(res => {
  743. if (res.code==200) {
  744. console.log(res,data,'项目')
  745. that.totalCount = res.data.total
  746. if (that.page == 1) {
  747. that.yujinList = res.data.rows
  748. } else {
  749. that.yujinList = that.yujinList.concat(res.data.rows)
  750. }
  751. } else {
  752. uni.showToast({
  753. title: res.message,
  754. icon: 'none',
  755. duration:800
  756. });
  757. }
  758. uni.hideLoading();
  759. });
  760. },
  761. // 上拉加载
  762. onReachBottom: function() {
  763. if(this.yujin==1){
  764. if(this.yujinList.length < this.totalCount){
  765. this.page = this.page + 1;
  766. this.getYujinXi()
  767. } else {
  768. uni.showToast({
  769. title: '已经最后一页啦',
  770. icon: 'none'
  771. })
  772. }
  773. }
  774. },
  775. onPullDownRefresh: function() {
  776. if(this.yujin==1){
  777. this.page = 1;
  778. this.getYujinXi()
  779. }
  780. },
  781. //获得7天前的开始时间:
  782. getStartDayOfWeek(time) {
  783. let now = new Date(time); // 当前日期
  784. let nowDayOfWeek = now.getDay(); // 今天本周的第几天
  785. let day = nowDayOfWeek || 7;
  786. let nowDay = now.getDate(); // 当前日
  787. let nowMonth = now.getMonth(); // 当前月
  788. return this.formatDate(new Date(now.getFullYear(), nowMonth, nowDay -6));
  789. },
  790. //获得本周的结束时间:
  791. getEndDayOfWeek(time) {
  792. let now = new Date(time); // 当前日期
  793. let nowDayOfWeek = now.getDay(); // 今天本周的第几天
  794. let day = nowDayOfWeek || 7;
  795. let nowDay = now.getDate(); // 当前日
  796. let nowMonth = now.getMonth(); // 当前月
  797. return this.formatDate(new Date(now.getFullYear(), nowMonth, nowDay + 7 - day));
  798. },
  799. //获得本月的开始时间:
  800. getStartDayOfMonth(time) {
  801. let now = new Date(time); // 当前日期
  802. let nowDay = now.getDate(); // 当前日
  803. let nowMonth = now.getMonth(); // 当前月
  804. return this.formatDate(new Date(now.getFullYear(), nowMonth, 1));
  805. },
  806. //获得本月的结束时间:
  807. getEndDayOfMonth(time) {
  808. let now = new Date(time); // 当前日期
  809. let nowDayOfWeek = now.getDay(); // 今天本周的第几天
  810. let day = nowDayOfWeek || 7;
  811. let nowDay = now.getDate(); // 当前日
  812. let nowMonth = now.getMonth(); // 当前月
  813. return this.formatDate(new Date(now.getFullYear(), nowMonth+1, 0));
  814. },
  815. // 日期格式化
  816. formatDate(date) {
  817. let myyear = date.getFullYear();
  818. let mymonth = date.getMonth() + 1;
  819. let myweekday = date.getDate();
  820. if (mymonth < 10) {
  821. mymonth = '0' + mymonth;
  822. }
  823. if (myweekday < 10) {
  824. myweekday = '0' + myweekday;
  825. }
  826. return (myyear + '-' + mymonth + '-' + myweekday);
  827. },
  828. }
  829. }
  830. </script>
  831. <style>
  832. .content {
  833. display: flex;
  834. flex-direction: column;
  835. align-items: center;
  836. justify-content: center;
  837. }
  838. /* 项目总览 */
  839. .projectAll{
  840. margin-top: 26rpx;
  841. width: 100%;
  842. height: 350rpx;
  843. background: #FFFFFF;
  844. }
  845. .all-text{
  846. margin: 27rpx 0 0 19rpx;
  847. font-size: 32rpx;
  848. font-weight: 500;
  849. color: rgba(0, 0, 0, 1);
  850. }
  851. .all-more{
  852. margin: -47rpx 0 0 581rpx;
  853. width: 149rpx;
  854. height: 59rpx;
  855. border-radius: 92rpx;
  856. background: #0061FF;
  857. font-size: 28rpx;
  858. color: rgba(255, 255, 255, 1);
  859. line-height: 59rpx;
  860. text-align: center;
  861. }
  862. .all-select{
  863. display: flex;
  864. margin: 31rpx 0 0 19rpx;
  865. width: 712rpx;
  866. height: 90rpx;
  867. border-radius: 7rpx;
  868. background: rgba(242, 247, 255, 1);
  869. align-items: center;
  870. }
  871. .all-list{
  872. width: 211rpx;
  873. height: 71rpx;
  874. border-radius: 7rpx;
  875. background: rgba(0, 97, 255, 0.1);
  876. border: 1rpx solid rgba(0, 97, 255, 1);
  877. font-size: 28rpx;
  878. line-height: 71rpx;
  879. color: rgba(0, 97, 255, 1);
  880. text-align: center;
  881. }
  882. .all-list2{
  883. width: 211rpx;
  884. height: 71rpx;
  885. border-radius: 7rpx;
  886. font-size: 28rpx;
  887. line-height: 71rpx;
  888. color: rgba(56, 56, 56, 1);
  889. text-align: center;
  890. }
  891. .all-num{
  892. display: flex;
  893. margin: 31rpx 0 0 19rpx;
  894. width: 712rpx;
  895. }
  896. .shuzi{
  897. width: 20%;
  898. text-align: center;
  899. font-size: 24rpx;
  900. font-weight: 400;
  901. color: rgba(128, 128, 128, 1);
  902. }
  903. .shu-num{
  904. font-size: 40rpx;
  905. color: rgba(0, 0, 0, 1);
  906. font-weight: 500;
  907. }
  908. /* 项目列表 */
  909. .projectlist{
  910. margin-top: 20rpx;
  911. width: 100%;
  912. height: 741rpx;
  913. background: #FFFFFF;
  914. }
  915. .all-cui{
  916. margin: -47rpx 0 0 412rpx;
  917. width: 149rpx;
  918. height: 59rpx;
  919. border-radius: 92rpx;
  920. border: 1rpx solid rgba(0, 97, 255, 1);
  921. font-size: 28rpx;
  922. color: rgba(0, 97, 255, 1);
  923. line-height: 59rpx;
  924. text-align: center;
  925. }
  926. /* 列表 */
  927. .projectL{
  928. margin-top: 10rpx;
  929. width: 100%;
  930. font-size: 24rpx;
  931. color: rgba(0, 0, 0, 1);
  932. }
  933. .projectName{
  934. margin: 45rpx 0 0 20rpx;
  935. font-size: 28rpx;
  936. font-weight: 500;
  937. }
  938. >>>.uni-progress-bar {
  939. border-radius: 129rpx;
  940. }
  941. >>>.uni-progress-inner-bar {
  942. border-radius: 129rpx;
  943. }
  944. >>>.uni-progress-info {
  945. margin-top: 0;
  946. margin-bottom: 0;
  947. min-width: 2em;
  948. margin-left: 15px;
  949. font-size: 24rpx;
  950. color: rgba(0, 0, 0, 1);
  951. }
  952. >>>uni-progress {
  953. width: 90%;
  954. margin: 25rpx 0 0 20rpx;
  955. }
  956. .projectLine{
  957. margin: 40rpx 0 0 20rpx;
  958. width: 711rpx;
  959. height: 1rpx;
  960. background: rgba(230, 230, 230, 1);
  961. }
  962. /* 未完成清单 */
  963. .wei-title1{
  964. color: rgba(0, 97, 255, 1);
  965. }
  966. .title1{
  967. margin: 37rpx 0 0 20rpx;
  968. font-size: 28rpx;
  969. }
  970. .title2{
  971. margin: -29px 0 0 197rpx;
  972. font-size: 28rpx;
  973. }
  974. .wei-line1{
  975. margin: 10rpx 0 0 15rpx;
  976. width: 79rpx;
  977. height: 8rpx;
  978. border-radius: 75rpx;
  979. background: rgba(0, 97, 255, 1);
  980. }
  981. >>>.uni-table[data-v-6cd49106] {
  982. position: relative;
  983. width: 710rpx;
  984. border-radius: 5px;
  985. background-color: #fff;
  986. box-sizing: border-box;
  987. display: table;
  988. /* overflow-x: inherit; */
  989. }
  990. /* 消息预警汇总表格 */
  991. .hui-kuang{
  992. display: flex;
  993. width: 710rpx;
  994. height: 120rpx;
  995. /* border: 1rpx solid rgba(215, 219, 236, 1); */
  996. font-size: 24rpx;
  997. color: rgba(90, 96, 127, 1);
  998. }
  999. .hui-left{
  1000. width: 171rpx;
  1001. height: 120rpx;
  1002. background: rgba(245, 246, 250, 1);
  1003. line-height: 120rpx;
  1004. text-align: center;
  1005. }
  1006. .hui-center{
  1007. width: 270rpx;
  1008. height: 60rpx;
  1009. border: 1rpx solid rgba(215, 219, 236, 1);
  1010. line-height: 60rpx;
  1011. text-align: center;
  1012. }
  1013. .quesheng{
  1014. margin-top: 300rpx;
  1015. width: 480rpx;
  1016. height: 558rpx;
  1017. }
  1018. </style>