Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周远喜
mes-ui
Commits
50175133
Commit
50175133
authored
Oct 09, 2020
by
骆瑛
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'portal' of
http://git.mes123.com/zhouyx/mes-ui
into portal
parents
8940cc3a
255462d1
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1033 additions
and
811 deletions
+1033
-811
base.less
assets/css/base.less
+19
-1
dataGrid.vue
components/page/dataGrid.vue
+87
-8
process.vue
components/page/import/process.vue
+28
-6
inputIcon.vue
components/page/inputIcon.vue
+69
-58
zh-CN.js
i18n/locale/zh-CN.js
+2
-0
index.vue
layouts/basic-layout/header-i18n/index.vue
+42
-35
index.vue
layouts/basic-layout/header-user/index.vue
+39
-40
npm-shrinkwrap.json
npm-shrinkwrap.json
+10
-10
index.vue
pages/account/login/index.vue
+3
-4
Addrow.vue
pages/basicData/department/Addrow.vue
+38
-21
add.vue
pages/basicData/department/add.vue
+32
-15
api.js
pages/basicData/department/api.js
+4
-1
edit.vue
pages/basicData/department/edit.vue
+3
-2
index.vue
pages/basicData/department/index.vue
+32
-6
edit.vue
pages/basicData/user/edit.vue
+5
-0
index.vue
pages/basicData/user/index.vue
+57
-282
detail.vue
pages/exception/detail.vue
+127
-60
index.vue
pages/exception/index.vue
+114
-72
index.vue
pages/index.vue
+1
-9
index.vue
pages/system/config/index.vue
+210
-167
index.js
plugins/request/index.js
+1
-1
base.css
src/assets/css/base.css
+61
-2
config.js
static/config.js
+1
-0
index.js
store/index.js
+48
-11
No files found.
assets/css/base.less
View file @
50175133
...
...
@@ -285,6 +285,13 @@ html body {
.pl20 {
padding-left: 20px
}
.pr10 {
padding-right: 10px
}
.pr20 {
padding-right: 20px
}
.bnone {
border: none;
...
...
@@ -698,7 +705,18 @@ i.icon-gengxin {
.tc {
text-align: center;
}
.lt30
{
line-height: 30px;
}
.lt40
{
line-height: 40px;
}
.lt50
{
line-height: 50px;
}
/*清除浮动*/
...
...
components/page/dataGrid.vue
View file @
50175133
...
...
@@ -102,6 +102,7 @@ export default {
treeData
:
[],
//物料数据
codeRuleData
:
[],
//物料编码
routingHeaderData
:
[],
//工艺规程
allUser
:
[]
};
},
props
:
{
...
...
@@ -277,6 +278,7 @@ export default {
//this.getTreeData();
//this.getcodeRuleData();
//this.getRoutingHeaderData();
this
.
getAllUser
()
},
methods
:
{
//数据加载
...
...
@@ -477,6 +479,36 @@ export default {
this
.
footerToolbar
=
false
;
this
.
$refs
.
table
.
selectAll
(
false
);
},
//获取所有用户信息
getAllUser
()
{
this
.
$api
.
post
(
`
${
systemUrl
}
/user/paged`
,
{
conditions
:
[],
pageIndex
:
1
,
pageSize
:
100000
,
})
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
let
tempUserInfo
=
r
.
result
.
items
tempUserInfo
.
forEach
(
ele
=>
{
let
temObj
=
{
userId
:
ele
.
id
,
name
:
ele
.
userName
}
this
.
allUser
.
push
(
temObj
)
})
}
})
},
getUserName
(
id
)
{
let
name
=
''
this
.
allUser
.
forEach
(
ele
=>
{
if
(
id
==
ele
.
userId
)
{
name
=
ele
.
name
}
})
return
name
},
//导出excel
export2Excel
()
{
...
...
@@ -516,10 +548,13 @@ export default {
};
this
.
$api
.
post
(
this
.
action
,
searchs
).
then
((
r
)
=>
{
let
list
=
[];
list
=
r
.
result
.
items
;
if
(
r
.
success
)
{
list
=
r
.
result
.
items
||
[];
}
const
tHeader
=
[];
// 设置Excel的表格第一行的标题
const
filterVal
=
[];
//list里对象的属性
var
tempCol
=
[];
var
tempColUser
=
[];
var
columnsCur
=
this
.
$u
.
clone
(
this
.
columnsCur
);
//导出列标题信息griddata this.$refs.grid.columnsCur
columnsCur
.
forEach
((
el
)
=>
{
if
(
...
...
@@ -535,19 +570,64 @@ export default {
code
:
el
.
code
,
});
//临时存放code数据字典的字段及对应的数据字典code
}
if
(
el
.
type
&&
el
.
type
==
"user"
)
{
tempColUser
.
push
({
key
:
el
.
key
,
code
:
el
.
type
,
});
//临时存放user列
}
tHeader
.
push
(
el
.
title
);
filterVal
.
push
(
el
.
key
);
}
});
list
.
forEach
((
e
)
=>
{
//给导出数据增加数据字典对应的name
tempCol
.
forEach
((
ele
)
=>
{
e
[
ele
.
key
]
=
this
.
$u
.
dirName
(
this
.
$store
.
getters
.
dictionaryByKey
(
ele
.
code
),
e
[
ele
.
key
]
);
// tempCol.forEach((ele) => {
// e[ele.key] = this.$u.dirName(
// this.$store.getters.dictionaryByKey(ele.code),
// e[ele.key]
// );
// });
tempCol
.
forEach
((
elem
)
=>
{
if
(
e
[
elem
.
key
]
&&
e
[
elem
.
key
]
!=
""
&&
e
[
elem
.
key
]
!=
null
)
{
//如果数据字典项对应的DirName字段存在,通过name查询到对应的code,然后赋值。
let
codeArr
=
[]
let
keyValue
=
e
[
elem
.
key
]
if
(
keyValue
.
length
>
0
&&
(
keyValue
.
indexOf
(
','
)
>
-
1
||
keyValue
.
indexOf
(
','
)
>
-
1
))
{
//如果对应的数据包含多个数据字典项,比如包含“,”或“,”
if
(
keyValue
.
indexOf
(
','
)
>
-
1
)
{
codeArr
=
keyValue
.
split
(
','
)
}
if
(
keyValue
.
indexOf
>
-
1
)
{
codeArr
=
keyValue
.
split
(
','
)
}
}
if
(
codeArr
.
length
<=
1
)
{
//对应的数据包含一个数据字典项
e
[
elem
.
key
]
=
this
.
$u
.
dirName
(
this
.
$store
.
getters
.
dictionaryByKey
(
elem
.
code
),
e
[
elem
.
key
]
);
}
else
{
//对应的数据包含多个数据字典项
let
codeInfo
=
''
codeArr
.
forEach
(
el
=>
{
codeInfo
=
codeInfo
+
this
.
$u
.
dirName
(
this
.
$store
.
getters
.
dictionaryByKey
(
elem
.
code
),
el
)
+
","
;
})
e
[
elem
.
key
]
=
codeInfo
.
substr
(
0
,
codeInfo
.
length
-
1
)
}
}
});
tempColUser
.
forEach
(
eluser
=>
{
if
(
e
[
eluser
.
key
]
&&
e
[
eluser
.
key
]
!=
""
&&
e
[
eluser
.
key
]
!=
null
)
{
e
[
eluser
.
key
]
=
this
.
getUserName
(
e
[
eluser
.
key
])
}
})
});
let
nowDate
=
this
.
$u
.
getNowTime
();
//年月日时分秒yyyyMMddhhmmss
...
...
@@ -560,7 +640,6 @@ export default {
);
});
},
},
computed
:
{
columnsNow
()
{
...
...
components/page/import/process.vue
View file @
50175133
...
...
@@ -251,12 +251,34 @@ export default {
}
arrTitleUse
.
forEach
((
elem
)
=>
{
if
(
eles
[
elem
.
key
]
&&
eles
[
elem
.
key
]
!=
""
&&
eles
[
elem
.
key
]
!=
null
)
{
//如果数据字典项对应的DirName字段存在,通过name查询到对应的code,然后赋值
eles
[
elem
.
key
]
=
this
.
$u
.
dirCode
(
this
.
$store
.
getters
.
dictionaryByKey
(
elem
.
code
),
eles
[
elem
.
key
]
);
if
(
eles
[
elem
.
key
]
&&
eles
[
elem
.
key
]
!=
""
&&
eles
[
elem
.
key
]
!=
null
)
{
//如果数据字典项对应的DirName字段存在,通过name查询到对应的code,然后赋值。
let
codeArr
=
[]
let
keyValue
=
eles
[
elem
.
key
]
if
(
keyValue
.
length
>
0
&&
(
keyValue
.
indexOf
(
','
)
>
-
1
||
keyValue
.
indexOf
(
','
)
>
-
1
))
{
//如果对应的数据包含多个数据字典项,比如包含“,”或“,”
if
(
keyValue
.
indexOf
(
','
)
>
-
1
)
{
codeArr
=
keyValue
.
split
(
','
)
}
if
(
keyValue
.
indexOf
>
-
1
)
{
codeArr
=
keyValue
.
split
(
','
)
}
}
if
(
codeArr
.
length
<=
1
)
{
//对应的数据包含一个数据字典项
eles
[
elem
.
key
]
=
this
.
$u
.
dirCode
(
this
.
$store
.
getters
.
dictionaryByKey
(
elem
.
code
),
eles
[
elem
.
key
]
);
}
else
{
//对应的数据包含多个数据字典项
let
codeInfo
=
''
codeArr
.
forEach
(
el
=>
{
codeInfo
=
codeInfo
+
this
.
$u
.
dirCode
(
this
.
$store
.
getters
.
dictionaryByKey
(
elem
.
code
),
el
)
+
","
;
})
eles
[
elem
.
key
]
=
codeInfo
.
substr
(
0
,
codeInfo
.
length
-
1
)
}
}
});
...
...
components/page/inputIcon.vue
View file @
50175133
<
template
>
<div>
<Input
v-model
.
trim=
"curModel"
@
on-change=
"change"
placeholder=
"请输入图标"
@
>
<span
slot=
"prepend"
>
<div>
<Input
v-model
.
trim=
"curModel"
@
on-change=
"change"
placeholder=
"请输入图标"
>
<span
slot=
"prepend"
>
<a
@
click=
"iconModal=true"
class=
"setIcon"
>
<Icon
:type=
"type"
></Icon>
<Icon
:type=
"type"
></Icon>
</a>
</span>
</span>
<span
slot=
"append"
>
<a
@
click=
"clearIcon"
class=
"setIcon"
>
<Icon
type=
"ios-close"
/>
</a>
</span>
</Input>
<Modal
v-model=
"iconModal"
title=
"设置图标"
:width=
"800"
>
<div
id=
"icons"
>
<a
v-for=
"(icon,i) in iconList"
:key=
"i"
@
click=
"setIcon(icon)"
:title=
"icon"
>
<Icon
:type=
"icon"
size=
"36"
></Icon>
</a>
</div>
<div
slot=
"footer"
></div>
<div
id=
"icons"
>
<a
v-for=
"(icon,i) in iconList"
:key=
"i"
@
click=
"setIcon(icon)"
:title=
"icon"
>
<Icon
:type=
"icon"
size=
"36"
></Icon>
</a>
</div>
<div
slot=
"footer"
></div>
</Modal>
</div>
</div>
</
template
>
<
script
>
export
default
{
model
:{
prop
:
"value"
,
event
:
"on-change"
model
:
{
prop
:
"value"
,
event
:
"on-change"
},
props
:{
value
:{
type
:
String
props
:
{
value
:
{
type
:
String
}
},
name
:
'InputIcon'
,
data
()
{
return
{
curModel
:
this
.
value
,
iconModal
:
false
,
icons
:
'ios-add,md-add,ios-add-circle,ios-add-circle-outline,md-add-circle,ios-alarm,ios-alarm-outline,md-alarm,ios-albums,ios-albums-outline,md-albums,ios-alert,ios-alert-outline,md-alert,ios-american-football,ios-american-football-outline,md-american-football,ios-analytics,ios-analytics-outline,md-analytics,logo-android,logo-angular,ios-aperture,ios-aperture-outline,md-aperture,logo-apple,ios-apps,ios-apps-outline,md-apps,ios-appstore,ios-appstore-outline,md-appstore,ios-archive,ios-archive-outline,md-archive,ios-arrow-back,md-arrow-back,ios-arrow-down,md-arrow-down,ios-arrow-dropdown,md-arrow-dropdown,ios-arrow-dropdown-circle,md-arrow-dropdown-circle,ios-arrow-dropleft,md-arrow-dropleft,ios-arrow-dropleft-circle,md-arrow-dropleft-circle,ios-arrow-dropright,md-arrow-dropright,ios-arrow-dropright-circle,md-arrow-dropright-circle,ios-arrow-dropup,md-arrow-dropup,ios-arrow-dropup-circle,md-arrow-dropup-circle,ios-arrow-forward,md-arrow-forward,ios-arrow-round-back,md-arrow-round-back,ios-arrow-round-down,md-arrow-round-down,ios-arrow-round-forward,md-arrow-round-forward,ios-arrow-round-up,md-arrow-round-up,ios-arrow-up,md-arrow-up,ios-at,ios-at-outline,md-at,ios-attach,md-attach,ios-backspace,ios-backspace-outline,md-backspace,ios-barcode,ios-barcode-outline,md-barcode,ios-baseball,ios-baseball-outline,md-baseball,ios-basket,ios-basket-outline,md-basket,ios-basketball,ios-basketball-outline,md-basketball,ios-battery-charging,md-battery-charging,ios-battery-dead,md-battery-dead,ios-battery-full,md-battery-full,ios-beaker,ios-beaker-outline,md-beaker,ios-beer,ios-beer-outline,md-beer,ios-bicycle,md-bicycle,logo-bitcoin,ios-bluetooth,md-bluetooth,ios-boat,ios-boat-outline,md-boat,ios-body,ios-body-outline,md-body,ios-bonfire,ios-bonfire-outline,md-bonfire,ios-book,ios-book-outline,md-book,ios-bookmark,ios-bookmark-outline,md-bookmark,ios-bookmarks,ios-bookmarks-outline,md-bookmarks,ios-bowtie,ios-bowtie-outline,md-bowtie,ios-briefcase,ios-briefcase-outline,md-briefcase,ios-browsers,ios-browsers-outline,md-browsers,ios-brush,ios-brush-outline,md-brush,logo-buffer,ios-bug,ios-bug-outline,md-bug,ios-build,ios-build-outline,md-build,ios-bulb,ios-bulb-outline,md-bulb,ios-bus,ios-bus-outline,md-bus,ios-cafe,ios-cafe-outline,md-cafe,ios-calculator,ios-calculator-outline,md-calculator,ios-calendar,ios-calendar-outline,md-calendar,ios-call,ios-call-outline,md-call,ios-camera,ios-camera-outline,md-camera,ios-car,ios-car-outline,md-car,ios-card,ios-card-outline,md-card,ios-cart,ios-cart-outline,md-cart,ios-cash,ios-cash-outline,md-cash,ios-chatboxes,ios-chatboxes-outline,md-chatboxes,ios-chatbubbles,ios-chatbubbles-outline,md-chatbubbles,ios-checkbox,ios-checkbox-outline,md-checkbox,md-checkbox-outline,ios-checkmark,md-checkmark,ios-checkmark-circle,ios-checkmark-circle-outline,md-checkmark-circle,md-checkmark-circle-outline,logo-chrome,ios-clipboard,ios-clipboard-outline,md-clipboard,ios-clock,ios-clock-outline,md-clock,ios-close,md-close,ios-close-circle,ios-close-circle-outline,md-close-circle,ios-closed-captioning,ios-closed-captioning-outline,md-closed-captioning,ios-cloud,ios-cloud-outline,md-cloud,ios-cloud-circle,ios-cloud-circle-outline,md-cloud-circle,ios-cloud-done,ios-cloud-done-outline,md-cloud-done,ios-cloud-download,ios-cloud-download-outline,md-cloud-download,md-cloud-outline,ios-cloud-upload,ios-cloud-upload-outline,md-cloud-upload,ios-cloudy,ios-cloudy-outline,md-cloudy,ios-cloudy-night,ios-cloudy-night-outline,md-cloudy-night,ios-code,md-code,ios-code-download,md-code-download,ios-code-working,md-code-working,logo-codepen,ios-cog,ios-cog-outline,md-cog,ios-color-fill,ios-color-fill-outline,md-color-fill,ios-color-filter,ios-color-filter-outline,md-color-filter,ios-color-palette,ios-color-palette-outline,md-color-palette,ios-color-wand,ios-color-wand-outline,md-color-wand,ios-compass,ios-compass-outline,md-compass,ios-construct,ios-construct-outline,md-construct,ios-contact,ios-contact-outline,md-contact,ios-contacts,ios-contacts-outline,md-contacts,ios-contract,md-contract,ios-contrast,md-contrast,ios-copy,ios-copy-outline,md-copy,ios-create,ios-create-outline,md-create,ios-crop,ios-crop-outline,md-crop,logo-css3,ios-cube,ios-cube-outline,md-cube,ios-cut,ios-cut-outline,md-cut,logo-designernews,ios-desktop,ios-desktop-outline,md-desktop,ios-disc,ios-disc-outline,md-disc,ios-document,ios-document-outline,md-document,ios-done-all,md-done-all,ios-download,ios-download-outline,md-download,logo-dribbble,logo-dropbox,ios-easel,ios-easel-outline,md-easel,ios-egg,ios-egg-outline,md-egg,logo-euro,ios-exit,ios-exit-outline,md-exit,ios-expand,md-expand,ios-eye,ios-eye-outline,md-eye,ios-eye-off,ios-eye-off-outline,md-eye-off,logo-facebook,ios-fastforward,ios-fastforward-outline,md-fastforward,ios-female,md-female,ios-filing,ios-filing-outline,md-filing,ios-film,ios-film-outline,md-film,ios-finger-print,md-finger-print,ios-flag,ios-flag-outline,md-flag,ios-flame,ios-flame-outline,md-flame,ios-flash,ios-flash-outline,md-flash,ios-flask,ios-flask-outline,md-flask,ios-flower,ios-flower-outline,md-flower,ios-folder,ios-folder-outline,md-folder,ios-folder-open,ios-folder-open-outline,md-folder-open,ios-football,ios-football-outline,md-football,logo-foursquare,logo-freebsd-devil,ios-funnel,ios-funnel-outline,md-funnel,ios-game-controller-a,ios-game-controller-a-outline,md-game-controller-a,ios-game-controller-b,ios-game-controller-b-outline,md-game-controller-b,ios-git-branch,md-git-branch,ios-git-commit,md-git-commit,ios-git-compare,md-git-compare,ios-git-merge,md-git-merge,ios-git-network,md-git-network,ios-git-pull-request,md-git-pull-request,logo-github,ios-glasses,ios-glasses-outline,md-glasses,ios-globe,ios-globe-outline,md-globe,logo-google,logo-googleplus,ios-grid,ios-grid-outline,md-grid,logo-hackernews,ios-hammer,ios-hammer-outline,md-hammer,ios-hand,ios-hand-outline,md-hand,ios-happy,ios-happy-outline,md-happy,ios-headset,ios-headset-outline,md-headset,ios-heart,ios-heart-outline,md-heart,md-heart-outline,ios-help,md-help,ios-help-buoy,ios-help-buoy-outline,md-help-buoy,ios-help-circle,ios-help-circle-outline,md-help-circle,ios-home,ios-home-outline,md-home,logo-html5,ios-ice-cream,ios-ice-cream-outline,md-ice-cream,ios-image,ios-image-outline,md-image,ios-images,ios-images-outline,md-images,ios-infinite,ios-infinite-outline,md-infinite,ios-information,md-information,ios-information-circle,ios-information-circle-outline,md-information-circle,logo-instagram,ios-ionic,ios-ionic-outline,md-ionic,ios-ionitron,ios-ionitron-outline,md-ionitron,logo-javascript,ios-jet,ios-jet-outline,md-jet,ios-key,ios-key-outline,md-key,ios-keypad,ios-keypad-outline,md-keypad,ios-laptop,md-laptop,ios-leaf,ios-leaf-outline,md-leaf,ios-link,ios-link-outline,md-link,logo-linkedin,ios-list,md-list,ios-list-box,ios-list-box-outline,md-list-box,ios-locate,ios-locate-outline,md-locate,ios-lock,ios-lock-outline,md-lock,ios-log-in,md-log-in,ios-log-out,md-log-out,ios-magnet,ios-magnet-outline,md-magnet,ios-mail,ios-mail-outline,md-mail,ios-mail-open,ios-mail-open-outline,md-mail-open,ios-male,md-male,ios-man,ios-man-outline,md-man,ios-map,ios-map-outline,md-map,logo-markdown,ios-medal,ios-medal-outline,md-medal,ios-medical,ios-medical-outline,md-medical,ios-medkit,ios-medkit-outline,md-medkit,ios-megaphone,ios-megaphone-outline,md-megaphone,ios-menu,ios-menu-outline,md-menu,ios-mic,ios-mic-outline,md-mic,ios-mic-off,ios-mic-off-outline,md-mic-off,ios-microphone,ios-microphone-outline,md-microphone,ios-moon,ios-moon-outline,md-moon,ios-more,ios-more-outline,md-more,ios-move,md-move,ios-musical-note,ios-musical-note-outline,md-musical-note,ios-musical-notes,ios-musical-notes-outline,md-musical-notes,ios-navigate,ios-navigate-outline,md-navigate,ios-no-smoking,ios-no-smoking-outline,md-no-smoking,logo-nodejs,ios-notifications,ios-notifications-outline,md-notifications,ios-notifications-off,ios-notifications-off-outline,md-notifications-off,md-notifications-outline,ios-nuclear,ios-nuclear-outline,md-nuclear,ios-nutrition,ios-nutrition-outline,md-nutrition,logo-octocat,ios-open,ios-open-outline,md-open,ios-options,ios-options-outline,md-options,ios-outlet,ios-outlet-outline,md-outlet,ios-paper,ios-paper-outline,md-paper,ios-paper-plane,ios-paper-plane-outline,md-paper-plane,ios-partly-sunny,ios-partly-sunny-outline,md-partly-sunny,ios-pause,ios-pause-outline,md-pause,ios-paw,ios-paw-outline,md-paw,ios-people,ios-people-outline,md-people,ios-person,ios-person-outline,md-person,ios-person-add,ios-person-add-outline,md-person-add,ios-phone-landscape,md-phone-landscape,ios-phone-portrait,md-phone-portrait,ios-photos,ios-photos-outline,md-photos,ios-pie,ios-pie-outline,md-pie,ios-pin,ios-pin-outline,md-pin,ios-pint,ios-pint-outline,md-pint,logo-pinterest,ios-pizza,ios-pizza-outline,md-pizza,ios-plane,ios-plane-outline,md-plane,ios-planet,ios-planet-outline,md-planet,ios-play,ios-play-outline,md-play,logo-playstation,ios-podium,ios-podium-outline,md-podium,ios-power,ios-power-outline,md-power,ios-pricetag,ios-pricetag-outline,md-pricetag,ios-pricetags,ios-pricetags-outline,md-pricetags,ios-print,ios-print-outline,md-print,ios-pulse,ios-pulse-outline,md-pulse,logo-python,ios-qr-scanner,md-qr-scanner,ios-quote,ios-quote-outline,md-quote,ios-radio,ios-radio-outline,md-radio,ios-radio-button-off,md-radio-button-off,ios-radio-button-on,md-radio-button-on,ios-rainy,ios-rainy-outline,md-rainy,ios-recording,ios-recording-outline,md-recording,logo-reddit,ios-redo,ios-redo-outline,md-redo,ios-refresh,md-refresh,ios-refresh-circle,ios-refresh-circle-outline,md-refresh-circle,ios-remove,md-remove,ios-remove-circle,ios-remove-circle-outline,md-remove-circle,ios-reorder,md-reorder,ios-repeat,md-repeat,ios-resize,md-resize,ios-restaurant,ios-restaurant-outline,md-restaurant,ios-return-left,md-return-left,ios-return-right,md-return-right,ios-reverse-camera,ios-reverse-camera-outline,md-reverse-camera,ios-rewind,ios-rewind-outline,md-rewind,ios-ribbon,ios-ribbon-outline,md-ribbon,ios-rose,ios-rose-outline,md-rose,logo-rss,ios-sad,ios-sad-outline,md-sad,logo-sass,ios-school,ios-school-outline,md-school,ios-search,ios-search-outline,md-search,ios-send,ios-send-outline,md-send,ios-settings,ios-settings-outline,md-settings,ios-share,ios-share-outline,md-share,ios-share-alt,ios-share-alt-outline,md-share-alt,ios-shirt,ios-shirt-outline,md-shirt,ios-shuffle,md-shuffle,ios-skip-backward,ios-skip-backward-outline,md-skip-backward,ios-skip-forward,ios-skip-forward-outline,md-skip-forward,logo-skype,logo-snapchat,ios-snow,ios-snow-outline,md-snow,ios-speedometer,ios-speedometer-outline,md-speedometer,ios-square,ios-square-outline,md-square,md-square-outline,ios-star,ios-star-outline,md-star,ios-star-half,md-star-half,md-star-outline,ios-stats,ios-stats-outline,md-stats,logo-steam,ios-stopwatch,ios-stopwatch-outline,md-stopwatch,ios-subway,ios-subway-outline,md-subway,ios-sunny,ios-sunny-outline,md-sunny,ios-swap,md-swap,ios-switch,ios-switch-outline,md-switch,ios-sync,md-sync,ios-tablet-landscape,md-tablet-landscape,ios-tablet-portrait,md-tablet-portrait,ios-tennisball,ios-tennisball-outline,md-tennisball,ios-text,ios-text-outline,md-text,ios-thermometer,ios-thermometer-outline,md-thermometer,ios-thumbs-down,ios-thumbs-down-outline,md-thumbs-down,ios-thumbs-up,ios-thumbs-up-outline,md-thumbs-up,ios-thunderstorm,ios-thunderstorm-outline,md-thunderstorm,ios-time,ios-time-outline,md-time,ios-timer,ios-timer-outline,md-timer,ios-train,ios-train-outline,md-train,ios-transgender,md-transgender,ios-trash,ios-trash-outline,md-trash,ios-trending-down,md-trending-down,ios-trending-up,md-trending-up,ios-trophy,ios-trophy-outline,md-trophy,logo-tumblr,logo-tux,logo-twitch,logo-twitter,ios-umbrella,ios-umbrella-outline,md-umbrella,ios-undo,ios-undo-outline,md-undo,ios-unlock,ios-unlock-outline,md-unlock,logo-usd,ios-videocam,ios-videocam-outline,md-videocam,logo-vimeo,ios-volume-down,md-volume-down,ios-volume-mute,md-volume-mute,ios-volume-off,md-volume-off,ios-volume-up,md-volume-up,ios-walk,md-walk,ios-warning,ios-warning-outline,md-warning,ios-watch,md-watch,ios-water,ios-water-outline,md-water,logo-whatsapp,ios-wifi,ios-wifi-outline,md-wifi,logo-windows,ios-wine,ios-wine-outline,md-wine,ios-woman,ios-woman-outline,md-woman,logo-wordpress,logo-xbox,logo-yahoo,logo-yen,logo-youtube,ios-loading'
}
},
computed
:
{
iconList
()
{
return
this
.
icons
.
split
(
','
)
name
:
'InputIcon'
,
data
()
{
return
{
curModel
:
this
.
value
,
iconModal
:
false
,
icons
:
'ios-add,md-add,ios-add-circle,ios-add-circle-outline,md-add-circle,ios-alarm,ios-alarm-outline,md-alarm,ios-albums,ios-albums-outline,md-albums,ios-alert,ios-alert-outline,md-alert,ios-american-football,ios-american-football-outline,md-american-football,ios-analytics,ios-analytics-outline,md-analytics,logo-android,logo-angular,ios-aperture,ios-aperture-outline,md-aperture,logo-apple,ios-apps,ios-apps-outline,md-apps,ios-appstore,ios-appstore-outline,md-appstore,ios-archive,ios-archive-outline,md-archive,ios-arrow-back,md-arrow-back,ios-arrow-down,md-arrow-down,ios-arrow-dropdown,md-arrow-dropdown,ios-arrow-dropdown-circle,md-arrow-dropdown-circle,ios-arrow-dropleft,md-arrow-dropleft,ios-arrow-dropleft-circle,md-arrow-dropleft-circle,ios-arrow-dropright,md-arrow-dropright,ios-arrow-dropright-circle,md-arrow-dropright-circle,ios-arrow-dropup,md-arrow-dropup,ios-arrow-dropup-circle,md-arrow-dropup-circle,ios-arrow-forward,md-arrow-forward,ios-arrow-round-back,md-arrow-round-back,ios-arrow-round-down,md-arrow-round-down,ios-arrow-round-forward,md-arrow-round-forward,ios-arrow-round-up,md-arrow-round-up,ios-arrow-up,md-arrow-up,ios-at,ios-at-outline,md-at,ios-attach,md-attach,ios-backspace,ios-backspace-outline,md-backspace,ios-barcode,ios-barcode-outline,md-barcode,ios-baseball,ios-baseball-outline,md-baseball,ios-basket,ios-basket-outline,md-basket,ios-basketball,ios-basketball-outline,md-basketball,ios-battery-charging,md-battery-charging,ios-battery-dead,md-battery-dead,ios-battery-full,md-battery-full,ios-beaker,ios-beaker-outline,md-beaker,ios-beer,ios-beer-outline,md-beer,ios-bicycle,md-bicycle,logo-bitcoin,ios-bluetooth,md-bluetooth,ios-boat,ios-boat-outline,md-boat,ios-body,ios-body-outline,md-body,ios-bonfire,ios-bonfire-outline,md-bonfire,ios-book,ios-book-outline,md-book,ios-bookmark,ios-bookmark-outline,md-bookmark,ios-bookmarks,ios-bookmarks-outline,md-bookmarks,ios-bowtie,ios-bowtie-outline,md-bowtie,ios-briefcase,ios-briefcase-outline,md-briefcase,ios-browsers,ios-browsers-outline,md-browsers,ios-brush,ios-brush-outline,md-brush,logo-buffer,ios-bug,ios-bug-outline,md-bug,ios-build,ios-build-outline,md-build,ios-bulb,ios-bulb-outline,md-bulb,ios-bus,ios-bus-outline,md-bus,ios-cafe,ios-cafe-outline,md-cafe,ios-calculator,ios-calculator-outline,md-calculator,ios-calendar,ios-calendar-outline,md-calendar,ios-call,ios-call-outline,md-call,ios-camera,ios-camera-outline,md-camera,ios-car,ios-car-outline,md-car,ios-card,ios-card-outline,md-card,ios-cart,ios-cart-outline,md-cart,ios-cash,ios-cash-outline,md-cash,ios-chatboxes,ios-chatboxes-outline,md-chatboxes,ios-chatbubbles,ios-chatbubbles-outline,md-chatbubbles,ios-checkbox,ios-checkbox-outline,md-checkbox,md-checkbox-outline,ios-checkmark,md-checkmark,ios-checkmark-circle,ios-checkmark-circle-outline,md-checkmark-circle,md-checkmark-circle-outline,logo-chrome,ios-clipboard,ios-clipboard-outline,md-clipboard,ios-clock,ios-clock-outline,md-clock,ios-close,md-close,ios-close-circle,ios-close-circle-outline,md-close-circle,ios-closed-captioning,ios-closed-captioning-outline,md-closed-captioning,ios-cloud,ios-cloud-outline,md-cloud,ios-cloud-circle,ios-cloud-circle-outline,md-cloud-circle,ios-cloud-done,ios-cloud-done-outline,md-cloud-done,ios-cloud-download,ios-cloud-download-outline,md-cloud-download,md-cloud-outline,ios-cloud-upload,ios-cloud-upload-outline,md-cloud-upload,ios-cloudy,ios-cloudy-outline,md-cloudy,ios-cloudy-night,ios-cloudy-night-outline,md-cloudy-night,ios-code,md-code,ios-code-download,md-code-download,ios-code-working,md-code-working,logo-codepen,ios-cog,ios-cog-outline,md-cog,ios-color-fill,ios-color-fill-outline,md-color-fill,ios-color-filter,ios-color-filter-outline,md-color-filter,ios-color-palette,ios-color-palette-outline,md-color-palette,ios-color-wand,ios-color-wand-outline,md-color-wand,ios-compass,ios-compass-outline,md-compass,ios-construct,ios-construct-outline,md-construct,ios-contact,ios-contact-outline,md-contact,ios-contacts,ios-contacts-outline,md-contacts,ios-contract,md-contract,ios-contrast,md-contrast,ios-copy,ios-copy-outline,md-copy,ios-create,ios-create-outline,md-create,ios-crop,ios-crop-outline,md-crop,logo-css3,ios-cube,ios-cube-outline,md-cube,ios-cut,ios-cut-outline,md-cut,logo-designernews,ios-desktop,ios-desktop-outline,md-desktop,ios-disc,ios-disc-outline,md-disc,ios-document,ios-document-outline,md-document,ios-done-all,md-done-all,ios-download,ios-download-outline,md-download,logo-dribbble,logo-dropbox,ios-easel,ios-easel-outline,md-easel,ios-egg,ios-egg-outline,md-egg,logo-euro,ios-exit,ios-exit-outline,md-exit,ios-expand,md-expand,ios-eye,ios-eye-outline,md-eye,ios-eye-off,ios-eye-off-outline,md-eye-off,logo-facebook,ios-fastforward,ios-fastforward-outline,md-fastforward,ios-female,md-female,ios-filing,ios-filing-outline,md-filing,ios-film,ios-film-outline,md-film,ios-finger-print,md-finger-print,ios-flag,ios-flag-outline,md-flag,ios-flame,ios-flame-outline,md-flame,ios-flash,ios-flash-outline,md-flash,ios-flask,ios-flask-outline,md-flask,ios-flower,ios-flower-outline,md-flower,ios-folder,ios-folder-outline,md-folder,ios-folder-open,ios-folder-open-outline,md-folder-open,ios-football,ios-football-outline,md-football,logo-foursquare,logo-freebsd-devil,ios-funnel,ios-funnel-outline,md-funnel,ios-game-controller-a,ios-game-controller-a-outline,md-game-controller-a,ios-game-controller-b,ios-game-controller-b-outline,md-game-controller-b,ios-git-branch,md-git-branch,ios-git-commit,md-git-commit,ios-git-compare,md-git-compare,ios-git-merge,md-git-merge,ios-git-network,md-git-network,ios-git-pull-request,md-git-pull-request,logo-github,ios-glasses,ios-glasses-outline,md-glasses,ios-globe,ios-globe-outline,md-globe,logo-google,logo-googleplus,ios-grid,ios-grid-outline,md-grid,logo-hackernews,ios-hammer,ios-hammer-outline,md-hammer,ios-hand,ios-hand-outline,md-hand,ios-happy,ios-happy-outline,md-happy,ios-headset,ios-headset-outline,md-headset,ios-heart,ios-heart-outline,md-heart,md-heart-outline,ios-help,md-help,ios-help-buoy,ios-help-buoy-outline,md-help-buoy,ios-help-circle,ios-help-circle-outline,md-help-circle,ios-home,ios-home-outline,md-home,logo-html5,ios-ice-cream,ios-ice-cream-outline,md-ice-cream,ios-image,ios-image-outline,md-image,ios-images,ios-images-outline,md-images,ios-infinite,ios-infinite-outline,md-infinite,ios-information,md-information,ios-information-circle,ios-information-circle-outline,md-information-circle,logo-instagram,ios-ionic,ios-ionic-outline,md-ionic,ios-ionitron,ios-ionitron-outline,md-ionitron,logo-javascript,ios-jet,ios-jet-outline,md-jet,ios-key,ios-key-outline,md-key,ios-keypad,ios-keypad-outline,md-keypad,ios-laptop,md-laptop,ios-leaf,ios-leaf-outline,md-leaf,ios-link,ios-link-outline,md-link,logo-linkedin,ios-list,md-list,ios-list-box,ios-list-box-outline,md-list-box,ios-locate,ios-locate-outline,md-locate,ios-lock,ios-lock-outline,md-lock,ios-log-in,md-log-in,ios-log-out,md-log-out,ios-magnet,ios-magnet-outline,md-magnet,ios-mail,ios-mail-outline,md-mail,ios-mail-open,ios-mail-open-outline,md-mail-open,ios-male,md-male,ios-man,ios-man-outline,md-man,ios-map,ios-map-outline,md-map,logo-markdown,ios-medal,ios-medal-outline,md-medal,ios-medical,ios-medical-outline,md-medical,ios-medkit,ios-medkit-outline,md-medkit,ios-megaphone,ios-megaphone-outline,md-megaphone,ios-menu,ios-menu-outline,md-menu,ios-mic,ios-mic-outline,md-mic,ios-mic-off,ios-mic-off-outline,md-mic-off,ios-microphone,ios-microphone-outline,md-microphone,ios-moon,ios-moon-outline,md-moon,ios-more,ios-more-outline,md-more,ios-move,md-move,ios-musical-note,ios-musical-note-outline,md-musical-note,ios-musical-notes,ios-musical-notes-outline,md-musical-notes,ios-navigate,ios-navigate-outline,md-navigate,ios-no-smoking,ios-no-smoking-outline,md-no-smoking,logo-nodejs,ios-notifications,ios-notifications-outline,md-notifications,ios-notifications-off,ios-notifications-off-outline,md-notifications-off,md-notifications-outline,ios-nuclear,ios-nuclear-outline,md-nuclear,ios-nutrition,ios-nutrition-outline,md-nutrition,logo-octocat,ios-open,ios-open-outline,md-open,ios-options,ios-options-outline,md-options,ios-outlet,ios-outlet-outline,md-outlet,ios-paper,ios-paper-outline,md-paper,ios-paper-plane,ios-paper-plane-outline,md-paper-plane,ios-partly-sunny,ios-partly-sunny-outline,md-partly-sunny,ios-pause,ios-pause-outline,md-pause,ios-paw,ios-paw-outline,md-paw,ios-people,ios-people-outline,md-people,ios-person,ios-person-outline,md-person,ios-person-add,ios-person-add-outline,md-person-add,ios-phone-landscape,md-phone-landscape,ios-phone-portrait,md-phone-portrait,ios-photos,ios-photos-outline,md-photos,ios-pie,ios-pie-outline,md-pie,ios-pin,ios-pin-outline,md-pin,ios-pint,ios-pint-outline,md-pint,logo-pinterest,ios-pizza,ios-pizza-outline,md-pizza,ios-plane,ios-plane-outline,md-plane,ios-planet,ios-planet-outline,md-planet,ios-play,ios-play-outline,md-play,logo-playstation,ios-podium,ios-podium-outline,md-podium,ios-power,ios-power-outline,md-power,ios-pricetag,ios-pricetag-outline,md-pricetag,ios-pricetags,ios-pricetags-outline,md-pricetags,ios-print,ios-print-outline,md-print,ios-pulse,ios-pulse-outline,md-pulse,logo-python,ios-qr-scanner,md-qr-scanner,ios-quote,ios-quote-outline,md-quote,ios-radio,ios-radio-outline,md-radio,ios-radio-button-off,md-radio-button-off,ios-radio-button-on,md-radio-button-on,ios-rainy,ios-rainy-outline,md-rainy,ios-recording,ios-recording-outline,md-recording,logo-reddit,ios-redo,ios-redo-outline,md-redo,ios-refresh,md-refresh,ios-refresh-circle,ios-refresh-circle-outline,md-refresh-circle,ios-remove,md-remove,ios-remove-circle,ios-remove-circle-outline,md-remove-circle,ios-reorder,md-reorder,ios-repeat,md-repeat,ios-resize,md-resize,ios-restaurant,ios-restaurant-outline,md-restaurant,ios-return-left,md-return-left,ios-return-right,md-return-right,ios-reverse-camera,ios-reverse-camera-outline,md-reverse-camera,ios-rewind,ios-rewind-outline,md-rewind,ios-ribbon,ios-ribbon-outline,md-ribbon,ios-rose,ios-rose-outline,md-rose,logo-rss,ios-sad,ios-sad-outline,md-sad,logo-sass,ios-school,ios-school-outline,md-school,ios-search,ios-search-outline,md-search,ios-send,ios-send-outline,md-send,ios-settings,ios-settings-outline,md-settings,ios-share,ios-share-outline,md-share,ios-share-alt,ios-share-alt-outline,md-share-alt,ios-shirt,ios-shirt-outline,md-shirt,ios-shuffle,md-shuffle,ios-skip-backward,ios-skip-backward-outline,md-skip-backward,ios-skip-forward,ios-skip-forward-outline,md-skip-forward,logo-skype,logo-snapchat,ios-snow,ios-snow-outline,md-snow,ios-speedometer,ios-speedometer-outline,md-speedometer,ios-square,ios-square-outline,md-square,md-square-outline,ios-star,ios-star-outline,md-star,ios-star-half,md-star-half,md-star-outline,ios-stats,ios-stats-outline,md-stats,logo-steam,ios-stopwatch,ios-stopwatch-outline,md-stopwatch,ios-subway,ios-subway-outline,md-subway,ios-sunny,ios-sunny-outline,md-sunny,ios-swap,md-swap,ios-switch,ios-switch-outline,md-switch,ios-sync,md-sync,ios-tablet-landscape,md-tablet-landscape,ios-tablet-portrait,md-tablet-portrait,ios-tennisball,ios-tennisball-outline,md-tennisball,ios-text,ios-text-outline,md-text,ios-thermometer,ios-thermometer-outline,md-thermometer,ios-thumbs-down,ios-thumbs-down-outline,md-thumbs-down,ios-thumbs-up,ios-thumbs-up-outline,md-thumbs-up,ios-thunderstorm,ios-thunderstorm-outline,md-thunderstorm,ios-time,ios-time-outline,md-time,ios-timer,ios-timer-outline,md-timer,ios-train,ios-train-outline,md-train,ios-transgender,md-transgender,ios-trash,ios-trash-outline,md-trash,ios-trending-down,md-trending-down,ios-trending-up,md-trending-up,ios-trophy,ios-trophy-outline,md-trophy,logo-tumblr,logo-tux,logo-twitch,logo-twitter,ios-umbrella,ios-umbrella-outline,md-umbrella,ios-undo,ios-undo-outline,md-undo,ios-unlock,ios-unlock-outline,md-unlock,logo-usd,ios-videocam,ios-videocam-outline,md-videocam,logo-vimeo,ios-volume-down,md-volume-down,ios-volume-mute,md-volume-mute,ios-volume-off,md-volume-off,ios-volume-up,md-volume-up,ios-walk,md-walk,ios-warning,ios-warning-outline,md-warning,ios-watch,md-watch,ios-water,ios-water-outline,md-water,logo-whatsapp,ios-wifi,ios-wifi-outline,md-wifi,logo-windows,ios-wine,ios-wine-outline,md-wine,ios-woman,ios-woman-outline,md-woman,logo-wordpress,logo-xbox,logo-yahoo,logo-yen,logo-youtube,ios-loading'
}
},
type
(){
if
(
this
.
curModel
&&
this
.
curModel
!=
''
){
return
this
.
curModel
}
else
{
return
"md-add"
computed
:
{
iconList
()
{
return
this
.
icons
.
split
(
','
)
},
type
()
{
if
(
this
.
curModel
&&
this
.
curModel
!=
''
)
{
return
this
.
curModel
}
else
{
return
"md-add"
}
}
}
},
methods
:
{
setIcon
(
name
)
{
this
.
curModel
=
name
;
this
.
iconModal
=
false
;
this
.
$emit
(
'on-change'
,
name
)
},
change
(
name
){
this
.
$emit
(
'on-change'
,
name
)
}
},
watch
:{
value
:
{
handler
(
v
,
o
)
{
this
.
curModel
=
v
},
deep
:
true
methods
:
{
setIcon
(
name
)
{
this
.
curModel
=
name
;
this
.
iconModal
=
false
;
this
.
$emit
(
'on-change'
,
name
)
},
change
(
name
)
{
this
.
$emit
(
'on-change'
,
name
)
},
clearIcon
()
{
this
.
curModel
=
''
;
this
.
$emit
(
'on-change'
,
''
)
}
},
watch
:
{
value
:
{
handler
(
v
,
o
)
{
this
.
curModel
=
v
},
deep
:
true
}
}
}
}
</
script
>
<
style
lang=
"less"
>
#icons{
#icons
{
max-height: 500px;
overflow: auto;
a{
a {
display: inline-block;
width: 40px;
height: 40px;
border: 1px solid transparent;
border: 1px solid transparent;
}
a:hover,.checked{
a:hover,
.checked {
border: 1px solid #999;
}
}
</
style
>
\ No newline at end of file
</
style
>
i18n/locale/zh-CN.js
View file @
50175133
...
...
@@ -1177,6 +1177,8 @@ export default {
requestUrl
:
'服务地址'
,
requestParam
:
'参数'
,
exception
:
'异常详细信息'
,
remark
:
'备注'
},
user_message_config
:
{
creationTime
:
'创建时间'
,
...
...
layouts/basic-layout/header-i18n/index.vue
View file @
50175133
<
template
>
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min"
>
<Dropdown
:trigger=
"isMobile ? 'click' : 'hover'"
class=
"i-layout-header-i18n"
:class=
"
{ 'i-layout-header-user-mobile': isMobile }" @on-click="handleClick">
<Icon
type=
"md-globe"
/>
<DropdownMenu
slot=
"list"
>
<DropdownItem
v-for=
"(item, key) in languages"
:key=
"key"
:name=
"key"
:selected=
"locale === key"
>
<span>
{{
item
.
language
}}
</span>
</DropdownItem>
</DropdownMenu>
</Dropdown>
</span>
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min"
>
<Dropdown
transfer
:trigger=
"isMobile ? 'click' : 'hover'"
class=
"i-layout-header-i18n"
:class=
"
{ 'i-layout-header-user-mobile': isMobile }" @on-click="handleClick">
<Icon
type=
"md-globe"
/>
<DropdownMenu
slot=
"list"
>
<DropdownItem
v-for=
"(item, key) in languages"
:key=
"key"
:name=
"key"
:selected=
"locale === key"
>
<span>
{{
item
.
language
}}
</span>
</DropdownItem>
</DropdownMenu>
</Dropdown>
</span>
</
template
>
<
script
>
import
Languages
from
'@/i18n/locale'
;
import
{
mapState
,
mapActions
}
from
'vuex'
;
import
Languages
from
'@/i18n/locale'
;
import
{
mapState
,
mapActions
}
from
'vuex'
;
export
default
{
name
:
'iHeaderI18n'
,
data
()
{
return
{
languages
:
Languages
}
},
computed
:
{
...
mapState
(
'admin/i18n'
,
[
'locale'
]),
...
mapState
(
'admin/layout'
,
[
'isMobile'
])
},
methods
:
{
...
mapActions
(
'admin/i18n'
,
[
'setLocale'
]),
handleClick
(
locale
)
{
if
(
locale
===
this
.
locale
)
return
;
this
.
setLocale
({
locale
,
vm
:
this
});
}
export
default
{
name
:
'iHeaderI18n'
,
data
()
{
return
{
languages
:
Languages
}
},
computed
:
{
...
mapState
(
'admin/i18n'
,
[
'locale'
]),
...
mapState
(
'admin/layout'
,
[
'isMobile'
])
},
methods
:
{
...
mapActions
(
'admin/i18n'
,
[
'setLocale'
]),
handleClick
(
locale
)
{
if
(
locale
===
this
.
locale
)
return
;
this
.
setLocale
({
locale
,
vm
:
this
});
}
}
}
</
script
>
layouts/basic-layout/header-user/index.vue
View file @
50175133
<
template
>
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min"
>
<Dropdown
:trigger=
"isMobile ? 'click' : 'hover'"
class=
"i-layout-header-user"
:class=
"
{ 'i-layout-header-user-mobile': isMobile }"
@on-click="handleClick"
>
<Avatar
size=
"small"
:src=
"info.avatar"
v-if=
"info.avatar"
/>
<Avatar
size=
"small"
style=
"background-color: #87d068"
icon=
"ios-person"
v-else-if=
"!info.avatar"
/>
<span
class=
"i-layout-header-user-name"
v-if=
"!isMobile"
>
{{
info
.
name
}}
</span>
<DropdownMenu
slot=
"list"
>
<i-link
to=
"/basicData/userManagent/userInfo"
>
<DropdownItem>
<Icon
type=
"ios-contact-outline"
/>
<span>
{{
$t
(
'basicLayout.user.center'
)
}}
</span>
</DropdownItem>
</i-link>
<!--
<i-link
to=
"/setting/account"
>
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min"
>
<Dropdown
transfer
:trigger=
"isMobile ? 'click' : 'hover'"
class=
"i-layout-header-user"
:class=
"
{ 'i-layout-header-user-mobile': isMobile }" @on-click="handleClick">
<Avatar
size=
"small"
:src=
"info.avatar"
v-if=
"info.avatar"
/>
<Avatar
size=
"small"
style=
"background-color: #87d068"
icon=
"ios-person"
v-else-if=
"!info.avatar"
/>
<span
class=
"i-layout-header-user-name"
v-if=
"!isMobile"
>
{{
info
.
name
}}
</span>
<DropdownMenu
slot=
"list"
>
<i-link
to=
"/basicData/userManagent/userInfo"
>
<DropdownItem>
<Icon
type=
"ios-contact-outline"
/>
<span>
{{
$t
(
'basicLayout.user.center'
)
}}
</span>
</DropdownItem>
</i-link>
<!--
<i-link
to=
"/setting/account"
>
<DropdownItem>
<Icon
type=
"ios-settings-outline"
/>
<span>
{{
$t
(
'basicLayout.user.setting'
)
}}
</span>
</DropdownItem>
</i-link>
-->
<DropdownItem
divided
name=
"logout"
>
<Icon
type=
"ios-log-out"
/>
<span>
{{
$t
(
'basicLayout.user.logOut'
)
}}
</span>
</DropdownItem>
</DropdownMenu>
<DropdownItem
divided
name=
"logout"
>
<Icon
type=
"ios-log-out"
/>
<span>
{{
$t
(
'basicLayout.user.logOut'
)
}}
</span>
</DropdownItem>
</DropdownMenu>
</Dropdown>
</span>
</span>
</
template
>
<
script
>
import
{
mapState
,
mapActions
}
from
"vuex"
;
import
{
mapState
,
mapActions
}
from
"vuex"
;
export
default
{
name
:
"iHeaderUser"
,
computed
:
{
...
mapState
(
"admin/user"
,
[
"info"
]),
...
mapState
(
"admin/layout"
,
[
"isMobile"
,
"logoutConfirm"
])
},
methods
:
{
...
mapActions
(
"admin/account"
,
[
"logout"
]),
handleClick
(
name
)
{
if
(
name
===
"logout"
)
{
this
.
logout
({
confirm
:
this
.
logoutConfirm
,
vm
:
this
});
}
name
:
"iHeaderUser"
,
computed
:
{
...
mapState
(
"admin/user"
,
[
"info"
]),
...
mapState
(
"admin/layout"
,
[
"isMobile"
,
"logoutConfirm"
])
},
methods
:
{
...
mapActions
(
"admin/account"
,
[
"logout"
]),
handleClick
(
name
)
{
if
(
name
===
"logout"
)
{
this
.
logout
({
confirm
:
this
.
logoutConfirm
,
vm
:
this
});
}
}
}
}
};
</
script
>
npm-shrinkwrap.json
View file @
50175133
...
...
@@ -4943,7 +4943,7 @@
"dependencies"
:
{
"commander"
:
{
"version"
:
"2.14.1"
,
"resolved"
:
"http
://r.cnpmjs.org/commander/download/
commander-2.14.1.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao.org/commander/download/commander-2.14.1.tgz?cache=0&sync_timestamp=1595168224685&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2F
commander-2.14.1.tgz"
,
"integrity"
:
"sha1-IjUSPjevjKPGXfRbAm29NXsBuao="
}
}
...
...
@@ -5472,7 +5472,7 @@
},
"crc-32"
:
{
"version"
:
"1.2.0"
,
"resolved"
:
"http
://r.cnpmjs
.org/crc-32/download/crc-32-1.2.0.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/crc-32/download/crc-32-1.2.0.tgz"
,
"integrity"
:
"sha1-yy224puIUI4y2d0OwWk+e0Ghggg="
,
"requires"
:
{
"exit-on-epipe"
:
"~1.0.1"
,
...
...
@@ -7369,7 +7369,7 @@
},
"exit-on-epipe"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"http
://r.cnpmjs
.org/exit-on-epipe/download/exit-on-epipe-1.0.1.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/exit-on-epipe/download/exit-on-epipe-1.0.1.tgz"
,
"integrity"
:
"sha1-C92S6H1ShdJn2qgXHQ6wYVlolpI="
},
"expand-brackets"
:
{
...
...
@@ -8020,7 +8020,7 @@
},
"frac"
:
{
"version"
:
"1.1.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/frac/download/frac-1.1.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/frac/download/frac-1.1.2.tgz"
,
"integrity"
:
"sha1-PXT39keMiKG1AgMG10fcYxPHTQs="
},
"fragment-cache"
:
{
...
...
@@ -15097,7 +15097,7 @@
},
"printj"
:
{
"version"
:
"1.1.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/printj/download/printj-1.1.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/printj/download/printj-1.1.2.tgz"
,
"integrity"
:
"sha1-2Q3rKXWoufYA+zoclOP0xTx4oiI="
},
"private"
:
{
...
...
@@ -20550,7 +20550,7 @@
},
"script-loader"
:
{
"version"
:
"0.7.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/script-loader/download/script-loader-0.7.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/script-loader/download/script-loader-0.7.2.tgz"
,
"integrity"
:
"sha1-IBbbb4byX1z1baOJFdgzeLsWa6c="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -21138,7 +21138,7 @@
},
"ssf"
:
{
"version"
:
"0.10.3"
,
"resolved"
:
"http
://r.cnpmjs
.org/ssf/download/ssf-0.10.3.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/ssf/download/ssf-0.10.3.tgz"
,
"integrity"
:
"sha1-jq4fwpyQpVLnkhII+BiS1vd6yys="
,
"requires"
:
{
"frac"
:
"~1.1.2"
...
...
@@ -23805,7 +23805,7 @@
},
"wmf"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/wmf/download/wmf-1.0.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/wmf/download/wmf-1.0.2.tgz"
,
"integrity"
:
"sha1-fRnWIQcaCMK9xrfmiKnENSmMwto="
},
"word-wrap"
:
{
...
...
@@ -23960,7 +23960,7 @@
},
"xlsx"
:
{
"version"
:
"0.15.6"
,
"resolved"
:
"http
://r.cnpmjs.org/xlsx/download/
xlsx-0.15.6.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao.org/xlsx/download/xlsx-0.15.6.tgz?cache=0&sync_timestamp=1597272342311&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxlsx%2Fdownload%2F
xlsx-0.15.6.tgz"
,
"integrity"
:
"sha1-Rh+EHW2eoag3XizSRr8jrs4IodU="
,
"requires"
:
{
"adler-32"
:
"~1.2.0"
,
...
...
@@ -23975,7 +23975,7 @@
"dependencies"
:
{
"commander"
:
{
"version"
:
"2.17.1"
,
"resolved"
:
"http
://r.cnpmjs.org/commander/download/
commander-2.17.1.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz?cache=0&sync_timestamp=1595168224685&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2F
commander-2.17.1.tgz"
,
"integrity"
:
"sha1-vXerfebelCBc6sxy8XFtKfIKd78="
}
}
...
...
pages/account/login/index.vue
View file @
50175133
...
...
@@ -85,14 +85,14 @@ export default {
}).
then
(
r
=>
{
if
(
r
>
0
)
{
this
.
$Message
.
success
(
"登陆成功!"
);
this
.
initUserInfo
(
r
);
this
.
initUserInfo
(
r
,
tenantcode
);
}
else
{
this
.
$Message
.
error
(
"登陆失败!"
);
}
});
}
},
initUserInfo
(
id
)
{
initUserInfo
(
id
,
tenantCode
)
{
let
parma
=
{
Id
:
id
};
...
...
@@ -106,8 +106,7 @@ export default {
res
.
result
.
avatarUrl
=
fileUrlDown
+
res
.
result
.
avatarUrl
;
}
let
info
=
res
.
result
;
info
.
tenantCode
=
info
.
auth
=
[
"admin"
];
info
.
tenantCode
=
tenantCode
;
info
.
avatar
=
info
.
avatarUrl
;
info
.
userId
=
info
.
id
;
info
.
name
=
info
.
userName
;
...
...
pages/basicData/department/Addrow.vue
View file @
50175133
...
...
@@ -7,7 +7,7 @@
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('departcode')"
>
<FormItem
:label=
"l('departcode')"
prop=
"departcode"
>
<Input
v-model=
"entity.departcode"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
...
...
@@ -20,10 +20,9 @@
</Col>
-->
<Col
:span=
"12"
>
<FormItem
:label=
"l('upMent')"
>
<b>
{{
entity
.
name
}}
</b>
<b>
{{
entity
.
name
}}
</b>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('cityName')"
>
<Cascader
:data=
"citys"
v-model=
"location"
></Cascader>
...
...
@@ -44,7 +43,9 @@
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
<!-- 组织类型 -->
...
...
@@ -63,6 +64,18 @@ export default {
name
:
"Add"
,
// components: { OrganizType },
data
()
{
const
validateCode
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
return
callback
(
new
Error
(
"编号不能为空"
));
}
Api
.
isExist
(
value
).
then
((
r
)
=>
{
if
(
r
.
result
)
{
return
callback
(
new
Error
(
"编号已经存在"
));
}
else
{
callback
();
}
});
};
return
{
// showTree: false, //组织类型
disabled
:
false
,
...
...
@@ -73,33 +86,37 @@ export default {
organization_Id
:
0
,
organization_Type
:
""
,
departcode
:
""
,
name
:
''
,
name
:
""
,
},
property
:
[],
location
:
[],
rules
:
{
title02
:
[
{
required
:
true
,
message
:
"库位名不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"库位名不能为空"
,
trigger
:
"blur"
}
,
],
organizationType
:
[
{
required
:
true
,
message
:
"组织类型不能为空"
,
trigger
:
"blur"
}
]
}
trigger
:
"blur"
,
},
],
departcode
:
[
{
required
:
true
,
message
:
"编码不能为空"
,
trigger
:
"blur"
},
{
validator
:
validateCode
,
trigger
:
"blur"
},
],
},
};
},
props
:
{
val
:
Object
val
:
Object
,
},
created
()
{
// this.entity = {};
},
methods
:
{
handleSubmit
()
{
this
.
$refs
[
"form"
].
validate
(
value
=>
{
this
.
$refs
[
"form"
].
validate
(
(
value
)
=>
{
if
(
value
)
{
let
isProduction
=
0
;
let
property
=
[];
...
...
@@ -120,18 +137,18 @@ export default {
}
let
location
=
this
.
location
;
let
paramsdata
=
{
parentTitle
:
this
.
entity
.
name
,
parentTitle
:
this
.
entity
.
name
,
name
:
this
.
entity
.
title02
,
//部门名称
parent_Id
:
this
.
entity
.
id
,
//上级部门 [id]
code
:
this
.
entity
.
departcode
,
//部门编号
// organization_Id: this.entity.organization_Id, //组织类型 [id]
location
:
location
.
join
(
","
),
//省市县
isProduction
:
isProduction
,
//是否生产班组:1是,0否
property
:
property
.
join
(
","
)
//属性
isProduction
:
isProduction
,
//是否生产班组:1是,0否
property
:
property
.
join
(
","
)
,
//属性
};
Api
.
create
(
paramsdata
)
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功!"
);
...
...
@@ -140,7 +157,7 @@ export default {
this
.
$Message
.
error
(
"保存失败,请联系管理员"
);
}
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败,请联系管理员"
);
});
...
...
@@ -156,7 +173,7 @@ export default {
l
(
key
)
{
key
=
"DipartLocation"
+
"."
+
key
;
return
this
.
$t
(
key
);
}
}
,
},
watch
:
{
val
(
v
)
{
...
...
@@ -164,7 +181,7 @@ export default {
this
.
entity
=
{};
this
.
entity
.
name
=
v
.
name
;
this
.
entity
.
id
=
v
.
id
;
}
}
}
,
}
,
};
</
script
>
\ No newline at end of file
pages/basicData/department/add.vue
View file @
50175133
...
...
@@ -7,7 +7,7 @@
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('departcode')"
>
<FormItem
:label=
"l('departcode')"
prop=
"departcode"
>
<Input
v-model=
"entity.departcode"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
...
...
@@ -39,7 +39,9 @@
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
<!-- 组织类型 -->
...
...
@@ -58,6 +60,18 @@ export default {
name
:
"Add"
,
// components: { OrganizType },
data
()
{
const
validateCode
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
return
callback
(
new
Error
(
"编号不能为空"
));
}
Api
.
isExist
(
value
).
then
((
r
)
=>
{
if
(
r
.
result
)
{
return
callback
(
new
Error
(
"编号已经存在"
));
}
else
{
callback
();
}
});
};
return
{
// showTree: false, //组织类型
disabled
:
false
,
...
...
@@ -67,28 +81,31 @@ export default {
// organizationType: ""
departcode
:
""
,
title02
:
""
,
},
property
:
[],
location
:
[],
rules
:
{
title02
:
[
{
required
:
true
,
message
:
"
库位名不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"
名称不能为空"
,
trigger
:
"blur"
},
],
organizationType
:
[
{
// type: 'array',
required
:
true
,
message
:
"组织类型不能为空"
,
trigger
:
"blur"
}
]
}
trigger
:
"blur"
,
},
],
departcode
:
[
{
required
:
true
,
message
:
"编码不能为空"
,
trigger
:
"blur"
},
{
validator
:
validateCode
,
trigger
:
"blur"
},
],
},
};
},
methods
:
{
handleSubmit
()
{
this
.
$refs
[
"form"
].
validate
(
value
=>
{
this
.
$refs
[
"form"
].
validate
(
(
value
)
=>
{
if
(
value
)
{
let
isProduction
=
0
;
let
property
=
[];
...
...
@@ -109,17 +126,17 @@ export default {
}
let
location
=
this
.
location
;
let
paramsdata
=
{
parentTitle
:
''
,
parentTitle
:
""
,
name
:
this
.
entity
.
title02
,
//部门名称
parent_Id
:
0
,
//上级部门 [id]
code
:
this
.
entity
.
departcode
,
//部门编号
organization_Id
:
this
.
entity
.
organization_Id
,
//组织类型 [id]
location
:
location
.
join
(
","
),
//省市县
isProduction
:
isProduction
,
//是否生产班组:1是,0否
property
:
property
.
join
(
","
)
//属性
property
:
property
.
join
(
","
)
,
//属性
};
Api
.
create
(
paramsdata
)
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功!"
);
...
...
@@ -128,7 +145,7 @@ export default {
this
.
$Message
.
error
(
"保存失败,请联系管理员"
);
}
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败,请联系管理员"
);
});
...
...
@@ -144,7 +161,7 @@ export default {
l
(
key
)
{
key
=
"DipartLocation"
+
"."
+
key
;
return
this
.
$t
(
key
);
}
}
}
,
}
,
};
</
script
>
\ No newline at end of file
pages/basicData/department/api.js
View file @
50175133
...
...
@@ -20,5 +20,8 @@ export default {
departImport
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/departmentimport/import`
,
params
);
},
// 编号是否存在
isExist
(
value
)
{
return
Api
.
post
(
`
${
systemUrl
}
/Department/IsExist`
,
value
);
},
}
\ No newline at end of file
pages/basicData/department/edit.vue
View file @
50175133
...
...
@@ -7,7 +7,7 @@
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('departcode')"
>
<FormItem
:label=
"l('departcode')"
prop=
"code"
>
<Input
v-model=
"entity.code"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
...
...
@@ -72,7 +72,8 @@ export default {
id
:
-
1
},
rules
:
{
name
:
[{
required
:
true
,
message
:
"库位名不能为空"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"blur"
}],
property
:
[
{
required
:
true
,
...
...
pages/basicData/department/index.vue
View file @
50175133
...
...
@@ -353,12 +353,38 @@ export default {
});
list
.
forEach
((
e
)
=>
{
//给导出数据增加数据字典对应的name
tempCol
.
forEach
((
ele
)
=>
{
e
[
ele
.
key
]
=
this
.
$u
.
dirName
(
this
.
$store
.
getters
.
dictionaryByKey
(
ele
.
code
),
e
[
ele
.
key
]
);
tempCol
.
forEach
((
elem
)
=>
{
if
(
e
[
elem
.
key
]
&&
e
[
elem
.
key
]
!=
""
&&
e
[
elem
.
key
]
!=
null
)
{
//如果数据字典项对应的DirName字段存在,通过name查询到对应的code,然后赋值。
let
codeArr
=
[]
let
keyValue
=
e
[
elem
.
key
]
if
(
keyValue
.
length
>
0
&&
(
keyValue
.
indexOf
(
','
)
>
-
1
||
keyValue
.
indexOf
(
','
)
>
-
1
))
{
//如果对应的数据包含多个数据字典项,比如包含“,”或“,”
if
(
keyValue
.
indexOf
(
','
)
>
-
1
)
{
codeArr
=
keyValue
.
split
(
','
)
}
if
(
keyValue
.
indexOf
>
-
1
)
{
codeArr
=
keyValue
.
split
(
','
)
}
}
if
(
codeArr
.
length
<=
1
)
{
//对应的数据包含一个数据字典项
e
[
elem
.
key
]
=
this
.
$u
.
dirName
(
this
.
$store
.
getters
.
dictionaryByKey
(
elem
.
code
),
e
[
elem
.
key
]
);
}
else
{
//对应的数据包含多个数据字典项
let
codeInfo
=
''
codeArr
.
forEach
(
el
=>
{
codeInfo
=
codeInfo
+
this
.
$u
.
dirName
(
this
.
$store
.
getters
.
dictionaryByKey
(
elem
.
code
),
el
)
+
","
;
})
e
[
elem
.
key
]
=
codeInfo
.
substr
(
0
,
codeInfo
.
length
-
1
)
}
}
});
tempCol1
.
forEach
((
ele1
)
=>
{
e
[
ele1
.
key
]
=
this
.
getCityName
(
e
[
ele1
.
key
]);
});
...
...
@@ -399,7 +425,7 @@ export default {
parent_Id
:
ele
.
parent_Id
?
ele
.
parent_Id
:
''
,
//上级部门 [id]
code
:
ele
.
code
?
ele
.
code
:
''
,
//部门编号
location
:
ele
.
location
?
this
.
getCityValue
(
ele
.
location
)
:
''
,
//省市县
isProduction
:
0
,
//是否生产班组:1是,0否
isProduction
:
ele
.
property
.
indexOf
(
'1'
)
>
-
1
&&
ele
.
property
.
indexOf
(
'2'
)
>
-
1
&&
ele
.
property
.
indexOf
(
'3'
)
>
-
1
?
1
:
0
,
//是否生产班组:1是,0否. 属性值为三个值同时选择,则是生产班组
property
:
ele
.
property
?
ele
.
property
:
''
//属性
};
if
(
ele
.
name
&&
ele
.
name
!=
''
)
{
...
...
pages/basicData/user/edit.vue
View file @
50175133
...
...
@@ -72,6 +72,11 @@
<FormItem
:label=
"l('property')"
>
<Checkbox
v-model=
"entity.property"
>
排产资源
</Checkbox>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"用户类型"
>
<Dictionary
code=
"User.base.UserType"
v-model=
"entity.userType"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
...
...
pages/basicData/user/index.vue
View file @
50175133
...
...
@@ -10,14 +10,13 @@
</div>
</Sider>
<Content
class=
"content"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
placeholder=
"请输入姓名/员工编号"
:high=
"true"
:height=
"tdHeight"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
placeholder=
"请输入姓名/员工编号"
exportTitle=
"用户管理"
:high=
"true"
:height=
"tdHeight"
>
<template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"addModal=true"
>
新增
</Button>
<Button
@
click=
"import2Excel"
>
导入
</Button>
<Button
@
click=
"export2Excel"
>
导出
</Button>
<Button
@
click=
"openModalIm"
>
导入
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"addModal"
title=
"新增"
footer-hide
width=
"800"
>
...
...
@@ -76,17 +75,7 @@
<Modal
v-model=
"syncAccountModal"
title=
"同步账户"
@
on-ok=
"syncAccountOk"
@
on-cancel=
"cancel"
>
<p>
确定同步账户?
</p>
</Modal>
<Modal
v-model=
"modalImport"
title=
"导入excel"
fullscreen
hidefooter
>
<Upload
action
:before-upload=
"beforeUpload"
ref=
"uploadfile"
:format=
"formatList"
>
<Button
icon=
"ios-cloud-upload-outline"
>
上传Excel文件
</Button>
</Upload>
<DataGrid
border
:height=
"tdHeightExcel"
:columns=
"columnsImport"
:data=
"excelData"
:tool=
"false"
:page=
"false"
:set=
"false"
></DataGrid>
<div
slot=
"footer"
>
<span
v-if=
"excelData.length>0"
>
共 {{excelData.length}} 条数据
</span>
<Button
@
click=
"cancelExcel"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"importOk"
>
确定导入
</Button>
</div>
</Modal>
<ImportExcel
ref=
"importExcel"
@
on-get-data=
"getData"
:modalTitle=
"temTitle"
:columns=
"columns"
:open=
"ModalIm"
@
on-cancel=
"ModalImCancel"
@
on-ok=
"ok"
/>
</Content>
</Layout>
</template>
...
...
@@ -205,6 +194,7 @@ export default {
align
:
"center"
,
high
:
true
,
code
:
"User.base.gender"
,
import
:
true
,
},
{
key
:
"birthday"
,
...
...
@@ -212,6 +202,7 @@ export default {
align
:
"center"
,
high
:
true
,
type
:
"date"
,
import
:
true
,
},
{
key
:
"degreeId"
,
...
...
@@ -219,6 +210,7 @@ export default {
align
:
"left"
,
high
:
true
,
code
:
"User.base.degree"
,
import
:
true
,
},
{
key
:
"status"
,
...
...
@@ -226,6 +218,7 @@ export default {
align
:
"center"
,
high
:
true
,
code
:
"User.base.status"
,
import
:
true
,
},
{
key
:
"departmentId"
,
...
...
@@ -233,6 +226,7 @@ export default {
align
:
"right"
,
easy
:
true
,
high
:
true
,
import
:
true
,
},
{
key
:
"departmentTitle"
,
...
...
@@ -240,6 +234,7 @@ export default {
align
:
"left"
,
easy
:
true
,
high
:
true
,
import
:
true
,
},
{
...
...
@@ -277,6 +272,7 @@ export default {
title
:
this
.
l
(
"accountId"
),
hide
:
true
,
align
:
"left"
,
import
:
true
,
},
// {
// key: 'userType',
...
...
@@ -290,6 +286,7 @@ export default {
align
:
"left"
,
easy
:
true
,
high
:
true
,
import
:
true
,
},
{
key
:
"email"
,
...
...
@@ -297,12 +294,14 @@ export default {
align
:
"left"
,
easy
:
true
,
high
:
true
,
import
:
true
,
},
{
key
:
"licensedToWork"
,
title
:
this
.
l
(
"licensedToWork"
),
align
:
"left"
,
code
:
"User.base.workLicense"
,
import
:
true
,
},
{
key
:
"positionId"
,
...
...
@@ -310,6 +309,7 @@ export default {
align
:
"left"
,
high
:
true
,
code
:
"User.base.position"
,
import
:
true
,
},
{
key
:
"titleId"
,
...
...
@@ -317,6 +317,7 @@ export default {
align
:
"left"
,
high
:
true
,
code
:
"User.base.jobtitle"
,
import
:
true
,
},
{
key
:
"creatorUserId"
,
...
...
@@ -324,6 +325,8 @@ export default {
align
:
"left"
,
import
:
false
,
hide
:
true
,
import
:
true
,
type
:
'user'
},
{
key
:
"creationTime"
,
...
...
@@ -331,6 +334,7 @@ export default {
align
:
"left"
,
import
:
false
,
hide
:
true
,
import
:
true
,
},
{
key
:
"lastModifierUserId"
,
...
...
@@ -338,6 +342,8 @@ export default {
align
:
"left"
,
import
:
false
,
hide
:
true
,
import
:
true
,
type
:
'user'
},
{
key
:
"lastModificationTime"
,
...
...
@@ -345,6 +351,7 @@ export default {
align
:
"left"
,
import
:
false
,
hide
:
true
,
import
:
true
,
},
{
title
:
"操作"
,
...
...
@@ -419,6 +426,8 @@ export default {
departArr
:
[],
//部门list
columnsImport
:
[],
temTitle
:
'用户管理'
,
ModalIm
:
false
,
//导入导出时使用end
};
},
...
...
@@ -676,287 +685,53 @@ export default {
}
},
//同步账户end
//导出excel
export2Excel
()
{
//当前显示数据
var
where
=
[];
var
conditions
=
this
.
easySearch
;
if
(
conditions
)
{
Object
.
keys
(
conditions
).
forEach
((
u
)
=>
{
let
v
=
conditions
[
u
].
value
;
let
op
=
conditions
[
u
].
op
;
if
(
!
this
.
$u
.
isNull
(
v
))
{
if
(
op
==
"Range"
)
{
let
times
=
[];
v
.
map
((
u
)
=>
{
if
(
!
this
.
$u
.
isNull
(
u
))
{
times
.
push
(
this
.
$u
.
toTime
(
u
));
}
});
v
=
times
.
join
(
","
);
}
else
if
(
op
.
indexOf
(
"In"
)
>
-
1
)
{
v
=
v
.
join
(
","
);
}
if
(
!
this
.
$u
.
isNull
(
v
))
{
where
.
push
({
fieldName
:
u
,
fieldValue
:
v
,
conditionalType
:
op
,
});
}
}
});
}
this
.
searchs
.
pageIndex
=
1
;
this
.
searchs
.
conditions
=
where
;
this
.
searchs
.
pageSize
=
1000
;
this
.
$api
.
post
(
this
.
action
,
this
.
searchs
).
then
((
r
)
=>
{
this
.
list
=
r
.
result
.
items
;
const
tHeader
=
[];
// 设置Excel的表格第一行的标题
const
filterVal
=
[];
//list里对象的属性
var
tempCol
=
[];
var
columnsCur
=
this
.
$u
.
clone
(
this
.
columns
);
//导出列标题信息griddata this.$refs.grid.columnsCur
columnsCur
.
forEach
((
el
)
=>
{
if
((
el
.
hide
&&
!
el
.
import
)
||
(
!
el
.
hide
&&
el
.
key
!=
"action"
))
{
if
(
el
.
code
)
{
//tHeader.push(el.key + "DirName");
//filterVal.push(el.key + "DirName");
//tempCol.push({ key: el.key + "DirName", code: el.code }); //临时存放code数据字典的字段及对应的数据字典code
tempCol
.
push
({
key
:
el
.
key
,
code
:
el
.
code
});
//临时存放code数据字典的字段及对应的数据字典code
}
tHeader
.
push
(
this
.
l
(
el
.
key
));
filterVal
.
push
(
el
.
key
);
}
});
this
.
list
.
forEach
((
e
)
=>
{
//给导出数据增加数据字典对应的name
tempCol
.
forEach
((
ele
)
=>
{
e
[
ele
.
key
]
=
this
.
$u
.
dirName
(
this
.
$store
.
getters
.
dictionaryByKey
(
ele
.
code
),
e
[
ele
.
key
]
);
});
});
let
nowDate
=
this
.
$u
.
getNowTime
();
//年月日时分秒yyyyMMddhhmmss
//获取导出数据结束
this
.
$u
.
outExcel
(
"用户管理("
+
nowDate
+
")"
,
tHeader
,
filterVal
,
this
.
list
);
});
},
//导入excel
//打开弹出层
import2Excel
()
{
this
.
modalImport
=
true
;
this
.
excelData
=
[];
this
.
$refs
.
uploadfile
.
clearFiles
();
ApiDepart
.
getpaged
().
then
((
r
)
=>
{
this
.
departArr
=
r
.
result
.
items
;
});
//导入功能
openModalIm
()
{
this
.
ModalIm
=
true
},
//导入excel文件
async
beforeUpload
(
file
)
{
this
.
excelData
=
[];
this
.
$refs
.
uploadfile
.
clearFiles
();
//清除上一次上传文件列表
var
tempColums
=
this
.
$u
.
clone
(
this
.
columnsImport
);
const
workbook
=
await
this
.
$u
.
readXLSX
(
file
);
const
sheet2JSONOpts
=
{
defval
:
""
,
//给defval赋值为空的字符串
};
var
csv
=
XLSX
.
utils
.
sheet_to_csv
(
workbook
.
Sheets
[
workbook
.
SheetNames
[
0
]],
sheet2JSONOpts
);
var
lines
=
csv
.
split
(
"
\n
"
);
//第一行标题
var
headers
=
lines
[
0
].
split
(
","
);
var
arrTi
=
[];
//转换到colum后的list表头start
headers
.
forEach
((
elHead
)
=>
{
tempColums
.
forEach
((
elCol
)
=>
{
if
(
elHead
==
elCol
.
title
)
{
//elHead=elCol.key
arrTi
.
push
(
elCol
.
key
);
}
});
});
headers
=
arrTi
;
//转换到colum后的list表头end
var
result
=
[];
for
(
var
i
=
1
;
i
<
lines
.
length
-
1
;
i
++
)
{
var
obj
=
{};
var
currentline
=
lines
[
i
].
split
(
","
);
for
(
var
j
=
0
;
j
<
headers
.
length
;
j
++
)
{
obj
[
headers
[
j
]]
=
currentline
[
j
];
}
result
.
push
(
obj
);
}
//对读取的excel文件数据进行处理
var
arrTitleUse
=
[];
//使用数据字典的字段
tempColums
.
forEach
((
elCode
)
=>
{
if
(
elCode
.
code
)
{
arrTitleUse
.
push
({
key
:
elCode
.
key
,
code
:
elCode
.
code
});
}
});
result
.
forEach
((
ele
)
=>
{
//如果导入文件没有departmentid,但存在departmentTitle的话,通过title获取id
if
(
ele
.
departmentTitle
&&
ele
.
departmentTitle
!=
""
&&
(
!
ele
.
departmentId
||
ele
.
departmentId
==
""
)
)
{
this
.
departArr
.
forEach
((
e
)
=>
{
if
(
ele
.
departmentTitle
&&
ele
.
departmentTitle
==
e
.
name
)
{
ele
.
departmentId
=
e
.
id
;
}
});
}
else
if
(
//如果导入文件没有departmentTitle,但存在departmentid的话,通过id获取departmentTitle
ele
.
departmentId
&&
ele
.
departmentId
+
""
!=
""
&&
(
!
ele
.
departmentTitle
||
ele
.
departmentTitle
==
""
)
)
{
this
.
departArr
.
forEach
((
e
)
=>
{
if
(
ele
.
departmentId
&&
ele
.
departmentId
==
e
.
id
)
{
ele
.
departmentTitle
=
e
.
name
;
}
});
}
//对列表里的数据字典项进行处理
arrTitleUse
.
forEach
((
elem
)
=>
{
if
(
ele
[
elem
.
key
]
&&
ele
[
elem
.
key
]
!=
""
&&
ele
[
elem
.
key
]
!=
null
)
{
//如果数据字典项对应的DirName字段存在,通过name查询到对应的code,然后赋值
ele
[
elem
.
key
]
=
this
.
$u
.
dirCode
(
this
.
$store
.
getters
.
dictionaryByKey
(
elem
.
code
),
ele
[
elem
.
key
]
);
}
});
});
this
.
excelData
=
result
;
//console.log(workbook);
return
false
;
ModalImCancel
()
{
this
.
ModalIm
=
false
},
ok
()
{
this
.
$refs
.
grid
.
load
();
},
getData
(
val
)
{
let
url
=
`
${
systemUrl
}
/userimportservice/import`
;
this
.
$refs
.
importExcel
.
deelData
(
url
,
this
.
columns
,
this
.
formatMethod
(
val
))
},
//
确定批量导入
importOk
(
)
{
let
tempData
=
this
.
$u
.
clone
(
this
.
excelData
);
//
根据页面二次处理数据
formatMethod
(
val
)
{
let
tempData
=
this
.
$u
.
clone
(
val
);
let
tempList
=
[];
tempData
.
forEach
((
ele
)
=>
{
let
obj
=
{
userName
:
ele
.
userName
,
cardNo
:
ele
.
cardNo
,
gender
:
ele
.
gender
,
birthday
:
ele
.
birthday
,
degreeId
:
ele
.
degreeId
,
departmentId
:
ele
.
departmentId
,
status
:
ele
.
status
,
phone
:
ele
.
phone
,
email
:
ele
.
email
,
licensedToWork
:
ele
.
licensedToWork
,
positionId
:
ele
.
positionId
,
titleId
:
ele
.
titleId
,
departmentTitle
:
ele
.
departmentTitle
,
userName
:
ele
.
userName
?
ele
.
userName
:
''
,
cardNo
:
ele
.
cardNo
?
ele
.
cardNo
:
''
,
//用户编号
gender
:
ele
.
gender
?
ele
.
gender
:
''
,
//性别
birthday
:
ele
.
birthday
?
ele
.
birthday
:
''
,
degreeId
:
ele
.
degreeId
?
ele
.
degreeId
:
''
,
departmentId
:
ele
.
departmentId
?
ele
.
departmentId
:
null
,
status
:
ele
.
status
?
ele
.
status
:
null
,
phone
:
ele
.
phone
?
ele
.
phone
:
''
,
email
:
ele
.
email
?
ele
.
email
:
''
,
licensedToWork
:
ele
.
licensedToWork
?
ele
.
licensedToWork
:
null
,
positionId
:
ele
.
positionId
?
ele
.
positionId
:
null
,
titleId
:
ele
.
titleId
?
ele
.
titleId
:
null
,
departmentTitle
:
ele
.
departmentTitle
?
ele
.
departmentTitle
:
''
,
};
tempList
.
push
(
obj
);
});
let
parms
=
{
list
:
tempList
,
};
Api
.
userImport
(
parms
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"批量导入成功!"
);
this
.
$refs
.
grid
.
load
();
this
.
cancelExcel
();
if
(
ele
.
userName
&&
ele
.
userName
!=
''
&&
ele
.
cardNo
&&
ele
.
cardNo
!=
''
&&
ele
.
departmentId
&&
ele
.
departmentId
!=
null
&&
ele
.
phone
&&
ele
.
phone
!=
''
)
{
obj
.
ico
=
false
}
else
{
this
.
$Message
.
error
(
"批量导入失败!"
);
}
});
},
//取消导入excel
cancelExcel
()
{
this
.
modalImport
=
false
;
this
.
excelData
=
[];
this
.
$refs
.
uploadfile
.
clearFiles
();
},
//旧方法,设置dirname,通过取excel第一行的数据定义colums
async
beforeUploadOld
(
file
)
{
this
.
excelData
=
[];
this
.
$refs
.
uploadfile
.
clearFiles
();
//清除上一次上传文件列表
const
workbook
=
await
this
.
$u
.
readXLSX
(
file
);
const
sheet2JSONOpts
=
{
defval
:
""
,
//给defval赋值为空的字符串
};
var
tempList
=
XLSX
.
utils
.
sheet_to_json
(
workbook
.
Sheets
[
workbook
.
SheetNames
[
0
]],
sheet2JSONOpts
);
//对读取的excel文件数据进行处理
var
tempColums
=
this
.
$u
.
clone
(
this
.
columnsImport
);
var
arrTitles
=
Object
.
keys
(
tempList
[
0
]);
//获取列表title
var
arrTitleUse
=
[];
//使用数据字典的字段
tempColums
.
forEach
((
elCode
)
=>
{
if
(
elCode
.
code
)
{
arrTitleUse
.
push
({
key
:
elCode
.
key
,
code
:
elCode
.
code
});
}
});
tempList
.
forEach
((
ele
)
=>
{
//如果导入文件没有departmentid,但存在departmentTitle的话,通过title获取id
if
(
ele
.
departmentTitle
&&
ele
.
departmentTitle
!=
""
&&
(
!
ele
.
departmentId
||
ele
.
departmentId
==
""
)
)
{
this
.
departArr
.
forEach
((
e
)
=>
{
if
(
ele
.
departmentTitle
&&
ele
.
departmentTitle
==
e
.
name
)
{
ele
.
departmentId
=
e
.
id
;
}
});
}
else
if
(
//如果导入文件没有departmentTitle,但存在departmentid的话,通过id获取departmentTitle
ele
.
departmentId
&&
ele
.
departmentId
+
""
!=
""
&&
(
!
ele
.
departmentTitle
||
ele
.
departmentTitle
==
""
)
)
{
this
.
departArr
.
forEach
((
e
)
=>
{
if
(
ele
.
departmentId
&&
ele
.
departmentId
==
e
.
id
)
{
ele
.
departmentTitle
=
e
.
name
;
}
});
obj
.
ico
=
true
}
tempList
.
push
(
obj
);
//对列表里的数据字典项进行处理
arrTitleUse
.
forEach
((
elem
)
=>
{
if
(
ele
[
elem
.
key
]
&&
ele
[
elem
.
key
]
!=
""
&&
ele
[
elem
.
key
]
!=
null
)
{
//如果数据字典项对应的DirName字段存在,通过name查询到对应的code,然后赋值
ele
[
elem
.
key
]
=
this
.
$u
.
dirName
(
this
.
$store
.
getters
.
dictionaryByKey
(
elem
.
code
),
ele
[
elem
.
key
]
);
}
});
});
this
.
excelData
=
tempList
;
console
.
log
(
workbook
);
return
false
;
return
tempList
},
//批量导入end
},
computed
:
{
searchList
()
{
...
...
pages/exception/detail.vue
View file @
50175133
<
template
>
<div
class=
"detail"
>
<Row>
<!--
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<div
class=
"detail"
>
<Row>
<!--
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')"
>
{{
entity
.
creatorUserId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModificationTime')"
>
{{
entity
.
lastModificationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModifierUserId')"
>
{{
entity
.
lastModifierUserId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('isDeleted')"
>
{{
entity
.
isDeleted
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('deletionTime')"
>
{{
entity
.
deletionTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('deleterUserId')"
>
{{
entity
.
deleterUserId
}}
</Filed>
-->
<Filed
:span=
"12"
:name=
"l('timestamp')"
>
{{
entity
.
timestamp
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('level')"
>
{{
entity
.
level
}}
</Filed>
<!--
<Filed
:span=
"12"
:name=
"l('messageTemplate')"
>
{{
entity
.
messageTemplate
}}
</Filed>
-->
<Filed
:span=
"12"
:name=
"l('renderedMessage')"
>
{{
entity
.
renderedMessage
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('clientIpAddress')"
>
{{
entity
.
clientIpAddress
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('loginName')"
>
{{
entity
.
loginName
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('tanentCode')"
>
{{
entity
.
tanentCode
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('host')"
>
{{
entity
.
host
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('status')"
>
{{
entity
.
status
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('requestUrl')"
>
{{
entity
.
requestUrl
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('requestParam')"
>
{{
entity
.
requestParam
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('exception')"
>
{{
entity
.
exception
}}
</Filed>
</Row>
</div>
<Filed
:span=
"12"
:name=
"l('timestamp')"
>
{{
entity
.
timestamp
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('level')"
>
{{
entity
.
level
}}
</Filed>
<!--
<Filed
:span=
"12"
:name=
"l('messageTemplate')"
>
{{
entity
.
messageTemplate
}}
</Filed>
-->
<Filed
:span=
"12"
:name=
"l('renderedMessage')"
>
{{
entity
.
renderedMessage
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('clientIpAddress')"
>
{{
entity
.
clientIpAddress
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('loginName')"
>
{{
entity
.
loginName
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('tanentCode')"
>
{{
entity
.
tanentCode
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('host')"
>
{{
entity
.
host
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('status')"
>
{{
entity
.
status
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('requestUrl')"
>
{{
entity
.
requestUrl
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('requestParam')"
>
{{
entity
.
requestParam
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('exception')"
>
{{
entity
.
exception
}}
</Filed>
</Row>
<Form
class=
"form"
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"error.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
code
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
},
props
:
{
eid
:
Number
},
mounted
()
{
if
(
this
.
eid
)
{
this
.
load
(
this
.
eid
);
}
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
"run_log"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
}
}
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
entity
:
{
exception
:
""
,
properties
:
{},
status
:
0
,
},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
disabled
:
false
,
};
},
props
:
{
eid
:
""
,
},
mounted
()
{
if
(
this
.
eid
)
{
this
.
load
(
this
.
eid
);
}
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
if
(
r
.
result
.
status
==
""
||
r
.
result
.
status
==
null
)
{
r
.
result
.
status
=
0
;
}
this
.
entity
=
r
.
result
;
this
.
$emit
(
"on-load"
);
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"run_log"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
handleSubmit
()
{
this
.
disabled
=
true
;
Api
.
update
({
id
:
this
.
entity
.
id
,
status
:
this
.
entity
.
status
,
remark
:
this
.
entity
.
remark
,
})
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
cosole
.
warn
(
err
);
});
},
},
watch
:
{
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
},
},
};
</
script
>
\ No newline at end of file
pages/exception/index.vue
View file @
50175133
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
exportTitle=
"异常记录"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入关键字登录账号/租户编号"
v-model=
"easySearch.keys.value"
v-width=
"300"
/>
<Input
placeholder=
"请输入关键字登录账号/租户编号"
v-model=
"easySearch.keys.value"
v-width=
"300"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
...
...
@@ -15,7 +24,12 @@
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<DatePicker
type=
"date"
v-model=
"end"
placeholder=
"选择终止日期"
style=
"width: 150px"
></DatePicker>
<DatePicker
type=
"date"
v-model=
"end"
placeholder=
"选择终止日期"
style=
"width: 150px"
></DatePicker>
<Button
type=
"error"
@
click=
"clear"
:disabled=
"dis"
>
清理
</Button>
</
template
>
</DataGrid>
...
...
@@ -24,6 +38,7 @@
</Modal>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
import
Search
from
"./search"
;
...
...
@@ -41,9 +56,12 @@ export default {
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"loginName,tanentCode"
,
value
:
null
},
keys
:
{
op
:
"loginName,tanentCode"
,
value
:
null
,
},
},
end
:
null
,
end
:
null
,
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
...
...
@@ -124,8 +142,16 @@ export default {
hide
:
true
,
high
:
true
,
},
// { key:"status",title:this.l("status") ,align:"left" ,high:true },
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"left"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
{},
params
.
row
.
status
==
1
?
"已解决"
:
"未解决"
);
},
},
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"left"
,
high
:
true
},
{
key
:
"requestParam"
,
title
:
this
.
l
(
"requestParam"
),
...
...
@@ -140,34 +166,48 @@ export default {
width
:
140
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
},
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
// h('op', { attrs: { oprate: 'edit'}, on: { click: () => this.edit(params.row.id) } }, '编辑'),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
},
"删除"
),
]);
return
h
(
"div"
,
{
class
:
"action"
,
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
,
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
),
},
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
// h('op', { attrs: { oprate: 'edit'}, on: { click: () => this.edit(params.row.id) } }, '编辑'),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
,
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
),
},
},
"删除"
),
]
);
},
},
],
};
},
created
()
{
var
date
=
new
Date
().
getTime
()
-
24
*
60
*
60
*
1000
*
5
;
this
.
end
=
new
Date
(
date
);
var
date
=
new
Date
().
getTime
()
-
24
*
60
*
60
*
1000
*
5
;
this
.
end
=
new
Date
(
date
);
console
.
log
(
this
);
},
...
...
@@ -215,21 +255,21 @@ export default {
}
});
},
clear
(){
this
.
$Modal
.
confirm
({
title
:
"确认"
,
content
:
"确认要删除"
+
this
.
$u
.
toDate
(
this
.
end
)
+
"以前的数据吗"
,
onOk
:()
=>
{
Api
.
deleteAll
(
this
.
end
).
then
(
r
=>
{
if
(
r
.
success
){
this
.
$Message
.
success
(
"删除成功"
)
this
.
$refs
.
grid
.
load
();
}
else
{
this
.
$Message
.
error
(
"出现异常"
)
}
})
clear
()
{
this
.
$Modal
.
confirm
({
title
:
"确认"
,
content
:
"确认要删除"
+
this
.
$u
.
toDate
(
this
.
end
)
+
"以前的数据吗"
,
onOk
:
()
=>
{
Api
.
deleteAll
(
this
.
end
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"删除成功"
);
this
.
$refs
.
grid
.
load
();
}
else
{
this
.
$Message
.
error
(
"出现异常"
);
}
})
});
},
});
},
cancel
()
{
this
.
curId
=
0
;
...
...
@@ -237,39 +277,41 @@ export default {
},
l
(
key
)
{
/*
run_log:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
timestamp:'异常发生时间',
level:'日志级别',
messageTemplate:'消息模板',
renderedMessage:'异常信息',
clientIpAddress:'客户端IP',
loginName:'登录账号',
tanentCode:'租户编号',
host:'主机IP',
status:'状态',
requestUrl:'服务地址',
requestParam:'参数',
exception:'异常详细信息',
}
*/
run_log:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
timestamp:'异常发生时间',
level:'日志级别',
messageTemplate:'消息模板',
renderedMessage:'异常信息',
clientIpAddress:'客户端IP',
loginName:'登录账号',
tanentCode:'租户编号',
host:'主机IP',
status:'状态',
requestUrl:'服务地址',
requestParam:'参数',
exception:'异常详细信息',
}
*/
let
vkey
=
"run_log"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
computed
:{
dis
(){
var
num
=
(
new
Date
().
getTime
()
-
this
.
end
.
getTime
())
/
(
1000
*
60
*
60
*
24
);
return
num
<
1
}
}
computed
:
{
dis
()
{
var
num
=
(
new
Date
().
getTime
()
-
this
.
end
.
getTime
())
/
(
1000
*
60
*
60
*
24
);
return
num
<
1
;
},
},
};
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
</
style
>
pages/index.vue
View file @
50175133
...
...
@@ -4,12 +4,4 @@
<h2>
欢迎登陆!
</h2>
</div>
</
template
>
<
script
>
// import iview from './crm/statistical/index.vue'
export
default
{
// components: {
// iview
// }
}
</
script
>
\ No newline at end of file
</
template
>
\ No newline at end of file
pages/system/config/index.vue
View file @
50175133
<
template
>
<div
class=
"config flex"
>
<div
class=
"config flex"
>
<div
class=
"menu"
>
<Menu
theme=
"light"
active-name=
"site
"
>
<MenuItem
name=
"site"
to=
"#
site"
>
站点设置
</MenuItem>
<MenuItem
name=
"bus"
to=
"#
bus"
>
业务设置
</MenuItem>
</Menu>
<Menu
theme=
"light"
active-name=
"site"
@
on-select=
"pageTo
"
>
<MenuItem
name=
"
site"
>
站点设置
</MenuItem>
<MenuItem
name=
"
bus"
>
业务设置
</MenuItem>
</Menu>
</div>
<div
class=
"main fg"
>
<div
class=
"tool tr"
>
<Button
type=
"primary"
size=
"small"
@
click=
"save"
>
保存
</Button>
<Button
type=
"text"
>
恢复默认
</Button>
</div>
<Form
ref=
"form"
:model=
"config"
:rules=
"rules"
:label-width=
"120"
>
<div
id=
"site"
>
<h3>
站点设置
</h3>
<FormItem
label=
"默认语言"
prop=
"site.language"
>
<Input
v-model=
"config.site.language"
></Input>
</FormItem>
<FormItem
label=
"默认密码"
prop=
"site.password"
>
<Input
v-model=
"config.site.password"
></Input>
</FormItem>
<FormItem
label=
"密码规则"
prop=
"site.password"
>
<RadioGroup
v-model=
"config.site.passwordRule"
>
<Radio
:label=
"0"
>
简易
</Radio>
<Radio
:label=
"1"
>
中级
<span
class=
"tip"
>
密码长度6位以上
</span></Radio>
<Radio
:label=
"2"
>
高级
<span
class=
"tip"
>
密码需要包含数字字母和特殊字符,长度8位以上
</span>
</Radio>
</RadioGroup>
</FormItem>
<FormItem
label=
"密码安全校验"
>
<i-switch
v-model=
"config.site.loginEditPassword"
/>
<span
class=
"tip"
>
开启后,用户密码安全级别低时,登陆后强制修改密码
</span>
</FormItem>
<FormItem
label=
"验证码"
>
<i-switch
v-model=
"config.site.loginCode"
/>
<span
class=
"tip"
>
开启后用户登陆需要输入验证码
</span>
</FormItem>
<FormItem
label=
"注册邀请码"
>
<Input
v-model=
"config.site.regCode"
></Input>
<span
class=
"tip"
>
1.为空时:不对外开放注册;2.设置为“666”时用户免输入注册邀请码就可以进行注册;3.其它情况,注册时需要输入注册邀请码
</span>
</FormItem>
<FormItem
label=
"登陆有效期"
>
<InputNumber
v-model=
"config.site.loginValidHoure"
:min=
"1"
:max=
"2400"
></InputNumber>
<span
class=
"tip"
>
单位为小时,设置后用户登陆此时长后自动过期
</span>
</FormItem>
<FormItem
label=
"Bug反馈"
>
<i-switch
v-model=
"config.site.bug"
/>
<span
class=
"tip"
>
开启后,用户可以提交bug并管理自己的bug
</span>
</FormItem>
<FormItem
label=
"异常管理"
>
<i-switch
v-model=
"config.site.exception"
/>
<span
class=
"tip"
>
开启后可以查看系统异常
</span>
</FormItem>
<FormItem
label=
"异常消息"
>
<Input
v-model=
"config.site.exceptionMessage"
></Input>
<span
class=
"tip"
>
设置后,接口发生异常,统一返回次内容。为空时返回系统异常
</span>
</FormItem>
<FormItem
label=
"列表显示方式"
>
<RadioGroup
v-model=
"config.site.gridType"
>
<Radio
:label=
"0"
>
表格
</Radio>
<Radio
:label=
"1"
>
卡片
</Radio>
<!--
<Radio
label=
"2"
>
无限下拉
</Radio>
-->
</RadioGroup>
</FormItem>
<FormItem
label=
"默认分页大小"
>
<Select
v-model=
"config.site.pageSize"
>
<Option
:value=
"20"
>
每页20条
</Option>
<Option
:value=
"50"
>
每页50条
</Option>
<Option
:value=
"100"
>
每页100条
</Option>
</Select>
</FormItem>
<FormItem
label=
"弹窗宽度"
>
<InputNumber
v-model=
"config.site.windowWidth"
:min=
"1"
:max=
"2400"
></InputNumber>
<span
class=
"tip"
>
设置弹窗页面宽度
</span>
</FormItem>
<FormItem
label=
"弹窗移动"
>
<i-switch
v-model=
"config.site.windowMove"
/>
<span
class=
"tip"
>
开启后弹框可以进行移动
</span>
</FormItem>
<div
class=
"main fg"
id=
"mainDiv"
>
<div
class=
"tr lt40 fr divTop pr20"
>
<Button
type=
"primary"
size=
"small"
@
click=
"save"
>
保存
</Button>
<Button
type=
"text"
size=
"small"
@
click=
"reset"
>
恢复默认
</Button>
</div>
<div
id=
"bus"
>
<h3>
业务设置
</h3>
<FormItem
label=
"订单开工预警"
>
<InputNumber
v-model=
"config.bus.orderStartWarning"
:min=
"0"
:max=
"2400"
/>
<span
class=
"tip"
>
单位为小时,为0时不预警;大于0进行预警
</span>
</FormItem>
<FormItem
label=
"订单完工预警"
>
<InputNumber
v-model=
"config.bus.orderFinishWarning"
:min=
"0"
:max=
"2400"
/>
<span
class=
"tip"
>
单位为小时,为0时不预警;大于0进行预警
</span>
</FormItem>
<FormItem
label=
"工单开工预警"
>
<InputNumber
v-model=
"config.bus.excuteStartWarning"
:min=
"0"
:max=
"2400"
/>
<span
class=
"tip"
>
单位为小时,为0时不预警;大于0进行预警
</span>
</FormItem>
<FormItem
label=
"工单完工预警"
>
<InputNumber
v-model=
"config.bus.excuteEndWarning"
:min=
"0"
:max=
"2400"
/>
<span
class=
"tip"
>
单位为小时,为0时不预警;大于0进行预警
</span>
</FormItem>
<FormItem
label=
"库存预警"
>
<i-switch
v-model=
"config.site.storeWarning"
/>
</FormItem>
<FormItem
label=
"多工艺"
>
<i-switch
v-model=
"config.bus.multipleHeader"
/>
<span
class=
"tip"
>
开启后,一个生产计划可以设置多本工艺规程
</span>
</FormItem>
<FormItem
label=
"按序执行"
>
<i-switch
v-model=
"config.bus.detailFirst"
/>
<span
class=
"tip"
>
开启后,工单执行必须按照工序次序先后次序执行;关闭后,工单可以不按工序次序执行。
</span>
</FormItem>
<FormItem
label=
"工艺设置预警"
>
<InputNumber
v-model=
"config.bus.setHeaderWarning"
:min=
"0"
:max=
"2400"
/>
<span
class=
"tip"
>
单位为小时,为0时不预警;大于0进行预警
</span>
</FormItem>
<FormItem
label=
"配套完成预警"
>
<InputNumber
v-model=
"config.bus.setHeaderWarning"
:min=
"0"
:max=
"2400"
/>
<span
class=
"tip"
>
单位为小时,为0时不预警;大于0进行预警
</span>
</FormItem>
<FormItem
label=
"转序交接"
>
<i-switch
v-model=
"config.bus.excuteHandover"
/>
<span
class=
"tip"
>
开启后,工单转序必须进行交接
</span>
</FormItem>
<FormItem
label=
"同车间转序交接"
>
<i-switch
v-model=
"config.bus.inenerExcuteHandover"
/>
<span
class=
"tip"
>
开启后,同车间工单转序必须进行交接
</span>
</FormItem>
<FormItem
label=
"配套前置"
>
<i-switch
v-model=
"config.site.suportingFirst"
/>
<span
class=
"tip"
>
开启配套前置后,工单只有完成配套才可以进行开工
</span>
</FormItem>
</div>
</Form>
<Form
ref=
"form"
:model=
"config"
:rules=
"rules"
:label-width=
"120"
>
<div
id=
"site"
class=
"mt50"
>
<h3>
站点设置
</h3>
<FormItem
label=
"默认语言"
prop=
"site.language"
>
<Input
v-model=
"config.site.language"
></Input>
</FormItem>
<FormItem
label=
"默认密码"
prop=
"site.password"
>
<Input
v-model=
"config.site.password"
></Input>
</FormItem>
<FormItem
label=
"密码规则"
prop=
"site.password"
>
<RadioGroup
v-model=
"config.site.passwordRule"
>
<Radio
:label=
"0"
>
简易
</Radio>
<Radio
:label=
"1"
>
中级
<span
class=
"tip"
>
密码长度6位以上
</span></Radio>
<Radio
:label=
"2"
>
高级
<span
class=
"tip"
>
密码需要包含数字字母和特殊字符,长度8位以上
</span>
</Radio>
</RadioGroup>
</FormItem>
<FormItem
label=
"密码安全校验"
>
<i-switch
v-model=
"config.site.loginEditPassword"
/>
<span
class=
"tip"
>
开启后,用户密码安全级别低时,登陆后强制修改密码
</span>
</FormItem>
<FormItem
label=
"验证码"
>
<i-switch
v-model=
"config.site.loginCode"
/>
<span
class=
"tip"
>
开启后用户登陆需要输入验证码
</span>
</FormItem>
<FormItem
label=
"注册邀请码"
>
<Input
v-model=
"config.site.regCode"
></Input>
<span
class=
"tip"
>
1.为空时:不对外开放注册;2.设置为“666”时用户免输入注册邀请码就可以进行注册;3.其它情况,注册时需要输入注册邀请码
</span>
</FormItem>
<FormItem
label=
"登陆有效期"
>
<InputNumber
v-model=
"config.site.loginValidHoure"
:min=
"1"
:max=
"2400"
></InputNumber>
<span
class=
"tip"
>
单位为小时,设置后用户登陆此时长后自动过期
</span>
</FormItem>
<FormItem
label=
"Bug反馈"
>
<i-switch
v-model=
"config.site.bug"
/>
<span
class=
"tip"
>
开启后,用户可以提交bug并管理自己的bug
</span>
</FormItem>
<FormItem
label=
"异常管理"
>
<i-switch
v-model=
"config.site.exception"
/>
<span
class=
"tip"
>
开启后可以查看系统异常
</span>
</FormItem>
<FormItem
label=
"异常消息"
>
<Input
v-model=
"config.site.exceptionMessage"
></Input>
<span
class=
"tip"
>
设置后,接口发生异常,统一返回次内容。为空时返回系统异常
</span>
</FormItem>
<FormItem
label=
"列表显示方式"
>
<RadioGroup
v-model=
"config.site.gridType"
>
<Radio
:label=
"0"
>
表格
</Radio>
<Radio
:label=
"1"
>
卡片
</Radio>
<!--
<Radio
label=
"2"
>
无限下拉
</Radio>
-->
</RadioGroup>
</FormItem>
<FormItem
label=
"默认分页大小"
>
<Select
v-model=
"config.site.pageSize"
>
<Option
:value=
"20"
>
每页20条
</Option>
<Option
:value=
"50"
>
每页50条
</Option>
<Option
:value=
"100"
>
每页100条
</Option>
</Select>
</FormItem>
<FormItem
label=
"弹窗宽度"
>
<InputNumber
v-model=
"config.site.windowWidth"
:min=
"1"
:max=
"2400"
></InputNumber>
<span
class=
"tip"
>
设置弹窗页面宽度
</span>
</FormItem>
<FormItem
label=
"弹窗移动"
>
<i-switch
v-model=
"config.site.windowMove"
/>
<span
class=
"tip"
>
开启后弹框可以进行移动
</span>
</FormItem>
</div>
<div
id=
"bus"
>
<h3>
业务设置
</h3>
<FormItem
label=
"订单开工预警"
>
<InputNumber
v-model=
"config.bus.orderStartWarning"
:min=
"0"
:max=
"2400"
/>
<span
class=
"tip"
>
单位为小时,为0时不预警;大于0进行预警
</span>
</FormItem>
<FormItem
label=
"订单完工预警"
>
<InputNumber
v-model=
"config.bus.orderFinishWarning"
:min=
"0"
:max=
"2400"
/>
<span
class=
"tip"
>
单位为小时,为0时不预警;大于0进行预警
</span>
</FormItem>
<FormItem
label=
"工单开工预警"
>
<InputNumber
v-model=
"config.bus.excuteStartWarning"
:min=
"0"
:max=
"2400"
/>
<span
class=
"tip"
>
单位为小时,为0时不预警;大于0进行预警
</span>
</FormItem>
<FormItem
label=
"工单完工预警"
>
<InputNumber
v-model=
"config.bus.excuteEndWarning"
:min=
"0"
:max=
"2400"
/>
<span
class=
"tip"
>
单位为小时,为0时不预警;大于0进行预警
</span>
</FormItem>
<FormItem
label=
"库存预警"
>
<i-switch
v-model=
"config.site.storeWarning"
/>
</FormItem>
<FormItem
label=
"多工艺"
>
<i-switch
v-model=
"config.bus.multipleHeader"
/>
<span
class=
"tip"
>
开启后,一个生产计划可以设置多本工艺规程
</span>
</FormItem>
<FormItem
label=
"按序执行"
>
<i-switch
v-model=
"config.bus.detailFirst"
/>
<span
class=
"tip"
>
开启后,工单执行必须按照工序次序先后次序执行;关闭后,工单可以不按工序次序执行。
</span>
</FormItem>
<FormItem
label=
"工艺设置预警"
>
<InputNumber
v-model=
"config.bus.setHeaderWarning"
:min=
"0"
:max=
"2400"
/>
<span
class=
"tip"
>
单位为小时,为0时不预警;大于0进行预警
</span>
</FormItem>
<FormItem
label=
"配套完成预警"
>
<InputNumber
v-model=
"config.bus.setHeaderWarning"
:min=
"0"
:max=
"2400"
/>
<span
class=
"tip"
>
单位为小时,为0时不预警;大于0进行预警
</span>
</FormItem>
<FormItem
label=
"转序交接"
>
<i-switch
v-model=
"config.bus.excuteHandover"
/>
<span
class=
"tip"
>
开启后,工单转序必须进行交接
</span>
</FormItem>
<FormItem
label=
"同车间转序交接"
>
<i-switch
v-model=
"config.bus.inenerExcuteHandover"
/>
<span
class=
"tip"
>
开启后,同车间工单转序必须进行交接
</span>
</FormItem>
<FormItem
label=
"配套前置"
>
<i-switch
v-model=
"config.site.suportingFirst"
/>
<span
class=
"tip"
>
开启配套前置后,工单只有完成配套才可以进行开工
</span>
</FormItem>
</div>
</Form>
</div>
</div>
</div>
</
template
>
<
script
>
import
config
from
"~/libs/config"
;
//
import config from "~/libs/config";
export
default
{
name
:
""
,
data
()
{
return
{
config
:
config
,
rules
:
{},
};
},
methods
:
{
save
()
{},
reset
()
{},
},
name
:
""
,
data
()
{
return
{
config
:
this
.
$store
.
state
.
siteConfig
,
rules
:
{},
};
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadSiteConfig'
)
// 加载默认数据
},
mounted
()
{},
methods
:
{
//保存设置
save
()
{
this
.
$store
.
dispatch
(
'saveConfig'
,
this
.
config
)
},
//恢复默认
reset
()
{
this
.
config
=
this
.
$store
.
state
.
defaultConfig
;
//重置为默认设置信息
let
configTemSite
=
this
.
$store
.
state
.
siteConfig
;
//获取组合设置信息
if
(
configTemSite
.
tenantCode
!=
''
)
{
this
.
config
.
tenantCode
=
configTemSite
.
tenantCode
}
},
//menu切换
pageTo
(
val
)
{
var
mainDiv
=
document
.
getElementById
(
'mainDiv'
);
var
site
=
document
.
getElementById
(
'site'
);
if
(
val
==
'site'
)
{
mainDiv
.
scrollTop
=
0
;
}
else
{
mainDiv
.
scrollTop
=
site
.
scrollHeight
;
}
}
},
};
</
script
>
<
style
lang=
"less"
>
.config {
height: 100%;
.menu {
width: 240px;
border-right: 1px solid #ddd;
position: relative;
.ivu-menu{
z-index: 10;
position: absolute;
width: 100%;
top:5px;
}
}
.main {
margin: 0px -10px;
padding: 10px 20px;
h3 {
font-size: 16px;
height: 100%;
.menu {
width: 240px;
border-right: 1px solid #ddd;
position: relative;
.ivu-menu {
z-index: 10;
position: absolute;
width: 100%;
top: 5px;
}
}
.tip{
font-size: 13px;
color: #999;
font-style: italic;
.main {
margin: 0px -10px;
padding: 10px 20px;
h3 {
font-size: 16px;
}
.tip {
font-size: 13px;
color: #999;
font-style: italic;
}
.divTop {
position: fixed;
background: #fff;
height: 40px;
width: calc(~'100% - 560px');
z-index: 100;
border-bottom: 1px #e4e6ed solid;
top: 105px
}
height: calc(100vh - 150px);
overflow-y: auto;
}
height: calc(100vh - 150px);
overflow-y: auto;
}
}
</
style
>
\ No newline at end of file
</
style
>
plugins/request/index.js
View file @
50175133
...
...
@@ -53,7 +53,7 @@ function errorLog (err) {
// 创建一个 axios 实例
const
service
=
axios
.
create
({
baseURL
:
Setting
.
apiBaseURL
,
timeout
:
5
000
,
// 请求超时时间
timeout
:
30
000
,
// 请求超时时间
transformRequest
:[(
data
)
=>
{
function
dateFormat
(
date
,
fmt
)
{
if
(
null
==
date
||
undefined
==
date
)
return
''
;
...
...
src/assets/css/base.css
View file @
50175133
...
...
@@ -8,6 +8,46 @@ html body {
#__layout
{
height
:
100%
;
}
/*flex*/
.flex
{
display
:
flex
;
}
.fc-m
{
justify-content
:
center
;
}
.fa-m
{
align-items
:
center
;
}
.fc-e
{
justify-content
:
flex-end
;
}
.fc-b
{
justify-content
:
space-between
;
}
.fc-a
{
justify-content
:
space-around
;
}
.fc-ev
{
justify-content
:
space-evenly
;
}
.fd
{
flex-direction
:
column
;
}
.fg
{
flex-grow
:
1
;
}
.fs
{
flex-shrink
:
0
;
}
.fg2
{
flex-grow
:
2
;
}
.fos
{
order
:
-1
;
}
.foe
{
order
:
99
;
}
/*字体*/
.ib
{
display
:
inline
;
...
...
@@ -172,6 +212,12 @@ html body {
.pl20
{
padding-left
:
20px
;
}
.pr10
{
padding-right
:
10px
;
}
.pr20
{
padding-right
:
20px
;
}
.bnone
{
border
:
none
;
}
...
...
@@ -475,6 +521,15 @@ i.icon-gengxin {
.tc
{
text-align
:
center
;
}
.lt30
{
line-height
:
30px
;
}
.lt40
{
line-height
:
40px
;
}
.lt50
{
line-height
:
50px
;
}
/*清除浮动*/
.clear
{
clear
:
both
;
...
...
@@ -523,6 +578,7 @@ textarea::-webkit-input-placeholder {
background
:
#fff
;
padding
:
0px
10px
20px
10px
;
margin-top
:
10px
;
overflow
:
auto
;
}
.zh-tree
.zh-title
{
font-size
:
14px
;
...
...
@@ -646,7 +702,7 @@ html [type=button] {
}
.waitTask
{
/*flex 布局*/
display
:
flex
;
display
:
flex
!important
;
align-items
:
center
;
width
:
200px
;
height
:
100px
;
...
...
@@ -892,7 +948,6 @@ html [type=button] {
color
:
#249e91
;
}
.full
.menu
.tree
{
height
:
calc
(
100%
-
150px
);
overflow
:
auto
;
}
.full
.content
{
...
...
@@ -922,3 +977,7 @@ html [type=button] {
.content
{
padding-left
:
5px
;
}
.row_border_bottom
{
border-bottom
:
1px
solid
#E0E0E0
;
padding
:
15px
20px
;
}
static/config.js
View file @
50175133
...
...
@@ -10,6 +10,7 @@ let address=systemApi.dev;
//let address=systemApi.local;
window
.
systemUrl
=
`http://
${
address
}
:10000/system`
;
//System-api 系统管理(基础数据)
// window.systemUrl = `http://localhost:10020/api/services/app`; //System-api 系统管理(基础数据)
window
.
authUrl
=
`http://
${
address
}
:10010`
;
//Authentication-api //统一登陆认证
window
.
UserUrl
=
`http://
${
address
}
:10130`
;
//Authentication-api //用户信息 密码修改。重置等
window
.
designUrl
=
`http://
${
address
}
:10000/process`
;
// 工艺规程
...
...
store/index.js
View file @
50175133
import
createVuexAlong
from
'vuex-along'
import
Api
from
'@/plugins/request'
import
util
from
'@/libs/util'
;
export
const
state
=
()
=>
({
counter
:
0
,
dictionary
:
new
Map
(),
//所有字典项
...
...
@@ -11,6 +12,8 @@ export const state = () => ({
},
siteConfig
:
{},
defaultConfig
:
{},
configId
:
null
,
configSaveStatu
:
0
,
})
export
const
getters
=
{
dictionaryByKey
:
(
state
)
=>
(
key
)
=>
{
...
...
@@ -56,10 +59,16 @@ export const mutations = {
state
.
dictionary
=
dictionary
;
},
setSiteConfig
(
state
,
config
)
{
state
.
siteConfig
=
config
;
state
.
siteConfig
=
JSON
.
parse
(
config
)
;
},
setDefaultConfig
(
state
,
config
)
{
state
.
defaultConfig
=
config
;
state
.
defaultConfig
=
JSON
.
parse
(
config
);
},
setConfigId
(
state
,
id
)
{
state
.
configId
=
id
;
},
setConfigSaveStatu
(
state
,
val
)
{
state
.
configSaveStatu
=
val
;
}
}
...
...
@@ -99,28 +108,56 @@ export const actions = {
})
{
let
params
=
{
pageSize
:
2
,
sortBy
:
"id"
,
conditions
:
[{
"fieldName"
:
"
key
"
,
"fieldValue"
:
"defaultConfig,tenant
-"
+
state
.
userInfo
.
tenantCode
,
"fieldName"
:
"
component
"
,
"fieldValue"
:
"defaultConfig,tenant
Config_"
+
util
.
cookies
.
get
(
'tenantCode'
)
,
"conditionalType"
:
"In"
,
}
,
]
}]
}
let
{
result
}
=
await
Api
.
post
(
`
${
systemUrl
}
/config/list`
,
params
);
if
(
result
[
0
])
{
commit
(
"setDefaultConfig"
,
result
[
0
])
commit
(
"setDefaultConfig"
,
result
[
0
]
.
content
)
}
if
(
result
[
1
])
{
commit
(
"setSiteConfig"
,
result
[
1
])
}
else
{
if
(
result
[
0
]){
commit
(
"setSiteConfig"
,
result
[
0
])
commit
(
"setSiteConfig"
,
result
[
1
].
content
)
commit
(
"setConfigId"
,
result
[
1
].
id
)
}
else
{
if
(
result
[
0
])
{
commit
(
"setSiteConfig"
,
result
[
0
].
content
)
}
}
},
async
saveConfig
({
commit
},
config
){
async
saveConfig
({
state
},
config
)
{
if
(
config
.
tenantCode
!=
''
)
{
let
configStr
=
JSON
.
stringify
(
config
);
let
params
=
{
id
:
state
.
configId
,
page
:
"config"
,
component
:
"tenantConfig_"
+
config
.
tenantCode
,
key
:
config
.
tenantCode
,
content
:
configStr
,
note
:
"配置信息"
}
await
Api
.
post
(
`
${
systemUrl
}
/config/update`
,
params
);
}
else
{
config
.
tenantCode
=
util
.
cookies
.
get
(
'tenantCode'
)
let
configStr
=
JSON
.
stringify
(
config
);
let
params
=
{
page
:
"config"
,
component
:
"tenantConfig_"
+
config
.
tenantCode
,
key
:
config
.
tenantCode
,
content
:
configStr
,
note
:
"配置信息"
}
await
Api
.
post
(
`
${
systemUrl
}
/config/create`
,
params
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment