From 7b76391180904d58156aef13abcac0256ff7fcc1 Mon Sep 17 00:00:00 2001 From: loulijun2021 <1694218219@qq.com> Date: 星期五, 23 九月 2022 10:07:56 +0800 Subject: [PATCH] 1.登出接口接入 --- pages/sbgl/rcdj.html | 77 ++++++++++++++++++++++++++++++++------ 1 files changed, 65 insertions(+), 12 deletions(-) diff --git a/pages/sbgl/rcdj.html b/pages/sbgl/rcdj.html index 51480a0..da60ea7 100644 --- a/pages/sbgl/rcdj.html +++ b/pages/sbgl/rcdj.html @@ -19,6 +19,8 @@ <script type="text/javascript" src="../../js/common.js"></script> + <script type="text/javascript" src="../../js/global.js"></script> + <!-- <link rel="stylesheet" href="../../css/global.css" type="text/css" charset="utf-8" /> --> <script type="text/javascript"> @@ -36,7 +38,7 @@ // wksp_code: "CJ002", // wksp_name: '瑁呴厤杞﹂棿', // eqpchkmain_code: "djbz002" - // }, + // }, ]; var centerContent = [ @@ -54,17 +56,17 @@ ] - let radioValue = '' + let radioValue = '' //鍗曢�夋閫変腑鐨勯」 - let resultValue = '' + let resultValue = '' //鐐规缁撴灉 - let bwcode = '' + let bwcode = '' //鐐瑰嚮閮ㄤ綅鐨勬壂鎻忔 鐐规椤圭洰code - let number = [] + let number = [] //鐐规椤圭洰鍐呭 鍋囨暟缁� 鍋氭壂鐮佸洖鏉ヨ鍥炬洿鏂扮敤 + // 鎵弿鐐规宸ヤ綅杩斿洖鏃舵墽琛屾柟娉� function scaned(r) { - let flag = false topContent.forEach((item, index) => { if (item.code === r) { @@ -98,7 +100,7 @@ } - + // 鎵弿鐐规椤圭洰鍐呭杩斿洖鏃舵墽琛屾柟娉� function scaned2(r) { if (bwcode === r) { centerContent.forEach(item => { @@ -131,7 +133,6 @@ } } - function topContentClcik(code) { radioValue = code @@ -246,8 +247,8 @@ </div> <div class="flex_between "> <div class='flex_between' style="width: 90%;"> - <van-field class="vanFieldInput" :disabled="item.isDisabled" v-model="item.inputValue" - placeholder="璇疯緭鍏�" /> + <van-field class="vanFieldInput" @blur="vanFieldBlur()" :disabled="item.isDisabled" + v-model="item.inputValue" placeholder="璇疯緭鍏�" /> </div> @@ -377,7 +378,53 @@ mounted() {}, methods: { submit() { - vant.Toast('xxx1') + let children = [] + centerContent.forEach(item => { + children.push({ + seq: item.seq, + itemcode: item.code, + cycle: item.cycle, + value: item.inputValue, + result: item.isOK + }) + }) + const data = { + code: radioValue, + name: topContent.find(r => r.code === radioValue).name, + standcode: topContent.find(r => r.code === radioValue).eqpchkmain_code, + result: resultValue, + children: children + } + + console.log(data, 1) + + post('AppDeviceManage/AppDeviceCheckSave?username=' + localStorage.getItem('username'), data) + .then(res => { + if (res.code === '200') { + vant.Notify({ + type: 'primary', + message: '鎻愪氦鎴愬姛锛�' + }) + topContent.forEach((r, i) => { + if (r.code === radioValue) { + topContent.splice(i, 1) + } + }) + if (topContent.length >= 1) { + radioValue = topContent[0].code + this.topContentClcik(radioValue) + } else { + centerContent = [] + } + resultValue = '' + this.$forceUpdate() + } + }) + + }, + // 杈撳叆妗嗗け鐒﹁Е鍙戜簨浠� + vanFieldBlur() { + this.$forceUpdate() }, topContentClcik(code) { radioValue = code @@ -473,7 +520,13 @@ this.overlayShow = true }, onSelect(action) { - vant.Toast(action.text); + if(action.text==='鎿嶄綔鎸囧'){ + topPopoverClick('鎿嶄綔鎸囧') + }else if(action.text==='鎴愬搧杩芥函'){ + topPopoverClick('鎴愬搧杩芥函') + }else if(action.text==='閫�鍑虹櫥褰�'){ + topPopoverClick('閫�鍑虹櫥褰�') + } this.overlayShow = false }, } -- Gitblit v1.9.3