Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ai-yunshou-vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
AI云守
ai-yunshou-vue
Commits
3a6a6699
Commit
3a6a6699
authored
Aug 12, 2024
by
胡占生
🇨🇳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:图片回显,在上传图片时,将图片的地址保存到数据库中,在回显时,将地址转换成图片。
parent
7043e66a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
src/store/modules/user.js
src/store/modules/user.js
+2
-1
src/utils/request.js
src/utils/request.js
+2
-2
src/views/algorithmControl/index.vue
src/views/algorithmControl/index.vue
+0
-1
src/views/algorithmList/components/algorithmDown.vue
src/views/algorithmList/components/algorithmDown.vue
+6
-1
No files found.
src/store/modules/user.js
View file @
3a6a6699
...
...
@@ -37,7 +37,8 @@ const useUserStore = defineStore(
getInfo
().
then
(
res
=>
{
const
user
=
res
.
user
console
.
log
(
'
%c [ user ]-38
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
user
)
const
avatar
=
(
user
.
avatar
==
""
||
user
.
avatar
==
null
)
?
defAva
:
import
.
meta
.
env
.
VITE_APP_BASE_API
+
user
.
avatar
;
const
avatar
=
(
user
.
avatar
==
""
||
user
.
avatar
==
null
)
?
defAva
:
'
http://192.168.4.206
'
+
user
.
avatar
;
// const avatar = (user.avatar == "" || user.avatar == null) ? defAva : import.meta.env.VITE_APP_BASE_API + user.avatar;
if
(
res
.
roles
&&
res
.
roles
.
length
>
0
)
{
// 验证返回的roles是否是一个非空数组
this
.
roles
=
res
.
roles
...
...
src/utils/request.js
View file @
3a6a6699
...
...
@@ -111,9 +111,9 @@ service.interceptors.response.use(res => {
console
.
log
(
'
err
'
+
error
)
let
{
message
}
=
error
;
if
(
message
==
"
Network Error
"
)
{
message
=
"
后端接口连接异常
"
;
message
=
"
亲,加载失败,请稍后再试。
"
;
}
else
if
(
message
.
includes
(
"
timeout
"
))
{
message
=
"
系统接口请求超时
"
;
message
=
"
亲,网络超时啦。提示您检查网络连接,如路由器、移动数据。引导您重启网络设备或稍等再操作。
"
;
}
else
if
(
message
.
includes
(
"
Request failed with status code
"
))
{
message
=
"
系统接口
"
+
message
.
substr
(
message
.
length
-
3
)
+
"
异常
"
;
}
...
...
src/views/algorithmControl/index.vue
View file @
3a6a6699
...
...
@@ -45,7 +45,6 @@
plain
icon=
"Plus"
@
click=
"handleAdd"
v-hasPermi=
"['monitor:job:add']"
>
新增
</el-button>
</el-col>
<!--
<el-col
:span=
"1.5"
>
...
...
src/views/algorithmList/components/algorithmDown.vue
View file @
3a6a6699
...
...
@@ -74,7 +74,7 @@
</el-form>
<
template
#footer
>
<div
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
:loading=
"butLoading"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</
template
>
...
...
@@ -87,6 +87,7 @@ const { proxy } = getCurrentInstance();
const
emit
=
defineEmits
();
const
open
=
ref
(
false
);
const
openAdd
=
ref
(
false
);
const
butLoading
=
ref
(
false
);
const
title
=
ref
(
""
);
const
titleLevel
=
ref
(
""
);
const
loading
=
ref
(
true
);
...
...
@@ -109,6 +110,7 @@ const { queryParams, form, rules } = toRefs(data);
/** 表单重置 */
function
reset
()
{
butLoading
.
value
=
false
;
form
.
value
=
{
id
:
undefined
,
alarmName
:
undefined
,
...
...
@@ -157,16 +159,19 @@ function submitForm() {
proxy
.
$refs
[
"
algLevelRef
"
].
validate
(
valid
=>
{
if
(
valid
)
{
form
.
value
.
alarmShowType
=
form
.
value
.
alarmShowType
.
join
()
butLoading
.
value
=
true
;
if
(
form
.
value
.
id
!=
undefined
)
{
updateAlgLevel
(
form
.
value
).
then
(
response
=>
{
proxy
.
$modal
.
msgSuccess
(
"
修改成功
"
);
openAdd
.
value
=
false
;
butLoading
.
value
=
false
;
getLevelList
();
});
}
else
{
addAlgLevel
(
form
.
value
).
then
(
response
=>
{
proxy
.
$modal
.
msgSuccess
(
"
新增成功
"
);
openAdd
.
value
=
false
;
butLoading
.
value
=
false
;
getLevelList
();
});
}
...
...
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