Authored by wangtao

深色模式;以及展示优化

... ... @@ -29,6 +29,7 @@ export default {
computed: {},
created() {
this.queryDictName();
this.loadTheme();
},
methods: {
queryDictName() {
... ... @@ -37,6 +38,64 @@ export default {
this.isRouterAlive = true;
});
},
loadTheme(){
const getParams = () => {
let map = {};
let query = window.location.search.substring(1);
if (query == '') {
query = document.location.href
let args = query.split('?');
let arr = [];
if (args && args.length > 1) {
arr = args[1].split('&')
}
for (let i = 0; i < arr.length; i++) {
let pair = arr[i].split("=");
map[pair[0]] = pair[1];
}
return map;
}
let vars = query.split("&");
for (let i = 0; i < vars.length; i++) {
let pair = vars[i].split("=");
map[pair[0]] = pair[1];
}
return map;
}
const getVal = (key) => {
if(key){
let val = getParams()[key];
if(!val){
val = localStorage.getItem(key);
}
if(val){
localStorage.setItem(key,val);
}
return val;
}
return '';
}
getVal('AuthKey');
getVal('AuthVal');
let theme = getVal('theme');
if (!theme) {
theme = 'simplicity';
}
if (!theme) {
theme = 'simplicity';
}
var link = document.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("type", "text/css");
link.setAttribute("href", `/mj/public/css/sub-sys/aj-web-${theme}.css`);
document.body.insertBefore(link, document.body.firstChild);
console.log('getParams ==>',getParams());
},
reload() {
this.isRouterAlive = false;
this.$nextTick(function() {
... ...
... ... @@ -128,7 +128,7 @@ export default {
return this.url;
}
if (this.dictCode != null && this.dictCode.trim() != "") {
return `/meta/gaeaDict/select/${this.dictCode}`;
return `/gaeaDict/select/${this.dictCode}`;
}
return null;
}
... ...
... ... @@ -96,8 +96,8 @@
<el-form-item label="下探:">
<el-select multiple v-model="rowFormData['drill']" placeholder="请输入下探类型">
<el-option label="无" value=""> </el-option>
<el-option label="详情页" value="detail"> </el-option>
<el-option label="拓扑" value="topology"> </el-option>
<el-option label="详情页" value="resDetail"> </el-option>
<el-option label="资源拓扑" value="openResTopo"> </el-option>
<el-option label="报表" value="openJimu"> </el-option>
<el-option label="设计页面" value="openAJ"> </el-option>
</el-select>
... ...
... ... @@ -415,15 +415,17 @@ export default {
}
let param = {
type: drillType,
data: {
resId: row.resId,
kpiId: row.kpiId,
flag: row.flag,
reportCode: that.optionsSetUp.reportCode,
message: {
params:{
resId: row.resId,
kpiId: row.kpiId,
flag: row.flag,
reportCode: that.optionsSetUp.reportCode
},
title: ``
}
}
window.parent.postMessage(param, '*')
window.top.postMessage(param, '*')
},
getPercentageVal(scope) {
... ...