Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
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 f0e8b089
authored
Mar 26, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix(venus-usedcar-h5): eslint报错修复
1 parent
03a7391f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
77 additions
and
44 deletions
apps/web/venus-usedcar-quality/src/App.vue
apps/web/venus-usedcar-quality/src/api/index.ts
apps/web/venus-usedcar-quality/src/components.d.ts
apps/web/venus-usedcar-quality/src/components/CustomizeForm/Index.vue
apps/web/venus-usedcar-quality/src/components/CustomizeForm/buttonSelect.vue
apps/web/venus-usedcar-quality/src/components/CustomizeForm/buttonSelectAndImageUpload.vue
apps/web/venus-usedcar-quality/src/components/CustomizeForm/selectDropdown.vue
apps/web/venus-usedcar-quality/src/composables/useRequest.ts
apps/web/venus-usedcar-quality/src/main.ts
apps/web/venus-usedcar-quality/src/stores/modules/app.ts
apps/web/venus-usedcar-quality/src/types/api.ts
apps/web/venus-usedcar-quality/src/utils/index.ts
apps/web/venus-usedcar-quality/src/utils/upload.js
apps/web/venus-usedcar-quality/src/views/inspect-report/index.vue
apps/web/venus-usedcar-quality/src/vite-env.d.ts
apps/web/venus-usedcar-quality/src/App.vue
View file @
f0e8b08
...
@@ -10,9 +10,9 @@ import { RouterView } from "vue-router";
...
@@ -10,9 +10,9 @@ import { RouterView } from "vue-router";
#app
{
#app
{
width
:
100%
;
width
:
100%
;
min-height
:
100vh
;
min-height
:
100vh
;
background-color
:
var
(
--color-bg-page
);
font-family
:
-apple-system
,
BlinkMacSystemFont
,
"Helvetica Neue"
,
Helvetica
,
font-family
:
-apple-system
,
BlinkMacSystemFont
,
"Helvetica Neue"
,
Helvetica
,
Segoe
UI
,
Arial
,
Roboto
,
"PingFang SC"
,
"miui"
,
"Hiragino Sans GB"
,
"Segoe UI"
,
Arial
,
Roboto
,
"PingFang SC"
,
miui
,
"Hiragino Sans GB"
,
"Microsoft Yahei"
,
sans-serif
;
"Microsoft Yahei"
,
sans-serif
;
background-color
:
var
(
--color-bg-page
);
}
}
</
style
>
</
style
>
apps/web/venus-usedcar-quality/src/api/index.ts
View file @
f0e8b08
export
*
from
"./modules/car"
;
export
*
from
"./modules/car"
;
export
*
from
"./modules/inspect-report"
;
export
*
from
"./modules/user"
;
export
*
from
"./modules/user"
;
export
*
from
"./modules/work-order"
;
export
*
from
"./modules/work-order"
;
export
*
from
"./modules/inspect-report"
;
apps/web/venus-usedcar-quality/src/components.d.ts
View file @
f0e8b08
...
@@ -8,6 +8,7 @@ export {}
...
@@ -8,6 +8,7 @@ export {}
declare
module
'vue'
{
declare
module
'vue'
{
export
interface
GlobalComponents
{
export
interface
GlobalComponents
{
ButtonSelect
:
typeof
import
(
'./components/CustomizeForm/buttonSelect.vue'
)[
'default'
]
ButtonSelect
:
typeof
import
(
'./components/CustomizeForm/buttonSelect.vue'
)[
'default'
]
ButtonSelectAndImageUpload
:
typeof
import
(
'./components/CustomizeForm/buttonSelectAndImageUpload.vue'
)[
'default'
]
CustomizeUploadFile
:
typeof
import
(
'./components/CustomizeForm/customizeUploadFile.vue'
)[
'default'
]
CustomizeUploadFile
:
typeof
import
(
'./components/CustomizeForm/customizeUploadFile.vue'
)[
'default'
]
Index
:
typeof
import
(
'./components/CustomizeForm/Index.vue'
)[
'default'
]
Index
:
typeof
import
(
'./components/CustomizeForm/Index.vue'
)[
'default'
]
Layouts
:
typeof
import
(
'./layouts/index.vue'
)[
'default'
]
Layouts
:
typeof
import
(
'./layouts/index.vue'
)[
'default'
]
...
...
apps/web/venus-usedcar-quality/src/components/CustomizeForm/Index.vue
View file @
f0e8b08
This diff is collapsed.
Click to expand it.
apps/web/venus-usedcar-quality/src/components/CustomizeForm/buttonSelect.vue
View file @
f0e8b08
...
@@ -4,7 +4,7 @@ import { computed, ref } from "vue";
...
@@ -4,7 +4,7 @@ import { computed, ref } from "vue";
const
props
=
defineProps
({
const
props
=
defineProps
({
item
:
{
item
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{
},
default
:
()
=>
{},
},
},
});
});
const
emit
=
defineEmits
([
"update"
]);
const
emit
=
defineEmits
([
"update"
]);
...
@@ -22,7 +22,7 @@ function initData() {
...
@@ -22,7 +22,7 @@ function initData() {
if
(
props
?.
item
?.
inspectionResultVO
)
{
if
(
props
?.
item
?.
inspectionResultVO
)
{
const
inspectionValueList
=
props
?.
item
?.
inspectionResultVO
?.
inspectionValueList
||
[];
const
inspectionValueList
=
props
?.
item
?.
inspectionResultVO
?.
inspectionValueList
||
[];
for
(
const
i
of
inspectionValueList
)
{
for
(
const
i
of
inspectionValueList
)
{
if
(
i
.
valueText
&&
i
.
interactionType
==
"button_select"
)
{
pickerValue
.
value
.
push
(
i
.
valueKey
)
}
if
(
i
.
valueText
&&
i
.
interactionType
==
"button_select"
)
{
pickerValue
.
value
.
push
(
i
.
valueKey
)
;
}
}
}
}
}
setupdate
();
setupdate
();
...
@@ -74,8 +74,11 @@ function setupdate() {
...
@@ -74,8 +74,11 @@ function setupdate() {
<span>
{{
item
.
nodeName
}}
</span>
<span>
{{
item
.
nodeName
}}
</span>
</div>
</div>
<div
class=
"selectList"
>
<div
class=
"selectList"
>
<div
v-for=
"(col, index) in columnsList"
:key=
"index"
class=
"selectBut"
<div
v-for=
"(col, index) in columnsList"
:class=
"
{ 'pitchOn': pickerValue.includes(col.value) }" @click="handleBut(col)">
:key=
"index"
class=
"selectBut"
:class=
"
{ 'pitchOn': pickerValue.includes(col.value) }"
@click="handleBut(col)">
{{
col
.
text
}}
{{
col
.
text
}}
<div
v-if=
"pickerValue.includes(col.value)"
class=
"pitchImg"
></div>
<div
v-if=
"pickerValue.includes(col.value)"
class=
"pitchImg"
></div>
</div>
</div>
...
...
apps/web/venus-usedcar-quality/src/components/CustomizeForm/buttonSelectAndImageUpload.vue
View file @
f0e8b08
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
{
uploadFile
}
from
"@/utils/upload.js"
;
import
{
uploadFile
}
from
"@/utils/upload.js"
;
import
{
showToast
}
from
"vant"
;
import
{
showToast
}
from
"vant"
;
...
@@ -7,7 +8,7 @@ import { showToast } from "vant";
...
@@ -7,7 +8,7 @@ import { showToast } from "vant";
const
props
=
defineProps
({
const
props
=
defineProps
({
item
:
{
item
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{
},
default
:
()
=>
{},
},
},
});
});
...
@@ -32,7 +33,7 @@ function initData() {
...
@@ -32,7 +33,7 @@ function initData() {
if
(
props
?.
item
?.
inspectionResultVO
)
{
if
(
props
?.
item
?.
inspectionResultVO
)
{
const
inspectionValueList
=
props
?.
item
?.
inspectionResultVO
?.
inspectionValueList
||
[];
const
inspectionValueList
=
props
?.
item
?.
inspectionResultVO
?.
inspectionValueList
||
[];
for
(
const
i
of
inspectionValueList
)
{
for
(
const
i
of
inspectionValueList
)
{
if
(
i
.
valueText
&&
i
.
interactionType
==
"image_upload"
)
{
pickerValue
.
value
.
push
(
i
.
valueText
)
}
if
(
i
.
valueText
&&
i
.
interactionType
==
"image_upload"
)
{
pickerValue
.
value
.
push
(
i
.
valueText
)
;
}
}
}
}
}
updateData
();
updateData
();
...
@@ -89,19 +90,35 @@ function updateData() {
...
@@ -89,19 +90,35 @@ function updateData() {
有损伤请拍摄图片,无损伤请忽略
有损伤请拍摄图片,无损伤请忽略
</div>
</div>
</div>
</div>
<input
ref=
"fileInputRef"
accept=
"image/*"
class=
"hidden-input"
type=
"file"
@
change=
"onFileChange"
>
<input
ref=
"fileInputRef"
accept=
"image/*"
class=
"hidden-input"
type=
"file"
@
change=
"onFileChange"
>
<div
class=
"uploadPage"
>
<div
class=
"uploadPage"
>
<div
v-if=
"(validationRules.maxCount || 3) > pickerValue.length"
class=
"uploadBox"
@
click=
"pickFile"
>
<div
v-if=
"(validationRules.maxCount || 3) > pickerValue.length"
<van-icon
class=
"plusBox"
color=
"#999999"
name=
"plus"
size=
"24"
/>
class=
"uploadBox"
@
click=
"pickFile"
>
<van-icon
class=
"plusBox"
color=
"#999999"
name=
"plus"
size=
"24"
/>
<div
class=
"uploadTxt"
>
<div
class=
"uploadTxt"
>
添加照片
添加照片
</div>
</div>
</div>
</div>
<div
v-for=
"(url, index) in pickerValue"
:key=
"index"
class=
"uploadBox"
>
<div
v-for=
"(url, index) in pickerValue"
:key=
"index"
class=
"uploadBox"
>
<div
class=
"deleteBox"
@
click=
"handleDelete(url)"
>
<div
class=
"deleteBox"
@
click=
"handleDelete(url)"
>
<van-icon
color=
"#999999"
name=
"clear"
size=
"20"
/>
<van-icon
color=
"#999999"
name=
"clear"
size=
"20"
/>
</div>
</div>
<van-image
height=
"96"
:src=
"url"
style=
"border-radius: 8px;"
width=
"96"
/>
<van-image
height=
"96"
:src=
"url"
style=
"border-radius: 8px;"
width=
"96"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
apps/web/venus-usedcar-quality/src/components/CustomizeForm/selectDropdown.vue
View file @
f0e8b08
...
@@ -4,7 +4,7 @@ import { computed, ref } from "vue";
...
@@ -4,7 +4,7 @@ import { computed, ref } from "vue";
const
props
=
defineProps
({
const
props
=
defineProps
({
item
:
{
item
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{
},
default
:
()
=>
{},
},
},
});
});
...
@@ -43,7 +43,7 @@ function initData() {
...
@@ -43,7 +43,7 @@ function initData() {
}
}
}
}
onConfirm
();
onConfirm
();
console
.
log
(
'pickerValue.value2222222222222222222'
,
pickerValue
.
value
);
console
.
log
(
"pickerValue.value2222222222222222222"
,
pickerValue
.
value
);
}
}
// 计算属性
// 计算属性
...
@@ -62,9 +62,6 @@ function onConfirm() {
...
@@ -62,9 +62,6 @@ function onConfirm() {
const
picker
=
pickerValue
.
value
&&
pickerValue
.
value
.
length
>
0
?
pickerValue
.
value
[
0
]
:
""
;
const
picker
=
pickerValue
.
value
&&
pickerValue
.
value
.
length
>
0
?
pickerValue
.
value
[
0
]
:
""
;
showPicker
.
value
=
false
;
showPicker
.
value
=
false
;
const
selected
=
columnsList
.
value
.
find
((
col
)
=>
col
.
value
===
picker
)
||
{};
const
selected
=
columnsList
.
value
.
find
((
col
)
=>
col
.
value
===
picker
)
||
{};
props
.
item
.
value
=
selected
.
value
||
""
;
props
.
item
.
valueText
=
selected
.
text
||
""
;
props
.
item
.
valueKey
=
selected
.
value
||
""
;
emit
(
"update"
,
{
emit
(
"update"
,
{
value
:
selected
.
value
||
""
,
value
:
selected
.
value
||
""
,
valueText
:
selected
.
text
||
""
,
valueText
:
selected
.
text
||
""
,
...
@@ -76,10 +73,22 @@ function onConfirm() {
...
@@ -76,10 +73,22 @@ function onConfirm() {
<
template
>
<
template
>
<div>
<div>
<van-field
v-model=
"displayValueText"
clearable
is-link
:label=
"item.nodeName"
name=
"datePicker"
<van-field
v-model=
"displayValueText"
:placeholder=
"item.placeholder"
readonly
:required=
"item.required === 1"
@
click=
"showPicker = true"
/>
clearable
<van-popup
v-model:show=
"showPicker"
destroy-on-close
position=
"bottom"
>
is-link
<van-picker
v-model=
"pickerValue"
:columns=
"columnsList"
:title=
"item.nodeName"
@
cancel=
"showPicker = false"
:label=
"item.nodeName"
name=
"datePicker"
:placeholder=
"item.placeholder"
readonly
:required=
"item.required === 1"
@
click=
"showPicker = true"
/>
<van-popup
v-model:show=
"showPicker"
destroy-on-close
position=
"bottom"
>
<van-picker
v-model=
"pickerValue"
:columns=
"columnsList"
:title=
"item.nodeName"
@
cancel=
"showPicker = false"
@
confirm=
"onConfirm"
/>
@
confirm=
"onConfirm"
/>
</van-popup>
</van-popup>
</div>
</div>
...
...
apps/web/venus-usedcar-quality/src/composables/useRequest.ts
View file @
f0e8b08
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
{
showToast
}
from
"vant"
;
import
{
showToast
}
from
"vant"
;
interface
UseRequestOptions
<
T
>
{
interface
UseRequestOptions
<
T
>
{
...
@@ -26,10 +27,10 @@ export function useRequest<T>(
...
@@ -26,10 +27,10 @@ export function useRequest<T>(
data
.
value
=
result
;
data
.
value
=
result
;
onSuccess
?.(
result
);
onSuccess
?.(
result
);
return
result
;
return
result
;
}
catch
(
err
)
{
}
catch
(
error_
)
{
error
.
value
=
err
;
error
.
value
=
error_
;
onError
?.(
err
);
onError
?.(
error_
);
throw
err
;
throw
error_
;
}
finally
{
}
finally
{
loading
.
value
=
false
;
loading
.
value
=
false
;
}
}
...
@@ -74,9 +75,9 @@ export function usePagination<T>(
...
@@ -74,9 +75,9 @@ export function usePagination<T>(
page
.
value
+=
1
;
page
.
value
+=
1
;
}
}
onSuccess
?.(
res
.
list
,
res
.
total
);
onSuccess
?.(
res
.
list
,
res
.
total
);
}
catch
(
er
r
)
{
}
catch
(
erro
r
)
{
showToast
(
"加载失败,请重试"
);
showToast
(
"加载失败,请重试"
);
throw
er
r
;
throw
erro
r
;
}
finally
{
}
finally
{
loading
.
value
=
false
;
loading
.
value
=
false
;
refreshing
.
value
=
false
;
refreshing
.
value
=
false
;
...
...
apps/web/venus-usedcar-quality/src/main.ts
View file @
f0e8b08
...
@@ -9,10 +9,11 @@ import router from "./router";
...
@@ -9,10 +9,11 @@ import router from "./router";
import
{
initFlexible
}
from
"./utils/flexible"
;
import
{
initFlexible
}
from
"./utils/flexible"
;
import
{
initTokenBridge
}
from
"./utils/webviewBridge"
;
import
{
initTokenBridge
}
from
"./utils/webviewBridge"
;
import
"vant/es/toast/style"
;
import
"@assets/styles/reset.scss"
;
import
"@assets/styles/reset.scss"
;
import
"@assets/styles/index.scss"
;
import
"@assets/styles/index.scss"
;
import
"@assets/tailwind.css"
;
import
"@assets/tailwind.css"
;
import
"vant/es/toast/style"
;
async
function
bootstrap
()
{
async
function
bootstrap
()
{
initFlexible
();
initFlexible
();
...
...
apps/web/venus-usedcar-quality/src/stores/modules/app.ts
View file @
f0e8b08
import
{
defineStore
}
from
"pinia"
;
import
{
ref
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
{
defineStore
}
from
"pinia"
;
export
const
useAppStore
=
defineStore
(
export
const
useAppStore
=
defineStore
(
"app"
,
"app"
,
()
=>
{
()
=>
{
const
loading
=
ref
(
false
);
const
loading
=
ref
(
false
);
const
theme
=
ref
<
"light"
|
"dark
"
>
(
"light"
);
const
theme
=
ref
<
"dark"
|
"light
"
>
(
"light"
);
function
setLoading
(
val
:
boolean
)
{
function
setLoading
(
val
:
boolean
)
{
loading
.
value
=
val
;
loading
.
value
=
val
;
...
...
apps/web/venus-usedcar-quality/src/types/api.ts
View file @
f0e8b08
...
@@ -19,6 +19,6 @@ export interface PageData<T = unknown> {
...
@@ -19,6 +19,6 @@ export interface PageData<T = unknown> {
export
interface
SelectOption
{
export
interface
SelectOption
{
label
:
string
;
label
:
string
;
value
:
string
|
number
;
value
:
number
|
string
;
disabled
?:
boolean
;
disabled
?:
boolean
;
}
}
apps/web/venus-usedcar-quality/src/utils/index.ts
View file @
f0e8b08
...
@@ -4,8 +4,8 @@ import dayjs from "dayjs";
...
@@ -4,8 +4,8 @@ import dayjs from "dayjs";
* 格式化价格,单位:万元
* 格式化价格,单位:万元
*/
*/
export
function
formatPrice
(
price
:
number
):
string
{
export
function
formatPrice
(
price
:
number
):
string
{
if
(
price
>=
10
000
)
{
if
(
price
>=
10
_
000
)
{
return
`
${(
price
/
10
000
).
toFixed
(
1
)}
万`
;
return
`
${(
price
/
10
_
000
).
toFixed
(
1
)}
万`
;
}
}
return
`
${
price
}
`
;
return
`
${
price
}
`
;
}
}
...
@@ -14,8 +14,8 @@ export function formatPrice(price: number): string {
...
@@ -14,8 +14,8 @@ export function formatPrice(price: number): string {
* 格式化里程,单位:公里
* 格式化里程,单位:公里
*/
*/
export
function
formatMileage
(
mileage
:
number
):
string
{
export
function
formatMileage
(
mileage
:
number
):
string
{
if
(
mileage
>=
10
000
)
{
if
(
mileage
>=
10
_
000
)
{
return
`
${(
mileage
/
10
000
).
toFixed
(
1
)}
万公里`
;
return
`
${(
mileage
/
10
_
000
).
toFixed
(
1
)}
万公里`
;
}
}
return
`
${
mileage
}
公里`
;
return
`
${
mileage
}
公里`
;
}
}
...
@@ -23,14 +23,14 @@ export function formatMileage(mileage: number): string {
...
@@ -23,14 +23,14 @@ export function formatMileage(mileage: number): string {
/**
/**
* 格式化时间
* 格式化时间
*/
*/
export
function
formatDate
(
date
:
string
|
number
|
Date
,
format
=
"YYYY-MM-DD"
):
string
{
export
function
formatDate
(
date
:
Date
|
number
|
string
,
format
=
"YYYY-MM-DD"
):
string
{
return
dayjs
(
date
).
format
(
format
);
return
dayjs
(
date
).
format
(
format
);
}
}
/**
/**
* 格式化相对时间
* 格式化相对时间
*/
*/
export
function
formatRelativeTime
(
date
:
string
|
number
|
Date
):
string
{
export
function
formatRelativeTime
(
date
:
Date
|
number
|
string
):
string
{
const
now
=
dayjs
();
const
now
=
dayjs
();
const
target
=
dayjs
(
date
);
const
target
=
dayjs
(
date
);
const
diffMinutes
=
now
.
diff
(
target
,
"minute"
);
const
diffMinutes
=
now
.
diff
(
target
,
"minute"
);
...
@@ -54,7 +54,7 @@ export function debounce<T extends (...args: unknown[]) => unknown>(
...
@@ -54,7 +54,7 @@ export function debounce<T extends (...args: unknown[]) => unknown>(
fn
:
T
,
fn
:
T
,
delay
=
300
,
delay
=
300
,
):
(...
args
:
Parameters
<
T
>
)
=>
void
{
):
(...
args
:
Parameters
<
T
>
)
=>
void
{
let
timer
:
ReturnType
<
typeof
setTimeout
>
|
null
=
null
;
let
timer
:
null
|
ReturnType
<
typeof
setTimeout
>
=
null
;
return
function
(...
args
:
Parameters
<
T
>
)
{
return
function
(...
args
:
Parameters
<
T
>
)
{
if
(
timer
)
clearTimeout
(
timer
);
if
(
timer
)
clearTimeout
(
timer
);
timer
=
setTimeout
(()
=>
fn
(...
args
),
delay
);
timer
=
setTimeout
(()
=>
fn
(...
args
),
delay
);
...
...
apps/web/venus-usedcar-quality/src/utils/upload.js
View file @
f0e8b08
import
GlOssApi
from
"glsk-oss-jssdk"
;
import
{
OSS_CONFIG
}
from
"@/config/oss.ts"
;
import
{
OSS_CONFIG
}
from
"@/config/oss.ts"
;
import
GlOssApi
from
"glsk-oss-jssdk"
;
let
ossApi
=
null
;
let
ossApi
=
null
;
...
...
apps/web/venus-usedcar-quality/src/views/inspect-report/index.vue
View file @
f0e8b08
...
@@ -376,6 +376,7 @@ onMounted(() => {
...
@@ -376,6 +376,7 @@ onMounted(() => {
<div
class=
"vehicle-plate"
>
<div
class=
"vehicle-plate"
>
<span>
{{ reportData.licensePlate }}
</span>
<span>
{{ reportData.licensePlate }}
</span>
<span
class=
"vehicle-vin"
>
{{ reportData.vin }}
</span>
<span
class=
"vehicle-vin"
>
{{ reportData.vin }}
</span>
</div>
</div>
<div
class=
"vehicle-tags"
>
<div
class=
"vehicle-tags"
>
<img
alt=
"认证标签"
<img
alt=
"认证标签"
...
...
apps/web/venus-usedcar-quality/src/vite-env.d.ts
View file @
f0e8b08
/// <reference types="vite/client" />
//
/ <reference types="vite/client" />
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