|
@@ -54,7 +54,7 @@
|
|
|
|
|
|
|
|
</van-cell>
|
|
</van-cell>
|
|
|
<van-cell v-show="nfcImage.length > 0" :border="false" >
|
|
<van-cell v-show="nfcImage.length > 0" :border="false" >
|
|
|
- <uploader ref="imageUpload" v-model="nfcImage" multiple :maxCount="1" :deletable="false"/>
|
|
|
|
|
|
|
+ <img v-for="v in nfcImage" :src="nfcImage" alt="" :key="v.url">
|
|
|
</van-cell>
|
|
</van-cell>
|
|
|
</div>
|
|
</div>
|
|
|
</van-panel>
|
|
</van-panel>
|
|
@@ -131,8 +131,7 @@
|
|
|
</div >
|
|
</div >
|
|
|
|
|
|
|
|
<p class="warning-msg">需要完成所有区域的履职内容才能提交内容</p>
|
|
<p class="warning-msg">需要完成所有区域的履职内容才能提交内容</p>
|
|
|
-
|
|
|
|
|
- <div class="flex-box" v-if="getDicts(taskInfo.status,'resumption_status') === '未开始' || '进行中' ">
|
|
|
|
|
|
|
+ <div class="flex-box" v-if="getDicts(taskInfo.status,'resumption_status') === '未开始' || getDicts(taskInfo.status,'resumption_status') === '进行中'">
|
|
|
<van-button type="default" style="width: 28%;" plain @click="goBack">取消</van-button>
|
|
<van-button type="default" style="width: 28%;" plain @click="goBack">取消</van-button>
|
|
|
<van-button type="info" style="width: 28%;" plain hairline @click="saveData">保存</van-button>
|
|
<van-button type="info" style="width: 28%;" plain hairline @click="saveData">保存</van-button>
|
|
|
<van-button type="info" style="width: 28%;" @click="submitData">提交</van-button>
|
|
<van-button type="info" style="width: 28%;" @click="submitData">提交</van-button>
|
|
@@ -140,26 +139,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- nfc弹窗 -->
|
|
<!-- nfc弹窗 -->
|
|
|
- <transition name="van-fade">
|
|
|
|
|
- <van-popup v-model="visible" get-container="lz-edit" lock-scroll>
|
|
|
|
|
- <div class="nfc-panel">
|
|
|
|
|
- <div>
|
|
|
|
|
- <p class="top-text">将手机背部靠近NFC标签扫描</p>
|
|
|
|
|
- <div class="bottom-box">
|
|
|
|
|
- <div>
|
|
|
|
|
- <img :src="require('../../../assets/img/icon/NFC扫描-01.png')" />
|
|
|
|
|
- <span>NFC</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- <img :src="require('../../../assets/img/icon/camera.png')" />
|
|
|
|
|
- <span @click="nfcTakePhotos">拍照</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </van-popup>
|
|
|
|
|
- </transition>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <nfc-popup ref="NfcPopup" @change="changeNfcImg"></nfc-popup>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -168,10 +148,11 @@ import NavBar from '@/components/NavBar';
|
|
|
import SelectCell from '@/components/selectCell';
|
|
import SelectCell from '@/components/selectCell';
|
|
|
import DateCell from '@/components/dateCell';
|
|
import DateCell from '@/components/dateCell';
|
|
|
import Uploader from '@/components/upload';
|
|
import Uploader from '@/components/upload';
|
|
|
|
|
+import NfcPopup from '@/components/nfcPopup/more';
|
|
|
import {taskDetails,saveTaskData} from "@/views/menu/LZRegister/api";
|
|
import {taskDetails,saveTaskData} from "@/views/menu/LZRegister/api";
|
|
|
import {formatDate} from "@/filters/filter";
|
|
import {formatDate} from "@/filters/filter";
|
|
|
export default {
|
|
export default {
|
|
|
- components:{NavBar,SelectCell,DateCell,Uploader},
|
|
|
|
|
|
|
+ components:{NavBar,SelectCell,DateCell,Uploader,NfcPopup},
|
|
|
data(){
|
|
data(){
|
|
|
return {
|
|
return {
|
|
|
activeNames: ['1'],
|
|
activeNames: ['1'],
|
|
@@ -195,8 +176,6 @@ export default {
|
|
|
allCheckNum:0,
|
|
allCheckNum:0,
|
|
|
//区域下检查项数量
|
|
//区域下检查项数量
|
|
|
checkNum:0,
|
|
checkNum:0,
|
|
|
- //nfc弹窗
|
|
|
|
|
- visible:false,
|
|
|
|
|
//nfc图片
|
|
//nfc图片
|
|
|
nfcImage:[
|
|
nfcImage:[
|
|
|
{ url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },
|
|
{ url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },
|
|
@@ -371,7 +350,7 @@ export default {
|
|
|
this.clearData();
|
|
this.clearData();
|
|
|
},
|
|
},
|
|
|
clickNFC(){
|
|
clickNFC(){
|
|
|
- this.visible = true;
|
|
|
|
|
|
|
+ this.$refs.NfcPopup.visible = true;
|
|
|
},
|
|
},
|
|
|
//清空数据
|
|
//清空数据
|
|
|
clearData(){
|
|
clearData(){
|
|
@@ -383,25 +362,19 @@ export default {
|
|
|
this.checkItemList = [];
|
|
this.checkItemList = [];
|
|
|
this.NFCNum = 0;
|
|
this.NFCNum = 0;
|
|
|
},
|
|
},
|
|
|
- nfcTakePhotos(){
|
|
|
|
|
- let uploader = this.$refs.imageUpload;
|
|
|
|
|
- console.log(uploader,'uploader')
|
|
|
|
|
- uploader.chooseFiles();
|
|
|
|
|
- },
|
|
|
|
|
switchChange(item){
|
|
switchChange(item){
|
|
|
console.log(item,'666')
|
|
console.log(item,'666')
|
|
|
item.resTime = formatDate(new Date());
|
|
item.resTime = formatDate(new Date());
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ changeNfcImg(baseImg){
|
|
|
|
|
+ console.log(baseImg,'baseImg')
|
|
|
|
|
+ let arr = [];
|
|
|
|
|
+ arr.push({url:baseImg});
|
|
|
|
|
+ this.nfcImage = arr;
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
-<style lang="scss">
|
|
|
|
|
- .lz-edit{
|
|
|
|
|
- .van-popup--center{
|
|
|
|
|
- border-radius: 20px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-</style>
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
.lz-edit{
|
|
.lz-edit{
|
|
|
height: 100%;
|
|
height: 100%;
|
|
@@ -458,37 +431,4 @@ export default {
|
|
|
color: #fff;
|
|
color: #fff;
|
|
|
background-color: #1989fa;
|
|
background-color: #1989fa;
|
|
|
}
|
|
}
|
|
|
- .nfc-panel{
|
|
|
|
|
- width: 400px;
|
|
|
|
|
- background:url('../../../assets/img/NFCphone.png') center no-repeat;
|
|
|
|
|
- background-size: 50%;
|
|
|
|
|
- >div{
|
|
|
|
|
- padding: 30px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .top-text{
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- font-size: 26px;
|
|
|
|
|
- }
|
|
|
|
|
- .bottom-box{
|
|
|
|
|
- margin-top: 270px;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-around;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- >div{
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- &:active{
|
|
|
|
|
- opacity: .5;
|
|
|
|
|
- }
|
|
|
|
|
- >img{
|
|
|
|
|
- width: 70px;
|
|
|
|
|
- height: 70px;
|
|
|
|
|
- }
|
|
|
|
|
- >span{
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- font-size: 25px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
</style>
|
|
</style>
|