|
@@ -7,24 +7,24 @@
|
|
|
<br />
|
|
|
<el-card class="box-card">
|
|
|
<el-row :gutter="10">
|
|
|
- <el-col :span="16">
|
|
|
+ <!-- <el-col :span="16">
|
|
|
<el-form :model="form" label-width="auto">
|
|
|
<el-form-item label="周期">
|
|
|
<span v-text="form.dateRange"></span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="客户端日活数">
|
|
|
- <el-input v-model="form.clientOnlineUser" />
|
|
|
+ <el-input disabled v-model="form.clientOnlineUser" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="端外H5日活数">
|
|
|
- <el-input v-model="form.webOnlineUser" />
|
|
|
+ <el-input disabled v-model="form.webOnlineUser" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="客户端日人均使用时长(毫秒)">
|
|
|
- <el-input v-model="form.clientAvgDuration" />
|
|
|
+ <el-input disabled v-model="form.clientAvgDuration" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-popconfirm title="确认更新数据?" @confirm="onSubmitOptimize">
|
|
|
<template #reference>
|
|
|
- <el-button type="primary">修改数据</el-button>
|
|
|
+ <el-button disabled type="primary">修改数据</el-button>
|
|
|
</template>
|
|
|
</el-popconfirm>
|
|
|
<el-popconfirm title="确认提交数据?" @confirm="onUploadData">
|
|
@@ -34,11 +34,11 @@
|
|
|
</el-popconfirm>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
<el-col :span="8">
|
|
|
<el-form label-width="auto">
|
|
|
- <el-form-item label=" ">
|
|
|
- <span style="color: #fff">1</span>
|
|
|
+ <el-form-item label="周期">
|
|
|
+ <span v-text="form.dateRange"></span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="客户端日活数">
|
|
|
<span v-text="form.rawClientOnlineUser"></span>
|
|
@@ -49,6 +49,22 @@
|
|
|
<el-form-item label="客户端日人均使用时长(毫秒)">
|
|
|
<span v-text="form.rawClientAvgDuration"></span>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="自动上报">
|
|
|
+ <el-switch
|
|
|
+ @change="onChangeStatus"
|
|
|
+ v-model="form.autoSubmit"
|
|
|
+ size="large"
|
|
|
+ active-text="开"
|
|
|
+ inactive-text="关"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-popconfirm title="确认提交数据?" @confirm="onUploadData">
|
|
|
+ <template #reference>
|
|
|
+ <el-button type="primary">上报数据</el-button>
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -60,7 +76,8 @@
|
|
|
import {
|
|
|
appReportList,
|
|
|
appReportUpdate,
|
|
|
- appReportUpload
|
|
|
+ appReportUpload,
|
|
|
+ appReportChagngeStatus
|
|
|
} from '@/api/portrait';
|
|
|
|
|
|
import { ElMessage } from 'element-plus';
|
|
@@ -89,6 +106,28 @@ export default {
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
+ onChangeStatus(val) {
|
|
|
+ if (this.t) clearTimeout(this.t);
|
|
|
+ this.t = setTimeout(() => {
|
|
|
+ this.t = clearTimeout(this.t);
|
|
|
+ appReportChagngeStatus({ autoSubmit: val })
|
|
|
+ .then(() => {
|
|
|
+ ElMessage({
|
|
|
+ message: '修改成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ appReportList().then(res => {
|
|
|
+ this.form = res;
|
|
|
+ });
|
|
|
+ ElMessage({
|
|
|
+ message: '请重试',
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }, 200);
|
|
|
+ },
|
|
|
onSubmitOptimize() {
|
|
|
let userinfo = JSON.parse(parent.localStorage.userinfo || '{}');
|
|
|
if (!userinfo.loginname) {
|