提交 45561df4 作者: wk

删除未使用功能页面,优化包体积

父级 4da226d9
let configEnv = {}
const ENV = 'dev'; // dev:开发环境 | test:测试环境
const ENV = 'online'; // dev:开发环境 | test:测试环境
if (ENV == "dev") {
//本地环境
console.log('本地环境')
......
{
"name": "site-uniapp",
"appid": "__UNI__EB20610",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
/* 5+App特有相关 */
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
/* 模块配置 */
"modules": {},
/* 应用发布信息 */
"distribute": {
/* android打包配置 */
"android": {
"permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios打包配置 */
"ios": {},
/* SDK配置 */
"sdkConfigs": {}
}
},
/* 快应用特有相关 */
"quickapp": {},
/* 小程序特有相关 */
"mp-weixin": {
"appid": "wxa38e989a4ba04775",
"setting": {
"urlCheck": false
},
"usingComponents": true,
"permission": {
"scope.userLocation": {
"desc": "获取当前位置,以便查询天气情况"
}
},
"plugins": {
"WechatSI": {
"version": "0.3.1",
"provider": "wx069ba97219f66d99"
}
}
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics": {
"enable": false
},
"vueVersion": "2"
"name" : "site-uniapp",
"appid" : "__UNI__EB20610",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules" : {},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios打包配置 */
"ios" : {},
/* SDK配置 */
"sdkConfigs" : {}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wxa38e989a4ba04775",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "获取当前位置,以便查询天气情况"
}
},
"plugins" : {
"WechatSI" : {
"version" : "0.3.1",
"provider" : "wx069ba97219f66d99"
}
}
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2"
}
......@@ -54,47 +54,7 @@
"navigationStyle": "custom"
}
}, {
"path": "pages/epidemic/epidemic",
"style": {
"navigationBarTitleText": "工地通行码",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/epidemic/serviceAgree/serviceAgree",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/epidemic/recordInput/recordInput",
"style": {
"navigationBarTitleText": "填写",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/epidemic/recordDetail/recordDetail",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/epidemic/recordList/recordList",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
},{
"path": "pages/login/joinOrg/joinOrg",
"style": {
"navigationBarTitleText": "",
......
<template>
<view class="content">
<titleBar title="工地通行码"></titleBar>
<view class="qrcode-content" v-if="isCodeShow">
<view class="title">{{inOut==''?'':'已提交'}}</view>
<tki-qrcode ref="qrcode" cid="code" :val="text" size="300" background="#FFFFFF" foreground="#000000"
:icon="inOut=='in'?'/static/ic-in.png':'/static/ic-out.png'" iconSize="40" :onval="true"
:showLoading="false" loadMake="true" />
<view class="time-content">
<view class="time">{{remainTime}}</view>
<view class="desc">{{remainDesc}}</view>
</view>
<view style="font-size: 32rpx;color: #333333;margin-top: 32rpx;">{{nowTime}}</view>
<view style="font-size: 32rpx;color: #3B73FE;margin-top: 32rpx;" @click="linkTo('record-page')">查看历史记录
</view>
</view>
<view class="uni-group-button">
<view class="uni-blue-button" @click="toEnter">填报</view>
</view>
</view>
</template>
<script>
import Api from "../../api/api.js"
import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue'
export default {
components: {
tkiQrcode
},
data() {
return {
created: "",
remainTime: "",
remainDesc: "后失效",
curTitle: "",
countDown: 0,
inOut: "",
text: "",
isCodeShow: false,
nowTime: "",
timer: {},
timer2: {}
}
},
onLoad() {
},
onShow() {
this.getBeforeRecord()
let that = this
this.timer = setInterval(function() {
let nowDate = new Date()
that.nowTime =
`${nowDate.getFullYear()}-${that.add0(nowDate.getMonth()+1)}-${that.add0(nowDate.getDate())} ${that.add0(nowDate.getHours())}:${that.add0(nowDate.getMinutes())}:${that.add0(nowDate.getSeconds())}`
}, 1000)
},
onReady() {
console.log("onReady");
},
onHide() {
console.log("onHide");
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
if (this.timer2) {
clearInterval(this.timer2);
this.timer2 = null
}
},
methods: {
add0(text) {
if (text < 10) {
return "0" + text
}
return text
},
toEnter() {
let isAuth = uni.getStorageSync("isAuth")
if (isAuth == 1) {
uni.navigateTo({
url: "/pages/epidemic/recordInput/recordInput"
})
} else {
uni.showModal({
cancelText: "取消",
confirmText: "去阅读",
confirmColor: "#1757FF",
content: "小程序涉及收集、使用和存储用户个人信息,需要您认真阅读用户服务协议和隐私政策",
success(res) {
if (res.confirm) {
uni.setStorageSync("isAuth", 1)
uni.navigateTo({
url: "../epidemic/serviceAgree/serviceAgree?isBtn=1"
})
}
}
})
}
},
linkTo(router) {
uni.navigateTo({
url: `/pages/enter-exit-page/${router}`
})
},
getBeforeRecord() {
Api.getBeforeRecord().then((res) => {
let result = res.data
console.log("记录详情", result);
if (result.code == 0) {
if (result.data._id) { //有记录
this.isCodeShow = true
let detail = result.data
this.pass_code_record_id = detail._id
this.created = detail.created_at
this.inOut = detail.site_type
this.text = JSON.stringify({
type: "inOut",
text: result.data._id,
ext: detail.created_at
})
this.startDownTime()
} else { //没有记录
this.isCodeShow = false
this.showAddTip()
}
} else {
this.$toast.showToast(result.msg)
}
})
},
showAddTip() {
let that = this
uni.showModal({
cancelText: "取消",
confirmText: "去填报",
confirmColor: "#1890FF",
content: "您还未填报信息,是否去填报?",
success(res) {
if (res.confirm) {
that.toEnter()
}
}
})
},
startDownTime() {
//当前时间
let nowDate = new Date().getTime()
console.log("当前时间", nowDate);
//开始时间
let startDate = new Date(this.created.replace(/-/g, "/")).getTime()
console.log("开始时间", this.created)
//时间差
let space = nowDate - startDate
if (space >= 30 * 60 * 1000) {
this.curTitle = "二维码已失效"
this.remainTime = "00:00"
this.remainDesc = "已失效"
} else {
this.remainDesc = "后失效"
this.countDown = parseInt((30 * 60 * 1000 - space) / 1000)
console.log("余下时间", this.countDown);
this.timer2 = setInterval(() => {
this.downTime()
}, 1000)
}
//是否大于30分钟
},
downTime() {
if (this.countDown > 0) {
this.countDown = this.countDown - 1
let min = parseInt(this.countDown / 60)
let sec = parseInt(this.countDown % 60)
if (min < 10) {
if (sec < 10) {
this.remainTime = `0${min}:0${sec}`
} else {
this.remainTime = `0${min}:${sec}`
}
} else {
if (sec < 10) {
this.remainTime = `${min}:0${sec}`
} else {
this.remainTime = `${min}:${sec}`
}
}
} else {
this.remainTime = "00:00"
this.remainDesc = "已失效"
}
},
}
}
</script>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
align-items: center;
.qrcode-content {
display: flex;
width: 690rpx;
padding: 30rpx 0;
margin-top: 30rpx;
background-color: #fff;
border-radius: 30rpx;
flex-direction: column;
align-items: center;
.model-content {
width: 200px;
height: 200px;
margin-top: 32rpx;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.title {
font-size: 48rpx;
margin-top: 200rpx;
margin-bottom: 32rpx;
color: #1890ff;
font-weight: bold;
}
.time-content {
display: flex;
margin-top: 64rpx;
justify-content: center;
flex-direction: row;
align-items: center;
.time {
font-size: 64rpx;
color: #1890ff;
margin-right: 32rpx;
font-weight: bold;
}
.desc {
font-size: 32rpx;
color: #333333;
font-weight: bold;
}
}
}
}
</style>
<template>
<view class="content">
<view class="info-title" @click="handleInfoShow">个人基本信息</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">姓名</text>
</view>
<view class="value-content">{{name}}</view>
</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">性别</text>
</view>
<view class="value-content">{{sex}}</view>
</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">身份证号</text>
</view>
<view class="value-content">{{cardNo}}</view>
</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">所在单位名称</text>
</view>
<view class="value-content">{{company}}</view>
</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">班组名称</text>
</view>
<view class="value-content">{{team}}</view>
</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">现住地区(省市区街道)</text>
</view>
<view class="value-content">
{{cur_live_list[0].name||""}}{{cur_live_list[1].name||""}}{{cur_live_list[2].name||""}}{{cur_live_list[3].name||""}}
</view>
</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">现住地址(具体到门牌号)</text>
</view>
<view class="value-content">{{address}}</view>
</view>
<view class="info-title" @click="handleHealthShow">人员健康信息</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">当日体温</text>
</view>
<view class="value-content">{{temp}}</view>
</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">健康码是否为绿色</text>
</view>
<view class="sel-group">
<view :class="health_code_is_green==1?'sel-item':'def-item'">
<text class="text"></text>
</view>
<view :class="health_code_is_green==0?'sel-item':'def-item'">
<text class="text"></text>
</view>
</view>
</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">行程码是否带星</text>
</view>
<view class="sel-group">
<view :class="travel_card_is_star==1?'sel-item':'def-item'">
<text class="text"></text>
</view>
<view :class="travel_card_is_star==0?'sel-item':'def-item'">
<text class="text"></text>
</view>
</view>
</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">核酸检测结果</text>
</view>
<view class="value-content">{{nucleic_acid_res.name}}</view>
</view>
<view v-if="isHealthShow">
<view class="item-content" v-for="(item,index) in subjects" :key="index">
<view class="title">
<view class="star">*</view>
<text class="text">{{item.title}}</text>
</view>
<view class="sel-group">
<view :class="item.value==1?'sel-item':'def-item'">
<text class="text"></text>
</view>
<view :class="item.value==0?'sel-item':'def-item'">
<text class="text"></text>
</view>
</view>
</view>
</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">新冠疫苗是否接种</text>
</view>
<view class="value-content">{{vaccination_status.name}}</view>
</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">人员类型</text>
</view>
<view class="value-content">{{person_type.name}}</view>
</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">进/出场</text>
</view>
<view class="sel-group">
<view :class="site_type=='in'?'sel-item':'def-item'">
<text class="text">进场</text>
</view>
<view :class="site_type=='out'?'sel-item':'def-item'">
<text class="text">出场</text>
</view>
</view>
</view>
<view class="info-title" @click="handlePassShow">人员近七天途经</view>
<view v-if="isPassShow" class="pass-content">
<view v-for="(item,index) in passList" :key="index" class="pass-item">
<view class="title">
<text class="text">日期:{{item.pass_date}}</text>
</view>
<text
class="text">途经地区(省/市/区县/街道):{{item.pass_area_list[0].name||""}}{{item.pass_area_list[1].name||""}}{{item.pass_area_list[2].name||""}}{{item.pass_area_list[3].name||""}}</text>
<text class="text">途经详细地址:{{item.cur_address||""}}</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
showModal: false,
isInfoShow: true,
isHealthShow: true,
isPassShow: true,
health_code_is_green: -1, //健康码颜色
travel_card_is_star: -1, //行程码带星
nucleic_acid_res: {}, //核酸检测结果
vaccination_status: {}, //新冠疫苗接种
person_type: {}, //人员类型
site_type: "", //进出场
name: "",
sex: "",
cardNo: "",
company: "",
team: "",
province: "",
provinceList: [],
city: "",
cityList: [],
area: "",
areaList: [],
street: "",
streetList: [],
address: "",
cur_live_list: [],
temp: "",
subjects: [{
title: "本人14日内是否发热(体温≥37.3℃)?",
field: "is_fever",
value: -1
}, {
title: "本人14日内是否曾有干咳、乏力、气促及呼吸道症状?",
field: "is_resp_symp",
value: -1
}, {
title: "本人14日内是否服用退烧药、感冒药?",
field: "is_eat_drug",
value: -1
}, {
title: "本人14日内是否被诊断为新冠肺炎患者、疑似患者或被确认为密切接触者?",
field: "is_diagnosis",
value: -1
}, {
title: "本人家庭成员14日内是否被被诊断为新冠肺炎患者、疑似患者或被确认为密切接触者?",
field: "family_is_diagnosis",
value: -1
}, {
title: "本人所住小区14日内是否有新冠肺炎病例?",
field: "park_is_diagnosis",
value: -1
}, {
title: "本人14日内是否到过上海市、吉林省、海宁市、桐乡市、泉州市、宁波市、绍兴市、金华市、衢州市等地以及其他中高风险地区所在县(市、区)(以国家公布为准)?",
field: "is_visit_medium_high_risk_area",
value: -1
}, {
title: "本人14日内是否与国家公布的新冠病毒感染者相关病例有时空交集?",
field: "is_spatiotemporal_intersection",
value: -1
}, {
title: "本人是否居住或到过杭州市公布的疫情防控封控区、管控区、防范区?",
field: "is_visit_area_by_hz",
value: -1
}],
nucleicAcidRes: [], //核酸检测结果
vaccinationStatus: [], //新冠疫苗接种情况
personType: [], //人员类型
nucleicAcidResIndex: -1,
vaccinationStatusIndex: -1,
personTypeIndex: -1,
passList: [],
passIndex: -1,
pass_area: {},
passAddress: "",
pass_code_record_id: ""
}
},
onLoad(options) {
this.pass_code_record_id = options.id
this.getRecord()
},
methods: {
handleInfoShow() {
this.isInfoShow = !this.isInfoShow
},
handleHealthShow() {
this.isHealthShow = !this.isHealthShow
},
handlePassShow() {
this.isPassShow = !this.isPassShow
},
getRecord() {
this.$http.get({
url: "/api/v1/common_check/pass_code_record/detail",
data: {
pass_code_record_id: this.pass_code_record_id
},
header: {
"access_token": this.getToken(),
}
}).then((res) => {
let result = res.data
console.log("记录详情", result);
if (result.code == 0) {
if (result.data._id) { //有记录
let detail = result.data
this.pass_code_record_id = detail._id
this.name = detail.user_name || ""
this.sex = detail.gender || ""
this.cardNo = detail.idcard_no || ""
this.company = detail.company_name || ""
this.team = detail.group_name || ""
this.cur_live_list = detail.cur_live_list || []
this.address = detail.cur_live_address || ""
this.temp = detail.cur_temp || ""
this.health_code_is_green = detail.health_code_is_green
this.travel_card_is_star = detail.travel_card_is_star
this.nucleic_acid_res = detail.nucleic_acid_res || {}
this.vaccination_status = detail.vaccination_status || {}
this.person_type = detail.person_type || {}
this.site_type = detail.site_type || ""
this.passList = detail.person_seven_pass_list
let arr = []
this.subjects.forEach((item) => {
if (item.field == "is_fever") {
item.value = detail.is_fever
} else if (item.field == "is_resp_symp") {
item.value = detail.is_resp_symp
} else if (item.field == "is_eat_drug") {
item.value = detail.is_eat_drug
} else if (item.field == "is_diagnosis") {
item.value = detail.is_diagnosis
} else if (item.field == "family_is_diagnosis") {
item.value = detail.family_is_diagnosis
} else if (item.field == "park_is_diagnosis") {
item.value = detail.park_is_diagnosis
} else if (item.field == "is_visit_medium_high_risk_area") {
item.value = detail.is_visit_medium_high_risk_area
} else if (item.field == "is_spatiotemporal_intersection") {
item.value = detail.is_spatiotemporal_intersection
} else if (item.field == "is_visit_area_by_hz") {
item.value = detail.is_visit_area_by_hz
} else {
item.value = -1
}
arr.push(item)
})
this.subjects = arr
}
} else {
this.$toast.showToast(result.msg)
}
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #F8F8F8;
}
.content {
display: flex;
flex-direction: column;
margin-bottom: 144rpx;
.info-title {
padding: 32rpx;
font-size: 32rpx;
color: #333333;
}
.item-content {
display: flex;
flex-direction: column;
padding: 20rpx 32rpx;
margin-top: 2rpx;
background-color: #FFFFFF;
.title {
display: flex;
flex-direction: row;
align-items: center;
.star {
font-size: 32rpx;
color: #FF0000
}
text {
font-size: 32rpx;
margin-left: 20rpx;
color: #333333;
font-weight: bold;
}
}
.value-content {
font-size: 32rpx;
margin-left: 32rpx;
color: #666666;
margin-top: 32rpx;
}
.address-content {
display: flex;
margin-top: 32rpx;
margin-left: 32rpx;
flex-direction: row;
.item-address {
flex: 0 0 50%;
// border: 2rpx solid #e5e5e5;
// border-radius: 2rpx;
// padding: 4rpx;
margin: 4rpx;
.value {
font-size: 32rpx;
color: #666666;
text-align: left;
}
}
}
.sel-group {
display: flex;
flex-direction: row;
margin-top: 32rpx;
margin-left: 32rpx;
align-items: center;
.sel-item {
display: flex;
width: 96rpx;
border-radius: 24rpx;
margin-right: 32rpx;
height: 48rpx;
border: 2rpx solid #1890ff;
align-items: center;
justify-content: center;
text {
font-size: 28rpx;
color: #1890ff;
}
}
.def-item {
display: flex;
width: 96rpx;
border-radius: 24rpx;
margin-right: 32rpx;
height: 48rpx;
border: 2rpx solid #333333;
align-items: center;
justify-content: center;
text {
font-size: 28rpx;
color: #333333;
}
}
}
.sel-picker {
margin-top: 32rpx;
margin-left: 32rpx;
.sel-arrow {
display: flex;
flex-direction: row;
justify-content: space-between;
image {
width: 24rpx;
height: 48rpx;
}
text {
font-size: 32rpx;
color: #333333;
}
}
}
}
.pass-content {
display: flex;
flex-direction: column;
background-color: #FFFFFF;
.pass-item {
display: flex;
flex-direction: column;
border-radius: 10rpx;
padding: 32rpx;
margin: 20rpx 32rpx;
border: 2rpx solid #e5e5e5;
.title {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
text {
font-size: 32rpx;
color: #1890ff;
}
.edit-btn {
border: 2rpx solid #1890ff;
padding: 10rpx 20rpx;
border-radius: 8rpx;
text {
font-size: 32rpx;
color: #1890ff;
}
}
}
text {
font-size: 32rpx;
color: #333333;
margin-top: 32rpx;
}
}
}
}
.model-view {
position: fixed;
top: 0;
z-index: 1000;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
background-color: rgba(0, 0, 0, 0.4);
.model-out-box {
width: 600rpx;
height: 500rpx;
background-color: #FFFFFF;
border-radius: 20rpx;
margin-top: 45%;
display: flex;
padding: 32rpx;
flex-direction: column;
.title {
font-size: 32rpx;
color: #333333;
font-weight: bold;
}
.address-content {
display: flex;
margin-top: 32rpx;
justify-content: space-between;
flex-direction: row;
.item-address {
flex: 0 0 50%;
margin: 4rpx;
.value {
font-size: 32rpx;
color: #666666;
text-align: left;
}
}
}
.value-content {
font-size: 32rpx;
color: #666666;
margin-top: 32rpx;
}
.btn-group {
display: flex;
flex-direction: row-reverse;
align-items: center;
.cancel {
margin: 32rpx;
font-size: 32rpx;
color: #666666;
}
.sure {
margin: 32rpx;
font-size: 32rpx;
color: #1890ff;
}
}
}
}
</style>
<template>
<view class="content">
<titleBar title="填写"></titleBar>
<view class="info-title" @click="handleInfoShow">个人基本信息</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">姓名</text>
</view>
<input placeholder="请输入" placeholder-style="value-content" class="value-content" v-model="name" />
</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">性别</text>
</view>
<input placeholder="请输入" placeholder-style="value-content" class="value-content" v-model="sex" />
</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">身份证号</text>
</view>
<input placeholder="请输入" placeholder-style="value-content" class="value-content" v-model="cardNo"
type="number" />
</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">所在单位名称</text>
</view>
<input placeholder="请输入" placeholder-style="value-content" class="value-content" v-model="company" />
</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">班组名称</text>
</view>
<input placeholder="请输入" placeholder-style="value-content" class="value-content" v-model="team" />
</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">现住地区(省/市/区县/街道)</text>
</view>
<view class="address-content">
<picker class="item-address" :range="provinceList" range-key="province" @change="nowProvinceChange">
<text class="value">{{cur_live_list.length==0?'选择省':cur_live_list[0].name}}</text>
</picker>
<picker class="item-address" :range="cityList" @change="nowCityChange" range-key="city">
<text class="value">{{cur_live_list[1].name||'选择市'}}</text>
</picker>
</view>
<view class="address-content">
<picker class="item-address" :range="areaList" @change="nowAreaChange" range-key="area">
<text class="value">{{cur_live_list[2].name||'选择区'}}</text>
</picker>
<picker class="item-address" :range="streetList" @change="nowStreetChange" range-key="street">
<text class="value">{{cur_live_list[3].name||'选择街道'}}</text>
</picker>
</view>
</view>
<view class="item-content" v-if="isInfoShow">
<view class="title">
<view class="star">*</view>
<text class="text">现住地址(具体到门牌号)</text>
</view>
<input placeholder="请输入" placeholder-style="value-content" class="value-content" v-model="address" />
</view>
<view class="info-title" @click="handleHealthShow">人员健康信息</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">当日体温</text>
</view>
<input placeholder="请输入数字(保留1位小数)" placeholder-style="value-content" class="value-content" v-model="temp"
type="digit" @input="inputChange" />
</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">健康码是否为绿色</text>
</view>
<view class="sel-group">
<view :class="health_code_is_green==1?'sel-item':'def-item'" @click="HealthChange(1)">
<text class="text"></text>
</view>
<view :class="health_code_is_green==0?'sel-item':'def-item'" @click="HealthChange(0)">
<text class="text"></text>
</view>
</view>
</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">行程码是否带星</text>
</view>
<view class="sel-group">
<view :class="travel_card_is_star==1?'sel-item':'def-item'" @click="travelChange(1)">
<text class="text"></text>
</view>
<view :class="travel_card_is_star==0?'sel-item':'def-item'" @click="travelChange(0)">
<text class="text"></text>
</view>
</view>
</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">核酸检测结果</text>
</view>
<picker class="sel-picker" :range="nucleicAcidRes" range-key="name" @change="nucleicAcidResChange">
<view class="sel-arrow">
<text class="text">{{nucleic_acid_res.name||""}}</text>
<image src="../../../static/right-arrow-ic.png" class="image"></image>
</view>
</picker>
</view>
<view v-if="isHealthShow">
<view class="item-content" v-for="(item,index) in subjects" :key="index">
<view class="title">
<view class="star">*</view>
<text class="text">{{item.title}}</text>
</view>
<view class="sel-group">
<view :class="item.value==1?'sel-item':'def-item'" @click="itemChange(index,1)">
<text class="text"></text>
</view>
<view :class="item.value==0?'sel-item':'def-item'" @click="itemChange(index,0)">
<text class="text"></text>
</view>
</view>
</view>
</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">新冠疫苗是否接种</text>
</view>
<view class="sel-group">
<view v-for="(item,index) in vaccinationStatus" :key="index"
:class="vaccination_status.value==item.value?'sel-item': 'def-item'"
@click="vaccinationStatusChange(index)">
<text class="text">{{item.name}}</text>
</view>
</view>
</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">人员类型</text>
</view>
<picker class="sel-picker" :range="personType" range-key="name" @change="personTypeChange">
<view class="sel-arrow">
<text class="text">{{person_type.name||""}}</text>
<image src="../../../static/right-arrow-ic.png" class="image"></image>
</view>
</picker>
</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">进/出场</text>
</view>
<view class="sel-group">
<view :class="site_type=='in'?'sel-item':'def-item'" @click="siteChange('in')">
<text class="text">进场</text>
</view>
<view :class="site_type=='out'?'sel-item':'def-item'" @click="siteChange('out')">
<text class="text">出场</text>
</view>
</view>
</view>
<view class="info-title" @click="handlePassShow">人员七天途经</view>
<view v-if="isPassShow" class="pass-content">
<view v-for="(item,index) in passList" :key="index" class="pass-item">
<view class="title">
<text class="text">日期:{{item.pass_date}}</text>
<view class="edit-btn" @click="editAddress(index)">
<text class="text">编辑</text>
</view>
</view>
<text
class="text">途经地区(省/市/区县/街道):{{item.pass_area_list[0].name||""}}{{item.pass_area_list[1].name||""}}{{item.pass_area_list[2].name||""}}{{item.pass_area_list[3].name||""}}</text>
<text class="text">途经详细地址:{{item.cur_address||""}}</text>
</view>
</view>
<view class="item-content" v-if="isHealthShow">
<view class="title">
<view class="star">*</view>
<text class="text">本人承诺上述填报信息完全属实并承担责任。</text>
</view>
<view class="title">
<view class="star">*</view>
<text class="text">重要提示:《传染病防治法》规定隐瞒疫区旅游史或接触史者要承担相应法律责任。</text>
</view>
</view>
<view class="uni-group-button">
<view class="uni-blue-button" @click="toSubmit">提交</view>
</view>
<view class="model-view" :style="showModal?'':'display:none;'">
<view class="model-out-box">
<view class="title">途经地区(省/市/区县/街道)</view>
<view class="address-content">
<picker class="item-address" :range="provinceList" range-key="province" @change="provinceChange">
<text class="value">{{pass_area.pass_area_list[0].name||'选择省'}}</text>
</picker>
<picker class="item-address" :range="cityList" @change="cityChange" range-key="city">
<text class="value">{{pass_area.pass_area_list[1].name||'选择市'}}</text>
</picker>
</view>
<view class="address-content">
<picker class="item-address" :range="areaList" @change="areaChange" range-key="area">
<text class="value">{{pass_area.pass_area_list[2].name||'选择区'}}</text>
</picker>
<picker class="item-address" :range="streetList" @change="streetChange" range-key="street">
<text class="value">{{pass_area.pass_area_list[3].name||'选择街道'}}</text>
</picker>
</view>
<view class="title" style="margin-top: 32rpx;">途经详细地址(具体到门牌号)</view>
<input placeholder="请输入" placeholder-style="value-content" class="value-content"
v-model="passAddress" />
<view class="btn-group">
<view class="sure" @click="toSure">确定</view>
<view class="cancel" @click="toCancel">取消</view>
</view>
</view>
</view>
</view>
</template>
<script>
import Api from "../../../api/api.js"
export default {
data() {
return {
showModal: false,
isInfoShow: true,
isHealthShow: true,
isPassShow: true,
health_code_is_green: -1, //健康码颜色
travel_card_is_star: -1, //行程码带星
nucleic_acid_res: {}, //核酸检测结果
vaccination_status: {}, //新冠疫苗接种
person_type: {}, //人员类型
site_type: "", //进出场
name: "",
sex: "",
cardNo: "",
company: "",
team: "",
province: "",
provinceList: [],
city: "",
cityList: [],
area: "",
areaList: [],
street: "",
streetList: [],
address: "",
cur_live_list: [],
temp: "",
subjects: [{
title: "本人14日内是否发热(体温≥37.3℃)?",
field: "is_fever",
value: -1
}, {
title: "本人14日内是否曾有干咳、乏力、气促及呼吸道症状?",
field: "is_resp_symp",
value: -1
}, {
title: "本人14日内是否服用退烧药、感冒药?",
field: "is_eat_drug",
value: -1
}, {
title: "本人14日内是否被诊断为新冠肺炎患者、疑似患者或被确认为密切接触者?",
field: "is_diagnosis",
value: -1
}, {
title: "本人家庭成员14日内是否被被诊断为新冠肺炎患者、疑似患者或被确认为密切接触者?",
field: "family_is_diagnosis",
value: -1
}, {
title: "本人所住小区14日内是否有新冠肺炎病例?",
field: "park_is_diagnosis",
value: -1
}, {
title: "本人14日内是否到过新冠肺炎疫情中高风险地区所在县(市、区)(以国家公布为准)?",
field: "is_visit_medium_high_risk_area",
value: -1
}, {
title: "本人14日内是否与国家公布的新冠病毒感染者相关病例有时空交集?",
field: "is_spatiotemporal_intersection",
value: -1
}, {
title: "本人是否居住或到过杭州市公布的疫情防控封控区、管控区、防范区?",
field: "is_visit_area_by_hz",
value: -1
}],
nucleicAcidRes: [], //核酸检测结果
vaccinationStatus: [], //新冠疫苗接种情况
personType: [], //人员类型
nucleicAcidResIndex: -1,
vaccinationStatusIndex: -1,
personTypeIndex: -1,
passList: [],
passIndex: -1,
pass_area: {},
passAddress: "",
pass_code_record_id: ""
}
},
onLoad() {
this.getProvince()
this.getNucleicAcidResCodes()
this.getVaccinationStatusCodes()
this.getPersonTypeCodes()
this.getBeforeRecord()
},
methods: {
/* 健康码颜色 */
HealthChange(index) {
this.health_code_is_green = index
},
/* 行程码 */
travelChange(index) {
this.travel_card_is_star = index
},
siteChange(e) {
this.site_type = e
},
toSure() {
let passDay = this.passList[this.passIndex]
this.pass_area.cur_address = this.passAddress
this.pass_area.pass_date = passDay.pass_date
this.$set(this.passList, this.passIndex, this.pass_area)
console.log(this.passList);
this.showModal = false
this.refreshNowAreaList()
},
toCancel() {
this.passAddress = ""
this.pass_area = {}
this.showModal = false
this.refreshNowAreaList()
},
editAddress(index) {
this.passIndex = index
let passDay = this.passList[this.passIndex]
this.passAddress = passDay.cur_address || ""
this.pass_area = {
pass_date: passDay.pass_date,
pass_area_list: passDay.pass_area_list,
cur_address: passDay.cur_address || ""
}
this.cityList = []
this.areaList = []
this.streetList = []
this.showModal = true
this.refreshPassAreaList()
},
provinceChange(e) {
let index = parseInt(e.detail.value)
this.pass_area.pass_area_list = []
this.pass_area.pass_area_list.push({
id: this.provinceList[index].area_id,
name: this.provinceList[index].province,
pid: this.provinceList[index].province_no
})
this.getCity(this.provinceList[index].province_no)
},
cityChange(e) {
let index = parseInt(e.detail.value)
this.pass_area.pass_area_list.splice(1, this.pass_area.pass_area_list.length - 1)
let city = this.cityList[index]
this.pass_area.pass_area_list.push({
id: city.area_id,
name: city.city,
pid: city.city_no
})
console.log(this.passList);
console.log(this.pass_area);
this.getArea(city.city_no)
},
areaChange(e) {
let index = parseInt(e.detail.value)
this.pass_area.pass_area_list.splice(2, this.pass_area.pass_area_list.length - 1)
let area = this.areaList[index]
this.pass_area.pass_area_list.push({
id: area.area_id,
name: area.area,
pid: area.area_no
})
this.getStreet(area.area_no)
},
streetChange(e) {
let index = parseInt(e.detail.value)
this.pass_area.pass_area_list.splice(3, this.pass_area.pass_area_list.length - 1)
let street = this.streetList[index]
this.pass_area.pass_area_list.push({
id: street.area_id,
name: street.street
})
},
nucleicAcidResChange(e) {
this.nucleic_acid_res = this.nucleicAcidRes[parseInt(e.detail.value)]
},
vaccinationStatusChange(index) {
this.vaccination_status = this.vaccinationStatus[index]
},
personTypeChange(e) {
this.person_type = this.personType[parseInt(e.detail.value)]
},
getNucleicAcidResCodes() {
Api.getCodeList({
data: {
"code_type": "nucleicAcidRes"
}
}).then((res) => {
let result = res.data
console.log("核酸检测:", result);
if (result.code == 0) {
this.nucleicAcidRes = result.data[0].sub_data
}
})
},
getVaccinationStatusCodes() {
Api.getCodeList({
data: {
"code_type": "vaccinationStatus"
}
}).then((res) => {
let result = res.data
console.log("新冠疫苗接种:", result);
if (result.code == 0) {
this.vaccinationStatus = result.data[0].sub_data
}
})
},
getPersonTypeCodes() {
Api.getCodeList({
data: {
"code_type": "personType"
}
}).then((res) => {
let result = res.data
console.log("人员类型:", result);
if (result.code == 0) {
this.personType = result.data[0].sub_data
}
})
},
/* 现居住地 */
nowProvinceChange(e) {
console.log("现居住省份", e);
let index = parseInt(e.detail.value)
this.cur_live_list = []
this.cur_live_list.push({
id: this.provinceList[index].area_id,
name: this.provinceList[index].province,
pid: this.provinceList[index].province_no
})
this.getCity(this.provinceList[index].province_no)
},
nowCityChange(e) {
console.log("现居住城市", e);
let index = parseInt(e.detail.value)
this.cur_live_list.splice(1, this.cur_live_list.length - 1)
console.log(this.cur_live_list);
let city = this.cityList[index]
this.cur_live_list.push({
id: city.area_id,
name: city.city,
pid: city.city_no
})
this.getArea(city.city_no)
},
nowAreaChange(e) {
console.log("现居住城区", e);
let index = parseInt(e.detail.value)
this.cur_live_list.splice(2, this.cur_live_list.length - 1)
let area = this.areaList[index]
this.cur_live_list.push({
id: area.area_id,
name: area.area,
pid: area.area_no
})
this.getStreet(area.area_no)
},
nowStreetChange(e) {
console.log("现居住街道", e);
let index = parseInt(e.detail.value)
this.cur_live_list.splice(3, this.cur_live_list.length - 1)
let street = this.streetList[index]
this.cur_live_list.push({
id: street.area_id,
name: street.street,
pid: ""
})
},
getProvince() {
Api.getAreaList({
data: {
area_type: 1
},
}).then((res) => {
let result = res.data
console.log("所有省份", result);
if (result.code == 0) {
this.provinceList = result.data
}
})
},
getCity(province_no) {
Api.getAreaList({
data: {
area_type: 2,
province_no: province_no
},
}).then((res) => {
let result = res.data
console.log("城市列表", result);
if (result.code == 0) {
this.cityList = result.data
}
})
},
getArea(city_no) {
Api.getAreaList({
data: {
area_type: 3,
city_no: city_no
},
}).then((res) => {
let result = res.data
console.log("城区列表", result);
if (result.code == 0) {
this.areaList = result.data
}
})
},
getStreet(area_no) {
Api.getAreaList({
data: {
area_type: 4,
area_no: area_no
},
}).then((res) => {
let result = res.data
console.log("街道列表", result);
if (result.code == 0) {
this.streetList = result.data
}
})
},
handleInfoShow() {
this.isInfoShow = !this.isInfoShow
},
handleHealthShow() {
this.isHealthShow = !this.isHealthShow
},
handlePassShow() {
this.isPassShow = !this.isPassShow
},
inputChange(e) {
let that = this
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,1})/g)[0]) || null
this.$nextTick(() => {
that.temp = e.target.value
})
},
itemChange(index, value) {
let subject = this.subjects[index]
subject.value = value
this.$set(this.subjects, index, subject)
},
toSubmit() {
if (this.name == "") {
this.$toast.showToast("请输入姓名")
return
}
if (this.sex == "") {
this.$toast.showToast("请输入性别")
return
}
if (this.cardNo == "") {
this.$toast.showToast("请输入身份证号")
return
}
if (this.company == "") {
this.$toast.showToast("请输入所在单位")
return
}
if (this.team == "") {
this.$toast.showToast("请输入班组名称")
return
}
if (this.cur_live_list.length == 0) {
this.$toast.showToast("请选择现住地区")
return
}
if (this.cur_live_list.length < 4) {
this.$toast.showToast("请完善现住地区")
return
}
if (this.address == "") {
this.$toast.showToast("请输入现住地址(具体到门牌号)")
return
}
if (this.temp == "") {
this.$toast.showToast("请输入当前体温")
return
}
if (this.health_code_is_green == -1) {
this.$toast.showToast("请选择健康码是否为绿色")
return
}
if (this.travel_card_is_star == -1) {
this.$toast.showToast("请选择行程码是否带星")
return
}
if (!this.nucleic_acid_res.value) {
this.$toast.showToast("请选择核酸检测结果")
return
}
let newSub = this.subjects.filter((item) => item.value == -1)
if (newSub.length > 0) {
this.$toast.showToast(newSub[0].title)
return
}
if (!this.vaccination_status.value) {
this.$toast.showToast("请选择新冠疫苗接种情况")
return
}
if (!this.person_type.value) {
this.$toast.showToast("请选择人员类型")
return
}
if (this.site_type == "") {
this.$toast.showToast("请选择进出场")
return
}
let newPass = this.passList.filter(item => item.pass_area_list.length < 4 || item.cur_address == "" || item
.cur_address == null)
if (newPass.length > 0) {
this.$toast.showToast("请完善" + newPass[0].pass_date + "经过区域")
return
}
Api.saveRecord({
data: {
user_name: this.name,
gender: this.sex,
idcard_no: this.cardNo,
company_name: this.company,
group_name: this.team,
cur_live_list: this.cur_live_list,
cur_live_address: this.address,
cur_temp: this.temp,
health_code_is_green: this.health_code_is_green,
travel_card_is_star: this.travel_card_is_star,
nucleic_acid_res: this.nucleic_acid_res,
is_fever: this.subjects[0].value,
is_resp_symp: this.subjects[1].value,
is_eat_drug: this.subjects[2].value,
is_diagnosis: this.subjects[3].value,
family_is_diagnosis: this.subjects[4].value,
park_is_diagnosis: this.subjects[5].value,
is_visit_medium_high_risk_area: this.subjects[6].value,
is_spatiotemporal_intersection: this.subjects[7].value,
is_visit_area_by_hz: this.subjects[8].value,
vaccination_status: this.vaccination_status,
person_type: this.person_type,
site_type: this.site_type,
person_seven_pass_list: this.passList,
}
}).then((res) => {
let result = res.data
if (result.code == 0) {
this.$toast.showToast("提交成功")
uni.$emit("refresh")
uni.navigateBack({
delta: 1
})
} else {
this.$toast.showToast(result.msg)
}
})
},
getBeforeRecord() {
Api.getBeforeRecord().then((res) => {
let result = res.data
console.log("记录详情", result);
if (result.code == 0) {
if (result.data._id) { //有记录
let detail = result.data
this.pass_code_record_id = detail._id
this.name = detail.user_name || ""
this.sex = detail.gender || ""
this.cardNo = detail.idcard_no || ""
this.company = detail.company_name || ""
this.team = detail.group_name || ""
this.cur_live_list = detail.cur_live_list || []
this.address = detail.cur_live_address || ""
this.passList = detail.person_seven_pass_list
this.refreshNowAreaList()
} else { //没有记录
this.passList = []
this.getSevenDay()
}
} else {
this.$toast.showToast(result.msg)
}
})
},
refreshNowAreaList() { //0 现居住地 1 经过地区
if (this.cur_live_list[0].pid) {
this.getCity(this.cur_live_list[0].pid)
}
if (this.cur_live_list[1].pid) {
this.getArea(this.cur_live_list[1].pid)
}
if (this.cur_live_list[2].pid) {
this.getStreet(this.cur_live_list[2].pid)
}
},
refreshPassAreaList() { //0 现居住地 1 经过地区
if (this.pass_area.pass_area_list[0].pid) {
this.getCity(this.pass_area.pass_area_list[0].pid)
}
if (this.pass_area.pass_area_list[1].pid) {
this.getArea(this.pass_area.pass_area_list[1].pid)
}
if (this.pass_area.pass_area_list[2].pid) {
this.getStreet(this.pass_area.pass_area_list[2].pid)
}
},
getSevenDay() {
//设置日期,当前日期的前七天
var myDate = new Date();
//获取今天日期
myDate.setDate(myDate.getDate() - 6);
var dateArray = [];
var dateTemp;
var flag = 1;
for (var i = 0; i < 7; i++) {
dateTemp = myDate.getFullYear() + "-" + (this.add0(myDate.getMonth() + 1)) + "-" + this.add0(myDate
.getDate());
dateArray.push(dateTemp);
this.passList.push({
pass_date: dateTemp,
pass_area_list: [],
cur_address: ""
})
myDate.setDate(myDate.getDate() + flag);
}
this.passList.reverse()
console.log("7天日期", dateArray);
},
add0(text) {
if (text < 10) {
return "0" + text
}
return text
},
}
}
</script>
<style lang="scss">
page {
background-color: #F8F8F8;
}
.content {
display: flex;
flex-direction: column;
margin-bottom: 144rpx;
.info-title {
padding: 32rpx;
font-size: 32rpx;
color: #333333;
}
.item-content {
display: flex;
flex-direction: column;
padding: 20rpx 32rpx;
margin-top: 2rpx;
background-color: #FFFFFF;
.title {
display: flex;
flex-direction: row;
align-items: center;
.star {
font-size: 32rpx;
color: #FF0000
}
text {
font-size: 32rpx;
margin-left: 20rpx;
color: #333333;
font-weight: bold;
}
}
.value-content {
font-size: 32rpx;
margin-left: 32rpx;
color: #666666;
margin-top: 32rpx;
}
.address-content {
display: flex;
margin-top: 32rpx;
margin-left: 32rpx;
flex-direction: row;
.item-address {
flex: 0 0 50%;
// border: 2rpx solid #e5e5e5;
// border-radius: 2rpx;
// padding: 4rpx;
margin: 4rpx;
.value {
font-size: 32rpx;
color: #666666;
text-align: left;
}
}
}
.sel-group {
display: flex;
flex-direction: row;
margin-top: 32rpx;
margin-left: 32rpx;
align-items: center;
.sel-item {
display: flex;
width: 96rpx;
border-radius: 24rpx;
margin-right: 32rpx;
height: 48rpx;
border: 2rpx solid #1890ff;
align-items: center;
justify-content: center;
text {
font-size: 28rpx;
color: #1890ff;
}
}
.def-item {
display: flex;
width: 96rpx;
border-radius: 24rpx;
margin-right: 32rpx;
height: 48rpx;
border: 2rpx solid #333333;
align-items: center;
justify-content: center;
text {
font-size: 28rpx;
color: #333333;
}
}
}
.sel-picker {
margin-top: 32rpx;
margin-left: 32rpx;
.sel-arrow {
display: flex;
flex-direction: row;
justify-content: space-between;
image {
width: 24rpx;
height: 48rpx;
}
text {
font-size: 32rpx;
color: #333333;
}
}
}
}
.pass-content {
display: flex;
flex-direction: column;
background-color: #FFFFFF;
.pass-item {
display: flex;
flex-direction: column;
border-radius: 10rpx;
padding: 32rpx;
margin: 20rpx 32rpx;
border: 2rpx solid #e5e5e5;
.title {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
text {
font-size: 32rpx;
color: #1890ff;
}
.edit-btn {
border: 2rpx solid #1890ff;
padding: 10rpx 20rpx;
border-radius: 8rpx;
text {
font-size: 32rpx;
color: #1890ff;
}
}
}
text {
font-size: 32rpx;
color: #333333;
margin-top: 32rpx;
}
}
}
}
.model-view {
position: fixed;
top: 0;
z-index: 1000;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
background-color: rgba(0, 0, 0, 0.4);
.model-out-box {
width: 600rpx;
height: 500rpx;
background-color: #FFFFFF;
border-radius: 20rpx;
margin-top: 45%;
display: flex;
padding: 32rpx;
flex-direction: column;
.title {
font-size: 32rpx;
color: #333333;
font-weight: bold;
}
.address-content {
display: flex;
margin-top: 32rpx;
justify-content: space-between;
flex-direction: row;
.item-address {
flex: 0 0 50%;
margin: 4rpx;
.value {
font-size: 32rpx;
color: #666666;
text-align: left;
}
}
}
.value-content {
font-size: 32rpx;
color: #666666;
margin-top: 32rpx;
}
.btn-group {
display: flex;
flex-direction: row-reverse;
align-items: center;
.cancel {
margin: 32rpx;
font-size: 32rpx;
color: #666666;
}
.sure {
margin: 32rpx;
font-size: 32rpx;
color: #1890ff;
}
}
}
}
</style>
<template>
<view class="content">
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="item">
<view class="item-content">
<view class="value">{{item.created_at}}</view>
</view>
<view class="item-content">
<view class="desc">姓名:</view>
<view class="value">{{item.user_name}}</view>
</view>
<view class="item-content">
<view class="desc">所在单位名称:</view>
<view class="value">{{item.company_name}}</view>
</view>
<view class="item-content">
<view class="desc">班组名称:</view>
<view class="value">{{item.group_name}}</view>
</view>
<view class="item-content">
<view class="desc">进/出场:</view>
<view class="value">{{item.site_type=='in'?'进场':'出场'}}</view>
</view>
<view class="item-content">
<view class="desc">体温:</view>
<view class="value">{{item.cur_temp}}</view>
</view>
<view class="btn-content">
<view style="font-size: 32rpx;color: #1890ff;" @click="toDetail(item._id)">查看</view>
<button class="share-button" open-type="share" :id="item._id" hover-class='none'>分享</button>
</view>
</view>
</view>
</view>
</template>
<script>
import Api from "../../../api/api.js"
export default {
data() {
return {
list: [],
page: 1,
page_total: 1
}
},
onLoad() {
this.getRecordList()
},
onPullDownRefresh() {
this.page = 1
this.getRecordList()
},
onReachBottom() {
if (this.page < this.page_total) {
this.page++
this.getRecordList()
}
},
onShareAppMessage(res) {
console.log(res);
let id = res.target.id
return {
title: '',
path: `pages/index/index?page=inOut&id=${id}`
}
},
methods: {
toDetail(id) {
uni.navigateTo({
url: `/pages/enter-exit-page/record-detail-page?id=${id}`
})
},
getRecordList() {
Api.getRecordList({
data: {
is_page: 1,
page: this.page,
page_size: 20
}
}).then((res) => {
let result = res.data
console.log("提交记录", result);
uni.stopPullDownRefresh()
if (result.code == 0) {
this.page_total = result.data.total_page
if (this.page == 1) {
this.list = []
}
this.list = this.list.concat(result.data.list)
} else {
this.$toast.showToast(result.msg)
}
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #f8f8f8;
}
.content {
display: flex;
flex-direction: column;
.list-content {
margin-top: 32rpx;
display: flex;
flex-direction: column;
.item {
margin-top: 4rpx;
background-color: #FFFFFF;
display: flex;
flex-direction: column;
padding: 32rpx;
.item-content {
display: flex;
flex-direction: row;
margin-top: 20rpx;
align-items: center;
.desc {
font-size: 32rpx;
color: #666666;
}
.value {
font-size: 32rpx;
color: #333333;
}
}
.btn-content {
display: flex;
width: 40%;
margin-top: 32rpx;
flex-direction: row-reverse;
align-items: center;
.share-button {
font-size: 16px;
width: 25%;
color: #1890FF;
background-color: #fff;
border-radius: 0;
padding: 0;
}
.share-button::after {
border: none;
}
}
}
}
}
</style>
<template>
<view style="display: flex;flex-direction: column;">
<titleBar title="用户服务协议和隐私政策"></titleBar>
<view style="padding: 32rpx;display: flex;flex-direction: column;">
<text style="font-size: 32rpx;color: #333333;">
本协议是由您(以下简称“用户”)与本小程序系统(以下简称为“本小程序”)就本小程序提供的产品和服务内容,所订立的契约,具有合同的法律效力,请您仔细阅读。\n
一、本协议内容、生效、变更。本协议内容包括协议正文及所有本小程序已经发布的或将来可能发布的各类规则。所有规则为本协议不可分割的组成部分,
与协议正文具有同等法律效力。如您对协议有任何疑问,应向本小程序咨询。您在同意所有协议条款并完成注册程序,才能成为本站的正式用户,
您勾选“我以阅读并同意本小程序用户协议和法律协议”按钮后,本协议即生效,对双方产生约束力。只要您使用本小程序平台服务,则本协议即对您产生约束,
届时您不应以未阅读本协议的内容或者未获得本小程序对您问询的解答等理由,主张本协议无效,或要求撤销本协议。
您确认:本协议条款是处理双方权利义务的契约,始终有效,法律另有强制性规定或双方另有特别约定的,依其规定。您承诺接受并遵守本协议的约定。
如果您不同意本协议的约定,您应立即停止注册程序或停止使用本小程序平台服务。基于对小程序本身、用户及市场状况不断变化的考虑,
本小程序有权根据需要不定期地制订、修改本协议及/或各类规则,并在本小程序平台公示,不再另行单独通知用户。变更后的协议和规则一经在网站公布,
立即生效。如您不同意相关变更,应当立即停止使用本小程序平台服务。您继续使用本小程序平台服务的,即表明您接受修订后的协议和规则。\n
二、注册资格用户须具有法定的相应权利能力和行为能力的自然人、法人或其他组织,能够独立承担法律责任。
您完成注册程序或其他本小程序平台同意的方式实际使用本平台服务时,即视为您确认自己具备主体资格,能够独立承担法律责任。若因您不具备主体资格,
而导致的一切后果,由您及您的监护人自行承担。\n
2.1用户应自行诚信向本站提供注册资料,用户同意其提供的注册资料真实、准确、完整、合法有效,用户注册资料如有变动的,
应及时更新其注册资料。如果用户提供的注册资料不合法、不真实、不准确、不详尽的,用户需承担因此引起的相应责任及后果,
并且本小程序保留终止用户使用本平台各项服务的权利。\n
2.2用户在本站进行浏览等活动时,涉及用户真实姓名/名称、通信地址、联系电话、电子邮箱等隐私信息的,本站将予以严格保密,
除非得到用户的授权或法律另有规定,本站不会向外界披露用户隐私信息。为完成创建账号,用户需提供以下信息:用户的姓名、身份证号、
密码、户籍地址、家庭住址、手机号等信息。用户提供的上述信息,将在用户使用本服务期间持续授权我们使用。
在用户注销账号时,我们将停止使用并删除上述信息。上述信息将存储于中华人民共和国境内。如需跨境传输,我们将会单独征得用户的授权同意。\n
三、账户\n
3.1您注册成功后,即成为本小程序平台的用户,将持有本小程序平台唯一编号的账户信息,您可以根据本站规定改变您的密码。\n
3.2您设置的姓名为真实姓名,不得侵犯或涉嫌侵犯他人合法权益。否则,本小程序有权终止向您提供服务,注销您的账户。账户注销后,相应的用户名将开放给任意用户注册登记使用。\n
3.3您应谨慎合理的保存、使用您的用户名和密码,应对通过您的用户名和密码实施的行为负责。除非有法律规定或司法裁定,
且征得本小程序的同意,否则,用户名和密码不得以任何方式转让、赠与或继承(与账户相关的财产权益除外)。\n
3.4用户不得将在本站注册获得的账户借给他人使用,否则用户应承担由此产生的全部责任,并与实际使用人承担连带责任。\n
3.5如果发现任何非法使用等可能危及您的账户安全的情形时,您应当立即以有效方式通知本小程序要求暂停相关服务,并向公安机关报案。
您理解本小程序对您的请求采取行动需要合理时间,本小程序对在采取行动前已经产生的后果(包括但不限于您的任何损失)不承担任何责任。\n
四、用户信息的合理使用\n
4.1您同意本小程序平台拥有通过邮件、短信电话等形式,向在本站注册用户发送信息等告知信息的权利。\n
4.2您了解并同意,本小程序有权应国家司法、行政等主管部门的要求,向其提供您在本小程序平台填写的注册信息和交易记录等必要信息。如您涉嫌侵犯他人知识产权,
则本小程序亦有权在初步判断涉嫌侵权行为存在的情况下,向权利人提供您必要的身份信息。\n
4.3用户同意本小程序有权使用用户的注册信息、用户名、密码等信息,登录进入用户的注册账户,进行证据保全,包括但不限于公证、见证等。\n
五、免责条款\n
5.1 本平台仅提供信息对接,发生一切纠纷问题皆与本平台无关,请通过仲裁部门维护各自权益。\n
(完)\n
浙江省建工集团有限责任公司
</text>
<view style="height: 160rpx;"></view>
<view class="uni-group-button" v-if="isBtn==1">
<view class="uni-blue-button" @click="toEnter">同意</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isBtn: 0
}
},
onLoad(options) {
this.isBtn = options.isBtn
},
methods: {
toEnter() {
uni.redirectTo({
url: "/pages/epidemic/recordInput/recordInput"
})
}
}
}
</script>
<style>
</style>
......@@ -345,7 +345,7 @@
isComp = 1
}
uni.navigateTo({
url: `/pages/index/siteNewList/siteNewList?clientId=1&projectId=` + this.project_id +
url: `/pages/index/siteNewList/siteNewList?clientId=1&projectId=` + this.projecd_id +
"&isComp=" + isComp
})
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
Please register or to comment