From 48e31778cba99836acaaccbb24c843cd3049b1da Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 23 九月 2022 15:37:12 +0800
Subject: [PATCH] 1.设备保养开发完成
---
unpackage/cache/wgt/H5EDA0853/pages/xtsy/index.html | 9
pages/sbgl/dqby.html | 557 ++++++++++++++++++++++
unpackage/cache/wgt/H5EDA0853/js/global.js | 46 +
pages/sbgl/rcdj.html | 45
pages/test/test1.html | 17
unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html | 557 ++++++++++++++++++++++
unpackage/cache/wgt/H5EDA0853/pages/login/index.html | 13
unpackage/cache/wgt/H5EDA0853/pages/sbgl/rcdj.html | 130 +++-
unpackage/cache/wgt/H5EDA0853/pages/test/test1.html | 17
9 files changed, 1,283 insertions(+), 108 deletions(-)
diff --git a/pages/sbgl/dqby.html b/pages/sbgl/dqby.html
index 220d658..e81d757 100644
--- a/pages/sbgl/dqby.html
+++ b/pages/sbgl/dqby.html
@@ -17,10 +17,164 @@
<script type="text/javascript" src="../../js/axios.min.js"></script>
<script type="text/javascript" src="../../js/http.js"></script>
+ <script type="text/javascript" src="../../js/common.js"></script>
- <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" />
+ <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">
+ var topContent = [
+ // {
+ // code: 'SB001',
+ // name: '鐢垫睜缁勪竴绾�',
+ // wksp_code: "CJ002",
+ // wksp_name: '鐢垫睜杞﹂棿',
+ // eapmai_code: "bybz004",
+ // eapmai_name: "鏍囧噯4",
+ // main_cycle: "M",
+ // },
+ // {
+ // code: 'SB003',
+ // name: '榻胯疆绠辩粍涓�绾�',
+ // wksp_code: "CJ001",
+ // "wksp_name": "瑁呴厤杞﹂棿",
+ // "eapmai_code": "bybz003",
+ // "eapmai_name": "鏍囧噯鍚嶇О3",
+ // "main_cycle": "M"
+ // },
+ ];
+
+ var centerContent = [
+ // {
+ // "seq": 1,
+ // "code": "bwbm004",
+ // "name": "閮ㄤ綅鍚嶇О4",
+ // "chk_desc": "",
+ // "isscan": "N",
+ // "main_cycle": "M"
+ // },
+ // {
+ // "seq": 2,
+ // "code": "bwbm002",
+ // "name": "閮ㄤ綅鍚嶇О2",
+ // "chk_desc": "",
+ // "isscan": "N",
+ // "main_cycle": "M"
+ // }
+ ]
+
+
+ let radioValue = '' //鍗曢�夋閫変腑鐨勯」
+
+ let resultValue = '' //鐐规缁撴灉
+
+ let dropdownValue = 'M' //涓嬫媺榛樿閫変腑鐨勫��
+
+ let bwcode = '' //鐐瑰嚮閮ㄤ綅鐨勬壂鎻忔 鐐规椤圭洰code
+
+ let number = [] //淇濆吇椤圭洰鍐呭 鍋囨暟缁� 鍋氭壂鐮佸洖鏉ヨ鍥炬洿鏂扮敤
+
+ // 鎵弿淇濆吇宸ヤ綅杩斿洖鏃舵墽琛屾柟娉�
+ function scaned(r) {
+ let flag = false
+ topContent.forEach((item, index) => {
+ if (item.code === r) {
+ flag = true
+ }
+ })
+ if (flag) {
+ vant.Notify({
+ type: 'danger',
+ message: '姝ゆ潯鐮佸凡鎵弿锛屽凡鍦ㄥ垪琛ㄤ腑锛�'
+ });
+ } else {
+ get('AppDeviceManage/RepairScanDeviceQrCodeData', {
+ eqpcode: r
+ }).then(res => {
+ if (res.code === '200' && res.data[0].eqpchkmain_code !== null) {
+ topContent.unshift(res.data[0])
+ topContentClcik(topContent[0].code)
+ }
+
+ if (res.code === '200' && res.data[0].eqpchkmain_code === null) {
+ vant.Notify({
+ type: 'danger',
+ message: '褰撳墠璁惧鏈缃繚鍏绘爣鍑嗙粦瀹氱偣妫�椤圭洰锛�'
+ });
+ }
+ })
+ }
+
+
+
+ }
+
+ // 鎵弿淇濆吇椤圭洰鍐呭杩斿洖鏃舵墽琛屾柟娉�
+ function scaned2(r) {
+ if (bwcode === r) {
+ centerContent.forEach(item => {
+ if (item.code === bwcode) {
+ item.isDisabled = false
+ item.isOK = 'OK'
+
+
+ if (centerContent.every(r => r.isOK === 'OK')) {
+ resultValue = 'OK'
+ }
+ if (centerContent.some(r => r.isOK === 'NG')) {
+ resultValue = 'NG'
+ }
+ if (centerContent.some(r => r.isOK === '')) {
+ resultValue = ''
+ }
+
+
+ number.push({
+ id: '1'
+ })
+ }
+ })
+ } else {
+ vant.Notify({
+ type: 'danger',
+ message: '鎵弿鐨勪簩缁寸爜鏈笌姝ょ偣妫�椤圭洰鐩稿尮閰嶏紒'
+ });
+ }
+
+ }
+
+ function topContentClcik(code) {
+ radioValue = code
+ get('AppDeviceManage/RepairSelectScanDeviceQrCodeItem', {
+ eqpcode: code
+ }).then(res => {
+ if (res.code === '200') {
+
+ dropdownValue = topContent.find(r => r.code === topContent[0].code).main_cycle
+
+ centerContent = res.data
+ centerContent = JSON.parse(JSON.stringify(centerContent))
+ centerContent.forEach(item => {
+ item.isDisabled = item.isscan === 'Y'
+ item.inputValue = ''
+ item.isOK = item.isscan !== 'Y' ? 'OK' : ''
+ })
+ if (centerContent.every(r => r.isOK === 'OK')) {
+ resultValue = 'OK'
+ }
+ if (centerContent.some(r => r.isOK === 'NG')) {
+ resultValue = 'NG'
+ }
+ if (centerContent.some(r => r.isOK === '')) {
+ resultValue = ''
+ }
+ }
+ })
+ }
+ </script>
</head>
+ <!-- <body onload="loadNodes()"> -->
<body>
<div id="app">
@@ -28,7 +182,7 @@
<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"
+ <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' />
@@ -37,8 +191,136 @@
</template>
</van-nav-bar>
- </div>
+ <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 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">
+ <div class="head_bar"></div>
+ <div class="head_title">
+ 淇濆吇缁撴灉
+ </div>
+ </div>
+ <div class="flex_center" style="width: 30%;display: flex;justify-content: space-around;">
+
+ <van-button class="buttonSmall"
+ :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0"
+ size="small" :plain="resultValue!=='OK'" @click="resultClick('OK')" type="primary">
+ 姝e父</van-button>
+ <van-button class="buttonSmall" size="small" :plain="resultValue!=='NG'"
+ :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0"
+ @click="resultClick('NG')" type="danger">寮傚父</van-button>
+ </div>
+
+ </div>
+
+ <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>
+ </div>
+
+ </div>
+ </div>
+
+
+ </div>
<van-overlay :show="overlayShow" @click="overlayShow=false" />
@@ -62,40 +344,254 @@
icon: 'revoke',
text: '閫�鍑虹櫥褰�'
}],
+ actionsSheet: [{
+ code: 'Y',
+ name: '骞�'
+ }, {
+ code: 'M',
+ name: '鏈�'
+ }],
+ topContent2: topContent,
+ centerContent2: centerContent,
+ number2: number,
+ sheetFlag: false,
}
},
- created() {
+ watch: {
+ 'topContent2.length': {
+ handler(newValue, oldValue) {
+ if (newValue !== oldValue) {
+ // this.topContent2 = topContent
+ // this.$forceUpdate()
+ if (topContent[0] && topContent[0].code) {
+ this.$forceUpdate()
+ this.topContentClcik(topContent[0].code)
+ }
+
+ }
+ },
+ deep: true,
+ immediate: true,
+ },
+
+ // 'topContent.length': {
+ // handler(newValue, oldValue) {
+ // if (newValue !== oldValue) {
+ // this.$forceUpdate()
+ // // if (topContent[0]&&topContent[0].code) {
+ // // this.$forceUpdate()
+ // // this.topContentClcik(topContent[0].code)
+ // // }
+ // }
+ // },
+ // deep: true,
+ // immediate: true,
+ // },
+ 'number2.length': {
+ handler(newValue, oldValue) {
+ this.$forceUpdate()
+ },
+ deep: true,
+ immediate: true,
+ },
+ // 'number.length': {
+ // handler(newValue, oldValue) {
+ // this.$forceUpdate()
+ // },
+ // deep: true,
+ // immediate: true,
+ // },
+ },
+ created() {},
+ mounted() {
+ // dropdownValue = topContent.find(r => r.code === 'SB001').main_cycle
},
- mounted() {
-
- },
methods: {
- onClickleft(){
+ onSelectSheet(val) {
+ dropdownValue = val
+ this.$forceUpdate()
+ this.sheetFlag = false
+ },
+ submit() {
+ let children = []
+ centerContent.forEach(item => {
+ children.push({
+ seq: item.seq,
+ itemcode: item.code,
+ cycle: item.main_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).eapmai_code,
+ result: resultValue,
+ children: children
+ }
+
+ console.log(data, 1)
+
+ const params = {
+ username: localStorage.getItem('username'),
+ maintcyc: dropdownValue
+ }
+
+// vant.Notify(JSON.stringify(params))
+// vant.Toast(JSON.stringify(data))
+ post('AppDeviceManage/AppDeviceRepairSave' + formatParams(params), 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
+ this.$forceUpdate()
+ get('AppDeviceManage/RepairSelectScanDeviceQrCodeItem', {
+ eqpcode: code
+ }).then(res => {
+ if (res.code === '200') {
+
+ dropdownValue = topContent.find(r => r.code === code).main_cycle
+
+ centerContent = res.data
+ centerContent.forEach(item => {
+ item.isDisabled = item.isscan === 'Y'
+ item.inputValue = ''
+ item.isOK = item.isscan !== 'Y' ? 'OK' : ''
+ })
+ if (centerContent.every(r => r.isOK === 'OK')) {
+ resultValue = 'OK'
+ }
+ if (centerContent.some(r => r.isOK === 'NG')) {
+ resultValue = 'NG'
+ }
+ if (centerContent.some(r => r.isOK === '')) {
+ resultValue = ''
+ }
+
+ this.$forceUpdate()
+ }
+ })
+ },
+
+ resultClick(val) {
+ resultValue = val
+ this.$forceUpdate()
+ },
+
+ selected(id) {
+ alert(id)
+ },
+
+ // 鎵弿淇濆吇宸ヤ綅鎵弿
+ topScanClick() {
+ createWithoutTitle('../../components/barcode_scan.html', {
+ titleNView: {
+ type: 'float',
+ backgroundColor: 'rgba(215,75,40,0.3)',
+ titleText: '鎵竴鎵�',
+ titleColor: '#FFFFFF',
+ autoBackButton: true,
+ buttons: [{
+ fontSrc: '_www/helloh5.ttf',
+ text: '\ue302',
+ fontSize: '18px',
+ onclick: 'javascript:scanPicture()'
+ }]
+ }
+ });
+ },
+ // 淇濆吇椤圭洰鍐呭鎵弿
+ centerScanClick(code) {
+ bwcode = code
+ createWithoutTitle('../../components/barcode_scan2.html', {
+ titleNView: {
+ type: 'float',
+ backgroundColor: 'rgba(215,75,40,0.3)',
+ titleText: '鎵竴鎵�',
+ titleColor: '#FFFFFF',
+ autoBackButton: true,
+ buttons: [{
+ fontSrc: '_www/helloh5.ttf',
+ text: '\ue302',
+ fontSize: '18px',
+ onclick: 'javascript:scanPicture()'
+ }]
+ }
+ });
+ },
+
+ // 閮ㄤ綅姝e父 寮傚父鎸夐挳鐐瑰嚮
+ bwClick(item, val) {
+ item.isOK = val
+ if (centerContent.every(item => item.isOK !== '')) {
+ if (centerContent.every(item => item.isOK === 'OK')) {
+ resultValue = 'OK'
+ } else {
+ resultValue = 'NG'
+ }
+ }
+ this.$forceUpdate() //寮哄埗瑙嗗浘鏇存柊
+ },
+ onClickleft() {
history.back()
},
onClickRight() {
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
},
}
})
</script>
<style type="text/css">
+ @import url('../../css/global.css');
+
body {
background-color: #fff;
}
.body {
- height: 600px;
+ min-height: 600px;
background-color: grey;
margin-top: 0px;
background-color: #fff;
- position: relative;
+ position: relative;
}
.van-nav-bar__content {
@@ -107,8 +603,43 @@
color: #fff;
letter-spacing: 2px;
}
- .van-nav-bar__arrow{
+
+ .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>
\ No newline at end of file
+</html>
diff --git a/pages/sbgl/rcdj.html b/pages/sbgl/rcdj.html
index da60ea7..1eef026 100644
--- a/pages/sbgl/rcdj.html
+++ b/pages/sbgl/rcdj.html
@@ -25,15 +25,16 @@
<script type="text/javascript">
var topContent = [
+
// {
- // code: 'SB001',
+ // code: 'SB003',
// name: '榻胯疆绠辩粍',
// wksp_code: "CJ002",
// wksp_name: '瑁呴厤杞﹂棿',
// eqpchkmain_code: "djbz002"
// },
// {
- // code: 'SB003',
+ // code: 'SB001',
// name: '榻胯疆绠辩粍',
// wksp_code: "CJ002",
// wksp_name: '瑁呴厤杞﹂棿',
@@ -346,19 +347,19 @@
immediate: true,
},
- 'topContent.length': {
- handler(newValue, oldValue) {
- if (newValue !== oldValue) {
- this.$forceUpdate()
- // if (topContent[0]&&topContent[0].code) {
- // this.$forceUpdate()
- // this.topContentClcik(topContent[0].code)
- // }
- }
- },
- deep: true,
- immediate: true,
- },
+ // 'topContent.length': {
+ // handler(newValue, oldValue) {
+ // if (newValue !== oldValue) {
+ // this.$forceUpdate()
+ // // if (topContent[0]&&topContent[0].code) {
+ // // this.$forceUpdate()
+ // // this.topContentClcik(topContent[0].code)
+ // // }
+ // }
+ // },
+ // deep: true,
+ // immediate: true,
+ // },
'number2.length': {
handler(newValue, oldValue) {
this.$forceUpdate()
@@ -366,13 +367,13 @@
deep: true,
immediate: true,
},
- 'number.length': {
- handler(newValue, oldValue) {
- this.$forceUpdate()
- },
- deep: true,
- immediate: true,
- },
+ // 'number.length': {
+ // handler(newValue, oldValue) {
+ // this.$forceUpdate()
+ // },
+ // deep: true,
+ // immediate: true,
+ // },
},
created() {},
mounted() {},
diff --git a/pages/test/test1.html b/pages/test/test1.html
index 2c57e0e..1884224 100644
--- a/pages/test/test1.html
+++ b/pages/test/test1.html
@@ -83,6 +83,10 @@
<van-button type="primary">娴呰壊椋庢牸</van-button>
</template>
</van-popover>
+
+ <van-dropdown-menu :overlay="false" style="width: 100px;">
+ <van-dropdown-item style="width: 100px;" v-model="value1" :options="option1" />
+ </van-dropdown-menu>
</div>
</div>
</body>
@@ -108,6 +112,18 @@
}, {
text: '閫夐」涓�'
}],
+ value1: 0,
+ // value2: 'a',
+ option1: [
+ { text: '鍏ㄩ儴鍟嗗搧', value: 0 },
+ { text: '鏂版鍟嗗搧', value: 1 },
+ { text: '娲诲姩鍟嗗搧', value: 2 },
+ ],
+ // option2: [
+ // { text: '榛樿鎺掑簭', value: 'a' },
+ // { text: '濂借瘎鎺掑簭', value: 'b' },
+ // { text: '閿�閲忔帓搴�', value: 'c' },
+ // ],
}
},
created() {
@@ -117,6 +133,7 @@
// console.log(vant.Toast('xxx'))
},
methods: {
+
onSelect(action) {
Toast(action.text);
},
diff --git a/unpackage/cache/wgt/H5EDA0853/js/global.js b/unpackage/cache/wgt/H5EDA0853/js/global.js
index 70ec3bb..0ad3afc 100644
--- a/unpackage/cache/wgt/H5EDA0853/js/global.js
+++ b/unpackage/cache/wgt/H5EDA0853/js/global.js
@@ -1,14 +1,36 @@
(function(w) {
- // 鏍煎紡鍖栧湴鍧�鏍忓弬鏁� 灏嗗璞¤嚜鍔ㄦ嫾鎺ユ垚鍦板潃鏍忎紶鍙傚舰寮�
- w.formatParams = function() {
- const data = {
- userid: 33,
- usercode: '002',
- username: '寮犱笁',
- usertype: 'APP'
- }
- return data;
+ // 鏍煎紡鍖栧湴鍧�鏍忓弬鏁� 灏嗗璞¤嚜鍔ㄦ嫾鎺ユ垚鍦板潃鏍忎紶鍙傚舰寮�
+ w.formatParams = function(data) {
+ let temp = ''
+ Object.keys(data).map((key, index) => {
+ temp += '&' + key + '=' + data[key]
+ })
+ let firstCharAt = temp.charAt(0)
+ temp = temp.replace(firstCharAt, '?')
+ return temp;
}
-
-
-})(window);
\ No newline at end of file
+
+ w.topPopoverClick = function(type) {
+
+ if (type === '鎿嶄綔鎸囧') {
+ console.log('鎿嶄綔鎸囧')
+ } else if (type === '鎴愬搧杩芥函') {
+ console.log('鎴愬搧杩芥函')
+ } else if (type === '閫�鍑虹櫥褰�') {
+ const data = {
+ userid: localStorage.getItem('userid'),
+ usercode: localStorage.getItem('usercode'),
+ username: localStorage.getItem('username'),
+ usertype: localStorage.getItem('usertype')
+ }
+ post('Login/LoginAppOut' + formatParams(data)).then(res => {
+ if (res.code === '200') {
+ window.location.href = '../login/index.html'
+ }
+ })
+ }
+
+ // return 1
+ }
+
+})(window);
diff --git a/unpackage/cache/wgt/H5EDA0853/pages/login/index.html b/unpackage/cache/wgt/H5EDA0853/pages/login/index.html
index 92af73e..32502d1 100644
--- a/unpackage/cache/wgt/H5EDA0853/pages/login/index.html
+++ b/unpackage/cache/wgt/H5EDA0853/pages/login/index.html
@@ -50,7 +50,8 @@
</van-field>
</div>
<div style="margin-top:30px;">
- <van-button type="info" style="border-radius: 10px;" @click='loginClick' size="large">绔嬪嵆鐧诲綍
+ <van-button type="info" style="border-radius: 10px;" :disabled="username===''||password===''"
+ @click='loginClick' size="large">绔嬪嵆鐧诲綍
</van-button>
</div>
</div>
@@ -73,7 +74,7 @@
},
mounted() {
- console.log(formatParams(),1)
+
},
methods: {
loginClick() {
@@ -105,18 +106,12 @@
username: res.data.username,
usertype: res.data.usertype
}
-
-
- post('Login/ForcedOffline?userid=' + res.data.userid + '&usercode=' + res.data
- .usercode + '&username=' + res.data.username + '&usertype=' + res.data
- .usertype).then(res2 => {
+ post('Login/ForcedOffline' + formatParams(data2)).then(res2 => {
if (res2.code === '200') {
this.loginClick()
}
-
})
}
-
}).catch(err => {
console.log(err);
});
diff --git a/unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html b/unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html
index 220d658..e81d757 100644
--- a/unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html
+++ b/unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html
@@ -17,10 +17,164 @@
<script type="text/javascript" src="../../js/axios.min.js"></script>
<script type="text/javascript" src="../../js/http.js"></script>
+ <script type="text/javascript" src="../../js/common.js"></script>
- <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" />
+ <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">
+ var topContent = [
+ // {
+ // code: 'SB001',
+ // name: '鐢垫睜缁勪竴绾�',
+ // wksp_code: "CJ002",
+ // wksp_name: '鐢垫睜杞﹂棿',
+ // eapmai_code: "bybz004",
+ // eapmai_name: "鏍囧噯4",
+ // main_cycle: "M",
+ // },
+ // {
+ // code: 'SB003',
+ // name: '榻胯疆绠辩粍涓�绾�',
+ // wksp_code: "CJ001",
+ // "wksp_name": "瑁呴厤杞﹂棿",
+ // "eapmai_code": "bybz003",
+ // "eapmai_name": "鏍囧噯鍚嶇О3",
+ // "main_cycle": "M"
+ // },
+ ];
+
+ var centerContent = [
+ // {
+ // "seq": 1,
+ // "code": "bwbm004",
+ // "name": "閮ㄤ綅鍚嶇О4",
+ // "chk_desc": "",
+ // "isscan": "N",
+ // "main_cycle": "M"
+ // },
+ // {
+ // "seq": 2,
+ // "code": "bwbm002",
+ // "name": "閮ㄤ綅鍚嶇О2",
+ // "chk_desc": "",
+ // "isscan": "N",
+ // "main_cycle": "M"
+ // }
+ ]
+
+
+ let radioValue = '' //鍗曢�夋閫変腑鐨勯」
+
+ let resultValue = '' //鐐规缁撴灉
+
+ let dropdownValue = 'M' //涓嬫媺榛樿閫変腑鐨勫��
+
+ let bwcode = '' //鐐瑰嚮閮ㄤ綅鐨勬壂鎻忔 鐐规椤圭洰code
+
+ let number = [] //淇濆吇椤圭洰鍐呭 鍋囨暟缁� 鍋氭壂鐮佸洖鏉ヨ鍥炬洿鏂扮敤
+
+ // 鎵弿淇濆吇宸ヤ綅杩斿洖鏃舵墽琛屾柟娉�
+ function scaned(r) {
+ let flag = false
+ topContent.forEach((item, index) => {
+ if (item.code === r) {
+ flag = true
+ }
+ })
+ if (flag) {
+ vant.Notify({
+ type: 'danger',
+ message: '姝ゆ潯鐮佸凡鎵弿锛屽凡鍦ㄥ垪琛ㄤ腑锛�'
+ });
+ } else {
+ get('AppDeviceManage/RepairScanDeviceQrCodeData', {
+ eqpcode: r
+ }).then(res => {
+ if (res.code === '200' && res.data[0].eqpchkmain_code !== null) {
+ topContent.unshift(res.data[0])
+ topContentClcik(topContent[0].code)
+ }
+
+ if (res.code === '200' && res.data[0].eqpchkmain_code === null) {
+ vant.Notify({
+ type: 'danger',
+ message: '褰撳墠璁惧鏈缃繚鍏绘爣鍑嗙粦瀹氱偣妫�椤圭洰锛�'
+ });
+ }
+ })
+ }
+
+
+
+ }
+
+ // 鎵弿淇濆吇椤圭洰鍐呭杩斿洖鏃舵墽琛屾柟娉�
+ function scaned2(r) {
+ if (bwcode === r) {
+ centerContent.forEach(item => {
+ if (item.code === bwcode) {
+ item.isDisabled = false
+ item.isOK = 'OK'
+
+
+ if (centerContent.every(r => r.isOK === 'OK')) {
+ resultValue = 'OK'
+ }
+ if (centerContent.some(r => r.isOK === 'NG')) {
+ resultValue = 'NG'
+ }
+ if (centerContent.some(r => r.isOK === '')) {
+ resultValue = ''
+ }
+
+
+ number.push({
+ id: '1'
+ })
+ }
+ })
+ } else {
+ vant.Notify({
+ type: 'danger',
+ message: '鎵弿鐨勪簩缁寸爜鏈笌姝ょ偣妫�椤圭洰鐩稿尮閰嶏紒'
+ });
+ }
+
+ }
+
+ function topContentClcik(code) {
+ radioValue = code
+ get('AppDeviceManage/RepairSelectScanDeviceQrCodeItem', {
+ eqpcode: code
+ }).then(res => {
+ if (res.code === '200') {
+
+ dropdownValue = topContent.find(r => r.code === topContent[0].code).main_cycle
+
+ centerContent = res.data
+ centerContent = JSON.parse(JSON.stringify(centerContent))
+ centerContent.forEach(item => {
+ item.isDisabled = item.isscan === 'Y'
+ item.inputValue = ''
+ item.isOK = item.isscan !== 'Y' ? 'OK' : ''
+ })
+ if (centerContent.every(r => r.isOK === 'OK')) {
+ resultValue = 'OK'
+ }
+ if (centerContent.some(r => r.isOK === 'NG')) {
+ resultValue = 'NG'
+ }
+ if (centerContent.some(r => r.isOK === '')) {
+ resultValue = ''
+ }
+ }
+ })
+ }
+ </script>
</head>
+ <!-- <body onload="loadNodes()"> -->
<body>
<div id="app">
@@ -28,7 +182,7 @@
<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"
+ <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' />
@@ -37,8 +191,136 @@
</template>
</van-nav-bar>
- </div>
+ <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 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">
+ <div class="head_bar"></div>
+ <div class="head_title">
+ 淇濆吇缁撴灉
+ </div>
+ </div>
+ <div class="flex_center" style="width: 30%;display: flex;justify-content: space-around;">
+
+ <van-button class="buttonSmall"
+ :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0"
+ size="small" :plain="resultValue!=='OK'" @click="resultClick('OK')" type="primary">
+ 姝e父</van-button>
+ <van-button class="buttonSmall" size="small" :plain="resultValue!=='NG'"
+ :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0"
+ @click="resultClick('NG')" type="danger">寮傚父</van-button>
+ </div>
+
+ </div>
+
+ <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>
+ </div>
+
+ </div>
+ </div>
+
+
+ </div>
<van-overlay :show="overlayShow" @click="overlayShow=false" />
@@ -62,40 +344,254 @@
icon: 'revoke',
text: '閫�鍑虹櫥褰�'
}],
+ actionsSheet: [{
+ code: 'Y',
+ name: '骞�'
+ }, {
+ code: 'M',
+ name: '鏈�'
+ }],
+ topContent2: topContent,
+ centerContent2: centerContent,
+ number2: number,
+ sheetFlag: false,
}
},
- created() {
+ watch: {
+ 'topContent2.length': {
+ handler(newValue, oldValue) {
+ if (newValue !== oldValue) {
+ // this.topContent2 = topContent
+ // this.$forceUpdate()
+ if (topContent[0] && topContent[0].code) {
+ this.$forceUpdate()
+ this.topContentClcik(topContent[0].code)
+ }
+
+ }
+ },
+ deep: true,
+ immediate: true,
+ },
+
+ // 'topContent.length': {
+ // handler(newValue, oldValue) {
+ // if (newValue !== oldValue) {
+ // this.$forceUpdate()
+ // // if (topContent[0]&&topContent[0].code) {
+ // // this.$forceUpdate()
+ // // this.topContentClcik(topContent[0].code)
+ // // }
+ // }
+ // },
+ // deep: true,
+ // immediate: true,
+ // },
+ 'number2.length': {
+ handler(newValue, oldValue) {
+ this.$forceUpdate()
+ },
+ deep: true,
+ immediate: true,
+ },
+ // 'number.length': {
+ // handler(newValue, oldValue) {
+ // this.$forceUpdate()
+ // },
+ // deep: true,
+ // immediate: true,
+ // },
+ },
+ created() {},
+ mounted() {
+ // dropdownValue = topContent.find(r => r.code === 'SB001').main_cycle
},
- mounted() {
-
- },
methods: {
- onClickleft(){
+ onSelectSheet(val) {
+ dropdownValue = val
+ this.$forceUpdate()
+ this.sheetFlag = false
+ },
+ submit() {
+ let children = []
+ centerContent.forEach(item => {
+ children.push({
+ seq: item.seq,
+ itemcode: item.code,
+ cycle: item.main_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).eapmai_code,
+ result: resultValue,
+ children: children
+ }
+
+ console.log(data, 1)
+
+ const params = {
+ username: localStorage.getItem('username'),
+ maintcyc: dropdownValue
+ }
+
+// vant.Notify(JSON.stringify(params))
+// vant.Toast(JSON.stringify(data))
+ post('AppDeviceManage/AppDeviceRepairSave' + formatParams(params), 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
+ this.$forceUpdate()
+ get('AppDeviceManage/RepairSelectScanDeviceQrCodeItem', {
+ eqpcode: code
+ }).then(res => {
+ if (res.code === '200') {
+
+ dropdownValue = topContent.find(r => r.code === code).main_cycle
+
+ centerContent = res.data
+ centerContent.forEach(item => {
+ item.isDisabled = item.isscan === 'Y'
+ item.inputValue = ''
+ item.isOK = item.isscan !== 'Y' ? 'OK' : ''
+ })
+ if (centerContent.every(r => r.isOK === 'OK')) {
+ resultValue = 'OK'
+ }
+ if (centerContent.some(r => r.isOK === 'NG')) {
+ resultValue = 'NG'
+ }
+ if (centerContent.some(r => r.isOK === '')) {
+ resultValue = ''
+ }
+
+ this.$forceUpdate()
+ }
+ })
+ },
+
+ resultClick(val) {
+ resultValue = val
+ this.$forceUpdate()
+ },
+
+ selected(id) {
+ alert(id)
+ },
+
+ // 鎵弿淇濆吇宸ヤ綅鎵弿
+ topScanClick() {
+ createWithoutTitle('../../components/barcode_scan.html', {
+ titleNView: {
+ type: 'float',
+ backgroundColor: 'rgba(215,75,40,0.3)',
+ titleText: '鎵竴鎵�',
+ titleColor: '#FFFFFF',
+ autoBackButton: true,
+ buttons: [{
+ fontSrc: '_www/helloh5.ttf',
+ text: '\ue302',
+ fontSize: '18px',
+ onclick: 'javascript:scanPicture()'
+ }]
+ }
+ });
+ },
+ // 淇濆吇椤圭洰鍐呭鎵弿
+ centerScanClick(code) {
+ bwcode = code
+ createWithoutTitle('../../components/barcode_scan2.html', {
+ titleNView: {
+ type: 'float',
+ backgroundColor: 'rgba(215,75,40,0.3)',
+ titleText: '鎵竴鎵�',
+ titleColor: '#FFFFFF',
+ autoBackButton: true,
+ buttons: [{
+ fontSrc: '_www/helloh5.ttf',
+ text: '\ue302',
+ fontSize: '18px',
+ onclick: 'javascript:scanPicture()'
+ }]
+ }
+ });
+ },
+
+ // 閮ㄤ綅姝e父 寮傚父鎸夐挳鐐瑰嚮
+ bwClick(item, val) {
+ item.isOK = val
+ if (centerContent.every(item => item.isOK !== '')) {
+ if (centerContent.every(item => item.isOK === 'OK')) {
+ resultValue = 'OK'
+ } else {
+ resultValue = 'NG'
+ }
+ }
+ this.$forceUpdate() //寮哄埗瑙嗗浘鏇存柊
+ },
+ onClickleft() {
history.back()
},
onClickRight() {
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
},
}
})
</script>
<style type="text/css">
+ @import url('../../css/global.css');
+
body {
background-color: #fff;
}
.body {
- height: 600px;
+ min-height: 600px;
background-color: grey;
margin-top: 0px;
background-color: #fff;
- position: relative;
+ position: relative;
}
.van-nav-bar__content {
@@ -107,8 +603,43 @@
color: #fff;
letter-spacing: 2px;
}
- .van-nav-bar__arrow{
+
+ .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>
\ No newline at end of file
+</html>
diff --git a/unpackage/cache/wgt/H5EDA0853/pages/sbgl/rcdj.html b/unpackage/cache/wgt/H5EDA0853/pages/sbgl/rcdj.html
index 51480a0..1eef026 100644
--- a/unpackage/cache/wgt/H5EDA0853/pages/sbgl/rcdj.html
+++ b/unpackage/cache/wgt/H5EDA0853/pages/sbgl/rcdj.html
@@ -19,10 +19,20 @@
<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">
var topContent = [
+
+ // {
+ // code: 'SB003',
+ // name: '榻胯疆绠辩粍',
+ // wksp_code: "CJ002",
+ // wksp_name: '瑁呴厤杞﹂棿',
+ // eqpchkmain_code: "djbz002"
+ // },
// {
// code: 'SB001',
// name: '榻胯疆绠辩粍',
@@ -30,13 +40,6 @@
// wksp_name: '瑁呴厤杞﹂棿',
// eqpchkmain_code: "djbz002"
// },
- // {
- // code: 'SB003',
- // name: '榻胯疆绠辩粍',
- // wksp_code: "CJ002",
- // wksp_name: '瑁呴厤杞﹂棿',
- // eqpchkmain_code: "djbz002"
- // },
];
var centerContent = [
@@ -54,17 +57,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 +101,7 @@
}
-
+ // 鎵弿鐐规椤圭洰鍐呭杩斿洖鏃舵墽琛屾柟娉�
function scaned2(r) {
if (bwcode === r) {
centerContent.forEach(item => {
@@ -131,7 +134,6 @@
}
}
-
function topContentClcik(code) {
radioValue = code
@@ -246,8 +248,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>
@@ -345,19 +347,19 @@
immediate: true,
},
- 'topContent.length': {
- handler(newValue, oldValue) {
- if (newValue !== oldValue) {
- this.$forceUpdate()
- // if (topContent[0]&&topContent[0].code) {
- // this.$forceUpdate()
- // this.topContentClcik(topContent[0].code)
- // }
- }
- },
- deep: true,
- immediate: true,
- },
+ // 'topContent.length': {
+ // handler(newValue, oldValue) {
+ // if (newValue !== oldValue) {
+ // this.$forceUpdate()
+ // // if (topContent[0]&&topContent[0].code) {
+ // // this.$forceUpdate()
+ // // this.topContentClcik(topContent[0].code)
+ // // }
+ // }
+ // },
+ // deep: true,
+ // immediate: true,
+ // },
'number2.length': {
handler(newValue, oldValue) {
this.$forceUpdate()
@@ -365,19 +367,65 @@
deep: true,
immediate: true,
},
- 'number.length': {
- handler(newValue, oldValue) {
- this.$forceUpdate()
- },
- deep: true,
- immediate: true,
- },
+ // 'number.length': {
+ // handler(newValue, oldValue) {
+ // this.$forceUpdate()
+ // },
+ // deep: true,
+ // immediate: true,
+ // },
},
created() {},
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 +521,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
},
}
diff --git a/unpackage/cache/wgt/H5EDA0853/pages/test/test1.html b/unpackage/cache/wgt/H5EDA0853/pages/test/test1.html
index 2c57e0e..1884224 100644
--- a/unpackage/cache/wgt/H5EDA0853/pages/test/test1.html
+++ b/unpackage/cache/wgt/H5EDA0853/pages/test/test1.html
@@ -83,6 +83,10 @@
<van-button type="primary">娴呰壊椋庢牸</van-button>
</template>
</van-popover>
+
+ <van-dropdown-menu :overlay="false" style="width: 100px;">
+ <van-dropdown-item style="width: 100px;" v-model="value1" :options="option1" />
+ </van-dropdown-menu>
</div>
</div>
</body>
@@ -108,6 +112,18 @@
}, {
text: '閫夐」涓�'
}],
+ value1: 0,
+ // value2: 'a',
+ option1: [
+ { text: '鍏ㄩ儴鍟嗗搧', value: 0 },
+ { text: '鏂版鍟嗗搧', value: 1 },
+ { text: '娲诲姩鍟嗗搧', value: 2 },
+ ],
+ // option2: [
+ // { text: '榛樿鎺掑簭', value: 'a' },
+ // { text: '濂借瘎鎺掑簭', value: 'b' },
+ // { text: '閿�閲忔帓搴�', value: 'c' },
+ // ],
}
},
created() {
@@ -117,6 +133,7 @@
// console.log(vant.Toast('xxx'))
},
methods: {
+
onSelect(action) {
Toast(action.text);
},
diff --git a/unpackage/cache/wgt/H5EDA0853/pages/xtsy/index.html b/unpackage/cache/wgt/H5EDA0853/pages/xtsy/index.html
index aec973f..453a6f7 100644
--- a/unpackage/cache/wgt/H5EDA0853/pages/xtsy/index.html
+++ b/unpackage/cache/wgt/H5EDA0853/pages/xtsy/index.html
@@ -21,6 +21,7 @@
<link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" />
+ <script type="text/javascript" src="../../js/global.js"></script>
</head>
<body>
@@ -150,7 +151,13 @@
},
// 椤堕儴鍙冲浘鏍囦笅鎷夐�夋嫨
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