Commit e9f6116e by ext.wangyuman1

Merge branch 'vue3-master' of https://e.coding.net/linkwechat/linkwechat-front/l…

…inkwechat into bs-dev-wangyuman
2 parents 728cf469 091177cd
...@@ -2,9 +2,19 @@ ...@@ -2,9 +2,19 @@
2023.xx.xx 2023.xx.xx
1. 客群 sop 基础类型字段值调整,校验调整 1.
2. 岗位组件岗位值去重 2.
3. 新增暗黑主题模式 3.
### v5.1.0
2023.06.30
1. 新增暗黑主题模式
2. 客群 sop 基础类型字段值调整,校验调整
3. 岗位组件岗位值去重
4. 表单导出修改
5. 其他已知 bug 修复等
### v5.0.1 ### v5.0.1
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
--color-light-8: hsl(var(--h), var(--s), calc(var(--step) * 8 + var(--l))); /* hsl(149, 93%, 88%) */ --color-light-8: hsl(var(--h), var(--s), calc(var(--step) * 8 + var(--l))); /* hsl(149, 93%, 88%) */
--color-light-9: hsl(var(--h), var(--s), calc(var(--step) * 9 + var(--l))); /* hsl(149, 93%, 94%) */ --color-light-9: hsl(var(--h), var(--s), calc(var(--step) * 9 + var(--l))); /* hsl(149, 93%, 94%) */
--color-light-10: hsl(var(--h), var(--s), calc(var(--step) * 9.5 + var(--l))); /* :hsl(149, 93%, 97%) */ --color-light-10: hsl(var(--h), var(--s), calc(var(--step) * 9.5 + var(--l))); /* :hsl(149, 93%, 97%) */
--test: hsl(149, 93%, 88%); /* --test: hsl(149, 93%, 88%); */
/* ------ 通用字体白色 ------ */ /* ------ 通用字体白色 ------ */
--font-white: #fff; --font-white: #fff;
......
...@@ -30,7 +30,7 @@ export function insertInfoToSurvey(data) { ...@@ -30,7 +30,7 @@ export function insertInfoToSurvey(data) {
return request({ return request({
url: service + '/survey/add', url: service + '/survey/add',
method: 'post', method: 'post',
data, data
}) })
} }
...@@ -39,7 +39,7 @@ export function surveyList(data) { ...@@ -39,7 +39,7 @@ export function surveyList(data) {
return request({ return request({
url: service + '/survey/list', url: service + '/survey/list',
method: 'GET', method: 'GET',
params: data, params: data
}) })
} }
...@@ -47,7 +47,7 @@ export function surveyList(data) { ...@@ -47,7 +47,7 @@ export function surveyList(data) {
export function deleteInfoToSurvey(ids) { export function deleteInfoToSurvey(ids) {
return request({ return request({
url: service + '/survey/delete/' + ids, url: service + '/survey/delete/' + ids,
method: 'DELETE', method: 'DELETE'
}) })
} }
...@@ -55,7 +55,7 @@ export function deleteInfoToSurvey(ids) { ...@@ -55,7 +55,7 @@ export function deleteInfoToSurvey(ids) {
export function selectInfoToSurvey(id) { export function selectInfoToSurvey(id) {
return request({ return request({
url: service + '/survey/getInfo/' + id, url: service + '/survey/getInfo/' + id,
method: 'GET', method: 'GET'
}) })
} }
...@@ -64,7 +64,7 @@ export function submitForm(data) { ...@@ -64,7 +64,7 @@ export function submitForm(data) {
return request({ return request({
url: service + '/answer/add', url: service + '/answer/add',
method: 'post', method: 'post',
data, data
}) })
} }
...@@ -73,7 +73,7 @@ export function isCompleteSurvey(data) { ...@@ -73,7 +73,7 @@ export function isCompleteSurvey(data) {
return request({ return request({
url: service + '/answer/isCompleteSurvey', url: service + '/answer/isCompleteSurvey',
method: 'post', method: 'post',
data, data
}) })
} }
...@@ -82,7 +82,7 @@ export function insertPieValue(data) { ...@@ -82,7 +82,7 @@ export function insertPieValue(data) {
return request({ return request({
url: service + '/statistic/insertPieValue', url: service + '/statistic/insertPieValue',
method: 'post', method: 'post',
data, data
}) })
} }
...@@ -91,7 +91,7 @@ export function updateSurveyStatus(data) { ...@@ -91,7 +91,7 @@ export function updateSurveyStatus(data) {
return request({ return request({
url: service + '/survey/updateStatus', url: service + '/survey/updateStatus',
method: 'put', method: 'put',
data, data
}) })
} }
...@@ -100,7 +100,7 @@ export function getAccessToken(data) { ...@@ -100,7 +100,7 @@ export function getAccessToken(data) {
return request({ return request({
url: service + '/Statistics/getAccessToken' + data, url: service + '/Statistics/getAccessToken' + data,
method: 'get', method: 'get',
data, data
}) })
} }
...@@ -109,7 +109,7 @@ export function updateSurveyGroup(data) { ...@@ -109,7 +109,7 @@ export function updateSurveyGroup(data) {
return request({ return request({
url: service + '/updateSurveyGroup', url: service + '/updateSurveyGroup',
method: 'post', method: 'post',
data, data
}) })
} }
...@@ -120,7 +120,7 @@ export function selectStatistics(data) { ...@@ -120,7 +120,7 @@ export function selectStatistics(data) {
return request({ return request({
url: service + '/statistic/getStatistics', url: service + '/statistic/getStatistics',
method: 'get', method: 'get',
params: data, params: data
}) })
} }
...@@ -129,7 +129,7 @@ export function lineChart(data) { ...@@ -129,7 +129,7 @@ export function lineChart(data) {
return request({ return request({
url: service + '/statistic/lineChart', url: service + '/statistic/lineChart',
method: 'post', method: 'post',
data, data
}) })
} }
...@@ -138,7 +138,7 @@ export function StatisticsDataList(data) { ...@@ -138,7 +138,7 @@ export function StatisticsDataList(data) {
return request({ return request({
url: service + '/statistic/dataList', url: service + '/statistic/dataList',
method: 'post', method: 'post',
data, data
}) })
} }
...@@ -147,7 +147,7 @@ export function updateInfoToSurvey(data) { ...@@ -147,7 +147,7 @@ export function updateInfoToSurvey(data) {
return request({ return request({
url: service + '/survey/update', url: service + '/survey/update',
method: 'put', method: 'put',
data, data
}) })
} }
...@@ -156,7 +156,7 @@ export function selectAnswerInfo(data) { ...@@ -156,7 +156,7 @@ export function selectAnswerInfo(data) {
return request({ return request({
url: service + '/answer/getAnswerList', url: service + '/answer/getAnswerList',
method: 'post', method: 'post',
data, data
}) })
} }
...@@ -165,7 +165,7 @@ export function pieChart(data) { ...@@ -165,7 +165,7 @@ export function pieChart(data) {
return request({ return request({
url: service + '/statistic/pieChart', url: service + '/statistic/pieChart',
method: 'post', method: 'post',
data, data
}) })
} }
...@@ -186,6 +186,7 @@ export function overviewExport(data) { ...@@ -186,6 +186,7 @@ export function overviewExport(data) {
url: service + '/statistic/data/export', url: service + '/statistic/data/export',
method: 'post', method: 'post',
data, data,
responseType: 'blob'
}) })
} }
...@@ -195,7 +196,7 @@ export function answerExport(data) { ...@@ -195,7 +196,7 @@ export function answerExport(data) {
url: service + '/statistic/answer/export', url: service + '/statistic/answer/export',
method: 'get', method: 'get',
params: data, params: data,
responseType: 'blob', responseType: 'blob'
}) })
} }
...@@ -205,6 +206,7 @@ export function userExport(data) { ...@@ -205,6 +206,7 @@ export function userExport(data) {
url: service + '/statistic/user/export', url: service + '/statistic/user/export',
method: 'post', method: 'post',
data, data,
responseType: 'blob'
}) })
} }
...@@ -213,7 +215,7 @@ export function statisticsCustomer(data) { ...@@ -213,7 +215,7 @@ export function statisticsCustomer(data) {
return request({ return request({
url: service + '/statistic/customer', url: service + '/statistic/customer',
method: 'post', method: 'post',
data, data
}) })
} }
...@@ -222,7 +224,7 @@ export function areaStatistic(data) { ...@@ -222,7 +224,7 @@ export function areaStatistic(data) {
return request({ return request({
url: service + '/statistic/areaStatistic', url: service + '/statistic/areaStatistic',
method: 'post', method: 'post',
data, data
}) })
} }
...@@ -239,6 +241,6 @@ export function siteStas(data) { ...@@ -239,6 +241,6 @@ export function siteStas(data) {
return request({ return request({
url: service + '/statistic/siteStas', url: service + '/statistic/siteStas',
method: 'post', method: 'post',
data, data
}) })
} }
...@@ -45,7 +45,7 @@ const common = { ...@@ -45,7 +45,7 @@ const common = {
// 以下仅用于系统信息展示,不作为项目变量使用,请勿在代码中使用 // 以下仅用于系统信息展示,不作为项目变量使用,请勿在代码中使用
const project = { const project = {
// _version: 'v5.0.0', // 当前版本信息 _version: 'v5.1.0', // 当前版本信息
_packDateTime: __PACK_DATETIME__, // 打包时间 _packDateTime: __PACK_DATETIME__, // 打包时间
_env: process.env.VUE_APP_ENV, // 前端系统环境模式 _env: process.env.VUE_APP_ENV, // 前端系统环境模式
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<!--话术中心的数据明细 --> <!--话术中心的数据明细 -->
<div class="margin-top: 10px;"> <div class="margin-top: 10px;">
<el-table :data="tableList" style="width: 100%"> <el-table :data="tableList" style="width: 100%;">
<el-table-column prop="name" label="素材" align="left"> <el-table-column prop="name" label="素材" align="left">
<template #default="{ row }"> <template #default="{ row }">
<span class="title">{{ row.materialName }}</span> <span class="title">{{ row.materialName }}</span>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-image :src="row.materialUrl" fit="contain" class="imgsize"></el-image> <el-image :src="row.materialUrl" fit="contain" class="imgsize"></el-image>
</div> </div>
<!-- 图文 --> <!-- 图文 -->
<div v-if="row.mediaType === '9'" style="display: flex"> <div v-if="row.mediaType === '9'" style="display: flex;">
<el-image v-if="row.coverUrl" :src="row.coverUrl" fit="contain" class="imgsize"></el-image> <el-image v-if="row.coverUrl" :src="row.coverUrl" fit="contain" class="imgsize"></el-image>
<div class="icon-style" v-else> <div class="icon-style" v-else>
<svg-icon class="icon-style" icon="imgText"></svg-icon> <svg-icon class="icon-style" icon="imgText"></svg-icon>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<el-image :src="row.coverUrl" fit="contain" class="imgsize"></el-image> <el-image :src="row.coverUrl" fit="contain" class="imgsize"></el-image>
</div> </div>
<!-- 文章 --> <!-- 文章 -->
<div v-if="row.mediaType === '12'" style="display: flex"> <div v-if="row.mediaType === '12'" style="display: flex;">
<el-image v-if="row.coverUrl" :src="row.coverUrl" fit="contain" class="imgsize"></el-image> <el-image v-if="row.coverUrl" :src="row.coverUrl" fit="contain" class="imgsize"></el-image>
<div class="icon-style" v-else> <div class="icon-style" v-else>
<svg-icon class="icon-style" icon="article"></svg-icon> <svg-icon class="icon-style" icon="article"></svg-icon>
...@@ -35,21 +35,22 @@ ...@@ -35,21 +35,22 @@
<span class="twosplice mt10">{{ coverContent(row.digest) }}</span> <span class="twosplice mt10">{{ coverContent(row.digest) }}</span>
</div> </div>
<!-- 视频 --> <!-- 视频 -->
<div v-if="row.mediaType === '2'" style="display: flex"> <div v-if="row.mediaType === '2'" style="display: flex;">
<el-image :src="row.coverUrl" fit="contain" class="imgsize"></el-image> <el-image :src="row.coverUrl" fit="contain" class="imgsize"></el-image>
<span class="twosplice mt10">{{ coverContent(row.digest) }}</span> <span class="twosplice mt10">{{ coverContent(row.digest) }}</span>
</div> </div>
<!-- 文件 --> <!-- 文件 -->
<div v-if="row.mediaType === '3'" style="display: flex"> <div v-if="row.mediaType === '3'" style="display: flex;">
<!-- <el-image :src="row.coverUrl" fit="contain" class="imgsize"></el-image> --> <!-- <el-image :src="row.coverUrl" fit="contain" class="imgsize"></el-image> -->
<svg-icon <svg-icon
class="icon-style" class="icon-style"
:icon="row.materialUrl ? filType(row.materialUrl) : ''" :icon="row.materialUrl ? filType(row.materialUrl) : ''"
v-if="row.materialUrl"></svg-icon> v-if="row.materialUrl"
></svg-icon>
<span class="twosplice mt10">{{ coverContent(row.digest) }}</span> <span class="twosplice mt10">{{ coverContent(row.digest) }}</span>
</div> </div>
<!-- 海报 --> <!-- 海报 -->
<div v-if="row.mediaType === '5'" style="display: flex"> <div v-if="row.mediaType === '5'" style="display: flex;">
<el-image :src="row.materialUrl" fit="contain" class="imgsize"></el-image> <el-image :src="row.materialUrl" fit="contain" class="imgsize"></el-image>
<span class="twosplice mt10">{{ coverContent(row.digest) }}</span> <span class="twosplice mt10">{{ coverContent(row.digest) }}</span>
</div> </div>
...@@ -90,8 +91,9 @@ ...@@ -90,8 +91,9 @@
:title="send ? '发送明细' : '查看明细'" :title="send ? '发送明细' : '查看明细'"
v-model="dialogVisible" v-model="dialogVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
width="60%"> width="60%"
<el-table v-loading="loading" :data="detailList" style="width: 100%"> >
<el-table v-loading="loading" :data="detailList" style="width: 100%;">
<!-- 发送明细 --> <!-- 发送明细 -->
<template v-if="send"> <template v-if="send">
<el-table-column prop="sendBy" label="发送员工" align="center" min-width="100" /> <el-table-column prop="sendBy" label="发送员工" align="center" min-width="100" />
...@@ -105,7 +107,8 @@ ...@@ -105,7 +107,8 @@
:src="scope.row.viewAvatar" :src="scope.row.viewAvatar"
fit="contain" fit="contain"
class="imgsize" class="imgsize"
v-if="scope.row.viewAvatar"></el-image> v-if="scope.row.viewAvatar"
></el-image>
{{ scope.row.viewBy }} {{ scope.row.viewBy }}
</template> </template>
</el-table-column> </el-table-column>
...@@ -121,7 +124,8 @@ ...@@ -121,7 +124,8 @@
align="center" align="center"
min-width="100" min-width="100"
prop="viewDurationCpt" prop="viewDurationCpt"
show-overflow-tooltip /> show-overflow-tooltip
/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button text @click="goDetail(scope.row)" v-if="scope.row.isCustomer">客户详情</el-button> <el-button text @click="goDetail(scope.row)" v-if="scope.row.isCustomer">客户详情</el-button>
...@@ -134,15 +138,16 @@ ...@@ -134,15 +138,16 @@
:total="total" :total="total"
v-model:page="query.pageNum" v-model:page="query.pageNum"
v-model:limit="query.pageSize" v-model:limit="query.pageSize"
@pagination="getTableChangeSize()" /> @pagination="getTableChangeSize()"
/>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getTableDetail } from '@/api/contentCenter/common.js' import { getTableDetail } from '@/api/contentCenter/common.js'
export default { export default {
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
...@@ -150,22 +155,29 @@ export default { ...@@ -150,22 +155,29 @@ export default {
send: true, send: true,
query: { query: {
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1
}, },
total: 0, total: 0,
loading: false, loading: false
} }
}, },
props: { props: {
timeObj: {
type: Object,
default: {
beginTime: '',
endTime: ''
}
},
tableList: { tableList: {
type: Array, type: Array,
default: [], default: []
}, },
// 1素材中心 2企业话术 3客服话术 // 1素材中心 2企业话术 3客服话术
resourceType: { resourceType: {
type: Number, type: Number,
default: null, default: null
}, }
}, },
methods: { methods: {
// 查看人数 // 查看人数
...@@ -174,6 +186,8 @@ export default { ...@@ -174,6 +186,8 @@ export default {
this.query.detailsType = 2 this.query.detailsType = 2
this.query.contentId = row.id this.query.contentId = row.id
this.query.talkId = row.talkId this.query.talkId = row.talkId
this.query.beginTime = this.timeObj.beginTime
this.query.endTime = this.timeObj.endTime
this.detailList = [] this.detailList = []
this.getTableChangeSize() this.getTableChangeSize()
this.send = false this.send = false
...@@ -185,6 +199,8 @@ export default { ...@@ -185,6 +199,8 @@ export default {
this.query.detailsType = 1 this.query.detailsType = 1
this.query.contentId = row.id this.query.contentId = row.id
this.query.talkId = row.talkId this.query.talkId = row.talkId
this.query.beginTime = this.timeObj.beginTime
this.query.endTime = this.timeObj.endTime
this.detailList = [] this.detailList = []
this.getTableChangeSize() this.getTableChangeSize()
}, },
...@@ -201,7 +217,7 @@ export default { ...@@ -201,7 +217,7 @@ export default {
let { externalUserid, firstUserId: userId } = row let { externalUserid, firstUserId: userId } = row
this.$router.push({ this.$router.push({
name: window.lwConfig.CUSTOMER_DETAIL_ROUTE_NAME, name: window.lwConfig.CUSTOMER_DETAIL_ROUTE_NAME,
query: { externalUserid, userId }, query: { externalUserid, userId }
}) })
}, },
deltype(type) { deltype(type) {
...@@ -252,17 +268,17 @@ export default { ...@@ -252,17 +268,17 @@ export default {
str = str.substr(0, 50) + '...' str = str.substr(0, 50) + '...'
} }
return str return str
}, }
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.icon-style { .icon-style {
width: 50px; width: 50px;
height: 50px; height: 50px;
} }
.title { .title {
width: 80%; width: 80%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -270,15 +286,15 @@ export default { ...@@ -270,15 +286,15 @@ export default {
font-weight: bold; font-weight: bold;
color: var(--font-black-7); color: var(--font-black-7);
font-size: 12px; font-size: 12px;
} }
.imgsize { .imgsize {
width: 50px; width: 50px;
height: 50px; height: 50px;
margin-right: 10px; margin-right: 10px;
} }
.scriptNum { .scriptNum {
font-size: 14px; font-size: 14px;
color: var(--color); color: var(--color);
cursor: pointer; cursor: pointer;
} }
</style> </style>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<div class="data-content"> <div class="data-content">
<div class="chart-content"> <div class="chart-content">
<search-title @search="getLineData"></search-title> <search-title @search="getLineData"></search-title>
<chart-line style="height: 300px" :legend="legend" :xData="xdata" :series="series"></chart-line> <chart-line style="height: 300px;" :legend="legend" :xData="xdata" :series="series"></chart-line>
</div> </div>
</div> </div>
</div> </div>
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
</div> </div>
<div> <div>
<div> <div>
<search-title :showToday="true" @search="getTableData" style="margin-top: 20px"></search-title> <search-title :showToday="true" @search="getTableData" style="margin-top: 20px;"></search-title>
</div> </div>
<div class="data-content" style="margin-top: 20px"> <div class="data-content" style="margin-top: 20px;">
<DataDetail :tableList="tableList" :resourceType="2" /> <DataDetail :tableList="tableList" :timeObj="query" :resourceType="2" />
</div> </div>
</div> </div>
</div> </div>
...@@ -35,21 +35,21 @@ ...@@ -35,21 +35,21 @@
</template> </template>
<script> <script>
import { getCount } from '@/api/contentCenter/common.js' import { getCount } from '@/api/contentCenter/common.js'
import { getTalkMaterial } from '@/api/contentCenter/scriptCenter.js' import { getTalkMaterial } from '@/api/contentCenter/scriptCenter.js'
import PreviewClient from '@/components/previewInMobileClient.vue' import PreviewClient from '@/components/previewInMobileClient.vue'
import ChartBar from '@/components/ChartBar.vue' import ChartBar from '@/components/ChartBar.vue'
import ChartLine from '@/components/ChartLine.vue' import ChartLine from '@/components/ChartLine.vue'
import SearchTitle from '../components/SearchTitle.vue' import SearchTitle from '../components/SearchTitle.vue'
import DataDetail from '@/views/contentCenter/components/DataDetail.vue' import DataDetail from '@/views/contentCenter/components/DataDetail.vue'
export default { export default {
components: { components: {
SearchTitle, SearchTitle,
ChartLine, ChartLine,
ChartBar, ChartBar,
PreviewClient, PreviewClient,
DataDetail, DataDetail
}, },
data() { data() {
return { return {
...@@ -68,14 +68,14 @@ export default { ...@@ -68,14 +68,14 @@ export default {
'图文', '图文',
'链接', '链接',
'小程序', '小程序',
'文章', '文章'
], ],
disabled: true, disabled: true,
mobForm: { mobForm: {
welcomeMsg: '', welcomeMsg: '',
materialMsgList: [], materialMsgList: [],
userIds: '', userIds: '',
userNames: '', userNames: ''
}, },
exportLoading: false, exportLoading: false,
// barLegend1: ['访问客户总数'], // barLegend1: ['访问客户总数'],
...@@ -89,33 +89,33 @@ export default { ...@@ -89,33 +89,33 @@ export default {
{ {
title: '发送总次数 ', title: '发送总次数 ',
value: 0, value: 0,
noArrow: true, noArrow: true
}, },
{ {
title: '查看总次数', title: '查看总次数',
value: 0, value: 0
}, },
{ {
title: '查看总人数', title: '查看总人数',
value: 0, value: 0
}, },
{ {
title: '今日发送次数', title: '今日发送次数',
value: 0, value: 0
}, },
{ {
title: '今日查看次数', title: '今日查看次数',
value: 0, value: 0
}, },
{ {
title: '今日查看人数', title: '今日查看人数',
value: 0, value: 0
}, }
], ],
total: 0, total: 0,
query: { query: {
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1
}, },
tableList: [], tableList: [],
loading: false, loading: false,
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
value2: [], value2: [],
tableSearch: {}, tableSearch: {},
treeData: [{}], // 树 treeData: [{}], // 树
talkId: '', talkId: ''
} }
}, },
methods: { methods: {
...@@ -179,16 +179,16 @@ export default { ...@@ -179,16 +179,16 @@ export default {
// this.total = Number(res.total) // this.total = Number(res.total)
this.loading = false this.loading = false
}) })
}, }
}, },
created() { created() {
this.talkId = this.$route.query.talkId this.talkId = this.$route.query.talkId
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.group { .group {
font-size: 12px; font-size: 12px;
background: var(--color); background: var(--color);
color: var(--font-white, #fff); color: var(--font-white, #fff);
...@@ -199,8 +199,8 @@ export default { ...@@ -199,8 +199,8 @@ export default {
border-radius: 5px; border-radius: 5px;
text-align: center; text-align: center;
margin-left: 20px; margin-left: 20px;
} }
.data-content { .data-content {
margin-top: 10px; margin-top: 10px;
.chart-content { .chart-content {
margin-top: 10px; margin-top: 10px;
...@@ -221,5 +221,5 @@ export default { ...@@ -221,5 +221,5 @@ export default {
.table-content { .table-content {
margin-top: 10px; margin-top: 10px;
} }
} }
</style> </style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="g-card"> <div class="g-card">
<div class="g-card-title">数据趋势</div> <div class="g-card-title">数据趋势</div>
<search-title :id="$route.query.id" :showScene="true" @search="getLineData"></search-title> <search-title :id="$route.query.id" :showScene="true" @search="getLineData"></search-title>
<chart-line style="height: 300px" :legend="legend" :xData="xdata" :series="series"></chart-line> <chart-line style="height: 300px;" :legend="legend" :xData="xdata" :series="series"></chart-line>
</div> </div>
<!-- <div class="g-card"> <!-- <div class="g-card">
<div class="g-card-title"> <div class="g-card-title">
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<search-title :id="$route.query.id" :showScene="true" @search="getTableFn"></search-title> <search-title :id="$route.query.id" :showScene="true" @search="getTableFn"></search-title>
<el-button type="primary" @click="exportFn" v-loading="exportLoading">导出Excel</el-button> <el-button type="primary" @click="exportFn" v-loading="exportLoading">导出Excel</el-button>
</div> </div>
<el-table v-loading="loading" :data="tableList" style="width: 100%"> <el-table v-loading="loading" :data="tableList" style="width: 100%;">
<el-table-column label="日期" align="center" min-width="100" prop="xtime" show-overflow-tooltip /> <el-table-column label="日期" align="center" min-width="100" prop="xtime" show-overflow-tooltip />
<el-table-column label="总访问数" align="center" min-width="100" prop="visitTotalCnt" show-overflow-tooltip /> <el-table-column label="总访问数" align="center" min-width="100" prop="visitTotalCnt" show-overflow-tooltip />
<el-table-column <el-table-column
...@@ -38,49 +38,54 @@ ...@@ -38,49 +38,54 @@
align="center" align="center"
prop="consultTotalCnt" prop="consultTotalCnt"
min-width="100" min-width="100"
show-overflow-tooltip></el-table-column> show-overflow-tooltip
></el-table-column>
<el-table-column <el-table-column
label="有效收集量" label="有效收集量"
align="center" align="center"
prop="EffectiveCollectionQuantity" prop="EffectiveCollectionQuantity"
min-width="100" min-width="100"
show-overflow-tooltip></el-table-column> show-overflow-tooltip
></el-table-column>
<el-table-column <el-table-column
label="收集率" label="收集率"
align="center" align="center"
prop="CollectionQuantity" prop="CollectionQuantity"
min-width="100" min-width="100"
show-overflow-tooltip></el-table-column> show-overflow-tooltip
></el-table-column>
<el-table-column <el-table-column
label="平均完成时间" label="平均完成时间"
align="center" align="center"
prop="average" prop="average"
min-width="100" min-width="100"
show-overflow-tooltip></el-table-column> show-overflow-tooltip
></el-table-column>
</el-table> </el-table>
<div class="bottom"> <div class="bottom">
<pagination <pagination
:total="total" :total="total"
v-model:page="query.pageNum" v-model:page="query.pageNum"
v-model:limit="query.pageSize" v-model:limit="query.pageSize"
@pagination="getTableChangeSize(query.pageNum, query.pageSize)" /> @pagination="getTableChangeSize(query.pageNum, query.pageSize)"
/>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { selectStatistics, lineChart, overviewExport, StatisticsDataList } from '@/api/drainageCode/smartForms.js' import { selectStatistics, lineChart, overviewExport, StatisticsDataList } from '@/api/drainageCode/smartForms.js'
import SearchTitle from '../components/SearchTitle.vue' import SearchTitle from '../components/SearchTitle.vue'
import ChartBar from '@/components/ChartBar.vue' import ChartBar from '@/components/ChartBar.vue'
import ChartLine from '@/components/ChartLine.vue' import ChartLine from '@/components/ChartLine.vue'
import { download } from '@/utils/common' import { download } from '@/utils/common'
export default { export default {
name: 'scene-statistics-scene', name: 'scene-statistics-scene',
components: { components: {
SearchTitle, SearchTitle,
ChartLine, ChartLine,
ChartBar, ChartBar
}, },
data() { data() {
return { return {
...@@ -99,37 +104,37 @@ export default { ...@@ -99,37 +104,37 @@ export default {
tips: '全部渠道访问当前表单的PV', tips: '全部渠道访问当前表单的PV',
value: 0, value: 0,
title1: '较前日', title1: '较前日',
value1: 0, value1: 0
}, },
{ {
title: '总访问用户', title: '总访问用户',
tips: '全部渠道访问当前表单的UV', tips: '全部渠道访问当前表单的UV',
value: 0, value: 0,
title1: '较前日', title1: '较前日',
value1: 0, value1: 0
}, },
{ {
title: '有效收集量', title: '有效收集量',
tips: '全部渠道成功提交表单的UV', tips: '全部渠道成功提交表单的UV',
value: 0, value: 0,
title1: '较前日', title1: '较前日',
value1: 0, value1: 0
}, },
{ {
title: '收集率', title: '收集率',
tips: '有效收集量/总访问用户,精确到两位小数', tips: '有效收集量/总访问用户,精确到两位小数',
value: 0 + '%', value: 0 + '%'
}, },
{ {
title: '平均完成时间', title: '平均完成时间',
tips: '有效收集用户从进入表单到提交表单的平均时长', tips: '有效收集用户从进入表单到提交表单的平均时长',
value: 0 + 'm', value: 0 + 'm'
}, }
], ],
total: 0, total: 0,
query: { query: {
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1
}, },
tableList: [], tableList: [],
loading: false, loading: false,
...@@ -138,7 +143,7 @@ export default { ...@@ -138,7 +143,7 @@ export default {
bar2: [], bar2: [],
value1: [], value1: [],
value2: [], value2: [],
tableSearch: {}, tableSearch: {}
} }
}, },
methods: { methods: {
...@@ -147,7 +152,7 @@ export default { ...@@ -147,7 +152,7 @@ export default {
this.$confirm('确认导出吗?', '提示', { this.$confirm('确认导出吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}).then(() => { }).then(() => {
this.exportLoading = true this.exportLoading = true
let datas = this.tableSearch let datas = this.tableSearch
...@@ -159,7 +164,15 @@ export default { ...@@ -159,7 +164,15 @@ export default {
overviewExport(datas) overviewExport(datas)
.then((res) => { .then((res) => {
console.log('数据报表导出返回值', res) console.log('数据报表导出返回值', res)
download(res.data) if (res != null) {
let blob = new Blob([res], { type: 'application/vnd.ms-excel' })
let url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url
link.download = '数据报表.xlsx' //指定下载文件名
link.click()
URL.revokeObjectURL(url) // 释放内存
}
}) })
.catch((error) => { .catch((error) => {
console.error(error) console.error(error)
...@@ -247,7 +260,7 @@ export default { ...@@ -247,7 +260,7 @@ export default {
}, },
selectStatistics() { selectStatistics() {
let data = { let data = {
belongId: this.$route.query.id, belongId: this.$route.query.id
} }
selectStatistics(data).then((res) => { selectStatistics(data).then((res) => {
if (res.data.length) { if (res.data.length) {
...@@ -364,7 +377,7 @@ export default { ...@@ -364,7 +377,7 @@ export default {
consultTotalCnt: res.data.result[i].totalUser, consultTotalCnt: res.data.result[i].totalUser,
EffectiveCollectionQuantity: res.data.result[i].collectionVolume, EffectiveCollectionQuantity: res.data.result[i].collectionVolume,
CollectionQuantity: res.data.result[i].collectionRate, CollectionQuantity: res.data.result[i].collectionRate,
average: res.data.result[i].averageTime, average: res.data.result[i].averageTime
} }
b.push(a) b.push(a)
} }
...@@ -393,7 +406,7 @@ export default { ...@@ -393,7 +406,7 @@ export default {
} }
this.tableSearch = data this.tableSearch = data
that.getTableChangeSize(1, 10) that.getTableChangeSize(1, 10)
}, }
}, },
created() { created() {
// this.getTableChangeSize() // this.getTableChangeSize()
...@@ -402,7 +415,7 @@ export default { ...@@ -402,7 +415,7 @@ export default {
}, },
mounted() { mounted() {
// this.getTableChangeSize(1,10) // this.getTableChangeSize(1,10)
}, }
} }
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>
<template> <template>
<div style="padding-bottom: 30px"> <div style="padding-bottom: 30px;">
<div> <div>
<div class="g-card"> <div class="g-card">
<div class="mid-action"> <div class="mid-action">
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
{{tableList[0].answer}} {{tableList[0].answer}}
</div> --> </div> -->
<template v-if="tableList"> <template v-if="tableList">
<el-table v-loading="loading1" :data="tableList" style="width: 100%"> <el-table v-loading="loading1" :data="tableList" style="width: 100%;">
<!-- <el-table-column label="日期" align="center" min-width="100" show-overflow-tooltip > <!-- <el-table-column label="日期" align="center" min-width="100" show-overflow-tooltip >
<template #default="{ row }"> <template #default="{ row }">
<div style="display: flex;justify-content:center;">{{row.updateTime.substring(0,10)}}</div> <div style="display: flex;justify-content:center;">{{row.updateTime.substring(0,10)}}</div>
...@@ -69,7 +69,8 @@ ...@@ -69,7 +69,8 @@
:total="total" :total="total"
v-model:page="query.pageNum" v-model:page="query.pageNum"
v-model:limit="query.pageSize" v-model:limit="query.pageSize"
@pagination="getTableChangeSize(query.pageNum, query.pageSize)" /> @pagination="getTableChangeSize(query.pageNum, query.pageSize)"
/>
</template> </template>
</div> </div>
</div> </div>
...@@ -77,12 +78,12 @@ ...@@ -77,12 +78,12 @@
</template> </template>
<script> <script>
import { statisticsCustomer, userExport } from '@/api/drainageCode/smartForms.js' import { statisticsCustomer, userExport } from '@/api/drainageCode/smartForms.js'
import SearchTitle from '../components/SearchTitle.vue' import SearchTitle from '../components/SearchTitle.vue'
export default { export default {
props: ['formId'], props: ['formId'],
components: { components: {
SearchTitle, SearchTitle
}, },
data() { data() {
return { return {
...@@ -91,11 +92,11 @@ export default { ...@@ -91,11 +92,11 @@ export default {
baseList: '', baseList: '',
query: { query: {
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1
}, },
tableList: [], tableList: [],
exportLoading: false, exportLoading: false,
dataSource: '默认渠道', dataSource: '默认渠道'
} }
}, },
methods: { methods: {
...@@ -104,7 +105,7 @@ export default { ...@@ -104,7 +105,7 @@ export default {
this.$confirm('确认导出吗?', '提示', { this.$confirm('确认导出吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}).then(() => { }).then(() => {
this.exportLoading = true this.exportLoading = true
let data = this.tableSearch let data = this.tableSearch
...@@ -116,7 +117,15 @@ export default { ...@@ -116,7 +117,15 @@ export default {
userExport(data) userExport(data)
.then((res) => { .then((res) => {
console.log('数据报表导出返回值', res) console.log('数据报表导出返回值', res)
this.download(res.data) if (res != null) {
let blob = new Blob([res], { type: 'application/vnd.ms-excel' })
let url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url
link.download = '数据报表.xlsx' //指定下载文件名
link.click()
URL.revokeObjectURL(url) // 释放内存
}
}) })
.catch((error) => { .catch((error) => {
console.error(error) console.error(error)
...@@ -225,14 +234,14 @@ export default { ...@@ -225,14 +234,14 @@ export default {
this.tableSearch = data this.tableSearch = data
that.dataSource = data.dataSource that.dataSource = data.dataSource
that.getTableChangeSize(1, 10) that.getTableChangeSize(1, 10)
}
}, },
}, mounted() {}
mounted() {}, }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dataStatistics_optionGraph_ul { .dataStatistics_optionGraph_ul {
margin-top: 30px; margin-top: 30px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -243,9 +252,9 @@ export default { ...@@ -243,9 +252,9 @@ export default {
background: var(--bg-white); background: var(--bg-white);
padding: 30px; padding: 30px;
} }
} }
.data-content { .data-content {
margin-top: 10px; margin-top: 10px;
.chart-content { .chart-content {
...@@ -272,5 +281,5 @@ export default { ...@@ -272,5 +281,5 @@ export default {
.table-content { .table-content {
margin-top: 10px; margin-top: 10px;
} }
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!