Commit be1aeed4 by 胡悦

修改群发的弹窗和footer

1 parent 9cca6c07
......@@ -9,7 +9,7 @@ import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLButton, GLTable, GLFooter, GLCombiForm, GLTableButton, GLEditor } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLButton, GLTable, GLFooter, GLCombiForm, GLTableButton, GLEditor, GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import '@/assets/css/public.scss'
import render from './render'
......@@ -24,6 +24,7 @@ Vue.use(GLFooter)
Vue.use(GLCombiForm)
Vue.use(GLTableButton)
Vue.use(GLEditor)
Vue.use(GLDialog)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request2, sign, secret, sign_common, request_common, request_merchant, xiaolong_req } = await fetchConfig(false)
Vue.prototype.$history = history
......
......@@ -120,20 +120,14 @@
</div>
</div>
</div>
<glsx-dialog :title="'选择成员'" :width="'1142px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible">
<GLDialog :bigTitle="'选择成员'" mode="big" :visible.sync="membersVisible" @onOk="handleConfirm" @onCancel="membersVisible = !membersVisible">
<SelectMember ref="membersForm" v-if="membersVisible" :selectData="selectData"></SelectMember>
</glsx-dialog>
</GLDialog>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<GLFooter>
<el-button type="primary" v-loading="addLoading" @click="handleSubmit">确定</el-button>
<el-button @click="handleCancel">取消</el-button>
</div>
</GLFooter>
<SelectLabel ref="selectLabel" @tagSelected="handleSelect" :dialogVisible="dialogVisible"></SelectLabel>
<SelectCrowd ref="selectCrowd" @crowdData="getCrowdData" :selectCrowdData="basicForm.crowdList"></SelectCrowd>
</div>
......@@ -743,7 +737,7 @@ export default {
<style lang="scss" scoped>
.container {
margin-bottom: 84px;
margin-bottom: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
......
......@@ -57,19 +57,13 @@
</div>
</div>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<GLFooter>
<el-button type="primary" v-loading="addLoading" @click="handleSubmit">确定</el-button>
<el-button @click="handleCancel">取消</el-button>
</div>
<glsx-dialog :title="'选择群主'" :width="'1142px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible">
</GLFooter>
<GLDialog :bigTitle="'选择群主'" mode="big" :visible.sync="membersVisible" @onOk="handleConfirm" @onCancel="membersVisible = !membersVisible">
<SelectLord ref="membersForm" islord="true" v-if="membersVisible" :selectData="selectData"></SelectLord>
</glsx-dialog>
</GLDialog>
</div>
</template>
......@@ -446,7 +440,7 @@ export default {
<style lang="scss" scoped>
.container {
margin-bottom: 84px;
margin-bottom: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// padding: 20px;
......
<template>
<div class="ly-emotion">
<slot></slot>
</div>
</template>
<script>
import emoji from '@/utils/emo'
export default {
name: 'ly-emotion',
mounted() {
const name = this.$el.innerHTML
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(name)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
let imgHTML = `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
this.$nextTick(() => {
this.$el.innerHTML = imgHTML
})
}
}
</script>
<style scoped>
.ly-emotion {
display: inline-block;
}
.ly-static-emotion {
width: 24px;
height: 24px;
display: inline-block;
}
</style>
<template>
<div>
<div class="emotion-box" :style="{ height: height + 'px' }">
<div class="emotion-box-line" v-for="(line, i) in list" :key="i">
<emotion class="emotion-item" v-for="(item, i) in line" :key="i" @click.native="clickHandler(item)">{{ item }}</emotion>
</div>
</div>
</div>
</template>
<script>
import emoji from '@/utils/emo'
import Emotion from './Emotion'
export default {
props: {
height: {
type: Number,
default: 200
}
},
data() {
return {
list: emoji
}
},
methods: {
clickHandler(i) {
let emotion = `${i}`
this.$emit('emotion', emotion)
}
},
components: {
Emotion
}
}
</script>
<style scoped lang="scss">
.emotion-box {
z-index: 2004;
background-color: #fff;
border-radius: 2px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
width: 300px;
box-sizing: border-box;
padding: 5px;
overflow: hidden;
overflow-y: auto;
}
.emotion-box-line {
display: flex;
}
.emotion-item {
flex: 1;
text-align: center;
cursor: pointer;
line-height: 23px;
/deep/ {
img {
width: 24px;
-webkit-user-select: none;
cursor: default;
pointer-events: none;
}
}
}
</style>
......@@ -7,7 +7,7 @@
-->
<template>
<div>
<el-dialog :title="'人群筛选'" :width="'1080px'" :visible.sync="crowdVisible" v-if="crowdVisible">
<GLDialog :bigTitle="'人群筛选'" mode="big" :visible.sync="crowdVisible" v-if="crowdVisible">
<div class="member-wrapper">
<div class="member-left">
<div class="member-title">
......@@ -43,7 +43,7 @@
<el-button style="width: 68px;" size="small" @click="crowdVisible = false">取 消</el-button>
<el-button style="width: 68px;" size="small" type="primary" @click.native="handleConfirm">确 定</el-button>
</span>
</el-dialog>
</GLDialog>
</div>
</template>
......@@ -257,6 +257,9 @@ export default {
// height: 40vh;
overflow-y: auto;
}
.el-pagination {
margin-top: 0;
}
}
.member-form {
......@@ -264,7 +267,7 @@ export default {
}
.table-content {
max-height: 500px;
max-height: 480px;
overflow: auto;
border-top: 1px solid #eee;
}
......
<template>
<div class="select-emp-panel">
<div class="scrm-p10 emp-tree-panel">
<div class="popper-arrow"></div>
<div
class="emp-scroll-panel"
:style="{
height: treeHeight + 'px'
}"
>
<div class="tree-title">所在门店/部门</div>
<el-tree v-loading="loading" :data="listTree" :expand-on-click-node="false" highlight-current :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</div>
</div>
<el-col
class="scrm-p10 emp-table-panel"
:style="{
height: treeHeight + 20 + 'px'
}"
>
<GLTable v-loading="loading" ref="saleTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" @selectionTable="selectionTable"></GLTable>
</el-col>
</div>
</template>
<script>
export default {
name: 'selectEmp',
props: ['selectData', 'islord'],
data() {
return {
treeHeight: 0,
staffName: '',
listTree: [],
defaultProps: {
children: 'children',
label: 'departmentName'
},
// 表格参数
tableParams: {
checkSelectKey: 'id',
checkSelectVal: [],
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'salelist',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '职务',
prop: 'staffTitle'
}
]
},
tableEmpData: [],
currentArr: [],
loading: true
}
},
methods: {
selectionTable(val) {
this.$emit('selectTable', val)
},
listDepartmentTree() {
const params = { merchantId: 10001001, addChildrensFlag: true }
if (this.islord) {
params.islord = this.islord
}
params.isHavCustomer = true
this.$apis.customerTransform.listDepartmentTree(params).then(res => {
this.listTree = res
this.loading = false
if (this.listTree.length) {
this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree)
this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses)
}
if (this.selectData && this.selectData.length) {
this.selectData.forEach(i => {
const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId)
this.clearSelect(row)
})
}
this.$nextTick(() => {
document.getElementsByClassName('el-tree-node__expand-icon')[0].click()
document.getElementsByClassName('el-tree-node__content')[0].click()
})
})
},
clearSelect(row) {
this.$refs.saleTable.$refs.salelistMutiTable.toggleRowSelection(row)
},
clearSelection() {
this.$refs.saleTable.$refs.salelistMutiTable.clearSelection()
},
handleNodeClick(data) {
this.departmentId = data.id
this.tableEmpData = data.entmicroStaffResponses
// this.currentArr = this.$common.utils.deepClone(data.entmicroStaffResponses)
// this.listEntmicroStaff()
},
getEmployee(d, arr = []) {
d.forEach(i => {
if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => {
const flag = arr.find(m => m.id == j.id)
if (!flag) {
arr.push(j)
}
})
}
if (i.children) {
this.getEmployee(i.children, arr)
}
})
return arr
},
searchTable(search) {
const arr = []
if (this.currentArr && this.currentArr.length != 0) {
this.currentArr.forEach(item => {
if (item.staffName.indexOf(search) != -1) {
arr.push(item)
}
})
}
this.tableEmpData = arr
}
// listEntmicroStaff(staffName) {
// let params = {
// departmentId: this.departmentId,
// staffName: staffName ? staffName : this.staffName,
// merchantid: this.$globalState.session.merchantId
// }
// this.$apis.emp.listEntmicroStaff(params).then(res => {
// this.tableEmpData = res
// })
// }
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.treeHeight = clientHeight - 650
this.listDepartmentTree()
}
}
</script>
<style scoped lang="scss">
.select-emp-panel {
display: flex;
.emp-tree-panel {
margin-top: 10px;
width: 200px;
position: relative;
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #e4e7ed;
.emp-scroll-panel {
min-height: 200px;
overflow: auto;
box-sizing: border-box;
}
.popper-arrow {
border-top-width: 0;
border-width: 6px;
position: absolute;
top: -12px;
left: 30px;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-bottom-color: #e4e7ed;
&:after {
content: ' ';
border-width: 6px;
top: 1px;
margin-left: -6px;
border-top-width: 0;
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-bottom-color: #fff;
}
}
}
.emp-table-panel {
flex: 1;
min-height: 200px;
overflow: auto;
margin-top: 10px;
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #e4e7ed;
/deep/ .el-checkbox__input.is-disabled .el-checkbox__inner {
background-color: #999999;
}
}
.emp-tree-panel {
margin-right: 10px;
font-size: 15px;
/deep/ .el-tree-node:focus > .el-tree-node__content {
color: #5850ff;
background: #f2f5fa;
}
}
.tree-title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 14px;
padding: 10px;
}
}
</style>
<template>
<div class="tag-main">
<el-dialog title="选择标签" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<GLDialog :bigTitle="'选择标签'" :visible.sync="dialogVisible" mode="big" :before-close="handleClose">
<div class="tag-panel">
<div class="tag-panel-select">
<div class="tag-title">预选标签</div>
......@@ -50,7 +50,7 @@
</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</el-dialog>
</GLDialog>
</div>
</template>
<script>
......
<!-- 树形搜索 -->
<template>
<div>
<el-popover ref="popover" placement="bottom-start" trigger="click" v-model="popoverVisible" :disabled="targetItem.isDisabled" @show="onShowPopover" @hide="onHidePopover">
<el-tree ref="tree" class="select-tree" highlight-current default-expand-all node-key="id" :expand-on-click-node="isExpand" :style="`min-width: ${treeWidth}`" :data="treeData" :current-node-key="form[targetItem.name]" :props="defaultProps" :filter-node-method="handleFilterNode" @current-change="handleNodeClick"></el-tree>
<el-input slot="reference" ref="input" v-model="form[targetItem.nameLabel]" clearable :disabled="targetItem.isDisabled" :style="`width: ${width}px`" :class="{ rotate: popoverVisible }" suffix-icon="el-icon-arrow-down" :placeholder="'请选择' + targetItem.label" @change="handleClear"></el-input>
</el-popover>
</div>
</template>
<script>
export default {
name: 'SelectTree',
data() {
return {
isExpand: false,
// 树状菜单显示状态
popoverVisible: false,
treeWidth: 'auto'
}
},
props: {
// 输入框宽度
width: String,
form: {
type: Object,
default: () => {}
},
targetItem: {
type: Object,
default: () => {}
},
treeData: {
type: Array,
default: () => []
},
defaultProps: {
type: Object,
default: () => ({
parent: 'parentId',
value: 'id',
label: 'menuName',
children: 'childlist'
})
}
},
watch: {
form(val) {
if (this.form[this.targetItem.name]) {
this.form[this.targetItem.nameLabel] = this.queryTree(this.treeData, this.form[this.targetItem.name])
this.$nextTick().then(() => {
this.$refs.tree.setCheckedKeys([this.form[this.targetItem.name]])
})
}
}
},
created() {
// 获取输入框宽度同步至树状菜单宽度
this.$nextTick(() => {
this.treeWidth = `${(this.width || this.$refs.input.$refs.input.clientWidth) - 24}px`
})
},
mounted() {
if (this.form[this.targetItem.name]) {
// console.log(this.treeData)
// console.log(this.form)
this.form[this.targetItem.nameLabel] = this.queryTree(this.treeData, this.form[this.targetItem.name])
this.$nextTick().then(() => {
this.$refs.tree.setCheckedKeys([this.form[this.targetItem.name]])
})
}
},
methods: {
// 显示时触发
onShowPopover() {
this.popoverVisible = true
this.$refs.tree.filter(false)
},
// 隐藏时触发
onHidePopover() {
this.popoverVisible = false
},
// 树节点过滤方法
handleFilterNode(query, data) {
if (!query) return true
return data[this.defaultProps.label].indexOf(query) !== -1
},
handleNodeClick(val) {
this.$emit('selected', { val: val, targetItem: this.targetItem, formName: this.targetItem.formName })
this.onHidePopover()
},
handleClear(val) {
this.$emit('selected', { val: val, targetItem: this.targetItem, formName: this.targetItem.formName })
window.event.stopPropagation()
},
// 搜索树状数据中的 ID
queryTree(tree, id) {
let stark = []
stark = stark.concat(tree)
while (stark.length) {
const temp = stark.shift()
if (temp[this.defaultProps.children]) {
stark = stark.concat(temp[this.defaultProps.children])
}
if (temp[this.defaultProps.value] === id) {
return temp[this.defaultProps.label]
}
}
return
}
}
}
</script>
<style>
.el-input.el-input--suffix.rotate .el-input__suffix .el-icon-arrow-down {
transform: rotate(-180deg);
}
.select-tree {
max-height: 400px;
overflow-y: scroll;
}
</style>
......@@ -16,15 +16,6 @@
</div>
</GLTable>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="handleCancel">取消</el-button>
</div>
</div>
</template>
<script>
......@@ -143,10 +134,6 @@ export default {
this.boxHeight = clientHeight - 200
},
methods: {
handleCancel() {
// this.$router.go(-1)
this.$router.push('/customerTransform/index')
},
remind(data) {
this.$apis.customerTransform
.remindUserGroup({
......@@ -189,7 +176,7 @@ export default {
</script>
<style lang="scss" scope>
.group-detail-container {
margin-bottom: 84px;
// margin-bottom: 84px;
padding: 20px;
background-color: #ffffff;
box-shadow: 0px 1px 5px 0px rgba(38, 38, 38, 0.1);
......
......@@ -86,17 +86,6 @@
</div>
</div>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<!-- <el-button type="primary" @click="handle
Next">确定</el-button>-->
<el-button type="primary" @click="handleCancel">取消</el-button>
</div>
</div>
</template>
<script>
......@@ -141,10 +130,6 @@ export default {
this.customIndex = val
this.getCustomerList(val)
},
handleCancel() {
// this.$router.go(-1)
this.$router.push('/customerTransform/index')
},
remind(data, index) {
if (!data.remindStatus) {
this.$apis.customerTransform
......@@ -196,7 +181,7 @@ export default {
display: flex;
width: 100%;
justify-content: space-between;
margin-bottom: 84px;
// margin-bottom: 84px;
.detail-modular {
width: calc(50% - 10px);
background-color: #ffffff;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!