|
|
@@ -8,7 +8,7 @@
|
|
|
</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>
|
|
|
+ <view class="uni-input display-between items-center" style="color: #707070;">{{dateMonth}}月<image src="../../static/calendar_icon.svg" mode="aspectFit"></image></view>
|
|
|
</picker>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -18,19 +18,19 @@
|
|
|
<view class="block-box display-wrap items-center" style="justify-content: space-evenly;height: 340rpx;">
|
|
|
<view class="block-box-content" style="background-color: #77AFCA;" @click="goScale('规上工业企业')">
|
|
|
<view>规上工业企业</view>
|
|
|
- <view>21</view>
|
|
|
+ <view>{{standard_sized_count}}</view>
|
|
|
</view>
|
|
|
<view class="block-box-content" style="background-color: #A5C9D3;">
|
|
|
<view>工业增加值增速</view>
|
|
|
- <view>同比增长3.2%</view>
|
|
|
+ <view>同比增长{{standard_sized_increase_ratio}}%</view>
|
|
|
</view>
|
|
|
<view class="block-box-content" style="background-color: #8D7E95;" @click="goScale('先进制造业企业')">
|
|
|
<view>先进制造业</view>
|
|
|
- <view>6</view>
|
|
|
+ <view>{{advanced_count}}</view>
|
|
|
</view>
|
|
|
<view class="block-box-content" style="background-color: #C1ABBC;">
|
|
|
<view>先进制造业总产值</view>
|
|
|
- <view>同比增长17%</view>
|
|
|
+ <view>同比增长{{advanced_increase_ratio}}%</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<qiun-title-bar title="2021年规上工业任务目标"/>
|
|
|
@@ -152,39 +152,45 @@
|
|
|
data() {
|
|
|
return{
|
|
|
dateYear:new Date().getFullYear(),
|
|
|
- dateMonth:new Date().getMonth() + 1 + '月',
|
|
|
- arrayMonth:["1月", "2月","3月", "4月","5月", "6月","7月", "8月","9月", "10月","11月", "12月"],
|
|
|
+ dateMonth:new Date().getMonth() + 1,
|
|
|
+ arrayMonth:["1", "2","3", "4","5", "6","7", "8","9", "10","11", "12"],
|
|
|
arrayNewCity:['规上工业企业数量','工业产值及增速','工业增加值增速','工业投资及增速','工业技改及增速'],
|
|
|
sortSelect:'规上工业企业数量',
|
|
|
+ standard_sized_count:'',
|
|
|
+ standard_sized_increase_ratio:'',
|
|
|
+ advanced_count:'',
|
|
|
+ advanced_increase_ratio:'',
|
|
|
chartData:{
|
|
|
categories: ["工业增加值增速", "先进制造业总产值"],
|
|
|
series: [
|
|
|
{ name: "目标任务",
|
|
|
- data: [3, 4],
|
|
|
- otherData:[22,33],
|
|
|
+ data: [],
|
|
|
+ otherData:[],
|
|
|
format:'moreDataShow',
|
|
|
+ textSize:10
|
|
|
},
|
|
|
{ name: "目前已完成",
|
|
|
- data: [5, 6],
|
|
|
- otherData:[44,55],
|
|
|
+ data: [],
|
|
|
+ otherData:[],
|
|
|
format:'moreDataShow',
|
|
|
+ textSize:10
|
|
|
},
|
|
|
]
|
|
|
},
|
|
|
chartData1:{
|
|
|
- "categories": ["大志药业", "东航赛峰", "豆福源", "东方航食", "空港航食", "黎明发电"],
|
|
|
+ "categories": [],
|
|
|
"series": [
|
|
|
{
|
|
|
"name": "先进制造业产值(亿元)",
|
|
|
- "data": [1.02,.75,.83,.37,.58,.53],
|
|
|
+ "data": [],
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
chartData2:{
|
|
|
"categories": ["1月", "2月","3月", "4月","5月", "6月","7月", "8月","9月", "10月","11月", "12月"],
|
|
|
"series": [
|
|
|
- {name: "本年度",data: [15,10,16,23,21,36,25,7,18,29,33,12]},
|
|
|
- {name: "上年度", data: [5,8,11,18,16,31,20,2,13,25,28,11]}
|
|
|
+ {name: "本年度",data: [],textSize:1},
|
|
|
+ {name: "上年度", data: [],textSize:1}
|
|
|
]
|
|
|
},
|
|
|
chartDataPie:{
|
|
|
@@ -219,10 +225,14 @@
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
- // this.getStandardChart()
|
|
|
+ this.topChartFn(this.dateYear,this.dateMonth)
|
|
|
},
|
|
|
methods:{
|
|
|
- getStandardChart(){
|
|
|
+ topChartFn(year,month){
|
|
|
+ this.getStandardChart(year,month);
|
|
|
+ this.getAdvancedCompanyChart(year,month)
|
|
|
+ },
|
|
|
+ getStandardChart(y,m){
|
|
|
let md5Sign = md5(
|
|
|
"method=" +
|
|
|
"stat" +
|
|
|
@@ -234,7 +244,7 @@
|
|
|
let url =
|
|
|
getApp().globalData.shareUrl +
|
|
|
"api/api.php" +
|
|
|
- "?method=stat&act=standard_target×tamp=" +
|
|
|
+ "?method=stat&action=standard_target×tamp=" +
|
|
|
getApp().globalData.globalTimestamp +
|
|
|
"&sign=" +
|
|
|
md5Sign;
|
|
|
@@ -245,14 +255,16 @@
|
|
|
"content-type": "application/x-www-form-urlencoded",
|
|
|
},
|
|
|
data: {
|
|
|
- year:2021,
|
|
|
- month:12,
|
|
|
+ year:y,
|
|
|
+ month:m,
|
|
|
},
|
|
|
success: (res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
- let targetData,targetData1,finishData,finishData1 = [];
|
|
|
- // this.chartData.series[0].data = res.data.data.target
|
|
|
- // this.chartData.series[1].data = res.data.data.finish
|
|
|
+ let targetData = [],targetData1 = [],finishData = [],finishData1 = [];
|
|
|
+ this.standard_sized_count = res.data.data.standard_sized_count;
|
|
|
+ this.standard_sized_increase_ratio = res.data.data.standard_sized_increase_ratio;
|
|
|
+ this.advanced_count = res.data.data.advanced_count;
|
|
|
+ this.advanced_increase_ratio = res.data.data.advanced_increase_ratio;
|
|
|
res.data.data.target.forEach((item,index)=>{
|
|
|
if(item.source !== '0'){
|
|
|
targetData.push(Number(item.increase_balance))
|
|
|
@@ -276,11 +288,65 @@
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
+ getAdvancedCompanyChart(y,m){
|
|
|
+ let md5Sign = md5(
|
|
|
+ "method=" +
|
|
|
+ "stat" +
|
|
|
+ "×tamp=" +
|
|
|
+ getApp().globalData.globalTimestamp +
|
|
|
+ "&secret=" +
|
|
|
+ getApp().globalData.secret
|
|
|
+ );
|
|
|
+ let url =
|
|
|
+ getApp().globalData.shareUrl +
|
|
|
+ "api/api.php" +
|
|
|
+ "?method=stat&action=advanced_company×tamp=" +
|
|
|
+ getApp().globalData.globalTimestamp +
|
|
|
+ "&sign=" +
|
|
|
+ md5Sign;
|
|
|
+ uni.request({
|
|
|
+ url: url,
|
|
|
+ method: "POST",
|
|
|
+ header: {
|
|
|
+ "content-type": "application/x-www-form-urlencoded",
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ year:y,
|
|
|
+ month:m,
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ let categoriesList = [],balanceList = [],lineBalanceList = [], lineLast = [];
|
|
|
+ res.data.data.company_list.forEach((item)=>{
|
|
|
+ categoriesList.push(item.name);
|
|
|
+ balanceList.push(item.balance)
|
|
|
+ })
|
|
|
+ // res.data.data.month_list.forEach((item)=>{
|
|
|
+ // lineBalanceList.push(item.balance);
|
|
|
+ // lineLast.push(item.last_balance)
|
|
|
+ // })
|
|
|
+ for(let key in res.data.data.month_list ){
|
|
|
+ lineBalanceList.push(res.data.data.month_list[key].balance)
|
|
|
+ lineLast.push(res.data.data.month_list[key].last_balance)
|
|
|
+ }
|
|
|
+ this.chartData1.categories = categoriesList;
|
|
|
+ this.chartData1.series[0].data = balanceList;
|
|
|
+ this.chartData2.series[0].data = lineBalanceList;
|
|
|
+ this.chartData2.series[1].data = lineLast;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ console.log("连接失败");
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
bindDateChange(e){
|
|
|
this.dateYear = e.target.value
|
|
|
+ this.topChartFn(this.dateYear,this.dateMonth)
|
|
|
},
|
|
|
bindDateMonthChange(e){
|
|
|
this.dateMonth = this.arrayMonth[e.target.value]
|
|
|
+ this.topChartFn(this.dateYear,this.dateMonth)
|
|
|
},
|
|
|
bindDateCityChange(){
|
|
|
this.sortSelect = this.arrayNewCity[e.target.value]
|