Commit 4e735006 by huyue

Merge branch 'SAAS+V4.49.0-0121' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.49.0-0121
2 parents 459e9db6 9e0fda3f
......@@ -82,6 +82,12 @@ export function levelConfigSaveOrUpdate(data) {
return request(data, RequestMethods.POST)
}
// 启用/停用等级配置
export function levelConfigSwitche(data) {
data.method = `${path}resident.level.config.switch`
return request(data, RequestMethods.POST)
}
// 成长等级记录导出
export function levelManageExport(data) {
data.method = `${path}resident.level.manage.export`
......
......@@ -18,7 +18,7 @@ import SearchBox from '../SearchBox'
import * as echarts from 'echarts'
import { getMerchantOutputDetail } from '@api/earlyWarningManager'
import dayjs from 'dayjs'
import { tooltipConfig } from '../chartConfig'
import { tooltipConfig, xAxisConfig, dataZoomSliderConfig } from '../chartConfig'
export default {
components: {
SearchBox
......@@ -73,6 +73,7 @@ export default {
// if (!e[queryKey]) e[queryKey] = Math.round(Math.random() * 10000)
data.push([dayjs(e.countDate).format("YYYY-MM-DD"), e[queryKey] || 0])
})
let _this = this
let option = {
tooltip: {
...tooltipConfig,
......@@ -101,19 +102,7 @@ export default {
right: '60',
bottom: '80'
},
xAxis: {
type: 'time',
boundaryGap: false,
splitLine: {
show: false
},
axisLabel: {
showMaxLabel: true,
formatter: function (value, index) {
return dayjs(value).format('MM/DD')
}
}
},
xAxis: xAxisConfig(_this),
yAxis: {
type: 'value',
boundaryGap: [0, '100%'],
......@@ -127,10 +116,7 @@ export default {
start: 0,
end: 100
},
{
start: 0,
end: 20
}
dataZoomSliderConfig(_this)
],
series: [
{
......
import dayjs from 'dayjs'
export const tooltipConfig = {
trigger: 'axis',
borderColor: '#fff',
backgroundColor: '#fff',
padding:8,
padding: 8,
textStyle: {
color: '#656565',
fontSize: 12
......@@ -22,4 +23,32 @@ export const tooltipConfig = {
// }
// return obj;
// }
}
export const xAxisConfig = (params) => {
return {
type: 'time',
boundaryGap: false,
splitLine: {
show: false
},
axisLabel: {
showMaxLabel: true,
formatter: function (value, index) {
let { allYear } = params.searchTime
return allYear ? dayjs(value).format('MM月') : dayjs(value).format('MM/DD')
}
}
}
}
export const dataZoomSliderConfig = (params) => {
return {
type: 'slider',
left: 100,
right: 100,
labelFormatter (value) {
let { allYear } = params.searchTime
return allYear ? dayjs(value).format('YYYY年MM月'): dayjs(value).format('YYYY-MM-DD')
}
}
}
\ No newline at end of file
......@@ -97,7 +97,7 @@ import { getPersonBaseInfo, getPersonOutputtrend, getPersonGoodsList, getPersonS
const colorList = ['#43cf7c', '#185EFE', '#FF8D1A', '#EB4E4E']
import onShowMixin from '../onShowMixin'
import dayjs from 'dayjs'
import { tooltipConfig } from '../../chartConfig'
import { tooltipConfig, xAxisConfig, dataZoomSliderConfig } from '../../chartConfig'
export default {
mixins: [onShowMixin],
name: '',
......@@ -240,7 +240,8 @@ export default {
drawChart (list) {
this.chart.clear()
let legendNames = [],
seriesData = []
seriesData = [],
_this = this
list.map((e, index) => {
let [item] = e.staffTrendDTOList,
name = item.staffId,
......@@ -303,23 +304,9 @@ export default {
{
type: 'inside'
},
{
type: 'slider'
}
dataZoomSliderConfig(_this)
],
xAxis: {
type: 'time',
boundaryGap: false,
splitLine: {
show: false
},
axisLabel: {
showMaxLabel: true,
formatter: function (value, index) {
return dayjs(value).format('MM/DD')
}
}
},
xAxis: xAxisConfig(_this),
yAxis: {
type: 'value',
axisLine: {
......@@ -328,7 +315,6 @@ export default {
},
series: seriesData
};
let _this = this
this.chart.on('legendselectchanged', function (params) {
let { name, selected } = params
_this.staffCardList.find(i => i.staffid == name).selected = selected[name]
......
......@@ -34,7 +34,7 @@
import * as echarts from 'echarts'
import { getProductOutputtrend, getProductStaffList } from '@api/earlyWarningManager'
import onShowMixin from '../onShowMixin'
import { tooltipConfig } from '../../chartConfig'
import { tooltipConfig, dataZoomSliderConfig } from '../../chartConfig'
export default {
mixins: [onShowMixin],
name: '',
......@@ -119,7 +119,10 @@ export default {
type: 'inside'
},
{
type: 'slider'
type: 'slider',
labelFormatter(){
return ''
}
}
],
xAxis: {
......
......@@ -25,7 +25,7 @@
</template>
<div class="percent">
环比<span>{{ boardData[i.percentKey] }}%</span>
<template v-if="boardData[i.percentKey] && boardData[i.percentKey] != '-'">
<template v-if="boardData[i.percentKey] != '-'">
<div :class="['icon',`${percentClass(boardData[i.percentKey])}`]"></div>
</template>
</div>
......
......@@ -12,7 +12,7 @@
<script type='text/ecmascript-6'>
import * as echarts from 'echarts'
import dayjs from 'dayjs'
import {tooltipConfig} from '../../chartConfig'
import { tooltipConfig, xAxisConfig } from '../../chartConfig'
export default {
name: '',
props: {
......@@ -24,7 +24,11 @@ export default {
type: Array,
default: () => []
},
show: Boolean
show: Boolean,
searchTime: {
type: Object,
default: () => { }
}
},
data () {
return {
......@@ -46,7 +50,8 @@ export default {
},
methods: {
drawChart (list) {
let data = []
let data = [],
_this = this
list.map(e => {
// if (!e.output) e.output = Math.round(Math.random() * 10000)
data.push([dayjs(e.countDate).format("YYYY-MM-DD"), e.output || 0])
......@@ -72,19 +77,7 @@ export default {
right: '50',
bottom: '80'
},
xAxis: {
type: 'time',
boundaryGap: false,
splitLine: {
show: false
},
axisLabel: {
showMaxLabel: true,
formatter: function (value) {
return dayjs(value).format('MM/DD')
}
}
},
xAxis: xAxisConfig(_this),
yAxis: {
type: 'value',
boundaryGap: [0, '100%'],
......
......@@ -25,6 +25,7 @@
:pageId="`store-${pageId}`"
:outputTrend="boardData.outputTrend"
:show="show"
:searchTime="searchTime"
/>
</div>
</div>
......
......@@ -11,7 +11,7 @@
<!-- toLocaleString() -->
</div>
<div :class="['percent',`${percentColor(data[item.percent])}`]">
环比<div class="percent-value">{{data[item.percent] ? formatted(data[item.percent]) : '-'}}</div>
环比<div class="percent-value">{{data[item.percent] != null ? formatted(data[item.percent]) : '-'}}</div>
<template v-if="data[item.percent] && data[item.percent] != '-'">
<div :class="['icon',`${percentClass(data[item.percent])}`]"></div>
</template>
......
......@@ -56,7 +56,7 @@
import { mapActions, mapState } from 'vuex'
import { Util, deepClone } from '@/common/util'
import editDialog from './components/editDialog'
import { levelConfigPage, levelConfigSaveOrUpdate } from '@api/inStorePoints'
import { levelConfigPage, levelConfigSwitche } from '@api/inStorePoints'
import { levelTypeOpt, openStateOpt } from '@/common/constants.js'
export default {
name: 'Manage',
......@@ -259,7 +259,7 @@ export default {
type: 'warning'
}).then(() => {
const selfStatus = !row.openState
levelConfigSaveOrUpdate({ id: row.id, openState: selfStatus }).then(res => {
levelConfigSwitche({ id: row.id, openState: selfStatus }).then(res => {
this.notice.okTips()
this.$refs.detailListTable.refreshTable()
})
......
......@@ -10,11 +10,13 @@
</d2-table-header>
<el-table :data="tableData"
row-key="id"
:expand-row-keys="expands"
default-expand-all
border
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column prop="categoryName"
label="类目名称"
align="center">
align="left">
</el-table-column>
<el-table-column prop="systemCategoryStr"
label="是否系统类目"
......@@ -110,7 +112,8 @@ export default {
},
categoryVisible: false,
categoryInfo: {},
tableData: []
tableData: [],
expands: []// 需要展开的行
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!