Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
develop-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 67f65398
authored
Nov 13, 2020
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
权限
1 parent
b7b4c95c
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
551 additions
and
76 deletions
package-lock.json
package.json
src/api/commodity.js
src/api/sys.account.js
src/common/Blob.js
src/common/Export2Excel.js
src/libs/util.permision.js
src/main.js
src/router/routes.js
src/store/modules/d2admin/modules/account.js
src/views/goods/commodity.vue
src/views/goods/product.vue
src/views/system/login/index.vue
src/views/userManage/role/editDialog.vue
src/views/userManage/role/roleTree.vue
package-lock.json
View file @
67f6539
...
@@ -1869,6 +1869,15 @@
...
@@ -1869,6 +1869,15 @@
"integrity"
:
"sha512-4diPfzWbLEIElVG4AnqP+00SULlPzNuyJFNnmMrLgyaxG6tZXJ1sn7mjBu4fHrJE+Yp/jgylOweJn2xsLMFggQ=="
,
"integrity"
:
"sha512-4diPfzWbLEIElVG4AnqP+00SULlPzNuyJFNnmMrLgyaxG6tZXJ1sn7mjBu4fHrJE+Yp/jgylOweJn2xsLMFggQ=="
,
"dev"
:
true
"dev"
:
true
},
},
"adler-32"
:
{
"version"
:
"1.2.0"
,
"resolved"
:
"https://registry.npmjs.org/adler-32/-/adler-32-1.2.0.tgz"
,
"integrity"
:
"sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU="
,
"requires"
:
{
"exit-on-epipe"
:
"~1.0.1"
,
"printj"
:
"~1.1.0"
}
},
"ajv"
:
{
"ajv"
:
{
"version"
:
"6.10.2"
,
"version"
:
"6.10.2"
,
"resolved"
:
"https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz"
,
"resolved"
:
"https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz"
,
...
@@ -3159,6 +3168,16 @@
...
@@ -3159,6 +3168,16 @@
"integrity"
:
"sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
,
"integrity"
:
"sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
,
"dev"
:
true
"dev"
:
true
},
},
"cfb"
:
{
"version"
:
"1.2.0"
,
"resolved"
:
"https://registry.npmjs.org/cfb/-/cfb-1.2.0.tgz"
,
"integrity"
:
"sha512-sXMvHsKCICVR3Naq+J556K+ExBo9n50iKl6LGarlnvuA2035uMlGA/qVrc0wQtow5P1vJEw9UyrKLCbtIKz+TQ=="
,
"requires"
:
{
"adler-32"
:
"~1.2.0"
,
"crc-32"
:
"~1.2.0"
,
"printj"
:
"~1.1.2"
}
},
"chalk"
:
{
"chalk"
:
{
"version"
:
"2.4.2"
,
"version"
:
"2.4.2"
,
"resolved"
:
"https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz"
,
"resolved"
:
"https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz"
,
...
@@ -3516,6 +3535,22 @@
...
@@ -3516,6 +3535,22 @@
"integrity"
:
"sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
,
"integrity"
:
"sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
,
"dev"
:
true
"dev"
:
true
},
},
"codepage"
:
{
"version"
:
"1.14.0"
,
"resolved"
:
"https://registry.npmjs.org/codepage/-/codepage-1.14.0.tgz"
,
"integrity"
:
"sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k="
,
"requires"
:
{
"commander"
:
"~2.14.1"
,
"exit-on-epipe"
:
"~1.0.1"
},
"dependencies"
:
{
"commander"
:
{
"version"
:
"2.14.1"
,
"resolved"
:
"https://registry.npmjs.org/commander/-/commander-2.14.1.tgz"
,
"integrity"
:
"sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw=="
}
}
},
"collection-visit"
:
{
"collection-visit"
:
{
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz"
,
...
@@ -3962,6 +3997,15 @@
...
@@ -3962,6 +3997,15 @@
}
}
}
}
},
},
"crc-32"
:
{
"version"
:
"1.2.0"
,
"resolved"
:
"https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz"
,
"integrity"
:
"sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA=="
,
"requires"
:
{
"exit-on-epipe"
:
"~1.0.1"
,
"printj"
:
"~1.1.0"
}
},
"create-ecdh"
:
{
"create-ecdh"
:
{
"version"
:
"4.0.3"
,
"version"
:
"4.0.3"
,
"resolved"
:
"https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz"
,
...
@@ -5902,6 +5946,11 @@
...
@@ -5902,6 +5946,11 @@
"integrity"
:
"sha1-BjJjj42HfMghB9MKD/8aF8uhzQw="
,
"integrity"
:
"sha1-BjJjj42HfMghB9MKD/8aF8uhzQw="
,
"dev"
:
true
"dev"
:
true
},
},
"exit-on-epipe"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz"
,
"integrity"
:
"sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw=="
},
"expand-brackets"
:
{
"expand-brackets"
:
{
"version"
:
"2.1.4"
,
"version"
:
"2.1.4"
,
"resolved"
:
"https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz"
,
"resolved"
:
"https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz"
,
...
@@ -6297,6 +6346,11 @@
...
@@ -6297,6 +6346,11 @@
}
}
}
}
},
},
"file-saver"
:
{
"version"
:
"2.0.2"
,
"resolved"
:
"https://registry.npmjs.org/file-saver/-/file-saver-2.0.2.tgz"
,
"integrity"
:
"sha512-Wz3c3XQ5xroCxd1G8b7yL0Ehkf0TC9oYC6buPFkNnU9EnaPlifeAFCyCh+iewXTyFRcg0a6j3J7FmJsIhlhBdw=="
},
"filename-regex"
:
{
"filename-regex"
:
{
"version"
:
"2.0.1"
,
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz"
,
...
@@ -6498,6 +6552,11 @@
...
@@ -6498,6 +6552,11 @@
"integrity"
:
"sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
,
"integrity"
:
"sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
,
"dev"
:
true
"dev"
:
true
},
},
"frac"
:
{
"version"
:
"1.1.2"
,
"resolved"
:
"https://registry.npmjs.org/frac/-/frac-1.1.2.tgz"
,
"integrity"
:
"sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA=="
},
"fragment-cache"
:
{
"fragment-cache"
:
{
"version"
:
"0.2.1"
,
"version"
:
"0.2.1"
,
"resolved"
:
"https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz"
,
...
@@ -12051,6 +12110,11 @@
...
@@ -12051,6 +12110,11 @@
}
}
}
}
},
},
"printj"
:
{
"version"
:
"1.1.2"
,
"resolved"
:
"https://registry.npmjs.org/printj/-/printj-1.1.2.tgz"
,
"integrity"
:
"sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ=="
},
"private"
:
{
"private"
:
{
"version"
:
"0.1.8"
,
"version"
:
"0.1.8"
,
"resolved"
:
"https://registry.npmjs.org/private/-/private-0.1.8.tgz"
,
"resolved"
:
"https://registry.npmjs.org/private/-/private-0.1.8.tgz"
,
...
@@ -12274,6 +12338,12 @@
...
@@ -12274,6 +12338,12 @@
"unpipe"
:
"1.0.0"
"unpipe"
:
"1.0.0"
}
}
},
},
"raw-loader"
:
{
"version"
:
"0.5.1"
,
"resolved"
:
"https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz"
,
"integrity"
:
"sha1-DD0L6u2KAclm2Xh793goElKpeao="
,
"dev"
:
true
},
"read-pkg"
:
{
"read-pkg"
:
{
"version"
:
"1.1.0"
,
"version"
:
"1.1.0"
,
"resolved"
:
"https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz"
,
...
@@ -12880,6 +12950,15 @@
...
@@ -12880,6 +12950,15 @@
"resolved"
:
"https://registry.npmjs.org/screenfull/-/screenfull-4.2.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/screenfull/-/screenfull-4.2.1.tgz"
,
"integrity"
:
"sha512-PLSp6f5XdhvjCCCO8OjavRfzkSGL3Qmdm7P82bxyU8HDDDBhDV3UckRaYcRa/NDNTYt8YBpzjoLWHUAejmOjLg=="
"integrity"
:
"sha512-PLSp6f5XdhvjCCCO8OjavRfzkSGL3Qmdm7P82bxyU8HDDDBhDV3UckRaYcRa/NDNTYt8YBpzjoLWHUAejmOjLg=="
},
},
"script-loader"
:
{
"version"
:
"0.7.2"
,
"resolved"
:
"https://registry.npmjs.org/script-loader/-/script-loader-0.7.2.tgz"
,
"integrity"
:
"sha512-UMNLEvgOAQuzK8ji8qIscM3GIrRCWN6MmMXGD4SD5l6cSycgGsCo0tX5xRnfQcoghqct0tjHjcykgI1PyBE2aA=="
,
"dev"
:
true
,
"requires"
:
{
"raw-loader"
:
"~0.5.1"
}
},
"select-hose"
:
{
"select-hose"
:
{
"version"
:
"2.0.0"
,
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz"
,
...
@@ -13517,6 +13596,14 @@
...
@@ -13517,6 +13596,14 @@
"integrity"
:
"sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
,
"integrity"
:
"sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
,
"dev"
:
true
"dev"
:
true
},
},
"ssf"
:
{
"version"
:
"0.11.2"
,
"resolved"
:
"https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz"
,
"integrity"
:
"sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g=="
,
"requires"
:
{
"frac"
:
"~1.1.2"
}
},
"sshpk"
:
{
"sshpk"
:
{
"version"
:
"1.16.1"
,
"version"
:
"1.16.1"
,
"resolved"
:
"https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz"
,
...
@@ -15618,6 +15705,16 @@
...
@@ -15618,6 +15705,16 @@
"integrity"
:
"sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
,
"integrity"
:
"sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
,
"dev"
:
true
"dev"
:
true
},
},
"wmf"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz"
,
"integrity"
:
"sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw=="
},
"word"
:
{
"version"
:
"0.3.0"
,
"resolved"
:
"https://registry.npmjs.org/word/-/word-0.3.0.tgz"
,
"integrity"
:
"sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA=="
},
"wordwrap"
:
{
"wordwrap"
:
{
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz"
,
...
@@ -15716,6 +15813,29 @@
...
@@ -15716,6 +15813,29 @@
"async-limiter"
:
"~1.0.0"
"async-limiter"
:
"~1.0.0"
}
}
},
},
"xlsx"
:
{
"version"
:
"0.16.8"
,
"resolved"
:
"https://registry.npmjs.org/xlsx/-/xlsx-0.16.8.tgz"
,
"integrity"
:
"sha512-qWub4YCn0xLEGHI7WWhk6IJ73MDu7sPSJQImxN6/LiI8wsHi0hUhICEDbyqBT+jgFgORZxrii0HvhNSwBNAPoQ=="
,
"requires"
:
{
"adler-32"
:
"~1.2.0"
,
"cfb"
:
"^1.1.4"
,
"codepage"
:
"~1.14.0"
,
"commander"
:
"~2.17.1"
,
"crc-32"
:
"~1.2.0"
,
"exit-on-epipe"
:
"~1.0.1"
,
"ssf"
:
"~0.11.2"
,
"wmf"
:
"~1.0.1"
,
"word"
:
"~0.3.0"
},
"dependencies"
:
{
"commander"
:
{
"version"
:
"2.17.1"
,
"resolved"
:
"https://registry.npmjs.org/commander/-/commander-2.17.1.tgz"
,
"integrity"
:
"sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg=="
}
}
},
"xml-name-validator"
:
{
"xml-name-validator"
:
{
"version"
:
"3.0.0"
,
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz"
,
...
...
package.json
View file @
67f6539
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
"dayjs"
:
"^1.8.12"
,
"dayjs"
:
"^1.8.12"
,
"default-passive-events"
:
"^2.0.0"
,
"default-passive-events"
:
"^2.0.0"
,
"element-ui"
:
"^2.11.1"
,
"element-ui"
:
"^2.11.1"
,
"file-saver"
:
"^2.0.2"
,
"flex.css"
:
"^1.1.7"
,
"flex.css"
:
"^1.1.7"
,
"fuse.js"
:
"^3.4.4"
,
"fuse.js"
:
"^3.4.4"
,
"hotkeys-js"
:
"^3.6.2"
,
"hotkeys-js"
:
"^3.6.2"
,
...
@@ -33,7 +34,8 @@
...
@@ -33,7 +34,8 @@
"vue"
:
"^2.6.10"
,
"vue"
:
"^2.6.10"
,
"vue-i18n"
:
"^8.14.0"
,
"vue-i18n"
:
"^8.14.0"
,
"vue-router"
:
"^3.0.3"
,
"vue-router"
:
"^3.0.3"
,
"vuex"
:
"^3.0.1"
"vuex"
:
"^3.0.1"
,
"xlsx"
:
"^0.16.8"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"@kazupon/vue-i18n-loader"
:
"^0.4.1"
,
"@kazupon/vue-i18n-loader"
:
"^0.4.1"
,
...
@@ -50,6 +52,7 @@
...
@@ -50,6 +52,7 @@
"eslint-plugin-vue"
:
"^5.0.0"
,
"eslint-plugin-vue"
:
"^5.0.0"
,
"sass"
:
"^1.18.0"
,
"sass"
:
"^1.18.0"
,
"sass-loader"
:
"^7.1.0"
,
"sass-loader"
:
"^7.1.0"
,
"script-loader"
:
"^0.7.2"
,
"svg-sprite-loader"
:
"^4.1.3"
,
"svg-sprite-loader"
:
"^4.1.3"
,
"vue-template-compiler"
:
"^2.5.21"
,
"vue-template-compiler"
:
"^2.5.21"
,
"webpack-bundle-analyzer"
:
"^3.4.1"
,
"webpack-bundle-analyzer"
:
"^3.4.1"
,
...
...
src/api/commodity.js
View file @
67f6539
...
@@ -42,3 +42,9 @@ export function baseGoodsUpdate(data) {
...
@@ -42,3 +42,9 @@ export function baseGoodsUpdate(data) {
data
.
method
=
`
${
path
}
basegoods.update`
data
.
method
=
`
${
path
}
basegoods.update`
return
request
(
data
,
'post'
)
return
request
(
data
,
'post'
)
}
}
// 导出
export
function
exportBaseList
(
data
)
{
data
.
method
=
`
${
path
}
basegoods.export`
return
request
(
data
,
'post'
)
}
src/api/sys.account.js
View file @
67f6539
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: limin
* @Author: limin
* @Date: 2019-08-26 18:02:55
* @Date: 2019-08-26 18:02:55
* @Last Modified by: chenwq
* @Last Modified by: chenwq
* @Last Modified time: 2020-11-12
19:02:01
* @Last Modified time: 2020-11-12
20:49:55
*/
*/
import
request
from
'./request'
import
request
from
'./request'
...
@@ -42,6 +42,12 @@ export function AccountLogin(data) {
...
@@ -42,6 +42,12 @@ export function AccountLogin(data) {
// })
// })
}
}
// 权限
export
function
getAuths
(
data
)
{
data
.
method
=
`
${
USER_PATH
}
userauth.getUserAuth`
return
request
(
data
)
}
/**
/**
* 注册
* 注册
* @param {*} data 参数
* @param {*} data 参数
...
...
src/common/Blob.js
0 → 100644
View file @
67f6539
/* eslint-disable */
/* Blob.js
* A Blob implementation.
* 2014-05-27
*
* By Eli Grey, http://eligrey.com
* By Devin Samarin, https://github.com/eboyjr
* License: X11/MIT
* See LICENSE.md
*/
/*global self, unescape */
/*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true,
plusplus: true */
/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
(
function
(
view
)
{
"use strict"
;
view
.
URL
=
view
.
URL
||
view
.
webkitURL
;
if
(
view
.
Blob
&&
view
.
URL
)
{
try
{
new
Blob
;
return
;
}
catch
(
e
)
{}
}
// Internally we use a BlobBuilder implementation to base Blob off of
// in order to support older browsers that only have BlobBuilder
var
BlobBuilder
=
view
.
BlobBuilder
||
view
.
WebKitBlobBuilder
||
view
.
MozBlobBuilder
||
(
function
(
view
)
{
var
get_class
=
function
(
object
)
{
return
Object
.
prototype
.
toString
.
call
(
object
).
match
(
/^
\[
object
\s(
.*
)\]
$/
)[
1
];
}
,
FakeBlobBuilder
=
function
BlobBuilder
()
{
this
.
data
=
[];
}
,
FakeBlob
=
function
Blob
(
data
,
type
,
encoding
)
{
this
.
data
=
data
;
this
.
size
=
data
.
length
;
this
.
type
=
type
;
this
.
encoding
=
encoding
;
}
,
FBB_proto
=
FakeBlobBuilder
.
prototype
,
FB_proto
=
FakeBlob
.
prototype
,
FileReaderSync
=
view
.
FileReaderSync
,
FileException
=
function
(
type
)
{
this
.
code
=
this
[
this
.
name
=
type
];
}
,
file_ex_codes
=
(
"NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR "
+
"NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR"
).
split
(
" "
)
,
file_ex_code
=
file_ex_codes
.
length
,
real_URL
=
view
.
URL
||
view
.
webkitURL
||
view
,
real_create_object_URL
=
real_URL
.
createObjectURL
,
real_revoke_object_URL
=
real_URL
.
revokeObjectURL
,
URL
=
real_URL
,
btoa
=
view
.
btoa
,
atob
=
view
.
atob
,
ArrayBuffer
=
view
.
ArrayBuffer
,
Uint8Array
=
view
.
Uint8Array
;
FakeBlob
.
fake
=
FB_proto
.
fake
=
true
;
while
(
file_ex_code
--
)
{
FileException
.
prototype
[
file_ex_codes
[
file_ex_code
]]
=
file_ex_code
+
1
;
}
if
(
!
real_URL
.
createObjectURL
)
{
URL
=
view
.
URL
=
{};
}
URL
.
createObjectURL
=
function
(
blob
)
{
var
type
=
blob
.
type
,
data_URI_header
;
if
(
type
===
null
)
{
type
=
"application/octet-stream"
;
}
if
(
blob
instanceof
FakeBlob
)
{
data_URI_header
=
"data:"
+
type
;
if
(
blob
.
encoding
===
"base64"
)
{
return
data_URI_header
+
";base64,"
+
blob
.
data
;
}
else
if
(
blob
.
encoding
===
"URI"
)
{
return
data_URI_header
+
","
+
decodeURIComponent
(
blob
.
data
);
}
if
(
btoa
)
{
return
data_URI_header
+
";base64,"
+
btoa
(
blob
.
data
);
}
else
{
return
data_URI_header
+
","
+
encodeURIComponent
(
blob
.
data
);
}
}
else
if
(
real_create_object_URL
)
{
return
real_create_object_URL
.
call
(
real_URL
,
blob
);
}
};
URL
.
revokeObjectURL
=
function
(
object_URL
)
{
if
(
object_URL
.
substring
(
0
,
5
)
!==
"data:"
&&
real_revoke_object_URL
)
{
real_revoke_object_URL
.
call
(
real_URL
,
object_URL
);
}
};
FBB_proto
.
append
=
function
(
data
/*, endings*/
)
{
var
bb
=
this
.
data
;
// decode data to a binary string
if
(
Uint8Array
&&
(
data
instanceof
ArrayBuffer
||
data
instanceof
Uint8Array
))
{
var
str
=
""
,
buf
=
new
Uint8Array
(
data
)
,
i
=
0
,
buf_len
=
buf
.
length
;
for
(;
i
<
buf_len
;
i
++
)
{
str
+=
String
.
fromCharCode
(
buf
[
i
]);
}
bb
.
push
(
str
);
}
else
if
(
get_class
(
data
)
===
"Blob"
||
get_class
(
data
)
===
"File"
)
{
if
(
FileReaderSync
)
{
var
fr
=
new
FileReaderSync
;
bb
.
push
(
fr
.
readAsBinaryString
(
data
));
}
else
{
// async FileReader won't work as BlobBuilder is sync
throw
new
FileException
(
"NOT_READABLE_ERR"
);
}
}
else
if
(
data
instanceof
FakeBlob
)
{
if
(
data
.
encoding
===
"base64"
&&
atob
)
{
bb
.
push
(
atob
(
data
.
data
));
}
else
if
(
data
.
encoding
===
"URI"
)
{
bb
.
push
(
decodeURIComponent
(
data
.
data
));
}
else
if
(
data
.
encoding
===
"raw"
)
{
bb
.
push
(
data
.
data
);
}
}
else
{
if
(
typeof
data
!==
"string"
)
{
data
+=
""
;
// convert unsupported types to strings
}
// decode UTF-16 to binary string
bb
.
push
(
unescape
(
encodeURIComponent
(
data
)));
}
};
FBB_proto
.
getBlob
=
function
(
type
)
{
if
(
!
arguments
.
length
)
{
type
=
null
;
}
return
new
FakeBlob
(
this
.
data
.
join
(
""
),
type
,
"raw"
);
};
FBB_proto
.
toString
=
function
()
{
return
"[object BlobBuilder]"
;
};
FB_proto
.
slice
=
function
(
start
,
end
,
type
)
{
var
args
=
arguments
.
length
;
if
(
args
<
3
)
{
type
=
null
;
}
return
new
FakeBlob
(
this
.
data
.
slice
(
start
,
args
>
1
?
end
:
this
.
data
.
length
)
,
type
,
this
.
encoding
);
};
FB_proto
.
toString
=
function
()
{
return
"[object Blob]"
;
};
FB_proto
.
close
=
function
()
{
this
.
size
=
this
.
data
.
length
=
0
;
};
return
FakeBlobBuilder
;
}(
view
));
view
.
Blob
=
function
Blob
(
blobParts
,
options
)
{
var
type
=
options
?
(
options
.
type
||
""
)
:
""
;
var
builder
=
new
BlobBuilder
();
if
(
blobParts
)
{
for
(
var
i
=
0
,
len
=
blobParts
.
length
;
i
<
len
;
i
++
)
{
builder
.
append
(
blobParts
[
i
]);
}
}
return
builder
.
getBlob
(
type
);
};
}(
typeof
self
!==
"undefined"
&&
self
||
typeof
window
!==
"undefined"
&&
window
||
this
.
content
||
this
));
src/common/Export2Excel.js
0 → 100644
View file @
67f6539
/* eslint-disable */
require
(
'script-loader!file-saver'
);
require
(
'./Blob'
);
require
(
'script-loader!xlsx/dist/xlsx.core.min'
);
function
generateArray
(
table
)
{
var
out
=
[];
var
rows
=
table
.
querySelectorAll
(
'tr'
);
var
ranges
=
[];
for
(
var
R
=
0
;
R
<
rows
.
length
;
++
R
)
{
var
outRow
=
[];
var
row
=
rows
[
R
];
var
columns
=
row
.
querySelectorAll
(
'td'
);
for
(
var
C
=
0
;
C
<
columns
.
length
;
++
C
)
{
var
cell
=
columns
[
C
];
var
colspan
=
cell
.
getAttribute
(
'colspan'
);
var
rowspan
=
cell
.
getAttribute
(
'rowspan'
);
var
cellValue
=
cell
.
innerText
;
if
(
cellValue
!==
""
&&
cellValue
==
+
cellValue
)
cellValue
=
+
cellValue
;
//Skip ranges
ranges
.
forEach
(
function
(
range
)
{
if
(
R
>=
range
.
s
.
r
&&
R
<=
range
.
e
.
r
&&
outRow
.
length
>=
range
.
s
.
c
&&
outRow
.
length
<=
range
.
e
.
c
)
{
for
(
var
i
=
0
;
i
<=
range
.
e
.
c
-
range
.
s
.
c
;
++
i
)
outRow
.
push
(
null
);
}
});
//Handle Row Span
if
(
rowspan
||
colspan
)
{
rowspan
=
rowspan
||
1
;
colspan
=
colspan
||
1
;
ranges
.
push
({
s
:
{
r
:
R
,
c
:
outRow
.
length
},
e
:
{
r
:
R
+
rowspan
-
1
,
c
:
outRow
.
length
+
colspan
-
1
}});
}
;
//Handle Value
outRow
.
push
(
cellValue
!==
""
?
cellValue
:
null
);
//Handle Colspan
if
(
colspan
)
for
(
var
k
=
0
;
k
<
colspan
-
1
;
++
k
)
outRow
.
push
(
null
);
}
out
.
push
(
outRow
);
}
return
[
out
,
ranges
];
};
function
datenum
(
v
,
date1904
)
{
if
(
date1904
)
v
+=
1462
;
var
epoch
=
Date
.
parse
(
v
);
return
(
epoch
-
new
Date
(
Date
.
UTC
(
1899
,
11
,
30
)))
/
(
24
*
60
*
60
*
1000
);
}
function
sheet_from_array_of_arrays
(
data
,
opts
)
{
var
ws
=
{};
var
range
=
{
s
:
{
c
:
10000000
,
r
:
10000000
},
e
:
{
c
:
0
,
r
:
0
}};
for
(
var
R
=
0
;
R
!=
data
.
length
;
++
R
)
{
for
(
var
C
=
0
;
C
!=
data
[
R
].
length
;
++
C
)
{
if
(
range
.
s
.
r
>
R
)
range
.
s
.
r
=
R
;
if
(
range
.
s
.
c
>
C
)
range
.
s
.
c
=
C
;
if
(
range
.
e
.
r
<
R
)
range
.
e
.
r
=
R
;
if
(
range
.
e
.
c
<
C
)
range
.
e
.
c
=
C
;
var
cell
=
{
v
:
data
[
R
][
C
]};
if
(
cell
.
v
==
null
)
continue
;
var
cell_ref
=
XLSX
.
utils
.
encode_cell
({
c
:
C
,
r
:
R
});
if
(
typeof
cell
.
v
===
'number'
)
cell
.
t
=
'n'
;
else
if
(
typeof
cell
.
v
===
'boolean'
)
cell
.
t
=
'b'
;
else
if
(
cell
.
v
instanceof
Date
)
{
cell
.
t
=
'n'
;
cell
.
z
=
XLSX
.
SSF
.
_table
[
14
];
cell
.
v
=
datenum
(
cell
.
v
);
}
else
cell
.
t
=
's'
;
ws
[
cell_ref
]
=
cell
;
}
}
if
(
range
.
s
.
c
<
10000000
)
ws
[
'!ref'
]
=
XLSX
.
utils
.
encode_range
(
range
);
return
ws
;
}
function
Workbook
()
{
if
(
!
(
this
instanceof
Workbook
))
return
new
Workbook
();
this
.
SheetNames
=
[];
this
.
Sheets
=
{};
}
function
s2ab
(
s
)
{
var
buf
=
new
ArrayBuffer
(
s
.
length
);
var
view
=
new
Uint8Array
(
buf
);
for
(
var
i
=
0
;
i
!=
s
.
length
;
++
i
)
view
[
i
]
=
s
.
charCodeAt
(
i
)
&
0xFF
;
return
buf
;
}
export
function
export_table_to_excel
(
id
)
{
var
theTable
=
document
.
getElementById
(
id
);
console
.
log
(
'a'
)
var
oo
=
generateArray
(
theTable
);
var
ranges
=
oo
[
1
];
/* original data */
var
data
=
oo
[
0
];
var
ws_name
=
"SheetJS"
;
console
.
log
(
data
);
var
wb
=
new
Workbook
(),
ws
=
sheet_from_array_of_arrays
(
data
);
/* add ranges to worksheet */
// ws['!cols'] = ['apple', 'banan'];
ws
[
'!merges'
]
=
ranges
;
/* add worksheet to workbook */
wb
.
SheetNames
.
push
(
ws_name
);
wb
.
Sheets
[
ws_name
]
=
ws
;
var
wbout
=
XLSX
.
write
(
wb
,
{
bookType
:
'xlsx'
,
bookSST
:
false
,
type
:
'binary'
});
saveAs
(
new
Blob
([
s2ab
(
wbout
)],
{
type
:
"application/octet-stream"
}),
"test.xlsx"
)
}
function
formatJson
(
jsonData
)
{
console
.
log
(
jsonData
)
}
export
function
export_json_to_excel
(
th
,
jsonData
,
defaultTitle
)
{
/* original data */
var
data
=
jsonData
;
data
.
unshift
(
th
);
var
ws_name
=
"SheetJS"
;
var
wb
=
new
Workbook
(),
ws
=
sheet_from_array_of_arrays
(
data
);
/* add worksheet to workbook */
wb
.
SheetNames
.
push
(
ws_name
);
wb
.
Sheets
[
ws_name
]
=
ws
;
var
wbout
=
XLSX
.
write
(
wb
,
{
bookType
:
'xlsx'
,
bookSST
:
false
,
type
:
'binary'
});
var
title
=
defaultTitle
||
'列表'
saveAs
(
new
Blob
([
s2ab
(
wbout
)],
{
type
:
"application/octet-stream"
}),
title
+
".xlsx"
)
}
src/libs/util.permision.js
View file @
67f6539
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: limin
* @Author: limin
* @Date: 2019-08-27 19:16:26
* @Date: 2019-08-27 19:16:26
* @Last Modified by: chenwq
* @Last Modified by: chenwq
* @Last Modified time: 2020-1
0-29 18:13:28
* @Last Modified time: 2020-1
1-13 09:44:00
*/
*/
const
permision
=
{}
const
permision
=
{}
/**
/**
...
@@ -78,7 +78,7 @@ const _loop = function(res, fnGetMenu) {
...
@@ -78,7 +78,7 @@ const _loop = function(res, fnGetMenu) {
if
(
!
__oMenu
)
{
// 不存在 可能是 按钮 直接继续循环
if
(
!
__oMenu
)
{
// 不存在 可能是 按钮 直接继续循环
return
true
return
true
}
}
if
(
+
(
__oMenu
.
parentId
)
===
0
)
{
// 取出1级菜单
if
(
+
(
__oMenu
.
parentId
)
===
1
)
{
// 取出1级菜单
__aParent
.
push
(
__oMenu
)
__aParent
.
push
(
__oMenu
)
}
else
{
// 取出子菜单
}
else
{
// 取出子菜单
__aSub
.
push
(
__oMenu
)
__aSub
.
push
(
__oMenu
)
...
...
src/main.js
View file @
67f6539
...
@@ -29,6 +29,7 @@ Vue.prototype.notice = notice
...
@@ -29,6 +29,7 @@ Vue.prototype.notice = notice
// Vue.use(D2Crud)
// Vue.use(D2Crud)
var
baseConfig
=
''
var
baseConfig
=
''
axios
({
axios
({
// baseURL: process.env.VUE_APP_REPO + '/dj-car-life-system-config-test',
baseURL
:
process
.
env
.
VUE_APP_REPO
+
'/dj-car-life-system-config'
,
baseURL
:
process
.
env
.
VUE_APP_REPO
+
'/dj-car-life-system-config'
,
method
:
'get'
method
:
'get'
}).
then
(({
}).
then
(({
...
...
src/router/routes.js
View file @
67f6539
...
@@ -24,8 +24,8 @@ export const home = {
...
@@ -24,8 +24,8 @@ export const home = {
icon
:
's-home'
,
icon
:
's-home'
,
meta
:
{
meta
:
{
title
:
'预录客户'
,
title
:
'预录客户'
,
authId
:
'
1
01'
,
authId
:
'
9
01'
,
parentId
:
'
0
'
,
parentId
:
'
1
'
,
cache
:
true
cache
:
true
},
},
component
:
_import
(
'flow/editCustomer'
)
component
:
_import
(
'flow/editCustomer'
)
...
@@ -57,154 +57,156 @@ export const sys = [
...
@@ -57,154 +57,156 @@ export const sys = [
* 106 - 系统设置
* 106 - 系统设置
*/
*/
export
const
resources
=
{
export
const
resources
=
{
'
1
03'
:
{
'
9
03'
:
{
path
:
'/goods'
,
path
:
'/goods'
,
name
:
'goods'
,
name
:
'goods'
,
icon
:
'document'
,
icon
:
'document'
,
meta
:
{
meta
:
{
title
:
'商品库'
,
title
:
'商品库'
,
authId
:
'
1
03'
,
authId
:
'
9
03'
,
parentId
:
'
0
'
,
parentId
:
'
1
'
,
cache
:
true
cache
:
true
}
}
},
},
'
1
0301'
:
{
'
9
0301'
:
{
path
:
'/product'
,
path
:
'/product'
,
name
:
'product'
,
name
:
'product'
,
icon
:
'document'
,
icon
:
'document'
,
meta
:
{
meta
:
{
title
:
'产品管理'
,
title
:
'产品管理'
,
authId
:
'
1
0301'
,
authId
:
'
9
0301'
,
parentId
:
'
1
03'
,
parentId
:
'
9
03'
,
cache
:
true
cache
:
true
},
},
auth
:
[{
auth
:
[{
authId
:
'
1
030101'
,
authId
:
'
9
030101'
,
parentId
:
'
1
0301'
,
parentId
:
'
9
0301'
,
label
:
'新增商品'
,
label
:
'新增商品'
,
category
:
'Button'
,
category
:
'Button'
,
type
:
'primary'
,
type
:
'primary'
,
handle
:
'handleAdd'
handle
:
'handleAdd'
},
{
},
authId
:
'1030102'
,
// {
parentId
:
'10301'
,
// authId: '1030102',
label
:
'导出'
,
// parentId: '10301',
category
:
'Button'
,
// label: '导出',
handle
:
'handleExport'
// category: 'Button',
},
{
// handle: 'handleExport'
authId
:
'1030103'
,
// },
parentId
:
'10301'
,
{
authId
:
'9030102'
,
parentId
:
'90301'
,
label
:
'修改'
,
label
:
'修改'
,
handle
:
'handleEdit'
handle
:
'handleEdit'
}],
}],
component
:
_import
(
'goods/product'
)
component
:
_import
(
'goods/product'
)
},
},
'
1
0304'
:
{
'
9
0304'
:
{
path
:
'/editProduct'
,
path
:
'/editProduct'
,
name
:
'editProduct'
,
name
:
'editProduct'
,
icon
:
'document'
,
icon
:
'document'
,
meta
:
{
meta
:
{
title
:
'产品编辑'
,
title
:
'产品编辑'
,
authId
:
'
1
0304'
,
authId
:
'
9
0304'
,
parentId
:
'
1
03'
,
parentId
:
'
9
03'
,
cache
:
true
,
cache
:
true
,
sideHidden
:
true
sideHidden
:
true
},
},
component
:
_import
(
'goods/editProduct'
)
component
:
_import
(
'goods/editProduct'
)
},
},
'
1
0302'
:
{
'
9
0302'
:
{
path
:
'/commodity'
,
path
:
'/commodity'
,
name
:
'commodity'
,
name
:
'commodity'
,
icon
:
'document'
,
icon
:
'document'
,
meta
:
{
meta
:
{
title
:
'商品管理'
,
title
:
'商品管理'
,
authId
:
'
1
0302'
,
authId
:
'
9
0302'
,
parentId
:
'
1
03'
,
parentId
:
'
9
03'
,
cache
:
true
cache
:
true
},
},
auth
:
[{
auth
:
[{
authId
:
'
1
030201'
,
authId
:
'
9
030201'
,
parentId
:
'
1
0302'
,
parentId
:
'
9
0302'
,
label
:
'新增商品'
,
label
:
'新增商品'
,
category
:
'Button'
,
category
:
'Button'
,
type
:
'primary'
,
type
:
'primary'
,
handle
:
'handleAdd'
handle
:
'handleAdd'
},
{
},
{
authId
:
'
1
030202'
,
authId
:
'
9
030202'
,
parentId
:
'
1
0302'
,
parentId
:
'
9
0302'
,
label
:
'导出'
,
label
:
'导出'
,
category
:
'Button'
,
category
:
'Button'
,
handle
:
'handleExport'
handle
:
'handleExport'
// rule:{0: '上架',}
// rule:{0: '上架',}
},
{
},
{
authId
:
'
1
030203'
,
authId
:
'
9
030203'
,
parentId
:
'
1
0302'
,
parentId
:
'
9
0302'
,
label
:
'编辑'
,
label
:
'编辑'
,
handle
:
'handleEdit'
handle
:
'handleEdit'
},
{
},
{
authId
:
'
1
030204'
,
authId
:
'
9
030204'
,
parentId
:
'
1
0302'
,
parentId
:
'
9
0302'
,
label
:
'查看门店'
,
label
:
'查看门店'
,
handle
:
'handleDetail'
handle
:
'handleDetail'
}],
}],
component
:
_import
(
'goods/commodity'
)
component
:
_import
(
'goods/commodity'
)
},
},
'
1
0305'
:
{
'
9
0305'
:
{
path
:
'/editCommodity'
,
path
:
'/editCommodity'
,
name
:
'editCommodity'
,
name
:
'editCommodity'
,
icon
:
'document'
,
icon
:
'document'
,
meta
:
{
meta
:
{
title
:
'商品编辑'
,
title
:
'商品编辑'
,
authId
:
'
1
0305'
,
authId
:
'
9
0305'
,
parentId
:
'
1
03'
,
parentId
:
'
9
03'
,
// cache: true,
// cache: true,
sideHidden
:
true
sideHidden
:
true
},
},
component
:
_import
(
'goods/editCommodity'
)
component
:
_import
(
'goods/editCommodity'
)
},
},
'
1
06'
:
{
'
9
06'
:
{
path
:
'/systemConfig'
,
path
:
'/systemConfig'
,
name
:
'systemConfig'
,
name
:
'systemConfig'
,
icon
:
'document'
,
icon
:
'document'
,
meta
:
{
meta
:
{
title
:
'系统设置'
,
title
:
'系统设置'
,
authId
:
'
1
06'
,
authId
:
'
9
06'
,
parentId
:
'
0
'
,
parentId
:
'
1
'
,
cache
:
true
cache
:
true
}
}
},
},
'
1
0601'
:
{
'
9
0601'
:
{
path
:
'/personalInfo'
,
path
:
'/personalInfo'
,
name
:
'personalInfo'
,
name
:
'personalInfo'
,
icon
:
'document'
,
icon
:
'document'
,
meta
:
{
meta
:
{
title
:
'个人信息'
,
title
:
'个人信息'
,
authId
:
'
1
0601'
,
authId
:
'
9
0601'
,
parentId
:
'
1
06'
,
parentId
:
'
9
06'
,
cache
:
true
cache
:
true
},
},
component
:
_import
(
'systemConfig/personalInfo'
)
component
:
_import
(
'systemConfig/personalInfo'
)
},
},
'
1
0602'
:
{
'
9
0602'
:
{
path
:
'/serviceStore'
,
path
:
'/serviceStore'
,
name
:
'serviceStore'
,
name
:
'serviceStore'
,
icon
:
'document'
,
icon
:
'document'
,
meta
:
{
meta
:
{
title
:
'服务4s店'
,
title
:
'服务4s店'
,
authId
:
'
1
0602'
,
authId
:
'
9
0602'
,
parentId
:
'
1
06'
,
parentId
:
'
9
06'
,
cache
:
true
cache
:
true
},
},
auth
:
[{
auth
:
[{
authId
:
'
1
060201'
,
authId
:
'
9
060201'
,
parentId
:
'
1
0602'
,
parentId
:
'
9
0602'
,
label
:
'新增服务门店'
,
label
:
'新增服务门店'
,
category
:
'Button'
,
category
:
'Button'
,
type
:
'primary'
,
type
:
'primary'
,
handle
:
'handleAdd'
handle
:
'handleAdd'
},
{
},
{
authId
:
'
1
060202'
,
authId
:
'
9
060202'
,
parentId
:
'
1
0602'
,
parentId
:
'
9
0602'
,
label
:
'删除'
,
label
:
'删除'
,
handle
:
'handleDelete'
handle
:
'handleDelete'
}],
}],
...
...
src/store/modules/d2admin/modules/account.js
View file @
67f6539
import
util
from
'@/libs/util.js'
import
util
from
'@/libs/util.js'
import
{
AccountLogin
}
from
'@api/sys.account'
import
{
AccountLogin
,
getAuths
}
from
'@api/sys.account'
import
{
SUPPER_ADMIN
}
from
'@/common/constants'
import
{
SUPPER_ADMIN
}
from
'@/common/constants'
import
{
localRoutes
}
from
'@/router/routes'
import
{
localRoutes
}
from
'@/router/routes'
import
{
baseConfig
}
from
'@/main'
import
{
baseConfig
}
from
'@/main'
...
@@ -25,21 +25,29 @@ export default {
...
@@ -25,21 +25,29 @@ export default {
// 如有必要 token 需要定时更新,默认保存一天
// 如有必要 token 需要定时更新,默认保存一天
// util.cookies.set('uuid', data.loginName)
// util.cookies.set('uuid', data.loginName)
util
.
cookies
.
set
(
'token'
,
data
.
sessionId
)
util
.
cookies
.
set
(
'token'
,
data
.
sessionId
)
data
.
roleType
=
baseConfig
.
hasAuth
?
data
.
roleType
:
SUPPER_ADMIN
getAuths
({}).
then
(
async
res
=>
{
const
authes
=
(
+
data
.
roleType
===
SUPPER_ADMIN
)
console
.
log
(
res
)
?
util
.
permision
.
flatten
(
Object
.
values
(
localRoutes
))
!
res
.
map
(
i
=>
i
.
authId
).
includes
(
'901'
)
&&
res
.
unshift
({
.
map
(
obj
=>
({
authId
:
obj
.
authId
,
parentId
:
obj
.
parentId
}))
authId
:
'901'
,
:
_
.
cloneDeep
(
data
.
authes
)
name
:
'预录客户'
,
await
dispatch
(
'd2admin/auth/set'
,
authes
,
{
root
:
true
})
parentId
:
'1'
// // 设置 vuex 用户信息
})
delete
data
.
authes
data
.
roleType
=
baseConfig
.
hasAuth
?
data
.
roleType
:
SUPPER_ADMIN
await
dispatch
(
'd2admin/user/set'
,
data
,
{
root
:
true
})
const
authes
=
(
+
data
.
roleType
===
SUPPER_ADMIN
)
// 初始化权限
?
util
.
permision
.
flatten
(
Object
.
values
(
localRoutes
))
await
dispatch
(
'd2admin/auth/init'
,
null
,
{
root
:
true
})
.
map
(
obj
=>
({
authId
:
obj
.
authId
,
parentId
:
obj
.
parentId
}))
// // 用户登录后从持久化数据加载一系列的设置
:
_
.
cloneDeep
(
res
)
await
dispatch
(
'load'
)
await
dispatch
(
'd2admin/auth/set'
,
authes
,
{
root
:
true
})
// 结束
// // 设置 vuex 用户信息
resolve
()
// delete data.authes
await
dispatch
(
'd2admin/user/set'
,
data
,
{
root
:
true
})
// 初始化权限
await
dispatch
(
'd2admin/auth/init'
,
null
,
{
root
:
true
})
// // 用户登录后从持久化数据加载一系列的设置
await
dispatch
(
'load'
)
// 结束
resolve
()
})
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
'err: '
,
err
)
console
.
log
(
'err: '
,
err
)
...
...
src/views/goods/commodity.vue
View file @
67f6539
...
@@ -106,8 +106,10 @@
...
@@ -106,8 +106,10 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getList
}
from
'@api/commodity'
import
{
getList
,
exportBaseList
}
from
'@api/commodity'
import
{
BaseData
}
from
'@/common/constants.js'
import
{
BaseData
}
from
'@/common/constants.js'
import
Blob
from
'@/common/Blob.js'
import
Export2Excel
from
'@/common/Export2Excel.js'
import
{
mapActions
}
from
'vuex'
import
{
mapActions
}
from
'vuex'
import
_
from
'lodash'
import
_
from
'lodash'
import
storeDetail
from
'./storeDetail'
import
storeDetail
from
'./storeDetail'
...
@@ -220,7 +222,14 @@ export default {
...
@@ -220,7 +222,14 @@ export default {
}
}
})
})
},
},
handleExport
()
{
},
handleExport
()
{
const
tHeader
=
[
'商品ID'
,
'商品名称'
,
'分类'
,
'品牌商'
]
const
fieldVal
=
[
'goodsCode'
,
'goodsName'
,
'goodsTypeName'
,
'brandMerchantName'
]
exportBaseList
(
this
.
searchForm
).
then
(
res
=>
{
console
.
log
(
res
)
// const exportData = this.
})
},
handleEdit
(
row
)
{
handleEdit
(
row
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'editCommodity'
,
name
:
'editCommodity'
,
...
...
src/views/goods/product.vue
View file @
67f6539
...
@@ -186,7 +186,7 @@ export default {
...
@@ -186,7 +186,7 @@ export default {
}
}
})
})
},
},
handleExport
()
{
},
//
handleExport() { },
handleEdit
(
row
)
{
handleEdit
(
row
)
{
// console.log(row)
// console.log(row)
this
.
$router
.
push
({
this
.
$router
.
push
({
...
...
src/views/system/login/index.vue
View file @
67f6539
...
@@ -121,8 +121,8 @@ export default {
...
@@ -121,8 +121,8 @@ export default {
time
:
dayjs
().
format
(
'HH:mm:ss'
),
time
:
dayjs
().
format
(
'HH:mm:ss'
),
// 表单
// 表单
formLogin
:
{
formLogin
:
{
//
userName: 'dongdao',
userName
:
'dongdao'
,
userName
:
'houlai'
,
//
userName: 'houlai',
password
:
'123456'
password
:
'123456'
},
},
// 表单校验
// 表单校验
...
...
src/views/userManage/role/editDialog.vue
View file @
67f6539
...
@@ -81,7 +81,7 @@ export default {
...
@@ -81,7 +81,7 @@ export default {
const
clone
=
util
.
deepClone
(
Object
.
values
(
localRoutes
))
const
clone
=
util
.
deepClone
(
Object
.
values
(
localRoutes
))
const
{
menus
}
=
util
.
permision
.
packMenusBtns
(
clone
)
const
{
menus
}
=
util
.
permision
.
packMenusBtns
(
clone
)
const
all
=
util
.
permision
.
flatten
(
clone
)
const
all
=
util
.
permision
.
flatten
(
clone
)
menus
.
find
(
o
=>
o
.
authId
===
'
1
01'
).
disabled
=
true
menus
.
find
(
o
=>
o
.
authId
===
'
9
01'
).
disabled
=
true
return
{
menus
,
all
}
return
{
menus
,
all
}
}
}
},
},
...
...
src/views/userManage/role/roleTree.vue
View file @
67f6539
...
@@ -50,7 +50,7 @@ export default {
...
@@ -50,7 +50,7 @@ export default {
handler
(
value
)
{
handler
(
value
)
{
if
(
!
value
)
return
if
(
!
value
)
return
const
chk
=
[]
const
chk
=
[]
const
treeChk
=
[
'
1
01'
]
const
treeChk
=
[
'
9
01'
]
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
value
.
forEach
(
v
=>
{
value
.
forEach
(
v
=>
{
v
.
authId
+=
''
v
.
authId
+=
''
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment