Commit cba65149 by 杨明

fixed

1 parent 592b795b
<template>
<div class="full-container">
<el-tooltip placement="top" v-if="hoverStatus">
<div slot="content">
<template v-if="$slots.default && content">{{ content }}</template>
<template v-else-if="$slots.default && !content"><slot></slot></template>
<template v-else>
{{ content ? content : label }}
</template>
</div>
<div :class="[line ? 'full-text-line' : 'full-text']" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }">
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
</div>
</el-tooltip>
<div :class="[line ? 'full-text-line' : 'full-text', identification]" v-else @mouseenter="hoverFun" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }">
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
</div>
</div>
</template>
<script>
export default {
name: 'GLFull',
data() {
return {
hoverStatus: false
}
},
props: {
identification: {
type: String,
default: ''
},
label: {
type: String,
default: ''
},
content: {
type: String,
default: ''
},
labelWidth: {
type: Number,
default: 100
},
line: {
type: Number,
default: 0
}
},
methods: {
hoverFun() {
console.log(document.querySelector(`.full-text`).scrollWidth)
this.hoverStatus = this.identification ? document.querySelector(`.${this.identification}`).scrollWidth > this.labelWidth : document.querySelector(`.full-text`).scrollWidth > this.labelWidth
}
}
}
</script>
<style scoped lang="scss">
.full-container {
display: inline-block;
}
.full-text {
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.full-text-line {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
word-break: break-all;
}
</style>
......@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) {
Object.assign(request, { timeout })
return Promise.resolve(cfg)
}
return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/62947bd8304f1311a3b76a01/activity/config')
return new Http({ request: { timeout: 100000 } }).get('https://oss-config.test.glsx.com.cn/mock/62ab1da70da5034a58680aa9/activity/cofing')
// return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
}
export const config = {
......
......@@ -3,6 +3,7 @@ import Vue from 'vue'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLTable, GLButton, GLFooter, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLFull from '@/components/GLFull'
import collectButton from '@/components/collect-button'
import { getRoutes } from '@/router'
import render from './render'
......@@ -11,6 +12,7 @@ Vue.use(GLTable)
Vue.use(GLFooter)
Vue.use(GLCombiForm)
Vue.component(collectButton.name, collectButton)
Vue.component('GLFull', GLFull)
import 'glsx-components/dist/glsx-components.css'
import '@/assets/css/common.scss'
let routes = []
......
......@@ -4,7 +4,7 @@
<div class="activity-box-title">{{ activityId ? '编辑活动' : '创建活动' }}</div>
<div class="activity-box-form">
<el-form ref="addForm" :model="addForm" class="code-body-form" label-width="120px" :rules="addRules">
<el-form-item label="活动名称" prop="configName" size="small">
<el-form-item label="活动名称" prop="configName" size="small" class="form-w40">
<el-input size="small" v-model.trim="addForm.configName" placeholder="请输入活动名称" maxlength="20"></el-input>
<div class="activity-name-tips">例:输入“定保客户”,系统推送任务时将自动追加月份信息“5月招揽-定保客户”</div>
</el-form-item>
......@@ -318,8 +318,11 @@ export default {
border-bottom: 1px solid #d8d8d8;
}
.activity-box-form {
width: 60%;
width: 50%;
padding-top: 30px;
.form-w40 {
width: 80%;
}
.activity-item {
/deep/ {
.el-radio {
......@@ -339,6 +342,7 @@ export default {
color: #5850ff;
cursor: pointer;
margin-left: 15px;
line-height: 32px;
}
}
.activity-status {
......@@ -353,6 +357,7 @@ export default {
width: 14px;
height: 14px;
vertical-align: middle;
margin-top: -1px;
}
.activity-name-tips {
font-size: 14px;
......
......@@ -171,6 +171,7 @@ export default {
}
if (this.activeName == 2) {
params.discountTypes = [2, 3, 4]
params.directionalFlag = 1 // 1所有人可用2定向礼包专用3关联优惠券
params.validType = 'valid'
}
if (this.activeName == 5) {
......
......@@ -11,10 +11,10 @@
</div>
</div>
<div class="drawer-btn">
<el-button @click="drawer = false">
<el-button @click="drawer = false" size="small">
取消
</el-button>
<el-button type="primary" @click="handleSaveConfig">提交</el-button>
<el-button type="primary" @click="handleSaveConfig" size="small">提交</el-button>
</div>
</el-drawer>
</div>
......@@ -99,7 +99,7 @@ export default {
z-index: 3000 !important;
/deep/ .el-drawer__header {
border-bottom: 1px solid #e6e6e6;
padding: 20px;
padding: 18px 20px;
margin-bottom: 20px;
}
}
......@@ -123,3 +123,8 @@ export default {
border-top: 1px solid #e6e6e6;
}
</style>
<style>
.el-select-dropdown {
z-index: 3001 !important;
}
</style>
<template>
<div class="square-main">
<el-dialog title="选择模板" :visible.sync="dialogVisible" width="1142px" :before-close="handleClose" :close-on-click-modal="false">
<div class="model-panel">
<div class="model-panel" v-loading="messageLoading">
<el-form :inline="true" class="message-form" :model="searchForm" ref="searchForm">
<el-form-item label="模板标题" size="small">
<el-input v-model="searchForm.title" :size="size" placeholder="请输入模板名称搜索"></el-input>
......@@ -82,6 +82,7 @@ export default {
loading: false,
activeName: '1',
messageRadio: {},
messageLoading: false,
modelList: [
// {
// title: '121',
......@@ -113,6 +114,7 @@ export default {
},
methods: {
init() {
this.messageLoading = true
this.pageNum = 1
this.messageRadio = {}
this.dialogVisible = true
......@@ -210,6 +212,9 @@ export default {
getCreatedList() {
this.$apis.customerTransform.createdNameList({}).then(res => {
this.createdList = res
this.$nextTick(() => {
this.messageLoading = false
})
})
},
getTemplateDetail(id) {
......
......@@ -6,7 +6,7 @@
<el-radio-group v-model="immExecutionFlag">
<el-radio :label="true">立即提醒</el-radio>
<el-radio :label="false">指定日期</el-radio>
<el-date-picker v-if="!immExecutionFlag" value-format="yyyy-MM-dd" v-model="sendDate" type="date" placeholder="选择日期" size="small"></el-date-picker>
<el-date-picker :picker-options="pickerOptions" v-if="!immExecutionFlag" value-format="yyyy-MM-dd" v-model="sendDate" type="date" placeholder="选择日期" size="small"></el-date-picker>
</el-radio-group>
</div>
<div class="member-item">
......@@ -91,6 +91,11 @@ export default {
children: 'children',
label: 'departmentName'
},
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7 // 如果没有后面的-8.64e7就是不可以选择今天的
}
},
popoverVisible: false,
loading: false,
// 表格参数
......
......@@ -23,24 +23,12 @@
<div slot="followName" class="entmicro" slot-scope="scope">
<div v-if="!followList(scope.scope.followName).length">--</div>
<div class="entmicro-tag" style="padding-right:3px" v-for="(tag, idx) in followList(scope.scope.followName)" :key="idx">
<el-tooltip effect="dark" :content="tag" placement="top">
<el-tag type="info" class="ellipsis-1" v-if="idx < 2" :disable-transitions="false">
<GLFull :labelWidth="110" :content="tag" identification="ellipsis-1">
<el-tag type="info" class="ellipsis-1" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ tag }}
</el-tag>
</el-tooltip>
<el-tag type="info" v-if="followList(scope.scope.followName).length > 2 && idx == 2">
<el-popover placement="top" width="600" trigger="hover">
<div slot="reference">...({{ followList(scope.scope.followName).length }})</div>
<div class="entmicro-hover">
<el-tag style="margin-left:4px" type="info" v-for="(i, index) in followList(scope.scope.followName)" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid" style="color: #75acff"></i>
{{ i }}
</el-tag>
</div>
</el-popover>
</el-tag>
</GLFull>
</div>
</div>
<!-- 企微名称 -->
......@@ -70,7 +58,7 @@
</span>
<div slot="followFlag" slot-scope="scope">
<div class="statusText">
<span :class="{ circleStatusGray: scope.scope.followFlag === 0, circleStatusGreen: scope.scope.followFlag == 1 }"></span>
<span :class="{ circleStatusGray: scope.scope.followFlag === 0, circleStatusGreen: scope.scope.followFlag == 1 || scope.scope.followFlag == 2 }"></span>
<span>{{ statusText(scope.scope.followFlag) }}</span>
</div>
</div>
......@@ -142,8 +130,8 @@ export default {
label: '分配日期',
valueFormat: 'yyyy-MM-dd',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
disabledDate: time => {
return time.getTime() > Date.now()
}
}
},
......@@ -279,7 +267,7 @@ export default {
},
//分配任务
handleDistribution() {
if (!this.customerIds.length == 0) {
if (this.customerIds.length == 0) {
this.$message({
showClose: true,
duration: 3000,
......@@ -296,7 +284,7 @@ export default {
return str.split(',')
},
statusText(text) {
return text === 1 ? '已跟进' : text === 0 ? '未跟进' : '--'
return text === 1 || text === 2 ? '已跟进' : text === 0 ? '未跟进' : '--'
},
setTableHeightEvent() {
this.$refs.customForm.setTableHeightFun()
......@@ -320,10 +308,10 @@ export default {
}
params.id = this.$route.query.id
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0].replace(/-/g, '/')
params.startTime = this.searchForm.daterange[0].replace(/-/g, '/')
params.endTime = this.searchForm.daterange[1].replace(/-/g, '/')
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
if (params.startTime) delete params.startTime && delete params.endTime
}
delete params.daterange
return params
......@@ -403,6 +391,12 @@ export default {
</script>
<style lang="scss" scoped>
.ellipsis-1 {
max-width: 100%;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.statusText {
> span:first-child {
width: 6px;
......@@ -517,8 +511,7 @@ export default {
}
.el-tag {
// margin-right: 10px;
max-width: 110px;
max-width: 110%;
cursor: pointer;
background-color: #fff !important;
}
......
......@@ -6,7 +6,7 @@
</div>
<div class="activity-tabel scrm-box-f">
<div class="activity-tabel-form">
<GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable @setTableFinishFun="setTableFinishFun" :noDataImg="url" ref="taskForm" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDistribution(scope.scope)">任务分配</el-button>
......@@ -134,6 +134,9 @@ export default {
if (this.tableSearchForm.createTime) {
this.tableSearchForm.startTime = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/')
this.tableSearchForm.endTime = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/')
} else {
delete this.tableSearchForm.startTime
delete this.tableSearchForm.endTime
}
delete this.tableSearchForm.createTime
resolve()
......
......@@ -9,7 +9,7 @@
</div>
<div class="activity-tabel scrm-box-f">
<div class="activity-tabel-form">
<GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm :rowNumber="1" ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable @setTableFinishFun="setTableFinishFun" ref="taskForm" :noDataImg="url" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="status" slot-scope="scope">
<el-switch v-model="scope.scope.status" :active-value="0" :inactive-value="-1" @change="changeSwitch(scope.scope)"></el-switch>
......@@ -146,6 +146,9 @@ export default {
if (this.tableSearchForm.createTime) {
this.tableSearchForm.beginTime = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/\//g, '-')
this.tableSearchForm.endTime = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/\//g, '-')
} else {
delete this.tableSearchForm.beginTime
delete this.tableSearchForm.endTime
}
delete this.tableSearchForm.createTime
resolve()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!