| 1 |
- {"remainingRequest":"D:\\front\\item\\zyAdmin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\front\\item\\zyAdmin\\src\\pages\\statistic\\user\\index.vue?vue&type=style&index=0&id=e6b1c09e&scoped=true&lang=css","dependencies":[{"path":"D:\\front\\item\\zyAdmin\\src\\pages\\statistic\\user\\index.vue","mtime":1761614939066},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\css-loader\\index.js","mtime":1761614929364},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":1761614937403},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\postcss-loader\\src\\index.js","mtime":1761614935133},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1761614927801},{"path":"D:\\front\\item\\zyAdmin\\node_modules\\vue-loader\\lib\\index.js","mtime":1761614937402}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:DQouaXZ1LWZvcm0taXRlbSB7DQogIHBhZGRpbmctYm90dG9tOiAxMHB4Ow0KICBtYXJnaW4tYm90dG9tOiAwOw0KfQ0K"},{"version":3,"sources":["index.vue"],"names":[],"mappings":";AAuHA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/pages/statistic/user","sourcesContent":["<template>\r\n <div class=\"article-manager\">\r\n <el-card :bordered=\"false\" shadow=\"never\" class=\"ivu-mb-16\" :body-style=\"{ padding: 0 }\">\r\n <div class=\"padding-add\">\r\n <el-form ref=\"formInline\" label-width=\"80px\" label-position=\"right\" :model=\"formInline\" inline>\r\n <el-form-item label=\"用户渠道:\">\r\n <el-select\r\n clearable\r\n v-model=\"channel_type\"\r\n placeholder=\"请选择用户渠道\"\r\n @change=\"changeTxt\"\r\n class=\"form_content_width\"\r\n >\r\n <el-option value=\"all\" label=\"全部\"></el-option>\r\n <el-option value=\"wechat\" label=\"公众号\"></el-option>\r\n <el-option value=\"routine\" label=\"小程序\"></el-option>\r\n <el-option value=\"h5\" label=\"H5\"></el-option>\r\n <el-option value=\"pc\" label=\"PC\"></el-option>\r\n <el-option value=\"app\" label=\"APP\"></el-option>\r\n </el-select>\r\n </el-form-item>\r\n <el-form-item label=\"选择时间:\">\r\n <el-date-picker\r\n clearable\r\n v-model=\"timeVal\"\r\n type=\"daterange\"\r\n :editable=\"false\"\r\n @change=\"onchangeTime\"\r\n format=\"yyyy/MM/dd\"\r\n value-format=\"yyyy/MM/dd\"\r\n start-placeholder=\"开始日期\"\r\n end-placeholder=\"结束日期\"\r\n :picker-options=\"pickerOptions\"\r\n style=\"width: 250px\"\r\n class=\"mr20\"\r\n ></el-date-picker>\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button type=\"primary\" v-db-click @click=\"handleSubmit('formInline')\">查询</el-button>\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button v-db-click @click=\"excel\">导出</el-button>\r\n </el-form-item>\r\n </el-form>\r\n </div>\r\n </el-card>\r\n <user-info :formInline=\"formInline\" ref=\"userInfos\" key=\"1\"></user-info>\r\n <wechet-info :formInline=\"formInline\" ref=\"wechetInfos\" v-if=\"isShow\" key=\"2\"></wechet-info>\r\n <user-region :formInline=\"formInline\" ref=\"userRegions\" key=\"3\"></user-region>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport userInfo from './components/userInfo';\r\nimport wechetInfo from './components/wechetInfo';\r\nimport userRegion from './components/userRegion';\r\nimport { statisticUserExcel } from '@/api/statistic';\r\nimport { formatDate } from '@/utils/validate';\r\nexport default {\r\n name: 'index',\r\n components: {\r\n userInfo,\r\n wechetInfo,\r\n userRegion,\r\n },\r\n data() {\r\n return {\r\n formInline: {\r\n channel_type: '',\r\n data: '',\r\n },\r\n channel_type: 'all',\r\n timeVal: [],\r\n isShow: false,\r\n pickerOptions: this.$timeOptions,\r\n };\r\n },\r\n created() {\r\n const end = new Date();\r\n const start = new Date();\r\n start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 29)));\r\n this.timeVal = [start, end];\r\n this.formInline.data = formatDate(start, 'yyyy/MM/dd') + '-' + formatDate(end, 'yyyy/MM/dd');\r\n },\r\n methods: {\r\n changeTxt() {\r\n this.formInline.channel_type = this.channel_type === 'all' ? '' : this.channel_type;\r\n },\r\n // 导出\r\n excel() {\r\n statisticUserExcel(this.formInline).then(async (res) => {\r\n res.data.url.map((item) => {\r\n window.location.href = item;\r\n });\r\n });\r\n },\r\n // 具体日期\r\n onchangeTime(e) {\r\n this.timeVal = e;\r\n this.formInline.data = this.timeVal ? this.timeVal.join('-') : '';\r\n },\r\n handleSubmit() {\r\n this.$refs.userInfos.getStatistics();\r\n this.$refs.userInfos.getTrend();\r\n this.$refs.userRegions.getTrend();\r\n this.$refs.userRegions.getSex();\r\n if (this.formInline.channel_type === 'wechat') {\r\n this.isShow = true;\r\n this.$refs.wechetInfos.getStatistics();\r\n this.$refs.wechetInfos.getTrend();\r\n } else {\r\n this.isShow = false;\r\n }\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<style scoped>\r\n.ivu-form-item {\r\n padding-bottom: 10px;\r\n margin-bottom: 0;\r\n}\r\n</style>\r\n"]}]}
|