From d75b0b71c2feed580bf765c0d6007b3c1f17ca74 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 19 十月 2022 09:54:00 +0800
Subject: [PATCH] 1.消息列表静态页面实现

---
 unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html |  299 +++++++++++++++++++++++++----------------------------------
 1 files changed, 125 insertions(+), 174 deletions(-)

diff --git a/unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html b/unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html
index e81d757..41cf45e 100644
--- a/unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html
+++ b/unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html
@@ -73,7 +73,7 @@
 
 			let bwcode = '' //鐐瑰嚮閮ㄤ綅鐨勬壂鎻忔 鐐规椤圭洰code
 
-			let number = [] //淇濆吇椤圭洰鍐呭 鍋囨暟缁�   鍋氭壂鐮佸洖鏉ヨ鍥炬洿鏂扮敤
+			let falseArray = [] //淇濆吇椤圭洰鍐呭 鍋囨暟缁�   鍋氭壂鐮佸洖鏉ヨ鍥炬洿鏂扮敤
 
 			// 鎵弿淇濆吇宸ヤ綅杩斿洖鏃舵墽琛屾柟娉�
 			function scaned(r) {
@@ -130,7 +130,7 @@
 							}
 
 
-							number.push({
+							falseArray.push({
 								id: '1'
 							})
 						}
@@ -154,7 +154,7 @@
 						dropdownValue = topContent.find(r => r.code === topContent[0].code).main_cycle
 
 						centerContent = res.data
-						centerContent = JSON.parse(JSON.stringify(centerContent))
+						// centerContent = JSON.parse(JSON.stringify(centerContent))
 						centerContent.forEach(item => {
 							item.isDisabled = item.isscan === 'Y'
 							item.inputValue = ''
@@ -179,116 +179,127 @@
 		<div id="app">
 
 			<div class="body">
+				<van-sticky>
+					<van-nav-bar title="瀹氭湡淇濆吇" @click-right="onClickRight" left-arrow @click-left="onClickleft">
+						<template #right>
+							<van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
+								trigger="click" :actions="actions" @select="onSelect">
+								<template #reference>
+									<van-icon name="bars" size='20' color='#fff' />
+								</template>
+							</van-popover>
+						</template>
+					</van-nav-bar>
+				</van-sticky>
 
-				<van-nav-bar title="瀹氭湡淇濆吇" @click-right="onClickRight" left-arrow @click-left="onClickleft">
-					<template #right>
-						<van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
-							trigger="click" :actions="actions" @select="onSelect">
-							<template #reference>
-								<van-icon name="bars" size='20' color='#fff' />
-							</template>
-						</van-popover>
-					</template>
-				</van-nav-bar>
+				<div v-if="topContent.length===0">
+					<div class="sacnBody">
+						<div class="scanImg" @click="topScanClick()"></div>
+						<div class="scanText">鎵弿淇濆吇宸ヤ綅</div>
+					</div>
+				</div>
 
 
-				<div class="head">
-					<div class="head_block">
-						<div class="head_left">
-							<div class="head_bar"></div>
-							<div class="head_title">
-								鎵弿淇濆吇宸ヤ綅
+				<div v-else>
+
+					<div class="head">
+						<div class="head_block">
+							<div class="head_left">
+								<div class="head_bar"></div>
+								<div class="head_title">
+									鎵弿淇濆吇宸ヤ綅
+								</div>
+							</div>
+
+							<div style="margin-right: 10px;">
+								<van-icon name="scan" color='red' size='24' @click='topScanClick()' />
+							</div>
+
+						</div>
+
+						<div class="flex_between" style="">
+							<div id="contentLeft" style="width: 100%;margin-top: 10px;">
+								<div id="topContentID" v-for="item in topContent" :key="item.code"
+									style="margin-bottom: 10px;margin-left: 20px;" @click="topContentClcik(item.code)">
+									<div style="display: flex;align-items: center;">
+										<div>
+											<div>宸ヤ綅缂栫爜锛�</div>
+											<div>宸ヤ綅鍚嶇О锛�</div>
+											<div>鐢熶骇杞﹂棿锛�</div>
+										</div>
+										<div>
+											<div>{{item.code}}</div>
+											<div>{{item.name}}</div>
+											<div>{{item.wksp_name}}</div>
+										</div>
+									</div>
+
+								</div>
+							</div>
+							<div id="contentRight">
+								<van-radio-group v-model="radioValue" style="padding-right: 12px;">
+									<van-radio checked-color='red' icon-size="18px"
+										style="height: 63px;margin-bottom: 10px;" v-for="item in topContent"
+										:key="item.code" :name="item.code"></van-radio>
+								</van-radio-group>
+							</div>
+						</div>
+					</div>
+
+					<div class="head"
+						:style="{marginTop:topContent.length===0?'100px':'0',minHeight:topContent.length===0?'0':'220px'}"
+						style="margin-bottom: 130px;padding-bottom: 10px;overflow-y: ;"
+						:style="{marginTop:topContent.length===0?'78px':'0'}">
+						<div class="head_block" style="margin-bottom:10px;">
+							<div class="head_left">
+								<div class="head_bar"></div>
+								<div class="head_title">
+									淇濆吇椤圭洰鍐呭
+								</div>
+							</div>
+							<div style="margin-right: 10px;">
+
+								<van-button @click="sheetFlag=true" type="info" style="width:20px;height: 30px;">
+									{{dropdownValue==='M'?'鏈�':'骞�'}}
+								</van-button>
+								<van-action-sheet v-model="sheetFlag" :actions="actionsSheet" @select="onSelectSheet" />
 							</div>
 						</div>
 
-						<div style="margin-right: 10px;">
-							<van-icon name="scan" color='red' size='24' @click='topScanClick()' />
-						</div>
 
-					</div>
-
-					<div class="flex_between" style="">
-						<div id="contentLeft" style="width: 100%;margin-top: 10px;">
-							<div id="topContentID" v-for="item in topContent" :key="item.code"
-								style="margin-bottom: 10px;margin-left: 20px;" @click="topContentClcik(item.code)">
-								<div style="display: flex;align-items: center;">
-									<div>
-										<div>宸ヤ綅缂栫爜锛�</div>
-										<div>宸ヤ綅鍚嶇О锛�</div>
-										<div>鐢熶骇杞﹂棿锛�</div>
-									</div>
-									<div>
-										<div>{{item.code}}</div>
-										<div>{{item.name}}</div>
-										<div>{{item.wksp_name}}</div>
-									</div>
+						<div class="center_border flex_column" style="margin:  5px;" v-for="item in centerContent"
+							:key="item.code">
+							<div class="flex_between">
+								<div class="center_title">{{item.name}}</div>
+								<div style="margin-right: 10px;" v-if="item.isscan==='Y'">
+									<van-icon name="scan" color='red' size='24' @click='centerScanClick(item.code)' />
+								</div>
+							</div>
+							<div class="flex_between ">
+								<div class='flex_between' style="width: 90%;">
+									<van-field class="vanFieldInput" @blur="vanFieldBlur()" :disabled="item.isDisabled"
+										v-model="item.inputValue" placeholder="璇疯緭鍏�" />
 								</div>
 
+
+								<div class="" style="width: 40%;display: flex;justify-content: space-around;">
+									<van-button class="buttonSmall" :disabled='item.isDisabled' size="small"
+										:plain="item.isOK!=='OK'" @click="bwClick(item,'OK')" type="primary">姝e父
+									</van-button>
+									<van-button class="buttonSmall" size="small" :plain="item.isOK!=='NG'"
+										@click="bwClick(item,'NG')" :disabled='item.isDisabled' type="danger">寮傚父
+									</van-button>
+								</div>
+							</div>
+							<div style="font-weight: lighter;font-size: 14px;padding-right: 5px">
+								{{item.chk_desc}}
 							</div>
 						</div>
-						<div id="contentRight">
-							<van-radio-group v-model="radioValue" style="padding-right: 12px;">
-								<van-radio checked-color='red' icon-size="18px"
-									style="height: 63px;margin-bottom: 10px;" v-for="item in topContent"
-									:key="item.code" :name="item.code"></van-radio>
-							</van-radio-group>
-						</div>
-					</div>
-				</div>
 
-				<div class="head"
-					:style="{marginTop:topContent.length===0?'100px':'0',minHeight:topContent.length===0?'0':'220px'}"
-					style="margin-bottom: 130px;padding-bottom: 10px;overflow-y: ;"
-					:style="{marginTop:topContent.length===0?'78px':'0'}">
-					<div class="head_block" style="margin-bottom:10px;">
-						<div class="head_left">
-							<div class="head_bar"></div>
-							<div class="head_title">
-								淇濆吇椤圭洰鍐呭
-							</div>
-						</div>
-						<div style="margin-right: 10px;">
-
-							<van-button @click="sheetFlag=true" type="info" style="width:20px;height: 30px;">
-								{{dropdownValue==='M'?'鏈�':'骞�'}}
-							</van-button>
-							<van-action-sheet v-model="sheetFlag" :actions="actionsSheet" @select="onSelectSheet" />
-						</div>
 					</div>
 
 
-					<div class="center_border flex_column" style="margin:  5px;" v-for="item in centerContent"
-						:key="item.code">
-						<div class="flex_between">
-							<div class="center_title">{{item.name}}</div>
-							<div style="margin-right: 10px;" v-if="item.isscan==='Y'">
-								<van-icon name="scan" color='red' size='24' @click='centerScanClick(item.code)' />
-							</div>
-						</div>
-						<div class="flex_between ">
-							<div class='flex_between' style="width: 90%;">
-								<van-field class="vanFieldInput" @blur="vanFieldBlur()" :disabled="item.isDisabled"
-									v-model="item.inputValue" placeholder="璇疯緭鍏�" />
-							</div>
 
-
-							<div class="" style="width: 40%;display: flex;justify-content: space-around;">
-								<van-button class="buttonSmall" :disabled='item.isDisabled' size="small"
-									:plain="item.isOK!=='OK'" @click="bwClick(item,'OK')" type="primary">姝e父</van-button>
-								<van-button class="buttonSmall" size="small" :plain="item.isOK!=='NG'"
-									@click="bwClick(item,'NG')" :disabled='item.isDisabled' type="danger">寮傚父
-								</van-button>
-							</div>
-						</div>
-						<div style="font-weight: lighter;font-size: 14px;padding-right: 5px">
-							{{item.chk_desc}}
-						</div>
-					</div>
-
-				</div>
-
-
-				<div style="">
 					<div class="footer">
 						<div class="head_block" style="margin-bottom: 20rpx;align-items: center;">
 							<div class="head_left">
@@ -312,11 +323,14 @@
 
 						<div
 							style="position:fixed;bottom: 0;width: 96%;display: flex;justify-content: center;flex-direction: column;align-items: center">
-							<van-button class="vanButtonInfo" :disabled="resultValue===''" @click="submit" type="info">
+							<van-button :load='submitIsDisabled' load-text="姝e湪鎻愪氦,璇风◢绛�..." class="vanButtonInfo"
+								:disabled="resultValue===''" @click="submit" type="info">
 								纭鎻愪氦</van-button>
 						</div>
 
 					</div>
+
+
 				</div>
 
 
@@ -332,6 +346,7 @@
 			el: '#app',
 			data: function() {
 				return {
+					submitIsDisabled: false,
 					overlayShow: false,
 					showPopover: false,
 					actions: [{
@@ -353,7 +368,7 @@
 					}],
 					topContent2: topContent,
 					centerContent2: centerContent,
-					number2: number,
+					falseArray2: falseArray,
 
 					sheetFlag: false,
 				}
@@ -388,14 +403,14 @@
 				// 	deep: true,
 				// 	immediate: true,
 				// },
-				'number2.length': {
+				'falseArray2.length': {
 					handler(newValue, oldValue) {
 						this.$forceUpdate()
 					},
 					deep: true,
 					immediate: true,
 				},
-				// 'number.length': {
+				// 'falseArray.length': {
 				// 	handler(newValue, oldValue) {
 				// 		this.$forceUpdate()
 				// 	},
@@ -409,11 +424,13 @@
 
 			},
 			methods: {
+				// 鏈� 骞撮�夋嫨
 				onSelectSheet(val) {
-					dropdownValue = val
+					dropdownValue = val.code
 					this.$forceUpdate()
 					this.sheetFlag = false
 				},
+				//鎻愪氦
 				submit() {
 					let children = []
 					centerContent.forEach(item => {
@@ -433,15 +450,11 @@
 						children: children
 					}
 
-					console.log(data, 1)
-
 					const params = {
 						username: localStorage.getItem('username'),
 						maintcyc: dropdownValue
 					}
-
-// vant.Notify(JSON.stringify(params))
-// vant.Toast(JSON.stringify(data))
+					this.submitIsDisabled = true
 					post('AppDeviceManage/AppDeviceRepairSave' + formatParams(params), data)
 						.then(res => {
 							if (res.code === '200') {
@@ -461,7 +474,10 @@
 									centerContent = []
 								}
 								resultValue = ''
+								this.submitIsDisabled = false
 								this.$forceUpdate()
+							} else {
+								this.submitIsDisabled = false
 							}
 						})
 
@@ -470,6 +486,7 @@
 				vanFieldBlur() {
 					this.$forceUpdate()
 				},
+				//鎵弿淇濆吇宸ヤ綅鐐瑰嚮涓嶅悓閫夋嫨椤�
 				topContentClcik(code) {
 					radioValue = code
 					this.$forceUpdate()
@@ -500,16 +517,11 @@
 						}
 					})
 				},
-
+				//淇濆吇缁撴灉鐐瑰嚮
 				resultClick(val) {
 					resultValue = val
 					this.$forceUpdate()
 				},
-
-				selected(id) {
-					alert(id)
-				},
-
 				// 鎵弿淇濆吇宸ヤ綅鎵弿
 				topScanClick() {
 					createWithoutTitle('../../components/barcode_scan.html', {
@@ -547,7 +559,6 @@
 						}
 					});
 				},
-
 				// 閮ㄤ綅姝e父 寮傚父鎸夐挳鐐瑰嚮
 				bwClick(item, val) {
 					item.isOK = val
@@ -581,65 +592,5 @@
 	</script>
 	<style type="text/css">
 		@import url('../../css/global.css');
-
-		body {
-			background-color: #fff;
-		}
-
-		.body {
-			min-height: 600px;
-			background-color: grey;
-			margin-top: 0px;
-			background-color: #fff;
-			position: relative;
-		}
-
-		.van-nav-bar__content {
-			background-color: #2651d8;
-			height: 44px;
-		}
-
-		.van-nav-bar__title {
-			color: #fff;
-			letter-spacing: 2px;
-		}
-
-		.van-nav-bar__arrow {
-			color: #fff !important;
-		}
-
-		.createElementDiv {
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			margin-bottom: 10px;
-			margin-left: 20px;
-		}
-
-		.vanFieldInput {
-			height: 36px;
-			line-height: 36px;
-			align-items: center;
-			/* width: 200px; */
-
-			padding: 0;
-			padding-left: 10px;
-			/* border-radius: 5px; */
-			margin: 5px 0;
-			/* background-color: #fff; */
-		}
-
-		.buttonSmall {
-			/* border-radius: 5px; */
-		}
-
-		.vanButtonInfo {
-			width: 100%;
-			letter-spacing: 2px;
-			height: 50px;
-			font-size: 18px;
-			/* margin-left: 0; */
-
-		}
 	</style>
 </html>

--
Gitblit v1.9.3