console-main.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport"
  6. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <!-- 所有的 css & js 资源 -->
  8. <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
  9. <link rel="stylesheet" href="../../static/sa.css">
  10. <script src="../../static/kj/jquery.min.js"></script>
  11. <script src="../../static/kj/layer/layer.js"></script>
  12. <script src="../../static/sa.js"></script>
  13. <style type="text/css">
  14. .vue-box {
  15. margin: 0;
  16. padding: 0;
  17. height: 100%;
  18. }
  19. .el-card {
  20. border-radius: 0px;
  21. border: 1px #ddd solid;
  22. margin-bottom: 14px;
  23. }
  24. .s-row {
  25. /* background-color: antiquewhite; */
  26. padding: 10px 14px;
  27. padding-bottom: 0px;
  28. }
  29. .s-row-1 {
  30. padding-top: 14px;
  31. }
  32. .s-row-2 {
  33. /* margin-top: -10px; */
  34. }
  35. .s-row-2 .el-card .el-card__body {
  36. height: 250px;
  37. }
  38. .s-row-3 .el-card {
  39. /* height: 100%; */
  40. }
  41. .echarts-div {
  42. height: 100%;
  43. }
  44. .s-row-3 .el-alert {
  45. margin-bottom: 14px;
  46. }
  47. </style>
  48. </head>
  49. <body>
  50. <div class="vue-box" style="height: 980px;width: 100%;">
  51. <div v-if="currentCustomerId==1&&showStatics">
  52. <div class="s-row" style="background: #fff;">
  53. <com-sta-data></com-sta-data>
  54. </div>
  55. <el-row :gutter="10">
  56. <el-col span="12">
  57. <el-card class="box-card" style="height: 600px;overflow-y: auto;">
  58. <div slot="header" class="clearfix">
  59. <span>业务类型统计</span>
  60. <div style="float: right; padding: 3px 0">
  61. <el-date-picker v-model="feeType.date" type="daterange" range-separator="至"
  62. start-placeholder="开始日期" end-placeholder="结束日期" @change="getFeeTypeStatics">
  63. </el-date-picker>
  64. </div>
  65. <div>
  66. <el-table :data="feeType.list">
  67. <el-table-column type="index" width="50" label="序号">
  68. </el-table-column>
  69. <sa-td name="名称" prop="feeType" type="enum"
  70. :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车业务', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业',10:'总计'}"></sa-td>
  71. <el-table-column prop="total" label="数量">
  72. </el-table-column>
  73. <el-table-column prop="price" label="金额(元)">
  74. </el-table-column>
  75. </el-table>
  76. </div>
  77. </div>
  78. </el-card>
  79. </el-col>
  80. <el-col span="12">
  81. <el-card class="box-card" style="height: 600px;overflow-y: auto;">
  82. <div slot="header" class="clearfix">
  83. <span>收费项目统计</span>
  84. <div style="float: right; padding: 3px 0">
  85. <el-date-picker v-model="itemType.date" type="daterange" range-separator="至"
  86. start-placeholder="开始日期" end-placeholder="结束日期" @change="itemTypeStatics">
  87. </el-date-picker>
  88. </div>
  89. <div>
  90. <el-table :data="itemType.list">
  91. <el-table-column type="index" width="50" label="序号">
  92. </el-table-column>
  93. <el-table-column prop="name" label="名称">
  94. </el-table-column>
  95. <el-table-column prop="total" label="数量">
  96. </el-table-column>
  97. <el-table-column prop="price" label="金额(元)">
  98. </el-table-column>
  99. </el-table>
  100. </div>
  101. </div>
  102. </el-card>
  103. </el-col>
  104. </el-row>
  105. </div>
  106. <div v-if="currentCustomerId!==1||!showStatics"
  107. style="text-align: center; margin-top: 113px; font-size: 60px; letter-spacing: 30px;">
  108. 欢迎使用场站管理系统
  109. </div>
  110. </div>
  111. <script src="../../static/kj/vue.min.js"></script>
  112. <script src="../../static/kj/element-ui/index.js"></script>
  113. <script src="../../static/kj/httpVueLoader.js"></script>
  114. <script src="../../static/kj/jquery.min.js"></script>
  115. <script src="../../static/kj/layer/layer.js"></script>
  116. <!-- <script src="https://unpkg.com/echarts@4.6.0/dist/echarts-en.min.js"></script> -->
  117. <script src="../../static/sa.js"></script>
  118. <script type="text/javascript">
  119. var app = new Vue({
  120. components: {
  121. 'com-sta-data': httpVueLoader('com-sta-data.vue'),
  122. 'com-chart-1': httpVueLoader('com-chart-1.vue'),
  123. 'com-chart-2': httpVueLoader('com-chart-2.vue'),
  124. 'com-chart-3': httpVueLoader('com-chart-3.vue'),
  125. 'com-stack': httpVueLoader('com-stack.vue'),
  126. 'com-update-log': httpVueLoader('com-update-log.vue'),
  127. 'com-origin': httpVueLoader('com-origin.vue'),
  128. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  129. // 'com-intro': httpVueLoader('com-intro.vue'),
  130. },
  131. el: '.vue-box',
  132. data: {
  133. currentCustomerId: '-1',
  134. timmer: null,
  135. feeType: {
  136. date: [new Date(), new Date()],
  137. list: [],
  138. p: {
  139. startDay: '',
  140. endDay: ''
  141. }
  142. },
  143. itemType: {
  144. date: [new Date(), new Date()],
  145. list: [],
  146. p: {
  147. startDay: '',
  148. endDay: ''
  149. }
  150. },
  151. car: {
  152. totalCar: 1,
  153. inCar: 2,
  154. outCar: 3,
  155. weightCar: 0,
  156. emptyCar: 0
  157. },
  158. showStatics:false,
  159. },
  160. created(){
  161. this.getCurrUser();
  162. },
  163. methods: {
  164. getCurrUser() {
  165. let user = sa.$sys.getCurrUser();
  166. let roleId=user.roleId;
  167. this.showStatics=roleId!='233';
  168. },
  169. getCurrentCustomerId() {
  170. sa.ajaxNoLoading('/TbCostomer/getCurrentCustomerId', function(resp) {
  171. this.currentCustomerId = resp.data;
  172. }.bind(this));
  173. },
  174. itemTypeStatics() {
  175. let days = this.itemType.date;
  176. let p = this.itemType.p;
  177. if (days.length == 2) {
  178. p.startDay = sa.forDate(days[0]);
  179. p.endDay = sa.forDate(days[1]);
  180. }
  181. sa.ajaxNoLoading('/TbFeeDetails/itemTypeStatics', sa.removeNull(p), function(resp) {
  182. this.itemType.list = resp.data;
  183. }.bind(this))
  184. },
  185. getFeeTypeStatics() {
  186. let days = this.feeType.date;
  187. let p = this.feeType.p;
  188. if (days.length == 2) {
  189. p.startDay = sa.forDate(days[0]);
  190. p.endDay = sa.forDate(days[1]);
  191. }
  192. sa.ajaxNoLoading('/TbFeeDetails/feeTypeStatics', sa.removeNull(p), function(resp) {
  193. let list = resp.data;
  194. for (let i in list) {
  195. let item = list[i];
  196. if (!item.feeType) {
  197. item.feeType = 10;
  198. }
  199. }
  200. this.feeType.list = list;
  201. }.bind(this))
  202. }
  203. },
  204. mounted: function() {
  205. this.getFeeTypeStatics();
  206. this.itemTypeStatics();
  207. this.timmer = setInterval(() => {
  208. this.getFeeTypeStatics();
  209. this.itemTypeStatics();
  210. }, 300000)
  211. this.getCurrentCustomerId();
  212. },
  213. beforeDestroy() {
  214. if (this.timmer != null) {
  215. clearInterval(this.timmer);
  216. }
  217. }
  218. })
  219. // 设置监听,改变窗口大小时重绘图表
  220. window.myChartList = [];
  221. window.onresize = function() {
  222. myChartList.forEach(function(myChart) {
  223. myChart.resize();
  224. })
  225. }
  226. </script>
  227. </body>
  228. </html>