|
@@ -1,44 +1,62 @@
|
|
|
<template>
|
|
|
- <van-popover
|
|
|
- v-model="showPopover"
|
|
|
- v-if="canJoinBid"
|
|
|
- :actions="actions"
|
|
|
- trigger="click"
|
|
|
- :placement="placement"
|
|
|
- :offset="calcOffset"
|
|
|
- @select="onSelected"
|
|
|
- >
|
|
|
- <template #reference>
|
|
|
- <TabActionItem
|
|
|
- showText
|
|
|
- :direction="direction"
|
|
|
- @click.native.stop="changePopoverState"
|
|
|
- >
|
|
|
- <AppIcon
|
|
|
- slot="icon"
|
|
|
- name="canbiao"
|
|
|
- color="#2ABED1"
|
|
|
- svg
|
|
|
- size="20"
|
|
|
- ></AppIcon>
|
|
|
- <template #text>参标管理</template>
|
|
|
- </TabActionItem>
|
|
|
- <van-popup
|
|
|
- :style="popupHeight"
|
|
|
- v-model="showBidStatus"
|
|
|
- get-container="body"
|
|
|
- round
|
|
|
- position="bottom"
|
|
|
- >
|
|
|
- <bidStatusNode
|
|
|
- @cancel-update="cancelUpdate"
|
|
|
- @save-success="saveSuccess"
|
|
|
- :project-cell-info="projectCellInfo"
|
|
|
- @set-height="setHeight"
|
|
|
- ></bidStatusNode>
|
|
|
- </van-popup>
|
|
|
- </template>
|
|
|
- </van-popover>
|
|
|
+ <section class="action-in-bidding" v-if="canJoinBid">
|
|
|
+ <van-popover
|
|
|
+ v-if="showManageButton"
|
|
|
+ v-model="showPopover"
|
|
|
+ class="action-popover"
|
|
|
+ :actions="actions"
|
|
|
+ trigger="click"
|
|
|
+ :placement="placement"
|
|
|
+ :offset="calcOffset"
|
|
|
+ @select="onSelected"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <TabActionItem
|
|
|
+ showText
|
|
|
+ :direction="direction"
|
|
|
+ @click.native.stop="changePopoverState"
|
|
|
+ >
|
|
|
+ <AppIcon
|
|
|
+ slot="icon"
|
|
|
+ name="canbiao"
|
|
|
+ color="#2ABED1"
|
|
|
+ svg
|
|
|
+ size="20"
|
|
|
+ ></AppIcon>
|
|
|
+ <template #text>参标管理</template>
|
|
|
+ </TabActionItem>
|
|
|
+ </template>
|
|
|
+ </van-popover>
|
|
|
+ <TabActionItem
|
|
|
+ showText
|
|
|
+ v-else
|
|
|
+ :direction="direction"
|
|
|
+ @click.native.stop="actionJoinAndStop"
|
|
|
+ >
|
|
|
+ <AppIcon
|
|
|
+ slot="icon"
|
|
|
+ name="canbiao"
|
|
|
+ :color="actions0.fontColor"
|
|
|
+ svg
|
|
|
+ size="20"
|
|
|
+ ></AppIcon>
|
|
|
+ <template #text>{{ actions0.text }}</template>
|
|
|
+ </TabActionItem>
|
|
|
+ <van-popup
|
|
|
+ :style="popupHeight"
|
|
|
+ v-model="showBidStatus"
|
|
|
+ get-container="body"
|
|
|
+ round
|
|
|
+ position="bottom"
|
|
|
+ >
|
|
|
+ <bidStatusNode
|
|
|
+ @cancel-update="cancelUpdate"
|
|
|
+ @save-success="saveSuccess"
|
|
|
+ :project-cell-info="projectCellInfo"
|
|
|
+ @set-height="setHeight"
|
|
|
+ ></bidStatusNode>
|
|
|
+ </van-popup>
|
|
|
+ </section>
|
|
|
</template>
|
|
|
<script>
|
|
|
import TabActionItem from '@/views/article/ui/TabActionItem.vue'
|
|
@@ -102,17 +120,35 @@ export default {
|
|
|
canJoinBid() {
|
|
|
return this.actions.length > 0
|
|
|
},
|
|
|
+ showManageButton() {
|
|
|
+ return this.actions.length > 1
|
|
|
+ },
|
|
|
actions() {
|
|
|
const { showStopParticipate, showParticipate } = this.canBiaoInfo
|
|
|
const arr = []
|
|
|
if (showParticipate) {
|
|
|
- arr.push({ text: '参标', value: 'join' })
|
|
|
+ arr.push({
|
|
|
+ text: '参标',
|
|
|
+ fontColor: '#2abed1',
|
|
|
+ value: 'join'
|
|
|
+ })
|
|
|
}
|
|
|
if (showStopParticipate) {
|
|
|
- arr.push({ text: '终止参标', value: 'stopJoin' })
|
|
|
+ arr.push({
|
|
|
+ text: '终止参标',
|
|
|
+ fontColor: '#fb483d',
|
|
|
+ value: 'stopJoin'
|
|
|
+ })
|
|
|
}
|
|
|
return arr
|
|
|
},
|
|
|
+ actions0() {
|
|
|
+ if (this.actions.length > 0) {
|
|
|
+ return this.actions[0]
|
|
|
+ } else {
|
|
|
+ return {}
|
|
|
+ }
|
|
|
+ },
|
|
|
calcOffset() {
|
|
|
if (this.placement === 'top-start') {
|
|
|
return [5, 10]
|
|
@@ -127,6 +163,13 @@ export default {
|
|
|
this.getDetailBidIsJoin()
|
|
|
},
|
|
|
methods: {
|
|
|
+ calcButtonInfo(list) {
|
|
|
+ if (Array.isArray(list) && list.length > 0) {
|
|
|
+ return list[0]
|
|
|
+ } else {
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ },
|
|
|
onSelected(s) {
|
|
|
if (s.value === 'join') {
|
|
|
this.doBidding()
|
|
@@ -161,6 +204,13 @@ export default {
|
|
|
this.syncValue()
|
|
|
}
|
|
|
},
|
|
|
+ actionJoinAndStop() {
|
|
|
+ if (this.actions0.value === 'join') {
|
|
|
+ this.doBidding()
|
|
|
+ } else if (this.actions0.value === 'stopJoin') {
|
|
|
+ this.cancelBidding()
|
|
|
+ }
|
|
|
+ },
|
|
|
// 参标操作
|
|
|
async doBidding() {
|
|
|
if (this.beforeAction) {
|
|
@@ -249,4 +299,8 @@ export default {
|
|
|
height: 100%;
|
|
|
}
|
|
|
}
|
|
|
+.action-popover {
|
|
|
+ display: inline-block;
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
</style>
|