berths_revenue.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. <template>
  2. <div class="body-wrapper">
  3. <h4 style="color: #FFFFFF">泊位营收情况</h4>
  4. <el-form class="form-wrapper" :inline="true" :model="formInline">
  5. <el-form-item label="行政区">
  6. <el-select clearable v-model="formInline.regionCode" placeholder="请选择" popper-class="cur-select">
  7. <el-option v-for="item in districtOptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
  8. </el-select>
  9. </el-form-item>
  10. <el-form-item clearable label="重点区域">
  11. <el-select clearable v-model="formInline.keyAreas" placeholder="请选择" popper-class="cur-select">
  12. <el-option v-for="item in keyAreaOptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
  13. </el-select>
  14. </el-form-item>
  15. <el-form-item clearable label="具体道路">
  16. <el-input v-model="formInline.streetName" placeholder="请输入"></el-input>
  17. </el-form-item>
  18. <el-form-item label="停车场">
  19. <el-select clearable v-model="formInline.parkId" placeholder="请选择" popper-class="cur-select">
  20. <el-option v-for="item in carOptions" :key="item.parkId" :label="item.carParkName" :value="item.parkId"></el-option>
  21. </el-select>
  22. </el-form-item>
  23. <el-form-item label="查询日期">
  24. <el-date-picker
  25. clearable
  26. v-model="formInline.time"
  27. type="daterange"
  28. range-separator="至"
  29. start-placeholder="开始日期"
  30. value-format="yyyy-MM-dd"
  31. end-placeholder="结束日期">
  32. </el-date-picker>
  33. </el-form-item>
  34. <el-form-item>
  35. <el-button type="primary" @click="queryAll">查询</el-button>
  36. </el-form-item>
  37. </el-form>
  38. <br>
  39. <div style="width: 100%;">
  40. <div style="width: 100%;height: 400px;">
  41. <h4 style="color: white">按小时统计</h4>
  42. <br>
  43. <linechart
  44. :autoStop="false"
  45. :top="30"
  46. :bottom="30"
  47. :left="40"
  48. :legendTop="0"
  49. yAxisName="(元)"
  50. :dataset="linedata"
  51. :tooltipFormat="lineTooltipFormat"
  52. :encode="[
  53. { x: 'mouth', y: 'lastAmount', seriesName: '',bool:'true' },
  54. ]"
  55. id="axstj"
  56. />
  57. </div>
  58. <br>
  59. <br>
  60. <br>
  61. <div style="width: 100%;height: 400px;">
  62. <h4 style="color: white">按日统计</h4>
  63. <br>
  64. <linechart
  65. :autoStop="false"
  66. :top="30"
  67. :bottom="30"
  68. :left="40"
  69. :legendTop="0"
  70. yAxisName="(元)"
  71. :dataset="linedata2"
  72. :tooltipFormat="lineTooltipFormat"
  73. :encode="[
  74. { x: 'mouth', y: 'lastAmount', seriesName: '',bool:'true' },
  75. ]"
  76. id="artj"
  77. />
  78. </div>
  79. <br>
  80. <br>
  81. <br>
  82. <div style="width: 100%;height: 400px;">
  83. <h4 style="color: white">按周统计</h4>
  84. <br>
  85. <linechart
  86. :autoStop="false"
  87. :top="30"
  88. :bottom="30"
  89. :left="40"
  90. :legendTop="0"
  91. yAxisName="(元)"
  92. :dataset="linedata3"
  93. :tooltipFormat="lineTooltipFormat"
  94. :encode="[
  95. { x: 'mouth', y: 'lastAmount', seriesName: '',bool:'true' },
  96. ]"
  97. id="aztj"
  98. />
  99. </div>
  100. <br>
  101. <br>
  102. <br>
  103. <div style="width: 100%;height: 400px;">
  104. <h4 style="color: white">按月统计</h4>
  105. <br>
  106. <linechart
  107. :autoStop="false"
  108. :top="30"
  109. :bottom="30"
  110. :left="40"
  111. :legendTop="0"
  112. yAxisName="(元)"
  113. :dataset="linedata4"
  114. :tooltipFormat="lineTooltipFormat"
  115. :encode="[
  116. { x: 'mouth', y: 'lastAmount', seriesName: '',bool:'true' },
  117. ]"
  118. id="aytj"
  119. />
  120. </div>
  121. <br>
  122. <br>
  123. <br>
  124. <div style="width: 100%;height: 400px;">
  125. <h4 style="color: white">按年统计</h4>
  126. <br>
  127. <linechart
  128. :autoStop="false"
  129. :top="30"
  130. :bottom="30"
  131. :left="40"
  132. :legendTop="0"
  133. yAxisName="(元)"
  134. :dataset="linedata5"
  135. :tooltipFormat="lineTooltipFormat"
  136. :encode="[
  137. { x: 'mouth', y: 'lastAmount', seriesName: '',bool:'true' },
  138. ]"
  139. id="antj"
  140. />
  141. </div>
  142. <br>
  143. </div>
  144. </div>
  145. </template>
  146. <script>
  147. import api from "@/api/article_liao";
  148. import linechart from "@/components/lineChart";
  149. import options from '@/util/options'
  150. export default {
  151. components: {
  152. linechart
  153. },
  154. data() {
  155. return {
  156. districtOptions: options.districtOptions,
  157. keyAreaOptions: options.keyAreaOptions,
  158. carOptions: [],
  159. linedata: [],
  160. linedata2: [],
  161. linedata3: [],
  162. linedata4: [],
  163. linedata5: [],
  164. tableData: [],
  165. total: 0,
  166. pageSize: 10,
  167. pageNum: 1,
  168. radio: '2',
  169. dialogVisible: false,
  170. selRow: {},
  171. formInline: {
  172. regionCode: '',
  173. keyAreas: '',
  174. streetName: '',
  175. parkId: '',
  176. time: [],
  177. }
  178. }
  179. },
  180. mounted() {
  181. this.getParkDic()
  182. this.queryAll()
  183. },
  184. watch: {
  185. },
  186. methods: {
  187. getParkDic() {
  188. api.parkDic().then(res => {
  189. this.carOptions = res.data || [];
  190. })
  191. },
  192. queryAll() {
  193. let params = {...this.formInline}
  194. if (
  195. this.formInline.time && this.formInline.time.length === 2 &&
  196. this.formInline.time[1] !== ""
  197. ) {
  198. this.formInline.time[0] = this.formInline.time[0].substring(0, 10) + " 00:00:00";
  199. this.formInline.time[1] = this.formInline.time[1].substring(0, 10) + " 23:59:59";
  200. params.begin= this.formInline.time[0]
  201. params.end = this.formInline.time[1]
  202. }
  203. delete params.time
  204. this.dashBerthsRevenueStat1(params)
  205. this.dashBerthsRevenueStat2(params)
  206. this.dashBerthsRevenueStat3(params)
  207. this.dashBerthsRevenueStat4(params)
  208. this.dashBerthsRevenueStat5(params)
  209. },
  210. lineTooltipFormat(params) {
  211. return `<div class="line-tooltip">
  212. <div style="color: ${params[0].color}">${params[0].data.mouth} : ${
  213. params[0].data.lastAmount || "--"
  214. }元</div>`;
  215. },
  216. dashBerthsRevenueStat1(params){
  217. api.dashBerthsRevenueStat1(params).then(res =>{
  218. this.linedata = res.data
  219. })
  220. },
  221. dashBerthsRevenueStat2(params){
  222. api.dashBerthsRevenueStat2(params).then(res =>{
  223. this.linedata2 = res.data
  224. })
  225. },
  226. dashBerthsRevenueStat3(params){
  227. api.dashBerthsRevenueStat3(params).then(res =>{
  228. this.linedata3 = res.data
  229. })
  230. },
  231. dashBerthsRevenueStat4(params){
  232. api.dashBerthsRevenueStat4(params).then(res =>{
  233. this.linedata4 = res.data
  234. })
  235. },
  236. dashBerthsRevenueStat5(params){
  237. api.dashBerthsRevenueStat5(params).then(res =>{
  238. this.linedata5 = res.data
  239. })
  240. },
  241. }
  242. }
  243. </script>
  244. <style lang="scss" scoped>
  245. .form-wrapper {
  246. margin-bottom: 20px;
  247. }
  248. /deep/ .el-input__inner {
  249. background: #2d3744;
  250. border: none;
  251. border-radius: 0;
  252. }
  253. /deep/ .el-select {
  254. height: 40px;
  255. .el-input__inner {
  256. height: 40px;
  257. }
  258. .el-input__prefix, .el-input__suffix {
  259. height: 40px;
  260. }
  261. /* 下面设置右侧按钮居中 */
  262. .el-input__suffix {
  263. top: 0px;
  264. display: flex;
  265. justify-content: center;
  266. align-items: center;
  267. flex-wrap: nowrap;
  268. flex-direction: row;
  269. align-content: flex-start;
  270. }
  271. /* 输入框加上上下边是 32px + 2px =34px */
  272. .el-input__icon {
  273. line-height: 0px;
  274. }
  275. }
  276. /deep/ .form-wrapper .el-button {
  277. background: linear-gradient(90deg,#0158d9,#3c97e4);
  278. width: 100px;
  279. height: 40px;
  280. }
  281. .body-wrapper {
  282. padding: 20px;
  283. background: #0c0c0c;
  284. .button-block{
  285. text-align: right;
  286. margin-bottom: 20px;
  287. }
  288. .table-pagination{
  289. text-align: right;
  290. }
  291. }
  292. .audit-dialog{
  293. .mg-bt{
  294. margin-bottom: 24px;
  295. }
  296. .label{
  297. text-align: right;
  298. }
  299. }
  300. /deep/ .el-textarea.is-disabled .el-textarea__inner {
  301. background: #2a2a2a;
  302. color: #fff;
  303. }
  304. </style>