Commit 9b259b81 authored by xiexingan's avatar xiexingan

提交

parent d6ef25a5
var CONFIG = {} var CONFIG = {}
// 页面 title 前缀 // 页面 title 前缀
CONFIG.TITLE = '轨道交通后台管理系统' CONFIG.TITLE = 'AI节能管理系统'
// 网络请求公用地址 // 网络请求公用地址
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<link href="icon.jpg" rel="icon" type="image/x-icon" /> <link href="icon.jpg" rel="icon" type="image/x-icon" />
<!-- <script src = "https://cdn.jsdelivr.net/npm/proxy-polyfill@0.3.0/proxy.min.js"></script> --> <!-- <script src = "https://cdn.jsdelivr.net/npm/proxy-polyfill@0.3.0/proxy.min.js"></script> -->
<title>城市轨道交通安防系统</title> <title>AI节能管理系统</title>
<script> <script>
//禁用所有控制台输出 //禁用所有控制台输出
// var console={}; // var console={};
......
<svg viewBox="0 0 60 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg viewBox="0 0 60 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<desc>城市轨道交通安防系统</desc> <desc>AI节能管理系统</desc>
<defs></defs> <defs></defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="logo-no-shadow" transform="translate(-3.000000, -3.000000)"> <g id="logo-no-shadow" transform="translate(-3.000000, -3.000000)">
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
ref="menu" ref="menu"
@select="handleMenuSelect"> @select="handleMenuSelect">
<template v-for="(menu, menuIndex) in header"> <template v-for="(menu, menuIndex) in header">
<d2-layout-header-aside-menu-item v-if="menu.list == undefined" :menu="menu" :key="menuIndex"/> <d2-layout-header-aside-menu-item v-if="menu.list.length==0" :menu="menu" :key="menuIndex"/>
<d2-layout-header-aside-menu-sub v-else :menu="menu" :key="menuIndex"/> <d2-layout-header-aside-menu-sub v-else :menu="menu" :key="menuIndex"/>
</template> </template>
</el-menu> </el-menu>
......
...@@ -11,7 +11,7 @@ let util = { ...@@ -11,7 +11,7 @@ let util = {
* @param {String} title 标题 * @param {String} title 标题
*/ */
util.title = function (titleText) { util.title = function (titleText) {
const processTitle = '城市轨道交通安防系统' const processTitle = 'AI节能管理系统'
window.document.title = `${processTitle}${titleText ? ` | ${titleText}` : ''}` window.document.title = `${processTitle}${titleText ? ` | ${titleText}` : ''}`
} }
...@@ -29,7 +29,6 @@ util.open = function (url) { ...@@ -29,7 +29,6 @@ util.open = function (url) {
document.body.removeChild(document.getElementById('d2admin-menu-link')) document.body.removeChild(document.getElementById('d2admin-menu-link'))
} }
/** /**
* @about Tree 数据格式转化 * @about Tree 数据格式转化
* @param rows:json数据对象 * @param rows:json数据对象
...@@ -43,62 +42,56 @@ util.open = function (url) { ...@@ -43,62 +42,56 @@ util.open = function (url) {
util.ConvertToTreeJson = function (rows, idFieldName, pidFieldName, fileds) { util.ConvertToTreeJson = function (rows, idFieldName, pidFieldName, fileds) {
function exists(rows, ParentId) { function exists(rows, ParentId) {
for (var i = 0; i < rows.length; i++) { for (var i = 0; i < rows.length; i++) {
if (rows[i][idFieldName] == ParentId) if (rows[i][idFieldName] == ParentId) { return true }
return true;
} }
return false; return false
} }
var nodes = []; var nodes = []
// get the top level nodes // get the top level nodes
for (var i = 0; i < rows.length; i++) { for (var i = 0; i < rows.length; i++) {
var row = rows[i]; var row = rows[i]
if (!exists(rows, row[pidFieldName])) { if (!exists(rows, row[pidFieldName])) {
var data = { var data = {
id: row[idFieldName] id: row[idFieldName]
} }
var arrFiled = fileds.split(","); var arrFiled = fileds.split(',')
for (var j = 0; j < arrFiled.length; j++) for (var j = 0; j < arrFiled.length; j++) {
{ if (arrFiled[j] != idFieldName) { data[arrFiled[j]] = row[arrFiled[j]] }
if (arrFiled[j] != idFieldName)
data[arrFiled[j]] = row[arrFiled[j]];
} }
nodes.push(data); nodes.push(data)
} }
} }
var toDo = []
var toDo = [];
for (var i = 0; i < nodes.length; i++) { for (var i = 0; i < nodes.length; i++) {
toDo.push(nodes[i]); toDo.push(nodes[i])
} }
while (toDo.length) { while (toDo.length) {
var node = toDo.shift(); // the parent node var node = toDo.shift() // the parent node
// get the children nodes // get the children nodes
for (var i = 0; i < rows.length; i++) { for (var i = 0; i < rows.length; i++) {
var row = rows[i]; var row = rows[i]
if (row[pidFieldName] == node.id) { if (row[pidFieldName] == node.id) {
var child = { var child = {
id: row[idFieldName] id: row[idFieldName]
}; }
var arrFiled = fileds.split(","); var arrFiled = fileds.split(',')
for (var j = 0; j < arrFiled.length; j++) { for (var j = 0; j < arrFiled.length; j++) {
if (arrFiled[j] != idFieldName) { if (arrFiled[j] != idFieldName) {
child[arrFiled[j]] = row[arrFiled[j]]; child[arrFiled[j]] = row[arrFiled[j]]
} }
} }
if (node.children) { if (node.children) {
node.children.push(child); node.children.push(child)
} else { } else {
node.children = [child]; node.children = [child]
} }
toDo.push(child); toDo.push(child)
} }
} }
} }
return nodes; return nodes
} }
export default util export default util
<template lang="pug"> <template lang="pug">
div.infopage() div.infopage()
font(class='index-title') 欢迎访问城市轨道交通安防系统 font(class='index-title') 欢迎访问山南站AI节能管理系统
</template> </template>
......
...@@ -286,8 +286,7 @@ export default { ...@@ -286,8 +286,7 @@ export default {
url: this.$http.adornUrl('/sys/menu/nav'), url: this.$http.adornUrl('/sys/menu/nav'),
method: "get" method: "get"
}).then((e)=>{ }).then((e)=>{
let url=e.menuList[0].list[0].path this.$router.replace({path:'/'})
this.$router.replace({path:url})
}) })
// this.$router.replace(path ? { path } : { name: "index" }); // this.$router.replace(path ? { path } : { name: "index" });
// 删除 cookie 中保存的重定向页面 // 删除 cookie 中保存的重定向页面
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment