Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intelligent_station_web
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
张伯涛
intelligent_station_web
Commits
ca50bbb5
Commit
ca50bbb5
authored
Aug 09, 2024
by
munan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统设置
parent
c4a55e24
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
270 additions
and
385 deletions
+270
-385
sysSettings.js
src/api/sysSettings.js
+2
-42
index.vue
src/views/busTeacherInfo/index.vue
+24
-30
index.vue
src/views/resDatasetInfo/index.vue
+11
-13
index.vue
src/views/system/sysSettings/index.vue
+233
-300
No files found.
src/api/sysSettings.js
View file @
ca50bbb5
...
@@ -2,24 +2,11 @@ import request from '@/utils/request'
...
@@ -2,24 +2,11 @@ import request from '@/utils/request'
import
Qs
from
'qs'
import
Qs
from
'qs'
/**
/**
* 1. 列表查询
* 1. 查询
* 2. 查询详细信息
* 2. 修改
* 3. 新增
* 4. 修改
* 5. 逻辑删除
* 6. 导出
*
*
*/
*/
// 1. 查询系统设置列表
export
function
listSysSettings
(
query
)
{
return
request
({
url
:
'/syssettings/list'
,
method
:
'get'
,
params
:
query
})
}
// 2. 查询系统设置详细信息
// 2. 查询系统设置详细信息
export
function
getSysSettings
(
businessId
)
{
export
function
getSysSettings
(
businessId
)
{
return
request
({
return
request
({
...
@@ -28,16 +15,6 @@ export function getSysSettings(businessId) {
...
@@ -28,16 +15,6 @@ export function getSysSettings(businessId) {
})
})
}
}
// 3. 新增系统设置
export
function
addSysSettings
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/syssettings/add'
,
method
:
'post'
,
data
:
data
})
}
// 4. 修改系统设置
// 4. 修改系统设置
export
function
updateSysSettings
(
data
)
{
export
function
updateSysSettings
(
data
)
{
const
businessId
=
data
.
businessId
const
businessId
=
data
.
businessId
...
@@ -49,20 +26,3 @@ export function updateSysSettings(data) {
...
@@ -49,20 +26,3 @@ export function updateSysSettings(data) {
})
})
}
}
// 5. 逻辑删除系统设置
export
function
delSysSettings
(
businessId
)
{
return
request
({
url
:
'/syssettings/deleteLogical/'
+
businessId
,
method
:
'delete'
})
}
// 6. 导出系统设置
export
function
exportSysSettings
(
query
)
{
return
request
({
url
:
'/syssettings/export'
,
method
:
'get'
,
params
:
query
,
responseType
:
'blob'
})
}
src/views/busTeacherInfo/index.vue
View file @
ca50bbb5
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<div
class=
"search"
>
<el-form-item>
<el-form-item>
<el-button
<el-button
:class=
"commonField.queryClass"
:class=
"commonField.queryClass"
...
@@ -83,6 +84,7 @@
...
@@ -83,6 +84,7 @@
@
click=
"handleExport"
>
导出
</el-button>
@
click=
"handleExport"
>
导出
</el-button>
</el-form-item>
</el-form-item>
</div>
</div>
</div>
</el-form>
</el-form>
</div>
</div>
<div
class=
"placeholder"
/>
<div
class=
"placeholder"
/>
...
@@ -99,11 +101,6 @@
...
@@ -99,11 +101,6 @@
{{
scope
.
row
.
userName
||
'-'
}}
{{
scope
.
row
.
userName
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"用户"
prop=
"teaId"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
teaId
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"姓名"
prop=
"teaName"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"姓名"
prop=
"teaName"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
teaName
||
'-'
}}
{{
scope
.
row
.
teaName
||
'-'
}}
...
@@ -169,9 +166,6 @@
...
@@ -169,9 +166,6 @@
<el-form-item
label=
"账号"
prop=
"userName"
>
<el-form-item
label=
"账号"
prop=
"userName"
>
<el-input
v-model
.
trim=
"form.userName"
show-word-limit
:maxlength=
"255"
placeholder=
"请输入账号"
/>
<el-input
v-model
.
trim=
"form.userName"
show-word-limit
:maxlength=
"255"
placeholder=
"请输入账号"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"用户"
prop=
"teaId"
>
<el-input-number
v-model
.
trim=
"form.teaId"
controls-position=
"right"
:min=
"0"
/>
</el-form-item>
<el-form-item
label=
"姓名"
prop=
"teaName"
>
<el-form-item
label=
"姓名"
prop=
"teaName"
>
<el-input
v-model
.
trim=
"form.teaName"
show-word-limit
:maxlength=
"255"
placeholder=
"请输入姓名"
/>
<el-input
v-model
.
trim=
"form.teaName"
show-word-limit
:maxlength=
"255"
placeholder=
"请输入姓名"
/>
</el-form-item>
</el-form-item>
...
...
src/views/resDatasetInfo/index.vue
View file @
ca50bbb5
...
@@ -82,9 +82,7 @@
...
@@ -82,9 +82,7 @@
</el-form-item>
</el-form-item>
</div>
</div>
</el-form>
</el-form>
<div
class=
"placeholder"
/>
<div
style=
"padding:5px 10px"
>
<div
style=
"padding:5px 10px"
>
<div
class=
"mb12 font-small-bold"
>
数据集信息列表
</div>
<el-table
v-loading=
"loading"
border
:data=
"resDatasetInfoList"
>
<el-table
v-loading=
"loading"
border
:data=
"resDatasetInfoList"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"数据集编号"
prop=
"dataCode"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"数据集编号"
prop=
"dataCode"
:show-overflow-tooltip=
"true"
>
...
@@ -113,8 +111,8 @@
...
@@ -113,8 +111,8 @@
</el-table-column>
</el-table-column>
<el-table-column
width=
"100"
label=
"状态"
prop=
"flag"
>
<el-table-column
width=
"100"
label=
"状态"
prop=
"flag"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.flag === '1'"
>
启动
</span>
<span
v-if=
"scope.row.flag === '1'"
>
</span>
<span
v-else-if=
"scope.row.flag === '0'"
>
停用
</span>
<span
v-else-if=
"scope.row.flag === '0'"
></span>
<el-switch
<el-switch
v-model=
"scope.row.flag"
v-model=
"scope.row.flag"
class=
"switchDisabledStyle"
class=
"switchDisabledStyle"
...
@@ -129,7 +127,7 @@
...
@@ -129,7 +127,7 @@
{{
scope
.
row
.
remarks
||
'-'
}}
{{
scope
.
row
.
remarks
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"创建时间"
width=
"
16
0"
prop=
"createDate"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"创建时间"
width=
"
20
0"
prop=
"createDate"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
createDate
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm'
)
}}
</span>
<span>
{{
scope
.
row
.
createDate
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm'
)
}}
</span>
</
template
>
</
template
>
...
...
src/views/system/sysSettings/index.vue
View file @
ca50bbb5
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"container"
>
<div
v-if=
"themeType == '8'"
class=
"tableTitle"
>
系统设置列表
</div>
<div
class=
"header"
>
<div
class=
"search"
>
<div
v-if=
"themeType == '8'"
class=
"tableTitle"
>
系统设置信息
</div>
<el-form
ref=
"queryForm"
style=
"padding: 0 0 0 10px"
:model=
"queryParams"
:inline=
"true"
>
</div>
<el-form-item
label=
"系统名称"
prop=
"systemName"
>
<el-main
class=
"main-content"
>
<div
class=
"input-field"
>
<div
class=
"system-name"
>
<label
for=
"systemName"
class=
"input-label"
>
系统名称:
</label>
<el-input
<el-input
v-model=
"queryParams.systemName"
id=
"systemName"
v-model=
"sysSettingsList.systemName"
type=
"text"
placeholder=
"请输入系统名称"
placeholder=
"请输入系统名称"
clearable
clearable
:maxlength=
"32"
:maxlength=
"32"
size=
"small"
size=
"middle"
style=
"width: 150px"
@
blur=
"validateSystemName"
/>
/>
</div>
</el-form-item>
</div>
<el-form-item
label=
"系统版本"
prop=
"systemVersion"
>
<div
class=
"input-field"
>
<div
class=
"system-background-image"
>
<label
for=
"systemBg"
class=
"input-label"
>
系统背景图:
</label>
<el-upload
ref=
"upload"
v-model=
"sysSettingsList.systemBg"
class=
"avatar-uploader"
action=
"your-upload-endpoint"
:auto-upload=
"true"
list-type=
"picture-card"
:http-request=
"handleUpload"
:show-file-list=
"true"
:file-list=
"fileList"
:before-upload=
"handleBefore"
accept=
"image/png"
:on-remove=
"handleFileRemove"
>
<i
v-if=
"!sysSettingsList.systemBg"
class=
"el-icon-plus"
/>
</el-upload>
</div>
</div>
<hr
style=
"border: #889ba9 solid 5px"
>
<div
class=
"input-field"
>
<div
class=
"system-version"
>
<label
for=
"systemVersion"
class=
"input-label"
>
系统版本:
</label>
<el-input
<el-input
v-model=
"queryParams
.systemVersion"
v-model=
"sysSettingsList
.systemVersion"
placeholder=
"请输入系统版本
"
placeholder=
"1.02.14
"
clearable
clearable
:maxlength=
"50"
:maxlength=
"50"
size=
"small"
size=
"middle"
style=
"width: 150px"
readonly
/>
/>
</div>
</el-form-item>
</div>
<el-form-item
label=
"系统license"
prop=
"systemLicense"
>
<div
class=
"input-field"
>
<el-input
<div
class=
"system-serial-number"
>
v-model=
"queryParams.systemLicense"
<label
for=
"systemSn"
class=
"input-label"
>
系统编码:
</label>
placeholder=
"请输入系统license"
clearable
:maxlength=
"255"
size=
"small"
style=
"width: 150px"
/>
</el-form-item>
<el-form-item
label=
"系统编码"
prop=
"systemSn"
>
<el-input
<el-input
v-model=
"queryParams
.systemSn"
v-model=
"sysSettingsList
.systemSn"
placeholder=
"请输入系统编码
"
placeholder=
"GB12123
"
clearable
clearable
:maxlength=
"32"
:maxlength=
"32"
size=
"small"
size=
"middle"
style=
"width: 150px"
readonly
/>
/>
</div>
</el-form-item>
</div>
<el-form-item
label=
"过期时间"
>
<div
class=
"input-field"
>
<div
class=
"expiration-date"
>
<label
for=
"systemExpire"
class=
"input-label"
>
过期时间:
</label>
<el-date-picker
<el-date-picker
v-model=
"dateRange"
v-model=
"dateRange"
size=
"small
"
size=
"middle
"
style=
"width: 200px"
style=
"width: 200px"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
type=
"daterange"
type=
"dateRange"
range-separator=
"-"
placeholder=
"2025-08-01"
start-placeholder=
"开始日期"
readonly
/>
end-placeholder=
"结束日期"
</div>
/>
</div>
</el-form-item>
<div
class=
"input-field"
>
<el-form-item
label=
"网卡编码"
prop=
"systemRj49"
>
<div
class=
"system-auth-host"
>
<label
for=
"system-auth-host"
class=
"input-label"
>
授权服务器数量:
</label>
<el-input
<el-input
v-model=
"queryParams.systemRj49
"
v-model=
"sysSettingsList.systemAuthHost
"
placeholder=
"请输入网卡编码
"
placeholder=
"1
"
clearable
clearable
:maxlength=
"32"
:maxlength=
"50"
size=
"small"
size=
"middle"
style=
"width: 150px"
readonly
/>
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"flag"
>
<el-select
v-model=
"queryParams.flag"
placeholder=
"请选择状态"
clearable
size=
"small"
>
<el-option
v-for=
"dict in statusOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
:class=
"commonField.queryClass"
:type=
"commonField.typePrimary"
:icon=
"commonField.queryIcon"
:size=
"commonField.smallSize"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
:class=
"commonField.resetClass"
:icon=
"commonField.resetIcon"
:size=
"commonField.smallSize"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
<div
style=
"float: right"
>
<el-form-item>
<el-button
:class=
"commonField.addClass"
:type=
"commonField.typePrimary"
:icon=
"commonField.addIcon"
:size=
"commonField.smallSize"
@
click=
"handleAdd"
>
新增
</el-button>
<el-button
:class=
"commonField.exportClass"
:type=
"commonField.typeSuccess"
:icon=
"commonField.exportIcon"
:size=
"commonField.smallSize"
@
click=
"handleExport"
>
导出
</el-button>
</el-form-item>
</div>
</div>
</el-form>
</div>
</div>
<div
style=
"padding:5px 10px"
>
<div
class=
"input-field"
>
<div
v-if=
"themeType !== '8'"
class=
"tableTitle"
>
系统设置列表
</div>
<div
class=
"system-gpu-number"
>
<el-table
v-loading=
"loading"
border
:data=
"sysSettingsList"
>
<label
for=
"systemAuthGpu"
class=
"input-label"
>
GPU数量:
</label>
<el-table-column
type=
"index"
label=
"序号"
width=
"55"
align=
"center"
/>
<el-input
<el-table-column
label=
"系统名称"
prop=
"systemName"
:show-overflow-tooltip=
"true"
>
v-model=
"sysSettingsList.systemAuthGpu"
<template
slot-scope=
"scope"
>
placeholder=
"1"
{{
scope
.
row
.
systemName
||
'-'
}}
clearable
</
template
>
:maxlength=
"50"
</el-table-column>
size=
"middle"
<el-table-column
label=
"系统背景图"
prop=
"systemBg"
:show-overflow-tooltip=
"true"
width=
"150px"
>
readonly
/>
<
template
slot-scope=
"scope"
>
<div
:id=
"step(scope.$index)"
>
<el-image
style=
"width:100%;height:100%;"
:src=
"scope.row.ossInfoList && scope.row.ossInfoList.length > 0 ? scope.row.ossInfoList[0].systemBg : require('@/assets/image/profile.jpg')"
:preview-src-list=
"[scope.row.ossInfoList && scope.row.ossInfoList.length > 0 ? scope.row.ossInfoList[0].systemBg : require('@/assets/image/profile.jpg')]"
@
click=
"handleClickStop(scope.$index)"
>
<div
slot=
"error"
class=
"image-slot"
>
<i
class=
"el-icon-picture-outline"
/>
</div>
</div>
</el-image>
</div>
</div>
</
template
>
<div
class=
"input-field"
>
</el-table-column>
<div
class=
"network-card-serial"
>
<el-table-column
label=
"系统版本"
prop=
"systemVersion"
:show-overflow-tooltip=
"true"
>
<label
for=
"systemRj45"
class=
"input-label"
>
网卡编码:
</label>
<
template
slot-scope=
"scope"
>
<el-input
{{
scope
.
row
.
systemVersion
||
'23H2'
}}
v-model=
"sysSettingsList.systemRj45"
</
template
>
clearable
</el-table-column>
placeholder=
"127.0.01"
<el-table-column
label=
"系统license"
prop=
"systemLicense"
:show-overflow-tooltip=
"true"
>
:maxlength=
"50"
<
template
slot-scope=
"scope"
>
readonly
{{
scope
.
row
.
systemLicense
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"系统编码"
prop=
"systemSn"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
systemSn
||
'GB2312'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"过期时间"
prop=
"systemExpire"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
systemExpire
|
transformDateByFormat
(
'2024-08-01 18:00:00'
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"授权服务器数量"
prop=
"systemAuthHost"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
systemAuthHost
||
'1'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"授权数量"
prop=
"systemAuthGpu"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
systemAuthGpu
||
'1'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"网卡编码"
prop=
"systemRj49"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
systemRj49
||
'e01'
}}
</
template
>
</el-table-column>
<el-table-column
width=
"120"
label=
"状态"
prop=
"flag"
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.flag"
class=
"switchDisabledStyle"
inactive-value=
"0"
active-value=
"1"
@
click
.
native=
"handleStatusChange(scope.row)"
/>
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"200px"
>
<
template
slot-scope=
"scope"
>
<el-button
:class=
"commonField.updateClass"
:type=
"commonField.typeParent"
:size=
"commonField.size"
@
click=
"handleUpdate(scope.row)"
>
修改
</el-button>
<el-button
:class=
"commonField.delClass"
:type=
"commonField.typeParent"
:size=
"commonField.size"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
<pagination
</div>
v-show=
"total>0"
<div
class=
"input-field"
>
:total=
"total"
<div
style=
"width: 500px"
>
:page
.
sync=
"queryParams.page"
<label
for=
"systemLicense"
class=
"input-label"
>
系统license:
</label>
:limit
.
sync=
"queryParams.rows"
<el-input
@
pagination=
"getList"
v-model=
"sysSettingsList.systemLicense"
type=
"textarea"
clearable
:maxlength=
"50"
:rows=
"5"
/>
/>
<!-- 添加或修改系统设置配置对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"90px"
>
<el-form-item
label=
"系统名称"
prop=
"systemName"
>
<el-input
v-model
.
trim=
"form.systemName"
show-word-limit
:maxlength=
"32"
placeholder=
"请输入系统名称"
/>
</el-form-item>
<el-form-item
label=
"系统背景图"
>
<el-upload
class=
"avatar-uploader"
action=
"#"
list-type=
"picture-card"
:http-request=
"handleUpload"
:show-file-list=
"true"
:file-list=
"fileList"
:before-upload=
"handleBefore"
accept=
"png"
:on-remove=
"handleFileRemove"
>
<i
v-if=
"oss"
class=
"el-icon-plus"
/>
</el-upload>
</el-form-item>
<el-form-item
label=
"系统版本"
prop=
"systemVersion"
>
<el-input
v-model
.
trim=
"form.systemVersion"
show-word-limit
:maxlength=
"50"
placeholder=
"23H2"
readonly
/>
</el-form-item>
<el-form-item
label=
"系统编码"
prop=
"systemSn"
>
<el-input
v-model
.
trim=
"form.systemSn"
show-word-limit
:maxlength=
"32"
placeholder=
"GB2312"
readonly
/>
</el-form-item>
<el-form-item
label=
"过期时间"
prop=
"systemExpire"
>
<el-date-picker
v-model=
"form.systemExpire"
value-format=
"yyyy-MM-dd hh:mm:ss"
type=
"date"
placeholder=
"2024.08.01 18:00:00"
readonly
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"授权服务器数量"
prop=
"systemAuthHost"
>
<el-input-number
v-model
.
trim=
"form.systemAuthHost"
controls-position=
"right"
:min=
"0"
disabled
/>
</el-form-item>
<el-form-item
label=
"授权数量"
prop=
"systemAuthGpu"
>
<el-input-number
v-model
.
trim=
"form.systemAuthGpu"
controls-position=
"right"
:min=
"0"
disabled
/>
</el-form-item>
<el-form-item
label=
"网卡编码"
prop=
"systemRj49"
>
<el-input
v-model
.
trim=
"form.systemRj49"
show-word-limit
:maxlength=
"32"
placeholder=
"e01 "
readonly
/>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-radio-group
v-model=
"form.flag"
>
<el-radio
label=
"1"
>
启用
</el-radio>
<el-radio
label=
"0"
>
停用
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"系统license"
prop=
"systemLicense"
>
<el-input
v-model
.
trim=
"form.systemLicense"
show-word-limit
:maxlength=
"255"
placeholder=
"请输入系统license"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"cancelBtn"
@
click=
"cancel"
>
取 消
</el-button>
<el-button
class=
"submitBtn"
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
</div>
</div>
</el-dialog>
</div>
</el-main>
</div>
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
>
import
{
import
{
listSysSettings
,
getSysSettings
,
getSysSettings
,
delSysSettings
,
addSysSettings
,
updateSysSettings
,
updateSysSettings
,
exportSysSettings
}
from
'@/api/sysSettings'
}
from
'@/api/sysSettings'
import
commonField
from
'@/utils/commonField'
import
commonField
from
'@/utils/commonField'
import
{
getDataCache
,
setDataCache
}
from
"@/assets/js/filterData"
;
import
{
getDataCache
,
setDataCache
}
from
"@/assets/js/filterData"
;
export
default
{
export
default
{
name
:
'SysSettings'
,
name
:
'SysSettings'
,
data
()
{
data
()
{
return
{
return
{
sysSettingsList
:
{
systemBg
:
''
,
// 存储系统背景图的 URL
},
fileList
:
[],
// 文件列表
oss
:
true
,
// 控制图标显示
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
// 总条数
// 总条数
...
@@ -321,7 +187,7 @@ export default {
...
@@ -321,7 +187,7 @@ export default {
form
:
{},
form
:
{},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
systemName
:
[{
type
:
'string'
,
required
:
true
,
message
:
"系统名称必填"
,
trigger
:
'blur'
}],
systemName
:
[{
type
:
'string'
,
required
:
true
,
message
:
"系统名称必填"
,
trigger
:
'blur'
}],
}
}
}
}
},
},
...
@@ -335,12 +201,13 @@ export default {
...
@@ -335,12 +201,13 @@ export default {
},
},
/** 路由离开前存储筛选条件*/
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
setDataCache
(
this
.
$route
.
path
,
this
.
queryParams
)
setDataCache
(
this
.
$route
.
path
,
this
.
sysSettingsList
)
next
()
next
()
},
},
created
()
{
created
()
{
this
.
queryParams
=
JSON
.
parse
(
getDataCache
(
this
.
$route
.
path
))
// 获取存储的筛选项
this
.
sysSettingsList
=
JSON
.
parse
(
getDataCache
(
this
.
$route
.
path
))
// 获取存储的筛选项
this
.
getList
()
// 列表查询
this
.
getList
()
// 列表查询
this
.
loadCachedImage
();
},
},
methods
:
{
methods
:
{
/**
/**
...
@@ -358,6 +225,15 @@ export default {
...
@@ -358,6 +225,15 @@ export default {
console
.
log
(
this
.
pictureId
)
console
.
log
(
this
.
pictureId
)
})
})
},
},
loadCachedImage
()
{
const
cachedUrl
=
localStorage
.
getItem
(
'systemBg'
);
if
(
cachedUrl
)
{
this
.
sysSettingsList
.
systemBg
=
cachedUrl
;
}
},
saveImageToCache
(
url
)
{
localStorage
.
setItem
(
'systemBg'
,
url
);
},
handleFileRemove
(
file
,
fileList
)
{
handleFileRemove
(
file
,
fileList
)
{
// 从 fileList 中移除已删除的文件
// 从 fileList 中移除已删除的文件
this
.
fileList
=
fileList
this
.
fileList
=
fileList
...
@@ -379,24 +255,20 @@ export default {
...
@@ -379,24 +255,20 @@ export default {
this
.
loading
=
true
this
.
loading
=
true
listSysSettings
(
this
.
addDateRange
(
this
.
queryParams
,
this
.
dateRange
)).
then
(
listSysSettings
(
this
.
addDateRange
(
this
.
queryParams
,
this
.
dateRange
)).
then
(
response
=>
{
response
=>
{
this
.
sysSettingsList
=
response
.
rows
this
.
sysSettingsList
=
response
.
rows
[
3
]
console
.
log
(
'sysSettingsList'
,
this
.
sysSettingsList
)
this
.
total
=
response
.
total
this
.
total
=
response
.
total
this
.
loading
=
false
this
.
loading
=
false
}
}
)
)
},
},
// 取消按钮
cancel
()
{
this
.
open
=
false
this
.
reset
()
},
// 表单重置
// 表单重置
reset
()
{
reset
()
{
this
.
form
=
{
this
.
form
=
{
businessId
:
undefined
,
businessId
:
undefined
,
remarks
:
undefined
,
remarks
:
undefined
,
systemName
:
undefined
,
systemName
:
undefined
,
systemBg
:
''
,
systemBg
:
''
,
systemVersion
:
undefined
,
systemVersion
:
undefined
,
systemLicense
:
undefined
,
systemLicense
:
undefined
,
systemSn
:
undefined
,
systemSn
:
undefined
,
...
@@ -432,12 +304,6 @@ export default {
...
@@ -432,12 +304,6 @@ export default {
}
}
this
.
handleQuery
()
this
.
handleQuery
()
},
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
()
this
.
open
=
true
this
.
title
=
'添加系统设置'
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
()
this
.
reset
()
...
@@ -455,19 +321,19 @@ export default {
...
@@ -455,19 +321,19 @@ export default {
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(
function
()
{
}).
then
(
function
()
{
return
updateSysSettings
(
row
)
return
updateSysSettings
(
row
)
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
$message
({
this
.
$message
({
message
:
text
+
'成功'
,
message
:
text
+
'成功'
,
type
:
'success'
type
:
'success'
})
})
}).
catch
(
function
()
{
}).
catch
(
function
()
{
row
.
flag
=
row
.
flag
===
'0'
?
'1'
:
'0'
row
.
flag
=
row
.
flag
===
'0'
?
'1'
:
'0'
})
})
},
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
:
function
()
{
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
businessId
!==
undefined
)
{
if
(
this
.
form
.
businessId
!==
undefined
)
{
...
@@ -493,7 +359,7 @@ export default {
...
@@ -493,7 +359,7 @@ export default {
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(
function
()
{
}).
then
(
function
()
{
return
delSysSettings
(
id
)
return
delSysSettings
(
id
)
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
getList
()
this
.
getList
()
...
@@ -501,7 +367,7 @@ export default {
...
@@ -501,7 +367,7 @@ export default {
message
:
'删除成功'
,
message
:
'删除成功'
,
type
:
'success'
type
:
'success'
})
})
}).
catch
(
function
()
{
}).
catch
(
function
()
{
})
})
},
},
/** 导出按钮操作 */
/** 导出按钮操作 */
...
@@ -511,7 +377,7 @@ export default {
...
@@ -511,7 +377,7 @@ export default {
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(
function
()
{
}).
then
(
function
()
{
return
exportSysSettings
(
queryParams
).
then
(
response
=>
{
return
exportSysSettings
(
queryParams
).
then
(
response
=>
{
const
blob
=
new
Blob
([
response
])
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'a'
)
const
downloadElement
=
document
.
createElement
(
'a'
)
...
@@ -525,8 +391,7 @@ export default {
...
@@ -525,8 +391,7 @@ export default {
})
})
})
})
},
},
/** 列表图片唯一标识*/
/** 列表图片唯一标识*/
step
(
index
)
{
step
(
index
)
{
return
'step'
+
index
return
'step'
+
index
},
},
...
@@ -544,18 +409,86 @@ export default {
...
@@ -544,18 +409,86 @@ export default {
})
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.app-container
{
font-size
:
18px
;
padding
:
0
;
.placeholder
{
<
style
scoped
>
height
:
1
.3vh
;
.input-field
{
background-color
:
#F4F4F4
;
margin
:
4px
;
margin-bottom
:
10px
display
:
flex
;
}
justify-content
:
center
;
}
.input-label
{
font-size
:
15px
;
color
:
#606266
;
margin-right
:
8px
;
width
:
100px
;
white-space
:
nowrap
;
flex-shrink
:
0
;
}
.container
{
flex-direction
:
column
;
height
:
100%
;
overflow-y
:
auto
;
overflow-x
:
auto
;
padding
:
20px
;
}
.system-license
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.system-name
{
display
:
flex
;
align-items
:
center
;
}
.system-background-image
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.system-version
{
display
:
flex
;
align-items
:
center
;
}
.system-serial-number
{
display
:
flex
;
align-items
:
center
;
}
}
.expiration-date
{
display
:
flex
;
align-items
:
center
;
}
.system-gpu-number
{
display
:
flex
;
align-items
:
center
;
}
.network-card-serial
{
display
:
flex
;
align-items
:
center
;
}
.system-auth-host
{
display
:
flex
;
align-items
:
center
;
}
.header
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
16px
;
}
</
style
>
</
style
>
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