|
|
@@ -6,6 +6,7 @@
|
|
|
<picker mode="date" fields="year" @change="bindDateChange" class="picker-class">
|
|
|
<view class="uni-input display-between items-center">{{dateYear}}年<image src="../../static/arrow_down.svg" mode="aspectFit"></image></view>
|
|
|
</picker>
|
|
|
+ <view style="font-size: 26rpx;margin-left: 20rpx;">1月~ </view>
|
|
|
<picker :range="arrayMonth" :value="dateMonth" @change="bindDateMonthChange" class="picker-class">
|
|
|
<view class="uni-input display-between items-center" style="color: #707070;">{{dateMonth}}<image src="../../static/calendar_icon.svg" mode="aspectFit"></image></view>
|
|
|
</picker>
|
|
|
@@ -146,6 +147,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import md5 from "@/common/md5.js";
|
|
|
export default {
|
|
|
data() {
|
|
|
return{
|
|
|
@@ -155,11 +157,18 @@
|
|
|
arrayNewCity:['规上工业企业数量','工业产值及增速','工业增加值增速','工业投资及增速','工业技改及增速'],
|
|
|
sortSelect:'规上工业企业数量',
|
|
|
chartData:{
|
|
|
- categories: ["a", "b"],
|
|
|
+ categories: ["工业增加值增速", "先进制造业总产值"],
|
|
|
series: [
|
|
|
- {name: "目标任务",data: [35, 36]},
|
|
|
- {name: "目前已完成", data: [18, 27]
|
|
|
- }]
|
|
|
+ { name: "目标任务",
|
|
|
+ data: [35, 36],
|
|
|
+ textOffset: 200,
|
|
|
+ format:'yAxisDemo1',
|
|
|
+ },
|
|
|
+ { name: "目前已完成",
|
|
|
+ data: [18, 27],
|
|
|
+ format:'yAxisDemo1',
|
|
|
+ },
|
|
|
+ ]
|
|
|
},
|
|
|
chartData1:{
|
|
|
"categories": ["大志药业", "东航赛峰", "豆福源", "东方航食", "空港航食", "黎明发电"],
|
|
|
@@ -208,7 +217,60 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ onLoad() {
|
|
|
+ this.getStandardChart()
|
|
|
+ },
|
|
|
methods:{
|
|
|
+ getStandardChart(){
|
|
|
+ let md5Sign = md5(
|
|
|
+ "method=" +
|
|
|
+ "stat" +
|
|
|
+ "×tamp=" +
|
|
|
+ getApp().globalData.globalTimestamp +
|
|
|
+ "&secret=" +
|
|
|
+ getApp().globalData.secret
|
|
|
+ );
|
|
|
+ let url =
|
|
|
+ getApp().globalData.shareUrl +
|
|
|
+ "api/api.php" +
|
|
|
+ "?method=stat&act=standard_target×tamp=" +
|
|
|
+ getApp().globalData.globalTimestamp +
|
|
|
+ "&sign=" +
|
|
|
+ md5Sign;
|
|
|
+ uni.request({
|
|
|
+ url: url,
|
|
|
+ method: "POST",
|
|
|
+ header: {
|
|
|
+ "content-type": "application/x-www-form-urlencoded",
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ year:2021,
|
|
|
+ month:12,
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ let targetData = [] , finishData = [];
|
|
|
+ // this.chartData.series[0].data = res.data.data.target
|
|
|
+ // this.chartData.series[1].data = res.data.data.finish
|
|
|
+ res.data.data.target.forEach((item,index)=>{
|
|
|
+ if(item.source !== '0'){
|
|
|
+ targetData.push(Number(item.increase_balance))
|
|
|
+ }
|
|
|
+ })
|
|
|
+ res.data.data.finish.forEach((item,index)=>{
|
|
|
+ if(item.source !== '0'){
|
|
|
+ finishData.push(Number(item.increase_balance))
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.chartData.series[0].data = targetData
|
|
|
+ this.chartData.series[1].data = finishData
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ console.log("连接失败");
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
bindDateChange(e){
|
|
|
this.dateYear = e.target.value
|
|
|
},
|