From 645834e1c3efb3a8c50dcbda98d87caba04bd421 Mon Sep 17 00:00:00 2001
From: fei.wang <wf18701153496@163.com>
Date: 星期三, 13 八月 2025 14:34:02 +0800
Subject: [PATCH] v1.2.8

---
 pages/index/fence.vue |  695 +++++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 572 insertions(+), 123 deletions(-)

diff --git a/pages/index/fence.vue b/pages/index/fence.vue
index 4899cc0..f0bc964 100644
--- a/pages/index/fence.vue
+++ b/pages/index/fence.vue
@@ -2,31 +2,60 @@
 	<view class="template-job tn-safe-area-inset-bottom tn-skeleton">
 
 		<!-- 椤堕儴鑷畾涔夊鑸� -->
-		<tn-nav-bar :isBack="false" fixed style="position: absolute;z-index: 999999999;">
+		<tn-nav-bar fixed style="position: absolute;z-index: 999999999;" alpha customBack>
+			<view v-show="type=='2'" slot="right" class='tn-custom-nav-bar__back' @click="goBack">
 
+				<text style="margin-right: 20px;">鏂板</text>
+				<!-- <text class='tn-icon add'></text> -->
+			</view>
 			<!-- <text class="title_linespan" @click="goTag">缁樺埗</text> -->
-			<text v-if="isAchor==false" class="title_linespan"
-				style="margin-left: 10px;" @click="goAchor">鍥存爮绠$悊</text>
+			<text v-if="isAchor==false" class="title_linespan" style="margin-left: 10px;" @click="goAchor">鍥存爮绠$悊</text>
 			<text v-else class="title_linespan" style="margin-left: 10px;" @click="goAchor">鍥存爮绠$悊</text>
 		</tn-nav-bar>
+		<!-- 	<view class="title_linespan"
+			style="margin-top: 100px;position: absolute;z-index: 9999999999999;margin-left:10%;"
+			:style="{color: color,'text-decoration': decoration}" @click="gotype('0')">鍙樼數浣滀笟</view>
+		<view style="margin-top: 100px;position: absolute;z-index: 9999999999999;margin-left:40%;"
+			class="title_linespan" @click="gotype('1')">杈撶數浣滀笟</view>
+		<view style="margin-top: 100px;position: absolute;z-index: 9999999999999;margin-left: 70%;"
+			class="title_linespan" @click="gotype('2')">鍚婅噦闃叉姢</view> -->
 
+		<!-- <view v-show="type=='0'" style="margin-top: 100px;position: absolute;z-index: 9999999;margin-left:10%;	color: #00aaff;
+			text-decoration: underline;font-size: 17px;
+		font-weight: bold;" @click="gotype('0')">鍙樼數浣滀笟</view>
+		<view v-show="type=='1'" style="margin-top: 100px;position: absolute;z-index: 9999999;margin-left:40%;	color: #00aaff;
+			text-decoration: underline;font-size: 17px;
+		font-weight: bold;" @click="gotype('1')">杈撶數浣滀笟</view>
+		<view v-show="type=='2'" style="margin-top: 100px;position: absolute;z-index: 9999999;margin-left: 70%;	color: #00aaff;
+			text-decoration: underline;font-size: 17px;
+		font-weight: bold;" @click="gotype('2')">鍚婅噦闃叉姢</view>
+
+		<view v-show="type!='0'" style="margin-top: 100px;position: absolute;z-index: 9999999;margin-left:10%;font-size: 17px;
+		font-weight: bold;" @click="gotype('0')">鍙樼數浣滀笟</view>
+		<view v-show="type!='1'" style="margin-top: 100px;position: absolute;z-index: 9999999;margin-left:40%;font-size: 17px;
+		font-weight: bold;" @click="gotype('1')">杈撶數浣滀笟</view>
+		<view v-show="type!='2'" style="margin-top: 100px;position: absolute;z-index: 99999999;margin-left: 70%;font-size: 17px;
+		font-weight: bold;" @click="gotype('2')">鍚婅噦闃叉姢</view> -->
 		<view v-show="lock==false" class="page-wrap u-skeleton">
-			<data-list :width="width" class="data-list" ref="list" @load="handleLoad" @refresh="handleRefresh"
-				style="margin-top: 100px;">
+
+			<data-list :width="width"  :handovertype="handovertype" class="data-list" ref="list"
+				@load="handleLoad" @refresh="handleRefresh" @handover="handoverData" style="margin-top: 90px;">
 
 				<view class="item-wrap" v-for="(item, index) in list" :key="index">
 					<tn-button shape="icon" class="tn-icon-edit" style="position: absolute;left: 85%;" size="lg"
 						@click="editClick(item,index)"></tn-button>
 					<!-- <tn-button shape="icon" class="tn-icon-delete" ndColor="#ff0000"
 						style="position: absolute;left: 75%;" size="lg" @click="deleteClick(item,index)"></tn-button> -->
-					<view class="flex flex-direction">
+
+					<view v-if="type!='2'" class="flex flex-direction">
 						<view style="font-size: 18px;">{{item.name}}</view>
 						<view style="margin-top: 5px;display: flex;">
 							<text
 								style="font-size: 12px;border-radius: 4px; background-color: rgba(255, 98, 98, 0.5);padding: 5px;color: #ff0000;">{{item.fencetype==0?'鍙樼數浣滀笟' : '杈撶數浣滀笟'}}</text>
-								
-								<view
-									style="margin-left: 95px; font-size: 12px;border-radius: 4px; background-color: rgba(0, 170, 255, 0.5);padding: 5px;" @click="positionclick(item.points)">瀹氫綅</view>
+
+							<view
+								style="margin-left: 95px; font-size: 12px;border-radius: 4px; background-color: rgba(0, 170, 255, 0.5);padding: 5px;"
+								@click="positionclick(item.points)">瀹氫綅</view>
 
 						</view>
 						<view style="display: flex;margin-top: 10px;">
@@ -35,7 +64,7 @@
 
 							</view>
 							<view style=" color: rgba(89, 89, 89); margin-left: 20px; font-size: 12px;">
-								鍥存爮楂樺害锛歿{item.height!=null?item.height:'鏃�'}}</view>
+								鍥存爮楂樺害锛歿{item.height!=null?item.height:'鏃�'}}m</view>
 							<!-- <view style="margin-left: 10px; background-color: rgba(255, 181, 166, 1.0); " >{{item.type}}</view> -->
 						</view>
 						<view
@@ -43,7 +72,8 @@
 
 							<!-- <h5 ></h5> -->
 							<view style=" word-wrap: break-word;padding: 10px;">
-								<h5>鍥存爮鍧愭爣:{{ item.points.length > 35? item.points.slice(0, 35) + '...' : item.points }}</h5>
+								<h5>鍥存爮鍧愭爣:{{ item.points.length > 35? item.points.slice(0, 35) + '...' : item.points }}
+								</h5>
 
 							</view>
 							<view style="display: flex;padding: 10px;">
@@ -52,8 +82,8 @@
 							</view>
 
 							<view style="display: flex;padding: 10px;">
-								<h5>棰勮璺濈锛歿{item.distance}}</h5>
-								<h5 style="margin-left: 20px;">鍦伴潰娴锋嫈锛歿{item.baoliu4}}</h5>
+								<h5>棰勮璺濈锛歿{item.distance}}m</h5>
+								<h5 style="margin-left: 20px;">鍦伴潰娴锋嫈锛歿{item.baoliu4}}m</h5>
 							</view>
 
 							<view style="padding: 10px;">
@@ -62,82 +92,218 @@
 
 						</view>
 
+						<view style="display: flex;margin-top: 10px;font-size: 17px;">
+							<view style="font-size: 17px;">
 
+								鏄惁鍚敤锛�<tn-switch v-model="item.isplay==1 ? true : false" style=""
+									@change="isopen(item, $event)" :size="num"></tn-switch>
+
+							</view>
+
+							<view style="position: absolute;right: 10%;font-size: 17px;">
+
+								鏄惁鏄剧ず锛�<tn-switch v-model="item.ishide==0 ? true : false" style=""
+									@change="isopenhide(item, $event)" :size="num"></tn-switch>
+							</view>
+						</view>
+					</view>
+
+					<view v-else class="flex flex-direction">
+						<view style="font-size: 18px;">{{item.cranename}}</view>
+						<view style="margin-top: 5px;display: flex;">
+							<text
+								style="font-size: 12px;border-radius: 4px; background-color: rgba(255, 98, 98, 0.5);padding: 5px;color: #ff0000;">鍚婅噦闃叉姢</text>
+
+							<!-- <view
+								style="margin-left: 95px; font-size: 12px;border-radius: 4px; background-color: rgba(0, 170, 255, 0.5);padding: 5px;"
+								@click="positionclick(item.points)">瀹氫綅</view> -->
+
+						</view>
+						<view style="display: flex;margin-top: 10px;">
+							<view style="font-size: 12px; color: rgba(89, 89, 89);">娣诲姞浜猴細{{item.addperson}}</view>
+							<!-- <view style=" color: rgba(89, 89, 89); margin-left: 20px; font-size: 12px;">|
+					
+							</view>
+							<view style=" color: rgba(89, 89, 89); margin-left: 20px; font-size: 12px;">
+								鍥存爮楂樺害锛歿{item.height!=null?item.height:'鏃�'}}m</view> -->
+							<!-- <view style="margin-left: 10px; background-color: rgba(255, 181, 166, 1.0); " >{{item.type}}</view> -->
+						</view>
+						<view
+							style=" border-radius: 5px; background-color: rgba(197, 197, 197, 0.5);width: 100%;margin-top: 10px;">
+
+							<!-- <h5 ></h5> -->
+							<!-- 	<view style=" word-wrap: break-word;padding: 10px;">
+								<h5>鍥存爮鍧愭爣:{{ item.points.length > 35? item.points.slice(0, 35) + '...' : item.points }}
+								</h5>
+					
+							</view> -->
+							<view style="display: flex;padding: 10px;">
+								<h5>鍘熺偣璁惧锛歿{item.deviceA}}</h5>
+								<h5 style="margin-left: 20px;">鍚婅噦椤惰澶囷細{{item.deviceB}}</h5>
+							</view>
+							<view style="display: flex;padding: 10px;">
+								<h5>鍥存爮瑙掑害锛歿{item.angle}}掳</h5>
+								<h5 style="margin-left: 20px;">鍏宠仈閮ㄩ棬锛歿{item.bindfence}}</h5>
+							</view>
+
+
+
+							<view style="padding: 10px;">
+								<h5>鏃堕棿锛歿{item.addtime}}</h5>
+							</view>
+
+						</view>
 						<view style="display: flex;margin-top: 10px;font-size: 17px;">
 
 							鏄惁鍚敤锛�<tn-switch v-model="item.isplay==1 ? true : false"
 								style="position: absolute;left: 85%;" @change="isopen(item, $event)"
 								:size="num"></tn-switch>
 						</view>
-						
-						<view style="display: flex;margin-top: 10px;font-size: 17px;">
-						
-							鏄惁鏄剧ず锛�<tn-switch v-model="item.ishide==0 ? true : false"
-								style="position: absolute;left: 85%;" @change="isopenhide(item, $event)"
-								:size="num"></tn-switch>
-						</view>
+						<!-- <view style="margin-top: 10px;font-size: 17px;">
+							<view style="font-size: 17px;">
+					
+								鏄惁鍚敤锛�<tn-switch v-model="item.isplay==1 ? true : false" style=""
+									@change="isopen(item, $event)" :size="num"></tn-switch>
+					
+							</view>
+						</view> -->
 					</view>
 
 				</view>
 			</data-list>
 		</view>
 
-		<tn-popup v-model="showpopup" mode="bottom" closeBtn>
+		<tn-popup v-model="showpopup" mode="bottom" closeBtn style="position: absolute;z-index: 9999999;">
 			<view class="page-wrap u-skeleton">
 				<view class="item-wrap">
-					<tn-form>
-						<tn-form-item label="鍥存爮鍚嶇О:" :labelWidth="labelWidth">
-							<tn-input  v-model="form.name" inputAlign="right"></tn-input>
-						</tn-form-item>
-						<tn-form-item label="鍥存爮鎬ц川:" :labelWidth="labelWidth">
-							<tn-input disabled v-model="form.fencetype" @click="show3 = true" inputAlign="right" />
-						</tn-form-item>
-						<tn-form-item label="鍥存爮绫诲瀷:" :labelWidth="labelWidth">
-							<tn-input v-model="form.type" type="select" @click="show1 = true" placeholder="璇烽�夋嫨鍏宠仈閮ㄩ棬" />
-							<tn-action-sheet :list="typeList" v-model="show1" @click="typeCallback"></tn-action-sheet>
-						</tn-form-item>
-						<tn-form-item label="鍧愭爣:" :labelWidth="labelWidth">
-							<uni-tooltip :content="zuob" placement="bottom" >
-								<tn-input disabled v-model="form.points" inputAlign="right"></tn-input>
+					<u-form>
+						<u-form-item label="鍥存爮鍚嶇О:" :labelWidth="labelWidth">
+							<u-input v-model="form.name" inputAlign="right"></u-input>
+						</u-form-item>
+						<u-form-item label="鍥存爮鎬ц川:" :labelWidth="labelWidth">
+							<u-input disabled v-model="form.fencetype" @click="show3 = true" inputAlign="right" />
+						</u-form-item>
+						<u-form-item label="鍥存爮绫诲瀷:" :labelWidth="labelWidth" @click="show1 = true">
+							<!-- <u-input v-model="form.type" type="select"  placeholder="璇烽�夋嫨鍏宠仈閮ㄩ棬" /> -->
+							<u-input v-model="form.type" disabled disabledColor="#ffffff" placeholder="璇烽�夋嫨鍏宠仈閮ㄩ棬"
+								border="none" />
+							<u-icon slot="right" name="arrow-down"></u-icon>
+							<!-- <tn-action-sheet :list="typeList" v-model="show1" @click="typeCallback"></tn-action-sheet> -->
+							<tn-select v-model="show1" mode="single" :list="typeList" @confirm="typeCallback"
+								:searchShow="true"></tn-select>
+						</u-form-item>
+						<u-form-item label="鍧愭爣:" :labelWidth="labelWidth">
+							<uni-tooltip :content="zuob" placement="bottom">
+								<u-input disabled v-model="form.points" inputAlign="right"></u-input>
 							</uni-tooltip>
-							
-							
-						</tn-form-item>
-						<tn-form-item label="鍏宠仈閮ㄩ棬:" :labelWidth="labelWidth">
+
+
+						</u-form-item>
+						<u-form-item label="鍏宠仈浣滀笟:" :labelWidth="labelWidth" @click="show2 = true">
 							<!-- <tn-input v-model="form.bumen" type="select" @click="show2 = true" inputAlign="right"
 								placeholder="璇烽�夋嫨鍏宠仈閮ㄩ棬" /> -->
 							<!-- 	<uni-data-select placeholder="璇烽�夋嫨鍏宠仈閮ㄩ棬" v-show="form.disable" v-model="form.department"
 								:localdata="bumenList" @change="bymenCallback"></uni-data-select> -->
 							<!-- <tn-action-sheet :disabled="form.disable" :list="bumenList" v-model="show2"
 								@click="bymenCallback"></tn-action-sheet> -->
-							<tn-input v-model="form.department" type="select" @click="show2 = true"
-								placeholder="璇烽�夋嫨鍏宠仈閮ㄩ棬" />
-							<tn-action-sheet :list="bumenList" v-model="show2" @click="bymenCallback"></tn-action-sheet>
-						</tn-form-item>
-						<tn-form-item label="鍥存爮楂樺害:" :labelWidth="labelWidth">
-							<tn-input v-model="form.height" inputAlign="right" placeholder="璇疯緭鍏ュ洿鏍忛珮搴�"></tn-input>
+							<!-- 	<u-input v-model="form.department" type="select" @click="show2 = true"
+								placeholder="璇烽�夋嫨鍏宠仈浣滀笟" /> -->
+							<u-input v-model="form.department" disabled disabledColor="#ffffff" placeholder="璇烽�夋嫨鍏宠仈浣滀笟"
+								border="none" />
+							<u-icon slot="right" name="arrow-down"></u-icon>
+							<!-- <tn-action-sheet :list="bumenList" v-model="show2" @click="bymenCallback"></tn-action-sheet> -->
+							<tn-select v-model="show2" mode="single" :list="bumenList" @confirm="bymenCallback"
+								:searchShow="true"></tn-select>
+						</u-form-item>
+						<u-form-item label="鍥存爮楂樺害:" :labelWidth="labelWidth">
+							<u-input v-model="form.height" inputAlign="right" placeholder="璇疯緭鍏ュ洿鏍忛珮搴�"></u-input>
 							<text>m</text>
-						</tn-form-item>
-						<tn-form-item label="棰勮璺濈:" :labelWidth="labelWidth">
-							<tn-input v-model="form.distance" inputAlign="right" placeholder="璇疯緭鍏ラ璀﹁窛绂�"></tn-input>
+						</u-form-item>
+						<u-form-item label="棰勮璺濈:" :labelWidth="labelWidth">
+							<u-input v-model="form.distance" inputAlign="right" placeholder="璇疯緭鍏ラ璀﹁窛绂�"></u-input>
 							<text>m</text>
-						</tn-form-item>
-						<tn-form-item label="鍦伴潰娴锋嫈:" :labelWidth="labelWidth">
-							<tn-input disabled v-model="form.baoliu4" inputAlign="right"></tn-input>
+						</u-form-item>
+						<u-form-item label="鍦伴潰娴锋嫈:" :labelWidth="labelWidth">
+							<u-input disabled v-model="form.baoliu4" inputAlign="right"></u-input>
 							<text>m</text>
-						</tn-form-item>
-						<tn-form-item label="娣诲姞浜�:" :labelWidth="labelWidth">
-							<tn-input disabled v-model="form.addperson" inputAlign="right"></tn-input>
-						</tn-form-item>
-						<tn-form-item label="娣诲姞鏃堕棿:" :labelWidth="labelWidth">
-							<tn-input disabled v-model="form.addtime" inputAlign="right"></tn-input>
-						</tn-form-item>
+						</u-form-item>
+						<u-form-item label="娣诲姞浜�:" :labelWidth="labelWidth">
+							<u-input disabled v-model="form.addperson" inputAlign="right"></u-input>
+						</u-form-item>
+						<u-form-item label="娣诲姞鏃堕棿:" :labelWidth="labelWidth">
+							<u-input disabled v-model="form.addtime" inputAlign="right"></u-input>
+						</u-form-item>
 
-					</tn-form>
+					</u-form>
 				</view>
 				<button style="margin-top: 20px;" type="primary" @click="submitForm">淇濆瓨鍥存爮</button>
 			</view>
 		</tn-popup>
+
+		<u-modal style="position: absolute;z-index: 99999999999999;" buttonReverse confirmText="淇濆瓨" cancelText="鍙栨秷"
+			:show="showmodal" @cancel="cancelmodal" @confirm="submitmodal" ref="uModal" :showCancelButton="true"
+			:closeOnClickOverlay="true">
+			<!-- <tn-popup v-model="showpopup" mode="bottom" closeBtn>
+			<view class="page-wrap u-skeleton"> -->
+			<!-- <view class="item-wrap"> -->
+			<!-- <view style="max-height: 300px; overflow-y: auto;"> -->
+			<u--form style="" labelPosition="left" :model="fence" ref="uForm" :rules="rules2">
+
+				<u-form-item required label="鍚婅溅鍚嶇О:" prop="cranename" borderBottom ref="item1" labelWidth="80px">
+					<u--input v-model="fence.cranename" border="none" placeholder="璇疯緭鍏ュ悐杞﹀悕绉�"></u--input>
+				</u-form-item>
+				<u-form-item required prop="deviceA" borderBottom label="鍘熺偣璁惧:" labelWidth="80px"
+					@click="showtagid1 = true">
+					<!-- 	<u-badge v-if="tagonlie1==1 && fence.ydtag!=''" :isDot="true" type="success"></u-badge>
+					<u-badge v-else-if="tagonlie1==0 && fence.ydtag!=''" :isDot="true" type="info"></u-badge> -->
+					<!-- <u--input v-model="code" border="none" placeholder="璇疯緭鍏ョ粓绔紪鍙�" @blur="seachcode"></u--input> -->
+					<!-- <u-input v-model="fence.deviceA" type="select" @click="showtagid1 = true" placeholder="璇烽�夋嫨鍘熺偣璁惧" /> -->
+
+					<u-input v-model="fence.deviceA" disabled disabledColor="#ffffff" placeholder="璇烽�夋嫨鍏宠仈浣滀笟"
+						border="none" /> 
+					<!-- <tn-action-sheet :list="bumenList" v-model="show1" @click="bymenCallback"></tn-action-sheet> -->
+					<u-icon slot="right" name="arrow-down"></u-icon>
+					<tn-select v-model="showtagid1" mode="single" :list="tagidlist" @confirm="confirmtagid1"
+						:searchShow="true"></tn-select>
+				</u-form-item>
+
+				<u-form-item required prop="deviceB" borderBottom label="鍚婅噦椤惰澶�:" labelWidth="80px"
+					@click="showtagid2 = true">
+					<!-- 	<u-badge v-if="tagonlie2==1 && fence.dbtag!=''" :isDot="true" type="success"></u-badge>
+					<u-badge v-else-if="tagonlie2==0 && fence.dbtag!=''" :isDot="true" type="info"></u-badge> -->
+					<!-- <u--input v-model="code" border="none" placeholder="璇疯緭鍏ョ粓绔紪鍙�" @blur="seachcode"></u--input> -->
+					<!-- <u-input v-model="fence.deviceB" type="select" @click="showtagid2 = true" placeholder="璇烽�夋嫨鍚婅噦椤惰澶�" /> -->
+					<u-input v-model="fence.deviceB" disabled disabledColor="#ffffff" placeholder="璇烽�夋嫨鍏宠仈浣滀笟"
+						border="none" />
+					<!-- <tn-action-sheet :list="bumenList" v-model="show1" @click="bymenCallback"></tn-action-sheet> -->
+					<u-icon slot="right" name="arrow-down"></u-icon>
+					<tn-select v-model="showtagid2" mode="single" :list="tagidlist" @confirm="confirmtagid2"
+						:searchShow="true"></tn-select>
+				</u-form-item>
+
+				<u-form-item required prop="bindfence" borderBottom label="鍏宠仈浣滀笟:" labelWidth="80px"
+					@click="show1 = true">
+					<u-input v-model="fence.bindfence" disabled disabledColor="#ffffff" placeholder="璇烽�夋嫨鍏宠仈浣滀笟"
+						border="none" />
+					<!-- <tn-action-sheet :list="bumenList" v-model="show1" @click="bymenCallback"></tn-action-sheet> -->
+					<u-icon slot="right" name="arrow-down"></u-icon>
+					<tn-select v-model="show1" mode="single" :list="bumenList" @confirm="bymenCallback2"
+						:searchShow="true"></tn-select>
+				</u-form-item>
+				<u-form-item required prop="angle" borderBottom label="鍥存爮鑼冨洿瑙掑害:" labelWidth="100px">
+					<u--input v-model="fence.angle" border="none" placeholder="璇疯緭鍏ュ洿鏍忚寖鍥磋搴�"></u--input>
+					<!-- <u-switch v-model="isplay" @change="isopen"></u-switch> -->
+				</u-form-item>
+				<u-form-item label="鏄惁鍚敤:" :labelWidth="labelWidth">
+					<!-- <u--input v-model="model.name" border="none" placeholder="璇疯緭鍏ュ洿鏍忓悕绉�"></u--input> -->
+					<u-switch v-model="fence.isplay==1 ? true : false" @change="isopen1"></u-switch>
+				</u-form-item>
+
+			</u--form>
+			<!-- </view> -->
+			<!-- </view>
+				<button style="margin-top: 20px;" type="primary" @click="submitForm">淇濆瓨鍥存爮</button> -->
+		</u-modal>
 
 		<tn-skeleton :show="showSkeleton"></tn-skeleton>
 		<successCom ref="refSuccess"></successCom>
@@ -153,6 +319,11 @@
 		minLogin
 	} from '@/js/minLogin.js'
 	import {
+		craneKaiQi,
+		craneGuanBi,
+		findtagid,
+		savecrane,
+		findcranepage,
 		updateFence,
 		FenceKaiQihide,
 		FenceGuanBihide,
@@ -174,6 +345,18 @@
 		},
 		data() {
 			return {
+				isplay: false,
+				tagidlist: [],
+				tagonlie1: '',
+				tagonlie2: '',
+				showtagid1: false,
+				showtagid2: false,
+				showmodal: false,
+				type: '0',
+				handovertype: '0',
+				color: '#00aaff',
+				decoration: 'underline',
+				top: '20',
 				labelWidth: 200,
 				width: '90%',
 				editindex: -1,
@@ -184,6 +367,57 @@
 				zuobiaonum: 0,
 				isshape: true,
 				disable: true,
+				rules2: {
+
+					'cranename': {
+						type: 'string',
+						// max: 1,
+						required: true,
+						message: '璇峰~鍐欏悐杞﹀悕绉�',
+						trigger: ['blur', 'change']
+					},
+					'deviceA': {
+						type: 'string',
+						// max: 1,
+						required: true,
+						message: '璇烽�夋嫨鍘熺偣璁惧',
+						trigger: ['blur', 'change']
+					},
+
+					'deviceB': {
+						type: 'string',
+						// max: 1,
+						required: true,
+						message: '璇烽�夋嫨鍚婅噦椤惰澶�',
+						trigger: ['blur', 'change']
+					},
+					'bindfence': {
+						type: 'string',
+						// max: 1,
+						required: true,
+						message: '璇烽�夋嫨鍏宠仈閮ㄩ棬',
+						trigger: ['blur', 'change']
+					},
+					'angle': {
+						type: 'string',
+						// max: 1,
+						required: true,
+						message: '璇峰~鍐欏洿鏍忚寖鍥磋搴�',
+						trigger: ['blur', 'change']
+					},
+
+				},
+				fence: {
+					cranename: '',
+					deviceA: '',
+					deviceB: '',
+					isplay: '0',
+					bindfence: '',
+					angle: '10',
+					addtime: '',
+					company: this.company,
+					addperson: this.username,
+				},
 				form: {
 					name: '',
 					fencetype: '',
@@ -205,17 +439,21 @@
 				],
 
 				typeList: [{
-						text: '淇濇姢鍖�'
+						value: '淇濇姢鍖�',
+						label: '淇濇姢鍖�'
 					},
 					{
-						text: '绂佸叆鍖�'
+						value: '绂佸叆鍖�',
+						label: '绂佸叆鍖�'
 					},
 					{
-						text: '宸ヤ綔鍖�'
+						value: '宸ヤ綔鍖�',
+						label: '宸ヤ綔鍖�'
 					},
 					{
-						text: '瀹夊叏鍖�'
-					}
+						value: '瀹夊叏鍖�',
+						label: '瀹夊叏鍖�'
+					},
 				],
 				bumen: '',
 				bumenList: [],
@@ -250,7 +488,7 @@
 					addperson: '',
 					addtime: '',
 				},
-				num: 40,
+				num: 30,
 				isAchor: false,
 				warnindex: 0,
 				warlist: {},
@@ -279,7 +517,7 @@
 				time: '',
 				list: [],
 				total: 0,
-				zuob:[],
+				zuob: [],
 				options1: [{
 					text: '鍒犻櫎',
 					style: {
@@ -298,8 +536,8 @@
 			}
 		},
 		mounted() {
-			console.log(11111);
 			this.findbumenall()
+			this.findtagidall()
 			this.topheight = this.vuex_custom_bar_height + 15
 			setTimeout(() => {
 				this.showSkeleton = false
@@ -313,11 +551,98 @@
 
 		},
 		methods: {
-			positionclick(e){
-				console.log(e);
-				console.log(e.split(";")[0]);
-				this.$emit('toposition',e.split(";")[0]);
-				console.log(3333333333);
+			isopen1(e) {
+				if (e == true) {
+					this.fence.isplay = '1'
+				} else {
+					this.fence.isplay = '0'
+				}
+			},
+			confirmtagid1(e) {
+				this.fence.deviceA = e[0].label
+				// this.seachcode()
+				this.tagonlie1 = e[0].value
+			},
+
+			confirmtagid2(e) {
+				this.fence.deviceB = e[0].label
+				// this.seachcode()
+				this.tagonlie2 = e[0].value
+			},
+			findtagidall() {
+				if (this.vuex_is_login) {
+					const params = {
+						company: this.company,
+						juese: uni.getStorageSync('juese'),
+					}
+					findtagid(params).then((res) => {
+						if (res.code == 0) {
+							this.tagidlist = res.data.map(item => ({
+								value: item.online,
+								label: item.tagid
+							}));
+						} else {
+							this.$refs.refSuccess.showBox({
+								type: 'error',
+								txt: res.msg
+							});
+						}
+					})
+				}
+
+			},
+			cancelmodal() {
+				this.showmodal = false
+			},
+			submitmodal() {
+				this.fence.company = this.company
+				this.fence.addperson = this.vuex_user
+				this.$refs.uForm.validate().then(res => {
+					uni.$u.toast('鏍¢獙閫氳繃')
+					console.log(this.fence);
+					if (this.vuex_is_login) {
+						savecrane(this.fence).then((res) => {
+							console.log(res);
+							if (res.code == 0) {
+								this.handleRefresh({
+									page: 1,
+									size: this.pageSize
+								}, () => {
+									// 鍙互鍦ㄨ繖閲屽鐞嗗姞杞藉畬鎴愬悗鐨勯�昏緫
+								});
+								this.showmodal = false
+								this.fence.id = ''
+								this.fence.cranename = ''
+								this.fence.deviceA = ''
+								this.fence.deviceB = ''
+								this.fence.isplay = '0'
+								this.fence.bindfence = ''
+								this.fence.angle = '10'
+							} else {
+								this.$refs.refSuccess.showBox({
+									type: 'error',
+									txt: res.msg
+								});
+							}
+						})
+					}
+
+				})
+			},
+			goBack() {
+				this.showmodal = true
+				// this.disabled = false
+				// this.form.personname = ''
+				// this.form.encryption = ''
+				// this.form.tagid = ''
+				// this.form.department = ''
+				// this.form.mestagid = ''
+				// this.form.type = ''
+				// this.form.bisuoid = ''
+				// this.form.baoliu1 = ''
+			},
+			positionclick(e) {
+				this.$emit('toposition', e.split(";")[0]);
 			},
 			manualRefresh() { //淇濆瓨鍥存爮鎴愬姛鍒锋柊鍥存爮鍒楄〃椤甸潰
 				this.isAchor = false
@@ -335,30 +660,46 @@
 				});
 			},
 			isopen(item, e) {
-				this.form.name = item.name
-				if (item.isplay == 1) {
-					item.isplay = 0
-				} else {
-					item.isplay = 1
-					item.ishide = 0
-				}
-				const params = {
-					name: item.name,
-					// size: data.size,
-				}
-				// item.baoliu7 = e ? 1 : 0; // 鏍规嵁寮�鍏崇姸鎬佹洿鏂�
-				if (this.vuex_is_login) {
-					if (e == true) {
 
-						FenceGuanBi(params).then((res) => {
-							console.log(res);
-						})
+				if (this.type == '2') {
+					const params = {
+						name: item.cranename,
+						// size: data.size,
+					}
+					// item.baoliu7 = e ? 1 : 0; // 鏍规嵁寮�鍏崇姸鎬佹洿鏂�
+					if (this.vuex_is_login) {
+						if (e == true) {
+
+							craneGuanBi(params).then((res) => {})
+						} else {
+							craneKaiQi(params).then((res) => {})
+						}
+					}
+				} else {
+					this.form.name = item.name
+					if (item.isplay == 1) {
+						item.isplay = 0
 					} else {
-						FenceKaiQi(params).then((res) => {})
+						item.isplay = 1
+						item.ishide = 0
+					}
+					const params = {
+						name: item.name,
+						// size: data.size,
+					}
+					// item.baoliu7 = e ? 1 : 0; // 鏍规嵁寮�鍏崇姸鎬佹洿鏂�
+					if (this.vuex_is_login) {
+						if (e == true) {
+
+							FenceGuanBi(params).then((res) => {})
+						} else {
+							FenceKaiQi(params).then((res) => {})
+						}
 					}
 				}
+
 			},
-			
+
 			isopenhide(item, e) {
 				this.form.name = item.name
 				if (item.ishide == 1) {
@@ -373,17 +714,15 @@
 				// item.baoliu7 = e ? 1 : 0; // 鏍规嵁寮�鍏崇姸鎬佹洿鏂�
 				if (this.vuex_is_login) {
 					if (e == true) {
-			
-						FenceGuanBihide(params).then((res) => {
-							console.log(res);
-						})
+
+						FenceGuanBihide(params).then((res) => {})
 					} else {
 						FenceKaiQihide(params).then((res) => {})
 					}
 				}
 			},
-			
-			
+
+
 			submitForm() {
 				// this.form.list = this.list
 				if (this.form.type == '') {
@@ -445,25 +784,28 @@
 					this.isshape = false
 				}
 			},
+			bymenCallback2(e) {
+				this.fence.bindfence = e[0].label
 
-			bymenCallback(index) {
-				this.form.department = this.bumenList[index].text;
 			},
-			typeCallback(index) {
-				this.form.type = this.typeList[index].text;
+			bymenCallback(e) {
+				this.form.department = e[0].label
+
+			},
+			typeCallback(e) {
+				this.form.type = e[0].label;
 			},
 			findbumenall() {
 				if (this.vuex_is_login) {
 					const params = {
 						company: this.company,
-						juese:uni.getStorageSync('juese'),
+						juese: uni.getStorageSync('juese'),
 					}
 					findbumen(params).then((res) => {
-						console.log(res);
 						if (res.code == 0) {
 							this.bumenList = res.data.map(item => ({
 								value: item.name,
-								text: item.name
+								label: item.name
 							}));
 							// }
 							// this.form.lonlat=res.data.lat+";"+res.data.lon
@@ -498,26 +840,76 @@
 				this.show = false;
 			},
 			editClick(e, i) {
-				this.editindex = i
-				this.showpopup = true
-				this.formfence.name = e.name
-				this.formfence.fencetype = e.fencetype==0?'鍙樼數浣滀笟' : '杈撶數浣滀笟'
-				this.formfence.department = e.department
-				this.formfence.points = e.points
-				this.formfence.type = e.type
-				this.formfence.height = e.height
-				this.formfence.distance = e.distance
-				this.formfence.baoliu4 = e.baoliu4
-				// this.formfence.disable = e.disable
-				this.formfence.addperson = e.addperson
-				this.formfence.addtime = e.addtime
-				this.form = this.formfence
-				this.zuob = this.form.points.split(",")
+				console.log(e);
+				if (this.type == "2") {
+					this.showmodal = true
+					this.fence.id = e.id
+					this.fence.cranename = e.cranename
+					this.fence.deviceA = e.deviceA
+					this.fence.deviceB = e.deviceB
+					this.fence.isplay = e.isplay
+					this.fence.bindfence = e.bindfence
+					this.fence.angle = e.angle
+					this.fence.company = e.company
+					this.fence.addperson = e.addperson
+
+					// this.fence.name = : {
+					// 	name: '',
+					// 	ydtag: '',
+					// 	dbtag: '',
+					// 	isplay: '0',
+					// 	department: '',
+					// 	angle: '10',
+					// 	addtime: '',
+					// 	company: this.company,
+					// 	addperson: this.username, 
+					// },
+				} else {
+					this.editindex = i
+					this.showpopup = true
+					this.formfence.name = e.name
+					this.formfence.fencetype = e.fencetype == 0 ? '鍙樼數浣滀笟' : '杈撶數浣滀笟'
+					this.formfence.department = e.department
+					this.formfence.points = e.points
+					this.formfence.type = e.type
+					this.formfence.height = e.height
+					this.formfence.distance = e.distance
+					this.formfence.baoliu4 = e.baoliu4
+					// this.formfence.disable = e.disable
+					this.formfence.addperson = e.addperson
+					this.formfence.addtime = e.addtime
+					this.form = this.formfence
+					this.zuob = this.form.points.split(",")
+				}
+
 			},
 			deleteClick(e, i) {
 				this.deleindex = i
 				this.delename = e.name
 				this.show = true;
+
+			},
+
+			gotype(e) {
+				uni.showLoading({
+					title: '姝e湪鍔犺浇'
+				});
+
+				// if (e != "0") {
+				// 	this.color = ''
+				// 	this.decoration = ''
+				// }
+				this.handovertype = e
+
+				console.log(this.type);
+				this.handleRefresh({
+					page: 1,
+					size: this.pageSize
+				}, () => {
+					// 鍙互鍦ㄨ繖閲屽鐞嗗姞杞藉畬鎴愬悗鐨勯�昏緫
+					uni.hideLoading();
+					this.type = e
+				});
 
 			},
 			goAchor() {
@@ -531,13 +923,16 @@
 				this.lock = true
 			},
 
+
 			// 妯℃嫙璇锋眰鍔犺浇鏁版嵁
-			handleLoad(data, callback) {
+			handoverData(data, callback) {
+				console.log(11111);
 				const params = {
+					type: this.handovertype,
 					current: data.page,
 					size: data.size,
 					company: this.company,
-						juese:uni.getStorageSync('juese'),
+					juese: uni.getStorageSync('juese'),
 				}
 				if (this.vuex_is_login) {
 					findFence(params).then((res) => {
@@ -547,6 +942,47 @@
 								let list = [];
 								for (var i = 0; i < res.data.records.length; i++) {
 									list.push(res.data.records[i]);
+								}
+								// if (data.lock == true) {
+								// 	this.list = []
+								// }
+
+								this.list = [...this.list, ...list];
+								callback({
+									// type:this.type,
+									list: this.list,
+									total: res.data.total
+								});
+							}, 1500);
+						}
+					})
+				} else {
+					callback({
+						list: [],
+						total: 0
+					});
+				}
+			},
+			// 妯℃嫙璇锋眰鍔犺浇鏁版嵁
+			handleLoad(data, callback) {
+				const params = {
+					// type: this.handovertype,
+					current: data.page,
+					size: data.size,
+					company: this.company,
+					juese: uni.getStorageSync('juese'),
+				}
+				if (this.vuex_is_login) {
+					findFence(params).then((res) => {
+						if (res.code == 0) {
+							let list = [];
+							setTimeout(() => {
+								let list = [];
+								for (var i = 0; i < res.data.records.length; i++) {
+									list.push(res.data.records[i]);
+								}
+								if (data.lock == true) {
+									this.list = []
 								}
 
 								this.list = [...this.list, ...list];
@@ -567,11 +1003,12 @@
 			handleSearch(data, callback) {
 
 				const params = {
+					// type: this.handovertype,
 					current: 1,
 					size: 10,
 					objectid: this.keyword,
 					company: this.company,
-						juese:uni.getStorageSync('juese'),
+					juese: uni.getStorageSync('juese'),
 				}
 				if (this.vuex_is_login) {
 					findFence(params).then((res) => {
@@ -598,14 +1035,16 @@
 			handleRefresh(data, callback) {
 
 				const params = {
+					// type: this.handovertype,
 					current: data.page,
 					size: data.size,
 					objectid: data.objectid,
 					company: this.company,
-						juese:uni.getStorageSync('juese'),
+					juese: uni.getStorageSync('juese'),
 				}
 				if (this.vuex_is_login) {
 					findFence(params).then((res) => {
+						console.log(res);
 						if (res.code == 0) {
 							let list = [];
 							setTimeout(() => {
@@ -615,6 +1054,7 @@
 								}
 								this.list = []
 								this.list = [...this.list, ...list];
+								console.log(res.data.total);
 								callback({
 									list: this.list,
 									total: res.data.total
@@ -629,6 +1069,15 @@
 </script>
 
 <style lang="scss" scoped>
+	.type {
+		margin-top: 100px;
+		position: absolute;
+		z-index: 9999999999999;
+		margin-left: 10%;
+		font-size: 17px;
+		font-weight: bold;
+	}
+
 	/* 榧犳爣鏈偓娴椂鏁堟灉璁剧疆 */
 	.title_linespan {
 		font-size: 17px;

--
Gitblit v1.9.3