berths_usage.vue 7.4 KB

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