Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-marketing
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-marketing
Commits
fd250010
提交
fd250010
authored
8月 26, 2021
作者:
pengxiaohui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update: 优化使用手册,设置只读和编辑两种模式;角色管理添加用户错误提示
上级
2f2dce8e
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
91 行增加
和
6 行删除
+91
-6
Index.vue
src/modules/system/views/manual/Index.vue
+16
-4
AccountTable.vue
src/modules/system/views/role/AccountTable.vue
+3
-0
List.vue
src/modules/system/views/user/List.vue
+13
-1
PersonList.vue
src/modules/tools/signIn/views/components/PersonList.vue
+0
-1
util.js
src/utils/util.js
+59
-0
没有找到文件。
src/modules/system/views/manual/Index.vue
浏览文件 @
fd250010
...
...
@@ -2,13 +2,14 @@
<app-card>
<el-tabs
v-model=
"tabsActive"
type=
"card"
>
<el-tab-pane
label=
"使用说明"
name=
"INSTRUCTIONS"
>
<Tinymce
v-if=
"tinymceFlag"
ref=
"editor"
v-model=
"intro_content"
:height=
"600"
/>
<Tinymce
v-if=
"tinymceFlag"
:readonly=
"isReadonly"
ref=
"editor"
v-model=
"intro_content"
:height=
"600"
/>
</el-tab-pane>
<el-tab-pane
label=
"常见问题"
name=
"COMMON_PROBLEM"
>
<Tinymce
v-if=
"tinymceFlag"
ref=
"editor"
v-model=
"ques_content"
:height=
"600"
/>
<Tinymce
v-if=
"tinymceFlag"
:readonly=
"isReadonly"
ref=
"editor"
v-model=
"ques_content"
:height=
"600"
/>
</el-tab-pane>
</el-tabs>
<el-button
type=
"primary"
@
click=
"fetchSubmitManual"
size=
"mini"
style=
"margin-top:20px;"
:disabled=
"btnDisabled"
>
保存
</el-button>
<el-button
class=
"readonly"
type=
"primary"
@
click=
"isReadonly = !isReadonly"
size=
"mini"
>
{{
isReadonly
?
'编 辑'
:
'只 读'
}}
</el-button>
</app-card>
</
template
>
<
script
>
...
...
@@ -22,6 +23,7 @@ export default {
tabsActive
:
'INSTRUCTIONS'
,
intro_content
:
''
,
ques_content
:
''
,
isReadonly
:
true
,
btnDisabled
:
false
,
tinymceFlag
:
false
}
...
...
@@ -68,4 +70,14 @@ export default {
}
}
}
</
script
>
\ No newline at end of file
</
script
>
<
style
scoped
>
.app-card
{
position
:
relative
;
}
.app-card
.readonly
{
position
:
absolute
;
right
:
50px
;
top
:
20px
;
}
</
style
>
\ No newline at end of file
src/modules/system/views/role/AccountTable.vue
浏览文件 @
fd250010
...
...
@@ -62,6 +62,9 @@ export default {
if
(
res
.
code
===
0
&&
res
.
data
&&
res
.
data
.
status
)
{
this
.
$message
.
success
(
'添加用户成功'
)
this
.
$emit
(
'update'
)
}
else
{
this
.
$message
.
error
(
res
.
message
||
'添加用户失败'
)
this
.
$emit
(
'update'
)
}
})
}
...
...
src/modules/system/views/user/List.vue
浏览文件 @
fd250010
...
...
@@ -39,6 +39,7 @@ import AppCard from '@/components/base/AppCard.vue'
import
UserSearch
from
'../components/UserSearch.vue'
// api
import
{
getUserList
,
addUser
,
batchDeleteUser
}
from
'../api'
import
{
dateFormat
}
from
'@/utils/util'
export
default
{
components
:
{
AppCard
,
AppList
,
UserSearch
},
data
()
{
...
...
@@ -70,7 +71,18 @@ export default {
{
prop
:
'sso_user.nickname'
,
label
:
'用户昵称'
,
minWidth
:
'100px'
},
{
prop
:
'sso_user.email'
,
label
:
'邮箱地址'
,
minWidth
:
'160px'
},
{
prop
:
'roles'
,
label
:
'角色'
,
minWidth
:
'120px'
,
slots
:
'table-role'
},
{
prop
:
'updated_at'
,
label
:
'更新时间'
,
minWidth
:
'160px'
}
{
prop
:
'last_login_time'
,
label
:
'最后登录时间'
,
minWidth
:
'160px'
,
computed
({
row
})
{
if
(
row
.
last_login_time
===
0
)
{
return
'-'
}
else
{
return
dateFormat
(
row
.
last_login_time
)
}
}
}
]
}
}
...
...
src/modules/tools/signIn/views/components/PersonList.vue
浏览文件 @
fd250010
...
...
@@ -163,7 +163,6 @@ export default {
}).
catch
(()
=>
{})
},
handleRemarkEdit
(
val
)
{
console
.
log
(
val
)
this
.
remarkDialogVisible
=
true
this
.
form
.
remark
=
val
.
remark
this
.
selectedId
=
val
.
id
...
...
src/utils/util.js
浏览文件 @
fd250010
...
...
@@ -25,4 +25,62 @@ export function splitStrLast(str, split) {
const
fileNameArr
=
str
.
split
(
split
)
const
last
=
fileNameArr
[
fileNameArr
.
length
-
1
]
return
last
}
/**
* 将时间字符串、时间戳转成日期对象
* @param {(object|string|number)} time
* @returns {Date Object}
*/
export
function
formatToDate
(
time
)
{
let
date
if
(
typeof
time
===
'object'
)
{
date
=
time
}
else
{
if
(
typeof
time
===
'string'
)
{
if
(
/^
[
0-9
]
+$/
.
test
(
time
))
{
// support "1548221490638"
time
=
parseInt
(
time
)
}
else
{
// support safari
// https://stackoverflow.com/questions/4310953/invalid-date-in-safari
time
=
time
.
replace
(
new
RegExp
(
/-/gm
),
'/'
)
}
}
if
(
typeof
time
===
'number'
&&
time
.
toString
().
length
===
10
)
{
time
=
time
*
1000
}
date
=
new
Date
(
time
)
}
return
date
}
/**
* 将时间戳转成年月日时分秒
* @param {(Object|string|number)} time
* @param {string} cFormat
* @returns {string | null}
*/
export
function
dateFormat
(
time
,
cFormat
)
{
if
(
arguments
.
length
===
0
||
!
time
)
{
return
null
}
const
format
=
cFormat
||
'{y}-{m}-{d} {h}:{i}:{s}'
const
date
=
formatToDate
(
time
)
const
formatObj
=
{
y
:
date
.
getFullYear
(),
m
:
date
.
getMonth
()
+
1
,
d
:
date
.
getDate
(),
h
:
date
.
getHours
(),
i
:
date
.
getMinutes
(),
s
:
date
.
getSeconds
(),
a
:
date
.
getDay
()
}
const
timeStr
=
format
.
replace
(
/{
([
ymdhisa
])
+}/g
,
(
result
,
key
)
=>
{
const
value
=
formatObj
[
key
]
// Note: getDay() returns 0 on Sunday
if
(
key
===
'a'
)
{
return
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
][
value
]
}
return
value
.
toString
().
padStart
(
2
,
'0'
)
})
return
timeStr
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论