Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
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 b2c4fe3c
authored
Mar 05, 2026
by
yancanhua
Committed by
章家宝
Mar 11, 2026
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 轮询出价pc端开发
1 parent
b7808dae
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
178 additions
and
8 deletions
aus-front/admin/src/api/AuctionController.ts
aus-front/admin/src/views/auction/auction/AuctionForm.vue
aus-front/admin/src/views/auction/auction/vehicle/ViewAuctionVehicle.vue
aus-front/admin/src/views/auction/control/AuctionVehiclePage.vue
aus-front/admin/src/api/AuctionController.ts
View file @
b2c4fe3
...
@@ -211,6 +211,13 @@ export class AuctionController {
...
@@ -211,6 +211,13 @@ export class AuctionController {
return
axios
.
post
(
'vehicle/autoBid'
,
pagination
);
return
axios
.
post
(
'vehicle/autoBid'
,
pagination
);
}
}
static
addBid
(
axios
:
AxiosStatic
,
pagination
:
Pagination
<
Auction
>
):
Promise
<
AxiosResponse
<
Page
<
AuctionControl
>>>
{
return
axios
.
post
(
'bid/addBid'
,
pagination
);
}
static
getBidRemainSec
(
axios
:
AxiosStatic
,
pagination
:
Pagination
<
Auction
>
):
Promise
<
AxiosResponse
<
Page
<
AuctionControl
>>>
{
return
axios
.
post
(
'auction/getBidRemainSec'
,
pagination
);
}
// region 前端扩展代码区
// region 前端扩展代码区
// endregion
// endregion
...
...
aus-front/admin/src/views/auction/auction/AuctionForm.vue
View file @
b2c4fe3
...
@@ -78,6 +78,11 @@
...
@@ -78,6 +78,11 @@
</a-input-number>
</a-input-number>
</a-form-item>
</a-form-item>
<a-form-item
v-if=
"formState.auctionMode == '2'"
label=
"车辆持续时间"
name=
"aucvehDuration"
:rules=
"[{ required: true, message: '请输入车辆持续时间!' }]"
>
<a-input-number
v-model:value=
"formState.aucvehDuration"
:min=
"1"
:max=
"99999"
:maxlength=
"5"
style=
"width: 100%"
addon-after=
"秒"
placeholder=
"请输入车辆持续时间"
></a-input-number>
</a-form-item>
<a-form-item
v-if=
"formState.auctionMode == '2'"
label=
"分段延时规则"
name=
"resetDelayDuration"
:rules=
"[{ required: true, message: '请输入分段延时规则!' }]"
>
<a-form-item
v-if=
"formState.auctionMode == '2'"
label=
"分段延时规则"
name=
"resetDelayDuration"
:rules=
"[{ required: true, message: '请输入分段延时规则!' }]"
>
<span
style=
"line-height: 32px;"
>
在倒计时剩余
</span>
<span
style=
"line-height: 32px;"
>
在倒计时剩余
</span>
<a-input-number
v-model:value=
"formState.resetDelayDuration"
:min=
"1"
:max=
"formState.resetDelay-1"
<a-input-number
v-model:value=
"formState.resetDelayDuration"
:min=
"1"
:max=
"formState.resetDelay-1"
...
@@ -318,6 +323,7 @@ export default class AuctionForm extends FormComponent<Auction> {
...
@@ -318,6 +323,7 @@ export default class AuctionForm extends FormComponent<Auction> {
this
.
formState
.
nearReservePriceThreshold
=
'1000'
;
this
.
formState
.
nearReservePriceThreshold
=
'1000'
;
this
.
formState
.
resetDelay
=
'10'
;
this
.
formState
.
resetDelay
=
'10'
;
this
.
formState
.
resetDelayDuration
=
'10'
;
this
.
formState
.
resetDelayDuration
=
'10'
;
this
.
formState
.
aucvehDuration
=
'10'
;
this
.
resetDelayUnit
=
'second'
;
this
.
resetDelayUnit
=
'second'
;
this
.
resetDelayDurationUnit
=
'second'
;
this
.
resetDelayDurationUnit
=
'second'
;
...
@@ -342,6 +348,7 @@ export default class AuctionForm extends FormComponent<Auction> {
...
@@ -342,6 +348,7 @@ export default class AuctionForm extends FormComponent<Auction> {
nearReservePriceThreshold
:
extraJson
.
nearReservePriceThreshold
||
'1000'
,
nearReservePriceThreshold
:
extraJson
.
nearReservePriceThreshold
||
'1000'
,
resetDelay
:
extraJson
.
resetDelay
||
'10'
,
resetDelay
:
extraJson
.
resetDelay
||
'10'
,
resetDelayDuration
:
extraJson
.
resetDelayDuration
||
'10'
,
resetDelayDuration
:
extraJson
.
resetDelayDuration
||
'10'
,
aucvehDuration
:
extraJson
.
aucvehDuration
||
'10'
,
resetDelayUnit
:
extraJson
.
resetDelayUnit
||
'second'
,
resetDelayUnit
:
extraJson
.
resetDelayUnit
||
'second'
,
resetDelayDurationUnit
:
extraJson
.
resetDelayDurationUnit
||
'second'
,
resetDelayDurationUnit
:
extraJson
.
resetDelayDurationUnit
||
'second'
,
});
});
...
@@ -585,6 +592,7 @@ export default class AuctionForm extends FormComponent<Auction> {
...
@@ -585,6 +592,7 @@ export default class AuctionForm extends FormComponent<Auction> {
nearReservePriceThreshold
:
String
(
formValue
.
nearReservePriceThreshold
||
0
),
nearReservePriceThreshold
:
String
(
formValue
.
nearReservePriceThreshold
||
0
),
resetDelay
:
String
(
formValue
.
resetDelay
||
0
),
resetDelay
:
String
(
formValue
.
resetDelay
||
0
),
resetDelayDuration
:
String
(
formValue
.
resetDelayDuration
||
0
),
resetDelayDuration
:
String
(
formValue
.
resetDelayDuration
||
0
),
aucvehDuration
:
String
(
formValue
.
aucvehDuration
||
0
),
resetDelayUnit
:
this
.
resetDelayUnit
||
'second'
,
resetDelayUnit
:
this
.
resetDelayUnit
||
'second'
,
resetDelayDurationUnit
:
this
.
resetDelayDurationUnit
||
'second'
,
resetDelayDurationUnit
:
this
.
resetDelayDurationUnit
||
'second'
,
};
};
...
...
aus-front/admin/src/views/auction/auction/vehicle/ViewAuctionVehicle.vue
View file @
b2c4fe3
<
template
>
<
template
>
<div
class=
"modalPage"
>
<div
v-if=
"auctionVehicle.auctionMode == 2 && auctionState == 'AUCTIONING'"
class=
"timeBox"
>
<div
class=
"timeBox_title"
>
距结束还剩
</div>
<div
class=
"timeBox_time"
>
52
</div>
<div
class=
"timeBox_colon"
>
:
</div>
<div
class=
"timeBox_time"
>
02
</div>
<div
class=
"timeBox_colon"
>
:
</div>
<div
class=
"timeBox_time"
>
01
</div>
</div>
<vehicle-info-header
:vehicle=
"vehicle"
></vehicle-info-header>
<vehicle-info-header
:vehicle=
"vehicle"
></vehicle-info-header>
<div
v-if=
"auctionVehicle.auctionMode == 2 && auctionState == 'AUCTIONING'"
class=
"bidBox"
>
<div
class=
"bidBox_title"
>
手动出价金额
<span
class=
"color_eb2f2f"
>
*
</span></div>
<div
class=
"bidBox_customt"
>
<a-input-number
v-model:value=
"bidPrice"
:min=
"100"
:max=
"99999"
:maxlength=
"5"
style=
"width: 376px;"
addon-after=
"元"
placeholder=
"请输入"
></a-input-number>
<div
v-for=
"(item, index) in operationButList"
:key=
"index"
@
click=
"bidPrice = item.value"
class=
"listButton_item"
:class=
"
{ 'listButton_active': item.value == bidPrice }">
+
{{
item
.
value
}}
</div>
<a-button
class=
"ml-16"
style=
"height: 28px;"
@
click=
"handleAddBid()"
>
确认出价
</a-button>
</div>
</div>
<a-tabs
v-model:activeKey=
"activeKey"
>
<a-tabs
v-model:activeKey=
"activeKey"
>
<a-tab-pane
key=
"1"
tab=
"竞价记录"
>
<a-tab-pane
key=
"1"
tab=
"竞价记录"
>
<bid-page
:aucveh-id=
"auctionVehicle.aucvehId"
/>
<bid-page
:aucveh-id=
"auctionVehicle.aucvehId"
/>
</a-tab-pane>
</a-tab-pane>
<a-tab-pane
key=
"2"
tab=
"围观记录"
>
<a-tab-pane
key=
"2"
tab=
"围观记录"
>
<vehicle-browser-history-page
:aucveh-id=
"auctionVehicle.aucvehId"
></vehicle-browser-history-page>
<vehicle-browser-history-page
:aucveh-id=
"auctionVehicle.aucvehId"
></vehicle-browser-history-page>
</a-tab-pane>
</a-tab-pane>
</a-tabs>
</a-tabs>
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Vue
}
from
"vue-facing-decorator"
;
import
{
Component
,
Prop
,
Vue
}
from
"vue-facing-decorator"
;
import
{
AuctionVehicle
}
from
"lib/src/entity/auction/entity/AuctionVehicle"
;
import
{
AuctionVehicle
}
from
"lib/src/entity/auction/entity/AuctionVehicle"
;
import
BidPage
from
"@/views/auction/bid/BidPage.vue"
;
import
BidPage
from
"@/views/auction/bid/BidPage.vue"
;
import
VehicleStateTag
from
"@/views/vehicle/inventory/VehicleStateTag.vue"
;
import
VehicleStateTag
from
"@/views/vehicle/inventory/VehicleStateTag.vue"
;
import
{
Vehicle
}
from
"lib/src/entity/vehicle/entity/Vehicle"
;
import
{
Vehicle
}
from
"lib/src/entity/vehicle/entity/Vehicle"
;
import
VehicleBrowserHistoryPage
from
"@/views/auction/auction/vehicle/VehicleBrowserHistoryPage.vue"
;
import
VehicleBrowserHistoryPage
from
"@/views/auction/auction/vehicle/VehicleBrowserHistoryPage.vue"
;
import
VehicleInfoHeader
from
"@/views/vehicle/inventory/VehicleInfoHeader.vue"
;
import
VehicleInfoHeader
from
"@/views/vehicle/inventory/VehicleInfoHeader.vue"
;
import
{
EditOutlined
}
from
"@ant-design/icons-vue"
;
import
{
AuctionController
}
from
"@/api/AuctionController"
;
import
{
message
}
from
'ant-design-vue'
;
@
Component
({
@
Component
({
components
:
{
VehicleInfoHeader
,
VehicleBrowserHistoryPage
,
VehicleStateTag
,
BidPage
}
components
:
{
VehicleInfoHeader
,
VehicleBrowserHistoryPage
,
VehicleStateTag
,
BidPage
,
EditOutlined
}
})
})
export
default
class
ViewAuctionVehicle
extends
Vue
{
export
default
class
ViewAuctionVehicle
extends
Vue
{
activeKey
=
"1"
;
activeKey
=
"1"
;
@
Prop
({
type
:
Object
,
required
:
true
})
@
Prop
({
type
:
Object
,
required
:
true
})
auctionVehicle
:
AuctionVehicle
;
auctionVehicle
:
AuctionVehicle
;
auctionState
=
''
;
bidPrice
=
'100'
;
operationButList
=
[{
value
:
'100'
,
},
{
value
:
'300'
,
},
{
value
:
'500'
,
},
{
value
:
'1000'
,
}];
get
vehicle
():
Vehicle
{
get
vehicle
():
Vehicle
{
return
this
.
auctionVehicle
.
vehicle
;
return
this
.
auctionVehicle
.
vehicle
;
}
}
...
@@ -38,10 +86,116 @@ export default class ViewAuctionVehicle extends Vue {
...
@@ -38,10 +86,116 @@ export default class ViewAuctionVehicle extends Vue {
// this.axios.get('auctionVehicle/getAuctionVehicleById', {params: {aucvehId: this.aucvehId}}).then(response => {
// this.axios.get('auctionVehicle/getAuctionVehicleById', {params: {aucvehId: this.aucvehId}}).then(response => {
// this.auctionVehicle = response.data;
// this.auctionVehicle = response.data;
// });
// });
setTimeout
(()
=>
{
this
.
getBidRemainSecData
();
},
1000
);
}
}
getBidRemainSecData
():
void
{
const
that
=
this
;
console
.
log
(
'that.auctionVehicle.aucvehId11111111111111111111111111111111111111111'
,
that
.
auctionVehicle
);
AuctionController
.
getBidRemainSec
(
that
.
axios
,
{
aucvehId
:
that
.
auctionVehicle
.
aucvehId
}).
then
(
response
=>
{
console
.
log
(
'1111111111111111'
,
response
)
const
data
=
response
.
data
||
{};
const
itemData
=
data
.
data
||
{};
this
.
auctionState
=
itemData
.
auctionState
||
''
;
});
}
handleAddBid
():
void
{
const
that
=
this
;
if
(
!
that
.
bidPrice
)
{
message
.
error
(
'请输入出价金额'
);
return
;
}
AuctionController
.
addBid
(
that
.
axios
,
{
aucvehId
:
that
.
auctionVehicle
.
aucvehId
,
bidPrice
:
that
.
bidPrice
}).
then
(()
=>
{
message
.
success
(
'操作成功!'
);
});
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"ts"
>
<
style
lang=
"less"
scoped
>
.modalPage
{
position
:
relative
;
}
.timeBox
{
height
:
30px
;
line-height
:
30px
;
position
:
absolute
;
top
:
-46px
;
left
:
80px
;
z-index
:
99
;
color
:
#eb2f2f
;
font-size
:
14px
;
font-weight
:
400
;
font-family
:
"HarmonyOSSansSC"
;
}
.timeBox_title
{
float
:
left
;
}
.timeBox_time
{
width
:
32px
;
height
:
30px
;
border-radius
:
5px
;
background
:
#ffeded
;
float
:
left
;
margin-left
:
6px
;
text-align
:
center
;
}
.timeBox_colon
{
float
:
left
;
margin-left
:
6px
;
}
.bidBox
{
width
:
100%
;
margin-top
:
20px
;
}
.bidBox_title
{
width
:
100%
;
height
:
20px
;
line-height
:
20px
;
color
:
#565d6b
;
font-size
:
14px
;
font-weight
:
400
;
}
.color_eb2f2f
{
color
:
#eb2f2f
;
}
.bidBox_customt
{
width
:
100%
;
height
:
32px
;
margin-top
:
10px
;
display
:
flex
;
}
.listButton_item
{
padding
:
0
12px
;
height
:
28px
;
float
:
left
;
margin-left
:
8px
;
line-height
:
28px
;
border-radius
:
4px
;
background
:
#f0f2f5
;
color
:
#2f3133
;
font-size
:
12px
;
font-weight
:
400
;
text-align
:
center
;
border
:
1px
solid
#f0f2f5
;
cursor
:
pointer
;
}
.listButton_active
{
border
:
1px
solid
#185efe
!important
;
color
:
#185efe
!important
;
}
</
style
>
</
style
>
aus-front/admin/src/views/auction/control/AuctionVehiclePage.vue
View file @
b2c4fe3
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
</template>
</template>
<!--拍卖车辆列表end-->
<!--拍卖车辆列表end-->
</a-table>
</a-table>
<a-drawer
v-model:open=
"showVehicle"
title=
"车辆信息"
placement=
"right"
width=
"936"
>
<a-drawer
v-model:open=
"showVehicle"
title=
"车辆信息"
placement=
"right"
width=
"936"
>
<vehicle-drawer
v-if=
"selectedAuctionVehicle"
:vehicle=
"selectedAuctionVehicle?.vehicle"
></vehicle-drawer>
<vehicle-drawer
v-if=
"selectedAuctionVehicle"
:vehicle=
"selectedAuctionVehicle?.vehicle"
></vehicle-drawer>
</a-drawer>
</a-drawer>
...
@@ -178,7 +179,7 @@ export default class AuctionVehiclePage extends PaginationComponent<AuctionVehic
...
@@ -178,7 +179,7 @@ export default class AuctionVehiclePage extends PaginationComponent<AuctionVehic
const
modal
=
ModalService
.
confirm
({
const
modal
=
ModalService
.
confirm
({
title
:
'竞价数据'
,
component
:
ViewAuctionVehicle
,
closable
:
true
,
appContext
:
this
.
$
.
appContext
,
width
:
1300
,
title
:
'竞价数据'
,
component
:
ViewAuctionVehicle
,
closable
:
true
,
appContext
:
this
.
$
.
appContext
,
width
:
1300
,
props
:
{
props
:
{
auctionVehicle
:
auctionVehicle
auctionVehicle
:
{...
auctionVehicle
,
auctionMode
:
this
.
auction
.
auctionMode
}
},
},
onOk
:
(
component
):
void
=>
{
onOk
:
(
component
):
void
=>
{
modal
.
destroy
();
modal
.
destroy
();
...
...
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