Commit 57f324f6 by 姜雷

更新提交

parent 263fbaa7
......@@ -4,7 +4,7 @@ VUE_APP_CUSTOMER_MENU_CODE=0001
VUE_APP_BASE_MENU_CODE=0002
VUE_APP_SYSTEM_MENU_CODE=0003
VUE_APP_FEEDBACK_MENU_CODE=0018
VUE_APP_WARNNING_MENU_CODE=0098
VUE_APP_WARNNING_MENU_CODE=0100
VUE_APP_STATISTICS_MENU_CODE=0044
VUE_APP_DEVICE_MENU_CODE=0048
VUE_APP_CUSTOMER_OPERATE_CODE=0077
......
# 多彩校园综合项目
内含多个子项目`customerManage`,`baseManage`,`systemManage`,`operateManage`,`statisticsManage`,`deviceManage`,`smaproManage`.
# 运维替换文件
打包分别有 3 种模式
......
......@@ -3,7 +3,7 @@ if (process.env.NODE_ENV === 'production') {
removeConsolePlugin.push([
'transform-remove-console',
{
exclude: ['error', 'warn'],
exclude: ['error', 'warn', 'table'],
},
]);
}
......
......@@ -34,7 +34,8 @@
"nprogress": "^0.2.0",
"popmotion": "^8.1.22",
"qiniu-js": "^2.2.0",
"rym-element-ui": "^0.1.62",
"rym-element-ui": "^0.1.64",
"systemjs": "^4.0.0",
"vue-qr": "^1.2.8",
"vuedraggable": "^2.16.0",
"wangeditor": "^3.1.1"
......
......@@ -5,11 +5,11 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<link rel="icon" href="<%= BASE_URL %>ic_logo.ico" />
<script src="<%= BASE_URL %>system.js"></script>
<script src="https://unpkg.com/vue@2.6.10/dist/vue.js"></script>
<script src="https://unpkg.com/vuex@3.1.0/dist/vuex.js"></script>
<script src="https://unpkg.com/vue-router@3.0.1/dist/vue-router.js"></script>
<link rel="stylesheet" href="<%= VUE_APP_DEV_LIB_URL %>/lib/manageShell.css" />
<title>多彩综合管理系统</title>
</head>
......@@ -21,15 +21,6 @@
<div id="app"></div>
<script src="https://webapi.amap.com/maps?v=1.4.12&key=dd6103c90f2f17310a8711f2d330a0a6"></script>
<script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
<script src="<%= VUE_APP_DEV_LIB_URL %>/lib/manageShell.umd.min.js"></script>
<script src="<%= VUE_APP_SUBSYSTEM %>/customerManage/lib/customerManage.umd.min.js"></script>
<script src="<%= VUE_APP_SUBSYSTEM %>/baseManage/lib/baseManage.umd.min.js"></script>
<script src="<%= VUE_APP_SUBSYSTEM %>/systemManage/lib/systemManage.umd.min.js"></script>
<script src="<%= VUE_APP_SUBSYSTEM %>/operateManage/lib/operateManage.umd.min.js"></script>
<script src="<%= VUE_APP_SUBSYSTEM %>/statisticsManage/lib/statisticsManage.umd.min.js"></script>
<script src="<%= VUE_APP_SUBSYSTEM %>/deviceManage/lib/deviceManage.umd.min.js"></script>
<script src="<%= VUE_APP_SUBSYSTEM %>/smaproManage/lib/smaproManage.umd.min.js"></script>
<!-- built files will be auto injected -->
</body>
......
/*
* SystemJS 4.0.0
*/
(function () {
const hasSelf = typeof self !== 'undefined';
const envGlobal = hasSelf ? self : global;
let baseUrl;
if (typeof document !== 'undefined') {
const baseEl = document.querySelector('base[href]');
if (baseEl)
baseUrl = baseEl.href;
}
if (!baseUrl && typeof location !== 'undefined') {
baseUrl = location.href.split('#')[0].split('?')[0];
const lastSepIndex = baseUrl.lastIndexOf('/');
if (lastSepIndex !== -1)
baseUrl = baseUrl.slice(0, lastSepIndex + 1);
}
const backslashRegEx = /\\/g;
function resolveIfNotPlainOrUrl (relUrl, parentUrl) {
if (relUrl.indexOf('\\') !== -1)
relUrl = relUrl.replace(backslashRegEx, '/');
// protocol-relative
if (relUrl[0] === '/' && relUrl[1] === '/') {
return parentUrl.slice(0, parentUrl.indexOf(':') + 1) + relUrl;
}
// relative-url
else if (relUrl[0] === '.' && (relUrl[1] === '/' || relUrl[1] === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) ||
relUrl.length === 1 && (relUrl += '/')) ||
relUrl[0] === '/') {
const parentProtocol = parentUrl.slice(0, parentUrl.indexOf(':') + 1);
// Disabled, but these cases will give inconsistent results for deep backtracking
//if (parentUrl[parentProtocol.length] !== '/')
// throw Error('Cannot resolve');
// read pathname from parent URL
// pathname taken to be part after leading "/"
let pathname;
if (parentUrl[parentProtocol.length + 1] === '/') {
// resolving to a :// so we need to read out the auth and host
if (parentProtocol !== 'file:') {
pathname = parentUrl.slice(parentProtocol.length + 2);
pathname = pathname.slice(pathname.indexOf('/') + 1);
}
else {
pathname = parentUrl.slice(8);
}
}
else {
// resolving to :/ so pathname is the /... part
pathname = parentUrl.slice(parentProtocol.length + (parentUrl[parentProtocol.length] === '/'));
}
if (relUrl[0] === '/')
return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;
// join together and split for removal of .. and . segments
// looping the string instead of anything fancy for perf reasons
// '../../../../../z' resolved to 'x/y' is just 'z'
const segmented = pathname.slice(0, pathname.lastIndexOf('/') + 1) + relUrl;
const output = [];
let segmentIndex = -1;
for (let i = 0; i < segmented.length; i++) {
// busy reading a segment - only terminate on '/'
if (segmentIndex !== -1) {
if (segmented[i] === '/') {
output.push(segmented.slice(segmentIndex, i + 1));
segmentIndex = -1;
}
}
// new segment - check if it is relative
else if (segmented[i] === '.') {
// ../ segment
if (segmented[i + 1] === '.' && (segmented[i + 2] === '/' || i + 2 === segmented.length)) {
output.pop();
i += 2;
}
// ./ segment
else if (segmented[i + 1] === '/' || i + 1 === segmented.length) {
i += 1;
}
else {
// the start of a new segment as below
segmentIndex = i;
}
}
// it is the start of a new segment
else {
segmentIndex = i;
}
}
// finish reading out the last segment
if (segmentIndex !== -1)
output.push(segmented.slice(segmentIndex));
return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join('');
}
}
/*
* Import maps implementation
*
* To make lookups fast we pre-resolve the entire import map
* and then match based on backtracked hash lookups
*
*/
function resolveUrl (relUrl, parentUrl) {
return resolveIfNotPlainOrUrl(relUrl, parentUrl) ||
relUrl.indexOf(':') !== -1 && relUrl ||
resolveIfNotPlainOrUrl('./' + relUrl, parentUrl);
}
function resolvePackages(pkgs, baseUrl) {
var outPkgs = {};
for (var p in pkgs) {
var value = pkgs[p];
// TODO package fallback support
if (typeof value !== 'string')
continue;
outPkgs[resolveIfNotPlainOrUrl(p, baseUrl) || p] = resolveUrl(value, baseUrl);
}
return outPkgs;
}
function parseImportMap (json, baseUrl) {
const imports = resolvePackages(json.imports, baseUrl) || {};
const scopes = {};
if (json.scopes) {
for (let scopeName in json.scopes) {
const scope = json.scopes[scopeName];
let resolvedScopeName = resolveUrl(scopeName, baseUrl);
if (resolvedScopeName[resolvedScopeName.length - 1] !== '/')
resolvedScopeName += '/';
scopes[resolvedScopeName] = resolvePackages(scope, resolvedScopeName) || {};
}
}
return { imports: imports, scopes: scopes };
}
function getMatch (path, matchObj) {
if (matchObj[path])
return path;
let sepIndex = path.length;
do {
const segment = path.slice(0, sepIndex + 1);
if (segment in matchObj)
return segment;
} while ((sepIndex = path.lastIndexOf('/', sepIndex - 1)) !== -1)
}
function applyPackages (id, packages) {
const pkgName = getMatch(id, packages);
if (pkgName) {
const pkg = packages[pkgName];
if (pkg === null)
if (id.length > pkgName.length && pkg[pkg.length - 1] !== '/')
console.warn("Invalid package target " + pkg + " for '" + pkgName + "' should have a trailing '/'.");
return pkg + id.slice(pkgName.length);
}
}
function resolveImportMap (id, parentUrl, importMap) {
const urlResolved = resolveIfNotPlainOrUrl(id, parentUrl) || id.indexOf(':') !== -1 && id;
if (urlResolved)
id = urlResolved;
const scopeName = getMatch(parentUrl, importMap.scopes);
if (scopeName) {
const scopePackages = importMap.scopes[scopeName];
const packageResolution = applyPackages(id, scopePackages);
if (packageResolution)
return packageResolution;
}
return applyPackages(id, importMap.imports) || urlResolved || throwBare(id, parentUrl);
}
function throwBare (id, parentUrl) {
throw Error('Unable to resolve bare specifier "' + id + (parentUrl ? '" from ' + parentUrl : '"'));
}
/*
* SystemJS Core
*
* Provides
* - System.import
* - System.register support for
* live bindings, function hoisting through circular references,
* reexports, dynamic import, import.meta.url, top-level await
* - System.getRegister to get the registration
* - Symbol.toStringTag support in Module objects
* - Hookable System.createContext to customize import.meta
* - System.onload(id, err?) handler for tracing / hot-reloading
*
* Core comes with no System.prototype.resolve or
* System.prototype.instantiate implementations
*/
const hasSymbol = typeof Symbol !== 'undefined';
const toStringTag = hasSymbol && Symbol.toStringTag;
const REGISTRY = hasSymbol ? Symbol() : '@';
function SystemJS () {
this[REGISTRY] = {};
}
const systemJSPrototype = SystemJS.prototype;
systemJSPrototype.import = function (id, parentUrl) {
const loader = this;
return Promise.resolve(loader.resolve(id, parentUrl))
.then(function (id) {
const load = getOrCreateLoad(loader, id);
return load.C || topLevelLoad(loader, load);
});
};
// Hookable createContext function -> allowing eg custom import meta
systemJSPrototype.createContext = function (parentId) {
return {
url: parentId
};
};
// onLoad(id, err) provided for tracing / hot-reloading
systemJSPrototype.onload = function () {};
let lastRegister;
systemJSPrototype.register = function (deps, declare) {
lastRegister = [deps, declare];
};
/*
* getRegister provides the last anonymous System.register call
*/
systemJSPrototype.getRegister = function () {
const _lastRegister = lastRegister;
lastRegister = undefined;
return _lastRegister;
};
function getOrCreateLoad (loader, id, firstParentUrl) {
let load = loader[REGISTRY][id];
if (load)
return load;
const importerSetters = [];
const ns = Object.create(null);
if (toStringTag)
Object.defineProperty(ns, toStringTag, { value: 'Module' });
let instantiatePromise = Promise.resolve()
.then(function () {
return loader.instantiate(id, firstParentUrl);
})
.then(function (registration) {
if (!registration)
throw Error('Module ' + id + ' did not instantiate');
function _export (name, value) {
// note if we have hoisted exports (including reexports)
load.h = true;
let changed = false;
if (typeof name !== 'object') {
if (!(name in ns) || ns[name] !== value) {
ns[name] = value;
changed = true;
}
}
else {
for (let p in name) {
let value = name[p];
if (!(p in ns) || ns[p] !== value) {
ns[p] = value;
changed = true;
}
}
}
if (changed)
for (let i = 0; i < importerSetters.length; i++)
importerSetters[i](ns);
return value;
}
const declared = registration[1](_export, registration[1].length === 2 ? {
import: function (importId) {
return loader.import(importId, id);
},
meta: loader.createContext(id)
} : undefined);
load.e = declared.execute || function () {};
return [registration[0], declared.setters || []];
});
instantiatePromise = instantiatePromise.catch(function (err) {
loader.onload(load.id, err);
throw err;
});
const linkPromise = instantiatePromise
.then(function (instantiation) {
return Promise.all(instantiation[0].map(function (dep, i) {
const setter = instantiation[1][i];
return Promise.resolve(loader.resolve(dep, id))
.then(function (depId) {
const depLoad = getOrCreateLoad(loader, depId, id);
// depLoad.I may be undefined for already-evaluated
return Promise.resolve(depLoad.I)
.then(function () {
if (setter) {
depLoad.i.push(setter);
// only run early setters when there are hoisted exports of that module
// the timing works here as pending hoisted export calls will trigger through importerSetters
if (depLoad.h || !depLoad.I)
setter(depLoad.n);
}
return depLoad;
});
})
}))
.then(function (depLoads) {
load.d = depLoads;
});
});
linkPromise.catch(function (err) {
load.e = null;
load.er = err;
});
// Captial letter = a promise function
return load = loader[REGISTRY][id] = {
id: id,
// importerSetters, the setters functions registered to this dependency
// we retain this to add more later
i: importerSetters,
// module namespace object
n: ns,
// instantiate
I: instantiatePromise,
// link
L: linkPromise,
// whether it has hoisted exports
h: false,
// On instantiate completion we have populated:
// dependency load records
d: undefined,
// execution function
// set to NULL immediately after execution (or on any failure) to indicate execution has happened
// in such a case, pC should be used, and pLo, pLi will be emptied
e: undefined,
// On execution we have populated:
// the execution error if any
er: undefined,
// in the case of TLA, the execution promise
E: undefined,
// On execution, pLi, pLo, e cleared
// Promise for top-level completion
C: undefined
};
}
function instantiateAll (loader, load, loaded) {
if (!loaded[load.id]) {
loaded[load.id] = true;
// load.L may be undefined for already-instantiated
return Promise.resolve(load.L)
.then(function () {
return Promise.all(load.d.map(function (dep) {
return instantiateAll(loader, dep, loaded);
}));
})
}
}
function topLevelLoad (loader, load) {
return load.C = instantiateAll(loader, load, {})
.then(function () {
return postOrderExec(loader, load, {});
})
.then(function () {
return load.n;
});
}
// the closest we can get to call(undefined)
const nullContext = Object.freeze(Object.create(null));
// returns a promise if and only if a top-level await subgraph
// throws on sync errors
function postOrderExec (loader, load, seen) {
if (seen[load.id])
return;
seen[load.id] = true;
if (!load.e) {
if (load.er)
throw load.er;
if (load.E)
return load.E;
return;
}
// deps execute first, unless circular
let depLoadPromises;
load.d.forEach(function (depLoad) {
{
try {
const depLoadPromise = postOrderExec(loader, depLoad, seen);
if (depLoadPromise)
(depLoadPromises = depLoadPromises || []).push(depLoadPromise);
}
catch (err) {
loader.onload(load.id, err);
throw err;
}
}
});
if (depLoadPromises) {
return Promise.all(depLoadPromises)
.then(doExec)
.catch(function (err) {
loader.onload(load.id, err);
throw err;
});
}
return doExec();
function doExec () {
try {
let execPromise = load.e.call(nullContext);
if (execPromise) {
execPromise = execPromise.then(function () {
load.C = load.n;
load.E = null; // indicates completion
loader.onload(load.id, null);
}, function (err) {
loader.onload(load.id, err);
throw err;
});
return load.E = load.E || execPromise;
}
// (should be a promise, but a minify optimization to leave out Promise.resolve)
load.C = load.n;
loader.onload(load.id, null);
}
catch (err) {
loader.onload(load.id, err);
load.er = err;
throw err;
}
finally {
load.L = load.I = undefined;
load.e = null;
}
}
}
envGlobal.System = new SystemJS();
/*
* Supports loading System.register via script tag injection
*/
let err;
if (typeof window !== 'undefined')
window.addEventListener('error', function (e) {
err = e.error;
});
const systemRegister = systemJSPrototype.register;
systemJSPrototype.register = function (deps, declare) {
err = undefined;
systemRegister.call(this, deps, declare);
};
systemJSPrototype.instantiate = function (url, firstParentUrl) {
const loader = this;
if (url.endsWith('.json')) {
return fetch(url).then(function (resp) {
return resp.text();
}).then(function (source) {
return [[], function(_export) {
return {execute: function() {_export('default', JSON.parse(source));}};
}];
});
} else {
return new Promise(function (resolve, reject) {
const script = document.createElement('script');
script.charset = 'utf-8';
script.async = true;
script.crossOrigin = 'anonymous';
script.addEventListener('error', function () {
reject(Error('Error loading ' + url + (firstParentUrl ? ' from ' + firstParentUrl : '')));
});
script.addEventListener('load', function () {
document.head.removeChild(script);
// Note URL normalization issues are going to be a careful concern here
if (err) {
reject(err);
return err = undefined;
}
else {
resolve(loader.getRegister());
}
});
script.src = url;
document.head.appendChild(script);
});
}
};
/*
* Supports loading System.register in workers
*/
if (hasSelf && typeof importScripts === 'function')
systemJSPrototype.instantiate = function (url) {
const loader = this;
return new Promise(function (resolve, reject) {
try {
importScripts(url);
}
catch (e) {
reject(e);
}
resolve(loader.getRegister());
});
};
/*
* SystemJS global script loading support
* Extra for the s.js build only
* (Included by default in system.js build)
*/
(function (global) {
const systemJSPrototype = System.constructor.prototype;
// safari unpredictably lists some new globals first or second in object order
let firstGlobalProp, secondGlobalProp, lastGlobalProp;
function getGlobalProp () {
let cnt = 0;
let lastProp;
for (let p in global) {
if (!global.hasOwnProperty(p))
continue;
if (cnt === 0 && p !== firstGlobalProp || cnt === 1 && p !== secondGlobalProp)
return p;
cnt++;
lastProp = p;
}
if (lastProp !== lastGlobalProp)
return lastProp;
}
function noteGlobalProps () {
// alternatively Object.keys(global).pop()
// but this may be faster (pending benchmarks)
firstGlobalProp = secondGlobalProp = undefined;
for (let p in global) {
if (!global.hasOwnProperty(p))
continue;
if (!firstGlobalProp)
firstGlobalProp = p;
else if (!secondGlobalProp)
secondGlobalProp = p;
lastGlobalProp = p;
}
return lastGlobalProp;
}
const impt = systemJSPrototype.import;
systemJSPrototype.import = function (id, parentUrl) {
noteGlobalProps();
return impt.call(this, id, parentUrl);
};
const emptyInstantiation = [[], function () { return {} }];
const getRegister = systemJSPrototype.getRegister;
systemJSPrototype.getRegister = function () {
const lastRegister = getRegister.call(this);
if (lastRegister)
return lastRegister;
// no registration -> attempt a global detection as difference from snapshot
// when multiple globals, we take the global value to be the last defined new global object property
// for performance, this will not support multi-version / global collisions as previous SystemJS versions did
// note in Edge, deleting and re-adding a global does not change its ordering
const globalProp = getGlobalProp();
if (!globalProp)
return emptyInstantiation;
let globalExport;
try {
globalExport = global[globalProp];
}
catch (e) {
return emptyInstantiation;
}
return [[], function (_export) {
return {
execute: function () {
_export({ default: globalExport, __useDefault: true });
}
};
}];
};
})(typeof self !== 'undefined' ? self : global);
/*
* Loads WASM based on file extension detection
* Assumes successive instantiate will handle other files
*/
const instantiate = systemJSPrototype.instantiate;
systemJSPrototype.instantiate = function (url, parent) {
if (url.slice(-5) !== '.wasm')
return instantiate.call(this, url, parent);
return fetch(url)
.then(function (res) {
if (!res.ok)
throw Error(res.status + ' ' + res.statusText + ' ' + res.url + (parent ? ' loading from ' + parent : ''));
if (WebAssembly.compileStreaming)
return WebAssembly.compileStreaming(res);
return res.arrayBuffer()
.then(function (buf) {
return WebAssembly.compile(buf);
});
})
.then(function (module) {
const deps = [];
const setters = [];
const importObj = {};
// we can only set imports if supported (eg early Safari doesnt support)
if (WebAssembly.Module.imports)
WebAssembly.Module.imports(module).forEach(function (impt) {
const key = impt.module;
setters.push(function (m) {
importObj[key] = m;
});
if (deps.indexOf(key) === -1)
deps.push(key);
});
return [deps, function (_export) {
return {
setters: setters,
execute: function () {
return WebAssembly.instantiate(module, importObj)
.then(function (instance) {
_export(instance.exports);
});
}
};
}];
});
};
/*
* Import map support for SystemJS
*
* <script type="systemjs-importmap">{}</script>
* OR
* <script type="systemjs-importmap" src=package.json></script>
*
* Only those import maps available at the time of SystemJS initialization will be loaded
* and they will be loaded in DOM order.
*
* There is no support for dynamic import maps injection currently.
*/
const baseMap = Object.create(null);
baseMap.imports = Object.create(null);
baseMap.scopes = Object.create(null);
let importMapPromise = Promise.resolve(baseMap);
let acquiringImportMaps = typeof document !== 'undefined';
if (acquiringImportMaps) {
Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"][src]'), function (script) {
script._j = fetch(script.src).then(function (resp) {
return resp.json();
});
});
}
function mergeImportMap(originalMap, newMap) {
for (let i in newMap.imports) {
originalMap.imports[i] = newMap.imports[i];
}
for (let i in newMap.scopes) {
originalMap.scopes[i] = newMap.scopes[i];
}
return originalMap;
}
systemJSPrototype.resolve = function (id, parentUrl) {
parentUrl = parentUrl || baseUrl;
if (acquiringImportMaps) {
acquiringImportMaps = false;
Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"]'), function (script) {
importMapPromise = importMapPromise.then(function (map) {
return (script._j || script.src && fetch(script.src).then(function (resp) {return resp.json()}) || Promise.resolve(JSON.parse(script.innerHTML)))
.then(function (json) {
return mergeImportMap(map, parseImportMap(json, script.src || baseUrl));
});
});
});
}
return importMapPromise
.then(function (importMap) {
return resolveImportMap(id, parentUrl, importMap);
});
};
const toStringTag$1 = typeof Symbol !== 'undefined' && Symbol.toStringTag;
systemJSPrototype.get = function (id) {
const load = this[REGISTRY][id];
if (load && load.e === null && !load.E) {
if (load.er)
return null;
return load.n;
}
};
systemJSPrototype.set = function (id, module) {
let ns;
if (toStringTag$1 && module[toStringTag$1] === 'Module') {
ns = module;
}
else {
ns = Object.assign(Object.create(null), module);
if (toStringTag$1)
Object.defineProperty(ns, toStringTag$1, { value: 'Module' });
}
const done = Promise.resolve(ns);
this.delete(id);
this[REGISTRY][id] = {
id: id,
i: [],
n: ns,
I: done,
L: done,
h: false,
d: [],
e: null,
er: undefined,
E: undefined,
C: done
};
return ns;
};
systemJSPrototype.has = function (id) {
const load = this[REGISTRY][id];
return load && load.e === null && !load.E;
};
// Delete function provided for hot-reloading use cases
systemJSPrototype.delete = function (id) {
const load = this.get(id);
if (load === undefined)
return false;
// remove from importerSetters
// (release for gc)
if (load && load.d)
load.d.forEach(function (depLoad) {
const importerIndex = depLoad.i.indexOf(load);
if (importerIndex !== -1)
depLoad.i.splice(importerIndex, 1);
});
return delete this[REGISTRY][id];
};
const iterator = typeof Symbol !== 'undefined' && Symbol.iterator;
systemJSPrototype.entries = function () {
const loader = this, keys = Object.keys(loader[REGISTRY]);
let index = 0, ns, key;
const result = {
next: function () {
while (
(key = keys[index++]) !== undefined &&
(ns = loader.get(key)) === undefined
);
return {
done: key === undefined,
value: key !== undefined && [key, ns]
};
}
};
result[iterator] = function() { return this };
return result;
};
}());
......@@ -40,5 +40,6 @@ export const getFeedbackList = req =>
export const getWarnningCount = req =>
fetch({
url: devicePath + '/device/warning/count',
noErrorAlert: true,
...req,
});
......@@ -33,7 +33,7 @@ export const validateCode = res => {
};
export const errorHandle = error => {
console.error('err' + error); // for debug
console.table(['fetchError: ', error]); // for debug
store.dispatch('fetchDone');
if (error.message && /timeout/.test(error.message)) {
Message({
......@@ -45,7 +45,7 @@ export const errorHandle = error => {
}
if (isCancel(error)) {
console.log('取消请求');
} else {
} else if (!error.config.noErrorAlert) {
Message({
message: error.message,
type: 'error',
......
......@@ -101,6 +101,9 @@ $--color-danger: #ff3333;
line-height: 1;
font-size: 14px;
}
.el-cascader__label {
line-height: 40px;
}
.el-button {
font-size: 14px;
padding: 12px 20px;
......
......@@ -8,6 +8,7 @@
:showMoney="showMoney"
:showCellphone="showCellphone"
:visible="visible"
:isRefresh="isRefresh"
ref="UserInfo"
/>
<div class="right-part">
......@@ -50,6 +51,10 @@ export default {
type: Boolean,
default: false,
},
isRefresh:{
type: Boolean,
default: false,
},
},
methods: {
refreshBeanData() {
......
......@@ -69,6 +69,9 @@ export default {
this.debouncedQueryChange = debounce(this.debounce, value => {
this.handleQueryChange(value);
});
if (this.value && this.value.find(item => item === -1)) {
this.selectedAll = true;
}
},
computed: {
filterList() {
......
......@@ -26,7 +26,7 @@ export default {
value: Number,
disabled: Boolean,
clearable: {
type:Boolean,
type: Boolean,
default: true,
},
},
......@@ -35,8 +35,10 @@ export default {
changeHandle(val) {
if (val) {
this.$emit('input', val);
this.$emit('change', val);
} else {
this.$emit('input', null);
this.$emit('change', null);
}
},
},
......
......@@ -40,8 +40,10 @@ export default {
changeHandle(val) {
if (val || val === 0) {
this.$emit('input', val);
this.$emit('change', val);
} else {
this.$emit('input', null);
this.$emit('change', null);
}
},
disabledValue(val) {
......
......@@ -54,6 +54,12 @@ export default {
});
}
},
methods: {
changeHandle(val) {
this.$emit('input', val);
this.$emit('change', val);
},
},
};
</script>
......@@ -26,9 +26,6 @@ export default {
},
methods: {
...mapActions(actionsList),
changeHandle(val) {
this.$emit('input', val);
},
getOptionsList(label) {
let optionValue = this.getOptionsValue(label);
if (optionValue) {
......
......@@ -33,6 +33,7 @@ export default {
methods: {
changeHandle(val) {
this.$emit('input', val);
this.$emit('change', val);
},
},
};
......
......@@ -31,7 +31,7 @@ export default {
},
disabled: Boolean,
clearable: {
type:Boolean,
type: Boolean,
default: true,
},
},
......@@ -46,8 +46,10 @@ export default {
changeHandle(val) {
if (!val) {
this.$emit('input', null);
this.$emit('change', null);
} else {
this.$emit('input', val);
this.$emit('change', val);
}
},
},
......
......@@ -40,8 +40,10 @@ export default {
changeHandle(val) {
if (val || val === 0) {
this.$emit('input', val);
this.$emit('change', val);
} else {
this.$emit('input', null);
this.$emit('change', null);
}
},
},
......
......@@ -54,7 +54,13 @@
</template>
<script>
import listMixin from '../../mixins/listPage';
export default {
mixins: [listMixin],
created() {
console.log('in cre');
},
data() {
return {
filters: {
......
......@@ -17,7 +17,7 @@
<div class="IconMenu-name">{{ menuName }}</div>
</div>
<div
:class="`SubmenuBox ${showSubMenus?'show':''}`"
:class="{SubmenuBox: true, show: showSubMenus, scroll: needScroll}"
:style="style"
v-if="menuList && menuList.length"
>
......@@ -78,6 +78,7 @@
<script>
import LikeIcon from './LikeIcon';
let timers = null;
export default {
name: 'MenuItem',
components: { LikeIcon },
......@@ -101,6 +102,7 @@ export default {
data() {
return {
showSubMenus: false,
needScroll: false,
style: '',
};
},
......@@ -123,6 +125,19 @@ export default {
methods: {
toggleSubmenus(visiable) {
this.showSubMenus = visiable;
if (visiable) {
// this.$nextTick(() => {
// });
timers = setTimeout(() => {
this.needScroll = visiable;
}, 280);
} else {
if (timers) {
clearTimeout(timers);
timers = null;
}
this.needScroll = visiable;
}
},
selectHandle() {
if (typeof this.selectRouteMenu === 'function') {
......@@ -173,9 +188,12 @@ export default {
transition: all 0.28s ease-in-out;
overflow: hidden;
&.show {
max-height: 1000px;
max-height: 600px;
height: auto;
}
&.scroll {
overflow-y: auto;
}
.Submenu-title {
width: 560px;
height: 30px;
......
......@@ -131,11 +131,12 @@
<el-form label-width="120px">
<el-form-item label="登录账户">{{userInfo.loginAccount}}</el-form-item>
<el-form-item label="姓名">
<el-input
<!-- <el-input
v-model="userForm.name"
maxlength="20"
placeholder="请输入姓名"
></el-input>
></el-input> -->
{{userInfo.name}}
</el-form-item>
<el-form-item label="运营商">{{userInfo.operateName}}</el-form-item>
<el-form-item label="手机号">{{userInfo.cellphone}}</el-form-item>
......
......@@ -5,7 +5,8 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<link rel="icon" href="<%= BASE_URL %>ic_logo.ico" />
<script src="<%= BASE_URL %>system.js"></script>
<script src="https://unpkg.com/vue@2.6.10/dist/vue.js"></script>
<script src="https://unpkg.com/vuex@3.1.0/dist/vuex.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-router@3.0.1/dist/vue-router.js"></script>
......@@ -20,14 +21,6 @@
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<script src="<%= VUE_APP_SUBSYSTEM %>/customerManage/lib/customerManage.umd.min.js"></script>
<script src="<%= VUE_APP_SUBSYSTEM %>/baseManage/lib/baseManage.umd.min.js"></script>
<script src="<%= VUE_APP_SUBSYSTEM %>/systemManage/lib/systemManage.umd.min.js"></script>
<script src="<%= VUE_APP_SUBSYSTEM %>/operateManage/lib/operateManage.umd.min.js"></script>
<script src="<%= VUE_APP_SUBSYSTEM %>/statisticsManage/lib/statisticsManage.umd.min.js"></script>
<script src="<%= VUE_APP_SUBSYSTEM %>/deviceManage/lib/deviceManage.umd.min.js"></script>
<script src="<%= VUE_APP_SUBSYSTEM %>/smaproManage/lib/smaproManage.umd.min.js"></script>
<script src="https://webapi.amap.com/maps?v=1.4.12&key=dd6103c90f2f17310a8711f2d330a0a6"></script>
<script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
<script src="https://unpkg.com/@antv/data-set"></script>
......
import System from '../lib/main';
import CreatSystem from '../lib/main';
import asyncRouterMap from '../router/asyncRoutes';
window.manageShell = { default: System };
window.manageShell = { default: CreatSystem };
window.allAasyncRouterMap = [...asyncRouterMap];
setTimeout(() => {
let allAasyncRouterMap = [...asyncRouterMap];
let routeNameList = [
let constantRouter = [
{
path: '/asd',
name: 'asd',
component: {
template: '<div>asdasdasd</div>',
},
},
];
const routeFilter = (routes, allRoute) => {
if (allRoute && allRoute.length) {
let addRoute = manageShell.default.utils.route.formatRouteLink(allRoute);
for (let index = 0; index < addRoute.length; index++) {
const element = addRoute[index];
if (element.children) {
routes = routes.concat(element.children);
} else if (
element.menuCode === process.env.VUE_APP_REGISTER_DASHBOARD_CODE
) {
routes.unshift(element);
}
}
}
return {
allRoute,
routes,
};
};
const script = document.createElement('script');
script.text = `
var routeNameList = [
'customerManage',
'baseManage',
'systemManage',
......@@ -14,48 +43,30 @@ setTimeout(() => {
'deviceManage',
'smaproManage',
];
routeNameList.map(name => {
try {
allAasyncRouterMap = allAasyncRouterMap.concat(window[name].default);
} catch (error) {
console.error(name + ': ', error);
Promise.all(routeNameList.map(name => {
var node = document.createElement("link");
node.rel = "stylesheet";
node.type = "text/css";
node.href = '${
process.env.VUE_APP_SUBSYSTEM
}/' + name + '/lib/' + name + '.css?t=${new Date().getTime()}';
document.getElementsByTagName("head")[0].appendChild(node);
return System.import('${
process.env.VUE_APP_SUBSYSTEM
}/' + name + '/lib/' + name + '.umd.min.js?t=${new Date().getTime()}')
}))
.then(res => {
for (let index = 0; index < res.length; index++) {
const element = res[index];
allAasyncRouterMap = allAasyncRouterMap.concat(element.default.default);
}
return name;
});
System.createSystem({
basePath: process.env.VUE_APP_BASE_URL,
routers: allAasyncRouterMap,
constantRouter: [
{
path: '/asd',
name: 'asd',
component: {
render(h) {
return <div>asdasdasd</div>;
},
},
},
],
whiteList: '/asd',
routeFilter: (routes, allRoute) => {
if (allRoute && allRoute.length) {
let addRoute = System.utils.route.formatRouteLink(allRoute);
for (let index = 0; index < addRoute.length; index++) {
const element = addRoute[index];
if (element.children) {
routes = routes.concat(element.children);
} else if (
element.menuCode === process.env.VUE_APP_REGISTER_DASHBOARD_CODE
) {
routes.unshift(element);
}
}
}
return {
allRoute,
routes,
};
},
});
}, 1000);
manageShell.default.createSystem({
basePath: '${process.env.VUE_APP_BASE_URL}',
routers: allAasyncRouterMap,
constantRouter: ${JSON.stringify(constantRouter)},
whiteList: '/asd',
routeFilter: ${routeFilter.toString()},
})
})
`;
document.body.appendChild(script);
import CreatSystem from './lib/main';
import asyncRouterMap from './router/asyncRoutes';
let allAasyncRouterMap = [...asyncRouterMap];
let routeNameList = [
'customerManage',
'baseManage',
'systemManage',
'operateManage',
'statisticsManage',
'deviceManage',
'smaproManage',
];
routeNameList.map(name => {
try {
allAasyncRouterMap = allAasyncRouterMap.concat(window[name].default);
} catch (error) {
console.error(name + ': ', error);
}
return name;
});
const System = manageShell.default;
window.manageShell = { default: CreatSystem };
window.allAasyncRouterMap = [...asyncRouterMap];
export default System.createSystem({
basePath: process.env.VUE_APP_BASE_URL,
routers: allAasyncRouterMap,
routeFilter: (routes, allRoute) => {
if (allRoute && allRoute.length) {
let addRoute = System.utils.route.formatRouteLink(allRoute);
for (let index = 0; index < addRoute.length; index++) {
const element = addRoute[index];
if (element.children) {
routes = routes.concat(element.children);
} else if (
element.menuCode === process.env.VUE_APP_REGISTER_DASHBOARD_CODE
) {
routes.unshift(element);
}
const routeFilter = (routes, allRoute) => {
if (allRoute && allRoute.length) {
let addRoute = System.utils.route.formatRouteLink(allRoute);
for (let index = 0; index < addRoute.length; index++) {
const element = addRoute[index];
if (element.children) {
routes = routes.concat(element.children);
} else if (
element.menuCode === process.env.VUE_APP_REGISTER_DASHBOARD_CODE
) {
routes.unshift(element);
}
}
return {
allRoute,
routes,
};
},
});
}
return {
allRoute,
routes,
};
};
const script = document.createElement('script');
script.text = `
var routeNameList = [
'customerManage',
'baseManage',
'systemManage',
'operateManage',
'statisticsManage',
'deviceManage',
'smaproManage',
];
Promise.all(
routeNameList.map(function(name) {
var node = document.createElement("link");
node.rel = "stylesheet";
node.type = "text/css";
node.href = '${process.env.VUE_APP_SUBSYSTEM}/' + name + '/lib/' + name + '.css?t=${new Date().getTime()}';
document.getElementsByTagName("head")[0].appendChild(node);
return System.import('${
process.env.VUE_APP_SUBSYSTEM
}/' + name + '/lib/' + name + '.umd.min.js?t=${new Date().getTime()}');
})
)
.then(function(res) {
for (let index = 0; index < res.length; index++) {
const element = res[index];
allAasyncRouterMap = allAasyncRouterMap.concat(element.default.default);
}
manageShell.default.createSystem({
basePath: '${process.env.VUE_APP_BASE_URL}',
routers: allAasyncRouterMap,
routeFilter: function(routes, allRoute) {
if (allRoute && allRoute.length) {
let addRoute = manageShell.default.utils.route.formatRouteLink(
allRoute
);
for (let index = 0; index < addRoute.length; index++) {
const element = addRoute[index];
if (element.children) {
routes = routes.concat(element.children);
} else if (
element.menuCode === ${
process.env.VUE_APP_REGISTER_DASHBOARD_CODE
}
) {
routes.unshift(element);
}
}
}
return {
allRoute,
routes,
};
},
});
});
`;
document.body.appendChild(script);
import { mapGetters } from 'vuex';
import { mapGetters, mapActions } from 'vuex';
/**
* 需要页面组件自己注入或重写参数
......@@ -24,17 +24,18 @@ export default {
},
//
computed: {
...mapGetters(['loading']),
...mapGetters(['loading', 'routeNames']),
},
created() {
// 当页面没有列表数据的时候调用
if (!this.listData || !this.listData.length) {
this.fetchList({
pageNum: 1,
});
}
// 当页面没有打开过的时候调用
if (this.routeNames.find(name => name === this.$route.name)) return;
this.updateRouteNames(this.$route.name);
this.fetchList({
pageNum: 1,
});
},
methods: {
...mapActions(['updateRouteNames']),
// 页面组件需自己实现获取列表数据的方法
fetchList() {},
// 点击搜索时处理函数
......
......@@ -11,6 +11,10 @@ export default {
type: Boolean,
default: false,
},
isRefresh:{
type: Boolean,
default: false,
},
},
data() {
return {
......@@ -26,6 +30,14 @@ export default {
this.getAllData();
}
},
isRefresh(newIsRefresh){
if(newIsRefresh && this.visible){
this.fetchUserBaseInfo({
customerId: this.customerId,
});
this.getAllData();
}
},
customerId(newId) {
if (newId && this.visible) {
this.fetchUserBaseInfo({
......
......@@ -5,6 +5,7 @@ const GET_WHITE_LIST = 'GET_WHITE_LIST';
const UPDATE_BACK_PAGE = 'UPDATE_BACK_PAGE';
const UPDATE_FEEDBACK_PAGE = 'UPDATE_FEEDBACK_PAGE';
const UPDATE_WARNNING_PAGE = 'UPDATE_WARNNING_PAGE';
const UPDATE_ROUTE_NAMES = 'UPDATE_ROUTE_NAMES';
let fetchCount = 0;
const state = () => ({
......@@ -13,6 +14,7 @@ const state = () => ({
dashboardBackPage: undefined,
feedbackPage: undefined,
warnningPage: undefined,
routeNames: [],
});
const getters = {
......@@ -21,6 +23,7 @@ const getters = {
dashboardBackPage: state => state.dashboardBackPage,
feedbackPage: state => state.feedbackPage,
warnningPage: state => state.warnningPage,
routeNames: state => state.routeNames,
};
const actions = {
......@@ -42,6 +45,9 @@ const actions = {
updateWarnningPage({ commit }, name) {
commit(UPDATE_WARNNING_PAGE, name);
},
updateRouteNames({ commit }, name) {
commit(UPDATE_ROUTE_NAMES, name);
},
};
const mutations = {
[FETCH_START](state, notLoading) {
......@@ -70,6 +76,33 @@ const mutations = {
[UPDATE_WARNNING_PAGE](state, name) {
state.warnningPage = name;
},
[UPDATE_ROUTE_NAMES](state, name) {
let idx = state.routeNames.indexOf(name);
if (idx > -1) {
state.routeNames = [
...state.routeNames.slice(0, idx),
...state.routeNames.slice(idx + 1),
];
} else {
state.routeNames.push(name);
}
},
DEL_VISITED_VIEWS: (state, view) => {
let name = view.name;
let idx = state.routeNames.indexOf(name);
if (idx > -1) {
state.routeNames = [
...state.routeNames.slice(0, idx),
...state.routeNames.slice(idx + 1),
];
}
},
DEL_OTHERS_VIEWS: (state, view) => {
state.routeNames = [view.name];
},
DEL_ALL_VIEWS: state => {
state.routeNames = [];
},
};
export default {
modules: {
......
export default (err, vm, info) => {
console.table([err, { info: info }]);
console.error(err);
console.table([{ name: 'vm', data: vm }, { name: 'info', data: info }]);
return false;
};
......@@ -106,7 +106,7 @@ export const getAuthRoute = (asyncRouterMap, addRoute, path = '/') => {
} else {
return {
path: path + route.menuLink,
component: null,
redirect: '/404',
name: route.id,
meta: {
title: route.menuName,
......
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