展品维保小程序后端接口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

319 lines
7.7 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <template>
  2. <div class="analysis-page">
  3. <!-- 展品数据统计看板 -->
  4. <ExhibitDataBoard />
  5. <!-- 原有的统计功能保留但注释可根据需要启用 -->
  6. <!--
  7. <div class="background-card">
  8. <a-input v-model="sql" @blur="enter" :readonly="true" placeholder="考虑到统计过于耗费性能,您可以通过点击指定块实时刷新数据!"></a-input>
  9. <div class="grid-line">
  10. <a-card style="width: 560px; min-height: 400px; height: auto; margin: 20px;" title="兼职发布情况" :bordered="false" @click="clickCard3">
  11. <a-table :dataSource="clickDataSource3" :columns="clickDolumns3" :pagination="false" />
  12. </a-card>
  13. <div style="width: 1080px; display: flex; flex-wrap: wrap;">
  14. <a-card class="mini-div" title="兼职点击统计" :bordered="false" @click="clickCard1">
  15. <a-table :dataSource="clickDataSource" :columns="clickDolumns" :pagination="false" />
  16. </a-card>
  17. <a-card class="mini-div" title="联系方式点击统计" :bordered="false" @click="clickCard2">
  18. <a-table :dataSource="clickDataSource2" :columns="clickDolumns2" :pagination="false" />
  19. </a-card>
  20. <a-card class="mini-div" title="用户统计" :bordered="false" @click="clickCard0">
  21. <a-row>
  22. <a-col :span="8">
  23. <a-statistic title="总用户/实名" :value="cmap.zs" >
  24. <template #suffix>
  25. <span>/ {{cmap.ps}}</span>
  26. </template>
  27. </a-statistic>
  28. </a-col>
  29. <a-col :span="8">
  30. <a-statistic title="今日" :value="cmap.za" >
  31. <template #suffix>
  32. <span>/ {{cmap.pa}}</span>
  33. </template>
  34. </a-statistic>
  35. </a-col>
  36. <a-col :span="8">
  37. <a-statistic title="昨日" :value="cmap.zd" >
  38. <template #suffix>
  39. <span>/ {{cmap.pd}}</span>
  40. </template>
  41. </a-statistic>
  42. </a-col>
  43. </a-row>
  44. <a-row style="margin-top: 40px;">
  45. <a-col :span="8">
  46. <a-statistic title="本周" :value="cmap.zb" >
  47. <template #suffix>
  48. <span>/ {{cmap.pb}}</span>
  49. </template>
  50. </a-statistic>
  51. </a-col>
  52. <a-col :span="8">
  53. <a-statistic title="本月" :value="cmap.zc" >
  54. <template #suffix>
  55. <span>/ {{cmap.pc}}</span>
  56. </template>
  57. </a-statistic>
  58. </a-col>
  59. </a-row>
  60. </a-card>
  61. <a-card class="mini-div" title="公众号概要" :bordered="false" @click="clickCard9">
  62. <a-row>
  63. <a-col :span="8">
  64. <a-statistic title="双端总用户" :value="cmbp.a" />
  65. </a-col>
  66. <a-col :span="8">
  67. <a-statistic title="平台用户" :value="cmbp.b" />
  68. </a-col>
  69. <a-col :span="8">
  70. <a-statistic title="关注公众号" :value="cmbp.c" />
  71. </a-col>
  72. </a-row>
  73. <a-row style="margin-top: 40px;">
  74. <a-col :span="8">
  75. <a-statistic title="未转公众号" :value="cmbp.d" />
  76. </a-col>
  77. <a-col :span="8">
  78. <a-statistic title="未转小程序" :value="cmbp.e" />
  79. </a-col>
  80. </a-row>
  81. </a-card>
  82. </div>
  83. </div>
  84. </div>
  85. -->
  86. </div>
  87. </template>
  88. <script>
  89. import { postAction, getAction } from '@/api/manage'
  90. import CryptoJS from 'crypto-js'
  91. import ExhibitDataBoard from '@/components/ExhibitDataBoard.vue'
  92. export default {
  93. name: "Analysis",
  94. components: {
  95. ExhibitDataBoard
  96. },
  97. data() {
  98. return {
  99. sql: '',
  100. cmap: {
  101. zs: 2500,
  102. ps: 300,
  103. za: 40,
  104. pa: 6,
  105. zb: 300,
  106. pb: 20,
  107. zc: 900,
  108. pc: 90,
  109. zd: 9999,
  110. pd: 9999
  111. },
  112. cmbp: {
  113. a: 9999,
  114. b: 9999,
  115. c: 9999,
  116. d: 9999,
  117. e: 9999,
  118. },
  119. clickDataSource: [
  120. {
  121. key: '1',
  122. name: '今日',
  123. a: 0,
  124. b: 0
  125. },
  126. {
  127. key: '2',
  128. name: '本周',
  129. a: 0,
  130. b: 0
  131. },
  132. {
  133. key: '3',
  134. name: '本月',
  135. a: 0,
  136. b: 0
  137. },
  138. {
  139. key: '4',
  140. name: '总计',
  141. a: 0,
  142. b: 0
  143. },
  144. ],
  145. clickDolumns: [
  146. {
  147. title: '区域',
  148. dataIndex: 'name',
  149. key: 'name',
  150. },
  151. {
  152. title: '点击次数',
  153. dataIndex: 'a',
  154. key: 'a',
  155. },
  156. {
  157. title: '点击人数',
  158. dataIndex: 'b',
  159. key: 'b',
  160. },
  161. ],
  162. clickDataSource2: [
  163. {
  164. key: '1',
  165. name: '今日',
  166. a: 0,
  167. b: 0
  168. },
  169. {
  170. key: '2',
  171. name: '本周',
  172. a: 0,
  173. b: 0
  174. },
  175. {
  176. key: '3',
  177. name: '本月',
  178. a: 0,
  179. b: 0
  180. },
  181. {
  182. key: '4',
  183. name: '总计',
  184. a: 0,
  185. b: 0
  186. },
  187. ],
  188. clickDolumns2: [
  189. {
  190. title: '区域',
  191. dataIndex: 'name',
  192. key: 'name',
  193. },
  194. {
  195. title: '点击次数',
  196. dataIndex: 'a',
  197. key: 'a',
  198. },
  199. {
  200. title: '点击人数',
  201. dataIndex: 'b',
  202. key: 'b',
  203. },
  204. ],
  205. clickDataSource3: [
  206. {
  207. key: '4',
  208. name: '统计',
  209. a: 0,
  210. b: 0,
  211. c: 0
  212. },
  213. ],
  214. clickDolumns3: [
  215. {
  216. title: '区域',
  217. dataIndex: 'name',
  218. key: 'name',
  219. },
  220. {
  221. title: '今日',
  222. dataIndex: 'a',
  223. key: 'a',
  224. },
  225. {
  226. title: '本周',
  227. dataIndex: 'b',
  228. key: 'b',
  229. },
  230. {
  231. title: '本月',
  232. dataIndex: 'c',
  233. key: 'c',
  234. },
  235. ],
  236. }
  237. },
  238. created() {
  239. // 注释掉原有的统计功能调用,因为现在使用ExhibitDataBoard组件
  240. // this.clickCard0()
  241. // this.clickCard1()
  242. // this.clickCard2()
  243. // this.clickCard3()
  244. // this.clickCard9()
  245. },
  246. methods: {
  247. // 保留原有方法以备后用
  248. clickCard0() {
  249. // 原有的用户统计逻辑
  250. },
  251. clickCard1() {
  252. // 原有的兼职点击统计逻辑
  253. },
  254. clickCard2() {
  255. // 原有的联系方式点击统计逻辑
  256. },
  257. clickCard3() {
  258. // 原有的兼职发布情况逻辑
  259. },
  260. clickCard9() {
  261. // 原有的公众号概要逻辑
  262. },
  263. enter() {
  264. // 原有的输入处理逻辑
  265. }
  266. }
  267. }
  268. </script>
  269. <style scoped>
  270. .analysis-page {
  271. min-height: 100vh;
  272. background-color: #f5f5f5;
  273. padding: 24px;
  274. }
  275. /* 保留原有样式以备后用 */
  276. .background-card {
  277. width: 100%;
  278. min-height: 780px;
  279. height: auto;
  280. text-align: right;
  281. margin-top: 20px;
  282. background-color: #FFF;
  283. }
  284. .grid-line {
  285. width: 100%;
  286. min-height: 780px;
  287. height: auto;
  288. text-align: center;
  289. color: blue;
  290. box-sizing: border-box;
  291. background: -webkit-linear-gradient(top, transparent 15px, #eee 0), -webkit-linear-gradient(left, transparent 15px, #eee 0);
  292. background-size: 16px 16px;
  293. position: relative;
  294. display: flex;
  295. flex-wrap: wrap;
  296. }
  297. .mini-div {
  298. width: 480px;
  299. min-height: 400px;
  300. height: auto;
  301. margin: 20px;
  302. }
  303. </style>