a47e862a4eb48070807e09954bf5ea20013c0497.svn-base 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. <template>
  2. <div class="page-header-index-wide">
  3. <a-row :gutter="24">
  4. <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '20px' }">
  5. <chart-card :loading="loading" title="项目总数" :total='data.result'>
  6. <mini-progress color="rgb(19, 194, 194)" :target="100" :percentage="100" :height="8" />
  7. <!-- <mini-progress color="rgb(0, 153, 204)" :target="80" :percentage="78" :height="8" />-->
  8. <!--&lt;!&ndash; <a-tooltip title="指标说明" slot="action">&ndash;&gt;-->
  9. <!--&lt;!&ndash; <a-icon type="info-circle-o" />&ndash;&gt;-->
  10. <!-- </a-tooltip>-->
  11. <div>
  12. <!-- <trend style="margin-right: 16px;">-->
  13. <!-- <span slot="term">已建</span>-->
  14. <!--&lt;!&ndash; 12%&ndash;&gt;-->
  15. <!-- </trend>-->
  16. <!-- <trend >-->
  17. <!-- <span slot="term">在建</span>-->
  18. <!--&lt;!&ndash; 11%&ndash;&gt;-->
  19. <!-- </trend>-->
  20. <!-- <trend >-->
  21. <!-- <span slot="term">拟建</span>-->
  22. <!--&lt;!&ndash; 11%&ndash;&gt;-->
  23. <!-- </trend>-->
  24. </div>
  25. <!-- <template slot="footer">项目总数<span> {{data.result}}</span></template>-->
  26. </chart-card>
  27. </a-col>
  28. <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
  29. <chart-card :loading="loading" title="已建项目" :total="data2.result">
  30. <a-tooltip title="指标说明" slot="action">
  31. <a-icon type="info-circle-o" />
  32. </a-tooltip>
  33. <div>
  34. <mini-progress color="rgb(19, 194, 194)" :target="100" :percentage="(data2.result)/(data.result)*100" :height="8" />
  35. </div>
  36. <!-- <template slot="footer">日订单量<span> {{ '1234' | NumberFormat }}</span></template>-->
  37. </chart-card>
  38. </a-col>
  39. <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
  40. <chart-card :loading="loading" title="在建项目" :total='data3.result'>
  41. <a-tooltip title="指标说明" slot="action">
  42. <a-icon type="info-circle-o" />
  43. </a-tooltip>
  44. <div>
  45. <mini-progress color="rgb(19, 194, 194)" :target="100" :percentage="(data3.result)/(data.result)*100" :height="8" />
  46. </div>
  47. <!-- <template slot="footer">转化率 <span>60%</span></template>-->
  48. </chart-card>
  49. </a-col>
  50. <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
  51. <chart-card :loading="loading" title="拟建项目" :total='data4.result'>
  52. <a-tooltip title="指标说明" slot="action">
  53. <a-icon type="info-circle-o" />
  54. </a-tooltip>
  55. <div>
  56. <mini-progress color="rgb(19, 194, 194)" :target="100" :percentage="(data4.result)/(data.result)*100" :height="8" />
  57. </div>
  58. </chart-card>
  59. </a-col>
  60. </a-row>
  61. <a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}">
  62. <div class="salesCard">
  63. <a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">
  64. <div class="extra-wrapper" slot="tabBarExtraContent">
  65. </div>
  66. <a-tab-pane tab="河流流域面积" key="1">
  67. <a-row>
  68. <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
  69. <bar title="河流流域面积km²" :dataSource="barData"/>
  70. </a-col>
  71. <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
  72. <rank-list title="河流流域面积" :list="rankList"/>
  73. </a-col>
  74. </a-row>
  75. </a-tab-pane>
  76. </a-tabs>
  77. </div>
  78. </a-card>
  79. <!-- <a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}">-->
  80. <!-- <div class="salesCard">-->
  81. <!-- <a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">-->
  82. <!-- <div class="extra-wrapper" slot="tabBarExtraContent">-->
  83. <!-- </div>-->
  84. <!-- <a-tab-pane loading="true" tab="岸线利用率" key="1">-->
  85. <!-- <a-row>-->
  86. <!-- <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">-->
  87. <!-- <bar title="岸线利用率%" :dataSource="barData1"/>-->
  88. <!-- </a-col>-->
  89. <!-- <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">-->
  90. <!-- <rank-list title="岸线利用率" :list="rankList1"/>-->
  91. <!-- </a-col>-->
  92. <!-- </a-row>-->
  93. <!-- </a-tab-pane>-->
  94. <!-- </a-tabs>-->
  95. <!-- </div>-->
  96. <!-- </a-card>-->
  97. <a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}">
  98. <div class="salesCard">
  99. <a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">
  100. <div class="extra-wrapper" slot="tabBarExtraContent">
  101. </div>
  102. <a-tab-pane loading="true" tab="项目类型" key="1">
  103. <a-row>
  104. <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
  105. <Pie :dataSource="pieData"></Pie>
  106. </a-col>
  107. <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
  108. <rank-list title="项目类型" :list="rankList2"/>
  109. </a-col>
  110. </a-row>
  111. </a-tab-pane>
  112. </a-tabs>
  113. </div>
  114. </a-card>
  115. <a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}">
  116. <div class="salesCard">
  117. <a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">
  118. <div class="extra-wrapper" slot="tabBarExtraContent">
  119. </div>
  120. <a-tab-pane loading="true" tab="河流数量" key="1">
  121. <a-row>
  122. <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
  123. <Pie :dataSource="pieData1"></Pie>
  124. </a-col>
  125. <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
  126. <rank-list title="河流数量" :list="rankList3"/>
  127. </a-col>
  128. </a-row>
  129. </a-tab-pane>
  130. </a-tabs>
  131. </div>
  132. </a-card>
  133. <a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}">
  134. <div class="salesCard">
  135. <a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">
  136. <div class="extra-wrapper" slot="tabBarExtraContent">
  137. </div>
  138. <a-tab-pane tab="在建项目数量" key="1">
  139. <a-row>
  140. <LineChartMultid :dataSource="linData1" ></LineChartMultid>
  141. </a-row>
  142. </a-tab-pane>
  143. <a-tab-pane tab="拟建项目数量" key="2">
  144. <a-row>
  145. <LineChartMultid :dataSource="linData2" ></LineChartMultid>
  146. </a-row>
  147. </a-tab-pane>
  148. </a-tabs>
  149. <a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">
  150. <div class="extra-wrapper" slot="tabBarExtraContent">
  151. </div>
  152. <a-tab-pane loading="true" tab="监管事件" key="1">
  153. <a-table :dataSource="dataSource1" size="default" rowKey="id" :columns="columns" :pagination="ipagination1" @change="tableChange1">
  154. <template slot="flowRate" slot-scope="text, record, index">
  155. <a-progress :strokeColor="getPercentColor(record.flowRate)" :format="getPercentFormat" :percent="getFlowRateNumber(record.flowRate)" style="width:80px" />
  156. </template>
  157. </a-table>
  158. </a-tab-pane>
  159. </a-tabs>
  160. <!-- <div class="salesCard">-->
  161. <!-- <a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">-->
  162. <!-- <div class="extra-wrapper" slot="tabBarExtraContent">-->
  163. <!-- </div>-->
  164. <!-- <a-tab-pane tab="岸线利用率" key="1">-->
  165. <!-- <a-row>-->
  166. <!-- <BarMultid :dataSource="barData1" :fields="Dfgcfields"></BarMultid>-->
  167. <!-- </a-row>-->
  168. <!-- </a-tab-pane>-->
  169. <!-- </a-tabs>-->
  170. <!-- </div>-->
  171. </div>
  172. </a-card>
  173. </div>
  174. </template>
  175. <script>
  176. import ChartCard from '@/components/ChartCard'
  177. import ACol from "ant-design-vue/es/grid/Col"
  178. import ATooltip from "ant-design-vue/es/tooltip/Tooltip"
  179. import MiniArea from '@/components/chart/MiniArea'
  180. import MiniBar from '@/components/chart/MiniBar'
  181. import MiniProgress from '@/components/chart/MiniProgress'
  182. import RankList from '@/components/chart/RankList'
  183. import Bar from '@/components/chart/Bar'
  184. // import Pie from '../../components/chart/Pie'
  185. import LineChartMultid from '@/components/chart/LineChartMultid'
  186. import HeadInfo from '@/components/tools/HeadInfo.vue'
  187. import BarMultid from '@/components/chart/BarMultid'
  188. import StackBar from '@/components/chart/StackBar'
  189. import Trend from '@/components/Trend'
  190. import { getLoginfo,getVisitInfo } from '@/api/api'
  191. import Pie from "../../components/chart/Pie";
  192. import {getAction, postAction} from "../../api/manage";
  193. const dataCol1 = [{
  194. title: '序号',
  195. align:"center",
  196. dataIndex: 'reBizCode'
  197. },{
  198. title: '监管项目名称',
  199. align:"center",
  200. dataIndex: 'type'
  201. },{
  202. title: '受理人',
  203. align:"center",
  204. dataIndex: 'acceptBy'
  205. },{
  206. title: '受理时间',
  207. align:"center",
  208. dataIndex: 'acceptDate'
  209. },{
  210. title: '存在问题处理情况',
  211. align:"center",
  212. dataIndex: 'flowRate',
  213. }];
  214. const rankList1=[]
  215. // const f=['泵站工程','拦河工程','闸坝工程','堤防工程']
  216. // const n=['255','3461','800','237']
  217. const rankList2=[]
  218. let pieData=[]
  219. let pieData1=[]
  220. let linData1=[]
  221. let fields1=[]
  222. let linData2=[]
  223. let linData3=[]
  224. const dataSource1=[
  225. ]
  226. export default {
  227. name: "IndexChart",
  228. components: {
  229. Pie,
  230. ATooltip,
  231. ACol,
  232. ChartCard,
  233. MiniArea,
  234. MiniBar,
  235. MiniProgress,
  236. RankList,
  237. Bar,
  238. Trend,
  239. LineChartMultid,
  240. BarMultid,
  241. HeadInfo,
  242. StackBar,
  243. },
  244. data() {
  245. return {
  246. loading: true,
  247. dataSource1:[],
  248. center: null,
  249. rankList2:[],
  250. rankList3:[],
  251. rankList1,
  252. rankList:[],
  253. barData:[],
  254. barData1:[],
  255. Dfgcfields:[],
  256. pieData,
  257. pieData1,
  258. linData1,
  259. linData2,
  260. linData3,
  261. fields1,
  262. columns:dataCol1,
  263. ipagination1:{
  264. current: 1,
  265. pageSize: 5,
  266. pageSizeOptions: ['10', '20', '30'],
  267. showTotal: (total, range) => {
  268. return range[0] + "-" + range[1] + " 共" + total + "条"
  269. },
  270. showQuickJumper: true,
  271. showSizeChanger: true,
  272. total: 0,
  273. },
  274. // xingmu,
  275. // jhjgData1,
  276. loginfo:{},
  277. // visitFields:['ip','visit'],
  278. visitInfo:[],
  279. indicator: '<a-icon type="loading" style="font-size: 24px" spin />',
  280. data:'',
  281. data1:'',
  282. data2:'',
  283. data3:'',
  284. data4:'',
  285. data5:'',
  286. data6:'',
  287. data7:'',
  288. data8:'',
  289. data9:'',
  290. data10:''
  291. }
  292. },
  293. mounted() {
  294. this.loadcount(),
  295. this.loadhlcd(),
  296. this.loadyjcount(),
  297. this.loadzjcount(),
  298. this.loadnjcount(),
  299. this.loadxmcount(),
  300. this.loadcountriver(),
  301. this.loadxzjxm(),
  302. this.loadxnjxm(),
  303. // this.loaddfcd(),
  304. this.loadcountjg(),
  305. this.loadDataSource1(),
  306. this.dateFormat()
  307. },
  308. created() {
  309. setTimeout(() => {
  310. this.loading = !this.loading
  311. }, 1000)
  312. this.initLogInfo();
  313. },
  314. methods: {
  315. loadDataSource1(){
  316. this.dataSource1 = dataSource1.filter(item=>{
  317. if(!this.indexRegisterType){
  318. return true
  319. }
  320. return item.type==this.indexRegisterType
  321. })
  322. },
  323. dateFormat(time) {
  324. //将13位时间戳转换成时间格式 输出为2018-10-09
  325. var date = new Date(time);
  326. var YY = date.getFullYear() + '-';
  327. var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
  328. var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
  329. var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
  330. var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
  331. var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
  332. return YY + MM + DD +" "+hh + mm + ss;
  333. },
  334. tableChange1(pagination){
  335. this.ipagination1.current = pagination.current
  336. this.ipagination1.pageSize = pagination.pageSize
  337. this.queryTimeoutInfo()
  338. },
  339. getPercentColor(value){
  340. let p = Number(value)
  341. if(p>=90 && p<100){
  342. return 'rgb(244, 240, 89)'
  343. }else if(p>=100){
  344. return 'red'
  345. }else{
  346. return 'rgb(16, 142, 233)'
  347. }
  348. },
  349. getPercentFormat(value){
  350. if(value==100){
  351. return "超时"
  352. }else{
  353. return value+"%"
  354. }
  355. },
  356. getFlowRateNumber(value){
  357. return Number(value)
  358. },
  359. async loadcount() {
  360. this.data = await postAction('/hzz.shjsgc.shxmxx/rmShxmxxb/count', {})
  361. let a=this.data
  362. // console.log(this.data)
  363. },
  364. async loadyjcount() {
  365. this.data2 = await postAction('/hzz.shjsgc.shxmxx/rmShxmxxb/yjcount', {})
  366. let b=this.data2
  367. },
  368. async loadzjcount() {
  369. this.data3 = await postAction('/hzz.shjsgc.shxmxx/rmShxmxxb/zjcount', {})
  370. let c=this.data3
  371. },
  372. async loadnjcount() {
  373. this.data4 = await postAction('/hzz.shjsgc.shxmxx/rmShxmxxb/njcount', {})
  374. },
  375. async loadcountriver(){
  376. this.data6=await getAction('/hzz.hlxx/rmRiver/countriver',{})
  377. const re = this.data6.result;
  378. const b=[{ item: '300平方公里以上', count: re[0] },
  379. { item: '50-300平方公里', count: re[1] },
  380. { item: '小于50平方公里', count: re[2] },
  381. { item: '未填写流域面积', count: re[3] },]
  382. for(let j = 0; j < b.length; j++) {
  383. pieData1.push(b[j]);
  384. }
  385. for (let i = 0; i < b.length; i++) {
  386. this.rankList3.push({
  387. name: b[i].item,
  388. total: b[i].count
  389. })
  390. }
  391. },
  392. async loadxzjxm(){
  393. this.data7= await postAction('/hzz.shjsgc.shxmxx/rmShxmxxb/zjxm', {})
  394. let a=this.data7.result
  395. for (let i = 0; i <a.length; i++) {
  396. let b = {
  397. type:a[i].xzqh,
  398. 项目数量:a[i].zj,
  399. }
  400. linData1.push(b)
  401. }
  402. },
  403. async loadxnjxm(){
  404. this.data8= await postAction('/hzz.shjsgc.shxmxx/rmShxmxxb/njxm', {})
  405. let a=this.data8.result
  406. for (let i = 0; i <a.length; i++) {
  407. let b = {
  408. type:a[i].xzqh,
  409. 项目数量:a[i].nj,
  410. }
  411. linData2.push(b)
  412. }
  413. },
  414. async loadcountjg(){
  415. this.data10= await getAction('/hzz.shjsgc.xcjgjl/rmXcjgjl/cxjgjl', {})
  416. let a=this.data10.result
  417. for(let i=0;i<a.length;i++) {
  418. let b={reBizCode:i+1,type:a[i].jcmc,acceptBy:a[i].create_by,acceptDate:this.dateFormat(a[i].create_time),flowRate:a[i].czwtjclqk}
  419. this.dataSource1.push(b)
  420. }
  421. },
  422. async loadxmcount() {
  423. this.data5 = await postAction('/hzz.shjsgc.shxmxx/rmShxmxxb/xmlxcount', {})
  424. const re = this.data5.result;
  425. const b=[{ item: '泵站工程', count: re[0] },
  426. { item: '闸坝工程', count: re[1] },
  427. { item: '堤防工程', count: re[2] },
  428. { item: '拦河工程', count: re[3] },]
  429. for(let j = 0; j < b.length; j++) {
  430. pieData.push(b[j]);
  431. }
  432. for (let i = 0; i < b.length; i++) {
  433. this.rankList2.push({
  434. name: b[i].item,
  435. total: b[i].count
  436. })
  437. }
  438. fields1=["zj","xm"]
  439. },
  440. async loadhlcd() {
  441. this.data1 = await postAction('/hzz.shjsgc.shxmxx/rmShxmxxb/findAllhlcd', {})
  442. const a=this.data1.result
  443. for(var key in a){
  444. this.barData.push({
  445. x:`${a[key].hlmc}`,
  446. y:Math.floor(a[key].hlcd)
  447. })
  448. // console.log("属性:" + key + ",值:"+ jsonData[key]);
  449. }
  450. // this.rankList=[]
  451. for(var key in a) {
  452. this.rankList.push({
  453. name: a[key].hlmc,
  454. total: a[key].hlcd+'km²'
  455. })
  456. }
  457. // console.log(a)
  458. },
  459. initLogInfo () {
  460. getLoginfo(null).then((res)=>{
  461. if(res.success){
  462. Object.keys(res.result).forEach(key=>{
  463. res.result[key] =res.result[key]+""
  464. })
  465. this.loginfo = res.result;
  466. }
  467. })
  468. getVisitInfo().then(res=>{
  469. if(res.success){
  470. this.visitInfo = res.result;
  471. }
  472. })
  473. },
  474. }
  475. }
  476. </script>
  477. <style lang="less" scoped>
  478. .circle-cust{
  479. position: relative;
  480. top: 28px;
  481. left: -100%;
  482. }
  483. .extra-wrapper {
  484. line-height: 55px;
  485. padding-right: 24px;
  486. .extra-item {
  487. display: inline-block;
  488. margin-right: 24px;
  489. a {
  490. margin-left: 24px;
  491. }
  492. }
  493. }
  494. /* 首页访问量统计 */
  495. .head-info {
  496. position: relative;
  497. text-align: left;
  498. padding: 0 32px 0 0;
  499. min-width: 125px;
  500. &.center {
  501. text-align: center;
  502. padding: 0 32px;
  503. }
  504. span {
  505. color: rgba(0, 0, 0, .45);
  506. display: inline-block;
  507. font-size: .95rem;
  508. line-height: 42px;
  509. margin-bottom: 4px;
  510. }
  511. p {
  512. line-height: 42px;
  513. margin: 0;
  514. a {
  515. font-weight: 600;
  516. font-size: 1rem;
  517. }
  518. }
  519. }
  520. </style>