Commit c5deaa5c by 前端

commit

1 parent 73168da6
{ {
"name": "scrm-micro-outbound", "name": "outbound",
"version": "1.0.0", "version": "1.0.0",
"description": "A Vue.js project", "description": "A Vue.js project",
"private": true, "private": true,
......
...@@ -26,8 +26,9 @@ ...@@ -26,8 +26,9 @@
</div> </div>
<img src="./assets/logo.png" alt="" srcset="" /> <img src="./assets/logo.png" alt="" srcset="" />
</div>--> </div>-->
<keep-alive exclude="details">
<router-view /> <router-view />
</keep-alive>
</div> </div>
</template> </template>
......
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http_common } from '@/main'
const pictureUpload = params => {
params.method = 'glsx.accounts.biz.common.pictureUpload'
return http_common({
url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
export default {
pictureUpload
}
import { http } from '@/main'
const url = '/rop-scrm-entmicro/router'
// 智能外呼任务分页
const getTaskList = params => {
params.method = 'entmicro.api.outbound.task.page'
return http({
url,
method: 'POST',
data: params,
sign: true
})
}
// 统计:所有任务的执行状态
const getStatusStatistics = params => {
params.method = 'entmicro.api.outbound.task.status'
return http({
url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 设置外呼数量
const setOutBoundNum = params => {
params.method = 'entmicro.api.outbound.task.outBoundNum'
return http({
url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 创建外呼执行任务
const createExecuteTask = params => {
params.method = 'entmicro.api.outbound.call.create.execute.task'
return http({
url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 获取机器人列表
const getRobotList = params => {
params.method = 'entmicro.api.outbound.call.robot.list.query'
return http({
url,
method: 'POST',
data: params,
sign: true
})
}
// 获取呼叫电话列表
const getCallerList = params => {
params.method = 'entmicro.api.outbound.call.caller.numbers.query'
return http({
url,
method: 'POST',
data: params,
sign: true
})
}
// 智能外呼任务详情-基本信息
const taskbaseDetails = params => {
params.method = 'entmicro.api.outbound.task.detail'
return http({
url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 智能外呼任务详情-手机号状态列表分页
const getphoneStatusList = params => {
params.method = 'entmicro.api.outbound.task.phoneStatus.page'
return http({
url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 下载手机号状态列表
const downloadPhoneList = params => {
params.method = 'entmicro.api.outbound.task.phoneStatus.download'
return http({
url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 执行任务状态变更
const updateStatus = params => {
params.method = 'entmicro.api.outbound.call.execute.task.status.update'
return http({
url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 导入手机号更新添加状态接口
const updatePhoneStatus = params => {
params.method = 'entmicro.api.outbound.call.import.update.phone.status'
return http({
url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 获取外呼数量
const getOutBoundNum = params => {
params.method = 'entmicro.api.outbound.task.getOutBoundNum'
return http({
url,
method: 'POST',
data: params,
sign: true
})
}
export default { getTaskList, getStatusStatistics, setOutBoundNum, createExecuteTask, getRobotList, getCallerList ,taskbaseDetails ,getphoneStatusList,downloadPhoneList,updateStatus,updatePhoneStatus,getOutBoundNum}
import { http } from '@/main'
const defaultPath = 'scrm.api.shopmall.'
const getZoneListApi = params => {
params.method = `${defaultPath}zoneInfo.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
const deleteZoneApi = params => {
params.method = `${defaultPath}zoneInfo.delete`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const getZoneInfoApi = params => {
params.method = `${defaultPath}zoneInfo.getById`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
const insertZoneApi = params => {
params.method = `${defaultPath}zoneInfo.insertOrUpdate`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getZoneListApi, deleteZoneApi, getZoneInfoApi, insertZoneApi }
...@@ -5,19 +5,59 @@ html { ...@@ -5,19 +5,59 @@ html {
margin: 0; margin: 0;
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
background-color: #F4F5FA; background-color: #f4f5fa;
} }
.el-form-item__content {
.marketing .container { width: 360px;
.el-input__inner {
height: 32px !important;
line-height: 32px !important;
}
}
.flex {
display: flex;
align-items: center;
}
.outbound .container {
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px; padding: 20px;
} }
.marketing .m-b-20 { .outbound .m-b-20 {
margin-bottom: 20px; margin-bottom: 20px;
} }
.fwt-4{
font-weight: 400;
}
.font-12 {
font-size: 12px;
}
.font-14 {
font-size: 14px;
}
.color6 {
color: #666666;
}
.color3 {
color: #333333;
}
.color58{
color:#5850FF
}
.m-r-4 {
margin-right: 4px;
}
.m-l-4 {
margin-left: 4px;
}
.marketing.p-t-20 { .m-b-10 {
margin-bottom: 10px;
}
.outbound.p-t-20 {
padding-top: 20px; padding-top: 20px;
} }
.line-20{
line-height: 20px;
}
\ No newline at end of file \ No newline at end of file
/**
* 时间控件-限制月份
*/
export const rangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const rangetimePickerOptions = {
disabledDate(date) {
let dateHour = new Date()
dateHour.setDate(date.getDate())
dateHour.setHours(8)
dateHour.setMinutes(0)
dateHour.setSeconds(0)
if (dateHour.getTime() < date.getTime() < new Date(2016, 9, 10, 20, 0).getTime()) {
return true
}
return false
}
}
<!-- 搜索 -->
<template>
<div class="glsx-combi-form">
<el-form :ref="formRef" :inline="true" :model="formObj" :label-width="labelWidth" :rules="formRules" size="mini" class="glsx-combi-form-block">
<template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :class="{ 'no-label': !item.label, tips: item.tips }" :label="item.label ? item.label + ':' : ''" :prop="item.name">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<el-input v-else-if="item.type === 'input'" :placeholder="item.placeholder || '请输入' + item.label" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :style="{ width: item.width || 'auto' }" :show-word-limit="item.showLimit || false" @keydown.native="e => handleInputDown(e, item)"></el-input>
<!-- 选择-输入框 -->
<el-input v-else-if="item.type === 'selectInput'" :placeholder="'请输入' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label" v-model.trim="searchSelectObj[item.selectName].value" :clearable="item.isClear || false" class="input-with-select">
<el-select v-model="searchSelectObj[item.selectName].attr" style="width: 130px" slot="prepend" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
</el-input>
<!-- 选择-时间选择框 -->
<template v-else-if="item.type === 'selectDatePicker'">
<el-select v-model="searchSelectObj[item.selectName].attr" style="width: 130px" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
<el-date-picker v-model="searchSelectObj[item.selectName].value" style="width: calc(100% - 130px)" :type="item.dateType || 'daterange'" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOption[item.pickerOptions]"></el-date-picker>
</template>
<!-- 选择-时间选择框 -->
<template v-else-if="item.type === 'selectTimePicker'">
<el-time-picker is-range v-model="formObj[item.name]" :value-format="item.format || ''" :style="{ width: item.width || '100%' }" :picker-options="item.pickerOptions || ''" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</template>
<!-- 双选择框 -->
<template v-else-if="item.type === 'selectDouble'">
<el-select v-model="searchSelectObj[item.selectName].attr" style="width: 130px" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
<el-select v-model="searchSelectObj[item.selectName].value" style="width: calc(100% - 130px)" :placeholder="'请选择' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label">
<el-option label="全部" value=""></el-option>
<el-option v-for="subItem in item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]"></el-option>
</el-select>
</template>
<!-- 选择框 -->
<el-select v-else-if="item.type === 'select'" :style="{ width: item.width || '100%' }" v-model="formObj[item.name]" :clearable="item.isClear || false" :placeholder="'请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-option v-for="subItem in item.optionList" :key="item.optionId ? subItem[item.optionId] : subItem" :label="item.optionLabel ? subItem[item.optionLabel] : subItem" :value="item.optionId ? subItem[item.optionId] : subItem" :disabled="subItem.isDisabled || false"></el-option>
</el-select>
<!-- 计数器 -->
<template v-else-if="item.type === 'inputNumber'"></template>
<!-- radio -->
<el-radio-group v-else-if="item.type === 'radio'" v-model="formObj[item.name]" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionId]" :disabled="subItem.isDisabled || false">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group>
<el-date-picker v-else-if="item.type === 'datePicker'" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOption[item.pickerOptions]"></el-date-picker>
</el-form-item>
</template>
<slot></slot>
</el-form>
</div>
</template>
<script>
import { rangePickerOptions, rangetimePickerOptions } from './common'
export default {
name: 'glsx-combi-form',
data() {
return {
pickerOption: {
rangePickerOptions: rangePickerOptions,
rangetimePickerOptions: rangetimePickerOptions
}
}
},
props: {
formRef: {
type: String,
default: 'formRef'
},
labelWidth: {
type: String,
default: '85px'
},
formData: {
type: Array,
default: () => []
},
formObj: {
type: Object,
default: () => {}
},
hasTitle: {
type: Boolean,
default: true
},
formRules: {
type: Object,
default: () => {}
},
// 搜索+输入框/搜索组合组件,搜索栏绑值
searchSelectObj: {
type: Object,
default: () => {}
}
},
mounted() {},
methods: {
// 选择框-添加其他属性
selectAddAttr(value, targetItem) {
targetItem.changeAttr && targetItem.changeAttr(value, targetItem)
},
handleInputDown(e, item) {
if (e.keyCode === 13 && item.hasOwnProperty('keyFn')) {
item.keyFn()
}
}
}
}
</script>
<style scoped lang="scss">
.glsx-combi-form .no-label.el-form-item--mini .el-form-item__content,
.el-form-item--mini .el-form-item__label {
width: 100%;
}
.glsx-combi-form .el-col {
margin-bottom: 10px;
}
.glsx-combi-form .el-select {
width: 100%;
}
.glsx-combi-form .item-height {
height: 37px;
}
.glsx-combi-form input::-webkit-outer-spin-button,
.glsx-combi-form input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
.glsx-combi-form input[type='number'] {
-moz-appearance: textfield !important;
}
.glsx-combi-form .input-with-select .el-input-group__prepend {
background-color: #fff;
}
.glsx-combi-form .tips {
margin: 0;
}
.glsx-combi-form /deep/ .el-input-number {
width: 85px;
.el-input__inner {
height: 28px !important;
line-height: 28px !important;
// width:45px;
}
.el-input-number__decrease,
.el-input-number__increase {
background-color: #fff !important;
width: 20px;
}
}
</style>
<template>
<div>
<template >
<div class="layout-wrap">
<el-row :gutter="30">
<template v-for="(params, index) in rowParams">
<el-col :span="params.span" :key="index">
<div class="label-wrap">
<label>{{ params.label }}</label>
<slot v-if="params.addHtml" :name="params.addHtml" :scope="list"></slot>
<span v-else>
{{ list[params.prop] }}
</span>
</div>
</el-col>
</template>
</el-row>
</div>
</template>
</div>
</template>
<script>
export default {
name: 'glsx-rows',
data() {
return {
list: '',
rowParams: ''
}
},
props: {
//获取的数据
layoutData: {
type: Object,
default: () => {}
},
layoutParams: {
type: Array,
default: () => []
}
},
watch: {
layoutData(val) {
this.list = val
let { layoutParams } = this
for (let i = 0; i < layoutParams.length; i++) {
if (layoutParams[i].isHidden && !layoutParams[i].isHidden(val)) {
layoutParams.splice(i--, 1)
}
}
this.rowParams = layoutParams
console.log(this.rowParams,'-------------')
}
},
created() {}
}
</script>
<style scoped lang="scss">
.layout-wrap {
.el-row {
&:last-child {
margin-bottom: -20px;
}
.el-col {
margin-bottom: 20px;
}
.label-wrap {
display: flex;
align-items: center;
min-width: 80%;
label {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
text-align: right;
min-width: 70px;
display: inline-block;
}
span {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
text-align: left;
// max-width: 228px;
// white-space: nowrap;
// overflow: hidden;
// text-overflow: ellipsis;
// display: inline-block;
}
}
}
}
</style>
...@@ -9,5 +9,12 @@ ...@@ -9,5 +9,12 @@
*/ */
import Vue from 'vue' import Vue from 'vue'
import glsxDialog from '@/components/glsx-dialog/index.vue' import glsxDialog from '@/components/glsx-dialog/index.vue'
import glsxCombiForm from '@/components/glsx-combi-form/index.vue'
import tipPanel from '@/components/tipPanel/index.vue'
import glsxRows from '@/components/glsx-rows/index.vue'
Vue.component('glsx-dialog', glsxDialog) Vue.component('glsx-dialog', glsxDialog)
Vue.component('glsx-combi-form', glsxCombiForm)
Vue.component('tip-panel', tipPanel)
Vue.component('glsx-rows', glsxRows)
\ No newline at end of file \ No newline at end of file
<template>
<div>
<div class="initPanel flex" :style="{ width: panelWidth, minHeight: panelMinHeight }">
<img src="@/assets/Shape.png" alt="" />
<label>{{ panelContent }}</label>
<i class="el-icon-close" @click="closeInitPanel"></i>
</div>
</div>
</template>
<script>
export default {
props: {
panelWidth: {
type: String,
default: ''
},
panelMinHeight: {
type: String,
default: '20px'
},
panelContent: {
type: String,
default: '请传入面板内容'
},
isShowCloseBtn: {
type: Boolean,
default: false
}
},
data() {
return {}
},
methods: {
closeInitPanel() {
this.$emit('closePanel')
}
}
}
</script>
<style lang="scss" scoped>
// @import '@/styles/variables.scss';
.initPanel {
margin-bottom: 20px;
position: relative;
box-sizing: border-box;
background: #e6e9ff;
border-radius: 4px;
padding: 0 8px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 20px;
img {
margin-right: 4px;
}
i {
width: 9px;
height: 9px;
cursor: pointer;
position: absolute;
top: 14px;
right: 18px;
}
}
</style>
...@@ -12,7 +12,7 @@ let cfg = require('./conf.js') ...@@ -12,7 +12,7 @@ let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) { export const fetchConfig = function (isEnv = true) {
// console.log(1111111)
// if (isEnv) { // if (isEnv) {
// let { request } = cfg // let { request } = cfg
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
......
const staticRoutes = Object.freeze([{ const staticRoutes = Object.freeze([{
name: 'default', name: 'default',
path: '/', path: '/',
redirect: { name: 'zoneList' } redirect: { name: 'outbound' }
}, },
{ {
name: 'zoneList', name: 'outbound',
path: '/zoneList/index', path: '/outbound/index',
component: resolve => require([`@/views/zoneList/index.vue`], resolve), component: resolve => require([`@/views/outbound/index.vue`], resolve),
meta: {}
},
{
name: 'details',
path: '/outbound/details',
component: resolve => require([`@/views/outbound/details.vue`], resolve),
meta: {} meta: {}
} }
]) ])
......
<!-- -->
<template>
<div class="container-detail">
<div class="outbound-info">
<div class="outbound-info-title">外呼基本信息</div>
<glsx-rows class="glsx-rows-wrap" :layoutData="detailData" :layoutParams="outboundParams">
<template slot="callerNums" slot-scope="scope">
<template v-for="item in eval(scope.scope.callerNums)">
<span class="font-14 color3 line-20" :key="item">{{ item }}</span>
</template>
</template>
<template slot="dialTime" slot-scope="scope">
<span class="font-14 color3 line-20">{{ scope.scope.dialStartTime }}-{{ scope.scope.dialEndTime }}</span>
</template>
<template slot="retryTimes" slot-scope="scope">
<span class="font-14 color3 line-20">重播{{ scope.scope.retryTimes }}次,每次间隔{{ scope.scope.retryInterval }}分钟</span>
</template>
</glsx-rows>
</div>
<div class="outbound-info">
<div class="outbound-info-title flex">
离店客户加好友概览
<span style="margin:0 8px;color: #666666; font-size: 14px;">|</span>
<lbael class="color6 font-14 fwt-4">{{ detailData.taskStatus == 2 ? '正在执行中' : detailData.taskStatus == 3 ? '已暂停' : '已完成' }}</lbael>
</div>
<div class="outbound-info-wrap">
<div class="general">
<div class="general-item" v-for="(item, index) in statisticsList" :key="index">
<div class="general-item-icon">
<img :src="item.logo" />
</div>
<div>
<div class="general-item-title">{{ item.describe }}</div>
<div class="general-item-num">
{{ item.value(detailData) }}
<span class="font-14;color3;m-l-4">人</span>
</div>
</div>
</div>
</div>
<div class="chart" id="lineRef"></div>
<GLCombiForm :rowNumber="1" class="searchForm" ref="detailsSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable class="detailsTable" ref="detailsTable" :searchForm="searchForm" :pageConf="pageConf" :tableParams="tableParams" :getListApi="getListApi">
<template slot="phoneStatus" slot-scope="scope">
<div :class="['task_icon', `task_icon${scope.scope.phoneStatus}`]">{{ taskStatus(scope.scope.phoneStatus) }}</div>
</template>
</GLTable>
</div>
</div>
</div>
</template>
<script>
const TASK_STATUS = [
{
label: '该用户不存在',
value: 1
},
{
label: '待发送好友申请',
value: 2
},
{
label: '已发送好友申请',
value: 3
},
{
label: '申请通过',
value: 4
}
]
import * as echarts from 'echarts'
export default {
name: 'details',
data() {
return {
id: this.$route.query.id ? this.$route.query.id : 0,
getListApi: this.$apis.outbound.getphoneStatusList,
detailData: {},
myChart: null,
searchForm: {
phone: '',
status: '',
id: this.$route.query.id
},
outboundParams: [
{
label: '任务名称:',
prop: 'taskName',
span: 12
},
{
label: '选择话术机器人:',
prop: 'robotName',
span: 12
},
{
label: '外呼主叫号码:',
addHtml: 'callerNums',
span: 12
},
{
label: '外呼时间:',
addHtml: 'dialTime',
span: 12
},
{
label: '重播设置:',
addHtml: 'retryTimes',
span: 12
}
// {
// label: '号码过滤:',
// prop: 'numTypeFilterList',
// span: 12
// }
],
searchFormData: [
{
label: '手机号',
name: 'phone',
type: 'input'
}
// {
// label: '状态',
// name: 'status',
// type: 'select',
// optionList: [
// {
// id: '',
// name: '全部'
// },
// {
// id: 1,
// name: '该用户不存在'
// },
// {
// id: 2,
// name: '待发送好友申请'
// },
// {
// id: 3,
// name: '已发送好友申请'
// }],
// optionId: 'id',
// optionLabel: 'name'
// }
],
statisticsList: [
{
logo: require('../../assets/customer.png'),
describe: '客户总数',
value: obj => {
return obj.phoneCount ? obj.phoneCount : 0
}
},
{
logo: require('../../assets/apply.png'),
describe: '通过申请',
value: obj => {
return obj.passNums ? obj.passNums : 0
}
},
{
logo: require('../../assets/user.png'),
describe: '不存在的手机号用户',
value: obj => {
return obj.noneUserNums ? obj.noneUserNums : 0
}
}
],
// 表格参数
tableParams: {
listName: 'data.data',
tableColumns: [
{
label: '手机号',
prop: 'phone'
},
{
label: '状态',
prop: 'phoneStatus',
addHtml: 'phoneStatus'
}
]
},
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'data.count'
}
}
},
mounted() {
let chartDom = document.getElementById('lineRef')
this.myChart = echarts.init(chartDom)
window.addEventListener('resize', () => {
this.myChart.resize()
})
this.taskbaseDetails()
},
methods: {
eval(data) {
const arr = data.replace(/("|\[|\])/g, '').split(',')
return arr
},
taskStatus(status) {
const val = TASK_STATUS.find(item => item.value == status)
return val ? val.label : '--'
},
taskbaseDetails() {
let params = {
id: this.id
}
this.$apis.outbound.taskbaseDetails(params).then(res => {
if (res.code == 0) this.detailData = res.data
this.initCanvas(this.detailData.phoneStatusDailyCharts)
})
},
handleSearch() {
this.$refs.detailsTable.refreshTable()
},
handleReset() {
this.searchForm = {
phone: '',
status: '',
id: this.id
}
this.handleSearch()
},
initCanvas(lineValue) {
const x_data = lineValue && lineValue.length ? lineValue.map(item => item.dailyDate) : []
const y_data = lineValue && lineValue.length ? lineValue.map(item => item.passedCounts) : []
this.option = {
tooltip: {
show: true,
axisPointer: {
// type: 'cross'
}
},
grid: {
right: '90x',
left: '90px'
},
minInterval: 1,
xAxis: {
type: 'category',
data: x_data
},
yAxis: {
type: 'value'
},
series: [
{
// symbol: 'none',
data: y_data,
type: 'line',
smooth: true,
areaStyle: {
color: 'rgba(88,80,255, 0.15)'
}
}
]
}
this.myChart.setOption(this.option)
},
btnClick() {}
}
}
</script>
<style scoped lang="scss">
.task_icon {
position: relative;
&::after {
content: '';
position: absolute;
top: 4px;
left: -10px;
width: 6px;
height: 6px;
border-radius: 4px;
}
&.task_icon1 {
&::after {
background: #999999;
}
}
&.task_icon2 {
&::after {
background: #fdb757;
}
}
&.task_icon3 {
&::after {
background:#5850ff;
}
}
&.task_icon4 {
&::after {
background: #2cca74;
}
}
}
.container-detail {
padding: 20px 0;
overflow-y: scroll;
height: 100%;
.outbound-info {
width: 100%;
height: auto;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-bottom: 10px;
&-title {
line-height: 28px;
font-size: 16px;
font-weight: 600;
color: #333333;
padding: 15px 0 15px 20px;
border-bottom: 1px solid #e5e5e5;
}
.glsx-rows-wrap {
padding: 32px 76px;
}
&-wrap {
padding: 20px 16px;
box-sizing: border-box;
background: #ffffff;
.general {
display: flex;
align-items: center;
margin: 0 40px 20px 40px;
.general-item {
width: 274px;
height: 100px;
background: #f9fafc;
border-radius: 4px;
padding: 20px 16px;
display: flex;
box-sizing: border-box;
margin-right: 16px;
&-icon {
width: 48px;
height: 48px;
margin-right: 16px;
img {
width: 100%;
}
}
&-title {
font-size: 14px;
color: #333333;
line-height: 20px;
margin-bottom: 10px;
}
&-num {
font-size: 26px;
font-weight: bold;
color: #333;
line-height: 31px;
}
}
}
.chart {
height: 320px;
}
.searchForm {
margin-bottom: 20px;
}
}
}
.m-b-7 {
margin-bottom: 70px;
}
.footer-btn {
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
background-color: #fff;
}
}
.detailsTable {
// /deep/ {
// .el-table__header tr,
// .el-table th.el-table__cell {
// background: #f4f6fc;
// font-size: 14px;
// color: #333;
// display: flex;
// line-height: 20px;
// width: 100vw;
// }
// th:nth-child(1) {
// visibility: hidden;
// }
// th {
// flex: 1;
// }
// }
}
</style>
<!-- 专区管理 -->
<template>
<div class="marketing p-t-20">
<div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建</el-button>
</div>
<div class="container">
<el-form :inline="true">
<el-form-item label="专区名称">
<el-input style="width: 215px;" :size="size" v-model="searchForm.zoneName"></el-input>
</el-form-item>
<el-form-item class="search-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="default" @click="handleReset">查询</el-button>
</el-form-item>
</el-form>
<!-- 表格区域 开始 -->
<GLTable
ref="zoneRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'zoneList',
data() {
return {
size: 'small',
url: url,
searchForm: {
zoneName: '',
createDate: []
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '专区名称',
name: 'zoneName',
type: 'input',
maxlength: 20
},
{
label: '创建日期',
name: 'createDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}
],
// 表格
getListApi: this.$apis.zoneList.getZoneListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '专区名称',
prop: 'zoneName'
},
{
label: '创建日期',
prop: 'createdDate',
width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
mounted() {},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
params.zoneType = '2' //专区类型(1发现频道,2商城专区)
if (this.searchForm.createDate.length) {
params.startTime = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.endTime = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.createDate
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate
resolve()
})
},
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
this.$message({
type: 'success',
message: addOrEdit == '1' ? '新增' : '编辑'
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.zoneRef.data.length ? (this.$refs.zoneRef.tableHeightValues = '') : this.$refs.zoneRef.setTableHeightFun()
},
handleSearch() {
this.$refs.zoneRef.refreshTable()
},
handleReset() {
this.searchForm = {
zoneName: ''
}
this.handleSearch()
}
}
}
</script>
<style scoped>
.marketing .search-btns {
float: right;
margin-right: 0;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!