Commit 17fc8121 by 杨明

fixed

1 parent 709ae132
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
display: flex; display: flex;
margin-top: 18px; margin-top: 18px;
} }
.el-button--small {
min-width: 68px;
}
.glsx-table .el-pagination.is-background .el-pager li:not(.disabled).active { .glsx-table .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: $btnBlue; background-color: $btnBlue;
color: #fff; color: #fff;
...@@ -74,14 +76,14 @@ ...@@ -74,14 +76,14 @@
margin-bottom: 12px; margin-bottom: 12px;
} }
// .el-icon-error { .el-message-box__status.el-icon-error {
// display: block !important; display: block !important;
// font-size: 33px !important; font-size: 33px !important;
// position: relative; position: relative;
// left: 50%; left: 50%;
// transform: translateX(-50%); transform: translateX(-50%);
// margin-bottom: 12px; margin-bottom: 12px;
// } }
.el-tooltip__popper.is-dark { .el-tooltip__popper.is-dark {
background: #666666 !important; background: #666666 !important;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06) !important; box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06) !important;
......
<template> <template>
<div> <div>
<el-dialog :title="dialogTitle" :visible.sync="groupVisible" width="50%" :before-close="handleClose"> <el-dialog :title="dialogTitle" :visible.sync="groupVisible" width="50%" :before-close="handleClose">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="grouping-ruleForm">
<el-form-item label="分群名称" prop="crowdGroupName" size="small"> <el-form-item label="分群名称" prop="crowdGroupName" size="small">
<el-input v-model="ruleForm.crowdGroupName" placeholder="请输入分群名称" maxlength="30"></el-input> <el-input v-model="ruleForm.crowdGroupName" placeholder="请输入分群名称" maxlength="30"></el-input>
</el-form-item> </el-form-item>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</div> </div>
</template> </template>
</div> </div>
<div class="el-form-item__error" v-show="crowdStatus"></div> <div class="el-form-item__error" v-show="crowdStatus">请选择人群</div>
<!-- <div class="group-tree-panel" :style="{ height: heightBox + 'px' }"> <!-- <div class="group-tree-panel" :style="{ height: heightBox + 'px' }">
<el-tree @node-expand="nodeExpand" accordion :data="crowdUnitList" :props="defaultProps" show-checkbox></el-tree> <el-tree @node-expand="nodeExpand" accordion :data="crowdUnitList" :props="defaultProps" show-checkbox></el-tree>
</div> --> </div> -->
...@@ -155,6 +155,7 @@ export default { ...@@ -155,6 +155,7 @@ export default {
group.isIndeterminateGroup = false group.isIndeterminateGroup = false
this.rightSelectNum = 0 this.rightSelectNum = 0
}) })
this.autoExpand()
}, },
//推送左侧 //推送左侧
handleLeft() { handleLeft() {
...@@ -172,13 +173,14 @@ export default { ...@@ -172,13 +173,14 @@ export default {
group.isIndeterminateGroup_right = false group.isIndeterminateGroup_right = false
this.leftSelectNum = 0 this.leftSelectNum = 0
}) })
this.autoExpand()
}, },
handleSelect() { handleSelect() {
this.$refs['ruleForm'].validate(valid => { this.$refs['ruleForm'].validate(valid => {
if (valid) { if (valid) {
let crowdArr = [] let crowdArr = []
this.crowdUnitList.forEach(crowd => { this.crowdUnitList.forEach(crowd => {
Object.assign(crowdArr, crowd.selectGroup) crowdArr = [...crowdArr, ...crowd.selectGroup]
}) })
if (crowdArr.length == 0) { if (crowdArr.length == 0) {
this.crowdStatus = true this.crowdStatus = true
...@@ -277,6 +279,17 @@ export default { ...@@ -277,6 +279,17 @@ export default {
this.crowdUnitList[1].selectGroup.push(item) this.crowdUnitList[1].selectGroup.push(item)
} }
}) })
this.autoExpand()
},
autoExpand() {
if (this.crowdUnitList[0].selectGroup.length == 0 && this.crowdUnitList[1].selectGroup.length > 0) {
this.crowdUnitList[0].checked_right = false
this.crowdUnitList[1].checked_right = true
}
if (this.crowdUnitList[0].selectGroup.length > 0 && this.crowdUnitList[1].selectGroup.length == 0) {
this.crowdUnitList[0].checked = false
this.crowdUnitList[1].checked = true
}
}, },
//左侧展开 //左侧展开
handleExpand(index) { handleExpand(index) {
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<div class="pageContent"> <div class="pageContent">
<GLCombiForm :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm> <GLCombiForm :rowNumber="1" :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientGroupManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams" :expand-row-keys="expandArr"> <GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientGroupManage" :hasNum="false" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams" :expand-row-keys="expandArr">
<div slot="groupInfo" slot-scope="scope" v-if="scope.scope.crowdUnitList && scope.scope.crowdUnitList.length"> <div slot="groupInfo" slot-scope="scope" v-if="scope.scope.crowdUnitList && scope.scope.crowdUnitList.length">
<div class="table-tr"> <div class="table-tr">
<div class="tabel-th">人群名称</div> <div class="tabel-th">人群名称</div>
...@@ -37,6 +37,11 @@ ...@@ -37,6 +37,11 @@
</div> </div>
</div> </div>
<add-or-edit ref="addOrEditForm"></add-or-edit> <add-or-edit ref="addOrEditForm"></add-or-edit>
<GLFooter>
<el-button type="primary" @click="goback">
返回
</el-button>
</GLFooter>
</div> </div>
</template> </template>
...@@ -170,6 +175,9 @@ export default { ...@@ -170,6 +175,9 @@ export default {
handleAdd(row) { handleAdd(row) {
this.$refs.addOrEditForm.init(row) this.$refs.addOrEditForm.init(row)
}, },
goback() {
this.$router.push(`/clientDataOverview/index`)
},
//删除 //删除
handleDelete(scope) { handleDelete(scope) {
this.$confirm('是否确认将此分群删除?', '删除', { this.$confirm('是否确认将此分群删除?', '删除', {
...@@ -200,9 +208,8 @@ export default { ...@@ -200,9 +208,8 @@ export default {
.catch(() => {}) .catch(() => {})
}, },
againConfirm() { againConfirm() {
this.$confirm('此分群已被招揽活动任务调用,不支持删除', '提示', { this.$alert('此分群已被招揽活动任务调用,不支持删除', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error' type: 'error'
}) })
.then(() => {}) .then(() => {})
...@@ -295,6 +302,8 @@ export default { ...@@ -295,6 +302,8 @@ export default {
border-top: 1px solid #e8e8ea; border-top: 1px solid #e8e8ea;
&:first-child { &:first-child {
background: #f4f6fc; background: #f4f6fc;
color: #333333;
font-weight: 700;
} }
div { div {
height: 40px; height: 40px;
...@@ -304,6 +313,7 @@ export default { ...@@ -304,6 +313,7 @@ export default {
} }
} }
.scrm-sub-client-container { .scrm-sub-client-container {
margin-bottom: 60px;
.pageTitle { .pageTitle {
position: relative; position: relative;
margin-bottom: 20px; margin-bottom: 20px;
......
...@@ -94,9 +94,39 @@ export default { ...@@ -94,9 +94,39 @@ export default {
this.$emit('getCheckItem', this.$refs.tagTree) this.$emit('getCheckItem', this.$refs.tagTree)
}) })
}, },
filterNode(value, data) { filterNode(value, data, node) {
if (!value) return true if (!value) return true
return data.name.indexOf(value) !== -1 return data.name.indexOf(value) !== -1
// let val = value.toLowerCase()
// this.$nextTick(() => {
// this.setTreeHeight()
// })
// return this.chooseNode(val, data, node) // 调用过滤二层方法
},
chooseNode(value, data, node) {
if (data.name.indexOf(value) !== -1) {
return true
}
const level = node.level
// 如果传入的节点本身就是一级节点就不用校验了
if (level === 1) {
return false
}
// 先取当前节点的父节点
let parentData = node.parent
// 遍历当前节点的父节点
let index = 0
while (index < level - 1) {
// 如果匹配到直接返回,此处name值是中文字符,enName是英文字符。判断匹配中英文过滤
if (parentData.data.name.indexOf(value) !== -1) {
return true
}
// 否则的话再往上一层做匹配
parentData = parentData.parent
index++
}
// 没匹配到返回false
return false
}, },
//勾选 //勾选
checkChange() { checkChange() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!