From 6a2d4d78c1bed623cc37c0d6d49d9d6da4e1f31d Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 19 十月 2022 14:12:06 +0800
Subject: [PATCH] 1.安灯呼叫静态页面实现
---
unpackage/cache/wgt/H5EDA0853/pages/sbgl/wxsq.html | 18
pages/other/wdxx.html | 14
pages/sbgl/rcdj.html | 14
unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html | 6
pages/adgl/adhj.html | 325 ++++++++++++++++++++
unpackage/cache/wgt/H5EDA0853/css/global.css | 23 +
unpackage/cache/wgt/H5EDA0853/pages/other/wdxx.html | 14
unpackage/cache/wgt/H5EDA0853/pages/adgl/adxy.html | 29 +
pages/sbgl/dqby.html | 20
pages/adgl/adxy.html | 29 +
pages/sbgl/wxsq.html | 18
unpackage/cache/wgt/H5EDA0853/pages/test/template.html | 29 +
pages/test/template.html | 29 +
unpackage/cache/wgt/H5EDA0853/pages/adgl/adhj.html | 325 ++++++++++++++++++++
14 files changed, 770 insertions(+), 123 deletions(-)
diff --git a/pages/adgl/adhj.html b/pages/adgl/adhj.html
index c0fdffe..89577c6 100644
--- a/pages/adgl/adhj.html
+++ b/pages/adgl/adhj.html
@@ -17,8 +17,109 @@
<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" />
+
+ <!-- <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" /> -->
+
+
+ <script type="text/javascript">
+ let topContent = [{
+ code: 'SB001',
+ name: '鐢垫睜缁勪竴绾�',
+ wksp_code: "CJ002",
+ wksp_name: '鐢垫睜杞﹂棿',
+ "eqpchkmain_code": "djbz002"
+ },
+ {
+ code: 'SB003',
+ name: '榻胯疆绠辩粍涓�绾�',
+ wksp_code: "CJ001",
+ "wksp_name": "瑁呴厤杞﹂棿",
+ "eqpchkmain_code": "djbz002"
+ },
+ {
+ code: 'SB004',
+ name: '榻胯疆绠辩粍涓�绾�',
+ wksp_code: "CJ001",
+ "wksp_name": "瑁呴厤杞﹂棿",
+ "eqpchkmain_code": "djbz002"
+ },
+ // {
+ // code: 'SB005',
+ // name: '榻胯疆绠辩粍涓�绾�',
+ // wksp_code: "CJ001",
+ // "wksp_name": "瑁呴厤杞﹂棿",
+ // "eqpchkmain_code": "djbz002"
+ // },
+ ];
+
+ let radioValue = 'SB001' //鍗曢�夋閫変腑鐨勯」
+
+ let centerContent = [] //涓棿閮ㄥ垎鍐呭
+
+ let falseArray = [] // 鍋囨暟缁� 鍋氭壂鐮佸洖鏉ヨ鍥炬洿鏂扮敤
+
+ // 鎵弿淇濆吇宸ヤ綅杩斿洖鏃舵墽琛屾柟娉�
+ function scaned(r) {
+ radioValue = r
+
+ let temp = {}
+ let flag = false
+
+ if (topContent.find(i => i.code === radioValue)) {
+ topContent.forEach((item, index) => {
+ if (item.code === radioValue) {
+ temp = item
+ topContent.splice(index, 1)
+ flag = true
+ }
+ })
+ }
+
+ if (flag) { //瀵瑰凡鍦ㄥ垪琛ㄧ殑鏁版嵁 鎺掑簭鍒扮涓�涓幓
+ topContent.unshift(temp)
+ topScanClick(radioValue)
+ centerContentClick(radioValue, topContent.find(i => i.code === radioValue).wksp_code)
+ } else { //鏈湪鍒楄〃鐨勬暟鎹� 杩涜鏂板鎿嶄綔
+ topScanClick(radioValue)
+ centerContentClick(radioValue, topContent.find(i => i.code === radioValue).wksp_code)
+ }
+
+ falseArray.push({
+ id: '1'
+ })
+ }
+
+
+ function topScanClick(code) {
+ post('AppDeviceManage/AppDeviceAnDengCallScanSearch?eqpcode=' + code).then(res => {
+ if (res.code === '200') {
+ topContent.unshift(res.data[0])
+ falseArray.push({
+ id: '1'
+ })
+ }
+
+ })
+ }
+
+ function centerContentClick(code, wksp_code) {
+ const data = {
+ eqpcode: code,
+ wkshpcode: wksp_code
+ }
+ post('AppDeviceManage/AppDeviceAnDengCallItemSearch' + formatParams(data)).then(res => {
+ if (res.code === '200') {
+ centerContent = res.data
+ falseArray.push({
+ id: '1'
+ })
+ }
+ })
+ }
+ </script>
</head>
<body>
@@ -26,21 +127,111 @@
<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>
+ <van-sticky>
+ <van-nav-bar title="瀹夌伅鍛煎彨" @click-right="onClickRight" left-arrow @click-left="onClickleft">
+ <template #right>
+ <van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
+ trigger="click" :actions="actions" @select="onSelect">
+ <template #reference>
+ <van-icon name="bars" size='20' color='#fff' />
+ </template>
+ </van-popover>
+ </template>
+ </van-nav-bar>
+ </van-sticky>
+
+
+ <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" style="min-height: 100px;max-height: 260px; overflow: scroll;">
+ <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>
+
+
+ <van-radio-group v-model="radioValue">
+ <van-cell-group>
+ <div style="margin: 10px 0;" v-for="(item,index) in topContent" :key="item.eqpcode"
+ @click="topContentClcik(item.code,item.wksp_code)">
+ <div class="cellDiv">宸ヤ綅缂栫爜锛歿{item.code}}</div>
+ <van-cell :title="'宸ヤ綅鍚嶇О锛�'+item.name">
+ <template #right-icon>
+ <van-radio style="margin-right: 10px;" checked-color='red'
+ :name="item.code" />
+ </template>
+ </van-cell>
+ <div class="cellDiv">鐢熶骇杞﹂棿锛歿{item.wksp_name}}</div>
+
+ </div>
+ </van-cell-group>
+ </van-radio-group>
+ </div>
+
+
+ <div class="head" style="min-height: 100px;max-height: 260px; overflow: scroll;">
+ <div class="head_block">
+ <div class="head_left">
+ <div class="head_bar"></div>
+ <div class="head_title">
+ 閫夋嫨鍛煎彨绫诲瀷
+ </div>
+ </div>
+
+
+
+ </div>
+
+ <div style="padding: 10px;display: flex;flex-direction: column"
+ v-for="(item,index) in centerContent">
+ <div style="display: flex;justify-content: space-between;align-items: center;">
+ <div style="margin-left: 10px;">{{item.name}}</div>
+ <div style="margin-right: 10px;">
+ <van-switch size="24" v-model="item.flag" @change='val=>switchChange(val,item)'
+ active-color="#ee0a24" inactive-color="#dcdee0" />
+ </div>
+ </div>
+ </div>
+
+ </div>
+
+
+ <div
+ style="position:fixed;bottom: 0;width: 96%;margin-left:2%; flex;justify-content: center;flex-direction: column;align-items: center">
+ <van-button :load='submitIsDisabled' load-text="姝e湪鎻愪氦,璇风◢绛�..." class="vanButtonInfo"
+ @click="submit" type="info">
+ 纭鎻愪氦</van-button>
+ </div>
+
+ </div>
+
+
</div>
- <van-overlay :show="overlayShow" @click="overlayShow=false" />
+
+ </div>
+
+
+ <van-overlay :show="overlayShow" @click="overlayShow=false" />
</div>
@@ -50,6 +241,7 @@
el: '#app',
data: function() {
return {
+ submitIsDisabled: false,
overlayShow: false,
showPopover: false,
actions: [{
@@ -63,15 +255,120 @@
text: '閫�鍑虹櫥褰�'
}],
+ falseArray2: falseArray, //鍋囨暟缁�
+ // centerContent:[]
+
}
+ },
+ watch: {
+ 'falseArray2.length': {
+ handler(newValue, oldValue) {
+ this.$forceUpdate()
+ },
+ deep: true,
+ immediate: true,
+ },
},
created() {
},
mounted() {
+ const data = {
+ eqpcode: 'SB001',
+ wkshpcode: 'CJ002'
+ }
+ post('AppDeviceManage/AppDeviceAnDengCallItemSearch' + formatParams(data)).then(res => {
+ if (res.code === '200') {
+ centerContent = res.data
+ falseArray.push({
+ id: '1'
+ })
+ console.log(centerContent)
+ }
+ })
},
methods: {
+ submit() {
+ const data={
+ username:localStorage.getItem('username'),
+ eqpcode:topContent.find(i=>i.code===radioValue).code,
+ wkshpcode:topContent.find(i=>i.code===radioValue).wksp_code
+ }
+ const DATA=[]
+ centerContent.forEach(i=>{
+ if(i.flag){
+ i.flag=i.flag?'Y':'N'
+ DATA.push(i)
+ }
+ })
+
+ console.log(data,DATA)
+
+ post('AppDeviceManage/AppDeviceAnDengCallSave' + formatParams(data),DATA).then(res => {
+ if (res.code === '200') {
+ vant.Notify.primary('鎻愪氦鎴愬姛锛�')
+ topContent.forEach((r, i) => {
+ if (r.code === radioValue) {
+ topContent.splice(i, 1)
+ }
+ })
+ if (topContent.length >= 1) {
+ radioValue = topContent[0].code
+ this.topContentClcik(radioValue)
+ }
+
+ this.submitIsDisabled = false
+ this.$forceUpdate()
+ }
+ })
+
+ },
+ switchChange(val, item) {
+ console.log(val, item)
+ this.$forceUpdate()
+
+ },
+
+ topContentClcik(code,wksp_code) {
+ radioValue = code
+ this.$forceUpdate()
+
+ const data = {
+ eqpcode: code,
+ wkshpcode: wksp_code
+ }
+ post('AppDeviceManage/AppDeviceAnDengCallItemSearch' + formatParams(data)).then(res => {
+ if (res.code === '200') {
+ centerContent = res.data
+ falseArray.push({
+ id: '1'
+ })
+ }
+ })
+
+ },
+
+
+ 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()
},
@@ -93,5 +390,9 @@
</script>
<style type="text/css">
@import url('../../css/global.css');
+
+ .van-hairline--top-bottom {
+ position: static;
+ }
</style>
</html>
diff --git a/pages/adgl/adxy.html b/pages/adgl/adxy.html
index c8f900d..730d995 100644
--- a/pages/adgl/adxy.html
+++ b/pages/adgl/adxy.html
@@ -18,24 +18,29 @@
<script type="text/javascript" src="../../js/http.js"></script>
- <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" />
+ <script type="text/javascript" src="../../js/common.js"></script>
+ <script type="text/javascript" src="../../js/global.js"></script>
+
+ <!-- <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" /> -->
</head>
<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>
+
+ <van-sticky>
+ <van-nav-bar title="瀹夌伅鍝嶅簲" @click-right="onClickRight" left-arrow @click-left="onClickleft">
+ <template #right>
+ <van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
+ trigger="click" :actions="actions" @select="onSelect">
+ <template #reference>
+ <van-icon name="bars" size='20' color='#fff' />
+ </template>
+ </van-popover>
+ </template>
+ </van-nav-bar>
+ </van-sticky>
</div>
diff --git a/pages/other/wdxx.html b/pages/other/wdxx.html
index be7f653..17f78d5 100644
--- a/pages/other/wdxx.html
+++ b/pages/other/wdxx.html
@@ -149,7 +149,19 @@
fqry: '寮犱笁',
fqsj: '2022-10-10 11:12:12'
},
- {
+ {
+ gwmc: '鏈哄姞01宸ヤ綅',
+ sccj: '鏈哄姞杞﹂棿',
+ hjlx: '鍛煎彨璁惧',
+ fqry: '寮犱笁',
+ fqsj: '2022-10-10 11:12:12'
+ }, {
+ gwmc: '鏈哄姞01宸ヤ綅',
+ sccj: '鏈哄姞杞﹂棿',
+ hjlx: '鍛煎彨璁惧',
+ fqry: '寮犱笁',
+ fqsj: '2022-10-10 11:12:12'
+ }, {
gwmc: '鏈哄姞01宸ヤ綅',
sccj: '鏈哄姞杞﹂棿',
hjlx: '鍛煎彨璁惧',
diff --git a/pages/sbgl/dqby.html b/pages/sbgl/dqby.html
index 1b0f97f..3c4550b 100644
--- a/pages/sbgl/dqby.html
+++ b/pages/sbgl/dqby.html
@@ -21,19 +21,17 @@
<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: 'SB001',
+ // name: '鐢垫睜缁勪竴绾�',
+ // wksp_code: "CJ002",
+ // wksp_name: '鐢垫睜杞﹂棿',
+ // eapmai_code: "bybz004",
+ // eapmai_name: "鏍囧噯4",
+ // main_cycle: "M",
+ // },
// {
// code: 'SB003',
// name: '榻胯疆绠辩粍涓�绾�',
diff --git a/pages/sbgl/rcdj.html b/pages/sbgl/rcdj.html
index 332c691..9e4c59f 100644
--- a/pages/sbgl/rcdj.html
+++ b/pages/sbgl/rcdj.html
@@ -25,13 +25,13 @@
<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: '榻胯疆绠辩粍',
diff --git a/pages/sbgl/wxsq.html b/pages/sbgl/wxsq.html
index 821acdc..55bfc9d 100644
--- a/pages/sbgl/wxsq.html
+++ b/pages/sbgl/wxsq.html
@@ -25,15 +25,15 @@
<script type="text/javascript">
var topContent = [
- {
- code: 'SB001',
- name: '鐢垫睜缁勪竴绾�',
- wksp_code: "CJ002",
- wksp_name: '鐢垫睜杞﹂棿',
- eapmai_code: "bybz004",
- eapmai_name: "鏍囧噯4",
- main_cycle: "M",
- },
+ // {
+ // code: 'SB001',
+ // name: '鐢垫睜缁勪竴绾�',
+ // wksp_code: "CJ002",
+ // wksp_name: '鐢垫睜杞﹂棿',
+ // eapmai_code: "bybz004",
+ // eapmai_name: "鏍囧噯4",
+ // main_cycle: "M",
+ // },
]
diff --git a/pages/test/template.html b/pages/test/template.html
index a96872a..96efab6 100644
--- a/pages/test/template.html
+++ b/pages/test/template.html
@@ -18,25 +18,28 @@
<script type="text/javascript" src="../../js/http.js"></script>
- <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" />
+ <script type="text/javascript" src="../../js/common.js"></script>
+ <script type="text/javascript" src="../../js/global.js"></script>
+
+ <!-- <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" /> -->
</head>
<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>
-
+ <van-sticky>
+ <van-nav-bar title="" @click-right="onClickRight" left-arrow @click-left="onClickleft">
+ <template #right>
+ <van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
+ trigger="click" :actions="actions" @select="onSelect">
+ <template #reference>
+ <van-icon name="bars" size='20' color='#fff' />
+ </template>
+ </van-popover>
+ </template>
+ </van-nav-bar>
+ </van-sticky>
</div>
diff --git a/unpackage/cache/wgt/H5EDA0853/css/global.css b/unpackage/cache/wgt/H5EDA0853/css/global.css
index afba783..dcd1215 100644
--- a/unpackage/cache/wgt/H5EDA0853/css/global.css
+++ b/unpackage/cache/wgt/H5EDA0853/css/global.css
@@ -26,11 +26,19 @@
}
-.topRight{
- width:160px;min-height:60px;display: flex;flex-direction: column;padding: 10px;
+.topRight {
+ width: 160px;
+ min-height: 60px;
+ display: flex;
+ flex-direction: column;
+ padding: 10px;
}
-.topRightItem{
- display: flex;align-items: center;line-height: 20px;border-bottom: 1px solid #eee;
+
+.topRightItem {
+ display: flex;
+ align-items: center;
+ line-height: 20px;
+ border-bottom: 1px solid #eee;
}
.vanFieldInput {
@@ -97,13 +105,14 @@
}
.head_bar {
-/* width: 5px;
+ /* width: 5px;
height: 20px; */
/* background-color: red; */
margin-left: 5px;
border-radius: 3px;
- border:2px solid red;
-
+ height: 20px;
+ border: 2px solid red;
+
}
.head_title {
diff --git a/unpackage/cache/wgt/H5EDA0853/pages/adgl/adhj.html b/unpackage/cache/wgt/H5EDA0853/pages/adgl/adhj.html
index c0fdffe..89577c6 100644
--- a/unpackage/cache/wgt/H5EDA0853/pages/adgl/adhj.html
+++ b/unpackage/cache/wgt/H5EDA0853/pages/adgl/adhj.html
@@ -17,8 +17,109 @@
<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" />
+
+ <!-- <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" /> -->
+
+
+ <script type="text/javascript">
+ let topContent = [{
+ code: 'SB001',
+ name: '鐢垫睜缁勪竴绾�',
+ wksp_code: "CJ002",
+ wksp_name: '鐢垫睜杞﹂棿',
+ "eqpchkmain_code": "djbz002"
+ },
+ {
+ code: 'SB003',
+ name: '榻胯疆绠辩粍涓�绾�',
+ wksp_code: "CJ001",
+ "wksp_name": "瑁呴厤杞﹂棿",
+ "eqpchkmain_code": "djbz002"
+ },
+ {
+ code: 'SB004',
+ name: '榻胯疆绠辩粍涓�绾�',
+ wksp_code: "CJ001",
+ "wksp_name": "瑁呴厤杞﹂棿",
+ "eqpchkmain_code": "djbz002"
+ },
+ // {
+ // code: 'SB005',
+ // name: '榻胯疆绠辩粍涓�绾�',
+ // wksp_code: "CJ001",
+ // "wksp_name": "瑁呴厤杞﹂棿",
+ // "eqpchkmain_code": "djbz002"
+ // },
+ ];
+
+ let radioValue = 'SB001' //鍗曢�夋閫変腑鐨勯」
+
+ let centerContent = [] //涓棿閮ㄥ垎鍐呭
+
+ let falseArray = [] // 鍋囨暟缁� 鍋氭壂鐮佸洖鏉ヨ鍥炬洿鏂扮敤
+
+ // 鎵弿淇濆吇宸ヤ綅杩斿洖鏃舵墽琛屾柟娉�
+ function scaned(r) {
+ radioValue = r
+
+ let temp = {}
+ let flag = false
+
+ if (topContent.find(i => i.code === radioValue)) {
+ topContent.forEach((item, index) => {
+ if (item.code === radioValue) {
+ temp = item
+ topContent.splice(index, 1)
+ flag = true
+ }
+ })
+ }
+
+ if (flag) { //瀵瑰凡鍦ㄥ垪琛ㄧ殑鏁版嵁 鎺掑簭鍒扮涓�涓幓
+ topContent.unshift(temp)
+ topScanClick(radioValue)
+ centerContentClick(radioValue, topContent.find(i => i.code === radioValue).wksp_code)
+ } else { //鏈湪鍒楄〃鐨勬暟鎹� 杩涜鏂板鎿嶄綔
+ topScanClick(radioValue)
+ centerContentClick(radioValue, topContent.find(i => i.code === radioValue).wksp_code)
+ }
+
+ falseArray.push({
+ id: '1'
+ })
+ }
+
+
+ function topScanClick(code) {
+ post('AppDeviceManage/AppDeviceAnDengCallScanSearch?eqpcode=' + code).then(res => {
+ if (res.code === '200') {
+ topContent.unshift(res.data[0])
+ falseArray.push({
+ id: '1'
+ })
+ }
+
+ })
+ }
+
+ function centerContentClick(code, wksp_code) {
+ const data = {
+ eqpcode: code,
+ wkshpcode: wksp_code
+ }
+ post('AppDeviceManage/AppDeviceAnDengCallItemSearch' + formatParams(data)).then(res => {
+ if (res.code === '200') {
+ centerContent = res.data
+ falseArray.push({
+ id: '1'
+ })
+ }
+ })
+ }
+ </script>
</head>
<body>
@@ -26,21 +127,111 @@
<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>
+ <van-sticky>
+ <van-nav-bar title="瀹夌伅鍛煎彨" @click-right="onClickRight" left-arrow @click-left="onClickleft">
+ <template #right>
+ <van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
+ trigger="click" :actions="actions" @select="onSelect">
+ <template #reference>
+ <van-icon name="bars" size='20' color='#fff' />
+ </template>
+ </van-popover>
+ </template>
+ </van-nav-bar>
+ </van-sticky>
+
+
+ <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" style="min-height: 100px;max-height: 260px; overflow: scroll;">
+ <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>
+
+
+ <van-radio-group v-model="radioValue">
+ <van-cell-group>
+ <div style="margin: 10px 0;" v-for="(item,index) in topContent" :key="item.eqpcode"
+ @click="topContentClcik(item.code,item.wksp_code)">
+ <div class="cellDiv">宸ヤ綅缂栫爜锛歿{item.code}}</div>
+ <van-cell :title="'宸ヤ綅鍚嶇О锛�'+item.name">
+ <template #right-icon>
+ <van-radio style="margin-right: 10px;" checked-color='red'
+ :name="item.code" />
+ </template>
+ </van-cell>
+ <div class="cellDiv">鐢熶骇杞﹂棿锛歿{item.wksp_name}}</div>
+
+ </div>
+ </van-cell-group>
+ </van-radio-group>
+ </div>
+
+
+ <div class="head" style="min-height: 100px;max-height: 260px; overflow: scroll;">
+ <div class="head_block">
+ <div class="head_left">
+ <div class="head_bar"></div>
+ <div class="head_title">
+ 閫夋嫨鍛煎彨绫诲瀷
+ </div>
+ </div>
+
+
+
+ </div>
+
+ <div style="padding: 10px;display: flex;flex-direction: column"
+ v-for="(item,index) in centerContent">
+ <div style="display: flex;justify-content: space-between;align-items: center;">
+ <div style="margin-left: 10px;">{{item.name}}</div>
+ <div style="margin-right: 10px;">
+ <van-switch size="24" v-model="item.flag" @change='val=>switchChange(val,item)'
+ active-color="#ee0a24" inactive-color="#dcdee0" />
+ </div>
+ </div>
+ </div>
+
+ </div>
+
+
+ <div
+ style="position:fixed;bottom: 0;width: 96%;margin-left:2%; flex;justify-content: center;flex-direction: column;align-items: center">
+ <van-button :load='submitIsDisabled' load-text="姝e湪鎻愪氦,璇风◢绛�..." class="vanButtonInfo"
+ @click="submit" type="info">
+ 纭鎻愪氦</van-button>
+ </div>
+
+ </div>
+
+
</div>
- <van-overlay :show="overlayShow" @click="overlayShow=false" />
+
+ </div>
+
+
+ <van-overlay :show="overlayShow" @click="overlayShow=false" />
</div>
@@ -50,6 +241,7 @@
el: '#app',
data: function() {
return {
+ submitIsDisabled: false,
overlayShow: false,
showPopover: false,
actions: [{
@@ -63,15 +255,120 @@
text: '閫�鍑虹櫥褰�'
}],
+ falseArray2: falseArray, //鍋囨暟缁�
+ // centerContent:[]
+
}
+ },
+ watch: {
+ 'falseArray2.length': {
+ handler(newValue, oldValue) {
+ this.$forceUpdate()
+ },
+ deep: true,
+ immediate: true,
+ },
},
created() {
},
mounted() {
+ const data = {
+ eqpcode: 'SB001',
+ wkshpcode: 'CJ002'
+ }
+ post('AppDeviceManage/AppDeviceAnDengCallItemSearch' + formatParams(data)).then(res => {
+ if (res.code === '200') {
+ centerContent = res.data
+ falseArray.push({
+ id: '1'
+ })
+ console.log(centerContent)
+ }
+ })
},
methods: {
+ submit() {
+ const data={
+ username:localStorage.getItem('username'),
+ eqpcode:topContent.find(i=>i.code===radioValue).code,
+ wkshpcode:topContent.find(i=>i.code===radioValue).wksp_code
+ }
+ const DATA=[]
+ centerContent.forEach(i=>{
+ if(i.flag){
+ i.flag=i.flag?'Y':'N'
+ DATA.push(i)
+ }
+ })
+
+ console.log(data,DATA)
+
+ post('AppDeviceManage/AppDeviceAnDengCallSave' + formatParams(data),DATA).then(res => {
+ if (res.code === '200') {
+ vant.Notify.primary('鎻愪氦鎴愬姛锛�')
+ topContent.forEach((r, i) => {
+ if (r.code === radioValue) {
+ topContent.splice(i, 1)
+ }
+ })
+ if (topContent.length >= 1) {
+ radioValue = topContent[0].code
+ this.topContentClcik(radioValue)
+ }
+
+ this.submitIsDisabled = false
+ this.$forceUpdate()
+ }
+ })
+
+ },
+ switchChange(val, item) {
+ console.log(val, item)
+ this.$forceUpdate()
+
+ },
+
+ topContentClcik(code,wksp_code) {
+ radioValue = code
+ this.$forceUpdate()
+
+ const data = {
+ eqpcode: code,
+ wkshpcode: wksp_code
+ }
+ post('AppDeviceManage/AppDeviceAnDengCallItemSearch' + formatParams(data)).then(res => {
+ if (res.code === '200') {
+ centerContent = res.data
+ falseArray.push({
+ id: '1'
+ })
+ }
+ })
+
+ },
+
+
+ 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()
},
@@ -93,5 +390,9 @@
</script>
<style type="text/css">
@import url('../../css/global.css');
+
+ .van-hairline--top-bottom {
+ position: static;
+ }
</style>
</html>
diff --git a/unpackage/cache/wgt/H5EDA0853/pages/adgl/adxy.html b/unpackage/cache/wgt/H5EDA0853/pages/adgl/adxy.html
index c8f900d..730d995 100644
--- a/unpackage/cache/wgt/H5EDA0853/pages/adgl/adxy.html
+++ b/unpackage/cache/wgt/H5EDA0853/pages/adgl/adxy.html
@@ -18,24 +18,29 @@
<script type="text/javascript" src="../../js/http.js"></script>
- <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" />
+ <script type="text/javascript" src="../../js/common.js"></script>
+ <script type="text/javascript" src="../../js/global.js"></script>
+
+ <!-- <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" /> -->
</head>
<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>
+
+ <van-sticky>
+ <van-nav-bar title="瀹夌伅鍝嶅簲" @click-right="onClickRight" left-arrow @click-left="onClickleft">
+ <template #right>
+ <van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
+ trigger="click" :actions="actions" @select="onSelect">
+ <template #reference>
+ <van-icon name="bars" size='20' color='#fff' />
+ </template>
+ </van-popover>
+ </template>
+ </van-nav-bar>
+ </van-sticky>
</div>
diff --git a/unpackage/cache/wgt/H5EDA0853/pages/other/wdxx.html b/unpackage/cache/wgt/H5EDA0853/pages/other/wdxx.html
index be7f653..17f78d5 100644
--- a/unpackage/cache/wgt/H5EDA0853/pages/other/wdxx.html
+++ b/unpackage/cache/wgt/H5EDA0853/pages/other/wdxx.html
@@ -149,7 +149,19 @@
fqry: '寮犱笁',
fqsj: '2022-10-10 11:12:12'
},
- {
+ {
+ gwmc: '鏈哄姞01宸ヤ綅',
+ sccj: '鏈哄姞杞﹂棿',
+ hjlx: '鍛煎彨璁惧',
+ fqry: '寮犱笁',
+ fqsj: '2022-10-10 11:12:12'
+ }, {
+ gwmc: '鏈哄姞01宸ヤ綅',
+ sccj: '鏈哄姞杞﹂棿',
+ hjlx: '鍛煎彨璁惧',
+ fqry: '寮犱笁',
+ fqsj: '2022-10-10 11:12:12'
+ }, {
gwmc: '鏈哄姞01宸ヤ綅',
sccj: '鏈哄姞杞﹂棿',
hjlx: '鍛煎彨璁惧',
diff --git a/unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html b/unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html
index 41cf45e..3c4550b 100644
--- a/unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html
+++ b/unpackage/cache/wgt/H5EDA0853/pages/sbgl/dqby.html
@@ -21,8 +21,6 @@
<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 = [
// {
@@ -247,9 +245,9 @@
</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>
diff --git a/unpackage/cache/wgt/H5EDA0853/pages/sbgl/wxsq.html b/unpackage/cache/wgt/H5EDA0853/pages/sbgl/wxsq.html
index 821acdc..55bfc9d 100644
--- a/unpackage/cache/wgt/H5EDA0853/pages/sbgl/wxsq.html
+++ b/unpackage/cache/wgt/H5EDA0853/pages/sbgl/wxsq.html
@@ -25,15 +25,15 @@
<script type="text/javascript">
var topContent = [
- {
- code: 'SB001',
- name: '鐢垫睜缁勪竴绾�',
- wksp_code: "CJ002",
- wksp_name: '鐢垫睜杞﹂棿',
- eapmai_code: "bybz004",
- eapmai_name: "鏍囧噯4",
- main_cycle: "M",
- },
+ // {
+ // code: 'SB001',
+ // name: '鐢垫睜缁勪竴绾�',
+ // wksp_code: "CJ002",
+ // wksp_name: '鐢垫睜杞﹂棿',
+ // eapmai_code: "bybz004",
+ // eapmai_name: "鏍囧噯4",
+ // main_cycle: "M",
+ // },
]
diff --git a/unpackage/cache/wgt/H5EDA0853/pages/test/template.html b/unpackage/cache/wgt/H5EDA0853/pages/test/template.html
index a96872a..96efab6 100644
--- a/unpackage/cache/wgt/H5EDA0853/pages/test/template.html
+++ b/unpackage/cache/wgt/H5EDA0853/pages/test/template.html
@@ -18,25 +18,28 @@
<script type="text/javascript" src="../../js/http.js"></script>
- <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" />
+ <script type="text/javascript" src="../../js/common.js"></script>
+ <script type="text/javascript" src="../../js/global.js"></script>
+
+ <!-- <link rel="stylesheet" href="../css/global.css" type="text/css" charset="utf-8" /> -->
</head>
<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>
-
+ <van-sticky>
+ <van-nav-bar title="" @click-right="onClickRight" left-arrow @click-left="onClickleft">
+ <template #right>
+ <van-popover style="" placement="bottom-end" :offset="[13,8]" v-model="showPopover"
+ trigger="click" :actions="actions" @select="onSelect">
+ <template #reference>
+ <van-icon name="bars" size='20' color='#fff' />
+ </template>
+ </van-popover>
+ </template>
+ </van-nav-bar>
+ </van-sticky>
</div>
--
Gitblit v1.9.3