Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zghywpc-vue
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
李苏
zghywpc-vue
Commits
8db2c804
Commit
8db2c804
authored
Oct 21, 2024
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备检修信息
parent
72697f0f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
201 additions
and
144 deletions
+201
-144
addgjmx.vue
src/views/sbjxgl/sbjxxx/addgjmx.vue
+2
-2
edit.vue
src/views/sbjxgl/sbjxxx/edit.vue
+176
-99
index.vue
src/views/sbjxgl/sbjxxx/index.vue
+23
-43
No files found.
src/views/sbjxgl/sbjxxx/addgjmx.vue
View file @
8db2c804
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
give
:(
row
)
=>
{
give
:(
row
)
=>
{
this
.
form
.
code
=
row
.
code
this
.
form
.
code
=
row
.
code
this
.
form
.
cz
=
row
.
cz
this
.
form
.
cz
=
row
.
cz
this
.
form
.
gg
xh
=
row
.
ggxh
this
.
form
.
gg
=
row
.
gg
}
}
}
}
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
{
{
label
:
'规格型号'
,
label
:
'规格型号'
,
readonly
:
true
,
readonly
:
true
,
prop
:
'gg
xh
'
,
prop
:
'gg'
,
span
:
12
,
span
:
12
,
type
:
'input'
,
type
:
'input'
,
},
},
...
...
src/views/sbjxgl/sbjxxx/edit.vue
View file @
8db2c804
<
template
>
<
template
>
<RelDialog
@
getForm=
'getForm'
ref=
"reldialog"
width=
"80vw"
:type=
'type'
:editApp=
'editApp'
:app=
'app'
:buttonApp=
'buttonApp'
>
<RelDialog
@
getForm=
'getForm'
ref=
"reldialog"
width=
"80vw"
:type=
'type'
:editApp=
'editApp'
:app=
'app'
:buttonApp=
'buttonApp'
>
<el-form
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"120px"
:rules=
"rules"
<el-form
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"120px"
:rules=
"rules"
style=
"height: 70vh;overflow: auto;overflow-x: hidden;"
>
style=
"height: 70vh;overflow: auto;overflow-x: hidden;"
>
<addgjmx
@
save=
'addgjmxbc'
v-if=
"showDialog&&DialogTitle=='新增工具'"
:app=
"this"
></addgjmx>
<addgjmx
@
save=
'addgjmxbc'
v-if=
"showDialog&&DialogTitle=='新增工具'"
:app=
"this"
></addgjmx>
...
@@ -37,32 +38,38 @@
...
@@ -37,32 +38,38 @@
<editTableForEdit
:phsxTitle=
'false'
:expandTitle=
'false'
code=
'false'
:AuxButton=
'false'
:indexApp=
'app'
<editTableForEdit
:phsxTitle=
'false'
:expandTitle=
'false'
code=
'false'
:AuxButton=
'false'
:indexApp=
'app'
:type=
'type'
ref=
"editTableForEdit1"
:editTableTitle=
'editTableTitle3'
:editTableData=
"editTableData3"
>
:type=
'type'
ref=
"editTableForEdit1"
:editTableTitle=
'editTableTitle3'
:editTableData=
"editTableData3"
>
<
template
v-if=
"type!='view'"
#
toolbar=
"ctx"
>
<
template
v-if=
"type!='view'"
#
toolbar=
"ctx"
>
<el-button
@
click=
"addhcmx"
size=
'mini'
type=
"primary"
>
新增耗材
</el-button>
<el-button
@
click=
"addhcmx"
size=
'mini'
type=
"primary"
>
新增耗材
</el-button>
</
template
>
</
template
>
</editTableForEdit>
</editTableForEdit>
</div>
</div>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"完工附件"
name=
"4"
>
<el-tab-pane
label=
"完工附件"
name=
"4"
>
<!-- 上传div-->
<!-- 上传div-->
<div
style=
"border-bottom: 1px solid #eee;padding-bottom: 20px;"
>
<div
style=
"border-bottom: 1px solid #eee;padding-bottom: 20px;"
>
<span
style=
"line-height: 40px;font-size: 16px;font-weight: 700;color: #666;"
>
附件上传
</span>
<span
style=
"line-height: 40px;font-size: 16px;font-weight: 700;color: #666;"
>
附件上传
</span>
<div
class=
"upload padding-10"
>
<div
class=
"upload padding-10"
>
<el-upload
<el-upload
class=
"upload-demo"
ref=
"upload"
action=
"https://jsonplaceholder.typicode.com/posts/"
:headers=
'{
:on-success=
"success"
Gtoken
:file-list=
"fileList"
>
}'
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
:data=
"{
</el-upload>
groupid:'',
folder:'usbjx'
}"
class=
"upload-demo"
:action=
"`${baseurl}/jxgl/usbjx/attachment/upload`"
:on-success=
'success'
:on-remove=
"handleRemove"
:file-list=
"fileList"
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
</el-upload>
</div>
</div>
</div>
</div>
<div
v-if=
"type!='add'"
>
<div
v-if=
"type!='add'"
>
<span
style=
"line-height: 40px;font-size: 16px;font-weight: 700;color: #666;"
>
附件列表
</span>
<span
style=
"line-height: 40px;font-size: 16px;font-weight: 700;color: #666;"
>
附件列表
</span>
<div
class=
"download padding-10"
>
<div
class=
"download padding-10"
>
<div
v-for=
"(item,index) in downList"
:key=
"index"
class=
"fileList"
>
<div
v-for=
"(item,index) in downList"
:key=
"index"
class=
"fileList"
>
<div
class=
"index"
>
<div
class=
"index"
>
{{index+1}}
{{index+1}}
</div>
</div>
...
@@ -70,14 +77,14 @@
...
@@ -70,14 +77,14 @@
{{item.name}}
{{item.name}}
</div>
</div>
<div
class=
"size"
>
<div
class=
"size"
>
{{item.size}}
{{item.size}}
</div>
</div>
<div
class=
"down"
>
<div
class=
"down"
>
<span
style=
"color: cornflowerblue;cursor: pointer;"
>
下载
</span>
<span
style=
"color: cornflowerblue;cursor: pointer;"
>
下载
</span>
</div>
</div>
<div
class=
"del"
>
<div
class=
"del"
>
<span
style=
"color: red;cursor: pointer;"
>
删除
</span>
<span
style=
"color: red;cursor: pointer;"
>
删除
</span>
</div>
</div>
</div>
</div>
...
@@ -88,22 +95,27 @@
...
@@ -88,22 +95,27 @@
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</el-form>
</el-form>
<div
slot=
"reFooter"
class=
"refooter"
>
<div
slot=
"reFooter"
class=
"refooter"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"app.showDialog=false"
>
取 消
</el-button
>
<!-- <el-button @click="app.showDialog=false">取 消</el-button> --
>
<el-button
type=
"primary"
@
click=
"save()"
>
保 存
</el-button>
<el-button
type=
"primary"
@
click=
"save()"
>
保 存
</el-button>
</span>
</span>
</div>
</div>
</RelDialog>
</RelDialog>
</template>
</template>
<
script
>
<
script
>
import
addgjmx
from
'./addgjmx.vue'
import
addgjmx
from
'./addgjmx.vue'
import
addbpbjmx
from
'./addbpbjmx.vue'
import
addbpbjmx
from
'./addbpbjmx.vue'
import
addhcmx
from
'./addhcmx.vue'
import
addhcmx
from
'./addhcmx.vue'
import
{
autoAttachDownload
,
}
from
"common/src/api/system/dmgSystem.js"
;
import
{
import
{
editMixin
editMixin
}
from
'common'
}
from
'common'
import
sbxx
from
'@/views/auxinput/sbxx'
import
sbxx
from
'@/views/auxinput/sbxx'
const
baseurl
=
process
.
env
.
VUE_APP_BASE_API
const
Gtoken
=
localStorage
.
getItem
(
'Gtoken'
)
export
default
{
export
default
{
mixins
:
[
editMixin
],
mixins
:
[
editMixin
],
components
:
{
components
:
{
...
@@ -111,41 +123,45 @@
...
@@ -111,41 +123,45 @@
addbpbjmx
,
addbpbjmx
,
addhcmx
addhcmx
},
},
computed
:{
computed
:
{
sfsybpbj
(){
sfsybpbj
()
{
return
this
.
form
.
sfsybpbj
return
this
.
form
.
sfsybpbj
},
},
sfsyhc
(){
sfsyhc
()
{
return
this
.
form
.
sfsyhc
return
this
.
form
.
sfsyhc
}
}
},
},
watch
:{
watch
:
{
sfsybpbj
(
v
){
sfsybpbj
(
v
)
{
if
(
v
==
'Y'
)
{
if
(
v
==
'Y'
)
{
this
.
activeName
=
'2'
this
.
activeName
=
'2'
}
else
{
}
else
{
this
.
activeName
=
'1'
this
.
activeName
=
'1'
}
}
},
},
sfsyhc
(
v
){
sfsyhc
(
v
)
{
if
(
v
==
'Y'
)
{
if
(
v
==
'Y'
)
{
this
.
activeName
=
'3'
this
.
activeName
=
'3'
}
else
{
}
else
{
this
.
activeName
=
'1'
this
.
activeName
=
'1'
}
}
}
}
},
},
data
()
{
data
()
{
return
{
return
{
fileList
:[],
form
:{
downList
:[
attachmentList
:[]
{
},
name
:
'测试1'
,
Gtoken
:
Gtoken
,
size
:
'200kb'
,
baseurl
:
baseurl
,
fileList
:
[],
downList
:
[{
name
:
'测试1'
,
size
:
'200kb'
,
},
},
{
{
name
:
'测试2'
,
name
:
'测试2'
,
size
:
'2030kb'
,
size
:
'2030kb'
,
}
}
],
],
...
@@ -170,7 +186,7 @@
...
@@ -170,7 +186,7 @@
},
},
{
{
label
:
'规格型号'
,
label
:
'规格型号'
,
prop
:
'gg
xh
'
,
prop
:
'gg'
,
}
}
],
],
...
@@ -218,7 +234,7 @@
...
@@ -218,7 +234,7 @@
activeName
:
'1'
,
activeName
:
'1'
,
editColItemList
:
[{
editColItemList
:
[{
label
:
'设备名称'
,
label
:
'设备名称'
,
prop
:
'sbxx
Cod
e'
,
prop
:
'sbxx
Nam
e'
,
span
:
12
,
span
:
12
,
required
:
true
,
required
:
true
,
type
:
'AuxInput'
,
type
:
'AuxInput'
,
...
@@ -285,66 +301,120 @@
...
@@ -285,66 +301,120 @@
}
}
},
},
methods
:
{
methods
:
{
getForm
(
form
){
handleRemove
(
file
,
fileList
)
{
this
.
$post
(
'jxgl/ujxgj/query'
,{
let
attachmentList
=
[]
mid
:
form
.
id
fileList
.
forEach
(
item
=>
{
}).
then
(
res
=>
{
if
(
item
.
status
==
'success'
)
{
res
.
data
.
records
.
forEach
(
item
=>
{
attachmentList
.
push
(
item
.
response
.
data
.
id
)
}
})
this
.
form
.
attachmentList
=
attachmentList
},
success
(
res
,
file
,
fileList
)
{
console
.
log
(
res
,
'asdasdas'
)
if
(
res
.
success
)
{
this
.
$success
(
'上传成功'
)
/* 成功后同步fileList数据到form表单*/
let
attachmentList
=
[]
fileList
.
forEach
(
item
=>
{
if
(
item
.
status
==
'success'
)
{
attachmentList
.
push
(
item
.
response
.
data
.
id
)
}
})
this
.
form
.
attachmentList
=
attachmentList
}
else
{
const
delIndex
=
fileList
.
findIndex
(
item
=>
item
.
uid
===
file
.
uid
);
if
(
delIndex
!==
-
1
)
{
fileList
.
splice
(
delIndex
,
1
);
this
.
$error
(
res
.
message
||
'未知错误'
);
}
}
},
getForm
(
form
)
{
/* 获取附件*/
this
.
$post
(
'jxgl/ujxgj/attachment/list'
,
{
groupid
:
form
.
id
,
}).
then
(
res
=>
{
res
.
data
.
records
.
forEach
(
item
=>
{
autoAttachDownload
({},
'jxgl/ujxgj'
,
item
.
id
).
then
(
res
=>
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/'
+
item
.
type
+
';charset=UTF-8'
,
});
let
url
=
URL
.
createObjectURL
(
blob
)
let
uitem
=
{
url
,
id
:
item
.
id
}
this
.
downList
.
push
(
uitem
)
})
})
})
this
.
$post
(
'jxgl/ujxgj/query'
,
{
mid
:
form
.
id
}).
then
(
res
=>
{
res
.
data
.
records
.
forEach
(
item
=>
{
this
.
editTableData1
.
push
(
item
)
this
.
editTableData1
.
push
(
item
)
console
.
log
(
this
.
editTableData1
,
'this.editTableData1'
)
})
})
})
})
this
.
$post
(
'jxgl/ujxwl/query'
,{
this
.
$post
(
'jxgl/ujxwl/query'
,
{
mid
:
form
.
id
mid
:
form
.
id
}).
then
(
res
=>
{
}).
then
(
res
=>
{
res
.
data
.
records
.
forEach
(
item
=>
{
res
.
data
.
records
.
forEach
(
item
=>
{
this
.
editTableData3
.
push
(
item
)
this
.
editTableData3
.
push
(
item
)
})
})
})
})
this
.
$post
(
'jxgl/ubpbj/query'
,{
this
.
$post
(
'jxgl/ubpbj/query'
,
{
mid
:
form
.
id
mid
:
form
.
id
}).
then
(
res
=>
{
}).
then
(
res
=>
{
res
.
data
.
records
.
forEach
(
item
=>
{
res
.
data
.
records
.
forEach
(
item
=>
{
this
.
editTableData2
.
push
(
item
)
this
.
editTableData2
.
push
(
item
)
})
})
})
})
},
},
save
(){
save
()
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
type
==
'add'
){
if
(
this
.
type
==
'add'
)
{
let
params
=
{
let
params
=
{
details
:
[{
details
:
[{
id
:
'U_JXGJ'
,
id
:
'U_JXGJ'
,
records
:
[...
this
.
editTableData1
]
||
[]
records
:
[...
this
.
editTableData1
]
||
[]
},
},
{
{
id
:
'U_JXWL'
,
id
:
'U_JXWL'
,
records
:
[...
this
.
editTableData3
]
||
[]
records
:
[...
this
.
editTableData3
]
||
[]
},
},
{
{
id
:
'U_BPBJ'
,
id
:
'U_BPBJ'
,
records
:
[...
this
.
editTableData2
]
||
[]
records
:
[...
this
.
editTableData2
]
||
[]
}],
}
master
:
this
.
form
],
}
master
:
this
.
form
this
.
$post
(
'jxgl/usbjx/add'
,
params
).
then
(
res
=>
{
}
if
(
res
.
success
){
this
.
$post
(
'jxgl/usbjx/add'
,
params
).
then
(
res
=>
{
this
.
$success
(
'添加成功'
)
if
(
res
.
success
)
{
this
.
$refs
.
reldialog
.
closeAll
()
this
.
$success
(
'添加成功'
)
}
this
.
$refs
.
reldialog
.
closeAll
()
})
this
.
app
.
refresh
()
}
})
}
}
}
}
})
})
},
},
success
(
response
,
file
,
fileList
){
console
.
log
(
response
,
file
,
fileList
)
},
savehc
(
data
)
{
savehc
(
data
)
{
let
ndata
=
_
.
cloneDeep
(
data
)
let
ndata
=
_
.
cloneDeep
(
data
)
this
.
editTableData3
.
push
(
ndata
)
this
.
editTableData3
.
push
(
ndata
)
...
@@ -375,34 +445,41 @@
...
@@ -375,34 +445,41 @@
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.el-tooltip
{
::v-deep
.el-tooltip
{
display
:
none
;
display
:
none
;
}
}
.download
{
.download
{
width
:
100%
;
width
:
100%
;
border-top
:
1px
solid
#eee
;
border-top
:
1px
solid
#eee
;
}
}
.fileList
{
.fileList
{
display
:
flex
;
display
:
flex
;
line-height
:
35px
;
line-height
:
35px
;
width
:
100%
;
width
:
100%
;
border-bottom
:
1px
solid
#eee
;
border-bottom
:
1px
solid
#eee
;
text-align
:
center
;
text-align
:
center
;
.index
{
.index
{
width
:
5%
;
width
:
5%
;
}
}
.name
{
.name
{
width
:
35%
;
width
:
35%
;
}
}
.size
{
.size
{
width
:
20%
;
width
:
20%
;
}
}
.down
{
.down
{
width
:
20%
;
width
:
20%
;
}
}
.del
{
.del
{
width
:
20%
;
width
:
20%
;
}
}
}
}
...
...
src/views/sbjxgl/sbjxxx/index.vue
View file @
8db2c804
<
template
>
<
template
>
<BasePage
class=
"min_full"
:config=
"config"
>
<BasePage
:power=
'power'
class=
"min_full"
:config=
"config"
>
<template
#
dialog=
"ctx"
>
<template
#
dialog=
"ctx"
>
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</
template
>
</
template
>
...
@@ -17,8 +17,23 @@
...
@@ -17,8 +17,23 @@
name
:
'sbjxxx'
,
name
:
'sbjxxx'
,
data
()
{
data
()
{
return
{
return
{
power
:
{
add
:
true
,
copy
:
false
,
/* 手动控制删除 */
delButton
:
true
,
/* 手动控制编辑按钮权限 */
editButton
:
true
,
/* 是否渲染右侧操作按钮 */
operateButtons
:
true
,
/* 是否开启工作流按钮 */
workFlow
:
false
,
/* 表格开启选择,以及记住选择 */
showSelection
:
false
,
saveSelected
:
false
},
config
:
{
config
:
{
queryDetail
:
true
,
/* 基本配置*/
/* 基本配置*/
url
:
'jxgl/usbjx'
,
url
:
'jxgl/usbjx'
,
tableTitle
:
[{
tableTitle
:
[{
...
@@ -43,49 +58,14 @@
...
@@ -43,49 +58,14 @@
width
:
350
width
:
350
},
},
{
{
title
:
"备品备件名称"
,
title
:
"备品备件使用"
,
field
:
"bpbjmc"
,
field
:
"sfsybpbj"
,
width
:
130
fieldType
:
"checkbox"
},
{
title
:
"备品备件编码"
,
field
:
"bpbjbm"
,
width
:
130
},
{
title
:
"备品备件材料牌号"
,
field
:
"bpbjclph"
,
width
:
200
},
{
title
:
"备品备件规格"
,
field
:
"bpbjgg"
,
width
:
130
},
{
title
:
"检修内容"
,
field
:
"jxnr"
,
width
:
350
},
{
title
:
"检修时间"
,
field
:
"jxsj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"检修方法"
,
field
:
"jxffid"
,
width
:
140
,
transform
:
{
url
:
'jxgl/ujxzyff/query'
,
"label"
:
"name"
,
"value"
:
"id"
}
},
},
{
{
title
:
"
完工报告
"
,
title
:
"
耗材使用
"
,
field
:
"
wgbg
"
,
field
:
"
sfsyhc
"
,
width
:
350
fieldType
:
"checkbox"
},
},
{
{
title
:
"备注"
,
title
:
"备注"
,
...
...
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