提交 d902df42 authored 作者: lidongxu's avatar lidongxu

Merge branch 'ap'

import request from '@/utils/request' import request from '@/utils/request'
// 查询,店内执行上报-看板 // 查询,店内执行上报-看板(大区战区)
export const getDisplayScheduleDashboardList = (params) => { export const getDisplayScheduleDashboardList = (params) => {
return request({ return request({
url: '/operation/sales/ap_report/query/dept_cm', url: '/operation/sales/ap_report/query/dept_cm',
params params
}) })
} }
// 查询,店内执行上报-看板(城市经理)
export const getDisplayScheduleDashboardListArea = (params) => {
return request({
url: '/operation/sales/ap_report/query/store_cm',
params
})
}
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- 操作类型 --> <!-- 操作类型 -->
<el-row> <el-row>
<el-form-item> <el-form-item>
<el-radio-group v-model="operation"> <el-radio-group v-model="operation" @change="handleChange">
<el-radio-button label="大区战区-分析" <el-radio-button label="大区战区-分析"
value="大区战区-分析" value="大区战区-分析"
v-hasPermi="['promotion:dashboard:list-show']" /> v-hasPermi="['promotion:dashboard:list-show']" />
...@@ -69,6 +69,8 @@ const props = defineProps({ ...@@ -69,6 +69,8 @@ const props = defineProps({
} }
}) })
const emit = defineEmits(['getTableList'])
/*************** 工具栏 ***************/ /*************** 工具栏 ***************/
const operation = ref(''); // 切换平铺/填报模式 const operation = ref(''); // 切换平铺/填报模式
const tableRef = ref(null) const tableRef = ref(null)
...@@ -113,6 +115,10 @@ watch(operation, (newVal) => { ...@@ -113,6 +115,10 @@ watch(operation, (newVal) => {
immediate: true immediate: true
}) })
// 切换操作类型时触发的函数
const handleChange = (newVal) => {
emit('getTableList', newVal)
}
</script> </script>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<script setup <script setup
lang="jsx"> lang="jsx">
import CustomTable from '../components/Table' import CustomTable from '../components/Table'
import { getDisplayScheduleDashboardList } from '@/api' import { getDisplayScheduleDashboardList, getDisplayScheduleDashboardListArea } from '@/api'
import { getDisplayConfig } from './data.jsx' import { getDisplayConfig } from './data.jsx'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
...@@ -41,15 +41,20 @@ ...@@ -41,15 +41,20 @@
const total = ref(0) const total = ref(0)
// 筛选列表数据 // 筛选列表数据
const getTableList = async () => { const getTableList = async (operation) => {
isLoading.value = true isLoading.value = true
const res = await getDisplayScheduleDashboardList({ const res = await (operation === '大区战区-分析' ? getDisplayScheduleDashboardList : getDisplayScheduleDashboardListArea)({
...queryParams, ...queryParams,
salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}') salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}')
}) })
if (operation === '大区战区-分析') {
// 合并战区大区结构为扁平化 // 合并战区大区结构为扁平化
const { zq, dq } = res.data const { zq, dq } = res.data
tableData.value = [...zq, ...dq] tableData.value = [...zq, ...dq]
} else {
// 合并城市经理结构为扁平化
tableData.value = res.data
}
isLoading.value = false isLoading.value = false
} }
getTableList() getTableList()
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<script setup <script setup
lang="jsx"> lang="jsx">
import CustomTable from '../components/Table' import CustomTable from '../components/Table'
import { getDisplayScheduleDashboardList } from '@/api' import { getDisplayScheduleDashboardList, getDisplayScheduleDashboardListArea } from '@/api'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
import { getSchedulePlanConfig } from './data.jsx' import { getSchedulePlanConfig } from './data.jsx'
...@@ -74,15 +74,20 @@ ...@@ -74,15 +74,20 @@
const total = ref(0) const total = ref(0)
// 筛选列表数据 // 筛选列表数据
const getTableList = async () => { const getTableList = async (operation) => {
isLoading.value = true isLoading.value = true
const res = await getDisplayScheduleDashboardList({ const res = await (operation === '大区战区-分析' ? getDisplayScheduleDashboardList : getDisplayScheduleDashboardListArea)({
...queryParams, ...queryParams,
salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}') salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}')
}) })
if (operation === '大区战区-分析') {
// 合并战区大区结构为扁平化 // 合并战区大区结构为扁平化
const { zq, dq } = res.data const { zq, dq } = res.data
tableData.value = [...zq, ...dq] tableData.value = [...zq, ...dq]
} else {
// 合并城市经理结构为扁平化
tableData.value = res.data
}
isLoading.value = false isLoading.value = false
} }
getTableList() getTableList()
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<script setup <script setup
lang="jsx"> lang="jsx">
import CustomTable from '../components/Table' import CustomTable from '../components/Table'
import { getDisplayScheduleDashboardList } from '@/api' import { getDisplayScheduleDashboardList, getDisplayScheduleDashboardListArea } from '@/api'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
import { getScheduleDisConfig } from './data' import { getScheduleDisConfig } from './data'
...@@ -70,15 +70,20 @@ ...@@ -70,15 +70,20 @@
const total = ref(0) const total = ref(0)
// 筛选列表数据 // 筛选列表数据
const getTableList = async () => { const getTableList = async (operation) => {
isLoading.value = true isLoading.value = true
const res = await getDisplayScheduleDashboardList({ const res = await (operation === '大区战区-分析' ? getDisplayScheduleDashboardList : getDisplayScheduleDashboardListArea)({
...queryParams, ...queryParams,
salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}') salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}')
}) })
if (operation === '大区战区-分析') {
// 合并战区大区结构为扁平化 // 合并战区大区结构为扁平化
const { zq, dq } = res.data const { zq, dq } = res.data
tableData.value = [...zq, ...dq] tableData.value = [...zq, ...dq]
} else {
// 合并城市经理结构为扁平化
tableData.value = res.data
}
isLoading.value = false isLoading.value = false
} }
getTableList() getTableList()
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<script setup <script setup
lang="jsx"> lang="jsx">
import CustomTable from '../components/Table' import CustomTable from '../components/Table'
import { getDisplayScheduleDashboardList } from '@/api' import { getDisplayScheduleDashboardList, getDisplayScheduleDashboardListArea } from '@/api'
import { getSixLittleDiamondsConfig } from './data.jsx' import { getSixLittleDiamondsConfig } from './data.jsx'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
...@@ -70,15 +70,20 @@ ...@@ -70,15 +70,20 @@
const total = ref(0) const total = ref(0)
// 筛选列表数据 // 筛选列表数据
const getTableList = async () => { const getTableList = async (operation) => {
isLoading.value = true isLoading.value = true
const res = await getDisplayScheduleDashboardList({ const res = await (operation === '大区战区-分析' ? getDisplayScheduleDashboardList : getDisplayScheduleDashboardListArea)({
...queryParams, ...queryParams,
salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}') salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}')
}) })
if (operation === '大区战区-分析') {
// 合并战区大区结构为扁平化 // 合并战区大区结构为扁平化
const { zq, dq } = res.data const { zq, dq } = res.data
tableData.value = [...zq, ...dq] tableData.value = [...zq, ...dq]
} else {
// 合并城市经理结构为扁平化
tableData.value = res.data
}
isLoading.value = false isLoading.value = false
} }
getTableList() getTableList()
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<script setup <script setup
lang="jsx"> lang="jsx">
import CustomTable from '../components/Table' import CustomTable from '../components/Table'
import { getDisplayScheduleDashboardList } from '@/api' import { getDisplayScheduleDashboardList, getDisplayScheduleDashboardListArea } from '@/api'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
import { getSnackCofing } from './data.jsx'; import { getSnackCofing } from './data.jsx';
...@@ -66,15 +66,20 @@ ...@@ -66,15 +66,20 @@
const total = ref(0) const total = ref(0)
// 筛选列表数据 // 筛选列表数据
const getTableList = async () => { const getTableList = async (operation) => {
isLoading.value = true isLoading.value = true
const res = await getDisplayScheduleDashboardList({ const res = await (operation === '大区战区-分析' ? getDisplayScheduleDashboardList : getDisplayScheduleDashboardListArea)({
...queryParams, ...queryParams,
salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}') salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}')
}) })
if (operation === '大区战区-分析') {
// 合并战区大区结构为扁平化 // 合并战区大区结构为扁平化
const { zq, dq } = res.data const { zq, dq } = res.data
tableData.value = [...zq, ...dq] tableData.value = [...zq, ...dq]
} else {
// 合并城市经理结构为扁平化
tableData.value = res.data
}
isLoading.value = false isLoading.value = false
} }
getTableList() getTableList()
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<script setup <script setup
lang="jsx"> lang="jsx">
import CustomTable from '../components/Table' import CustomTable from '../components/Table'
import { getDisplayScheduleDashboardList } from '@/api' import { getDisplayScheduleDashboardList, getDisplayScheduleDashboardListArea } from '@/api'
import { getThreeTwoSecondsConfig } from './data.jsx' import { getThreeTwoSecondsConfig } from './data.jsx'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
...@@ -72,15 +72,20 @@ ...@@ -72,15 +72,20 @@
const total = ref(0) const total = ref(0)
// 筛选列表数据 // 筛选列表数据
const getTableList = async () => { const getTableList = async (operation) => {
isLoading.value = true isLoading.value = true
const res = await getDisplayScheduleDashboardList({ const res = await (operation === '大区战区-分析' ? getDisplayScheduleDashboardList : getDisplayScheduleDashboardListArea)({
...queryParams, ...queryParams,
salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}') salesMonth: parseTime(queryParams.salesMonth, '{y}-{m}')
}) })
if (operation === '大区战区-分析') {
// 合并战区大区结构为扁平化 // 合并战区大区结构为扁平化
const { zq, dq } = res.data const { zq, dq } = res.data
tableData.value = [...zq, ...dq] tableData.value = [...zq, ...dq]
} else {
// 合并城市经理结构为扁平化
tableData.value = res.data
}
isLoading.value = false isLoading.value = false
} }
getTableList() getTableList()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论