index.vue 29 KB

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