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

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

校验问题修改   code reviewer: 张平

校验问题修改

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