Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
4f6c4305
authored
2023-05-09 15:19:27 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:宗地基本信息
1 parent
7f417239
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1036 additions
and
1009 deletions
src/views/components/imagePreview.vue
src/views/registerBook/zdjbxx.vue
src/views/workflow/components/clxx.vue
src/views/workflow/components/clxxUnify.vue
src/views/workflow/components/clxxAddDialog.vue → src/views/workflow/components/dialog/clxxAddDialog.vue
src/views/components/imagePreview.vue
View file @
4f6c430
...
...
@@ -17,8 +17,9 @@
<div
class=
"thumb-wrap"
>
<div
class=
"thumb-wrap-button"
>
<el-button
type=
"primary"
@
click=
"clickImage"
>
(放大) 显示(缩小)
</el-button>
<el-upload
class=
"fileUpdate"
action=
""
:show-file-list=
"false"
multiple
:auto-upload=
"false"
:on-change=
"handleChange"
accept=
".JPG, .PNG, .JPEG,.jpg, .png, .jpeg"
:before-upload=
"beforeUpload"
>
<el-upload
class=
"fileUpdate"
ref=
"upload"
action=
""
:show-file-list=
"false"
:multiple=
"true"
:auto-upload=
"false"
:on-change=
"handleChange"
accept=
".JPG, .PNG, .JPEG,.jpg, .png, .jpeg"
:before-upload=
"beforeUpload"
>
<el-button
icon=
"el-icon-upload"
type=
"primary"
v-if=
"!this.$route.query.viewtype"
>
上传
</el-button>
</el-upload>
<el-button
type=
"primary"
icon=
"el-icon-delete-solid"
@
click=
"handleDelete"
v-if=
"!this.$route.query.viewtype"
>
删除
</el-button>
...
...
@@ -36,262 +37,273 @@
</div>
</
template
>
<
script
>
import
PhotoZoom
from
'@/components/PhotoZoom'
import
{
uploadSjClmx
,
deleteClmx
}
from
"@/api/clxx.js"
;
import
publicPicture
from
'@/components/publicPicture/index.vue'
export
default
{
name
:
'PreviewImage'
,
props
:
{
previewImg
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
components
:
{
PhotoZoom
,
publicPicture
},
data
()
{
return
{
transform
:
{
scale
:
1
,
degree
:
0
},
// 缩略图
thumbnailImages
:
[],
showViewer
:
false
,
initialIndex
:
undefined
,
allLi
:
[],
}
},
watch
:
{
previewImg
:
{
handler
(
newValue
,
oldValue
)
{
this
.
allLi
=
_
.
cloneDeep
(
newValue
.
imgList
).
map
(
item
=>
item
.
fjurl
)
this
.
thumbnailImages
=
newValue
.
imgList
},
deep
:
true
}
},
created
()
{
this
.
allLi
=
_
.
cloneDeep
(
this
.
previewImg
.
imgList
).
map
(
item
=>
item
.
fjurl
)
this
.
thumbnailImages
=
this
.
previewImg
.
imgList
},
computed
:
{
isFirst
()
{
return
this
.
previewImg
.
index
===
0
},
isLast
()
{
return
this
.
previewImg
.
index
===
this
.
previewImg
.
imgList
.
length
-
1
}
},
methods
:
{
prev
()
{
let
len
=
this
.
previewImg
.
imgList
.
length
if
(
this
.
isFirst
||
len
==
0
)
{
this
.
$emit
(
'prevPriview'
)
}
else
{
this
.
$parent
.
previewImg
.
index
=
(
this
.
$parent
.
previewImg
.
index
-
1
+
len
)
%
len
import
PhotoZoom
from
'@/components/PhotoZoom'
import
{
uploadSjClmx
,
deleteClmx
}
from
"@/api/clxx.js"
;
import
publicPicture
from
'@/components/publicPicture/index.vue'
export
default
{
name
:
'PreviewImage'
,
props
:
{
previewImg
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
next
()
{
let
len
=
this
.
previewImg
.
imgList
.
length
if
(
this
.
isLast
||
len
==
0
)
{
this
.
$emit
(
'nextPriview'
)
}
else
{
this
.
$parent
.
previewImg
.
index
=
(
this
.
$parent
.
previewImg
.
index
+
1
)
%
len
}
components
:
{
PhotoZoom
,
publicPicture
},
showCurrent
(
index
)
{
this
.
previewImg
.
index
=
index
data
()
{
return
{
transform
:
{
scale
:
1
,
degree
:
0
},
maxLength
:
0
,
// 缩略图
thumbnailImages
:
[],
showViewer
:
false
,
initialIndex
:
undefined
,
allLi
:
[],
}
},
closeViewer
()
{
this
.
showViewer
=
false
watch
:
{
previewImg
:
{
handler
(
newValue
,
oldValue
)
{
this
.
allLi
=
_
.
cloneDeep
(
newValue
.
imgList
).
map
(
item
=>
item
.
fjurl
)
this
.
thumbnailImages
=
newValue
.
imgList
},
deep
:
true
}
},
clickImage
()
{
this
.
showViewer
=
true
created
()
{
this
.
maxLength
=
0
;
this
.
allLi
=
_
.
cloneDeep
(
this
.
previewImg
.
imgList
).
map
(
item
=>
item
.
fjurl
)
this
.
thumbnailImages
=
this
.
previewImg
.
imgList
},
// 上传
beforeUpload
(
file
)
{
const
isJPEG
=
file
.
type
===
'image/jpeg'
const
isPNG
=
file
.
type
===
'image/png'
const
isJPG
=
file
.
type
===
'image/jpg'
const
isGIF
=
file
.
type
===
'image/gif'
const
isLt5M
=
file
.
size
/
1024
/
1024
<
5
if
(
!
isJPEG
&&
!
isGIF
&&
!
isPNG
&&
!
isJPG
&&
!
isGIF
)
{
this
.
$message
.
error
(
'请选择jpeg/png/jpg/bmp/gif格式的图片后重试'
)
this
.
loading
=
false
}
if
(
!
isLt5M
)
{
this
.
$message
.
error
(
'上传图片大小不能超过 5MB!'
)
this
.
loading
=
false
computed
:
{
isFirst
()
{
return
this
.
previewImg
.
index
===
0
},
isLast
()
{
return
this
.
previewImg
.
index
===
this
.
previewImg
.
imgList
.
length
-
1
}
this
.
imgHidden
=
(
isJPG
||
isJPEG
||
isPNG
||
isGIF
)
&&
isLt5M
return
this
.
imgHidden
},
async
handleChange
(
file
)
{
let
data
=
_
.
cloneDeep
(
this
.
previewImg
.
imgList
[
this
.
previewImg
.
index
])
var
formdata
=
new
FormData
();
formdata
.
append
(
"file"
,
file
.
raw
);
formdata
.
append
(
"bsmSj"
,
this
.
previewImg
.
bsmSj
);
formdata
.
append
(
"bsmSlsq"
,
this
.
previewImg
.
bsmSlsq
);
uploadSjClmx
(
formdata
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$emit
(
'updateList'
,
res
.
result
)
this
.
$message
({
message
:
'上传成功!'
,
type
:
'success'
})
methods
:
{
prev
()
{
let
len
=
this
.
previewImg
.
imgList
.
length
if
(
this
.
isFirst
||
len
==
0
)
{
this
.
$emit
(
'prevPriview'
)
}
else
{
this
.
$parent
.
previewImg
.
index
=
(
this
.
$parent
.
previewImg
.
index
-
1
+
len
)
%
len
}
})
},
handleDelete
()
{
let
that
=
this
this
.
$confirm
(
'此操作将永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
async
()
=>
{
let
bsmClmx
=
this
.
previewImg
.
imgList
[
this
.
previewImg
.
index
].
bsmClmx
deleteClmx
(
bsmClmx
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
that
.
$emit
(
'updateList'
,
res
.
result
)
that
.
$message
({
message
:
'删除成功!'
,
type
:
'success'
})
}
},
next
()
{
let
len
=
this
.
previewImg
.
imgList
.
length
if
(
this
.
isLast
||
len
==
0
)
{
this
.
$emit
(
'nextPriview'
)
}
else
{
this
.
$parent
.
previewImg
.
index
=
(
this
.
$parent
.
previewImg
.
index
+
1
)
%
len
}
},
showCurrent
(
index
)
{
this
.
previewImg
.
index
=
index
},
closeViewer
()
{
this
.
showViewer
=
false
},
clickImage
()
{
this
.
showViewer
=
true
},
// 上传
beforeUpload
(
file
)
{
const
isJPEG
=
file
.
type
===
'image/jpeg'
const
isPNG
=
file
.
type
===
'image/png'
const
isJPG
=
file
.
type
===
'image/jpg'
const
isGIF
=
file
.
type
===
'image/gif'
const
isLt5M
=
file
.
size
/
1024
/
1024
<
5
if
(
!
isJPEG
&&
!
isGIF
&&
!
isPNG
&&
!
isJPG
&&
!
isGIF
)
{
this
.
$message
.
error
(
'请选择jpeg/png/jpg/bmp/gif格式的图片后重试'
)
this
.
loading
=
false
}
if
(
!
isLt5M
)
{
this
.
$message
.
error
(
'上传图片大小不能超过 5MB!'
)
this
.
loading
=
false
}
this
.
imgHidden
=
(
isJPG
||
isJPEG
||
isPNG
||
isGIF
)
&&
isLt5M
return
this
.
imgHidden
},
async
handleChange
(
file
,
files
)
{
// 清空 fileList 数组
let
length
=
files
.
length
;
this
.
maxLength
=
Math
.
max
(
length
,
this
.
maxLength
)
this
.
$refs
.
upload
.
clearFiles
();
setTimeout
(()
=>
{
if
(
length
!==
this
.
maxLength
)
return
console
.
log
(
files
);
// let data = _.cloneDeep(this.previewImg.imgList[this.previewImg.index])
var
formData
=
new
FormData
();
files
.
forEach
(
file
=>
{
formData
.
append
(
'file'
,
file
.
raw
)
})
formData
.
append
(
"bsmSj"
,
this
.
previewImg
.
bsmSj
);
formData
.
append
(
"bsmSlsq"
,
this
.
previewImg
.
bsmSlsq
);
uploadSjClmx
(
formData
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
$emit
(
'updateList'
,
res
.
result
)
this
.
$message
({
message
:
'上传成功!'
,
type
:
'success'
})
}
})
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
},
handleDelete
()
{
let
that
=
this
this
.
$confirm
(
'此操作将永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
async
()
=>
{
let
bsmClmx
=
this
.
previewImg
.
imgList
[
this
.
previewImg
.
index
].
bsmClmx
deleteClmx
(
bsmClmx
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
that
.
$emit
(
'updateList'
,
res
.
result
)
that
.
$message
({
message
:
'删除成功!'
,
type
:
'success'
})
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
})
})
}
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
//
查看大图
.rlPopup
{
position
:
relative
;
width
:
100%
;
text-align
:
center
;
height
:
100%
;
.handle-btn
{
position
:
absolute
;
top
:
50%
;
transform
:
translateY
(
-100%
);
width
:
66px
;
height
:
66px
;
line-height
:
75px
;
color
:
#fff
;
background-color
:
rgb
(
239
,
239
,
239
);
border-radius
:
50%
;
cursor
:
pointer
;
//
查看大图
.rlPopup
{
position
:
relative
;
width
:
100%
;
text-align
:
center
;
transition
:
all
0.3s
;
i
{
font-size
:
24px
;
}
}
.handle-btn
:hover
{
background-color
:
rgb
(
185
,
183
,
183
);
}
height
:
100%
;
.handle-btn
{
position
:
absolute
;
top
:
50%
;
transform
:
translateY
(
-100%
);
width
:
66px
;
height
:
66px
;
line-height
:
75px
;
color
:
#fff
;
background-color
:
rgb
(
239
,
239
,
239
);
border-radius
:
50%
;
cursor
:
pointer
;
text-align
:
center
;
transition
:
all
0.3s
;
.prev
{
left
:
1%
;
}
i
{
font-size
:
24px
;
}
}
.next
{
right
:
1%
;
}
.handle-btn
:hover
{
background-color
:
rgb
(
185
,
183
,
183
)
;
}
.img-list-wrap
{
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
height
:
calc
(
100%
-
80px
);
align-items
:
center
;
background
:
rgba
(
194
,
190
,
190
,
0.1
);
overflow
:
scroll
;
.prev
{
left
:
1%
;
}
img
{
display
:
block
;
object-fit
:
scale-down
;
transition
:
all
0.3s
;
max-width
:
100%
;
.next
{
right
:
1%
;
}
}
.thumb
-wrap
{
&-button
{
.img-list
-wrap
{
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
height
:
calc
(
100%
-
80px
);
align-items
:
center
;
background
:
rgba
(
194
,
190
,
190
,
0.1
);
overflow
:
scroll
;
.fileUpdate
{
margin
:
0
10px
;
img
{
display
:
block
;
object-fit
:
scale-down
;
transition
:
all
0.3s
;
max-width
:
100%
;
}
}
li
{
float
:
left
;
width
:
60px
;
height
:
45px
;
border
:
solid
1px
#ececec
;
position
:
relative
;
margin-right
:
5px
;
cursor
:
pointer
;
.thumb-wrap
{
&-button
{
display
:
flex
;
justify-content
:
center
;
&:last-child
{
margin-right
:
0
;
.fileUpdate
{
margin
:
0
10px
;
}
}
img
{
max-width
:
57px
;
max-height
:
42px
;
display
:
block
;
object-fit
:
scale-down
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
li
{
float
:
left
;
width
:
60px
;
height
:
45px
;
border
:
solid
1px
#ececec
;
position
:
relative
;
margin-right
:
5px
;
cursor
:
pointer
;
&:last-child
{
margin-right
:
0
;
}
img
{
max-width
:
57px
;
max-height
:
42px
;
display
:
block
;
object-fit
:
scale-down
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
}
}
}
.active
{
border-color
:
#409eff
;
.active
{
border-color
:
#409eff
;
}
}
}
}
</
style
>
<
style
>
.zoom-on-hover
{
position
:
relative
;
overflow
:
hidden
;
}
.zoom-on-hover
{
position
:
relative
;
overflow
:
hidden
;
}
.zoom-on-hover
.normal
{
width
:
100%
;
}
.zoom-on-hover
.normal
{
width
:
100%
;
}
.zoom-on-hover
.zoom
{
position
:
absolute
;
opacity
:
0
;
transform-origin
:
top
left
;
}
.zoom-on-hover
.zoom
{
position
:
absolute
;
opacity
:
0
;
transform-origin
:
top
left
;
}
.zoom-on-hover.zoomed
.zoom
{
opacity
:
1
;
}
.zoom-on-hover.zoomed
.zoom
{
opacity
:
1
;
}
.zoom-on-hover.zoomed
.normal
{
opacity
:
0
;
}
.zoom-on-hover.zoomed
.normal
{
opacity
:
0
;
}
</
style
>
...
...
src/views/registerBook/zdjbxx.vue
View file @
4f6c430
...
...
@@ -39,7 +39,7 @@
</tr>
<tr>
<td>
权利设定方式
</td>
<td>
{{
zdjbxx
.
qlsdfs
}}
</td>
<td>
{{
zdjbxx
.
qlsdfs
|
qlsdfs
}}
</td>
<td>
容积率
</td>
<td>
{{
zdjbxx
.
rjl
}}
</td>
</tr>
...
...
@@ -122,79 +122,87 @@
<td>
{{
zdbhqks
[
0
].
dbr
}}
</td>
</tr>
-->
</table>
</div>
</
template
>
<
script
>
import
{
getZdjjxxBybdcdyid
}
from
"@/api/registerBook.js"
;
import
store
from
'@/store/index.js'
import
{
getZdjjxxBybdcdyid
}
from
"@/api/registerBook.js"
;
export
default
{
data
()
{
return
{
bhqkColumns
:
[
{
prop
:
"ssywh"
,
label
:
"上手业务号"
,
},
{
prop
:
"zddm"
,
label
:
"宗地代码"
,
},
{
prop
:
"bhqzddm"
,
label
:
"变化前宗地代码"
,
},
{
prop
:
"bhnr"
,
label
:
"变化内容"
,
},
{
prop
:
"bhyy"
,
label
:
"变化原因"
,
},
{
prop
:
"djsj"
,
label
:
"登记时间"
,
},
{
prop
:
"dbr"
,
label
:
"登簿人"
,
},
{
prop
:
"fj"
,
label
:
"附记"
,
},
],
bhqkTableWidth
:
745
,
zdjbxx
:
{},
zdbhqks
:
[],
propsParam
:
this
.
$attrs
,
showGroup
:
false
,
bdclxList
:
[
""
,
"宗地"
,
"宗海"
,
"自然幢"
,
"多幢"
,
"构筑物"
,
"林权"
,
"户"
],
};
},
created
()
{
this
.
loadData
();
},
methods
:
{
loadData
()
{
getZdjjxxBybdcdyid
({
bdcdyid
:
this
.
propsParam
.
bdcdyid
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
zdjbxx
=
res
.
result
.
zdjbxx
;
this
.
zdbhqks
=
res
.
result
.
zdbhqkList
;
if
(
this
.
zdbhqks
!=
null
&&
this
.
zdbhqks
.
length
>
0
)
{
this
.
showGroup
=
true
;
}
export
default
{
data
()
{
return
{
bhqkColumns
:
[
{
prop
:
"ssywh"
,
label
:
"上手业务号"
,
},
{
prop
:
"zddm"
,
label
:
"宗地代码"
,
},
{
prop
:
"bhqzddm"
,
label
:
"变化前宗地代码"
,
},
{
prop
:
"bhnr"
,
label
:
"变化内容"
,
},
{
prop
:
"bhyy"
,
label
:
"变化原因"
,
},
{
prop
:
"djsj"
,
label
:
"登记时间"
,
},
{
prop
:
"dbr"
,
label
:
"登簿人"
,
},
{
prop
:
"fj"
,
label
:
"附记"
,
},
],
bhqkTableWidth
:
745
,
zdjbxx
:
{},
zdbhqks
:
[],
propsParam
:
this
.
$attrs
,
showGroup
:
false
,
bdclxList
:
[
""
,
"宗地"
,
"宗海"
,
"自然幢"
,
"多幢"
,
"构筑物"
,
"林权"
,
"户"
],
};
},
filters
:
{
qlsdfs
:
function
(
value
)
{
const
foundItem
=
store
.
getters
.
dictData
[
'A10'
].
find
(
item
=>
item
.
dcode
===
String
(
value
));
if
(
foundItem
)
{
console
.
log
(
foundItem
.
dname
,
'foundItem.dname'
);
return
foundItem
.
dname
;
}
});
}
},
created
()
{
this
.
loadData
();
},
methods
:
{
loadData
()
{
getZdjjxxBybdcdyid
({
bdcdyid
:
this
.
propsParam
.
bdcdyid
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
zdjbxx
=
res
.
result
.
zdjbxx
;
this
.
zdbhqks
=
res
.
result
.
zdbhqkList
;
if
(
this
.
zdbhqks
!=
null
&&
this
.
zdbhqks
.
length
>
0
)
{
this
.
showGroup
=
true
;
}
}
});
},
},
},
};
};
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"~@/styles/tablecss.scss"
;
@import
"~@/styles/tablecss.scss"
;
</
style
>
...
...
src/views/workflow/components/clxx.vue
View file @
4f6c430
...
...
@@ -36,497 +36,496 @@
</div>
</
template
>
<
script
>
import
{
mapGetters
}
from
"vuex"
;
import
clxxAddDialog
from
"./clxxAddDialog.vue"
;
import
imagePreview
from
'@/views/components/imagePreview.vue'
import
{
InitClml
,
saveClml
,
deleteSjClml
,
moveClml
}
from
"@/api/clxx.js"
;
export
default
{
components
:
{
clxxAddDialog
,
imagePreview
},
data
()
{
return
{
isDialog
:
false
,
menuList
:
[
{
id
:
"1"
,
label
:
"材料目录明细"
,
},
{
id
:
"2"
,
label
:
"材料预览"
,
},
],
iclass
:
""
,
// 材料目录选中
treeCheckIndex
:
0
,
treeCheckId
:
""
,
checkedId
:
"1"
,
column
:
[
{
width
:
"50"
,
renderHeader
:
(
h
,
scope
)
=>
{
return
(
<
div
>
{
this
.
$route
.
query
.
viewtype
==
1
?
'序号'
:
<
i
class
=
"el-icon-plus pointer"
onClick
=
{()
=>
{
this
.
handleAdd
()
}}
><
/i
>
}
<
/div
>
)
import
{
mapGetters
}
from
"vuex"
;
import
clxxAddDialog
from
"./dialog/clxxAddDialog.vue"
;
import
imagePreview
from
'@/views/components/imagePreview.vue'
import
{
InitClml
,
saveClml
,
deleteSjClml
,
moveClml
}
from
"@/api/clxx.js"
;
export
default
{
components
:
{
clxxAddDialog
,
imagePreview
},
data
()
{
return
{
isDialog
:
false
,
menuList
:
[
{
id
:
"1"
,
label
:
"材料目录明细"
,
},
render
:
(
h
,
scope
)
=>
{
// 新建的材料,可删除
// v-show='scope.row.sfxjcl == 1'
return
(
<
div
>
{
this
.
$route
.
query
.
viewtype
==
1
?
<
span
>
{
scope
.
$index
+
1
}
<
/span>
:
<
i
class
=
"el-icon-minus pointer"
onClick
=
{()
=>
{
this
.
handleDelete
(
scope
.
$index
,
scope
.
row
);
}}
><
/i
>
}
<
/div
>
)
}
},
{
prop
:
"isrequired"
,
label
:
"是否必选"
,
width
:
"50"
,
render
:
(
h
,
scope
)
=>
{
if
(
scope
.
row
.
sfxjcl
===
"1"
)
{
{
id
:
"2"
,
label
:
"材料预览"
,
},
],
iclass
:
""
,
// 材料目录选中
treeCheckIndex
:
0
,
treeCheckId
:
""
,
checkedId
:
"1"
,
column
:
[
{
width
:
"50"
,
renderHeader
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
span
>
可选
<
/span
>
{
this
.
$route
.
query
.
viewtype
==
1
?
'序号'
:
<
i
class
=
"el-icon-plus pointer"
onClick
=
{()
=>
{
this
.
handleAdd
()
}}
><
/i
>
}
<
/div
>
);
}
else
{
)
},
render
:
(
h
,
scope
)
=>
{
// 新建的材料,可删除
// v-show='scope.row.sfxjcl == 1'
return
(
<
div
>
<
span
>
必选
<
/span
>
{
this
.
$route
.
query
.
viewtype
==
1
?
<
span
>
{
scope
.
$index
+
1
}
<
/span>
:
<
i
class
=
"el-icon-minus pointer"
onClick
=
{()
=>
{
this
.
handleDelete
(
scope
.
$index
,
scope
.
row
);
}}
><
/i
>
}
<
/div
>
)
;
)
}
},
},
{
prop
:
"sjmc"
,
label
:
"材料名称"
,
},
{
prop
:
"sjlx"
,
label
:
"材料类型"
,
width
:
"80"
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
span
>
{
this
.
dicStatus
(
scope
.
row
.
sjlx
,
"A40"
)}
<
/span
>
<
/div
>
);
{
prop
:
"isrequired"
,
label
:
"是否必选"
,
width
:
"50"
,
render
:
(
h
,
scope
)
=>
{
if
(
scope
.
row
.
sfxjcl
===
"1"
)
{
return
(
<
div
>
<
span
>
可选
<
/span
>
<
/div
>
);
}
else
{
return
(
<
div
>
<
span
>
必选
<
/span
>
<
/div
>
);
}
},
},
{
prop
:
"sjmc"
,
label
:
"材料名称"
,
},
},
{
prop
:
"sjsl"
,
label
:
"份数"
,
width
:
"50"
},
{
prop
:
"smzt"
,
label
:
"扫描状态"
,
width
:
"80"
,
render
:
(
h
,
scope
)
=>
{
if
(
scope
.
row
.
children
.
length
>
0
)
{
{
prop
:
"sjlx"
,
label
:
"材料类型"
,
width
:
"80"
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
span
>
已扫描
<
/span
>
<
span
>
{
this
.
dicStatus
(
scope
.
row
.
sjlx
,
"A40"
)}
<
/span
>
<
/div
>
);
}
else
{
},
},
{
prop
:
"sjsl"
,
label
:
"份数"
,
width
:
"50"
},
{
prop
:
"smzt"
,
label
:
"扫描状态"
,
width
:
"80"
,
render
:
(
h
,
scope
)
=>
{
if
(
scope
.
row
.
children
.
length
>
0
)
{
return
(
<
div
>
<
span
>
已扫描
<
/span
>
<
/div
>
);
}
else
{
return
(
<
div
>
<
span
>
未扫描
<
/span
>
<
/div
>
);
}
},
},
{
prop
:
"ys"
,
label
:
"扫描页数"
,
width
:
"50"
},
{
label
:
"操作"
,
width
:
"80"
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
span
>
未扫描
<
/span
>
<
el
-
button
type
=
"text"
disabled
=
{
scope
.
$index
==
0
}
onClick
=
{()
=>
{
this
.
moveUpward
(
scope
.
$index
,
scope
.
row
);
}}
>
上移
<
/el-button
>
<
el
-
button
type
=
"text"
disabled
=
{
scope
.
$index
+
1
==
this
.
tableData
.
length
}
onClick
=
{()
=>
{
this
.
moveDown
(
scope
.
$index
,
scope
.
row
);
}}
>
下移
<
/el-button
>
<
/div
>
);
}
}
,
},
},
{
prop
:
"ys"
,
label
:
"扫描页数"
,
width
:
"50"
},
{
label
:
"操作"
,
width
:
"80"
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
button
type
=
"text"
disabled
=
{
scope
.
$index
==
0
}
onClick
=
{()
=>
{
this
.
moveUpward
(
scope
.
$index
,
scope
.
row
);
}}
>
上移
<
/el-button
>
<
el
-
button
type
=
"text"
disabled
=
{
scope
.
$index
+
1
==
this
.
tableData
.
length
}
onClick
=
{()
=>
{
this
.
moveDown
(
scope
.
$index
,
scope
.
row
);
}}
>
下移
<
/el-button
>
<
/div
>
);
},
},
],
key
:
0
,
tableData
:
[],
previewImg
:
{
// 收件标识码
bsmSj
:
''
,
bsmSlsq
:
this
.
$parent
.
bsmSlsq
,
index
:
0
,
selectedIndex
:
0
,
imgList
:
[]
}
}
},
computed
:
{
...
mapGetters
([
"dictData"
])
},
created
()
{
this
.
clmlInitList
()
},
methods
:
{
// 自动预览
nextPriview
()
{
if
(
this
.
treeCheckIndex
<
this
.
tableData
.
length
)
{
this
.
treeCheckIndex
++
this
.
treeCheckId
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
this
.
previewImg
.
index
=
0
this
.
previewImg
.
imgList
=
this
.
tableData
[
this
.
treeCheckIndex
].
children
this
.
previewImg
.
bsmSj
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
],
key
:
0
,
tableData
:
[],
previewImg
:
{
// 收件标识码
bsmSj
:
''
,
bsmSlsq
:
this
.
$parent
.
bsmSlsq
,
index
:
0
,
selectedIndex
:
0
,
imgList
:
[]
}
}
},
prevPriview
()
{
if
(
this
.
treeCheckIndex
>=
1
)
{
this
.
treeCheckIndex
--
this
.
treeCheckId
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
this
.
previewImg
.
index
=
this
.
previewImg
.
imgList
.
length
this
.
previewImg
.
imgList
=
this
.
tableData
[
this
.
treeCheckIndex
].
children
this
.
previewImg
.
bsmSj
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
}
computed
:
{
...
mapGetters
([
"dictData"
])
},
// 材料目录明细初始化
clmlInitList
()
{
return
new
Promise
(
resolve
=>
{
this
.
unitData
=
this
.
$parent
.
unitData
;
var
formdata
=
new
FormData
();
formdata
.
append
(
"bsmSldy"
,
this
.
unitData
[
0
]?.
bsmSldy
);
formdata
.
append
(
"bsmSlsq"
,
this
.
$parent
.
bsmSlsq
);
InitClml
(
formdata
).
then
((
res
)
=>
{
if
(
res
.
result
.
code
==
200
){
resolve
(
res
.
code
)
if
(
res
.
result
.
result
&&
res
.
result
.
result
.
length
>
0
)
{
this
.
tableData
=
res
.
result
.
result
;
this
.
treeCheckId
=
this
.
tableData
[
0
].
bsmSj
;
this
.
title
=
this
.
tableData
[
0
].
sjmc
;
this
.
titleYs
=
1
;
this
.
titleNum
=
this
.
tableData
[
0
].
children
.
length
;
this
.
previewImg
.
imgList
=
this
.
tableData
[
0
]?.
children
;
this
.
previewImg
.
bsmSj
=
this
.
tableData
[
0
]?.
bsmSj
;
}
}
else
{
this
.
$message
.
error
(
res
.
result
.
message
)
}
})
})
created
()
{
this
.
clmlInitList
()
},
updateList
(
val
)
{
let
that
=
this
if
(
val
!=
null
)
{
//删除最后一张图片时 val=null
this
.
tableData
.
forEach
(
item
=>
{
if
(
item
.
bsmSj
===
val
.
bsmSj
)
{
item
.
children
=
val
.
children
}
})
this
.
previewImg
.
imgList
=
_
.
cloneDeep
(
val
.
children
)
if
(
this
.
previewImg
.
index
==
this
.
previewImg
.
imgList
.
length
)
{
this
.
previewImg
.
index
=
this
.
previewImg
.
index
-
1
methods
:
{
// 自动预览
nextPriview
()
{
if
(
this
.
treeCheckIndex
<
this
.
tableData
.
length
)
{
this
.
treeCheckIndex
++
this
.
treeCheckId
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
this
.
previewImg
.
index
=
0
this
.
previewImg
.
imgList
=
this
.
tableData
[
this
.
treeCheckIndex
].
children
this
.
previewImg
.
bsmSj
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
}
}
else
{
this
.
previewImg
.
imgList
=
[]
this
.
tableData
.
forEach
((
item
,
index
)
=>
{
if
(
this
.
treeCheckId
==
item
.
bsmSj
)
{
item
.
children
=
[]
that
.
treeCheckIndex
=
index
}
})
}
},
prevPriview
()
{
if
(
this
.
treeCheckIndex
>=
1
)
{
this
.
treeCheckIndex
--
this
.
treeCheckId
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
this
.
previewImg
.
index
=
this
.
previewImg
.
imgList
.
length
this
.
previewImg
.
imgList
=
this
.
tableData
[
this
.
treeCheckIndex
].
children
this
.
previewImg
.
bsmSj
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
}
},
// 材料目录明细初始化
clmlInitList
()
{
return
new
Promise
(
resolve
=>
{
this
.
unitData
=
this
.
$parent
.
unitData
;
var
formdata
=
new
FormData
();
formdata
.
append
(
"bsmSldy"
,
this
.
unitData
[
0
]?.
bsmSldy
);
formdata
.
append
(
"bsmSlsq"
,
this
.
$parent
.
bsmSlsq
);
InitClml
(
formdata
).
then
((
res
)
=>
{
if
(
res
.
result
.
code
==
200
)
{
resolve
(
res
.
code
)
if
(
res
.
result
.
result
&&
res
.
result
.
result
.
length
>
0
)
{
this
.
tableData
=
res
.
result
.
result
;
this
.
treeCheckId
=
this
.
tableData
[
0
].
bsmSj
;
this
.
title
=
this
.
tableData
[
0
].
sjmc
;
this
.
titleYs
=
1
;
this
.
titleNum
=
this
.
tableData
[
0
].
children
.
length
;
},
// 左侧菜单点击
menuClick
(
item
)
{
this
.
checkedId
=
item
.
id
},
// 添加材料目录
handleAdd
()
{
this
.
isDialog
=
true
;
},
// 上移
moveUpward
(
index
,
row
)
{
let
obj
=
{
xh
:
row
.
xh
,
bsmSlsq
:
row
.
bsmSlsq
,
moveDirection
:
"UP"
,
};
// 接口待调
moveClml
(
obj
).
then
(
async
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
res
=
await
this
.
clmlInitList
()
if
(
res
==
200
)
this
.
$message
({
message
:
'上移成功'
,
type
:
'success'
this
.
previewImg
.
imgList
=
this
.
tableData
[
0
]?.
children
;
this
.
previewImg
.
bsmSj
=
this
.
tableData
[
0
]?.
bsmSj
;
}
}
else
{
this
.
$message
.
error
(
res
.
result
.
message
)
}
})
}
else
{
this
.
$message
.
error
(
res
.
message
);
}
})
},
// 下移
moveDown
(
index
,
row
)
{
let
obj
=
{
xh
:
row
.
xh
,
bsmSlsq
:
row
.
bsmSlsq
,
moveDirection
:
"DOWN"
,
}
// 接口待调
moveClml
(
obj
).
then
(
async
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
res
=
await
this
.
clmlInitList
()
if
(
res
==
200
)
this
.
$message
({
message
:
'下移成功'
,
type
:
'success'
})
},
updateList
(
val
)
{
let
that
=
this
if
(
val
!=
null
)
{
//删除最后一张图片时 val=null
this
.
tableData
.
forEach
(
item
=>
{
if
(
item
.
bsmSj
===
val
.
bsmSj
)
{
item
.
children
=
val
.
children
}
})
this
.
previewImg
.
imgList
=
_
.
cloneDeep
(
val
.
children
)
if
(
this
.
previewImg
.
index
==
this
.
previewImg
.
imgList
.
length
)
{
this
.
previewImg
.
index
=
this
.
previewImg
.
index
-
1
}
}
else
{
this
.
$message
.
error
(
res
.
message
);
}
})
},
// 新增弹窗保存
addSave
(
data
)
{
let
obj
=
{
bsmSlsq
:
this
.
$parent
.
bsmSlsq
,
isrequired
:
"1"
,
sjmc
:
data
.
clmc
,
sjsl
:
0
,
smzt
:
''
,
ys
:
0
,
sjlx
:
data
.
cllx
,
sfxjcl
:
"1"
,
// 是否必选
};
saveClml
(
obj
).
then
(
async
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
res
=
await
this
.
clmlInitList
()
if
(
res
==
200
)
this
.
$message
({
message
:
"新增成功"
,
type
:
"success"
,
this
.
previewImg
.
imgList
=
[]
this
.
tableData
.
forEach
((
item
,
index
)
=>
{
if
(
this
.
treeCheckId
==
item
.
bsmSj
)
{
item
.
children
=
[]
that
.
treeCheckIndex
=
index
}
})
}
});
},
// 材料目录删除
handleDelete
(
index
,
row
)
{
let
that
=
this
this
.
$confirm
(
'此操作将永久删除该 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
deleteSjClml
({
sjBsm
:
row
.
bsmSj
}).
then
(
async
(
res
)
=>
{
},
// 左侧菜单点击
menuClick
(
item
)
{
this
.
checkedId
=
item
.
id
},
// 添加材料目录
handleAdd
()
{
this
.
isDialog
=
true
;
},
// 上移
moveUpward
(
index
,
row
)
{
let
obj
=
{
xh
:
row
.
xh
,
bsmSlsq
:
row
.
bsmSlsq
,
moveDirection
:
"UP"
,
};
// 接口待调
moveClml
(
obj
).
then
(
async
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
res
=
await
th
at
.
clmlInitList
()
if
(
res
==
200
)
th
at
.
$message
({
message
:
"删除成功"
,
type
:
"success"
,
let
res
=
await
th
is
.
clmlInitList
()
if
(
res
==
200
)
th
is
.
$message
({
message
:
'上移成功'
,
type
:
'success'
})
}
else
{
this
.
$message
.
error
(
res
.
message
);
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
},
// 下移
moveDown
(
index
,
row
)
{
let
obj
=
{
xh
:
row
.
xh
,
bsmSlsq
:
row
.
bsmSlsq
,
moveDirection
:
"DOWN"
,
}
// 接口待调
moveClml
(
obj
).
then
(
async
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
res
=
await
this
.
clmlInitList
()
if
(
res
==
200
)
this
.
$message
({
message
:
'下移成功'
,
type
:
'success'
})
}
else
{
this
.
$message
.
error
(
res
.
message
);
}
})
})
},
// 材料目录点击选中
treeClick
(
item
,
index
)
{
this
.
previewImg
.
index
=
0
this
.
treeCheckId
=
item
?.
bsmSj
this
.
treeCheckIndex
=
index
this
.
previewImg
.
imgList
=
item
?.
children
this
.
previewImg
.
bsmSj
=
item
?.
bsmSj
},
// 小图片点击
imgClick
(
item
,
index
)
{
this
.
showImg
=
item
;
this
.
titleYs
=
index
+
1
;
},
// 字典
dicStatus
(
val
,
code
)
{
let
data
=
this
.
$store
.
getters
.
dictData
[
code
],
name
=
"暂无"
;
if
(
data
)
{
data
.
map
((
item
)
=>
{
if
(
item
.
dcode
==
val
)
{
name
=
item
.
dname
;
},
// 新增弹窗保存
addSave
(
data
)
{
let
obj
=
{
bsmSlsq
:
this
.
$parent
.
bsmSlsq
,
isrequired
:
"1"
,
sjmc
:
data
.
clmc
,
sjsl
:
0
,
smzt
:
''
,
ys
:
0
,
sjlx
:
data
.
cllx
,
sfxjcl
:
"1"
,
// 是否必选
};
saveClml
(
obj
).
then
(
async
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
res
=
await
this
.
clmlInitList
()
if
(
res
==
200
)
this
.
$message
({
message
:
"新增成功"
,
type
:
"success"
,
})
}
});
return
name
;
}
},
// 材料目录删除
handleDelete
(
index
,
row
)
{
let
that
=
this
this
.
$confirm
(
'此操作将永久删除该 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
deleteSjClml
({
sjBsm
:
row
.
bsmSj
}).
then
(
async
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
res
=
await
that
.
clmlInitList
()
if
(
res
==
200
)
that
.
$message
({
message
:
"删除成功"
,
type
:
"success"
,
})
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
})
})
},
// 材料目录点击选中
treeClick
(
item
,
index
)
{
this
.
previewImg
.
index
=
0
this
.
treeCheckId
=
item
?.
bsmSj
this
.
treeCheckIndex
=
index
this
.
previewImg
.
imgList
=
item
?.
children
this
.
previewImg
.
bsmSj
=
item
?.
bsmSj
},
// 小图片点击
imgClick
(
item
,
index
)
{
this
.
showImg
=
item
;
this
.
titleYs
=
index
+
1
;
},
// 字典
dicStatus
(
val
,
code
)
{
let
data
=
this
.
$store
.
getters
.
dictData
[
code
],
name
=
"暂无"
;
if
(
data
)
{
data
.
map
((
item
)
=>
{
if
(
item
.
dcode
==
val
)
{
name
=
item
.
dname
;
}
});
return
name
;
}
},
},
},
};
};
</
script
>
<
style
scoped
lang=
'scss'
>
@import
"~@/styles/mixin.scss"
;
.active
{
background
:
$
light-blue
!important
;
color
:
#fff
;
}
.required
{
font-size
:
12px
;
color
:
$
pink
;
float
:
left
;
}
@import
"~@/styles/mixin.scss"
;
.cl_number
{
float
:
right
;
}
.clxx
{
width
:
100%
;
display
:
flex
;
padding-left
:
5px
;
height
:
calc
(
100vh
-
125px
);
.left
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
.active
{
background
:
$
light-blue
!important
;
color
:
#fff
;
}
.item
{
width
:
28px
;
height
:
49%
;
@include
flex-center;
background-color
:
#E4E7ED
;
border-bottom-right-radius
:
10px
;
padding
:
5px
;
cursor
:
pointer
;
transition
:
all
0.3s
;
.required
{
font-size
:
12px
;
color
:
$
pink
;
float
:
left
;
}
&:hover
{
@extend
.active;
}
}
.cl_number
{
float
:
right
;
}
.
right
{
.
clxx
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
padding-left
:
5px
;
height
:
calc
(
100vh
-
125px
);
.clmlmx-box
{
margin
:
0
auto
;
.left
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
.title
{
text-align
:
center
;
height
:
60px
;
line-height
:
60px
;
border
:
1px
solid
#dfe6ec
;
font-size
:
20px
;
background
:
#81d3f81
a
;
margin-bottom
:
-1px
;
.item
{
width
:
28px
;
height
:
49%
;
@include
flex-center;
background-color
:
#e4e7ed
;
border-bottom-right-radius
:
10px
;
padding
:
5px
;
cursor
:
pointer
;
transition
:
all
0.3s
;
&:hover
{
@extend
.active;
}
}
}
.
clyl-box
{
.
right
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
.menu-tree
{
width
:
20%
;
min-width
:
160px
;
height
:
100%
;
margin-right
:
10px
;
border-right
:
1px
dotted
#d9d9d9
;
padding
:
0
15px
;
.clmlmx-box
{
margin
:
0
auto
;
.item
{
line-height
:
30px
;
padding-top
:
5px
;
border-bottom
:
1px
solid
#e8e8e8
;
font-size
:
16px
;
.title
{
text-align
:
center
;
color
:
$
light-blue
;
height
:
60px
;
line-height
:
60px
;
border
:
1px
solid
#dfe6ec
;
font-size
:
20px
;
background
:
#81d3f81
a
;
margin-bottom
:
-1px
;
}
}
.itemIcon
{
float
:
right
;
line-height
:
60px
;
cursor
:
pointer
;
}
.clyl-box
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
.child
{
line-height
:
32px
;
border-bottom
:
1px
solid
#e8e8e8
;
padding-left
:
10px
;
color
:
#6b6b6b
;
cursor
:
pointer
;
box-sizing
:
border-box
;
border-radius
:
6px
;
line-height
:
20px
;
transition
:
all
0.3s
;
padding
:
8px
0
;
}
.menu-tree
{
width
:
20%
;
min-width
:
160px
;
height
:
100%
;
margin-right
:
10px
;
border-right
:
1px
dotted
#d9d9d9
;
padding
:
0
15px
;
.child
:hover
{
.item
{
line-height
:
30px
;
padding-top
:
5px
;
border-bottom
:
1px
solid
#e8e8e8
;
font-size
:
16px
;
text-align
:
center
;
color
:
$
light-blue
;
transform
:
scale
(
1.1
);
}
.checked
{
border
:
1px
solid
$
light-blue
;
color
:
$
light-blue
;
.itemIcon
{
float
:
right
;
line-height
:
60px
;
cursor
:
pointer
;
}
.child
{
line-height
:
32px
;
border-bottom
:
1px
solid
#e8e8e8
;
padding-left
:
10px
;
color
:
#6b6b6b
;
cursor
:
pointer
;
box-sizing
:
border-box
;
border-radius
:
6px
;
line-height
:
20px
;
transition
:
all
0.3s
;
padding
:
8px
0
;
}
.child
:hover
{
color
:
$
light-blue
;
transform
:
scale
(
1.1
);
}
.checked
{
border
:
1px
solid
$
light-blue
;
color
:
$
light-blue
;
}
}
}
}
.clyl-img
{
width
:
75%
;
height
:
100%
;
background
:
#f3f4f7
;
margin
:
0
auto
;
position
:
relative
;
.clyl-img
{
width
:
75%
;
height
:
100%
;
background
:
#f3f4f7
;
margin
:
0
auto
;
position
:
relative
;
}
}
}
}
}
</
style
>
\ No newline at end of file
...
...
src/views/workflow/components/clxxUnify.vue
View file @
4f6c430
...
...
@@ -4,7 +4,7 @@
<!-- 材料预览 -->
<div
class=
"clyl-box"
>
<div
class=
"menu-tree"
>
<el-button
type=
"primary"
native-type=
"submit"
@
click=
"viewDetail"
style=
"width:100%;margin-top:10px;"
>
查看明细
</el-button>
<el-button
type=
"primary"
native-type=
"submit"
@
click=
"viewDetail"
style=
"width:100%;margin-top:10px;"
>
查看明细
</el-button>
<div
class=
"item"
>
材料目录(
{{
tableData
.
length
}}
)
<div
style=
"margin-top:10px"
>
...
...
@@ -24,310 +24,309 @@
</div>
</div>
<clxxAddDialog
v-model=
"isDialog"
/>
<clxxDetailDialog
v-model=
"detailDialog"
:data=
"tableData"
/>
<clxxDetailDialog
v-model=
"detailDialog"
:data=
"tableData"
/>
</div>
</
template
>
<
script
>
import
{
mapGetters
}
from
"vuex"
;
import
clxxAddDialog
from
"./clxxAddDialog.vue"
;
import
clxxDetailDialog
from
"./clxxDetailDialog.vue"
;
import
imagePreview
from
'@/views/components/imagePreview.vue'
import
{
InitClml
,
saveClml
,
deleteSjClml
,
moveClml
}
from
"@/api/clxx.js"
;
import
{
popupDialog
}
from
"@/utils/popup.js"
;
export
default
{
components
:
{
clxxAddDialog
,
imagePreview
,
clxxDetailDialog
},
data
()
{
return
{
isDialog
:
false
,
detailDialog
:
false
,
iclass
:
""
,
// 材料目录选中
treeCheckIndex
:
0
,
treeCheckId
:
""
,
key
:
0
,
tableData
:
[],
previewImg
:
{
// 收件标识码
bsmSj
:
''
,
bsmSlsq
:
this
.
$parent
.
bsmSlsq
,
index
:
0
,
selectedIndex
:
0
,
imgList
:
[]
}
}
},
computed
:
{
...
mapGetters
([
"dictData"
])
},
created
()
{
this
.
clmlInitList
(
1
)
},
methods
:
{
// 自动预览
nextPriview
()
{
if
(
this
.
treeCheckIndex
<
this
.
tableData
.
length
)
{
this
.
treeCheckIndex
++
this
.
treeCheckId
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
this
.
previewImg
.
index
=
0
this
.
previewImg
.
imgList
=
this
.
tableData
[
this
.
treeCheckIndex
].
children
this
.
previewImg
.
bsmSj
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
import
{
mapGetters
}
from
"vuex"
;
import
clxxAddDialog
from
"./dialog/clxxAddDialog.vue"
;
import
clxxDetailDialog
from
"./clxxDetailDialog.vue"
;
import
imagePreview
from
'@/views/components/imagePreview.vue'
import
{
InitClml
,
saveClml
,
deleteSjClml
,
moveClml
}
from
"@/api/clxx.js"
;
import
{
popupDialog
}
from
"@/utils/popup.js"
;
export
default
{
components
:
{
clxxAddDialog
,
imagePreview
,
clxxDetailDialog
},
data
()
{
return
{
isDialog
:
false
,
detailDialog
:
false
,
iclass
:
""
,
// 材料目录选中
treeCheckIndex
:
0
,
treeCheckId
:
""
,
key
:
0
,
tableData
:
[],
previewImg
:
{
// 收件标识码
bsmSj
:
''
,
bsmSlsq
:
this
.
$parent
.
bsmSlsq
,
index
:
0
,
selectedIndex
:
0
,
imgList
:
[]
}
}
},
prevPriview
()
{
if
(
this
.
treeCheckIndex
>=
1
)
{
this
.
treeCheckIndex
--
this
.
treeCheckId
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
this
.
previewImg
.
index
=
this
.
previewImg
.
imgList
.
length
this
.
previewImg
.
imgList
=
this
.
tableData
[
this
.
treeCheckIndex
].
children
this
.
previewImg
.
bsmSj
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
}
computed
:
{
...
mapGetters
([
"dictData"
])
},
// 材料目录明细初始化
clmlInitList
(
type
)
{
//type 1:列表初始化 2:新增材料
return
new
Promise
(
resolve
=>
{
this
.
unitData
=
this
.
$parent
.
unitData
;
var
formdata
=
new
FormData
();
formdata
.
append
(
"bsmSldy"
,
this
.
unitData
[
0
]?.
bsmSldy
);
formdata
.
append
(
"bsmSlsq"
,
this
.
$parent
.
bsmSlsq
);
InitClml
(
formdata
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
resolve
(
res
.
code
)
if
(
res
.
result
&&
res
.
result
.
length
>
0
)
{
this
.
tableData
=
res
.
result
;
if
(
type
==
1
){
this
.
treeClick
(
this
.
tableData
[
0
],
0
);
}
else
{
//新增材料后刷新列表焦点置于新增的对象上
this
.
treeClick
(
this
.
tableData
[
this
.
tableData
.
length
-
1
],
this
.
tableData
.
length
-
1
);
created
()
{
this
.
clmlInitList
(
1
)
},
methods
:
{
// 自动预览
nextPriview
()
{
if
(
this
.
treeCheckIndex
<
this
.
tableData
.
length
)
{
this
.
treeCheckIndex
++
this
.
treeCheckId
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
this
.
previewImg
.
index
=
0
this
.
previewImg
.
imgList
=
this
.
tableData
[
this
.
treeCheckIndex
].
children
this
.
previewImg
.
bsmSj
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
}
},
prevPriview
()
{
if
(
this
.
treeCheckIndex
>=
1
)
{
this
.
treeCheckIndex
--
this
.
treeCheckId
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
this
.
previewImg
.
index
=
this
.
previewImg
.
imgList
.
length
this
.
previewImg
.
imgList
=
this
.
tableData
[
this
.
treeCheckIndex
].
children
this
.
previewImg
.
bsmSj
=
this
.
tableData
[
this
.
treeCheckIndex
].
bsmSj
}
},
// 材料目录明细初始化
clmlInitList
(
type
)
{
//type 1:列表初始化 2:新增材料
return
new
Promise
(
resolve
=>
{
this
.
unitData
=
this
.
$parent
.
unitData
;
var
formdata
=
new
FormData
();
formdata
.
append
(
"bsmSldy"
,
this
.
unitData
[
0
]?.
bsmSldy
);
formdata
.
append
(
"bsmSlsq"
,
this
.
$parent
.
bsmSlsq
);
InitClml
(
formdata
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
resolve
(
res
.
code
)
if
(
res
.
result
&&
res
.
result
.
length
>
0
)
{
this
.
tableData
=
res
.
result
;
if
(
type
==
1
)
{
this
.
treeClick
(
this
.
tableData
[
0
],
0
);
}
else
{
//新增材料后刷新列表焦点置于新增的对象上
this
.
treeClick
(
this
.
tableData
[
this
.
tableData
.
length
-
1
],
this
.
tableData
.
length
-
1
);
}
}
}
else
{
this
.
$message
.
error
(
res
.
message
)
}
}
else
{
this
.
$message
.
error
(
res
.
message
)
}
})
})
},
setChecked
(
item
){
this
.
treeCheckId
=
item
.
bsmSj
;
this
.
title
=
item
.
sjmc
;
this
.
titleYs
=
1
;
this
.
titleNum
=
item
.
children
.
length
;
this
.
previewImg
.
imgList
=
item
.
children
;
this
.
previewImg
.
bsmSj
=
item
.
bsmSj
;
},
updateList
(
val
)
{
let
that
=
this
if
(
val
!=
null
)
{
//删除最后一张图片时 val=null
this
.
tableData
.
forEach
(
item
=>
{
if
(
item
.
bsmSj
===
val
.
bsmSj
)
{
item
.
children
=
val
.
children
}
})
})
this
.
previewImg
.
imgList
=
_
.
cloneDeep
(
val
.
children
)
if
(
this
.
previewImg
.
index
==
this
.
previewImg
.
imgList
.
length
)
{
this
.
previewImg
.
index
=
this
.
previewImg
.
index
-
1
}
}
else
{
this
.
previewImg
.
imgList
=
[]
this
.
tableData
.
forEach
((
item
,
index
)
=>
{
if
(
this
.
treeCheckId
==
item
.
bsmSj
)
{
item
.
children
=
[]
that
.
treeCheckIndex
=
index
},
setChecked
(
item
)
{
this
.
treeCheckId
=
item
.
bsmSj
;
this
.
title
=
item
.
sjmc
;
this
.
titleYs
=
1
;
this
.
titleNum
=
item
.
children
.
length
;
this
.
previewImg
.
imgList
=
item
.
children
;
this
.
previewImg
.
bsmSj
=
item
.
bsmSj
;
},
updateList
(
val
)
{
let
that
=
this
if
(
val
!=
null
)
{
//删除最后一张图片时 val=null
this
.
tableData
.
forEach
(
item
=>
{
if
(
item
.
bsmSj
===
val
.
bsmSj
)
{
item
.
children
=
val
.
children
}
})
this
.
previewImg
.
imgList
=
_
.
cloneDeep
(
val
.
children
)
if
(
this
.
previewImg
.
index
==
this
.
previewImg
.
imgList
.
length
)
{
this
.
previewImg
.
index
=
this
.
previewImg
.
index
-
1
}
})
}
},
// 添加材料目录
handleAdd
()
{
this
.
isDialog
=
true
;
},
// 新增弹窗保存
addSave
(
data
)
{
let
obj
=
{
bsmSlsq
:
this
.
$parent
.
bsmSlsq
,
isrequired
:
"1"
,
sjmc
:
data
.
clmc
,
sjsl
:
0
,
smzt
:
''
,
ys
:
0
,
sjlx
:
data
.
cllx
,
sfxjcl
:
"1"
,
// 是否必选
};
saveClml
(
obj
).
then
(
async
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
res
=
await
this
.
clmlInitList
(
2
)
if
(
res
==
200
)
this
.
$message
({
message
:
"新增成功"
,
type
:
"success"
,
}
else
{
this
.
previewImg
.
imgList
=
[]
this
.
tableData
.
forEach
((
item
,
index
)
=>
{
if
(
this
.
treeCheckId
==
item
.
bsmSj
)
{
item
.
children
=
[]
that
.
treeCheckIndex
=
index
}
})
}
});
},
// 材料目录点击选中
treeClick
(
item
,
index
)
{
this
.
previewImg
.
index
=
0
this
.
treeCheckId
=
item
?.
bsmSj
this
.
treeCheckIndex
=
index
this
.
previewImg
.
imgList
=
item
?.
children
this
.
previewImg
.
bsmSj
=
item
?.
bsmSj
},
// 小图片点击
imgClick
(
item
,
index
)
{
this
.
showImg
=
item
;
this
.
titleYs
=
index
+
1
;
},
// 字典
dicStatus
(
val
,
code
)
{
let
data
=
this
.
$store
.
getters
.
dictData
[
code
],
name
=
"暂无"
;
if
(
data
)
{
data
.
map
((
item
)
=>
{
if
(
item
.
dcode
==
val
)
{
name
=
item
.
dname
;
},
// 添加材料目录
handleAdd
()
{
this
.
isDialog
=
true
;
},
// 新增弹窗保存
addSave
(
data
)
{
let
obj
=
{
bsmSlsq
:
this
.
$parent
.
bsmSlsq
,
isrequired
:
"1"
,
sjmc
:
data
.
clmc
,
sjsl
:
0
,
smzt
:
''
,
ys
:
0
,
sjlx
:
data
.
cllx
,
sfxjcl
:
"1"
,
// 是否必选
};
saveClml
(
obj
).
then
(
async
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
res
=
await
this
.
clmlInitList
(
2
)
if
(
res
==
200
)
this
.
$message
({
message
:
"新增成功"
,
type
:
"success"
,
})
}
});
return
name
;
}
},
//查看明细
viewDetail
(){
},
// 材料目录点击选中
treeClick
(
item
,
index
)
{
this
.
previewImg
.
index
=
0
this
.
treeCheckId
=
item
?.
bsmSj
this
.
treeCheckIndex
=
index
this
.
previewImg
.
imgList
=
item
?.
children
this
.
previewImg
.
bsmSj
=
item
?.
bsmSj
},
// 小图片点击
imgClick
(
item
,
index
)
{
this
.
showImg
=
item
;
this
.
titleYs
=
index
+
1
;
},
// 字典
dicStatus
(
val
,
code
)
{
let
data
=
this
.
$store
.
getters
.
dictData
[
code
],
name
=
"暂无"
;
if
(
data
)
{
data
.
map
((
item
)
=>
{
if
(
item
.
dcode
==
val
)
{
name
=
item
.
dname
;
}
});
return
name
;
}
},
//查看明细
viewDetail
()
{
this
.
detailDialog
=
true
;
},
//设置tableData
setTableData
(
tableData
)
{
this
.
$nextTick
(
res
=>
{
this
.
tableData
=
tableData
;
},
//设置tableData
setTableData
(
tableData
)
{
this
.
$nextTick
(
res
=>
{
this
.
tableData
=
tableData
;
})
},
},
},
};
};
</
script
>
<
style
scoped
lang=
'scss'
>
@import
"~@/styles/mixin.scss"
;
.active
{
background
:
$
light-blue
!important
;
color
:
#fff
;
}
.required
{
font-size
:
12px
;
color
:
$
pink
;
float
:
left
;
}
@import
"~@/styles/mixin.scss"
;
.cl_number
{
float
:
right
;
}
.clxx
{
width
:
100%
;
display
:
flex
;
padding-left
:
5px
;
height
:
calc
(
100vh
-
125px
);
.left
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
.active
{
background
:
$
light-blue
!important
;
color
:
#fff
;
}
.item
{
width
:
28px
;
height
:
49%
;
@include
flex-center;
background-color
:
#E4E7ED
;
border-bottom-right-radius
:
10px
;
padding
:
5px
;
cursor
:
pointer
;
transition
:
all
0.3s
;
.required
{
font-size
:
12px
;
color
:
$
pink
;
float
:
left
;
}
&:hover
{
@extend
.active;
}
}
.cl_number
{
float
:
right
;
}
.
right
{
.
clxx
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
padding-left
:
5px
;
height
:
calc
(
100vh
-
125px
);
.left
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
.clmlmx-box
{
margin
:
0
auto
;
.item
{
width
:
28px
;
height
:
49%
;
@include
flex-center;
background-color
:
#e4e7ed
;
border-bottom-right-radius
:
10px
;
padding
:
5px
;
cursor
:
pointer
;
transition
:
all
0.3s
;
.title
{
text-align
:
center
;
height
:
60px
;
line-height
:
60px
;
border
:
1px
solid
#dfe6ec
;
font-size
:
20px
;
background
:
#81d3f81
a
;
margin-bottom
:
-1px
;
&:hover
{
@extend
.active;
}
}
}
.
clyl-box
{
.
right
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
.menu-tree
{
width
:
20%
;
min-width
:
160px
;
height
:
100%
;
margin-right
:
10px
;
border-right
:
1px
dotted
#d9d9d9
;
padding
:
0
15px
;
.clmlmx-box
{
margin
:
0
auto
;
.item
{
line-height
:
30px
;
padding-top
:
5px
;
border-bottom
:
1px
solid
#e8e8e8
;
font-size
:
16px
;
.title
{
text-align
:
center
;
color
:
$
light-blue
;
height
:
60px
;
line-height
:
60px
;
border
:
1px
solid
#dfe6ec
;
font-size
:
20px
;
background
:
#81d3f81
a
;
margin-bottom
:
-1px
;
}
}
.itemIcon
{
float
:
right
;
line-height
:
60px
;
cursor
:
pointer
;
}
.clyl-box
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
.child
{
line-height
:
32px
;
border-bottom
:
1px
solid
#e8e8e8
;
padding-left
:
10px
;
color
:
#6b6b6b
;
cursor
:
pointer
;
box-sizing
:
border-box
;
border-radius
:
6px
;
line-height
:
20px
;
transition
:
all
0.3s
;
padding
:
8px
0
;
}
.menu-tree
{
width
:
20%
;
min-width
:
160px
;
height
:
100%
;
margin-right
:
10px
;
border-right
:
1px
dotted
#d9d9d9
;
padding
:
0
15px
;
.child
:hover
{
.item
{
line-height
:
30px
;
padding-top
:
5px
;
border-bottom
:
1px
solid
#e8e8e8
;
font-size
:
16px
;
text-align
:
center
;
color
:
$
light-blue
;
transform
:
scale
(
1.1
);
}
.checked
{
border
:
1px
solid
$
light-blue
;
color
:
$
light-blue
;
.itemIcon
{
float
:
right
;
line-height
:
60px
;
cursor
:
pointer
;
}
.child
{
line-height
:
32px
;
border-bottom
:
1px
solid
#e8e8e8
;
padding-left
:
10px
;
color
:
#6b6b6b
;
cursor
:
pointer
;
box-sizing
:
border-box
;
border-radius
:
6px
;
line-height
:
20px
;
transition
:
all
0.3s
;
padding
:
8px
0
;
}
.child
:hover
{
color
:
$
light-blue
;
transform
:
scale
(
1.1
);
}
.checked
{
border
:
1px
solid
$
light-blue
;
color
:
$
light-blue
;
}
}
}
}
.clyl-img
{
width
:
75%
;
height
:
100%
;
background
:
#f3f4f7
;
margin
:
0
auto
;
position
:
relative
;
.clyl-img
{
width
:
75%
;
height
:
100%
;
background
:
#f3f4f7
;
margin
:
0
auto
;
position
:
relative
;
}
}
}
}
}
</
style
>
\ No newline at end of file
...
...
src/views/workflow/components/clxxAddDialog.vue
→
src/views/workflow/components/
dialog/
clxxAddDialog.vue
View file @
4f6c430
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-09 09:20:10
-->
<
template
>
<dialogBox
title=
"新建材料信息"
width=
"20%"
isMain
v-model=
"myValue"
@
closeDialog=
"closeDialog"
@
submitForm=
"handleSubmit"
:isFullscreen=
"false"
>
...
...
@@ -24,48 +29,52 @@
</
template
>
<
script
>
import
{
mapGetters
}
from
"vuex"
;
export
default
{
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
},
},
data
()
{
return
{
myValue
:
this
.
value
,
ruleForm
:
{
cllx
:
""
,
clmc
:
""
,
},
};
},
computed
:
{
...
mapGetters
([
"dictData"
]),
},
watch
:
{
value
(
val
)
{
this
.
myValue
=
val
;
import
{
mapGetters
}
from
"vuex"
;
export
default
{
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
},
},
data
()
{
return
{
myValue
:
this
.
value
,
ruleForm
:
{
cllx
:
""
,
clmc
:
""
,
},
};
},
computed
:
{
...
mapGetters
([
"dictData"
]),
},
},
methods
:
{
closeDialog
()
{
this
.
$emit
(
"input"
,
false
);
this
.
ruleForm
=
{
cllx
:
""
,
clmc
:
""
,
}
watch
:
{
value
(
val
)
{
this
.
myValue
=
val
;
},
},
handleSubmit
()
{
this
.
$parent
.
addSave
(
this
.
ruleForm
);
this
.
$emit
(
"input"
,
false
);
methods
:
{
closeDialog
()
{
this
.
$emit
(
"input"
,
false
);
this
.
ruleForm
=
{
cllx
:
""
,
clmc
:
""
,
}
},
handleSubmit
()
{
this
.
$parent
.
addSave
(
this
.
ruleForm
);
this
.
ruleForm
=
{
cllx
:
""
,
clmc
:
""
,
}
this
.
$emit
(
"input"
,
false
);
},
},
},
};
};
</
script
>
<
style
scoped
lang=
"scss"
>
.submit-button
{
text-align
:
center
;
height
:
52px
;
padding-top
:
10px
;
background-color
:
#fff
;
}
.submit-button
{
text-align
:
center
;
height
:
52px
;
padding-top
:
10px
;
background-color
:
#fff
;
}
</
style
>
...
...
Please
register
or
sign in
to post a comment