|
@@ -1,5 +1,22 @@
|
|
|
<template>
|
|
|
<div class="chartTheme-page">
|
|
|
+ <!-- 全局配置 -->
|
|
|
+ <div class="setting-box" v-if="permissionBtn.isShowBtn('chartThemePermission','chartTheme_chartsource')">
|
|
|
+ <div class="setting-item">
|
|
|
+ <span>
|
|
|
+ {{$t('SystemManage.ChartSet.label00')}}
|
|
|
+ <el-tooltip class="item" effect="dark" :content="$t('SystemManage.ChartSet.label00_hint')" placement="top">
|
|
|
+ <i class="el-icon-warning"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+ <el-switch
|
|
|
+ @change="saveSetting"
|
|
|
+ v-model="ChartSourceDisplay"
|
|
|
+ active-value="true"
|
|
|
+ inactive-value="false"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div class="header">
|
|
|
<div style="display: flex;gap:20px;">
|
|
|
<div class="select-item">
|
|
@@ -30,7 +47,9 @@
|
|
|
|
|
|
<el-button type="primary" v-permission="permissionBtn.chartThemePermission.chartTheme_edit" @click="setConfigTheme">{{$t('Dialog.confirm_save_btn')}}</el-button>
|
|
|
</div>
|
|
|
-
|
|
|
+ <div class="gap-box">
|
|
|
+ <span style="flex:1;background-color: #C8CDD9;"></span>
|
|
|
+ </div>
|
|
|
<!-- 主题列表 -->
|
|
|
<div class="main">
|
|
|
<ul class="list-wrap">
|
|
@@ -61,7 +80,6 @@
|
|
|
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
<!-- 弹窗 -->
|
|
|
<m-dialog
|
|
|
:title="`${addThemeForm.id?$t('SystemManage.ChartSet.edit_btn'):$t('SystemManage.ChartSet.edit_btn')}`"
|
|
@@ -94,6 +112,7 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import * as chartThemeInterface from '@/api/modules/chartThemeApi';
|
|
|
+import {etaBaseConfigInterence} from '@/api/modules/etaBaseConfigApi.js';
|
|
|
import mDialog from '@/components/mDialog.vue';
|
|
|
export default {
|
|
|
components: { mDialog },
|
|
@@ -110,10 +129,13 @@ export default {
|
|
|
isOpenThemeDia: false,
|
|
|
addThemeForm: {
|
|
|
themeName: '',
|
|
|
- }
|
|
|
+ },
|
|
|
+ ChartSourceDisplay:'true',
|
|
|
+ baseConfig:{}
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.getChartBaseSetting()
|
|
|
this.getChartType()
|
|
|
},
|
|
|
methods: {
|
|
@@ -197,6 +219,23 @@ export default {
|
|
|
this.isOpenThemeDia = false;
|
|
|
|
|
|
this.getThemeList()
|
|
|
+ },
|
|
|
+ async getChartBaseSetting(){
|
|
|
+ //目前是用基本配置的接口,后续有多个配置再改
|
|
|
+ const res = await etaBaseConfigInterence.getBaseConfig()
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ const {ChartSourceDisplay} = res.Data||{}
|
|
|
+ this.baseConfig = res.Data
|
|
|
+ this.ChartSourceDisplay = ChartSourceDisplay||'true'
|
|
|
+ },
|
|
|
+ async saveSetting(){
|
|
|
+ etaBaseConfigInterence.saveBaseConfig({
|
|
|
+ ...this.baseConfig,
|
|
|
+ ChartSourceDisplay:this.ChartSourceDisplay
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ this.$message.success(this.$t('MsgPrompt.saved_msg'))
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
};
|
|
@@ -210,22 +249,36 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
- .header,.main {
|
|
|
+ .header,.main,.setting-box {
|
|
|
padding: 20px 30px;
|
|
|
background: #fff;
|
|
|
position: relative;
|
|
|
border: 1px solid #ececec;
|
|
|
border-radius: 4px;
|
|
|
- box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
|
|
|
+ /* box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05); */
|
|
|
}
|
|
|
.header {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- margin-bottom: 30px;
|
|
|
+ /* margin-bottom: 30px; */
|
|
|
gap: 20px;
|
|
|
+ border-bottom: none;
|
|
|
+ border-bottom-left-radius: 0;
|
|
|
+ border-bottom-right-radius: 0;
|
|
|
+ }
|
|
|
+ .gap-box{
|
|
|
+ border-left: 1px solid #ececec;
|
|
|
+ border-right: 1px solid #ececec;
|
|
|
+ height:1px;
|
|
|
+ background-color: white;
|
|
|
+ display: flex;
|
|
|
+ padding:0 30px;
|
|
|
}
|
|
|
.main {
|
|
|
min-height: calc(100vh - 240px);
|
|
|
+ border-top: none;
|
|
|
+ border-top-right-radius: 0;
|
|
|
+ border-top-left-radius: 0;
|
|
|
}
|
|
|
.list-wrap {
|
|
|
display: flex;
|
|
@@ -274,6 +327,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .setting-box{
|
|
|
+ margin-bottom: 30px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|