提交 9675297c authored 作者: lidongxu's avatar lidongxu

fix(layout/appmain): 修复飞书客户端_首页Panel暗黑模式无效问题

同标题
上级 3853c14d
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
VITE_APP_TITLE = 王小卤-链路中心 VITE_APP_TITLE = 王小卤-链路中心
# 基地址 # 基地址
VITE_APP_BASE_API = '/dev-api' # VITE_APP_BASE_API = '/dev-api'
# VITE_APP_BASE_API = '/qllan' # VITE_APP_BASE_API = '/qllan'
# VITE_APP_BASE_API = '/bclan' # VITE_APP_BASE_API = '/bclan'
# VITE_APP_BASE_API = '/home' VITE_APP_BASE_API = '/home'
# 开发环境配置 # 开发环境配置
VITE_APP_ENV = 'development' VITE_APP_ENV = 'development'
......
...@@ -94,3 +94,7 @@ ...@@ -94,3 +94,7 @@
.el-dropdown .el-dropdown-link{ .el-dropdown .el-dropdown-link{
color: var(--el-color-primary) !important; color: var(--el-color-primary) !important;
} }
.el-select{
width: 215px;
}
\ No newline at end of file
...@@ -82,15 +82,20 @@ $--color-info: #909399; ...@@ -82,15 +82,20 @@ $--color-info: #909399;
// 高亮模式变量 // 高亮模式变量
html { html {
--el-gray-1: rgba(0, 0, 0, 0.45);
--el-gray-2: #666666;
/* 主页背景 */ /* 主页背景 */
.app-main { .app-main {
--el-bg-color: #f1f3f8; background-color: #f1f3f8 !important;
} }
} }
// 暗黑模式变量 // 暗黑模式变量
html.dark { html.dark {
--el-gray-1: white;
--el-gray-2: white;
/* 默认通用 */ /* 默认通用 */
--el-bg-color: #141414; --el-bg-color: #141414;
--el-bg-color-overlay: #1d1e1f; --el-bg-color-overlay: #1d1e1f;
...@@ -235,6 +240,6 @@ html.dark { ...@@ -235,6 +240,6 @@ html.dark {
/* 主页背景 */ /* 主页背景 */
.app-main { .app-main {
--el-bg-color: var(--el-bg-color); background-color: var(--el-bg-color) !important;
} }
} }
\ No newline at end of file
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
methods: { methods: {
handleClick(item) { handleClick(item) {
item.effective = !item.effective item.effective = !item.effective
this.$emit('click') this.$emit('clickItem')
} }
} }
} }
...@@ -134,8 +134,8 @@ export default { ...@@ -134,8 +134,8 @@ export default {
border: 3px solid var(--color); border: 3px solid var(--color);
border-radius: 50%; border-radius: 50%;
position: absolute; position: absolute;
top: 0; top: 0.5px;
left: 7.75px; left: 7.45px;
} }
} }
......
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
} }
::v-deep .el-drawer__body { ::v-deep(.el-drawer__body) {
padding: 10px; padding: 10px;
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
......
...@@ -40,7 +40,7 @@ function addIframe() { ...@@ -40,7 +40,7 @@ function addIframe() {
width: 100%; width: 100%;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
background: var(--el-bg-color); background-color: var(--el-bg-color);
} }
.fixed-header + .app-main { .fixed-header + .app-main {
......
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
<div class="chart_wrap"> <div class="chart_wrap">
<el-form :model="queryParams" <el-form :model="queryParams"
inline inline
size="small"> size="default">
<el-form-item label="直播间"> <el-form-item label="直播间">
<el-select v-model="queryParams.brandList" <el-select v-model="queryParams.brandList"
@change="queryChangeFn" @change="queryChangeFn"
multiple multiple
clearable clearable
collapse-tags> collapse-tags
collapse-tags-tooltip>
<el-option v-for="str in brandList" <el-option v-for="str in brandList"
:label="str" :label="str"
:value="str"> :value="str">
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
</el-form> </el-form>
<div class="chart_wrap"> <div class="chart_wrap">
<group-legend :legendData="chartData.legend" <group-legend :legendData="chartData.legend"
@click="legendChangeFn"></group-legend> @click-item="legendChangeFn"></group-legend>
<line-charts :chartData="chartData"></line-charts> <line-charts :chartData="chartData"></line-charts>
</div> </div>
<levitated-sphere> <levitated-sphere>
......
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
:label="item.name" :label="item.name"
:name="item.name" :name="item.name"
lazy> lazy>
<keep-alive>
<component :is="item.component"></component> <component :is="item.component"></component>
</keep-alive>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -17,7 +19,11 @@ import cmm from './cmm' ...@@ -17,7 +19,11 @@ import cmm from './cmm'
import sycmStore from './sycm_store' import sycmStore from './sycm_store'
import sycmPrd from './sycm_prd' import sycmPrd from './sycm_prd'
import { ref } from 'vue' import { ref } from 'vue'
const list = ref([{ name: '蝉妈妈', component: cmm }, { name: '生意参谋-竞店', component: sycmStore }, { name: '生意参谋-竞品', component: sycmPrd }]) const list = ref([
{ name: '蝉妈妈', component: cmm },
{ name: '生意参谋-竞店', component: sycmStore },
{ name: '生意参谋-竞品', component: sycmPrd }
])
const activeName = ref(list.value[0].name) const activeName = ref(list.value[0].name)
</script> </script>
......
...@@ -53,6 +53,7 @@ export default { ...@@ -53,6 +53,7 @@ export default {
this.initChart() this.initChart()
}) })
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
return return
......
...@@ -8,14 +8,15 @@ ...@@ -8,14 +8,15 @@
@change="queryChangeFn" @change="queryChangeFn"
multiple multiple
clearable clearable
collapse-tags> collapse-tags
collapse-tags-tooltip>
<el-option v-for="str in brandList" <el-option v-for="str in brandList"
:label="str" :label="str"
:value="str"> :value="str">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="数据查看"> <!-- <el-form-item label="数据查看">
<el-select v-model="queryParams.typeList" <el-select v-model="queryParams.typeList"
@change="queryChangeFn" @change="queryChangeFn"
multiple multiple
...@@ -37,25 +38,25 @@ ...@@ -37,25 +38,25 @@
end-placeholder="结束日期" end-placeholder="结束日期"
@change="queryChangeFn('date')"> @change="queryChangeFn('date')">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
<div class="chart_wrap"> <div class="chart_wrap">
<gradient-area :chartData="chartData"></gradient-area> <!-- <gradient-area :chartData="chartData"></gradient-area> -->
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import * as echarts from 'echarts' import * as echarts from 'echarts'
import { ref, reactive } from 'vue' import { ref, reactive, nextTick } from 'vue'
import GradientArea from './GradientArea.vue'; import GradientArea from './GradientArea.vue';
import { getSycmListAPI } from '@/api' import { getSycmListAPI } from '@/api'
import { generatorDayList, parseTime, getBrandColor } from '@/utils' import { generatorDayList, parseTime, getBrandColor } from '@/utils'
const queryParams = reactive({ // 查询表单 const queryParams = reactive({ // 查询表单
brandList: [], brandList: [],
date: [new Date().setDate(1), new Date().setDate((new Date().getDate() - 1))], date: [new Date().setDate(new Date().getDate() - 30), new Date().setDate(new Date().getDate() - 1)],
typeList: [] // typeList: []
}) })
const brandList = ref([]) // 直播间列表 const brandList = ref([]) // 直播间列表
const typeList = ref(['支付买家数', '交易增速', '独立访客范围', '流量增速']) const typeList = ref(['支付买家数', '交易增速', '独立访客范围', '流量增速'])
...@@ -194,18 +195,20 @@ const filterData = () => { ...@@ -194,18 +195,20 @@ const filterData = () => {
} }
// 默认打开页面请求一次所有数据,并保存在数据源 // 默认打开页面请求一次所有数据,并保存在数据源
(async function init() { (function init() {
// 初始化时间 nextTick(async () => {
allChartData.xAxis = generatorDayList(queryParams.date[0], queryParams.date[1]) // // 初始化时间
// 请求数据 // allChartData.xAxis = generatorDayList(queryParams.date[0], queryParams.date[1])
const data = await getList() const data = await getList()
// 初始化直播间列表 console.log(data)
// 直播间列表
brandList.value = data.map(list => list[0].platformStore) brandList.value = data.map(list => list[0].platformStore)
// 初始化筛选条件(默认请求第一个店铺的第一类型数据) // 初始化筛选条件(默认请求第一个店铺的第一类型数据)
queryParams.brandList = [data[0][0].platformStore] // queryParams.brandList = [data[0][0].platformStore]
queryParams.typeList = [typeList.value[0]] // queryParams.typeList = [typeList.value[0]]
// 筛选图表数据 // 筛选图表数据
filterData() // filterData()
})
})(); })();
// 查询条件改变 // 查询条件改变
......
...@@ -109,7 +109,7 @@ const handleSetLineChartData = () => {} ...@@ -109,7 +109,7 @@ const handleSetLineChartData = () => {}
font-size: 12px; font-size: 12px;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
color: var(--el-text-color-primary); color: var(--el-gray-2);
background: var(--el-bg-color-overlay); background: var(--el-bg-color-overlay);
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05); box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
border-color: rgba(0, 0, 0, .05); border-color: rgba(0, 0, 0, .05);
...@@ -173,7 +173,7 @@ const handleSetLineChartData = () => {} ...@@ -173,7 +173,7 @@ const handleSetLineChartData = () => {}
.card-panel-text { .card-panel-text {
line-height: 18px; line-height: 18px;
color: var(--el-text-color-primary); color: var(--el-gray-1);
font-size: 16px; font-size: 16px;
margin-bottom: 12px; margin-bottom: 12px;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论