提交 3d2a4329 编写于 作者: 张平's avatar 张平

Merge branch 'dev-data-analysis-20201123' into 'release'

校验问题修改   code reviewer: 张平

校验问题修改

See merge request !6
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>敏感数据查看系统</title> <title>数据服务</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name ="viewport" content ="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> <meta name ="viewport" content ="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta content="" name="description"/> <meta content="" name="description"/>
......
<template> <template>
<div class="header"> <div class="header">
<div class="logo">敏感数据查看系统</div> <div class="logo">数据服务</div>
<div class="user-info"> <div class="user-info">
<el-dropdown trigger="click" @command="handleCommand"> <el-dropdown trigger="click" @command="handleCommand">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
@current-change="dataListChange" @current-change="dataListChange"
:total="total" :total="total"
:current-page="currentPage" :current-page="currentPage"
:page-sizes="[15, 30, 50, 100]" :page-sizes="[15, 50, 100, 200, 300]"
:page-size="pageSize" :page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
></el-pagination> ></el-pagination>
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
@current-change="dataListChange" @current-change="dataListChange"
:total="total" :total="total"
:current-page="currentPage" :current-page="currentPage"
:page-sizes="[15, 30, 50, 100]" :page-sizes="[15, 50, 100, 200, 300]"
:page-size="pageSize" :page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
></el-pagination> ></el-pagination>
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:total="tableDataList.total" :total="tableDataList.total"
:current-page="pageNo" :current-page="pageNo"
:page-sizes="[15, 30, 50, 100]" :page-sizes="[15, 50, 100, 200, 300]"
:page-size="pageSize" :page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
></el-pagination> ></el-pagination>
......
...@@ -39,8 +39,14 @@ ...@@ -39,8 +39,14 @@
style="width:100%;"> style="width:100%;">
<el-col :span="11"> <el-col :span="11">
<el-form-item label="步骤名称"> <el-form-item label="步骤名称">
<el-input :class="{'red-b': item.nameCheck}" v-model="item.actionName" @blur="stepNameRepeat(item.actionName, index)" maxlength="30" placeholder="请输入步骤名称" style="width:70%"></el-input> <el-input
<p v-show="item.nameCheck" style="color: red; font-size: 12px;">名称重复,请重新输入</p> :class="{'red-b': item.nameCheck && item.actionName}"
v-model="item.actionName"
@input="nameChange(item, index)"
maxlength="30"
placeholder="请输入步骤名称"
style="width:70%"></el-input>
<p v-show="item.nameCheck && !item.actionName" style="color: red; font-size: 12px;">名称重复,请重新输入</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
...@@ -71,7 +77,7 @@ ...@@ -71,7 +77,7 @@
> >
</el-option> </el-option>
</el-select> </el-select>
<p v-show="item.unchecked" style="color: red; font-size: 12px;">触发事件不能为空</p> <p v-show="item.unchecked" style="color: red; font-size: 12px;">请选择一个触发事件</p>
<p v-show="item.repChecked" style="color: red; font-size: 12px;">触发事件重复,请重新选择</p> <p v-show="item.repChecked" style="color: red; font-size: 12px;">触发事件重复,请重新选择</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -102,7 +108,9 @@ export default { ...@@ -102,7 +108,9 @@ export default {
}, },
eventSelect: [], eventSelect: [],
tipText: '名称重复,请重新输入', tipText: '名称重复,请重新输入',
nameTip: '请输入漏斗名称' nameTip: '请输入漏斗名称',
repIndex: 0,
flag: false
} }
}, },
created() { created() {
...@@ -162,14 +170,16 @@ export default { ...@@ -162,14 +170,16 @@ export default {
} }
}, },
// 步骤名称不重复 // 步骤名称不重复
stepNameRepeat(val, index) { nameChange(item, index) {
if(!val) return;
this.$set(this.searchParam.actionModelList[index], 'nameCheck', false); this.$set(this.searchParam.actionModelList[index], 'nameCheck', false);
if(!item.actionName) return;
for(let i = 0; i < this.searchParam.actionModelList.length; i++) { for(let i = 0; i < this.searchParam.actionModelList.length; i++) {
if(i != index) { if(i == index) continue;
if(val == this.searchParam.actionModelList[i].actionName) { if(item.actionName == this.searchParam.actionModelList[i].actionName) {
setTimeout(() => {
this.searchParam.actionModelList[index].actionName = '';
this.$set(this.searchParam.actionModelList[index], 'nameCheck', true); this.$set(this.searchParam.actionModelList[index], 'nameCheck', true);
} },500)
} }
} }
}, },
...@@ -180,22 +190,21 @@ export default { ...@@ -180,22 +190,21 @@ export default {
if(index != i) { if(index != i) {
if(item.eventId == this.searchParam.actionModelList[i].eventId) { if(item.eventId == this.searchParam.actionModelList[i].eventId) {
this.$set(this.searchParam.actionModelList[index], 'repChecked', true); this.$set(this.searchParam.actionModelList[index], 'repChecked', true);
this.searchParam.actionModelList[index].eventId = '' this.searchParam.actionModelList[index].eventId = '';
} }
} }
} }
}, },
// 触发事件是否为空样式 // 触发事件是否为空样式
selectValid(item, index) { selectValid(item, index) {
console.log(item)
this.$set(this.searchParam.actionModelList[index], 'unchecked', false); this.$set(this.searchParam.actionModelList[index], 'unchecked', false);
// if(!item.eventId) return; // if(!item.eventId) return;
// for(let i = 0; i < this.searchParam.actionModelList.length; i++) { // for(let i = 0; i < this.searchParam.actionModelList.length; i++) {
// this.$set(this.searchParam.actionModelList[i], 'repChecked', false); // this.$set(this.searchParam.actionModelList[i], 'repChecked', false);
// if(index != i) { // if(index != i) {
// if(item.eventId == this.searchParam.actionModelList[i].eventId) { // if(item.eventId == this.searchParam.actionModelList[i].eventId) {
// this.searchParam.actionModelList[index].eventId = '';
// this.$set(this.searchParam.actionModelList[index], 'repChecked', true); // this.$set(this.searchParam.actionModelList[index], 'repChecked', true);
// this.searchParam.actionModelList.eventId = '';
// } // }
// } // }
// } // }
...@@ -209,11 +218,11 @@ export default { ...@@ -209,11 +218,11 @@ export default {
} }
for(let i = 0; i < this.searchParam.actionModelList.length; i++) { for(let i = 0; i < this.searchParam.actionModelList.length; i++) {
if(!this.searchParam.actionModelList[i].eventId) { if(!this.searchParam.actionModelList[i].eventId) {
this.$set(this.searchParam.actionModelList[i], 'unchecked', true); this.$set(this.searchParam.actionModelList[i], 'unchecked', true); // 事件名称为空
this.$set(this.searchParam.actionModelList[i], 'repChecked', false); this.$set(this.searchParam.actionModelList[i], 'repChecked', false); //事件重复
return; return;
} }
if(this.searchParam.actionModelList[i].nameCheck || this.searchParam.actionModelList[i].unchecked || this.searchParam.actionModelList[i].repChecked) { // 有步骤名称重复 if((this.searchParam.actionModelList[i].nameCheck && this.searchParam.actionModelList[i].actionName) || this.searchParam.actionModelList[i].unchecked || this.searchParam.actionModelList[i].repChecked) { // 有步骤名称重复
return; return;
} }
this.eventSelect.forEach(item => { this.eventSelect.forEach(item => {
...@@ -226,12 +235,14 @@ export default { ...@@ -226,12 +235,14 @@ export default {
for(let i = 0; i < req.actionModelList.length; i++) { for(let i = 0; i < req.actionModelList.length; i++) {
if(!req.actionModelList[i].actionName) { if(!req.actionModelList[i].actionName) {
req.actionModelList[i].actionName = req.actionModelList[i].eventName; req.actionModelList[i].actionName = req.actionModelList[i].eventName;
req.actionModelList[i].nameCheck = false;
} }
} }
this.getData( this.getData(
"post", `/session/funnel/save`, req, "post", `/session/funnel/save`, req,
res => { res => {
if(res.code == '000000') { if(res.code == '000000') {
this.$message.success('转化漏斗保存成功'); this.$message.success('转化漏斗保存成功');
this.$router.push({ path: 'path-data', query: {id: res.data.id, name: res.data.name} }); this.$router.push({ path: 'path-data', query: {id: res.data.id, name: res.data.name} });
} }
......
...@@ -112,10 +112,12 @@ export default { ...@@ -112,10 +112,12 @@ export default {
endDateOpt1: { endDateOpt1: {
disabledDate: time => { disabledDate: time => {
return ( return (
time.getTime() < (new Date(this.searchParam.startDate).getTime()) || time.getTime() > (new Date(this.searchParam.startDate).getTime() + 3600 * 1000 * 24 * 29) time.getTime() < (new Date(this.searchParam.startDate).getTime() - 3600 * 1000 * 24 * 1) || time.getTime() > (new Date(this.searchParam.startDate).getTime() + 3600 * 1000 * 24 * 29)
); );
} }
} },
beginTime: '',
endTime: ''
} }
}, },
created() { created() {
...@@ -133,6 +135,8 @@ export default { ...@@ -133,6 +135,8 @@ export default {
let dt1 = date3.getDate() > 10 ? date3.getDate() : '0' + date3.getDate(); let dt1 = date3.getDate() > 10 ? date3.getDate() : '0' + date3.getDate();
this.searchParam.startDate = date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + dt; this.searchParam.startDate = date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + dt;
this.searchParam.endDate = date3.getFullYear() + "-" + (date3.getMonth() + 1) + "-" + dt1; this.searchParam.endDate = date3.getFullYear() + "-" + (date3.getMonth() + 1) + "-" + dt1;
this.beginTime = date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + dt;
this.endTime = date3.getFullYear() + "-" + (date3.getMonth() + 1) + "-" + dt1;
this.getVersionData(); this.getVersionData();
}, },
methods: { methods: {
...@@ -484,8 +488,8 @@ export default { ...@@ -484,8 +488,8 @@ export default {
}, },
reset() { reset() {
this.searchParam = { this.searchParam = {
endDate: '2020-11-23', endDate: this.endTime,
startDate: '2020-11-20', startDate: this.beginTime,
version: this.versionSelect[0] version: this.versionSelect[0]
}; };
this.getAnalysisData(this.searchParam); this.getAnalysisData(this.searchParam);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册