已修改10个文件
已删除2个文件
已添加7个文件
已重命名1个文件
| | |
| | | body { |
| | | background-color: #eff0f1; |
| | | /* background-color: #DDDDDD; */ |
| | | } |
| | | |
| | | |
| | | .body { |
| | | min-height: 600px; |
| | | margin-top: 0px; |
| | | position: relative; |
| | | } |
| | | |
| | | .van-nav-bar__content { |
| | | background-color: #2651d8; |
| | | height: 44px; |
| | | } |
| | | |
| | | .van-nav-bar__title { |
| | | color: #fff; |
| | | letter-spacing: 2px; |
| | | } |
| | | |
| | | |
| | | .vanFieldInput { |
| | | height: 36px; |
| | | line-height: 36px; |
| | | align-items: center; |
| | | border: 1px solid #ddd !important; |
| | | border-radius: 5px; |
| | | padding: 0; |
| | | padding-left: 10px; |
| | | margin: 5px 0; |
| | | } |
| | | .vanFieldInputArea{ |
| | | height: 72px; |
| | | line-height: 24px; |
| | | align-items: center; |
| | | border: 1px solid #ddd !important; |
| | | border-radius: 5px; |
| | | padding: 0; |
| | | padding-left: 10px; |
| | | margin: 5px 0; |
| | | } |
| | | |
| | | .vanButtonInfo { |
| | | width: 100%; |
| | | letter-spacing: 2px; |
| | | height: 50px; |
| | | border-radius: 5px; |
| | | font-size: 18px; |
| | | margin-bottom: 2px; |
| | | } |
| | | |
| | | .buttonSmall { |
| | | border-radius: 5px; |
| | | } |
| | | |
| | | .van-nav-bar__arrow { |
| | | color: #fff !important; |
| | | } |
| | | |
| | | .head { |
| | | background-color: aliceblue; |
| | | /* background-color: aliceblue; */ |
| | | background-color: #fff; |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | margin: 5px 8px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | border-radius: 10px; |
| | | } |
| | | |
| | | .head_block { |
| | |
| | | width: 5px; |
| | | height: 20px; |
| | | background-color: red; |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .head_title { |
| | |
| | | .center_title{ |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | .center_border { |
| | | border: 1px solid #ccc; |
| | | min-height: 50px; |
| | |
| | | .footer { |
| | | position: fixed; |
| | | bottom: 0; |
| | | background-color: aliceblue; |
| | | background-color: #fff; |
| | | border-radius: 10px; |
| | | min-height: 100px; |
| | | padding-top: 10px; |
| | | margin: 5px 8px 0; |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | |
| | | .sacnBody { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .scanImg { |
| | | width: 128px; |
| | | height: 128px; |
| | | border-radius: 50%; |
| | | margin: 200px auto 20px; |
| | | background: url(".././static/images/scan.png") no-repeat; |
| | | box-shadow: #436df5 0px 0px 28px; |
| | | } |
| | | |
| | | .scanText { |
| | | margin: auto; |
| | | color: #000ccc; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .head { |
| | | background-color: aliceblue; |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | margin: 5px 8px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .head_block { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .head_left { |
| | | display: flex; |
| | | } |
| | | |
| | | .head_bar { |
| | | width: 5px; |
| | | height: 20px; |
| | | background-color: red; |
| | | } |
| | | |
| | | .head_title { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | |
| | | .flex_column { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .flex_between { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .flex_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .center_title{ |
| | | font-weight: bolder; |
| | | } |
| | | .center_border { |
| | | border: 1px solid #ccc; |
| | | min-height: 50px; |
| | | border-radius: 5px; |
| | | margin: 15px 0 0 0; |
| | | padding: 5px 0px 5px 10px; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | .footer { |
| | | position: fixed; |
| | | bottom: 0; |
| | | background-color: aliceblue; |
| | | min-height: 100px; |
| | | padding-top: 10px; |
| | | margin: 5px 8px 0; |
| | | width: 96%; |
| | | padding-bottom: 10px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | |
| | | </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 v-else> |
| | | |
| | | <div class="head"> |
| | | <div class="head_block"> |
| | | <div class="head_left"> |
| | |
| | | |
| | | <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">æ£å¸¸</van-button> |
| | | :plain="item.isOK!=='OK'" @click="bwClick(item,'OK')" type="primary">æ£å¸¸ |
| | | </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 style=""> |
| | | |
| | | <div class="footer"> |
| | | <div class="head_block" style="margin-bottom: 20rpx;align-items: center;"> |
| | | <div class="head_left"> |
| | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | |
| | | </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> |
| | |
| | | |
| | | <script type="text/javascript"> |
| | | var topContent = [ |
| | | |
| | | // { |
| | | // code: 'SB003', |
| | | // name: '齿轮箱ç»', |
| | |
| | | </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 v-else> |
| | | <div class="head"> |
| | | <div class="head_block"> |
| | | <div class="head_left"> |
| | |
| | | |
| | | <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">æ£å¸¸</van-button> |
| | | :plain="item.isOK!=='OK'" @click="bwClick(item,'OK')" type="primary">æ£å¸¸ |
| | | </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 style=""> |
| | | <div class="footer"> |
| | | <div class="head_block" style="margin-bottom: 20rpx;align-items: center;"> |
| | | <div class="head_left"> |
| | |
| | | </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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> |
| | | <meta name="HandheldFriendly" content="true" /> |
| | | <meta name="MobileOptimized" content="320" /> |
| | | <title>æ°å¯è¿ªå¶é äºå¹³å°</title> |
| | | |
| | | <!-- å¼å
¥æ ·å¼æä»¶ --> |
| | | <link rel="stylesheet" href="../../css/vant.css" /> |
| | | <!-- å¼å
¥ Vue å Vant ç JS æä»¶ --> |
| | | <script src="../../js/vue.min.js"></script> |
| | | <script src="../../js/vant.min.js"></script> |
| | | |
| | | <script type="text/javascript" src="../../js/jquery-1.6.4.min.js"></script> |
| | | <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> |
| | | |
| | | <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: '齿轮箱ç»', |
| | | // wksp_code: "CJ002", |
| | | // wksp_name: 'è£
é
车é´', |
| | | // eqpchkmain_code: "djbz002" |
| | | // }, |
| | | ]; |
| | | |
| | | var centerContent = [ |
| | | // { |
| | | // checkdesc: 'æ°åæ£å¸¸10å¸ï¼æé«ä¸è¶
è¿10.5å¸ï¼æä½ä¸ä½äº9.7', |
| | | // code: 'BW003', |
| | | // name: 'é¨ä½3', |
| | | // seq: 2, |
| | | // cycle: 'D', |
| | | // isscan: 'N', |
| | | // isOK: 'OK', |
| | | // inputValue: '', |
| | | // isDisabled: false, |
| | | // }, |
| | | ] |
| | | |
| | | |
| | | let radioValue = '' //åéæ¡éä¸ç项 |
| | | |
| | | let resultValue = '' //ç¹æ£ç»æ |
| | | |
| | | |
| | | 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/CheckScanDeviceQrCodeData', { |
| | | 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/SelectScanDeviceQrCodeItem', { |
| | | eqpcode: code |
| | | }).then(res => { |
| | | if (res.code === '200') { |
| | | 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"> |
| | | |
| | | <div class="body"> |
| | | |
| | | <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 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> |
| | | |
| | | |
| | | <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">æ£å¸¸</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.checkdesc}} |
| | | </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"> |
| | | æ£å¸¸</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" /> |
| | | |
| | | |
| | | </div> |
| | | </body> |
| | | <script> |
| | | var app = new Vue({ |
| | | el: '#app', |
| | | data: function() { |
| | | return { |
| | | overlayShow: false, |
| | | showPopover: false, |
| | | actions: [{ |
| | | icon: 'description', |
| | | text: 'æä½æå¯¼' |
| | | }, { |
| | | icon: 'award-o', |
| | | text: 'æå追溯' |
| | | }, { |
| | | icon: 'revoke', |
| | | text: 'éåºç»å½' |
| | | }], |
| | | topContent2: topContent, |
| | | centerContent2: centerContent, |
| | | number2: number |
| | | } |
| | | }, |
| | | 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() {}, |
| | | methods: { |
| | | submit() { |
| | | 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 |
| | | } |
| | | 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 |
| | | this.$forceUpdate() |
| | | get('AppDeviceManage/SelectScanDeviceQrCodeItem', { |
| | | eqpcode: code |
| | | }).then(res => { |
| | | if (res.code === '200') { |
| | | 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() |
| | | }, |
| | | // æ«æç¹æ£å·¥ä½æ«æ |
| | | 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()' |
| | | }] |
| | | } |
| | | }); |
| | | }, |
| | | // é¨ä½æ£å¸¸ å¼å¸¸æé®ç¹å» |
| | | 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) { |
| | | 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 { |
| | | 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> |
| | |
| | | |
| | | <script type="text/javascript"> |
| | | var topContent = [ |
| | | |
| | | // { |
| | | // code: 'SB003', |
| | | // name: '齿轮箱ç»', |
| | | // wksp_code: "CJ002", |
| | | // wksp_name: 'è£
é
车é´', |
| | | // eqpchkmain_code: "djbz002" |
| | | // }, |
| | | { |
| | | code: 'SB003', |
| | | name: '齿轮箱ç»', |
| | | wksp_code: "CJ002", |
| | | wksp_name: 'è£
é
车é´', |
| | | eqpchkmain_code: "djbz002" |
| | | }, |
| | | // { |
| | | // code: 'SB001', |
| | | // name: '齿轮箱ç»', |
| | |
| | | |
| | | |
| | | <div style="display:flex;flex-direction: column;width: 96%;margin: auto;"> |
| | | <van-field v-model="messageDescr" rows="2" autosize type="textarea" placeholder="请è¾å
¥" /> |
| | | <van-field class="vanFieldInputArea" v-model="messageDescr" rows="2" autosize type="textarea" placeholder="请è¾å
¥" /> |
| | | </div> |
| | | <div style="width: 96%;margin: auto;margin-top: 10px;"> |
| | | <van-uploader @oversize="onOversize" :before-read="beforeRead" v-model="fileList" |
| | |
| | | </div> |
| | | |
| | | <div style="display:flex;flex-direction: column;width: 96%;margin: auto;"> |
| | | <van-field v-model="messageContent" rows="2" autosize type="textarea" placeholder="请è¾å
¥" /> |
| | | <van-field class="vanFieldInputArea" v-model="messageContent" rows="2" autosize type="textarea" placeholder="请è¾å
¥" /> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | |
| | | |
| | | <div style="display:flex;flex-direction: column;width: 96%;margin: auto;"> |
| | | <van-field v-model="messageDescr2" rows="2" autosize type="textarea" placeholder="请è¾å
¥" /> |
| | | <van-field class="vanFieldInputArea" v-model="messageDescr2" rows="2" autosize type="textarea" placeholder="请è¾å
¥" /> |
| | | </div> |
| | | <div style="width: 96%;margin: auto;margin-top: 10px;"> |
| | | <van-uploader :before-read="beforeRead" v-model="fileList2" :after-read="afterRead2" multiple |
| | |
| | | </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 { |
| | | width: 40px; |
| | | } |
| | | |
| | | .vanButtonInfo { |
| | | width: 100%; |
| | | letter-spacing: 2px; |
| | | height: 50px; |
| | | font-size: 18px; |
| | | /* margin-left: 0; */ |
| | | |
| | | } |
| | | </style> |
| | | </html> |
| | |
| | | </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 v-else> |
| | | <div class="head"> |
| | | <div class="head_block"> |
| | | <div class="head_left"> |
| | |
| | | |
| | | </div> |
| | | |
| | | |
| | | <div class="head" style="margin-bottom: 10px;padding-bottom: 10px;"> |
| | | <div class="head_block" style="margin-bottom:10px;"> |
| | | <div class="head_left"> |
| | |
| | | |
| | | |
| | | <div style="display:flex;flex-direction: column;width: 96%;margin: auto;"> |
| | | <van-field v-model="messageDescr" rows="2" autosize type="textarea" placeholder="请è¾å
¥" /> |
| | | <van-field class="vanFieldInputArea" v-model="messageDescr" rows="2" autosize type="textarea" placeholder="请è¾å
¥" /> |
| | | </div> |
| | | <div style="width: 96%;margin: auto;margin-top: 10px;"> |
| | | <van-uploader @oversize="onOversize" :before-read="beforeRead" v-model="fileList" |
| | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="footer" style="min-height:50px;"> |
| | | <div |
| | |
| | | 确认æäº¤</van-button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | |
| | |
| | | </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> |
| | |
| | | body { |
| | | background-color: #eff0f1; |
| | | /* background-color: #DDDDDD; */ |
| | | } |
| | | |
| | | |
| | | .body { |
| | | min-height: 600px; |
| | | margin-top: 0px; |
| | | position: relative; |
| | | } |
| | | |
| | | .van-nav-bar__content { |
| | | background-color: #2651d8; |
| | | height: 44px; |
| | | } |
| | | |
| | | .van-nav-bar__title { |
| | | color: #fff; |
| | | letter-spacing: 2px; |
| | | } |
| | | |
| | | |
| | | .vanFieldInput { |
| | | height: 36px; |
| | | line-height: 36px; |
| | | align-items: center; |
| | | border: 1px solid #ddd !important; |
| | | border-radius: 5px; |
| | | padding: 0; |
| | | padding-left: 10px; |
| | | margin: 5px 0; |
| | | } |
| | | .vanFieldInputArea{ |
| | | height: 72px; |
| | | line-height: 24px; |
| | | align-items: center; |
| | | border: 1px solid #ddd !important; |
| | | border-radius: 5px; |
| | | padding: 0; |
| | | padding-left: 10px; |
| | | margin: 5px 0; |
| | | } |
| | | |
| | | .vanButtonInfo { |
| | | width: 100%; |
| | | letter-spacing: 2px; |
| | | height: 50px; |
| | | border-radius: 5px; |
| | | font-size: 18px; |
| | | margin-bottom: 2px; |
| | | } |
| | | |
| | | .buttonSmall { |
| | | border-radius: 5px; |
| | | } |
| | | |
| | | .van-nav-bar__arrow { |
| | | color: #fff !important; |
| | | } |
| | | |
| | | .head { |
| | | background-color: aliceblue; |
| | | /* background-color: aliceblue; */ |
| | | background-color: #fff; |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | margin: 5px 8px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | border-radius: 10px; |
| | | } |
| | | |
| | | .head_block { |
| | |
| | | width: 5px; |
| | | height: 20px; |
| | | background-color: red; |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .head_title { |
| | |
| | | .center_title{ |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | .center_border { |
| | | border: 1px solid #ccc; |
| | | min-height: 50px; |
| | |
| | | .footer { |
| | | position: fixed; |
| | | bottom: 0; |
| | | background-color: aliceblue; |
| | | background-color: #fff; |
| | | border-radius: 10px; |
| | | min-height: 100px; |
| | | padding-top: 10px; |
| | | margin: 5px 8px 0; |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | |
| | | .sacnBody { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .scanImg { |
| | | width: 128px; |
| | | height: 128px; |
| | | border-radius: 50%; |
| | | margin: 200px auto 20px; |
| | | background: url(".././static/images/scan.png") no-repeat; |
| | | box-shadow: #436df5 0px 0px 28px; |
| | | } |
| | | |
| | | .scanText { |
| | | margin: auto; |
| | | color: #000ccc; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .head { |
| | | background-color: aliceblue; |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | margin: 5px 8px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .head_block { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .head_left { |
| | | display: flex; |
| | | } |
| | | |
| | | .head_bar { |
| | | width: 5px; |
| | | height: 20px; |
| | | background-color: red; |
| | | } |
| | | |
| | | .head_title { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | |
| | | .flex_column { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .flex_between { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .flex_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .center_title{ |
| | | font-weight: bolder; |
| | | } |
| | | .center_border { |
| | | border: 1px solid #ccc; |
| | | min-height: 50px; |
| | | border-radius: 5px; |
| | | margin: 15px 0 0 0; |
| | | padding: 5px 0px 5px 10px; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | .footer { |
| | | position: fixed; |
| | | bottom: 0; |
| | | background-color: aliceblue; |
| | | min-height: 100px; |
| | | padding-top: 10px; |
| | | margin: 5px 8px 0; |
| | | width: 96%; |
| | | padding-bottom: 10px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | |
| | | 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 = '' |
| | |
| | | </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 v-else> |
| | | |
| | | <div class="head"> |
| | | <div class="head_block"> |
| | |
| | | |
| | | <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">æ£å¸¸</van-button> |
| | | :plain="item.isOK!=='OK'" @click="bwClick(item,'OK')" type="primary">æ£å¸¸ |
| | | </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 style=""> |
| | | |
| | | <div class="footer"> |
| | | <div class="head_block" style="margin-bottom: 20rpx;align-items: center;"> |
| | | <div class="head_left"> |
| | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | // æ å¹´éæ© |
| | | onSelectSheet(val) { |
| | | dropdownValue = val |
| | | dropdownValue = val.code |
| | | this.$forceUpdate() |
| | | this.sheetFlag = false |
| | | }, |
| | | //æäº¤ |
| | | submit() { |
| | | let children = [] |
| | | centerContent.forEach(item => { |
| | |
| | | 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') { |
| | |
| | | vanFieldBlur() { |
| | | this.$forceUpdate() |
| | | }, |
| | | //æ«æä¿å
»å·¥ä½ç¹å»ä¸å鿩项 |
| | | topContentClcik(code) { |
| | | radioValue = code |
| | | this.$forceUpdate() |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | //ä¿å
»ç»æç¹å» |
| | | resultClick(val) { |
| | | resultValue = val |
| | | this.$forceUpdate() |
| | | }, |
| | | |
| | | selected(id) { |
| | | alert(id) |
| | | }, |
| | | |
| | | // æ«æä¿å
»å·¥ä½æ«æ |
| | | topScanClick() { |
| | | createWithoutTitle('../../components/barcode_scan.html', { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // é¨ä½æ£å¸¸ å¼å¸¸æé®ç¹å» |
| | | bwClick(item, val) { |
| | | item.isOK = val |
| | |
| | | </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> |
| | |
| | | |
| | | <script type="text/javascript"> |
| | | var topContent = [ |
| | | |
| | | // { |
| | | // code: 'SB003', |
| | | // name: '齿轮箱ç»', |
| | |
| | | }).then(res => { |
| | | if (res.code === '200') { |
| | | 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 = '' |
| | |
| | | </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 v-else> |
| | | <div class="head"> |
| | | <div class="head_block"> |
| | | <div class="head_left"> |
| | |
| | | |
| | | <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">æ£å¸¸</van-button> |
| | | :plain="item.isOK!=='OK'" @click="bwClick(item,'OK')" type="primary">æ£å¸¸ |
| | | </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 style=""> |
| | | <div class="footer"> |
| | | <div class="head_block" style="margin-bottom: 20rpx;align-items: center;"> |
| | | <div class="head_left"> |
| | |
| | | result: resultValue, |
| | | children: children |
| | | } |
| | | |
| | | console.log(data, 1) |
| | | |
| | | post('AppDeviceManage/AppDeviceCheckSave?username=' + localStorage.getItem('username'), data) |
| | | .then(res => { |
| | | if (res.code === '200') { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | resultClick(val) { |
| | | resultValue = val |
| | | this.$forceUpdate() |
| | | }, |
| | | |
| | | selected(id) { |
| | | alert(id) |
| | | }, |
| | | |
| | | // æ«æç¹æ£å·¥ä½æ«æ |
| | | topScanClick() { |
| | | createWithoutTitle('../../components/barcode_scan.html', { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // é¨ä½æ£å¸¸ å¼å¸¸æé®ç¹å» |
| | | bwClick(item, val) { |
| | | item.isOK = val |
| | |
| | | </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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> |
| | | <meta name="HandheldFriendly" content="true" /> |
| | | <meta name="MobileOptimized" content="320" /> |
| | | <title>æ°å¯è¿ªå¶é äºå¹³å°</title> |
| | | |
| | | <!-- å¼å
¥æ ·å¼æä»¶ --> |
| | | <link rel="stylesheet" href="../../css/vant.css" /> |
| | | <!-- å¼å
¥ Vue å Vant ç JS æä»¶ --> |
| | | <script src="../../js/vue.min.js"></script> |
| | | <script src="../../js/vant.min.js"></script> |
| | | |
| | | <script type="text/javascript" src="../../js/jquery-1.6.4.min.js"></script> |
| | | <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> |
| | | |
| | | <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: '齿轮箱ç»', |
| | | // wksp_code: "CJ002", |
| | | // wksp_name: 'è£
é
车é´', |
| | | // eqpchkmain_code: "djbz002" |
| | | // }, |
| | | ]; |
| | | |
| | | var centerContent = [ |
| | | // { |
| | | // checkdesc: 'æ°åæ£å¸¸10å¸ï¼æé«ä¸è¶
è¿10.5å¸ï¼æä½ä¸ä½äº9.7', |
| | | // code: 'BW003', |
| | | // name: 'é¨ä½3', |
| | | // seq: 2, |
| | | // cycle: 'D', |
| | | // isscan: 'N', |
| | | // isOK: 'OK', |
| | | // inputValue: '', |
| | | // isDisabled: false, |
| | | // }, |
| | | ] |
| | | |
| | | |
| | | let radioValue = '' //åéæ¡éä¸ç项 |
| | | |
| | | let resultValue = '' //ç¹æ£ç»æ |
| | | |
| | | |
| | | 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/CheckScanDeviceQrCodeData', { |
| | | 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/SelectScanDeviceQrCodeItem', { |
| | | eqpcode: code |
| | | }).then(res => { |
| | | if (res.code === '200') { |
| | | 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"> |
| | | |
| | | <div class="body"> |
| | | |
| | | <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 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> |
| | | |
| | | |
| | | <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">æ£å¸¸</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.checkdesc}} |
| | | </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"> |
| | | æ£å¸¸</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" /> |
| | | |
| | | |
| | | </div> |
| | | </body> |
| | | <script> |
| | | var app = new Vue({ |
| | | el: '#app', |
| | | data: function() { |
| | | return { |
| | | overlayShow: false, |
| | | showPopover: false, |
| | | actions: [{ |
| | | icon: 'description', |
| | | text: 'æä½æå¯¼' |
| | | }, { |
| | | icon: 'award-o', |
| | | text: 'æå追溯' |
| | | }, { |
| | | icon: 'revoke', |
| | | text: 'éåºç»å½' |
| | | }], |
| | | topContent2: topContent, |
| | | centerContent2: centerContent, |
| | | number2: number |
| | | } |
| | | }, |
| | | 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() {}, |
| | | methods: { |
| | | submit() { |
| | | 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 |
| | | } |
| | | 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 |
| | | this.$forceUpdate() |
| | | get('AppDeviceManage/SelectScanDeviceQrCodeItem', { |
| | | eqpcode: code |
| | | }).then(res => { |
| | | if (res.code === '200') { |
| | | 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() |
| | | }, |
| | | // æ«æç¹æ£å·¥ä½æ«æ |
| | | 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()' |
| | | }] |
| | | } |
| | | }); |
| | | }, |
| | | // é¨ä½æ£å¸¸ å¼å¸¸æé®ç¹å» |
| | | 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) { |
| | | 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 { |
| | | 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> |
| | |
| | | <meta name="HandheldFriendly" content="true" /> |
| | | <meta name="MobileOptimized" content="320" /> |
| | | <title>æ°å¯è¿ªå¶é äºå¹³å°</title> |
| | | <!-- å¼å
¥åç´ è½¬æ¢ px->rpx --> |
| | | <!-- <script src="../../js/rpx4html.js"></script> --> |
| | | |
| | | <!-- å¼å
¥æ ·å¼æä»¶ --> |
| | | <link rel="stylesheet" href="../../css/vant.css" /> |
| | |
| | | <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: 'SB003', |
| | | // name: '齿轮箱ç»', |
| | | // wksp_code: "CJ002", |
| | | // wksp_name: 'è£
é
车é´', |
| | | // eqpchkmain_code: "djbz002" |
| | | // }, |
| | | // { |
| | | // code: 'SB001', |
| | | // name: '齿轮箱ç»', |
| | | // wksp_code: "CJ002", |
| | | // wksp_name: 'è£
é
车é´', |
| | | // eqpchkmain_code: "djbz002" |
| | | // }, |
| | | ]; |
| | | |
| | | |
| | | |
| | | |
| | | let radioValue = '' //åéæ¡éä¸ç项 |
| | | |
| | | |
| | | // æ«æç¹æ£å·¥ä½è¿åæ¶æ§è¡æ¹æ³ |
| | | 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/CheckScanDeviceQrCodeData', { |
| | | // 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 topContentClcik(code) { |
| | | |
| | | } |
| | | </script> |
| | | </head> |
| | | <!-- <body onload="loadNodes()"> --> |
| | | <body> |
| | | <div id="app"> |
| | | |
| | |
| | | </template> |
| | | </van-nav-bar> |
| | | |
| | | |
| | | <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: 10px;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> |
| | | |
| | | |
| | | |
| | | <div style="display:flex;flex-direction: column;width: 96%;margin: auto;"> |
| | | <van-field v-model="messageDescr" rows="2" autosize type="textarea" placeholder="请è¾å
¥" /> |
| | | </div> |
| | | <div style="width: 96%;margin: auto;margin-top: 10px;"> |
| | | <van-uploader @oversize="onOversize" :before-read="beforeRead" v-model="fileList" |
| | | :after-read="afterRead" multiple :max-count="3" /> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | |
| | | <div class="head" style="margin-bottom: 10px;padding-bottom: 10px;overflow-y: ;"> |
| | | <div class="head_block"> |
| | | <div class="head_left"> |
| | | <div class="head_bar"></div> |
| | | <div class="head_title"> |
| | | åæºç»´ä¿® |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="margin-right: 10px;"> |
| | | <div class="flex_center" style="width: 100%;display: flex;justify-content: space-around;"> |
| | | <van-button class="buttonSmall" size="small" :plain="isStop!=='Y'" |
| | | style="margin-right: 10px;" @click="isStopClick('Y')" type="primary"> |
| | | æ¯</van-button> |
| | | <van-button class="buttonSmall" size="small" :plain="isStop!=='N'" |
| | | @click="isStopClick('N')" type="danger">å¦</van-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="head" v-if="isStop==='N'" style="margin-bottom: 10px;padding-bottom: 10px;overflow-y: ;"> |
| | | <div class="head_block" style="margin-bottom:10px;"> |
| | | <div class="head_left"> |
| | | <div class="head_bar"></div> |
| | | <div class="head_title"> |
| | | ç»´ä¿®å
容 |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="display:flex;flex-direction: column;width: 96%;margin: auto;"> |
| | | <van-field v-model="messageContent" rows="2" autosize type="textarea" placeholder="请è¾å
¥" /> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="head" v-if="isStop==='N'" style="margin-bottom: 10px;padding-bottom: 70px;overflow-y: ;"> |
| | | <div class="head_block" style="margin-bottom:10px;"> |
| | | <div class="head_left"> |
| | | <div class="head_bar"></div> |
| | | <div class="head_title"> |
| | | æ´æ¢å¤ä»¶ |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div style="display:flex;flex-direction: column;width: 96%;margin: auto;"> |
| | | <van-field v-model="messageDescr2" rows="2" autosize type="textarea" placeholder="请è¾å
¥" /> |
| | | </div> |
| | | <div style="width: 96%;margin: auto;margin-top: 10px;"> |
| | | <van-uploader :before-read="beforeRead" v-model="fileList2" :after-read="afterRead2" multiple |
| | | :max-count="3" /> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | <div class="footer" style="min-height:50px;"> |
| | | <div |
| | | style="position:fixed;bottom: 0;width: 96%;display: flex;justify-content: center;flex-direction: column;align-items: center"> |
| | | <van-button class="vanButtonInfo" @click="submit" type="info"> |
| | | 确认æäº¤</van-button> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | |
| | | <van-overlay :show="overlayShow" @click="overlayShow=false" /> |
| | | |
| | |
| | | icon: 'revoke', |
| | | text: 'éåºç»å½' |
| | | }], |
| | | topContent2: topContent, |
| | | messageDescr: '', |
| | | fileList: [ |
| | | // { |
| | | // url: 'https://img01.yzcdn.cn/vant/leaf.jpg' |
| | | // }, |
| | | // Uploader æ ¹æ®æä»¶åç¼æ¥å¤ææ¯å¦ä¸ºå¾çæä»¶ |
| | | // 妿å¾ç URL ä¸ä¸å
å«ç±»åä¿¡æ¯ï¼å¯ä»¥æ·»å isImage æ è®°æ¥å£°æ |
| | | // { |
| | | // url: 'https://img01.yzcdn.cn/vant/leaf.jpg' |
| | | // }, |
| | | ], |
| | | isStop: 'Y', |
| | | messageContent: '', |
| | | messageDescr2: '', |
| | | fileList2: [], |
| | | photoList: [], |
| | | } |
| | | }, |
| | | 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) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | deep: true, |
| | | immediate: true, |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | created() {}, |
| | | mounted() {}, |
| | | methods: { |
| | | afterRead2(file) { |
| | | |
| | | }, |
| | | isStopClick(val) { |
| | | this.isStop = val |
| | | this.$forceUpdate() |
| | | }, |
| | | onOversize(file) { |
| | | console.log(file, 1); |
| | | this.$toast("æä»¶å¤§å°ä¸è½è¶
è¿5MB"); |
| | | }, |
| | | //æ ¡éªå¾ççæ ¼å¼ |
| | | beforeRead(file) { |
| | | if (!/(jpg|jpeg|png|JPG|PNG)/i.test(file.type)) { |
| | | this.$toast("请ä¸ä¼ æ£ç¡®æ ¼å¼çå¾ç"); |
| | | return false; |
| | | } |
| | | if (file.size > 100 * 1024 * 1024) { |
| | | this.$toast('å¾ç大å°ä¸è½è¶
è¿ 100MB'); |
| | | return false; |
| | | } |
| | | return true; |
| | | }, |
| | | afterRead(file) { |
| | | // æ¤æ¶å¯ä»¥èªè¡å°æä»¶ä¸ä¼ è³æå¡å¨ |
| | | |
| | | //å建FormData对象ãä¸ä¼ å¾çéè¦è½¬æ¢äºè¿å¶ï¼è¿éè¦ç¨å°FormData |
| | | let forms = new FormData(); |
| | | //"file"表示ç»åå°ä¼ ç屿§åå |
| | | forms.append("file", file.file); //è·åä¸ä¼ å¾çä¿¡æ¯ |
| | | |
| | | this.photoList = forms |
| | | }, |
| | | submit() { |
| | | // å¼åæ¶å¯¹FormData对象appendæ°æ®åæå°åºæ¥ä¸ºç©ºå¯¹è±¡ï¼å¼å§ä»¥ä¸ºæ¯æ²¡æappendè¿å»ï¼å®é
䏿¯FormData对象ä¸è½ç´æ¥ç¨console.log(formData)è¿è¡æå°ã |
| | | // å¦æè¦æå°ï¼å¯ä»¥ç¨ä¸é¢çæ¹å¼ï¼ |
| | | // for (var key of this.photoList.entries()) { |
| | | // console.log(key[0] + ', ' + key[1] ); |
| | | // } |
| | | |
| | | for (let [a, b] of this.photoList.entries()) { |
| | | console.log(a, ', ', b); |
| | | } |
| | | }, |
| | | 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()' |
| | | }] |
| | | } |
| | | }); |
| | | }, |
| | | // è¾å
¥æ¡å¤±ç¦è§¦åäºä»¶ |
| | | vanFieldBlur() { |
| | | this.$forceUpdate() |
| | | }, |
| | | topContentClcik(code) { |
| | | |
| | | }, |
| | | onClickleft(){ |
| | | history.back() |
| | | }, |
| | |
| | | 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; |
| | |
| | | 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 { |
| | | width: 40px; |
| | | } |
| | | |
| | | .vanButtonInfo { |
| | | width: 100%; |
| | | letter-spacing: 2px; |
| | | height: 50px; |
| | | font-size: 18px; |
| | | /* margin-left: 0; */ |
| | | |
| | | } |
| | | </style> |
| | | </html> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> |
| | | <meta name="HandheldFriendly" content="true" /> |
| | | <meta name="MobileOptimized" content="320" /> |
| | | <title>æ°å¯è¿ªå¶é äºå¹³å°</title> |
| | | |
| | | <!-- å¼å
¥æ ·å¼æä»¶ --> |
| | | <link rel="stylesheet" href="../../css/vant.css" /> |
| | | <!-- å¼å
¥ Vue å Vant ç JS æä»¶ --> |
| | | <script src="../../js/vue.min.js"></script> |
| | | <script src="../../js/vant.min.js"></script> |
| | | |
| | | <script type="text/javascript" src="../../js/jquery-1.6.4.min.js"></script> |
| | | <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> |
| | | |
| | | <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", |
| | | // }, |
| | | ]; |
| | | |
| | | let number = []; // åæ«ç 忥è§å¾æ´æ°ç¨ |
| | | |
| | | |
| | | let dropdownValue = 'V1'; //䏿é»è®¤éä¸çå¼ |
| | | |
| | | // æ«æç»´ä¿®å·¥ä½è¿åæ¶æ§è¡æ¹æ³ |
| | | function scaned(r) { |
| | | get('AppDeviceManage/MaintainScanDeviceApplyQrCodeData', { |
| | | eqpcode: r |
| | | }).then(res => { |
| | | topContent = res.data |
| | | number.push({ |
| | | id: '1' |
| | | }) |
| | | }) |
| | | } |
| | | </script> |
| | | </head> |
| | | <!-- <body onload="loadNodes()"> --> |
| | | <body> |
| | | <div id="app"> |
| | | |
| | | <div class="body"> |
| | | |
| | | <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 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;"> |
| | | <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> |
| | | </div> |
| | | |
| | | <div class="head" :style="{marginTop:topContent.length===0?'100px':'0'}" |
| | | style="margin-bottom: 10px;padding-bottom: 10px;"> |
| | | <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-button @click="sheetFlag=true" type="info" style="width:100px;height: 30px;"> |
| | | {{dropdownValue==='V1'?'设å¤ç¹æ£':'设å¤ç¹æ£2'}} |
| | | </van-button> |
| | | <van-action-sheet v-model="sheetFlag" :actions="actionsSheet" @select="onSelectSheet" /> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div class="head" style="margin-bottom: 10px;padding-bottom: 10px;"> |
| | | <div class="head_block" style="margin-bottom:10px;"> |
| | | <div class="head_left"> |
| | | <div class="head_bar"></div> |
| | | <div class="head_title"> |
| | | æ
éæè¿° |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div style="display:flex;flex-direction: column;width: 96%;margin: auto;"> |
| | | <van-field class="vanFieldInputArea" v-model="messageDescr" rows="2" autosize type="textarea" placeholder="请è¾å
¥" /> |
| | | </div> |
| | | <div style="width: 96%;margin: auto;margin-top: 10px;"> |
| | | <van-uploader @oversize="onOversize" :before-read="beforeRead" v-model="fileList" |
| | | :after-read="afterRead" multiple :max-count="3" /> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div class="footer" style="min-height:50px;"> |
| | | <div |
| | | style="position:fixed;bottom: 0;width: 96%;display: flex;justify-content: center;flex-direction: column;align-items: center"> |
| | | <van-button class="vanButtonInfo" :disabled="messageDescr.trim().toString().length===0" |
| | | @click="submit" type="info"> |
| | | 确认æäº¤</van-button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | |
| | | <van-overlay :show="overlayShow" @click="overlayShow=false" /> |
| | | |
| | | |
| | | </div> |
| | | </body> |
| | | <script> |
| | | var app = new Vue({ |
| | | el: '#app', |
| | | data: function() { |
| | | return { |
| | | overlayShow: false, |
| | | showPopover: false, |
| | | actions: [{ |
| | | icon: 'description', |
| | | text: 'æä½æå¯¼' |
| | | }, { |
| | | icon: 'award-o', |
| | | text: 'æå追溯' |
| | | }, { |
| | | icon: 'revoke', |
| | | text: 'éåºç»å½' |
| | | }], |
| | | actionsSheet: [{ |
| | | code: 'V1', |
| | | name: '设å¤ç¹æ£' |
| | | }, { |
| | | code: 'V2', |
| | | name: '设å¤ç¹æ£2' |
| | | }], |
| | | number2: number, |
| | | messageDescr: '', |
| | | fileList: [], |
| | | sheetFlag: false, |
| | | |
| | | } |
| | | }, |
| | | watch: { |
| | | 'number2.length': { |
| | | handler(newValue, oldValue) { |
| | | |
| | | console.log(111) |
| | | this.$forceUpdate() |
| | | |
| | | }, |
| | | deep: true, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | created() {}, |
| | | mounted() {}, |
| | | methods: { |
| | | onOversize(file) { |
| | | this.$toast("æä»¶å¤§å°ä¸è½è¶
è¿5MB"); |
| | | }, |
| | | afterRead(file) { |
| | | |
| | | }, |
| | | //æ ¡éªå¾ççæ ¼å¼ |
| | | beforeRead(file) { |
| | | if (!/(jpg|jpeg|png|JPG|PNG)/i.test(file.type)) { |
| | | this.$toast("请ä¸ä¼ æ£ç¡®æ ¼å¼çå¾ç"); |
| | | return false; |
| | | } |
| | | if (file.size > 100 * 1024 * 1024) { |
| | | this.$toast('å¾ç大å°ä¸è½è¶
è¿ 100MB'); |
| | | return false; |
| | | } |
| | | return true; |
| | | }, |
| | | onSelectSheet(val) { |
| | | dropdownValue = val.code |
| | | this.sheetFlag = false |
| | | this.$forceUpdate() |
| | | |
| | | }, |
| | | //æäº¤ |
| | | submit() { |
| | | |
| | | }, |
| | | // è¾å
¥æ¡å¤±ç¦è§¦åäºä»¶ |
| | | vanFieldBlur() { |
| | | this.$forceUpdate() |
| | | }, |
| | | // æ«æä¿å
»å·¥ä½æ«æ |
| | | 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()' |
| | | }] |
| | | } |
| | | }); |
| | | }, |
| | | onClickleft() { |
| | | history.back() |
| | | }, |
| | | onClickRight() { |
| | | this.overlayShow = true |
| | | }, |
| | | onSelect(action) { |
| | | 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'); |
| | | </style> |
| | | </html> |
| | |
| | | |
| | | <van-nav-bar title="å·¥ä½å°" @click-right="onClickRight"> |
| | | <template #right> |
| | | <van-popover placement="bottom-end" :offset="[13,8]" v-model="showPopover" |
| | | trigger="click" :actions="actions" @select="onSelect"> |
| | | <van-popover 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> |
| | |
| | | url = '../sbgl/dqby.html' |
| | | break; |
| | | case '2042': |
| | | url = '../sbgl/sbwx.html' |
| | | url = '../sbgl/wxsq.html' |
| | | break; |
| | | case '2043': |
| | | url = '../sbgl/sbwx.html' |
| | | break; |
| | | case '2044': |
| | | url = '../sbgl/wxyz.html' |
| | | break; |
| | | } |