Commit 187c867a by 李伟康

commit 盯防

1 parent f68d9041
...@@ -5,23 +5,6 @@ ...@@ -5,23 +5,6 @@
size="small" size="small"
label-width="97px" label-width="97px"
> >
<el-form-item
label="归属业务:"
v-if="!-hideSelect"
>
<el-select
class="select"
v-model="form.businessType"
@change="search('businessType')"
>
<el-option
v-for="item in bussinessTypeList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-radio-group <el-radio-group
v-model="form.dateType" v-model="form.dateType"
...@@ -67,8 +50,6 @@ export default { ...@@ -67,8 +50,6 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
hideToday: Boolean,
hideSelect: Boolean
}, },
data () { data () {
return { return {
...@@ -76,17 +57,11 @@ export default { ...@@ -76,17 +57,11 @@ export default {
disabledDate: date => date > new Date() disabledDate: date => date > new Date()
}, },
form: { form: {
businessType: 4, dateType: 'week'
dateType: 'date'
}, },
date: [], date: [],
bussinessTypeList: [
{ value: 2, name: '轻改' },
{ value: 3, name: '权益' },
{ value: 4, name: '延保' },
],
dateGroup: [ dateGroup: [
{ name: '今日', value: 'date' }, // { name: '今日', value: 'date' },
{ name: '本周', value: 'week' }, { name: '本周', value: 'week' },
{ name: '本月', value: 'month' }, { name: '本月', value: 'month' },
{ name: '全年', value: 'year' }, { name: '全年', value: 'year' },
...@@ -94,10 +69,6 @@ export default { ...@@ -94,10 +69,6 @@ export default {
} }
}, },
mounted () { mounted () {
if (this.hideToday) {
this.dateGroup.splice(0, 1)
this.form.dateType = 'week'
}
this.initDate() this.initDate()
}, },
methods: { methods: {
...@@ -130,36 +101,32 @@ export default { ...@@ -130,36 +101,32 @@ export default {
}; };
}, },
formatDate (date, type) { formatDate (date, type) {
return dayjs(date).format("YYYY-MM-DD") return dayjs(date).format("YYYY-MM-DD")
// + (type == 'start' ? ' 00:00:00' : ' 23:59:59') // + (type == 'start' ? ' 00:00:00' : ' 23:59:59')
}, },
changeDate (e) { changeDate (e) {
let [startDate, endDate] = e, let [startDate, endDate] = e
{ form: {
businessType
} } = this
const date1 = dayjs(startDate), const date1 = dayjs(startDate),
date2 = dayjs(endDate), date2 = dayjs(endDate),
day = date2.diff(date1, 'day') + 1 day = date2.diff(date1, 'day') + 1
if (day > 93) return this.$message.error('自定义时间范围限制为93天') if (day > 93) {
this.$message.error('自定义时间范围限制为93天')
return
}
this.form.dateType = '' this.form.dateType = ''
startDate = this.formatDate(startDate, 'start') startDate = this.formatDate(startDate, 'start')
endDate = this.formatDate(endDate) endDate = this.formatDate(endDate)
this.$emit('search', { this.$emit('search', {
businessType,
startDate, startDate,
endDate endDate
}) })
}, },
search (e) { search (e) {
let { dateGroup, form: { let { dateGroup, form: {
businessType,
dateType dateType
} } = this, } } = this,
params = { params = {
businessType
} }
if (this.hideSelect) delete params.businessType
if (e == 'dateType') this.date = [] if (e == 'dateType') this.date = []
if (dateType == 'year') { if (dateType == 'year') {
params.allYear = true params.allYear = true
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<search-box <search-box
@search="getBoardData" @search="getBoardData"
:hasConfig="false" :hasConfig="false"
hideToday
/> />
<div class="board-content"> <div class="board-content">
<div <div
...@@ -30,6 +29,7 @@ export default { ...@@ -30,6 +29,7 @@ export default {
}, },
data () { data () {
return { return {
chart: null
} }
}, },
mounted () { mounted () {
...@@ -43,7 +43,6 @@ export default { ...@@ -43,7 +43,6 @@ export default {
}, },
drawChart () { drawChart () {
let { pageData } = this let { pageData } = this
console.log(pageData)
let base = +new Date(2001, 0, 1); let base = +new Date(2001, 0, 1);
let oneDay = 1000 * 3600 * 24; let oneDay = 1000 * 3600 * 24;
let data = [[base, Math.random() * 300]]; let data = [[base, Math.random() * 300]];
...@@ -54,8 +53,24 @@ export default { ...@@ -54,8 +53,24 @@ export default {
let option = { let option = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
position: function (pt) { position: function (point, params, dom, rect, size) { // 解决tooltip在最右侧时部分被遮挡
return [pt[0], '10%']; let obj = {};
if (point[0] > size.viewSize[0] / 2) { // 鼠标位置位于echarts容器的一半位置右侧时,提示框显示在左侧
obj['left'] = point[0] - size.contentSize[0] - 20;
} else {
obj['right'] = size.viewSize[0] - size.contentSize[0] * 2;
}
if (point[1] > size.viewSize[1] / 2) { // 鼠标位置位于echarts容器的一半位置下侧时,提示框显示在上侧
obj['top'] = point[1] - size.contentSize[1] - 20;
} else {
obj['bottom'] = size.viewSize[1] - size.contentSize[1] * 2;
}
return obj;
},
formatter: params => {
// console.log(params)
let str = '';
return str;
} }
}, },
title: { title: {
...@@ -63,8 +78,8 @@ export default { ...@@ -63,8 +78,8 @@ export default {
text: `${pageData.name}趋势图` text: `${pageData.name}趋势图`
}, },
grid: { grid: {
left: '5%', left: '50',
right: '5%' right: '30'
}, },
xAxis: { xAxis: {
type: 'time', type: 'time',
......
<template>
<div class="output-container">
<el-form
inline
size="small"
label-width="97px"
>
<el-form-item label="套餐:">
<el-select
class="select"
v-model="form.package"
>
<el-option
v-for="item in packageList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="商品:">
<el-select
class="select"
v-model="form.goods"
>
<el-option
v-for="item in goodsList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="员工:">
<el-select
class="select"
v-model="form.staffId"
multiple
collapse-tags
:multiple-limit="5"
>
<el-option
v-for="item in staffList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<div class="staff-box">
<div
class="staff-card"
v-for="item in staffCardList"
:key="item.value"
>
</div>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
packageList: [],
goodsList: [],
staffList: [],
form:{
package: '',
goods: '',
staffId: []
},
staffCardList:new Array(5)
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.output-container {
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div> <div class="human-layout">
<tab
:tabList="tabList"
:activeName.sync="activeName"
/>
<template v-for="i in tabList">
<component
:ref="i.componentName"
:key="i.id"
:is="i.componentName"
v-show="activeName == i.id"
:show="activeName == i.id"
:pageId="`human-${pageId}`"
/>
</template>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { import Tab from '../Tab'
name: '', import Output from './Output.vue'
data () { export default {
return { components: {
} Tab,
Output
},
props: {
pageId: {
type: String,
default: ''
}, },
mounted () { show: Boolean
}, },
methods: { name: '',
watch: {
show (val) {
if (val) this.activeName = this.tabList[0].id
}
},
data () {
return {
activeName: '',
tabList: [
{
label: '产值分析',
componentName: 'Output',
id: '1',
},
{
label: '行为分析',
componentName: 'OutputLine',
id: '2',
},
{
label: '接待分析',
componentName: 'OutputLine',
id: '3',
},
{
label: '人员变动',
componentName: 'OutputLine',
id: '4',
},
]
} }
},
mounted () {
},
methods: {
} }
}
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.human-layout {
background-color: #fff;
position: relative;
transform: translateY(-54px);
}
</style> </style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="output-box">
<el-form
class="form"
inline
size="small"
label-width="97px"
>
<el-form-item label="驻店人员:">
<el-select
class="select"
v-model="form.staffId"
@change="change"
>
<el-option
v-for="item in staffList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<div
:id="pageId"
class="line-chart"
>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import * as echarts from 'echarts'
export default {
name: '',
props: {
pageId: {
type: String,
default: ''
},
show: Boolean
},
data () {
return {
form: {},
staffList: []
}
},
watch: {
show (val) {
if (val) {
this.chart = echarts.init(document.getElementById(this.pageId))
this.drawChart()
}
}
},
mounted () {
},
methods: {
change () { },
drawChart () {
const dataCount = 20;
const data = generateData(dataCount);
let option = {
title: {
text: '销售额趋势',
left: 20
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
left: 63,
right: 20,
bottom: 80
},
dataZoom: [
{
type: 'inside'
},
{
type: 'slider'
}
],
xAxis: {
data: data.categoryData,
silent: false,
splitLine: {
show: false
},
splitArea: {
show: false
}
},
yAxis: {
splitArea: {
show: false
}
},
series: [
{
type: 'bar',
data: data.valueData,
large: true
}
]
};
function generateData (count) {
let baseValue = Math.random() * 1000;
let time = +new Date(2011, 0, 1);
let smallBaseValue;
function next (idx) {
smallBaseValue =
idx % 30 === 0
? Math.random() * 700
: smallBaseValue + Math.random() * 500 - 250;
baseValue += Math.random() * 20 - 10;
return Math.max(0, Math.round(baseValue + smallBaseValue) + 3000);
}
const categoryData = [];
const valueData = [];
for (let i = 0; i < count; i++) {
categoryData.push(
echarts.format.formatTime('yyyy-MM-dd\nhh:mm:ss', time, false)
);
valueData.push(next(i).toFixed(2));
time += 1000;
}
return {
categoryData: categoryData,
valueData: valueData
};
}
option && this.chart.setOption(option)
}
}
}
</script>
<style scoped lang='scss'>
.output-box {
width: 100%;
padding-bottom: 20px;
.form {
padding-bottom: 14px;
}
.line-chart {
width: 100%;
height: 348px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div> <div class="product-layout">
<tab
:tabList="tabList"
:activeName.sync="activeName"
/>
<template v-for="i in tabList">
<component
:ref="i.componentName"
:key="i.id"
:is="i.componentName"
v-show="activeName == i.id"
:show="activeName == i.id"
:pageId="`product-${pageId}`"
/>
</template>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { import OutputLine from './OutputLine.vue'
name: '', import Tab from '../Tab'
data () { export default {
return { components: {
} OutputLine,
Tab
},
props: {
pageId: {
type: String,
default: ''
}, },
mounted () { show: Boolean
}, },
methods: { name: '',
watch: {
show (val) {
if (val) this.activeName = this.tabList[0].id
}
},
data () {
return {
activeName: '',
tabList: [
{
label: '产值趋势',
componentName: 'OutputLine',
id: '1',
},
]
} }
},
mounted () {
},
methods: {
} }
}
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.product-layout {
background-color: #fff;
position: relative;
transform: translateY(-54px);
}
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="line-box"> <div class="line-box">
<div class="title">产值趋势</div> <div class="title">产值趋势</div>
<div
class="line-chart"
:id="pageId"
>
</div>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import * as echarts from 'echarts'
export default { export default {
name: '', name: '',
props: {
pageId: {
type: String,
default: ''
}
},
data () { data () {
return { return {
chart: null
} }
}, },
mounted () { mounted () {
this.chart = echarts.init(document.getElementById(this.pageId))
this.drawChart()
}, },
methods: { methods: {
drawChart () {
let base = +new Date(2001, 0, 1);
let oneDay = 1000 * 3600 * 24;
let data = [[base, Math.random() * 300]];
for (let i = 1; i < 5000; i++) {
let now = new Date((base += oneDay));
data.push([+now, Math.round((Math.random() - 0.5) * 20 + data[i - 1][1])]);
}
let option = {
tooltip: {
trigger: 'axis',
position: function (point, params, dom, rect, size) { // 解决tooltip在最右侧时部分被遮挡
let obj = {};
if (point[0] > size.viewSize[0] / 2) { // 鼠标位置位于echarts容器的一半位置右侧时,提示框显示在左侧
obj['left'] = point[0] - size.contentSize[0] - 20;
} else {
obj['right'] = size.viewSize[0] - size.contentSize[0] * 2;
}
if (point[1] > size.viewSize[1] / 2) { // 鼠标位置位于echarts容器的一半位置下侧时,提示框显示在上侧
obj['top'] = point[1] - size.contentSize[1] - 20;
} else {
obj['bottom'] = size.viewSize[1] - size.contentSize[1] * 2;
}
return obj;
},
formatter: params => {
// console.log(params)
let str = '';
return str;
}
},
grid: {
left: '70',
right: '50'
},
xAxis: {
type: 'time',
boundaryGap: false
},
yAxis: {
type: 'value',
boundaryGap: [0, '100%']
},
dataZoom: [
{
type: 'inside',
start: 0,
end: 20
},
{
start: 0,
end: 20
}
],
series: [
{
name: 'Fake Data',
type: 'line',
symbol: 'none',
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: '#93AAFD'
},
{
offset: 1,
color: 'rgba(229, 234, 252, 0.31)'
}
])
},
data: data
}
]
};
option && this.chart.setOption(option)
}
} }
} }
</script> </script>
...@@ -31,5 +124,9 @@ export default { ...@@ -31,5 +124,9 @@ export default {
font-size: 18px; font-size: 18px;
font-weight: 500; font-weight: 500;
} }
.line-chart {
height: calc(100% - 49px);
width: 100%;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="store-layout"> <div class="store-layout">
<div class="store-box"> <div class="store-box">
<div class="search-component">
<search-box
@search="getBoardData"
hideSelect
:hasConfig="false"
/>
</div>
<div class="board-box"> <div class="board-box">
<template v-for="(item,index) in boardList"> <template v-for="(item,index) in boardList">
<board-item <board-item
...@@ -24,24 +17,28 @@ ...@@ -24,24 +17,28 @@
<funnel /> <funnel />
</div> </div>
<div class="line"> <div class="line">
<line-chart /> <line-chart :pageId="`store-${pageId}`" />
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import SearchBox from '../../SearchBox'
import BoardItem from '../../shopGuardIndex/BoardItem' import BoardItem from '../../shopGuardIndex/BoardItem'
import Funnel from './Funnel' import Funnel from './Funnel'
import LineChart from './LineChart' import LineChart from './LineChart'
export default { export default {
components: { components: {
SearchBox,
BoardItem, BoardItem,
Funnel, Funnel,
LineChart LineChart
}, },
props: {
pageId: {
type: String,
default: ''
}
},
name: '', name: '',
data () { data () {
return { return {
...@@ -81,27 +78,19 @@ export default { ...@@ -81,27 +78,19 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
getBoardData (params) {
console.log(params)
}
} }
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.store-layout { .store-layout {
transform: translateY(-54px);
.store-box { .store-box {
background: #fff; background: #fff;
border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px;
margin-bottom: 16px; margin-bottom: 16px;
padding-top: 54px;
.search-component {
position: relative;
left: 10px;
display: flex;
justify-content: flex-end;
// transform: translateX(10px);
}
.board-box { .board-box {
display: grid; display: grid;
grid-template-columns: repeat(5, 1fr); grid-template-columns: repeat(5, 1fr);
...@@ -123,6 +112,8 @@ export default { ...@@ -123,6 +112,8 @@ export default {
height: 429px; height: 429px;
border-radius: 4px; border-radius: 4px;
background: #ffffff; background: #ffffff;
flex-shrink: 0;
overflow: hidden;
} }
} }
} }
......
<template>
<div class="tab">
<div
:class="['tab-item',{ 'item-active': activeName == item.id }]"
v-for="item in tabList"
:key="item.id"
@click="$emit('update:activeName',item.id)"
>{{item.label}}</div>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
tabList: {
type: Array,
default: () => []
},
activeName: {
type: String,
default: ''
}
},
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.tab {
width: fit-content;
height: 38px;
border-radius: 4px;
background: #e8e8e8;
margin: 0 20px 21px;
border: 2px solid #e8e8e8;
display: flex;
align-items: center;
.tab-item {
padding: 0 24px;
display: flex;
height: 100%;
align-items: center;
font-size: 14px;
color: #666666;
cursor: pointer;
user-select: none;
}
.item-active {
background-color: #fff;
color: #185efe;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -27,6 +27,12 @@ ...@@ -27,6 +27,12 @@
/> />
</el-tabs> </el-tabs>
</div> </div>
<div class="search-component">
<search-box
@search="getBoardData"
:hasConfig="false"
/>
</div>
<div class="component"> <div class="component">
<template v-for="i in tabList"> <template v-for="i in tabList">
<component <component
...@@ -36,7 +42,7 @@ ...@@ -36,7 +42,7 @@
v-show="activeName == i.id" v-show="activeName == i.id"
:show="activeName == i.id" :show="activeName == i.id"
@openWindow="$emit('openWindow',$event)" @openWindow="$emit('openWindow',$event)"
:pageId="i.id" :pageId="`${pageData.pageId}_${i.id}`"
/> />
</template> </template>
</div> </div>
...@@ -47,9 +53,16 @@ ...@@ -47,9 +53,16 @@
import Store from './Store/index' import Store from './Store/index'
import Human from './Human/index' import Human from './Human/index'
import Product from './Product/index' import Product from './Product/index'
import SearchBox from '../SearchBox'
export default { export default {
components: { Store, Human, Product }, components: { Store, Human, Product, SearchBox },
name: '', name: '',
props: {
pageData: {
type: Object,
default: () => { }
}
},
data () { data () {
return { return {
activeName: '1', activeName: '1',
...@@ -75,6 +88,9 @@ export default { ...@@ -75,6 +88,9 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
getBoardData (params) {
console.log(params)
}
} }
} }
</script> </script>
...@@ -89,7 +105,7 @@ export default { ...@@ -89,7 +105,7 @@ export default {
} }
padding: 0 20px; padding: 0 20px;
.shop-info { .shop-info {
height: 121px; height: 104px;
background-color: #fff; background-color: #fff;
display: flex; display: flex;
box-sizing: border-box; box-sizing: border-box;
...@@ -159,5 +175,17 @@ export default { ...@@ -159,5 +175,17 @@ export default {
background: #e5e5e5; background: #e5e5e5;
} }
} }
.search-component {
position: relative;
display: flex;
justify-content: flex-end;
background: #fff;
z-index: 2;
width: fit-content;
margin-left: auto;
.search-box{
padding:0 10px 20px 0;
}
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="board-box"> <div class="board-box">
<search-box @search="getBoardData" /> <div class="board-search-box">
<el-form
inline
size="small"
label-width="97px"
>
<el-form-item label="归属业务:">
<el-select
class="select"
v-model="businessType"
@change="changeBusinessType"
>
<el-option
v-for="item in bussinessTypeList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<search-box @search="setTimeData" />
</div>
<div class="board-content"> <div class="board-content">
<div class="left-board flex-box"> <div class="left-board flex-box">
<template v-for="(item,index) in currentBoardList"> <template v-for="(item,index) in currentBoardList">
...@@ -41,6 +63,12 @@ export default { ...@@ -41,6 +63,12 @@ export default {
}, },
data () { data () {
return { return {
businessType: 4,
bussinessTypeList: [
{ value: 2, name: '轻改' },
{ value: 3, name: '权益' },
{ value: 4, name: '延保' },
],
boardData: {}, boardData: {},
currentBoardList: [ currentBoardList: [
{ {
...@@ -94,7 +122,8 @@ export default { ...@@ -94,7 +122,8 @@ export default {
value: 'touchNum', value: 'touchNum',
percent: 'touchNumRatio', percent: 'touchNumRatio',
}, },
] ],
timeObject:{}
} }
}, },
mounted () { mounted () {
...@@ -105,7 +134,16 @@ export default { ...@@ -105,7 +134,16 @@ export default {
}) })
}, },
methods: { methods: {
async getBoardData (params) { setTimeData (params) {
this.timeObject = params
this.getBoardData()
},
async getBoardData () {
let { timeObject, businessType } = this
let params = {
businessType,
...timeObject
}
const res = await getShopGuardIndexBoard(params) const res = await getShopGuardIndexBoard(params)
Object.keys(res).map(key => { Object.keys(res).map(key => {
if (res[key]) { if (res[key]) {
...@@ -117,6 +155,10 @@ export default { ...@@ -117,6 +155,10 @@ export default {
}) })
this.boardData = res this.boardData = res
}, },
changeBusinessType () {
this.getBoardData()
this.$emit('changeBusinessType', this.businessType)
}
} }
} }
</script> </script>
...@@ -125,6 +167,13 @@ export default { ...@@ -125,6 +167,13 @@ export default {
.board-box { .board-box {
background: #fff; background: #fff;
border-radius: 0 4px 4px 4px; border-radius: 0 4px 4px 4px;
.board-search-box {
display: flex;
align-items: center;
.el-form-item--small.el-form-item {
margin: 0 !important;
}
}
.board-content { .board-content {
padding: 0 20px 20px; padding: 0 20px 20px;
display: flex; display: flex;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
:show="activeName == i.id" :show="activeName == i.id"
@openWindow="$emit('openWindow',$event)" @openWindow="$emit('openWindow',$event)"
:pageId="i.id" :pageId="i.id"
:businessType="businessType"
/> />
</template> </template>
</div> </div>
...@@ -36,6 +37,12 @@ export default { ...@@ -36,6 +37,12 @@ export default {
WarnTable, WarnTable,
storeWarn storeWarn
}, },
props:{
businessType: {
type: String,
default: ''
}
},
data () { data () {
return { return {
activeName: '1', activeName: '1',
......
...@@ -65,7 +65,12 @@ export default { ...@@ -65,7 +65,12 @@ export default {
pageId: { pageId: {
type: String, type: String,
default: '1' default: '1'
} },
businessType: {
type: String,
default: ''
},
show: Boolean
}, },
data () { data () {
return { return {
...@@ -93,7 +98,6 @@ export default { ...@@ -93,7 +98,6 @@ export default {
], ],
tableList: [], tableList: [],
searchForm: { searchForm: {
businessType: 4,
countDate: dayjs().subtract(1, 'month').format("YYYY-MM") countDate: dayjs().subtract(1, 'month').format("YYYY-MM")
}, },
// getListApi: getMerchantPerformanceList, // getListApi: getMerchantPerformanceList,
...@@ -127,6 +131,11 @@ export default { ...@@ -127,6 +131,11 @@ export default {
}, },
} }
}, },
watch: {
businessType (n) {
this.handleSearch()
}
},
created () { created () {
}, },
mounted () { mounted () {
...@@ -165,6 +174,7 @@ export default { ...@@ -165,6 +174,7 @@ export default {
getParams () { getParams () {
let params = deepClone(this.searchForm) let params = deepClone(this.searchForm)
params.queryType = this.pageId params.queryType = this.pageId
params.businessType = this.businessType
return params return params
}, },
openWindow (e) { openWindow (e) {
......
<template> <template>
<div class="layout"> <div class="layout">
<board-box @openWindow="$emit('openWindow',$event)" /> <board-box
<warn-group @openWindow="$emit('openWindow',$event)" /> @openWindow="$emit('openWindow',$event)"
@changeBusinessType="businessType = $event"
/>
<warn-group
@openWindow="$emit('openWindow',$event)"
:businessType="businessType"
/>
</div> </div>
</template> </template>
...@@ -16,6 +22,7 @@ export default { ...@@ -16,6 +22,7 @@ export default {
name: '', name: '',
data () { data () {
return { return {
businessType: ''
} }
}, },
mounted () { mounted () {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!