Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
file-uploader
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 2b2b42ce
authored
Sep 22, 2022
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
e0b8ebc6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
756 additions
and
519 deletions
src/api/upload.js
src/assets/images/claims_delete.png
src/store/modules/app.js
src/views/upload/components/claims.vue
src/api/upload.js
View file @
2b2b42c
const
url
=
'/rop-scrm-equity/router'
const
url
=
'/rop-scrm-equity/router'
const
car_url
=
'/rop-scrm-carlife/router'
export
default
{
export
default
{
/**获取员工销售的无忧卡订单列表 */
/**获取员工销售的无忧卡订单列表 */
orderListApi
(
data
)
{
orderListApi
(
data
)
{
...
@@ -56,13 +57,33 @@ export default {
...
@@ -56,13 +57,33 @@ export default {
},
},
/**上传图片 */
/**上传图片 */
uploadImageApi
(
data
){
uploadImageApi
(
data
){
data
.
method
=
'scrm.api.equity.common.upload.image'
// data.method = 'scrm.api.equity.common.upload.image'
data
.
method
=
'scrm.api.carlife.common.uploadImg'
return
window
.
$HTTP
({
return
window
.
$HTTP
({
url
,
// url,
url
:
car_url
,
data
,
data
,
returnAll
:
true
,
returnAll
:
true
,
sign
:
true
,
sign
:
true
,
noSignAttr
:
[
'file'
],
noSignAttr
:
[
'file'
],
})
})
}
},
// 核赔资料图片上传列表
claimsClassifyApi
(
data
){
data
.
method
=
'scrm.api.equity.service.attachment.classify.list'
return
window
.
$HTTP
({
url
,
data
,
returnAll
:
true
})
},
// 核赔资料图片上传
claimsClassifyuploadApi
(
data
){
data
.
method
=
'scrm.api.equity.service.claims.phone.attachment.save'
return
window
.
$HTTP
({
url
,
data
,
returnAll
:
true
})
},
}
}
src/assets/images/claims_delete.png
0 → 100644
View file @
2b2b42c
562 Bytes
src/store/modules/app.js
View file @
2b2b42c
...
@@ -56,10 +56,12 @@ const actions = {
...
@@ -56,10 +56,12 @@ const actions = {
},
},
navigation
({
dispatch
})
{
navigation
({
dispatch
})
{
dispatch
(
'registerHttp'
)
state
.
showWindow
=
true
state
.
showWindow
=
true
},
},
registerHttp
({},
sessionId
=
''
)
{
registerHttp
({},
sessionId
=
''
)
{
window
.
$HTTP
=
new
Http
({
...
window
.
$fetchConfig
,
alert
:
Notify
,
headers
:
{
token
:
sessionId
}
})
// window.$HTTP = new Http({ ...window.$fetchConfig, alert: Notify, headers: { token: sessionId } })
window
.
$HTTP
=
new
Http
({
...
window
.
$fetchConfig
,
alert
:
Notify
,
headers
:
{
token
:
'scrm-base-39095f3d-5510-41a2-8ac1-f3e26687f426-rop'
}
})
}
}
}
}
const
getParams
=
name
=>
{
const
getParams
=
name
=>
{
...
...
src/views/upload/components/claims.vue
View file @
2b2b42c
...
@@ -18,24 +18,37 @@
...
@@ -18,24 +18,37 @@
<div
v-if=
"el.tip"
class=
"tip"
>
{{
el
.
tip
}}
</div>
<div
v-if=
"el.tip"
class=
"tip"
>
{{
el
.
tip
}}
</div>
</div>
</div>
<div
class=
"wrap flex_scb"
>
<div
class=
"wrap flex_scb"
>
<div
v-for=
"(ele, idx) in el.images"
:key=
"idx"
style=
"margin-bottom:10px"
class=
"imageBox flex_ccc"
>
<div
v-for=
"(ele, idx) in el.images"
:key=
"idx"
style=
"margin-bottom: 10px"
class=
"imageBox flex_ccc"
>
<img
class=
"icon"
:src=
"imageBase + ele.icon"
/>
<template
v-if=
"!ele.url"
>
<span
class=
"tips"
>
{{
ele
.
label
}}
</span>
<img
class=
"icon"
:src=
"imageBase + ele.icon"
/>
<div
class=
"opa_upload"
@
click=
"toClickUpoload(ele)"
>
<span
class=
"tips"
>
{{
ele
.
label
}}
</span>
</
template
>
<
template
v-if=
"ele.url"
>
<img
style=
"width: 100%; height: 100%"
:src=
"ele.url"
/>
</
template
>
<div
class=
"opa_upload"
@
click=
"toClickUpoload(ele, inx, idx)"
>
<van-uploader
max-count=
"1"
:before-delete=
"beforeDelete"
v-on:click-upload=
"beforeRead"
:before-read=
"checkRead"
:after-read=
"afterRread"
></van-uploader>
<van-uploader
max-count=
"1"
:before-delete=
"beforeDelete"
v-on:click-upload=
"beforeRead"
:before-read=
"checkRead"
:after-read=
"afterRread"
></van-uploader>
</div>
</div>
<div
v-if=
"ele.url"
class=
"delete_icon"
@
click
.
stop=
"toDelete(ele, inx, idx)"
>
<img
src=
"../../../assets/images/claims_delete.png"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
<
template
v-else
>
<
template
v-else
>
<div
class=
"widget flex_ss flex_wrap"
>
<div
class=
"widget flex_ss flex_wrap"
>
<div
v-for=
"(img, i) in item.content"
:key=
"i"
class=
"image_wrap"
:style=
"
{ width: size, height: size }" :class="[{ mar0: (i + 1) % 3 == 0 }]">
</div>
<div
v-for=
"(img, i) in item.content"
:key=
"i"
class=
"image_wrap"
:style=
"
{ width: size, height: size }" :class="[{ mar0: (i + 1) % 3 == 0 }]">
<img
style=
"width: 100%; height: 100%"
:src=
"img.url"
/>
<div
class=
"delete_icon"
@
click
.
stop=
"deleteImg(i)"
>
<img
src=
"../../../assets/images/claims_delete.png"
/>
</div>
</div>
<div
:style=
"
{ width: size, height: size }" class="upload_area flex_ccc">
<div
:style=
"
{ width: size, height: size }" class="upload_area flex_ccc">
<van-icon
name=
"plus"
size=
"20px"
color=
"#999999"
/>
<van-icon
name=
"plus"
size=
"20px"
color=
"#999999"
/>
<span
class=
"text"
>
上传照片
</span>
<span
class=
"text"
>
上传照片
</span>
<div
class=
"opa_upload"
>
<div
class=
"opa_upload"
>
<van-uploader
max-count=
"
4"
:before-delete=
"beforeDelete"
v-on:click-upload=
"beforeRead"
:before-read=
"checkRead"
:after-read=
"a
fterRread"
></van-uploader>
<van-uploader
max-count=
"
9"
:before-delete=
"beforeDelete"
v-on:click-upload=
"beforeRead"
:before-read=
"checkRead"
:after-read=
"otherA
fterRread"
></van-uploader>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -44,515 +57,517 @@
...
@@ -44,515 +57,517 @@
</div>
</div>
</template>
</template>
</div>
</div>
<div
class=
"sumbit_btn flex_ccc"
>
传送图片
</div>
<div
v-if=
"list.length"
@
click=
"sumbitSave"
class=
"sumbit_btn flex_ccc"
>
传送图片
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
upload
}
from
'@/api'
export
default
{
export
default
{
name
:
'cliaims'
,
name
:
'cliaims'
,
data
()
{
data
()
{
return
{
return
{
imageBase
:
''
,
imageBase
:
''
,
list
:
[
list
:
[],
{
// list: [
title
:
'基本资料'
,
// {
content
:
[
// title: '基本资料',
{
// content: [
name
:
'身份证照片'
,
// {
tip
:
''
,
// name: '身份证照片',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传身份证人像面'
,
// url: '',
icon
:
'claims_icon_1.png'
// label: '上传身份证人像面',
},
// icon: 'claims_icon_1.png'
{
// },
prop
:
'reverse'
,
// {
url
:
''
,
// prop: 'reverse',
label
:
'上传身份证国徽面'
,
// url: '',
icon
:
'claims_icon_2.png'
// label: '上传身份证国徽面',
}
// icon: 'claims_icon_2.png'
]
// }
},
// ]
{
// },
name
:
'驾驶证'
,
// {
tip
:
''
,
// name: '驾驶证',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传驾驶证'
,
// url: '',
icon
:
'claims_icon_3.png'
// label: '上传驾驶证',
}
// icon: 'claims_icon_3.png'
]
// }
},
// ]
{
// },
name
:
'行驶证'
,
// {
tip
:
'正本及副证年审合格页面出险时车辆在年审有效期内'
,
// name: '行驶证',
images
:
[
// tip: '正本及副证年审合格页面出险时车辆在年审有效期内',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传行驶证'
,
// url: '',
icon
:
'claims_icon_3.png'
// label: '上传行驶证',
}
// icon: 'claims_icon_3.png'
]
// }
},
// ]
{
// },
name
:
'人车合照'
,
// {
tip
:
'须清晰体现车牌、车辆全貌'
,
// name: '人车合照',
images
:
[
// tip: '须清晰体现车牌、车辆全貌',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传人车合照'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传人车合照',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'前挡车架号'
,
// {
tip
:
'车架号清晰可见'
,
// name: '前挡车架号',
images
:
[
// tip: '车架号清晰可见',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传前挡车架号'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传前挡车架号',
}
// icon: 'claims_icon_4.png'
]
// }
}
// ]
],
// }
spectical
:
true
// ],
},
// spectical: true
{
// },
title
:
'定损细节资料'
,
// {
content
:
[
// title: '定损细节资料',
{
// content: [
name
:
'商业险保单'
,
// {
tip
:
''
,
// name: '商业险保单',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传商业险保单'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传商业险保单',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'购车发票(原件)'
,
// {
tip
:
''
,
// name: '购车发票(原件)',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传购车发票(原件)'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传购车发票(原件)',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'全损协议(原件)'
,
// {
tip
:
''
,
// name: '全损协议(原件)',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传全损协议(原件)'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传全损协议(原件)',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'车险赔付凭证'
,
// {
tip
:
''
,
// name: '车险赔付凭证',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传车险赔付凭证'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传车险赔付凭证',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'购置税完税凭证'
,
// {
tip
:
''
,
// name: '购置税完税凭证',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传购置税完税凭证'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传购置税完税凭证',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'登记费票据(原件)'
,
// {
tip
:
''
,
// name: '登记费票据(原件)',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传登记费票据(原件)'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传登记费票据(原件)',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'加装设备凭证'
,
// {
tip
:
''
,
// name: '加装设备凭证',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传加装设备凭证'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传加装设备凭证',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'火灾事故认定书'
,
// {
tip
:
''
,
// name: '火灾事故认定书',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传火灾事故认定书'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传火灾事故认定书',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'车辆维修估损单'
,
// {
tip
:
''
,
// name: '车辆维修估损单',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传车辆维修估损单'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传车辆维修估损单',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'仪表台公里数照片'
,
// {
tip
:
''
,
// name: '仪表台公里数照片',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传仪表台公里数照片'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传仪表台公里数照片',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'车辆受损轮胎方位的整车45度角照片'
,
// {
tip
:
''
,
// name: '车辆受损轮胎方位的整车45度角照片',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传45度角照片'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传45度角照片',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'受损轮胎品牌及驾驶证副页照片'
,
// {
tip
:
''
,
// name: '受损轮胎品牌及驾驶证副页照片',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传品牌及驾驶证副页照片'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传品牌及驾驶证副页照片',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'受损轮胎规格'
,
// {
tip
:
''
,
// name: '受损轮胎规格',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传受损轮胎规格'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传受损轮胎规格',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传临牌反面照片'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传临牌反面照片',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'受损轮胎花纹'
,
// {
tip
:
''
,
// name: '受损轮胎花纹',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传受损轮胎花纹'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传受损轮胎花纹',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传临牌照片'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传临牌照片',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'轮胎受损部位特写照'
,
// {
tip
:
''
,
// name: '轮胎受损部位特写照',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传轮胎受损部位特写照'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传轮胎受损部位特写照',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传临牌照片'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传临牌照片',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'受损轮胎DOT号'
,
// {
tip
:
''
,
// name: '受损轮胎DOT号',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传轮胎受损轮胎DOT号'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传轮胎受损轮胎DOT号',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传批次号'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传批次号',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'维修估损单/接车单'
,
// {
tip
:
''
,
// name: '维修估损单/接车单',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传维修估损单'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传维修估损单',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传接车单'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传接车单',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'损坏部位特写照片'
,
// {
tip
:
''
,
// name: '损坏部位特写照片',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传损坏部位特写照片'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传损坏部位特写照片',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'修复后照片'
,
// {
tip
:
''
,
// name: '修复后照片',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传修复后照片'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传修复后照片',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'定损单'
,
// {
tip
:
''
,
// name: '定损单',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传定损单'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传定损单',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'钥匙'
,
// {
tip
:
''
,
// name: '钥匙',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'丢失情况说明'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '丢失情况说明',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'丢失钥匙的解绑'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '丢失钥匙的解绑',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'注销凭证'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '注销凭证',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'更换前后钥匙已匹配数量截图'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '更换前后钥匙已匹配数量截图',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'系统钥匙匹配截图'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '系统钥匙匹配截图',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'系统EPC价格截图'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '系统EPC价格截图',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'新钥匙实物照'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '新钥匙实物照',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'维修估损单'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '维修估损单',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'接车单'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '接车单',
},
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'车牌'
,
// {
tip
:
''
,
// name: '车牌',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'丢失情况说明'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '丢失情况说明',
},
// icon: 'claims_icon_4.png'
{
// },
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'车管所收费凭证'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '车管所收费凭证',
},
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'车辆施工过程照片(拆装、磨底)'
,
// {
tip
:
''
,
// name: '车辆施工过程照片(拆装、磨底)',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'车辆施工过程照片'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '车辆施工过程照片',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'代步车协议'
,
// {
tip
:
''
,
// name: '代步车协议',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'代步车协议'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '代步车协议',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
],
// }
spectical
:
true
// ],
},
// spectical: true
{
// },
title
:
'现场照片'
,
// {
content
:
[
// title: '现场照片',
{
// content: [
name
:
'车头外观45度照片'
,
// {
tip
:
''
,
// name: '车头外观45度照片',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传车头外观45度照片'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传车头外观45度照片',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'事故现场照片'
,
// {
tip
:
''
,
// name: '事故现场照片',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传事故现场照片'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传事故现场照片',
}
// icon: 'claims_icon_4.png'
]
// }
},
// ]
{
// },
name
:
'损失部位照片'
,
// {
tip
:
''
,
// name: '损失部位照片',
images
:
[
// tip: '',
{
// images: [
prop
:
'positive'
,
// {
url
:
''
,
// prop: 'positive',
label
:
'上传损失部位照片'
,
// url: '',
icon
:
'claims_icon_4.png'
// label: '上传损失部位照片',
}
// icon: 'claims_icon_4.png'
]
// }
}
// ]
],
// }
spectical
:
true
// ],
},
// spectical: true
{
// },
title
:
'其他资料'
,
// {
content
:
[],
// title: '其他资料',
spectical
:
false
// content: [],
}
// spectical: false
],
// }
currentIndex
:
1
,
// ],
currentIndex
:
0
,
size
:
'102px'
size
:
'102px'
}
}
},
},
...
@@ -560,8 +575,108 @@ export default {
...
@@ -560,8 +575,108 @@ export default {
created
()
{
created
()
{
this
.
imageBase
=
window
.
$imageBase
this
.
imageBase
=
window
.
$imageBase
this
.
computedWidth
()
this
.
computedWidth
()
this
.
getList
()
},
},
methods
:
{
methods
:
{
// 获取附件列表
getList
()
{
let
para
=
{
contractNo
:
'496557746246918144'
,
writeOffCode
:
'12274722'
}
this
.
showLoading
()
upload
.
claimsClassifyApi
(
para
).
then
(
res
=>
{
this
.
hideLoading
()
let
result
=
res
.
data
||
[]
let
tempArr
=
[]
result
.
forEach
(
el
=>
{
let
obj
=
{
title
:
el
.
firstClassifyName
,
spectical
:
true
,
content
:
this
.
handleData
(
el
.
secondClassifyList
)
}
if
(
el
.
firstClassifyName
.
indexOf
(
'其他资料'
)
!=
-
1
)
{
obj
.
spectical
=
false
obj
.
content
=
[]
obj
.
secondClassifyList
=
el
.
secondClassifyList
}
tempArr
.
push
(
obj
)
})
this
.
list
=
tempArr
})
},
// 根据二级资料数据重构数据
handleData
(
arr
=
[])
{
let
idCardList
=
[]
let
idCardObj
=
{}
let
result
=
[]
arr
.
forEach
((
el
,
index
)
=>
{
if
(
el
.
secondClassifyName
.
indexOf
(
'身份证人像面'
)
!=
-
1
)
{
idCardList
.
push
({
url
:
''
,
label
:
'上传'
+
el
.
secondClassifyName
,
icon
:
'claims_icon_1.png'
,
...
el
})
}
else
if
(
el
.
secondClassifyName
.
indexOf
(
'身份证国徽面'
)
!=
-
1
)
{
idCardList
.
push
({
url
:
''
,
label
:
'上传'
+
el
.
secondClassifyName
,
icon
:
'claims_icon_2.png'
,
...
el
})
}
else
{
let
setting
=
this
.
matchDataByName
(
el
.
secondClassifyName
)
let
temp
=
{
name
:
el
.
secondClassifyName
,
tip
:
setting
.
tip
,
images
:
[
{
url
:
''
,
label
:
'上传'
+
el
.
secondClassifyName
,
icon
:
setting
.
icon
,
...
el
}
]
}
result
.
push
(
temp
)
}
})
if
(
idCardList
.
length
)
{
idCardObj
=
{
name
:
'身份证照片'
,
tip
:
''
,
images
:
idCardList
}
result
.
unshift
(
idCardObj
)
}
return
result
},
// 根据名称匹配数据---tip和icon
// index 为图片icon的命名索引
// 1.为身份证正面 2.为身份证反面 3.为驾驶证 4.默认
matchDataByName
(
name
)
{
let
index
=
4
let
tip
=
''
if
(
name
==
'驾驶证'
)
{
index
=
3
}
else
if
(
name
==
'行驶证'
)
{
index
=
3
tip
=
'正本及副证年审合格页面出险时车辆在年审有效期内'
}
else
if
(
name
==
'人车合照'
)
{
tip
=
'须清晰体现车牌、车辆全貌'
}
else
if
(
name
==
'前挡车架号'
)
{
tip
=
'车架号清晰可见'
}
let
obj
=
{
icon
:
`claims_icon_
${
index
}
.png`
,
tip
}
return
obj
},
computedWidth
()
{
computedWidth
()
{
const
screen
=
window
.
screen
.
width
const
screen
=
window
.
screen
.
width
const
imageW
=
(
screen
-
16
*
4
)
/
3
const
imageW
=
(
screen
-
16
*
4
)
/
3
...
@@ -570,10 +685,19 @@ export default {
...
@@ -570,10 +685,19 @@ export default {
openLine
(
item
,
index
)
{
openLine
(
item
,
index
)
{
this
.
currentIndex
=
index
this
.
currentIndex
=
index
},
},
toClickUpoload
(
current
)
{
toClickUpoload
(
current
,
fatherIndex
,
childIndex
)
{
console
.
log
(
current
)
this
.
currentElement
=
current
this
.
fatherIndex
=
fatherIndex
this
.
childIndex
=
childIndex
},
toDelete
(
current
,
fatherIndex
,
childIndex
)
{
this
.
list
[
this
.
currentIndex
].
content
[
fatherIndex
].
images
[
childIndex
].
url
=
''
},
deleteImg
(
index
)
{
this
.
list
[
this
.
currentIndex
].
content
.
splice
(
index
,
1
)
},
},
beforeRead
(
e
)
{},
beforeRead
(
e
)
{},
beforeDelete
()
{},
checkRead
(
file
)
{
checkRead
(
file
)
{
if
(
file
.
size
>
1024
)
{
if
(
file
.
size
>
1024
)
{
this
.
showLoading
()
this
.
showLoading
()
...
@@ -581,15 +705,94 @@ export default {
...
@@ -581,15 +705,94 @@ export default {
}
}
return
true
return
true
},
},
// 其他
otherAfterRread
(
file
)
{
this
.
hideLoading
()
this
.
uploadImage
(
file
,
true
)
},
// 非其他
afterRread
(
file
,
e
)
{
afterRread
(
file
,
e
)
{
console
.
log
(
file
)
this
.
hideLoading
()
this
.
hideLoading
()
this
.
uploadImage
(
file
)
},
uploadImage
(
file
,
isOther
)
{
const
imgFile
=
file
.
content
let
fileName
=
file
.
file
.
name
let
index
=
fileName
.
lastIndexOf
(
'.'
)
fileName
=
fileName
.
substring
(
index
+
1
,
fileName
.
length
)
const
base64
=
fileName
+
'@'
+
imgFile
.
split
(
','
)[
1
]
let
para
=
{
file
:
base64
,
fileType
:
'image'
}
this
.
showLoading
()
upload
.
uploadImageApi
(
para
).
then
(
res
=>
{
this
.
hideLoading
()
if
(
res
.
code
==
0
)
{
if
(
!
isOther
)
{
this
.
list
[
this
.
currentIndex
].
content
[
this
.
fatherIndex
].
images
[
this
.
childIndex
].
url
=
res
.
data
this
.
list
[
this
.
currentIndex
].
content
[
this
.
fatherIndex
].
images
[
this
.
childIndex
].
fileType
=
fileName
}
else
{
this
.
list
[
this
.
currentIndex
].
content
.
push
({
url
:
res
.
data
,
fileType
:
fileName
})
}
}
else
{
this
.
showToast
(
res
.
message
)
}
})
},
sumbitSave
()
{
let
files
=
[]
let
filters
=
[]
this
.
list
.
forEach
(
item
=>
{
if
(
!
item
.
spectical
)
{
let
temp
=
item
.
secondClassifyList
[
0
]
if
(
item
.
content
.
length
)
{
item
.
content
.
forEach
(
ele
=>
{
let
obj
=
{
...
temp
,
...
ele
}
filters
.
push
(
obj
)
})
}
// this.uploadImage(file)
//其他类型
}
else
{
//非其他类型
item
.
content
.
forEach
(
el
=>
{
el
.
images
.
forEach
(
ele
=>
{
if
(
ele
.
url
)
{
filters
.
push
(
ele
)
}
})
})
}
})
let
para
=
this
.
handlerListIndex
(
filters
)
para
.
writeOffCode
=
'80154055'
this
.
showLoading
()
upload
.
claimsClassifyuploadApi
(
para
).
then
(
res
=>
{
this
.
hideLoading
()
this
.
showToast
(
'提交成功'
)
})
},
},
beforeDelete
(
file
,
e
)
{
/**处理list[index]数据 */
// this.currentDelImg = file.url
handlerListIndex
(
arr
)
{
// this.deleteFile()
let
obj
=
{}
arr
.
forEach
((
el
,
index
)
=>
{
let
fileUrl
=
`fileList[
${
index
}
].fileUrl`
let
fileType
=
`fileList[
${
index
}
].fileType`
let
classifyId
=
`fileList[
${
index
}
].classifyId`
let
fileCode
=
`fileList[
${
index
}
].fileCode`
let
temp
=
{
[
fileUrl
]:
el
.
url
,
[
fileType
]:
el
.
fileType
,
[
classifyId
]:
el
.
id
,
[
fileCode
]:
el
.
attachmentCode
}
Object
.
assign
(
obj
,
temp
)
})
return
obj
}
}
}
}
}
}
...
@@ -668,6 +871,7 @@ export default {
...
@@ -668,6 +871,7 @@ export default {
border-radius
:
4px
;
border-radius
:
4px
;
margin-right
:
16px
;
margin-right
:
16px
;
margin-bottom
:
16px
;
margin-bottom
:
16px
;
position
:
relative
;
}
}
.mar0
{
.mar0
{
margin-right
:
0
;
margin-right
:
0
;
...
@@ -698,7 +902,17 @@ export default {
...
@@ -698,7 +902,17 @@ export default {
top
:
0
;
top
:
0
;
bottom
:
0
;
bottom
:
0
;
opacity
:
0
;
opacity
:
0
;
z-index
:
1
;
z-index
:
10
;
}
.delete_icon
{
position
:
absolute
;
right
:
0
;
top
:
0
;
z-index
:
20
;
>
img
{
width
:
17px
;
height
:
16px
;
}
}
}
.flex_scb
{
.flex_scb
{
display
:
flex
;
display
:
flex
;
...
...
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