|
@@ -4,50 +4,25 @@
|
|
|
<el-breadcrumb-item>新媒体</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>app数据报送</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
|
- <!-- <el-card>
|
|
|
- <el-form
|
|
|
- ref="form"
|
|
|
- :model="form"
|
|
|
- size="small"
|
|
|
- :inline="true"
|
|
|
- label-width="120px"
|
|
|
- >
|
|
|
- <el-form-item label="时间">
|
|
|
- <el-time-picker
|
|
|
- v-model="rangeTime"
|
|
|
- is-range
|
|
|
- format="HH:mm"
|
|
|
- @change="() => (form.filter.time = [])"
|
|
|
- range-separator="-"
|
|
|
- start-placeholder="开始时间"
|
|
|
- end-placeholder="结束时间"
|
|
|
- >
|
|
|
- </el-time-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item style="float: right">
|
|
|
- <el-button type="primary" :loading="loading" @click="onSubmit">
|
|
|
- 查询
|
|
|
- </el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </el-card> -->
|
|
|
<br />
|
|
|
<el-card class="box-card">
|
|
|
<el-form :model="form" label-width="auto">
|
|
|
+ <el-form-item label="月份">
|
|
|
+ <span v-text="form.month"></span>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="客户端日活数">
|
|
|
- <el-input v-model="form.appDay" />
|
|
|
+ <el-input v-model="form.clientOnlineUser" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="端外H5日活数">
|
|
|
- <el-input v-model="form.h5Day" />
|
|
|
+ <el-input v-model="form.webOnlineUser" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="客户端日人均使用时长(毫秒)">
|
|
|
- <el-input v-model="form.timeLong" />
|
|
|
+ <el-input v-model="form.clientAvgDuration" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" @click="onSubmitOptimize">确认优化数据</el-button>
|
|
|
- <el-popconfirm title="Are you sure to delete this?" @confirm="onSubmit">
|
|
|
+ <el-popconfirm title="确认更新数据?" @confirm="onSubmitOptimize">
|
|
|
<template #reference>
|
|
|
- <el-button>报送数据</el-button>
|
|
|
+ <el-button type="primary">确认优化数据</el-button>
|
|
|
</template>
|
|
|
</el-popconfirm>
|
|
|
</el-form-item>
|
|
@@ -57,24 +32,59 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {} from '@/api/kuyun';
|
|
|
-// import config from "@/config/index";
|
|
|
+import { appReportList, appReportUpdate } from '@/api/portrait';
|
|
|
+
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
+import 'element-plus/lib/theme-chalk/el-message.css';
|
|
|
export default {
|
|
|
name: 'Channel',
|
|
|
data() {
|
|
|
return {
|
|
|
form: {
|
|
|
- appDay: 0,
|
|
|
- h5Day: 0,
|
|
|
- timeLong: 0
|
|
|
- }
|
|
|
+ clientOnlineUser: 0,
|
|
|
+ webOnlineUser: 0,
|
|
|
+ clientAvgDuration: 0,
|
|
|
+ month: '',
|
|
|
+ id: ''
|
|
|
+ },
|
|
|
+ t: undefined
|
|
|
};
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+ appReportList().then(res => {
|
|
|
+ this.form = res;
|
|
|
+ });
|
|
|
+ },
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
- onSubmitOptimize(){},
|
|
|
- onSubmit(){},
|
|
|
+ onSubmitOptimize() {
|
|
|
+ let userinfo = JSON.parse(parent.localStorage.userinfo || '{}');
|
|
|
+ if (!userinfo.loginname) {
|
|
|
+ ElMessage({
|
|
|
+ message: '请登录后再试',
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.t) clearTimeout(this.t);
|
|
|
+ this.t = setTimeout(() => {
|
|
|
+ this.t = clearTimeout(this.t);
|
|
|
+ const { id, clientOnlineUser, webOnlineUser, clientAvgDuration } =
|
|
|
+ this.form;
|
|
|
+ appReportUpdate({
|
|
|
+ id,
|
|
|
+ loginName: userinfo.loginname || '',
|
|
|
+ clientOnlineUser,
|
|
|
+ webOnlineUser,
|
|
|
+ clientAvgDuration
|
|
|
+ }).then(() => {
|
|
|
+ ElMessage({
|
|
|
+ message: '更新成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }, 200);
|
|
|
+ }
|
|
|
},
|
|
|
components: {}
|
|
|
};
|