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