Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
bd20cbe6
Commit
bd20cbe6
authored
Nov 25, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加上传配置
parent
3a386c47
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
489 additions
and
1 deletion
+489
-1
quasar.conf.js
quasar.conf.js
+3
-1
sitecfg.js
src/api/system/sitecfg.js
+25
-0
ali.png
src/assets/images/myimg/ali.png
+0
-0
default.png
src/assets/images/myimg/default.png
+0
-0
tencent.png
src/assets/images/myimg/tencent.png
+0
-0
site-form.vue
src/components/system/site-form.vue
+143
-0
msgmanage.vue
src/pages/system/msgmanage.vue
+146
-0
siteconfig.vue
src/pages/system/siteconfig.vue
+162
-0
routes.js
src/router/routes.js
+10
-0
No files found.
quasar.conf.js
View file @
bd20cbe6
...
...
@@ -49,7 +49,8 @@ module.exports = function(ctx) {
env
:
ctx
.
dev
?
{
//http://192.168.1.27:8300/api
//https://localhost:5001/api
API
:
'http://192.168.1.27:8300/api'
// API: 'http://192.168.1.27:8300/api'
API
:
'http://192.168.1.48:8017/api'
}
:
{
API
:
'https://prod.api.com'
},
...
...
@@ -147,6 +148,7 @@ module.exports = function(ctx) {
'QCheckbox'
,
'QTree'
,
'QOptionGroup'
,
'QRadio'
],
// directives: [],
...
...
src/api/system/sitecfg.js
0 → 100644
View file @
bd20cbe6
import
request
from
'../../utils/request'
/**
* 获取文件站点配置列表
*/
export
function
getSiteConfig
(
data
)
{
return
request
({
url
:
'/Public/GetFileStoreList'
,
method
:
'post'
,
data
});
}
/**
* 文件站点配置新增修改
*/
export
function
setSiteConfig
(
data
)
{
return
request
({
url
:
'/Public/AddOrUpdateFileStore'
,
method
:
'post'
,
data
});
}
src/assets/images/myimg/ali.png
0 → 100644
View file @
bd20cbe6
839 Bytes
src/assets/images/myimg/default.png
0 → 100644
View file @
bd20cbe6
2.77 KB
src/assets/images/myimg/tencent.png
0 → 100644
View file @
bd20cbe6
804 Bytes
src/components/system/site-form.vue
0 → 100644
View file @
bd20cbe6
<
style
>
</
style
>
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
objOption
.
StoreType
==
0
?
'新增存储桶'
:
'修改存储桶'
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
<div
class=
"col-12"
style=
"margin-bottom:10px;"
>
存储位置
<q-radio
v-model=
"objOption.StoreType"
:val=
"1"
label=
"腾讯云COS"
/>
<q-radio
v-model=
"objOption.StoreType"
:val=
"2"
label=
"阿里云"
/>
</div>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.Bucket"
ref=
"Bucket"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"空间名称(Bucket)"
:rules=
"[val => !!val || '请填写空间名称']"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.Region"
ref=
"Region"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"所属地域"
:rules=
"[val => !!val || '请填写所属地域']"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.SecretId"
ref=
"SecretId"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"SecretId"
:rules=
"[val => !!val || '请填写SecretId']"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.SecretKey"
ref=
"SecretKey"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"SecretKey"
:rules=
"[val => !!val || '请填写SecretKey']"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.CustomDomain"
ref=
"CustomDomain"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"自定义域名"
/>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
color=
"dark"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent"
class=
"q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
@
click=
"setConfig"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
>
import
{
setSiteConfig
,
}
from
'../../api/system/sitecfg'
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
persistent
:
true
,
saveLoading
:
false
,
objOption
:
{
ID
:
0
,
StoreType
:
0
,
Bucket
:
''
,
Region
:
''
,
CustomDomain
:
''
,
SecretId
:
''
,
SecretKey
:
''
,
ImgStyle
:
''
,
},
}
},
computed
:
{
},
mounted
()
{
if
(
this
.
saveObj
){
this
.
objOption
.
ID
=
this
.
saveObj
.
ID
;
this
.
objOption
.
StoreType
=
this
.
saveObj
.
StoreType
;
this
.
objOption
.
Bucket
=
this
.
saveObj
.
Bucket
;
this
.
objOption
.
Region
=
this
.
saveObj
.
Region
;
this
.
objOption
.
CustomDomain
=
this
.
saveObj
.
CustomDomain
;
this
.
objOption
.
SecretId
=
this
.
saveObj
.
SecretId
;
this
.
objOption
.
SecretKey
=
this
.
saveObj
.
SecretKey
;
}
},
methods
:
{
//保存数据
setConfig
()
{
if
(
this
.
objOption
.
StoreType
==
0
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择存储位置`
})
return
;
}
if
(
this
.
objOption
.
Bucket
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请填写空间域名`
})
return
;
}
if
(
this
.
objOption
.
Region
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请填写所属地域`
})
return
;
}
if
(
this
.
objOption
.
SecretId
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请填写SecretId`
})
return
;
}
if
(
this
.
objOption
.
SecretKey
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请填写SecretKey`
})
return
;
}
setSiteConfig
(
this
.
objOption
).
then
(
res
=>
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
);
this
.
closeSaveForm
();
}).
catch
(()
=>
{
this
.
saveLoading
=
false
})
},
//关闭弹窗
closeSaveForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
},
},
}
</
script
>
src/pages/system/msgmanage.vue
0 → 100644
View file @
bd20cbe6
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
clearable
standout=
"bg-primary text-white"
v-model=
"msg.RoleName"
label=
"收信人/电话"
/>
</div>
<div
class=
"col-3"
>
<q-input
clearable
standout=
"bg-primary text-white"
v-model=
"msg.content"
label=
"内容"
/>
</div>
<div
class=
"col-3"
>
<q-input
filled
v-model=
"msg.date"
mask=
"date"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"msg.date"
@
input=
"() => $refs.qDateProxy.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
""
standout=
"bg-primary text-white"
v-model=
"msg.Status"
:options=
"ShowOpts"
emit-value
map-options
label=
"发送状态"
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-tow-column-table"
separator=
"none"
title=
""
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<
template
v-slot:body-cell-Status=
"props"
>
<q-td
:props=
"props"
>
<q-td
:props=
"props"
>
<q-toggle
size=
"md"
color=
"primary"
:false-value=
"1"
:true-value=
"0"
v-model=
"props.row.Status"
title=
"注意:关闭后,分类将无法正常使用."
/>
</q-td>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
</q-table>
</div>
</div>
</template>
<
script
>
import
{
queryRolePage
,
setRoleStatus
}
from
'../../api/system/index'
export
default
{
meta
:
{
title
:
"角色管理"
},
data
()
{
return
{
columns
:
[{
name
:
'RoleId'
,
label
:
'状态'
,
field
:
'RoleId'
,
align
:
'left'
},
{
name
:
'RoleName'
,
required
:
true
,
label
:
'目标'
,
align
:
'left'
,
},
{
name
:
'RoleIntro'
,
label
:
'描述'
,
field
:
'RoleIntro'
,
align
:
'left'
},
{
name
:
'CreateByName'
,
label
:
'内容'
,
field
:
'CreateByName'
,
align
:
'left'
},
{
name
:
'CreateDateStr'
,
label
:
'发送时间'
,
field
:
'CreateDateStr'
,
align
:
'left'
},
{
name
:
'Status'
,
label
:
'创建人'
,
align
:
'left'
,
field
:
'Status'
}
],
data
:
[],
// loading: true,
loading
:
false
,
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
RoleName
:
""
,
Status
:
"-1"
,
content
:
''
,
date
:
'2020-12-2'
,
},
ShowOpts
:
[{
label
:
'全部'
,
value
:
'-1'
},
{
label
:
'正常'
,
value
:
'0'
},
{
label
:
'删除'
,
value
:
'1'
}
],
}
},
mounted
()
{},
methods
:
{
//获取数据
getList
()
{
},
//翻页
changePage
()
{
},
//重新查询
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getList
();
},
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass');
</
style
>
src/pages/system/siteconfig.vue
0 → 100644
View file @
bd20cbe6
<
style
>
.site_ListDiv
{
margin-bottom
:
10px
;
}
</
style
>
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
</div>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
class=
"q-mr-md"
icon=
"add"
label=
"新增站点"
@
click=
"addSite(null)"
/>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-tow-column-table"
separator=
"none"
title=
"文件站点配置"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:body-cell-StoreType=
"props"
>
<q-td
:props=
"props"
style=
"position:relative;"
>
<template
v-if=
"props.row.StoreType==1"
>
<img
src=
"../../assets/images/myimg/tencent.png"
alt=
""
/>
</
template
>
<
template
v-if=
"props.row.StoreType==2"
>
<img
src=
"../../assets/images/myimg/ali.png"
alt=
""
/>
</
template
>
<div
style=
"position:absolute;top:0;left:0;"
>
<img
v-if=
"props.row.IsDefault==1"
style=
"width:50px;"
src=
"../../assets/images/myimg/default.png"
/>
</div>
</q-td>
</template>
<
template
v-slot:body-cell-Using=
"props"
>
<q-td
:props=
"props"
>
<div
class=
"site_ListDiv"
>
空间名称(Bucket):
{{
props
.
row
.
Bucket
}}
</div>
<div
class=
"site_ListDiv"
>
所属地域:
{{
props
.
row
.
Region
}}
</div>
<div
class=
"site_ListDiv"
>
自定义域名:
{{
props
.
row
.
CustomDomain
}}
</div>
<div
class=
"site_ListDiv"
>
SecretId:
{{
props
.
row
.
SecretId
}}
</div>
<div>
SecretKey:
{{
props
.
row
.
SecretKey
}}
</div>
</q-td>
</
template
>
<
template
v-slot:bottom
>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"addSite(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"设为默认"
@
click=
"setMoren(props.row)"
/>
</q-td>
</
template
>
</q-table>
<site-form
v-if=
"isShowSiteForm"
:save-obj=
"roleObjOption"
@
close=
"closeSiteSaveForm"
@
success=
"refreshPage"
>
</site-form>
</div>
</div>
</template>
<
script
>
import
{
getSiteConfig
,
setSiteConfig
}
from
'../../api/system/sitecfg'
import
siteForm
from
'../../components/system/site-form'
export
default
{
meta
:
{
title
:
"站点配置"
},
components
:
{
siteForm
,
},
data
()
{
return
{
isShowSiteForm
:
false
,
columns
:
[{
name
:
'StoreType'
,
label
:
'类型'
,
field
:
'StoreType'
,
align
:
'left'
},
{
name
:
'Bucket'
,
label
:
'存储位置'
,
field
:
'Bucket'
,
align
:
'left'
},
{
name
:
'Using'
,
label
:
'使用中'
,
field
:
'Using'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'StoreType'
}
],
data
:
[],
// loading: true,
loading
:
false
,
msg
:
{
pageIndex
:
1
,
pageSize
:
20
,
},
roleObjOption
:
null
,
}
},
mounted
()
{
this
.
getList
();
},
methods
:
{
getList
()
{
getSiteConfig
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
data
=
res
.
Data
;
}
}).
catch
(()
=>
{
})
},
//新增站点
addSite
(
obj
)
{
if
(
obj
)
{
this
.
roleObjOption
=
obj
}
else
{
this
.
roleObjOption
=
null
}
this
.
isShowSiteForm
=
true
;
},
//设为默认
setMoren
(
obj
)
{
let
msg
=
obj
;
msg
.
IsDefault
=
1
;
setSiteConfig
(
msg
).
then
(
res
=>
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'设置默认成功!'
,
position
:
'top'
})
this
.
getList
();
}).
catch
(()
=>
{
})
},
//关闭弹窗
closeSiteSaveForm
()
{
this
.
isShowSiteForm
=
false
},
//刷新页面
refreshPage
()
{
this
.
getList
()
},
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass');
</
style
>
src/router/routes.js
View file @
bd20cbe6
...
...
@@ -77,6 +77,16 @@ const routes = [{
component
:
()
=>
import
(
"pages/system/role.vue"
)
},
{
path
:
"/system/siteconfig"
,
//站点配置
component
:
()
=>
import
(
"pages/system/siteconfig.vue"
)
},
{
path
:
"/system/msgmanage"
,
//短信管理
component
:
()
=>
import
(
"pages/system/msgmanage.vue"
)
},
{
path
:
"/course/catagory"
,
//课程分类
component
:
()
=>
...
...
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