Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 672c7d0c
authored
Aug 14, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V4.43.1' into SAAS+V4.44
2 parents
eca995bf
72b9d843
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
12 deletions
components/Canvas/wn-canvas.vue
components/Insurance/Insurance.vue
components/Insurance/components/InsurancePopup.vue
components/Insurance/components/InsuranceTable.vue
manifest.json
components/Canvas/wn-canvas.vue
View file @
672c7d0
...
...
@@ -2,7 +2,7 @@
<view
class=
"wn-canvas"
>
<zoom-pan
:class=
"['canvas-box',
{fill:custom}]"
:disabled="drawStatus"
:disabled="drawStatus
|| !scaleSwitch
"
:scale-max="5"
:scale-min="1"
@scale="scale"
...
...
@@ -169,6 +169,10 @@ export default {
default
:
'drawCanvas'
},
custom
:
Boolean
,
//自定义
scaleSwitch
:{
type
:
Boolean
,
default
:
true
}
},
computed
:
{
watchStatus
()
{
...
...
components/Insurance/Insurance.vue
View file @
672c7d0
...
...
@@ -5,6 +5,7 @@
:drawStatus=
"penSwitch"
custom
@
scale=
"$emit('scale',$event)"
:scaleSwitch=
"false"
>
<template
slot=
"customContent"
>
<view
class=
"title"
>
...
...
@@ -164,11 +165,13 @@ export default {
this
.
focusIndex
=
-
1
if
(
e
?.
currentTarget
&&
e
?.
target
)
{
const
{
key
}
=
e
.
currentTarget
.
dataset
if
(
e
.
target
.
value
.
length
==
0
)
return
if
(
key
==
'newCarFare'
)
{
let
value
=
Number
(
e
.
target
.
value
)
>=
9999999
?
9999999
:
e
.
target
.
value
// 判断是否为整数
if
(
!
Number
.
isInteger
(
value
))
value
=
String
(
value
).
replace
(
/
(\d
*
\.?\d{0,2})\d
*/
,
'$1'
)
this
.
customerInfo
[
key
]
=
Number
(
value
).
toFixed
(
2
)
?
value
>=
0
?
value
:
''
:
''
value
=
Number
(
String
(
value
).
replace
(
/^0+/
,
''
))
this
.
customerInfo
[
key
]
=
Number
(
value
).
toFixed
(
2
)
?
Number
(
value
).
toFixed
(
2
)
>=
0
?
value
:
''
:
''
this
.
inputCustomer
()
}
}
...
...
components/Insurance/components/InsurancePopup.vue
View file @
672c7d0
...
...
@@ -117,6 +117,7 @@ export default {
color
:
#292d33
;
line-height
:
48
rpx
;
overflow-y
:
auto
;
word-break
:
break-all
;
}
}
</
style
>
\ No newline at end of file
components/Insurance/components/InsuranceTable.vue
View file @
672c7d0
...
...
@@ -32,7 +32,7 @@
<view
:class=
"['block',defaultBlock(i)]"
></view>
<view
class=
"name flex"
@
click=
"
i.checked = !i.checked
"
@
click=
"
choose(i,index)
"
>
<template
v-if=
"!isPreview"
>
<view
:class=
"['check-box flex',
{'checked':i.checked}]">
...
...
@@ -176,9 +176,11 @@ export default {
handleInput
(
event
)
{
let
value
=
event
.
target
.
value
,
{
index
}
=
event
.
currentTarget
.
dataset
if
(
value
.
length
==
0
)
return
value
=
Number
(
value
)
>
999999
?
999999
:
value
if
(
!
Number
.
isInteger
(
value
))
value
=
String
(
value
).
replace
(
/
(\d
*
\.?\d{0,2})\d
*/
,
'$1'
)
this
.
insuranceList
[
index
].
cost
=
Number
(
value
).
toFixed
(
2
)
?
value
>=
0
?
value
:
''
:
''
value
=
Number
(
String
(
value
).
replace
(
/^0+/
,
''
))
this
.
insuranceList
[
index
].
cost
=
Number
(
value
).
toFixed
(
2
)
?
Number
(
value
).
toFixed
(
2
)
>=
0
?
value
:
''
:
''
},
defaultBlock
(
item
)
{
return
item
.
main
==
'交强险'
?
(
this
.
isPreview
?
'has-default'
:
item
.
show
?
'has-default'
:
''
)
:
''
...
...
@@ -207,7 +209,7 @@ export default {
e
.
checked
=
true
e
.
main
=
e
.
itemName
==
'交强险'
?
'交强险'
:
'商业险'
e
.
show
=
false
e
.
itemDesc
=
this
.
processHtmlString
(
e
.
itemDesc
)
e
.
itemDesc
=
e
.
itemDesc
?
this
.
processHtmlString
(
e
.
itemDesc
)
:
''
})
if
(
!
storageInsuranceList
)
{
uni
.
showLoading
({
...
...
@@ -246,12 +248,21 @@ export default {
this
.
flag
=
true
},
processHtmlString
(
htmlString
)
{
const
regexStyle
=
/style="
[^
"
]
*"/g
const
regexBr
=
/<
\/
br>|<br>|<br
\/
>|
\n
/g
let
processedString
=
htmlString
.
replace
(
regexBr
,
'<div></div>'
)
let
newHtmlString
=
processedString
.
replace
(
regexStyle
,
''
)
return
newHtmlString
}
// 移除 `<br>` 及其变体,并用 `<div></div>` 替换
let
processedString
=
htmlString
.
replace
(
/<
\/?
br
\s
*
\/?
>|
\n
/g
,
'<div></div>'
)
// 移除 `style` 属性
processedString
=
processedString
.
replace
(
/style="
[^
"
]
*"/g
,
''
);
// 移除 `<strong>`, `</strong>`, `<em>`, `</em>` 和孤立的 `<` 标签
processedString
=
processedString
.
replace
(
/<strong>|<
\/
strong>|<em>|<
\/
em>|<>/g
,
''
);
// 替换非 `div` 和非 `span` 的 HTML 标签
processedString
=
processedString
.
replace
(
/<
(?!
div|span|p
)[^
>
]
*>/g
,
'</div>'
);
return
processedString
},
choose
(
item
,
index
)
{
if
(
this
.
isPreview
)
return
this
.
insuranceList
[
index
].
checked
=
!
item
.
checked
},
}
}
</
script
>
...
...
manifest.json
View file @
672c7d0
...
...
@@ -2,7 +2,7 @@
"name"
:
"展业助手"
,
"appid"
:
"__UNI__D3BD3DF"
,
"description"
:
""
,
"versionName"
:
"1.
5
.0"
,
"versionName"
:
"1.
6
.0"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
/*
5
+App特有相关
*/
...
...
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