From 23a1e5b3a79d4aafb1abf5d6824b51f75eb98c6d Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Thu, 11 Jul 2024 16:05:29 +0800
Subject: [PATCH] 代码优化

---
 subPackage/workbench/components/actionBtn.vue |   98 +++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 87 insertions(+), 11 deletions(-)

diff --git a/subPackage/workbench/components/actionBtn.vue b/subPackage/workbench/components/actionBtn.vue
index 12a8b7e..14c516f 100644
--- a/subPackage/workbench/components/actionBtn.vue
+++ b/subPackage/workbench/components/actionBtn.vue
@@ -4,8 +4,9 @@
 			<button v-if="dataItem.type === 1" class="footer-btn" @click="submit(2)">通过</button>
 			<button v-if="dataItem.type === 2" class="footer-btn" @click="submitTwo(2)">通过</button>
 			<button class="footer-btn" @click="open()">驳回</button>
+			<button class="footer-btn" @click="show = true">共享</button>
 		</view>
-		<u-modal :show="isShowModal" title="备注" :showConfirmButton="false">
+		<u-modal :show="isShowModal" title="备注" :showConfirmButton="false" :closeOnClickOverlay="true" @click="close">
 			<view class="modal-content">
 				<u-textarea v-model="remark" placeholder="请输入驳回原因"></u-textarea>
 				<view class="modal-btn flex j-c-s-b a-i-c" slot="confirmButton">
@@ -15,17 +16,29 @@
 			</view>
 		</u-modal>
 
+		<u-popup :show="show" mode="bottom" @close="close" :round="10" :closeable="true">
+			<view class="popup-title">
+				共享
+			</view>
+			<view style="margin-top: 20rpx 0rpx;" class="popup-content">
+				<u-radio-group v-model="radiovalue1" @change="groupChange" iconPlacement="right" placement="column">
+					<view v-for="(item, index) in radiolist1" style="padding:10rpx 0;">
+						<u-radio :customStyle="{marginBottom: '8px'}" :key="index" :label="item.name" :name="item.id"
+							@change="radioChange">
+						</u-radio>
+					</view>
+
+				</u-radio-group>
+
+				<view class="popup-btn flex a-i-c j-c-s-b">
+					<button class="popup-btn-item" @click="pushCircle">确认</button>
+				</view>
+			</view>
+		</u-popup>
+
 		<u-modal :show="isShowModalTwo" title="备注" :showConfirmButton="false">
 			<view class="modal-content">
 				<u-search placeholder="请输入场所名称" :clearabled="true" @blur="searchPlace()" v-model="placeName"></u-search>
-				<!-- <u-search placeholder="请输入需要查询信息的姓名" v-model="placeName" :clearabled="true" :showAction="true"
-					:animation="true" @search="searchPlace"></u-search> -->
-
-				<!-- <view v-for="(item,index) in placeList" :key="index">
-					<view :class="item.isSelect ? '':''" @click="selectChang(item)">
-						{{item.placeName +'----场所地址:'+item.location}}
-					</view>
-				</view> -->
 
 				<u-radio-group v-model="houseCode" placement="column" @change="groupChange">
 					<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in placeList" :key="index"
@@ -47,6 +60,9 @@
 	import {
 		getLocationRecord
 	} from "@/api/place/place";
+	import {
+		handlePublish
+	} from '@/api/circle/circle.js'
 
 	export default {
 		name: "auditAction",
@@ -54,16 +70,45 @@
 			return {
 				isShowModal: false,
 				isShowModalTwo: false,
+				show: false,
 				remark: "",
 				placeName: '',
 				houseCode: '',
 				dataItem: {},
-				placeList: []
+				placeList: [],
+				// 基本案列数据
+				radiolist1: [{
+						name: '邻里圈',
+						disabled: false,
+						id: 0
+					},
+					{
+						name: '协同圈',
+						disabled: false,
+						id: 1
+					}
+				],
 			}
 		},
 		props: ['dataItem'],
 
 		methods: {
+
+			pushCircle() {
+				handlePublish({
+					houseCode: this.dataItem.houseCode,
+					eventId: this.dataItem.id,
+					// 二手交易
+					evenType: 5,
+					circleType: this.radiovalue1,
+					circleText: this.dataItem.labelName + ' ' + this.dataItem.transactionObject,
+					circleImages: this.dataItem.images
+				}).then(res => {
+					this.$showTips("操作成功", "success")
+					this.close()
+					// this.$set(this.peopleList, 1, res.data);
+				})
+			},
 
 			groupChange(n) {
 				this.houseCode = n
@@ -76,6 +121,7 @@
 				this.isShowModal = true;
 			},
 			close() {
+				this.show = false
 				this.isShowModal = false;
 			},
 
@@ -144,7 +190,7 @@
 		box-shadow: 0rpx 0rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
 
 		.footer-btn {
-			width: 300rpx;
+			width: 200rpx;
 			height: 78rpx;
 			border-radius: 8rpx;
 			font-size: 32rpx;
@@ -158,6 +204,7 @@
 		}
 
 	}
+
 
 	.modal-content {
 		width: 100%;
@@ -184,6 +231,35 @@
 		}
 	}
 
+
+	.popup-title {
+		padding: 20rpx 0;
+		text-align: center;
+	}
+
+	.popup-content {
+		padding: 20rpx;
+	}
+
+	.popup-btn {
+		padding: 20rpx;
+
+
+		.popup-btn-item {
+			width: 100%;
+			height: 78rpx;
+			line-height: 78rpx;
+			border-radius: 36rpx;
+			color: #fff;
+			background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
+			font-size: 28rpx;
+		}
+
+		.popup-btn-item:after {
+			border: none;
+		}
+	}
+
 	/deep/ .u-modal__content {
 		padding-bottom: 20rpx !important;
 	}

--
Gitblit v1.9.3