Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
supervise-wecom
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6c753560
authored
Jun 04, 2026
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 在审批相关页面添加加载提示,优化用户体验
1 parent
26c1740d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
0 deletions
src/views/mine/view/approvalDetail.vue
src/views/mine/view/approvalResult.vue
src/views/mine/view/approvalSubmit.vue
src/views/mine/view/tasks.vue
src/views/mine/view/approvalDetail.vue
View file @
6c75356
...
@@ -80,6 +80,7 @@ export default {
...
@@ -80,6 +80,7 @@ export default {
async
getDetail
()
{
async
getDetail
()
{
if
(
!
this
.
id
)
if
(
!
this
.
id
)
return
;
return
;
util
.
showLoading
();
try
{
try
{
const
params
=
{
id
:
this
.
id
,
phone
:
this
.
userInfo
.
phone
};
const
params
=
{
id
:
this
.
id
,
phone
:
this
.
userInfo
.
phone
};
const
res
=
await
api
.
getApprovalDetail
(
params
);
const
res
=
await
api
.
getApprovalDetail
(
params
);
...
@@ -91,6 +92,7 @@ export default {
...
@@ -91,6 +92,7 @@ export default {
this
.
status
=
Number
(
this
.
detail
.
approvalStatus
);
this
.
status
=
Number
(
this
.
detail
.
approvalStatus
);
}
}
}
finally
{
}
finally
{
util
.
hideLoading
();
this
.
detailLoaded
=
true
;
this
.
detailLoaded
=
true
;
}
}
},
},
...
...
src/views/mine/view/approvalResult.vue
View file @
6c75356
...
@@ -139,9 +139,14 @@ export default {
...
@@ -139,9 +139,14 @@ export default {
async
getDetail
()
{
async
getDetail
()
{
if
(
!
this
.
id
)
if
(
!
this
.
id
)
return
;
return
;
util
.
showLoading
();
try
{
const
params
=
{
id
:
this
.
id
,
phone
:
this
.
userInfo
.
phone
};
const
params
=
{
id
:
this
.
id
,
phone
:
this
.
userInfo
.
phone
};
const
res
=
await
api
.
getApprovalDetail
(
params
);
const
res
=
await
api
.
getApprovalDetail
(
params
);
this
.
detail
=
res
.
data
||
res
||
{};
this
.
detail
=
res
.
data
||
res
||
{};
}
finally
{
util
.
hideLoading
();
}
},
},
toNameList
(
value
)
{
toNameList
(
value
)
{
if
(
Array
.
isArray
(
value
))
if
(
Array
.
isArray
(
value
))
...
...
src/views/mine/view/approvalSubmit.vue
View file @
6c75356
...
@@ -294,6 +294,8 @@ export default {
...
@@ -294,6 +294,8 @@ export default {
},
},
methods
:
{
methods
:
{
async
getDicts
()
{
async
getDicts
()
{
util
.
showLoading
();
try
{
await
Promise
.
all
([
await
Promise
.
all
([
this
.
getFlightSupervisors
(),
this
.
getFlightSupervisors
(),
this
.
getDict
(
"scene"
),
this
.
getDict
(
"scene"
),
...
@@ -301,6 +303,9 @@ export default {
...
@@ -301,6 +303,9 @@ export default {
this
.
getDict
(
"methodOffline"
),
this
.
getDict
(
"methodOffline"
),
this
.
getDict
(
"topic"
),
this
.
getDict
(
"topic"
),
]);
]);
}
finally
{
util
.
hideLoading
();
}
},
},
async
getDict
(
key
)
{
async
getDict
(
key
)
{
const
config
=
DICT_CONFIG
[
key
];
const
config
=
DICT_CONFIG
[
key
];
...
@@ -392,6 +397,7 @@ export default {
...
@@ -392,6 +397,7 @@ export default {
async
loadCourseList
()
{
async
loadCourseList
()
{
if
(
this
.
dicts
.
course
.
length
)
if
(
this
.
dicts
.
course
.
length
)
return
;
return
;
util
.
showLoading
();
this
.
courseLoading
=
true
;
this
.
courseLoading
=
true
;
try
{
try
{
const
res
=
await
api
.
getAllCoursePage
({
const
res
=
await
api
.
getAllCoursePage
({
...
@@ -407,6 +413,7 @@ export default {
...
@@ -407,6 +413,7 @@ export default {
}
catch
(
error
)
{
}
catch
(
error
)
{
Toast
(
"课程加载失败"
);
Toast
(
"课程加载失败"
);
}
finally
{
}
finally
{
util
.
hideLoading
();
this
.
courseLoading
=
false
;
this
.
courseLoading
=
false
;
}
}
},
},
...
@@ -471,6 +478,7 @@ export default {
...
@@ -471,6 +478,7 @@ export default {
Toast
(
emptyItem
.
message
||
`请填写
${
emptyItem
.
label
}
`
);
Toast
(
emptyItem
.
message
||
`请填写
${
emptyItem
.
label
}
`
);
return
;
return
;
}
}
util
.
showLoading
(
"提交中..."
);
this
.
submitting
=
true
;
this
.
submitting
=
true
;
api
.
submitApproval
(
this
.
buildParams
()).
then
((
res
)
=>
{
api
.
submitApproval
(
this
.
buildParams
()).
then
((
res
)
=>
{
if
(
!
res
)
{
if
(
!
res
)
{
...
@@ -482,6 +490,7 @@ export default {
...
@@ -482,6 +490,7 @@ export default {
}).
catch
(()
=>
{
}).
catch
(()
=>
{
Toast
(
"提交失败"
);
Toast
(
"提交失败"
);
}).
finally
(()
=>
{
}).
finally
(()
=>
{
util
.
hideLoading
();
this
.
submitting
=
false
;
this
.
submitting
=
false
;
});
});
},
},
...
...
src/views/mine/view/tasks.vue
View file @
6c75356
...
@@ -104,6 +104,7 @@ export default {
...
@@ -104,6 +104,7 @@ export default {
this
.
getList
();
this
.
getList
();
},
},
getList
()
{
getList
()
{
util
.
showLoading
();
this
.
loading
=
true
;
this
.
loading
=
true
;
const
params
=
{
pageNum
:
this
.
pageNum
,
pageSize
:
10
,
phone
:
this
.
userInfo
?.
phone
||
""
};
const
params
=
{
pageNum
:
this
.
pageNum
,
pageSize
:
10
,
phone
:
this
.
userInfo
?.
phone
||
""
};
api
.
getApprovalPage
(
params
).
then
((
res
)
=>
{
api
.
getApprovalPage
(
params
).
then
((
res
)
=>
{
...
@@ -117,6 +118,7 @@ export default {
...
@@ -117,6 +118,7 @@ export default {
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
finished
=
true
;
this
.
finished
=
true
;
}).
finally
(()
=>
{
}).
finally
(()
=>
{
util
.
hideLoading
();
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
refreshing
=
false
;
this
.
refreshing
=
false
;
});
});
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment