index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. <template>
  2. <view class="count">
  3. <view class="zhanline"></view>
  4. <view class="countbox" v-if="checkPermi(['fgw:common:xmztgk'])">
  5. <view class="flexc mb16">
  6. <view class="titline"></view>
  7. <view class="f17 c34 fw">项目整体概况</view>
  8. </view>
  9. <view class="ct_num">
  10. <view class="ct_numa">
  11. <view class="count_cir bg1"></view>
  12. <view class="ct_numb">
  13. <view class="tit">项目库总数(个)</view>
  14. <view class="f22 fw zco3c">{{census.xmzs||0}}</view>
  15. </view>
  16. </view>
  17. <!-- <view class="ct_numa">
  18. <view class="count_cir bg2"></view>
  19. <view class="ct_numb">
  20. <view class="tit">已开工项目数(个)</view>
  21. <view class="f22 fw zco1d">156</view>
  22. </view>
  23. </view>
  24. <view class="ct_numa">
  25. <view class="count_cir bg3"></view>
  26. <view class="ct_numb">
  27. <view class="tit">开工率(%)</view>
  28. <view class="f22 fw zcod3">156</view>
  29. </view>
  30. </view> -->
  31. <view class="ct_numa">
  32. <view class="count_cir bg2"></view>
  33. <view class="ct_numb">
  34. <view class="tit">项目总投资(万元)</view>
  35. <view class="f22 fw zco1d">{{census.xmztz||0}}</view>
  36. </view>
  37. </view>
  38. <view class="ct_numa">
  39. <view class="count_cir bg3"></view>
  40. <view class="ct_numb">
  41. <view class="tit">年度计划投资(万元)</view>
  42. <view class="f22 fw zcod3">{{census.jstz||0}}</view>
  43. </view>
  44. </view>
  45. <view class="ct_numa">
  46. <view class="count_cir bg4"></view>
  47. <view class="ct_numb">
  48. <view class="tit">纳统项目完成投资(万元)</view>
  49. <view class="f22 fw zcof5">{{census.nttz||0}}</view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="ct_btn">
  54. <view class="ct_btna bg1" @click="toQsFn">
  55. <image :src="qsimg" class="limg"></image>
  56. <view class="tit">全市投资完成情况</view>
  57. <image :src="rimg" class="rimg"></image>
  58. </view>
  59. <view class="ct_btna bg2" @click="toXmFn">
  60. <image :src="xmimg" class="limg imga"></image>
  61. <view class="tit">项目产业进展情况</view>
  62. <image :src="rimg" class="rimg"></image>
  63. </view>
  64. </view>
  65. </view>
  66. <view class="border"></view>
  67. <!-- 本周进度 -->
  68. <view class="countbox" v-if="checkPermi(['fgw:common:hbjd'])">
  69. <view class="mb16 flexcj">
  70. <view class="flexc flex0">
  71. <view class="titline"></view>
  72. <view class="f17 c34 fw">本月汇报进度</view>
  73. </view>
  74. <view class='flexc home_morer' @click="getMoreFn">查看更多
  75. <image :src="mrimg"></image>
  76. </view>
  77. </view>
  78. <!-- -->
  79. <view class="charta">
  80. <view class="chartal">
  81. <qiun-data-charts type="arcbar" :chartData="chartDataa" :opts="optsa" :ontouch="true"></qiun-data-charts>
  82. </view>
  83. <view class="chartar">
  84. <view class="f15 fw c34 mb12">未汇报项目<text class="zcofc">{{hbjdcensus.whb}}</text>个</view>
  85. <view class="f15 fw c34 mb16">已汇报项目<text class="zco1d">{{hbjdcensus.yhb}}</text>个</view>
  86. <view class="chartar_btn" v-if="checkPermi(['fgw:sytj:sycb'])" @click="getCuiFn">一键催报</view>
  87. </view>
  88. </view>
  89. </view>
  90. <!-- 问题类型统计 -->
  91. <!-- <view class="border"></view> -->
  92. <!-- <view class="countbox">
  93. <view class="mb16 flexcj">
  94. <view class="flexc flex0">
  95. <view class="titline"></view>
  96. <view class="f17 c34 fw">问题类型统计</view>
  97. </view>
  98. </view>
  99. <view class="chartb">
  100. <qiun-data-charts type="pie" :chartData="chartDatab" :opts='optsb'></qiun-data-charts>
  101. <view class="ct_num chartbf">
  102. <view class="ct_numa">
  103. <view class="count_cir bg7"></view>
  104. <view class="ct_numb">
  105. <view class="tit">环保问题</view>
  106. <view class="f22 fw zcobg7">12</view>
  107. </view>
  108. </view>
  109. <view class="ct_numa">
  110. <view class="count_cir bg8"></view>
  111. <view class="ct_numb">
  112. <view class="tit">土地问题</view>
  113. <view class="f22 fw zcobg8">12</view>
  114. </view>
  115. </view>
  116. <view class="ct_numa">
  117. <view class="count_cir bg9"></view>
  118. <view class="ct_numb">
  119. <view class="tit">其它问题</view>
  120. <view class="f22 fw zcobg9">12</view>
  121. </view>
  122. </view>
  123. <view class="ct_numa">
  124. <view class="count_cir bg10"></view>
  125. <view class="ct_numb">
  126. <view class="tit">投资问题</view>
  127. <view class="f22 fw zcobg10">12</view>
  128. </view>
  129. </view>
  130. <view class="ct_numa">
  131. <view class="count_cir bg11"></view>
  132. <view class="ct_numb">
  133. <view class="tit">土地问题</view>
  134. <view class="f22 fw zcobg7">12</view>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. </view> -->
  140. <footers v-if="isfootflag" :footlist="footlist" :footerindex="footerindex" :color_checked="color_checked" :color_nochecked="color_nochecked" :isHomeIndex="true"></footers>
  141. </view>
  142. </template>
  143. <script>
  144. import footers from '@/components/footer/footer.vue'
  145. import {getCommonxmztgk,getCommonhbjd,getjdapsycb} from "@/api/zdwork/index.js"
  146. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  147. export default{
  148. components:{footers},
  149. data(){
  150. return{
  151. footlist:[
  152. {module:'zdhome',title:'首页',icon_checked:require('@/static/images/new/tabbar/home_.png'),icon_nochecked:require('@/static/images/new/tabbar/home.png')},
  153. {module:'zdcount',title:'统计分析',icon_checked:require('@/static/images/new/tabbar/tong_.png'),icon_nochecked:require('@/static/images/new/tabbar/tong.png')},
  154. {module:'zdmine',title:'我的',icon_checked:require('@/static/images/new/tabbar/mine_.png'),icon_nochecked:require('@/static/images/new/tabbar/mine.png')},
  155. ],
  156. footerindex:'zdcount',
  157. showfooter: 0,
  158. isfootflag:true,
  159. color_checked :'FA5F03',
  160. color_nochecked :'666666',
  161. qsimg:require("@/static/images/new/index/qsicon.png"),
  162. xmimg:require("@/static/images/new/index/xcicon.png"),
  163. rimg:require("@/static/images/mine/rimg.png"),
  164. mrimg:require("@/static/images/index/mrore.png") ,
  165. census:{},
  166. hbjdcensus:{},
  167. optsa: {
  168. padding: undefined,
  169. title: {},
  170. // 副标题
  171. subtitle: {name: "",},
  172. extra: {
  173. arcbar: {
  174. type: "circle",
  175. width: 16,
  176. backgroundColor: "#E9E9E9",
  177. startAngle: 1.5,
  178. endAngle: 0.25,
  179. gap: 2
  180. }
  181. }
  182. },
  183. chartDataa:{
  184. "categories": [],
  185. "series": [],
  186. "enableScroll":false
  187. },
  188. chartDatab:{
  189. series: [
  190. {
  191. data: [{"name":"环保问题","value":50},{"name":"土地问题","value":30},{"name":"其它问题","value":20},{"name":"投资问题","value":18},{"name":"土地问题","value":8}]
  192. }
  193. ]
  194. },
  195. optsb: {
  196. color: ["#50A0FF","#60CB6D","#E76677","#F69702","#975FEF",],
  197. fontSize:15,
  198. extra: {
  199. pie:{
  200. border: false,
  201. }
  202. },
  203. legend:{
  204. show: false,
  205. }
  206. },
  207. }
  208. },
  209. onLoad() {
  210. this.init()
  211. },
  212. methods:{
  213. checkPermi, checkRole,
  214. init(){
  215. this.getCommonxmztgk();
  216. this.getCommonhbjd()
  217. },
  218. getCommonxmztgk(){
  219. if(checkPermi(['fgw:common:xmztgk'])){
  220. getCommonxmztgk().then(res=>{
  221. if(res.code==200){
  222. this.census=res.data
  223. }else{
  224. this.$toast(res.msg)
  225. }
  226. })
  227. }
  228. },
  229. getCommonhbjd(){
  230. if(checkPermi(['fgw:common:hbjd'])){
  231. getCommonhbjd().then(res=>{
  232. if(res.code==200){
  233. this.hbjdcensus=res.data;
  234. // 计算百分比
  235. var a=Number(res.data.yhb);
  236. var b=Number(res.data.whb)
  237. var total=Number(a)+Number(b)
  238. var num=a/total
  239. var nums=Number(num.toFixed(2))
  240. var s=Math.round((a / total) * 100) + '%';
  241. if(total==0){
  242. s=0
  243. }
  244. var series=[{
  245. "name": "汇报率",
  246. "color": "#FC4D00",
  247. "data": nums
  248. }]
  249. var title= {
  250. name: s,
  251. fontSize: 30,
  252. color: "#FC4D00"
  253. }
  254. this.chartDataa.series=JSON.parse(JSON.stringify(series));
  255. this.optsa.title=JSON.parse(JSON.stringify(title));
  256. // 重置图标
  257. }else{
  258. this.$toast(res.msg)
  259. }
  260. })
  261. }
  262. },
  263. getCuiFn(){
  264. var that=this;
  265. var str='催报';
  266. uni.showModal({
  267. title: '确认'+str,
  268. content: "是否确认"+str+"该条线索",
  269. cancelText: '取消'+str,
  270. confirmText: '确认'+str,
  271. success: function(res) {
  272. if (res.confirm) {
  273. var params={
  274. idList:that.hbjdcensus.whbId
  275. }
  276. getjdapsycb(params).then(res=>{
  277. if(res.code==200){
  278. that.$toast("催报成功")
  279. }else{
  280. that.$toast(res.msg)
  281. }
  282. })
  283. } else if (res.cancel) {
  284. // console.log('用户点击取消');
  285. }
  286. }
  287. });
  288. },
  289. toQsFn(){
  290. this.$tab.navigateTo('/pages/zdpages/count/qsfinish')
  291. },
  292. toXmFn(){
  293. this.$tab.navigateTo('/pages/zdpages/count/xmproject')
  294. },
  295. getMoreFn(){
  296. this.$tab.navigateTo('/pages/zdpages/count/timeprogress')
  297. },
  298. // getServerData() {
  299. // //模拟从服务器获取数据时的延时
  300. // setTimeout(() => {
  301. // //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  302. // let res = {
  303. // series: [
  304. // {
  305. // data: [{"name":"一班","value":50},{"name":"二班","value":30},{"name":"三班","value":20},{"name":"四班","value":18},{"name":"五班","value":8}]
  306. // }
  307. // ]
  308. // };
  309. // this.chartData = JSON.parse(JSON.stringify(res));
  310. // }, 500);
  311. // },
  312. }
  313. }
  314. </script>
  315. <style lang="scss" scoped>
  316. .count{min-height: 100vh;background-color: #ffffff;}
  317. .countbox{padding: 40rpx 24rpx;
  318. .titline{width: 8rpx;height: 46rpx;background: #FC7300;margin-right: 20rpx;}
  319. .ct_num{display: flex;flex-wrap: wrap;
  320. .ct_numa{width: 50%;display: flex;padding-right: 10rpx;min-height: 160rpx;padding-bottom: 40rpx;box-sizing: border-box;
  321. .count_cir{width: 20rpx;height: 20rpx;border-radius: 10rpx;margin-right: 14rpx;flex:0 0 auto;margin-top: 6rpx;
  322. &.bg1{background: #3C9BCD;}
  323. &.bg2{background: #10D235;}
  324. &.bg3{background: #D388E4;;}
  325. &.bg4{background: #FF5061;}
  326. &.bg5{background: #FF7821;}
  327. &.bg6{background: #2529EA;}
  328. &.bg7{background: #50A0FF;}
  329. &.bg8{background: #60CB6D;}
  330. &.bg9{background: #E76677;}
  331. &.bg10{background: #F69702;}
  332. &.bg11{background: #975FEF;}
  333. }
  334. .ct_numb{display: flex;flex: 1;flex-direction: column;justify-content: space-between;
  335. .tit{font-size: 28rpx;font-weight: bold;color: #343434;margin-bottom: 20rpx;}
  336. }
  337. }
  338. }
  339. .ct_btn{
  340. .ct_btna{width: 100%;height: 100rpx;
  341. border-radius: 10rpx;display: flex;align-items: center;padding: 0 38rpx;margin-top: 36rpx;
  342. &.bg1{background: #EDF5FF;}
  343. &.bg2{background: #FFEEE4;}
  344. .limg{width: 60rpx;height: 60rpx;margin-right: 24rpx;flex: 0 0 auto;
  345. &.imga{height: 80rpx;}
  346. }
  347. .rimg{width: 16rpx;height: 26rpx;flex: 0 0 auto;}
  348. .tit{flex: 1;font-size: 32rpx;color: #343434;font-weight: bold;}
  349. }
  350. }
  351. .home_morer{flex: 1;display: flex;align-items: center;justify-content: flex-end;
  352. view{font-size: 30rpx;color: #AAAAAA;font-weight: 500;}
  353. image{width: 24rpx;height: 24rpx;margin-left: 14rpx;}
  354. }
  355. .charta{
  356. display: flex;align-items: center;padding: 0 20rpx;
  357. .chartal{width: 300rpx;height: 300rpx;flex: 0 0 auto;margin-right: 40rpx;}
  358. .chartar{flex: 1;
  359. text{font-size: 44rpx;font-weight: bold;padding: 0 4rpx;}
  360. .chartar_btn{width: 250rpx;height: 60rpx;border: 2rpx solid #FC4E00;border-radius: 10rpx;font-size: 30rpx;font-weight: 500;color: #FC4E00;display: flex;align-items: center;justify-content: center;}
  361. }
  362. }
  363. .chartb{
  364. .chartbf{margin-top: 40rpx;display: flex;
  365. &.ct_num{
  366. .ct_numa{min-height: 140rpx;padding-left: 20rpx;
  367. .count_cir{border-radius: 0;}
  368. }
  369. }
  370. .ct_numb{
  371. .tit{margin-bottom: 6rpx !important;}
  372. }
  373. }
  374. }
  375. }
  376. </style>