feat: 移除操作区域代码
This commit is contained in:
@@ -25,11 +25,6 @@
|
|||||||
|
|
||||||
<!-- 卡片内容 -->
|
<!-- 卡片内容 -->
|
||||||
<OrderCardContent :order-data="orderData" />
|
<OrderCardContent :order-data="orderData" />
|
||||||
|
|
||||||
<!-- 操作区域 -->
|
|
||||||
<view v-if="shouldShowActionArea()" class="action-area">
|
|
||||||
<button class="action-btn" @click.stop="handleCall">立即呼叫</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -83,14 +78,6 @@ const getStatusIcon = () => {
|
|||||||
return ICON_MAP[props.orderData.orderType] || serviceIcon;
|
return ICON_MAP[props.orderData.orderType] || serviceIcon;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 判断是否显示操作区域
|
|
||||||
const shouldShowActionArea = () => {
|
|
||||||
// 工单情况:orderType 为 undefined,且 workOrderStatus = 0 时显示
|
|
||||||
if (props.orderData.orderType === undefined) {
|
|
||||||
return props.orderData.workOrderStatus === "0";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 获取状态文本
|
// 获取状态文本
|
||||||
const getStatusText = (status) => {
|
const getStatusText = (status) => {
|
||||||
// 工单情况:orderType 为 undefined
|
// 工单情况:orderType 为 undefined
|
||||||
@@ -121,16 +108,6 @@ const getStatusText = (status) => {
|
|||||||
const handleCardClick = () => {
|
const handleCardClick = () => {
|
||||||
emit("click", props.orderData);
|
emit("click", props.orderData);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 处理呼叫
|
|
||||||
const handleCall = () => {
|
|
||||||
emit("call", props.orderData);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 暴露方法
|
|
||||||
defineExpose({
|
|
||||||
getStatusText,
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -89,28 +89,3 @@
|
|||||||
border: 1px solid #fd8702;
|
border: 1px solid #fd8702;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-area {
|
|
||||||
padding-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.action-btn {
|
|
||||||
width: 280px;
|
|
||||||
height: 42px;
|
|
||||||
border-radius: 50px;
|
|
||||||
border: 2px solid #ffca70;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
background: linear-gradient(179deg, #ffb100 0%, #ff7f19 100%);
|
|
||||||
color: #ffffff;
|
|
||||||
margin: 0 auto;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: linear-gradient(135deg, #ff7a00 0%, #ff6600 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
transform: scale(0.95);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
:key="item.id || index"
|
:key="item.id || index"
|
||||||
:orderData="item"
|
:orderData="item"
|
||||||
@click="handleOrderClick"
|
@click="handleOrderClick"
|
||||||
@call="handleOrderCall"
|
|
||||||
/>
|
/>
|
||||||
</z-paging>
|
</z-paging>
|
||||||
</template>
|
</template>
|
||||||
@@ -101,15 +100,6 @@ const handleOrderClick = (orderData) => {
|
|||||||
url: `/pages/order/detail?id=${orderData.id}`,
|
url: `/pages/order/detail?id=${orderData.id}`,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 处理订单呼叫
|
|
||||||
const handleOrderCall = (orderData) => {
|
|
||||||
console.log("订单呼叫:", orderData);
|
|
||||||
// 这里可以添加呼叫逻辑
|
|
||||||
uni.makePhoneCall({
|
|
||||||
phoneNumber: orderData.contactPhone,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user