Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_zhxy
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_zhxy
Commits
5150afd0
Commit
5150afd0
authored
Feb 18, 2025
by
zhaopanyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zpy 修改资产管理
parent
9bb8279a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
49 deletions
+80
-49
src/router/index.js
+1
-1
src/views/teacher/schoolProperty/deviceList.vue
+58
-41
src/views/teacher/schoolProperty/deviceListInfo.vue
+0
-0
src/views/teacher/schoolProperty/equipmentFix.vue
+21
-7
No files found.
src/router/index.js
View file @
5150afd0
...
...
@@ -31,7 +31,7 @@ const routes = [
children
:
[
{
path
:
"dd"
,
name
:
"d
d
"
,
name
:
"d
l
"
,
component
:
()
=>
import
(
"../views/dd.vue"
),
meta
:
{
requireAuth
:
true
,
...
...
src/views/teacher/schoolProperty/deviceList.vue
View file @
5150afd0
<
template
>
<van-nav-bar
title=
"设备报修"
left-text=
"返回"
left-arrow
@
click-left=
"goback"
></van-nav-bar>
<div
class=
"flexBLock searchBlock"
>
<van-search
class=
"searchInput"
@
search=
"onSearch"
v-model=
"searchKey"
placeholder=
"请输入设备名称"
/>
<van-icon
name=
"scan"
@
click=
"getCode"
/>
</div>
<van-nav-bar
title=
"设备报修"
left-text=
"返回"
left-arrow
@
click-left=
"goback"
></van-nav-bar>
<div
class=
"flexBLock searchBlock"
>
<van-search
class=
"searchInput"
@
search=
"onSearch"
v-model=
"searchKey"
placeholder=
"请输入设备名称"
/>
<van-icon
name=
"scan"
@
click=
"getCode"
/>
</div>
<van-pull-refresh
v-model=
"pullLoading"
@
refresh=
"onRefresh"
>
<van-list
v-model:loading=
"loading"
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"getList"
>
<div
style=
"position:relative;"
v-for=
"(item,index) in list"
:key=
"index"
class=
"listBlock"
>
<div
style=
"position:relative;"
v-for=
"(item,
index) in list"
:key=
"index"
class=
"listBlock"
>
<div>
自编码:
{{
item
.
encode
}}
</div>
<div>
设备名称:
{{
item
.
equipmentName
}}
</div>
<div>
型号:
{{
item
.
model
}}
</div>
<div>
型号:
{{
item
.
model
}}
</div>
<div>
安装时间:
{{
item
.
dateOfProduction
}}
</div>
<div>
地点:
{{
item
.
place
}}
</div>
<div>
报修日期:
{{
item
.
reportRepairTime
}}
</div>
<div>
报修人:
{{
item
.
reportRepair
}}
</div>
<div>
问题:
{{
item
.
problem
}}
</div>
<div
v-if=
"item.disposeState == 0"
class=
"flexBLock btnBlock"
>
<van-button
size=
"small"
round
type=
"primary"
class=
"btn"
@
click=
"toDetail('修改',item.id)"
>
修 改
</van-button>
<
van-button
size=
"small"
round
type=
"success"
class=
"btn"
@
click=
"toDetail('反馈',item.id)"
>
反 馈
</van-button
>
<van-button
size=
"small"
round
type=
"default"
class=
"btn"
@
click=
"toDetail('查看',item.id)"
>
查 看
</van-button>
<van-button
size=
"small"
round
type=
"primary"
class=
"btn"
@
click=
"toDetail('修改',
item.id)"
>
修 改
</van-button>
<
!--
<van-button
size=
"small"
round
type=
"success"
class=
"btn"
@
click=
"toDetail('反馈', item.id)"
>
反 馈
</van-button>
--
>
<van-button
size=
"small"
round
type=
"default"
class=
"btn"
@
click=
"toDetail('查看',
item.id)"
>
查 看
</van-button>
<van-button
size=
"small"
round
type=
"danger"
class=
"btn"
@
click=
"deleteDevice(item.id)"
>
删 除
</van-button>
</div>
<div
v-if=
"item.disposeState == 1"
>
<!--
<van-button
style=
"margin-right: 10px"
size=
"small"
round
type=
"success"
class=
"btn"
@
click=
"toDetail('反馈',item.id)"
>
反 馈
</van-button>
-->
<van-button
size=
"small"
round
type=
"default"
class=
"btn"
@
click=
"toDetail('查看',item.id)"
>
查 看
</van-button>
<div
v-if=
"item.disposeState == 1"
>
<!--
<van-button
style=
"margin-right: 10px"
size=
"small"
round
type=
"success"
class=
"btn"
@
click=
"toDetail('反馈',item.id)"
>
反 馈
</van-button>
-->
<van-button
size=
"small"
round
type=
"default"
class=
"btn"
@
click=
"toDetail('查看',
item.id)"
>
查 看
</van-button>
</div>
<div
class=
"state"
>
<div
v-if=
"item.repairState == 0 && item.disposeState == 1"
class=
"fixed"
>
已处理-已维修
</div>
<div
v-if=
"item.repairState == 1 && item.disposeState == 1"
class=
"unable"
>
已处理-已维修
</div>
<div
v-if=
"item.repairState == 1 && item.disposeState == 1"
class=
"unable"
>
已处理-已维修
</div>
</div>
</div>
</van-list>
...
...
@@ -34,17 +35,17 @@
</
template
>
<
script
setup
>
import
{
getDeviceList
,
deletEuipemnt
}
from
"@/service/schoolProperty"
import
{
getDeviceList
,
deletEuipemnt
}
from
"@/service/schoolProperty"
import
{
useRouter
}
from
"vue-router"
;
import
{
onMounted
,
ref
}
from
"vue"
;
import
{
useStore
}
from
"vuex"
;
import
{
Toast
}
from
"vant"
;
import
{
scanCodeFun
}
from
"../../../utils/scanCode"
;
import
{
onMounted
,
ref
}
from
"vue"
;
import
{
useStore
}
from
"vuex"
;
import
{
Toast
}
from
"vant"
;
import
{
scanCodeFun
}
from
"../../../utils/scanCode"
;
const
router
=
useRouter
();
const
store
=
useStore
();
const
id
=
store
.
state
.
userInfo
.
userId
;
console
.
log
(
'id'
,
id
)
console
.
log
(
'id'
,
id
)
const
rolesArr
=
store
.
state
.
userInfo
.
roles
;
let
searchKey
=
ref
(
''
)
const
loading
=
ref
(
false
)
...
...
@@ -53,7 +54,7 @@ const pullLoading = ref(false);
const
finished
=
ref
(
false
);
const
equipmentName
=
ref
(
''
)
onMounted
(
()
=>
{
onMounted
(()
=>
{
});
//获取列表数据
...
...
@@ -63,13 +64,13 @@ const getList = async () => {
// pageNum.value = 0;
pullLoading
.
value
=
false
;
}
let
result
=
await
getDeviceList
(
id
,
equipmentName
.
value
)
console
.
log
(
'result'
,
result
)
if
(
result
.
code
==
200
)
{
let
result
=
await
getDeviceList
(
id
,
equipmentName
.
value
)
console
.
log
(
'result'
,
result
)
if
(
result
.
code
==
200
)
{
loading
.
value
=
false
;
list
.
value
=
result
.
data
finished
.
value
=
true
}
else
{
}
else
{
Toast
(
"获取信息失败!"
);
finished
.
value
=
true
;
loading
.
value
=
false
;
...
...
@@ -77,14 +78,14 @@ const getList = async () => {
}
}
//搜索
const
onSearch
=
async
(
val
)
=>
{
const
onSearch
=
async
(
val
)
=>
{
list
.
value
=
[];
loading
.
value
=
true
;
finished
.
value
=
false
;
equipmentName
.
value
=
val
let
searchResult
=
await
getDeviceList
(
id
,
equipmentName
.
value
);
console
.
log
(
'searchResult'
,
searchResult
)
if
(
searchResult
.
code
==
200
)
{
let
searchResult
=
await
getDeviceList
(
id
,
equipmentName
.
value
);
console
.
log
(
'searchResult'
,
searchResult
)
if
(
searchResult
.
code
==
200
)
{
loading
.
value
=
false
;
list
.
value
=
searchResult
.
data
finished
.
value
=
true
...
...
@@ -106,25 +107,25 @@ const getCode = () => {
// })
}
//详情按钮
const
toDetail
=
(
name
,
id
)
=>
{
console
.
log
(
'id'
,
id
)
const
toDetail
=
(
name
,
id
)
=>
{
console
.
log
(
'id'
,
id
)
router
.
push
({
path
:
"/schoolProperty/device/info"
,
query
:{
name
:
name
,
id
:
id
path
:
"/schoolProperty/device/info"
,
query
:
{
name
:
name
,
id
:
id
}
})
}
//删除按钮
const
deleteDevice
=
async
(
id
)
=>
{
console
.
log
(
'id'
,
id
)
console
.
log
(
'id'
,
id
)
let
result
=
await
deletEuipemnt
(
id
)
if
(
result
.
code
==
200
)
{
if
(
result
.
code
==
200
)
{
Toast
.
success
(
"删除成功"
);
getList
()
}
console
.
log
(
'result'
,
result
)
console
.
log
(
'result'
,
result
)
}
//返回上一页
const
goback
=
()
=>
{
...
...
@@ -141,26 +142,42 @@ const onRefresh = () => {
</
script
>
<
style
scoped
>
.listBlock
.flexBLock
{
justify-content
:
start
;
display
:
flex
;
gap
:
10px
;
}
.btnBlock
{
flex-wrap
:
wrap
;
}
.btn
{
width
:
75px
;
margin-top
:
10px
;
}
.state
{
position
:
absolute
;
/* 自定义 van-button 的样式,减小内边距 */
.van-button
{
padding
:
4px
8px
;
/* 根据实际情况调整内边距 */
}
.state
{
position
:
absolute
;
top
:
0
;
right
:
0
;
}
.fixed
{
.fixed
{
background
:
#07c160
;
color
:
#FFFFFF
;
border-radius
:
5px
10px
;
width
:
100px
;
text-align
:
center
;
}
.unable
{
.unable
{
background
:
#1989fa
;
color
:
#FFFFFF
;
border-radius
:
5px
10px
;
...
...
src/views/teacher/schoolProperty/deviceListInfo.vue
View file @
5150afd0
This diff is collapsed.
Click to expand it.
src/views/teacher/schoolProperty/equipmentFix.vue
View file @
5150afd0
...
...
@@ -9,7 +9,7 @@
</div>
<van-pull-refresh
v-model=
"pullLoading"
@
refresh=
"onRefresh"
>
<van-list
v-model:loading=
"loading"
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"getList"
>
<div
style=
"position:relative;"
v-for=
"(item,index) in list"
:key=
"index"
class=
"listBlock"
@
click=
"toDetail(item)"
>
<div
style=
"position:relative;"
v-for=
"(item,index) in list"
:key=
"index"
class=
"listBlock"
>
<div>
自编码:{{ item.encode }}
</div>
<div>
设备名称:{{ item.equipmentName }}
</div>
<div>
修理人:{{ item.repairName }}
</div>
...
...
@@ -21,6 +21,9 @@
<div
v-if=
"item.disposeState == '1'"
class=
"fixed"
>
已完成
</div>
<div
v-if=
"item.disposeState == '0'"
class=
"unable"
>
待维修
</div>
</div>
<div
class=
"flexBLock btnBlock"
>
<van-button
size=
"small"
round
type=
"success"
class=
"btn"
@
click=
"toDetails('反馈', item.id)"
>
反 馈
</van-button>
</div>
</div>
</van-list>
</van-pull-refresh>
...
...
@@ -129,16 +132,27 @@ const getList = async () => {
// })
// }
//详情按钮
const
toDetail
=
(
item
)
=>
{
console
.
log
(
'item'
,
item
)
// const toDetail = (item) => {
// console.log('item',item)
// router.push({
// path:"/schoolProperty/equipmentFix/equipmentFixDetail",
// query:{
// id:item.id
// }
// })
// }
//反馈按钮
const
toDetails
=
(
name
,
id
)
=>
{
console
.
log
(
'id'
,
id
,
name
)
router
.
push
({
path
:
"/schoolProperty/equipmentFix/equipmentFixDetail"
,
query
:{
id
:
item
.
id
path
:
"/schoolProperty/device/info"
,
query
:
{
name
:
name
,
id
:
id
}
})
}
//返回上一页
const
goback
=
()
=>
{
router
.
back
();
...
...
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