reportDetails.vue
7.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<template>
<view class="ComCss">
<u-sticky bgColor="#fff" customNavHeight="0" offsetTop="0">
<u-navbar v-if="!$isDing" class="navBarCss" :title="reportData1.reportName"
:titleStyle="{'fontSize':'36rpx','color':'#333333','fontWeight':'700'}" leftClick="leftClick" :autoBack="true"
safeAreaInsetTop placeholder />
<view class="topCss">
<u-tabs :list="tabList" @click="modifyCur" :current="current" lineColor="#f56c6c" :activeStyle="{
color: '#cf000d',
fontWeight: 'bold',
transform: 'scale(1.1)',
fontSize:'32rpx'
}" itemStyle="height: 78rpx;padding:22rpx 34rpx">
</u-tabs>
</view>
</u-sticky>
<view class="bodyCss">
<reportModule1 v-if="current == 0" :reportData="reportData1"></reportModule1>
<reportModule2 v-if="current == 1" :reportData="reportData2" :attachment="reportData2attachment"
:fiscalYear="fiscalYear">
</reportModule2>
<reportModule3 v-if="current == 2" :reportData="reportData3" :newBuildingInfo="reportData3newBuildingInfo"
:newBuildingItem="reportData3newBuildingItem" :fiscalYear="fiscalYear"></reportModule3>
<reportModule4 v-if="current == 3" :reportData="reportData4" :fiscalYear="fiscalYear"></reportModule4>
<reportModule5 v-if="current == 4" :reportData="reportData5" :fiscalYear="fiscalYear"></reportModule5>
<u-back-top :scroll-top="scrollTop" bottom="10" right="10" z-index="999" :customStyle="{'background':'#CF000D'}"
:iconStyle="{color:'#fff'}"></u-back-top>
</view>
</view>
</template>
<script>
import {
getOrganize,
getGeneralOverview,
getGeneralOverviewAttach,
getBusinessAnalyze,
getNewBuildingInfo,
getNewBuildingItem,
getDevelopmentPlan,
getTargetSuggestion,
getInsightFileList
} from '@/api/organize.js'
import reportModule1 from "./components/reportModule1.vue"
import reportModule2 from "./components/reportModule2.vue"
import reportModule3 from "./components/reportModule3.vue"
import reportModule4 from "./components/reportModule4.vue"
import reportModule5 from "./components/reportModule5.vue"
export default {
components: {
reportModule1,
reportModule2,
reportModule3,
reportModule4,
reportModule5
},
props: {
},
data() {
return {
current: 0,
scrollTop: 0,
reportNo: null,
fiscalYear: "",
reportData1: {},
reportData2: {},
reportData2attachment: {},
reportData3: {},
reportData3newBuildingInfo: {},
reportData3newBuildingItem: {},
reportData4: {},
reportData5: {},
tabList: [{
name: '"五看"市场调研'
}, {
name: '天然气市场总体概况',
}, {
name: '重点业务市场分析'
}, {
name: '三定(定战略控制点、定目标)'
}, {
name: '三定(定策略)'
}],
}
},
computed: {
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
onLoad(data) {
if (data) {
this.reportNo = data.reportNo;
this.fiscalYear = data.fiscalYear;
}
console.log(this.reportNo);
this.initData()
},
methods: {
modifyCur(data) {
this.current = data.index;
},
async initData() {
// await Promise.all([
// this.feachData(this.getOrganize, 'reportData1', '1、组织'),
// this.feachData(this.getGeneralOverview, 'reportData2', '2、天然气'),
// this.feachData(this.getGeneralOverviewAttach, 'reportData2attachment', '3、天然气附表'),
// this.feachData(this.getBusinessAnalyze, 'reportData3', '4、重点业务市场分析'),
// this.feachData(this.getNewBuildingInfo, 'reportData3newBuildingInfo', '5、楼盘预计未来三年确认的新建楼盘信息'),
// this.feachData(this.getNewBuildingItem, 'reportData3newBuildingItem', '6、预计未来三年安装确认项目'),
// this.feachData(this.getDevelopmentPlan, 'reportData4', '7、未来发展规划'),
// this.feachData(this.getTargetSuggestion, 'reportData5', '8、目标思路建议')
// ]);
const getData = async (getDataFunc, dataField, logMessage) => {
const res = await getDataFunc(this.reportNo);
if (res.code === 200) {
this[dataField] = res.data;
}
console.log(logMessage, JSON.parse(JSON.stringify(this[dataField])));
};
await Promise.all([
getData(getOrganize, 'reportData1', '1、组织'),
getData(getGeneralOverview, 'reportData2', '2、天然气'),
getData(getGeneralOverviewAttach, 'reportData2attachment', '3、天然气附表'),
getData(getBusinessAnalyze, 'reportData3', '4、重点业务市场分析'),
getData(getNewBuildingInfo, 'reportData3newBuildingInfo', '5、楼盘预计未来三年确认的新建楼盘信息'),
getData(getNewBuildingItem, 'reportData3newBuildingItem', '6、预计未来三年安装确认项目'),
getData(getDevelopmentPlan, 'reportData4', '7、未来发展规划'),
getData(getTargetSuggestion, 'reportData5', '8、目标思路建议')
]);
// await getOrganize(this.reportNo).then(res => {
// if (res.code === 200) {
// this.reportData1 = res.data;
// }
// console.log("1、组织", JSON.parse(JSON.stringify(this.reportData1)));
// })
// await getGeneralOverview(this.reportNo).then(res => {
// if (res.code === 200) {
// this.reportData2 = res.data;
// }
// console.log("2、天然气", JSON.parse(JSON.stringify(this.reportData2)));
// })
// await getGeneralOverviewAttach(this.reportNo).then(res => {
// if (res.code === 200) {
// this.reportData2attachment = res.data;
// }
// console.log("3、天然气附表", JSON.parse(JSON.stringify(this.reportData2attachment)));
// })
// await getBusinessAnalyze(this.reportNo).then(res => {
// if (res.code === 200) {
// this.reportData3 = res.data;
// }
// console.log("4、重点业务市场分析", JSON.parse(JSON.stringify(this.reportData3)));
// })
// await getNewBuildingInfo(this.reportNo).then(res => {
// if (res.code === 200) {
// this.reportData3newBuildingInfo = res.data;
// }
// console.log("5、楼盘预计未来三年确认的新建楼盘信息", JSON.parse(JSON.stringify(this.reportData3newBuildingInfo)));
// })
// await getNewBuildingItem(this.reportNo).then(res => {
// if (res.code === 200) {
// this.reportData3newBuildingItem = res.data;
// }
// console.log("6、预计未来三年安装确认项目", JSON.parse(JSON.stringify(this.reportData3newBuildingItem)));
// })
// await getDevelopmentPlan(this.reportNo).then(res => {
// if (res.code === 200) {
// this.reportData4 = res.data;
// }
// console.log("7、未来发展规划", JSON.parse(JSON.stringify(this.reportData4)));
// })
// await getTargetSuggestion(this.reportNo).then(res => {
// if (res.code === 200) {
// this.reportData5 = res.data;
// }
// console.log("8、目标思路建议", JSON.parse(JSON.stringify(this.reportData5)));
// })
}
}
}
</script>
<style lang="scss" scoped>
.ComCss {
background: #f2f4f3;
}
.topCss {
background: #fff;
}
.bodyCss {}
</style>