Bladeren bron

小程序优化样式

wrh 2 jaren geleden
bovenliggende
commit
e7e75c017c

+ 1 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/ZCWDK/index/index.js

@@ -142,6 +142,7 @@ Page({
 			url: '/elk/getSubDeptAll',
 			method: 'GET'
 		}).then(res => {
+			res.data.unshift("全部");
 			this.setData({
 				searchItems: res.data
 			})

+ 45 - 40
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/ZCWDK/index/index.wxml

@@ -1,50 +1,55 @@
 <!--pages/ZCWDK/index/index.wxml-->
 <view>
-  <view class="head" style="background-image: url({{imgUrl}}/wdkbg.png);">
-	<view class="navTitle">
-		<t-icon name="chevron-left" size="68rpx" data-name="chevron-left"  bind:click="back" />
-		<view class="title" style="float: left;">政策问答库</view>
+	<view class="head" style="background-image: url({{imgUrl}}/wdkbg.png);">
+		<view class="navTitle">
+			<t-icon name="chevron-left" size="68rpx" data-name="chevron-left" bind:click="back" />
+			<view class="title" style="float: left;">政策问答库</view>
+		</view>
+		<view class="ttp">
+			<view class="tw" bindtap="askQuestion">
+				<text>我要</text>
+				<text>提问</text>
+			</view>
+		</view>
+		<view class="logo">
+			<image src="{{imgUrl}}/wdklogo.png"></image>
+			<text>共计问答数:{{questionCount}}</text>
+		</view>
+		<view class="searchBox">
+			<view class="type" bindtap="selectType">
+				<view style="width: 84rpx;	text-overflow: ellipsis;overflow: hidden;white-space: nowrap;float: left;text-align: center;">{{defaultSearch}}</view>
+				<view>▼</view>
+			</view>
+			<input class="inputText" bindinput="bindKeyInput" value="{{searchContent}}" />
+			<image src="{{imgUrl}}/wdksearchIcon.png" class="serachIcon" bindtap="searchQuestion"></image>
+		</view>
 	</view>
-	<view class="ttp">
-		<view class="tw" bindtap="askQuestion">
-			<text>我要</text>
-			<text>提问</text>
+	<view class="body">
+		<view class="title">
+			<image src="{{imgUrl}}/wdkhot.png" class="hotIcon"></image>
+			<text>热门问题</text>
+		</view>
+		<view class="line"></view>
+		<view>
+			<scroll-view style="height: 700rpx;" scroll-y="true">
+				<view wx:for="{{questionList}}" wx:key="index" class="listItem" bindtap="toinfo" data-content="{{item.sourceAsMap}}">
+					<view class="itemTag" style="background-image: url({{imgUrl}}/wdkitemtitlebg.png);">{{item.sourceAsMap.departmentname}}</view>
+					<view wx:if="{{item.sourceAsMap.highlight}}" class="itemTitle">
+						<rich-text nodes="{{item.sourceAsMap.highlight}}"></rich-text>
+					</view>
+					<view wx:else="{{item.sourceAsMap.highlight == null}}" class="itemTitle">{{item.sourceAsMap.title}}</view>
+					<view id="itemInfo" class="itemInfo">{{item.sourceAsMap.contentText}}<text class="p">...详情>></text></view>
+					<view class="line"></view>
+				</view>
+			</scroll-view>
 		</view>
 	</view>
-    <view class="logo">
-      <image src="{{imgUrl}}/wdklogo.png"></image>
-      <text>共计问答数:{{questionCount}}</text>
-    </view>
-    <view class="searchBox">
-      <view class="type" bindtap="selectType">{{defaultSearch}}▼</view>
-      <input class="inputText" bindinput="bindKeyInput" value="{{searchContent}}" />
-      <image src="{{imgUrl}}/wdksearchIcon.png" class="serachIcon" bindtap="searchQuestion"></image>
-    </view>
-  </view>
-  <view class="body">
-    <view class="title">
-      <image src="{{imgUrl}}/wdkhot.png" class="hotIcon"></image>
-      <text>热门问题</text>
-    </view>
-    <view class="line"></view>
-    <view>
-    <scroll-view style="height: 700rpx;" scroll-y="true">
-      <view wx:for="{{questionList}}" wx:key="index" class="listItem" bindtap="toinfo" data-content="{{item.sourceAsMap}}">
-        <view class="itemTag" style="background-image: url({{imgUrl}}/wdkitemtitlebg.png);">{{item.sourceAsMap.departmentname}}</view>
-        <view wx:if="{{item.sourceAsMap.highlight}}" class="itemTitle"><rich-text nodes="{{item.sourceAsMap.highlight}}"></rich-text></view>
-		<view wx:else="{{item.sourceAsMap.highlight == null}}" class="itemTitle">{{item.sourceAsMap.title}}</view>
-        <view id="itemInfo" class="itemInfo">{{item.sourceAsMap.contentText}}<text class="p">...详情>></text></view> 
-        <view class="line"></view>
-      </view>
-    </scroll-view>
-    </view>
-  </view>
 </view>
 
 
 <view class="mask" catchtouchmove="preventTouchMove" bindtap="closedlg" wx:if="{{showModal}}"></view>
 <view class="serachItems" wx:if="{{showModal}}">
-    <scroll-view scroll-y="true">
-      <view class="item" wx:for="{{searchItems}}" wx:key="index" bindtap="chooseType" data-name="{{item}}">{{item}}</view>
-    </scroll-view>
-</view>
+	<scroll-view scroll-y="true">
+		<view class="item" wx:for="{{searchItems}}" wx:key="index" bindtap="chooseType" data-name="{{item}}">{{item}}</view>
+	</scroll-view>
+</view>

+ 3 - 6
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/ZCWDK/index/index.wxss

@@ -75,12 +75,9 @@ page {
 .type {
 	width: 160rpx;
 	height: 80rpx;
+	margin-left: 20rpx;
 	line-height: 80rpx;
-	text-align: center;
 	float: left;
-	text-overflow: ellipsis;
-	overflow: hidden;
-	white-space: nowrap;
 }
 
 .inputText {
@@ -112,7 +109,7 @@ page {
 
 .serachItems {
 	width: 100%;
-	height: 700rpx;
+	height: 740rpx;
 	margin-top: 460rpx;
 	background: #fff;
 	padding-top: 20rpx;
@@ -123,7 +120,7 @@ page {
 }
 
 .serachItems scroll-view {
-	height: 700rpx;
+	height: 740rpx;
 }
 
 .item {

+ 1 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/ZCWDK/info/info.js

@@ -138,6 +138,7 @@ Page({
 			url: '/elk/getSubDeptAll',
 			method: 'GET'
 		}).then(res => {
+			res.data.unshift("全部");
 			this.setData({
 				searchItems: res.data
 			})

+ 4 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/ZCWDK/info/info.wxml

@@ -16,7 +16,10 @@
 			<text>共计问答数:{{questionCount}}</text>
 		</view>
 		<view class="searchBox">
-			<view class="type" bindtap="selectType">{{defaultSearch}}▼</view>
+			<view class="type" bindtap="selectType">
+				<view style="width: 84rpx;	text-overflow: ellipsis;overflow: hidden;white-space: nowrap;float: left;text-align: center;">{{defaultSearch}}</view>
+				<view>▼</view>
+			</view>
 			<input class="inputText" bindinput="bindKeyInput" />
 			<image src="{{imgUrl}}/wdksearchIcon.png" class="serachIcon" bindtap="searchQuestion"></image>
 		</view>

+ 3 - 6
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/ZCWDK/info/info.wxss

@@ -72,12 +72,9 @@ page{
 .type{
   width: 160rpx;
   height: 80rpx;
+  margin-left: 20rpx;
   line-height: 80rpx;
-  text-align: center;
   float: left;
-  text-overflow: ellipsis;
-  overflow: hidden;
-  white-space: nowrap;
 }
 .inputText{
   width: 440rpx;
@@ -106,7 +103,7 @@ page{
   
   .serachItems{
 	width: 100%;
-	height: 700rpx;
+	height: 740rpx;
 	margin-top: 460rpx;
 	background: #fff;
 	padding-top: 20rpx;
@@ -117,7 +114,7 @@ page{
   }
 
 .serachItems scroll-view{
-  height: 700rpx;
+  height: 740rpx;
 }
 
 .item{

+ 14 - 30
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/dataCenter/dataCenter.js

@@ -232,9 +232,9 @@ Page({
 				data: [],
 				tooltip: {
 					valueFormatter: function (value) {
-					  return value + '万元';
+						return value + '万元';
 					}
-				  }
+				}
 			}, {
 				name: '同比增长(%)',
 				type: 'line',
@@ -242,9 +242,9 @@ Page({
 				yAxisIndex: 1,
 				tooltip: {
 					valueFormatter: function (value) {
-					  return value + '%';
+						return value + '%';
 					}
-				  },
+				},
 				itemStyle: {
 					normal: {
 						color: '#FFA130',
@@ -414,9 +414,9 @@ Page({
 								data: allData,
 								tooltip: {
 									valueFormatter: function (value) {
-									  return value + '万平方米';
+										return value + '万平方米';
 									}
-								  },
+								},
 								itemStyle: {
 									normal: {
 										color: function (params) {
@@ -1117,19 +1117,7 @@ Page({
 					show: false,
 					position: 'center'
 				},
-				data: [],
-				emphasis: {
-					itemStyle: {
-						shadowBlur: 10,
-						shadowOffsetX: 0,
-						shadowColor: 'rgba(0, 0, 0, 0.5)'
-					},
-					label: {
-						show: true,
-						fontSize: '40',
-						fontWeight: 'bold'
-					}
-				}
+				data: []
 			}]
 		return {
 			backgroundColor: '#FFFFFF',
@@ -1180,11 +1168,17 @@ Page({
 		})
 	},
 	// 前往信箱统计
-	toDetailXXTJ() {
+	gotoXXTJ() {
 		wx.navigateTo({
 			url: '/pages/dataCenterXXTJ/dataCenterXXTJ',
 		})
 	},
+	// 前往政务统计
+	gotoZWTJ() {
+		wx.navigateTo({
+			url: '/pages/dataCenterZWTJ/dataCenterZWTJ',
+		})
+	},
 	/**
 	 * 生命周期函数--监听页面初次渲染完成
 	 */
@@ -1232,15 +1226,5 @@ Page({
 	 */
 	onShareAppMessage() {
 
-	},
-	gotoZWTJ() {
-		wx.navigateTo({
-			url: '/pages/dataCenterZWTJ/dataCenterZWTJ',
-		})
-	},
-	gotoXXTJ() {
-		wx.navigateTo({
-			url: '/pages/dataCenterXXTJ/dataCenterXXTJ',
-		})
 	}
 })

+ 2 - 2
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/dataCenter/dataCenter.wxml

@@ -196,7 +196,7 @@
 		</view>
 	</view>
 	<!-- 本年度公开信息办理情况 -->
-	<view style="background-color: #FFFFFF;margin-top: 30rpx;" bindtap="gotoXXTJ">
+	<view style="background-color: #FFFFFF;margin-top: 30rpx;">
 		<view style="border-bottom: 1px solid #C5C5C5;">
 			<view class="title">
 				<image src="{{imgUrl}}processing.png"></image>
@@ -205,7 +205,7 @@
 		</view>
 		<!-- 内容 -->
 		<view>
-			<view style="display: flex;justify-content: space-between;padding: 30rpx 30rpx 20rpx 30rpx;" bindtap="toDetailXXTJ">
+			<view style="display: flex;justify-content: space-between;padding: 30rpx 30rpx 20rpx 30rpx;" bindtap="gotoXXTJ">
 				<view class="processing">
 					<image src="{{imgUrl}}chat.png" style="width: 68rpx;height:68rpx;line-height: 110rpx;position: absolute;top: 50%;transform: translateY(-50%);left: 11rpx;"></image>
 					<view style="position: absolute;top: 50%;transform: translateY(-50%);left: 94rpx;">

+ 347 - 355
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/dataCenterXXTJ/dataCenterXXTJ.js

@@ -2,376 +2,368 @@
 import * as echarts from '../../ec-canvas/echarts';
 
 import {
-  imgUrl,
-  request
+	imgUrl,
+	request
 } from "../api/request"
 Page({
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    // 图片前缀
-    imgUrl: imgUrl,
-    // 图表
-    streetlinechartec: {
-      lazyLoad: true,
-    },
-    // 本年度公开信息办理情况
-    leaveAMessage: {},
-    // 详细数据
-    detailList: [],
-    // 分页参数
-    page: 1,
-    // 按钮是否隐藏
-    moreBtn: false
-  },
+	/**
+	 * 页面的初始数据
+	 */
+	data: {
+		// 图片前缀
+		imgUrl: imgUrl,
+		// 图表
+		streetlinechartec: {
+			lazyLoad: true,
+		},
+		// 本年度公开信息办理情况
+		leaveAMessage: {},
+		// 详细数据
+		detailList: [],
+		// 分页参数
+		page: 1,
+		// 按钮是否隐藏
+		moreBtn: false
+	},
 
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {
-    // 本年度公开信息办理情况
-    this.queryLeaveAMessage();
-    // 本年度公开信息办理情况图表
-    this.treeDiagram = this.selectComponent('#treeDiagram');
-    this.init_treeDiagram();
-    // 近90天办理类别统计
-    this.processingCategory = this.selectComponent('#processingCategory');
-    this.init_processingCategory();
-    // 近90天公开信箱领域统计
-    this.publicMailbox = this.selectComponent('#publicMailbox');
-    this.init_publicMailbox();
-    // 详细数据获取
-    this.queryDetailedData(this.data.page);
-  },
-  // 本年度公开信息办理情况
-  queryLeaveAMessage() {
-    request({
-      url: '/mail/queryLeaveAMessage',
-      method: 'GET'
-    }).then(res => {
-      this.setData({
-        leaveAMessage: res.data
-      })
-    })
-  },
-  // 本年度公开信息办理情况图表
-  init_treeDiagram() {
-    this.treeDiagram.init((canvas, width, height, dpr) => {
-      // 初始化图表
-      const barChart = echarts.init(canvas, null, {
-        width: width,
-        height: height,
-        devicePixelRatio: dpr
-      });
-      barChart.setOption(this.getTreeDiagramOption());
-      request({
-        url: '/mail/queryToType?type=1',
-        method: 'GET'
-      }).then(res => {
-        if (res.result) {
-          barChart.setOption({
-            series: [{
-              data: res.data.accept
-            }, {
-              data: res.data.handle
-            }]
-          })
-        }
-      })
-      // 注意这里一定要返回 chart 实例,否则会影响事件处理等
-      return barChart;
-    });
-  },
-  // 近90天办理类别统计
-  init_processingCategory() {
-    this.processingCategory.init((canvas, width, height, dpr) => {
-      // 初始化图表
-      const barChart = echarts.init(canvas, null, {
-        width: width,
-        height: height,
-        devicePixelRatio: dpr
-      });
-      barChart.setOption(this.getStatisticsOption());
-      request({
-        url: '/mail/queryToType?type=3',
-        method: 'GET'
-      }).then(res => {
-        if (res.result) {
-          barChart.setOption({
-            series: [{
-              data: res.data
-            }],
-            legend: {
-              formatter: function (name) {
-                let data = res.data
-                let tarValue
-                for (let i = 0; i < data.length; i++) {
-                  if (data[i].name == name) {
-                    tarValue = data[i].value
-                  }
-                }
-                let v = tarValue + '件'
-                return `${name}  ${v}`
-              }
-            }
-          })
-        }
-      })
-      // 注意这里一定要返回 chart 实例,否则会影响事件处理等
-      return barChart;
-    });
-  },
-  // 近90天公开信箱领域统计
-  init_publicMailbox() {
-    this.publicMailbox.init((canvas, width, height, dpr) => {
-      // 初始化图表
-      const barChart = echarts.init(canvas, null, {
-        width: width,
-        height: height,
-        devicePixelRatio: dpr
-      });
-      barChart.setOption(this.getStatisticsOption());
-      request({
-        url: '/mail/queryToType?type=2',
-        method: 'GET'
-      }).then(res => {
-        if (res.result) {
-          barChart.setOption({
-            series: [{
-              data: res.data
-            }],
-            legend: {
-              formatter: function (name) {
-                let data = res.data
-                let tarValue
-                for (let i = 0; i < data.length; i++) {
-                  if (data[i].name == name) {
-                    tarValue = data[i].value
-                  }
-                }
-                let v = tarValue + '件'
-                return `${name}  ${v}`
-              }
-            }
-          })
-        }
-      })
-      // 注意这里一定要返回 chart 实例,否则会影响事件处理等
-      return barChart;
-    });
-  },
-  // 本年度公开信息办理情况图表
-  getTreeDiagramOption() {
-    //请求数据 
-    let months = [];
-    let currYear = new Date().getFullYear();
-    for (let i = 1; i <= 12; i++) {
-      let month = '';
-      if (i < 10) month = '0' + i;
-      else month = i;
-      month = currYear + "年" + month + "月";
-      months.push(month);
-    }
-    var xAxis = {
-        type: 'category',
-        data: months
-      },
-      yAxis = {
-        type: 'value',
-        name: '单位:件'
-      },
-      // dataZoom = [{
-      // 	type: 'inside',
-      // 	show: true,
-      // 	start: 0,
-      // 	end: 20,
-      // }],
-      legend = {
-        data: ['受理数', '办结数']
-      },
-      grid = {
-        left: '5%',
-        bottom: '5%',
-        containLabel: true
-      },
-      series = [{
-          name: '受理数',
-          type: 'bar',
-          data: [803, 2389, 2934, 1070, 1744, 2230, 1232],
-          itemStyle: {
-            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
-                offset: 1,
-                color: '#45D1FF'
-              },
-              {
-                offset: 0,
-                color: '#0B8FFF'
-              }
-            ])
-          }
-        },
-        {
-          name: '办结数',
-          type: 'bar',
-          data: [925, 2348, 3100, 1594, 1341, 607, 3434],
-          itemStyle: {
-            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
-                offset: 1,
-                color: '#84D16A'
-              },
-              {
-                offset: 0.5,
-                color: '#7EDFA2'
-              },
-              {
-                offset: 0,
-                color: '#13AC9C'
-              }
-            ])
-          }
-        }
-      ]
-    return {
-      backgroundColor: '#FFFFFF',
-      xAxis: xAxis,
-      yAxis: yAxis,
-      // dataZoom: dataZoom,
-      legend: legend,
-      grid: grid,
-      series: series,
-      animationDelay: function (idx) {
-        return idx * 50;
-      },
-      animationEasing: 'elasticOut'
-    };
-  },
-  // 获取本年度公开信息办理图表
-  getStatisticsOption() {
-    //请求数据 
-    var legend = {
-        top: 'middle',
-        orient: 'vertical',
-        right: '10%'
-      },
-      series = [{
-        name: 'Access From',
-        type: 'pie',
-        left: '-40%',
-        radius: ['40%', '70%'],
-        label: {
-          show: false,
-          position: 'center'
-        },
-        data: [],
-        emphasis: {
-          itemStyle: {
-            shadowBlur: 10,
-            shadowOffsetX: 0,
-            shadowColor: 'rgba(0, 0, 0, 0.5)'
-          },
-          label: {
-            show: true,
-            fontSize: '40',
-            fontWeight: 'bold'
-          }
-        }
-      }]
-    return {
-      backgroundColor: '#FFFFFF',
-      legend: legend,
-      series: series,
-      animationDelay: function (idx) {
-        return idx * 50;
-      },
-      animationEasing: 'elasticOut'
-    };
-  },
-  // 分页获取详细数据
-  queryDetailedData(page) {
-    request({
-      url: '/mail/queryDetailedData?limit=10&page=' + page
-    }).then(res => {
-      if (res.msg === 'SUCCESS') {
-        if (res.count > 0) {
-          let temp = this.data.detailList;
-          for (let index = 0; index < res.data.length; index++) {
-            res.data[index].inquiry = res.data[index].咨询;
-            res.data[index].suggestion = res.data[index].建议;
-            res.data[index].complain = res.data[index].投诉;
-            res.data[index].other = res.data[index].其他;
-            res.data[index].comment = res.data[index].意见;
-            temp.push(res.data[index])
-          }
-          this.setData({
-            detailList: temp
-          })
-        }
-      } else {
-        wx.showToast({
-          title: '没有更多了',
-          icon: 'none',
-          duration: 2000
-        });
-        this.setData({
-          moreBtn: true
-        })
-      }
-    })
-  },
-  queryDetailedDataPage() {
-    this.setData({
-      page: this.data.page + 1
-    })
-    this.queryDetailedData(this.data.page);
-  },
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
+	/**
+	 * 生命周期函数--监听页面加载
+	 */
+	onLoad(options) {
+		// 本年度公开信息办理情况
+		this.queryLeaveAMessage();
+		// 本年度公开信息办理情况图表
+		this.treeDiagram = this.selectComponent('#treeDiagram');
+		this.init_treeDiagram();
+		// 近90天办理类别统计
+		this.processingCategory = this.selectComponent('#processingCategory');
+		this.init_processingCategory();
+		// 近90天公开信箱领域统计
+		this.publicMailbox = this.selectComponent('#publicMailbox');
+		this.init_publicMailbox();
+		// 详细数据获取
+		this.queryDetailedData(this.data.page);
+	},
+	// 本年度公开信息办理情况
+	queryLeaveAMessage() {
+		request({
+			url: '/mail/queryLeaveAMessage',
+			method: 'GET'
+		}).then(res => {
+			this.setData({
+				leaveAMessage: res.data
+			})
+		})
+	},
+	// 本年度公开信息办理情况图表
+	init_treeDiagram() {
+		this.treeDiagram.init((canvas, width, height, dpr) => {
+			// 初始化图表
+			const barChart = echarts.init(canvas, null, {
+				width: width,
+				height: height,
+				devicePixelRatio: dpr
+			});
+			barChart.setOption(this.getTreeDiagramOption());
+			request({
+				url: '/mail/queryToType?type=1',
+				method: 'GET'
+			}).then(res => {
+				if (res.result) {
+					barChart.setOption({
+						series: [{
+							data: res.data.accept
+						}, {
+							data: res.data.handle
+						}]
+					})
+				}
+			})
+			// 注意这里一定要返回 chart 实例,否则会影响事件处理等
+			return barChart;
+		});
+	},
+	// 近90天办理类别统计
+	init_processingCategory() {
+		this.processingCategory.init((canvas, width, height, dpr) => {
+			// 初始化图表
+			const barChart = echarts.init(canvas, null, {
+				width: width,
+				height: height,
+				devicePixelRatio: dpr
+			});
+			barChart.setOption(this.getStatisticsOption());
+			request({
+				url: '/mail/queryToType?type=3',
+				method: 'GET'
+			}).then(res => {
+				if (res.result) {
+					barChart.setOption({
+						series: [{
+							data: res.data
+						}],
+						legend: {
+							formatter: function (name) {
+								let data = res.data
+								let tarValue
+								for (let i = 0; i < data.length; i++) {
+									if (data[i].name == name) {
+										tarValue = data[i].value
+									}
+								}
+								let v = tarValue + '件'
+								return `${name}  ${v}`
+							}
+						}
+					})
+				}
+			})
+			// 注意这里一定要返回 chart 实例,否则会影响事件处理等
+			return barChart;
+		});
+	},
+	// 近90天公开信箱领域统计
+	init_publicMailbox() {
+		this.publicMailbox.init((canvas, width, height, dpr) => {
+			// 初始化图表
+			const barChart = echarts.init(canvas, null, {
+				width: width,
+				height: height,
+				devicePixelRatio: dpr
+			});
+			barChart.setOption(this.getStatisticsOption());
+			request({
+				url: '/mail/queryToType?type=2',
+				method: 'GET'
+			}).then(res => {
+				if (res.result) {
+					barChart.setOption({
+						series: [{
+							data: res.data
+						}],
+						legend: {
+							formatter: function (name) {
+								let data = res.data
+								let tarValue
+								for (let i = 0; i < data.length; i++) {
+									if (data[i].name == name) {
+										tarValue = data[i].value
+									}
+								}
+								let v = tarValue + '件'
+								return `${name}  ${v}`
+							}
+						}
+					})
+				}
+			})
+			// 注意这里一定要返回 chart 实例,否则会影响事件处理等
+			return barChart;
+		});
+	},
+	// 本年度公开信息办理情况图表
+	getTreeDiagramOption() {
+		//请求数据 
+		let months = [];
+		let currYear = new Date().getFullYear();
+		for (let i = 1; i <= 12; i++) {
+			let month = '';
+			if (i < 10) month = '0' + i;
+			else month = i;
+			month = currYear + "年" + month + "月";
+			months.push(month);
+		}
+		var xAxis = {
+				type: 'category',
+				data: months
+			},
+			yAxis = {
+				type: 'value',
+				name: '单位:件'
+			},
+			tooltip = {
+				trigger: 'axis'
+			},
+			// dataZoom = [{
+			// 	type: 'inside',
+			// 	show: true,
+			// 	start: 0,
+			// 	end: 20,
+			// }],
+			legend = {
+				data: ['受理数', '办结数']
+			},
+			grid = {
+				left: '5%',
+				bottom: '5%',
+				containLabel: true
+			},
+			series = [{
+					name: '受理数',
+					type: 'bar',
+					data: [],
+					itemStyle: {
+						color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+								offset: 1,
+								color: '#45D1FF'
+							},
+							{
+								offset: 0,
+								color: '#0B8FFF'
+							}
+						])
+					}
+				},
+				{
+					name: '办结数',
+					type: 'bar',
+					data: [],
+					itemStyle: {
+						color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+								offset: 1,
+								color: '#84D16A'
+							},
+							{
+								offset: 0.5,
+								color: '#7EDFA2'
+							},
+							{
+								offset: 0,
+								color: '#13AC9C'
+							}
+						])
+					}
+				}
+			]
+		return {
+			backgroundColor: '#FFFFFF',
+			xAxis: xAxis,
+			yAxis: yAxis,
+			// dataZoom: dataZoom,
+			tooltip: tooltip,
+			legend: legend,
+			grid: grid,
+			series: series,
+			animationDelay: function (idx) {
+				return idx * 50;
+			},
+			animationEasing: 'elasticOut'
+		};
+	},
+	// 获取本年度公开信息办理图表
+	getStatisticsOption() {
+		//请求数据 
+		var legend = {
+				top: 'middle',
+				orient: 'vertical',
+				right: '10%'
+			},
+			series = [{
+				name: 'Access From',
+				type: 'pie',
+				left: '-40%',
+				radius: ['40%', '70%'],
+				label: {
+					show: false,
+					position: 'center'
+				},
+				data: []
+			}]
+		return {
+			backgroundColor: '#FFFFFF',
+			legend: legend,
+			series: series,
+			animationDelay: function (idx) {
+				return idx * 50;
+			},
+			animationEasing: 'elasticOut'
+		};
+	},
+	// 分页获取详细数据
+	queryDetailedData(page) {
+		request({
+			url: '/mail/queryDetailedData?limit=10&page=' + page
+		}).then(res => {
+			if (res.msg === 'SUCCESS') {
+				if (res.count > 0) {
+					let temp = this.data.detailList;
+					for (let index = 0; index < res.data.length; index++) {
+						res.data[index].inquiry = res.data[index].咨询;
+						res.data[index].suggestion = res.data[index].建议;
+						res.data[index].complain = res.data[index].投诉;
+						res.data[index].other = res.data[index].其他;
+						res.data[index].comment = res.data[index].意见;
+						temp.push(res.data[index])
+					}
+					this.setData({
+						detailList: temp
+					})
+				}
+			} else {
+				wx.showToast({
+					title: '没有更多了',
+					icon: 'none',
+					duration: 2000
+				});
+				this.setData({
+					moreBtn: true
+				})
+			}
+		})
+	},
+	queryDetailedDataPage() {
+		this.setData({
+			page: this.data.page + 1
+		})
+		this.queryDetailedData(this.data.page);
+	},
+	/**
+	 * 生命周期函数--监听页面初次渲染完成
+	 */
+	onReady() {
 
-  },
+	},
 
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
+	/**
+	 * 生命周期函数--监听页面显示
+	 */
+	onShow() {
 
-  },
+	},
 
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
+	/**
+	 * 生命周期函数--监听页面隐藏
+	 */
+	onHide() {
 
-  },
+	},
 
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
+	/**
+	 * 生命周期函数--监听页面卸载
+	 */
+	onUnload() {
 
-  },
+	},
 
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
+	/**
+	 * 页面相关事件处理函数--监听用户下拉动作
+	 */
+	onPullDownRefresh() {
 
-  },
+	},
 
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
+	/**
+	 * 页面上拉触底事件的处理函数
+	 */
+	onReachBottom() {
 
-  },
+	},
 
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
+	/**
+	 * 用户点击右上角分享
+	 */
+	onShareAppMessage() {
 
-  }
+	}
 })