master
lion 5 days ago
parent b7aca24e83
commit b119676f57

@ -15,6 +15,10 @@
{
"playground" : "standard",
"type" : "uni-app:app-ios"
},
{
"playground" : "standard",
"type" : "uni-app:app-android"
}
]
}

@ -1,5 +1,5 @@
const mode = 'production'; //devLocal本地测试、devOnline线上测试、production生产环境
let ROOTPATH = 'http://yxbd-fangke.ali251.langye.net'; //域名
let ROOTPATH = 'https://yxbd-fangke.ali251.langye.net'; //域名
switch (mode) {
case 'devLocal':
ROOTPATH = ROOTPATH

@ -88,7 +88,7 @@ const base = {
// 分享
shareInfo : () => {
return{
title:"BD柯唯访客在线核销",
title:"BD访客在线核销",
imageUrl:"",
page:'/pages/index/index'
}

@ -1,6 +1,6 @@
{
"name" : "BD柯唯访客在线核销",
"appid" : "__UNI__DF76F27",
"name" : "BD访客在线核销",
"appid" : "__UNI__2C03B0D",
"description" : "",
"versionName" : "1.0.2",
"versionCode" : 102,
@ -117,7 +117,7 @@
"disableHostCheck" : true,
"https" : false
},
"title" : "BD柯唯访客在线核销",
"title" : "BD访客在线核销",
"sdkConfigs" : {
"maps" : {}
}

@ -16,7 +16,7 @@
"preloadRule": {},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "BD柯唯访客在线核销",
"navigationBarTitleText": "BD访客在线核销",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#96d6e9"
}

@ -5,7 +5,9 @@
<view class="gate-header">
<view class="gate-left">
<view class="today-visitors" @click="openList">访</view>
<view class="export-visitors" @click="exportVisitors">访</view>
<!-- #ifdef H5 -->
<view class="export-visitors" @click="exportVisitors">访</view>
<!-- #endif -->
</view>
</view>
@ -47,7 +49,9 @@
<input
v-model="select.code"
placeholder="请扫描访客二维码"
@input="onCodeInput"
@change="onCodeInput"
@confirm="onCodeConfirm"
confirm-type="search"
class="form-input input-field"
/>
</view>
@ -116,12 +120,12 @@
getVisitDateRange(visitData)
}}</text>
</view>
<view class="info-item">
<!-- <view class="info-item">
<text class="info-label">到访时间</text>
<text class="info-value">{{
visitData.time ? visitData.time : ""
}}</text>
</view>
</view> -->
<view class="info-item" v-if="visitData.visit_time_detail || visitData.visit_time">
<text class="info-label">到访时段</text>
<text class="info-value"
@ -417,7 +421,7 @@
</template>
<script>
import { openDevice, scanReadIdCardInfo } from "@/common/reader.js";
import axios from "axios";
export default {
data() {
return {
@ -447,6 +451,9 @@ export default {
showPhotoActionSheet: false, //
listShow: false,
todayVisitors: [],
codeInputTimer: null,
gateAdminId: "",
gateName: "",
//
codeForm: {
code: "",
@ -516,24 +523,26 @@ export default {
}));
},
},
methods: {
//
connectReader() {
openDevice().then((res) => {
console.log("链接读卡器", res);
if (res.data.resultFlag == 0) {
uni.showToast({
title: "身份证读卡器链接成功",
icon: "none",
});
} else {
uni.showToast({
title: "身份证读卡器链接失败",
icon: "none",
});
}
});
watch: {
// input v-model
"select.code"(newVal) {
const value = (newVal || "").replace(/[\r\n\t]/g, "").trim();
if (value !== newVal) {
this.select.code = value;
return;
}
if (!value || this.loading) {
return;
}
if (this.codeInputTimer) {
clearTimeout(this.codeInputTimer);
}
this.codeInputTimer = setTimeout(() => {
this.getList();
}, 180);
},
},
methods: {
//
async checkAuth() {
try {
@ -548,8 +557,6 @@ export default {
});
return;
}
//
this.connectReader();
// tokentoken
const userRes = await this.$u.api.user();
console.log("用户信息验证:", userRes);
@ -558,6 +565,9 @@ export default {
// token
this.$u.vuex("vuex_user", userRes);
this.$u.vuex("vuex_token", token); // vuex
// 使
this.gateAdminId = userRes.id || userRes.admin_id || "";
this.gateName = userRes.name || "";
//
this.getToday();
} else {
@ -677,8 +687,19 @@ export default {
//
onCodeInput(e) {
this.select.code = e.detail.value;
if (this.select.code) {
console.log("onCodeInput", e);
const rawValue = (e && e.detail && e.detail.value) || "";
const value = rawValue.replace(/[\r\n\t]/g, "").trim();
this.select.code = value;
},
// /
onCodeConfirm(e) {
const rawValue = (e && e.detail && e.detail.value) || this.select.code || "";
const value = rawValue.replace(/[\r\n\t]/g, "").trim();
this.select.code = value;
if (value) {
this.getList();
}
},
@ -818,44 +839,61 @@ export default {
title: "核销成功",
icon: "none",
});
this.clearInputs();
},
// szbd-visitor-web gate/visitlist.vue 线 ScanReadIdCardInfo H5
// yxbd-visitor-web/src/views/gate/visitlist.vue
getIdcard() {
const that = this;
this.select.idcard = "";
scanReadIdCardInfo()
.then((res) => {
console.log(res);
console.log(res.data);
if (!res.data) {
return;
}
const raw =
typeof res.data === "string" ? res.data : String(res.data);
const data1 = raw.split('"IDNumber"');
if (!data1[1]) {
uni.showToast({
title: "解析身份证数据失败",
icon: "none",
});
return;
}
const data2 = data1[1].split(",");
const data3 = data2[0].replace(/[^\d]/g, "");
that.select.idcard = data3;
that.getList();
})
.catch((err) => {
console.log(err);
const msg =
(err.response && err.response.statusText) ||
err.message ||
"读取失败";
const endpointList = [
"https://127.0.0.1:24011/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1",
"http://127.0.0.1:24010/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1",
];
const parseIdCard = (res) => {
if (!res || !res.data) {
return "";
}
const raw = typeof res.data === "string" ? res.data : String(res.data);
const data1 = raw.split('"IDNumber"');
if (!data1[1]) {
return "";
}
const data2 = data1[1].split(",");
return data2[0].replace(/[^\d]/g, "");
};
const requestByIndex = (index) => {
if (index >= endpointList.length) {
uni.showToast({
title: msg,
title: "读卡跨域/证书受限,请改用身份证手输",
icon: "none",
});
});
return;
}
axios
.get(endpointList[index], {
timeout: 5000,
})
.then((res) => {
const idcard = parseIdCard(res);
if (!idcard) {
uni.showToast({
title: "解析身份证数据失败",
icon: "none",
});
return;
}
that.select.idcard = idcard;
that.getList();
})
.catch(() => {
requestByIndex(index + 1);
});
};
requestByIndex(0);
},
//
@ -1063,6 +1101,8 @@ export default {
try {
const updateParams = {
id: this.visitData.id,
// /api/admin/visit/save name
name: this.visitData.name || "",
remark: this.remarkValue,
person_no: this.personNoValue,
follw_people: this.visitData.follw_people || [],
@ -1098,7 +1138,7 @@ export default {
if (alsoCancel) {
//
this.cancelCode();
await this.cancelCode();
setTimeout(() => {
this.closeVisitModal();
}, 800);
@ -1207,6 +1247,24 @@ export default {
});
return;
}
const now = new Date();
const y = now.getFullYear();
const m = String(now.getMonth() + 1).padStart(2, "0");
const d = String(now.getDate()).padStart(2, "0");
const exportFileName = `访客记录${y}${m}${d}.csv`;
// H5 uni.downloadFile UUID
// #ifdef H5
const h5Url = `${url}&token=${encodeURIComponent(token)}`;
const link = document.createElement("a");
link.href = h5Url;
link.setAttribute("download", exportFileName);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
return;
// #endif
uni.downloadFile({
url,
header: {

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -1,7 +1,7 @@
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/index/index","pages/login/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"迈柯唯访客在线核销","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#96d6e9"},"preloadRule":{},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"迈柯唯访客在线核销","compilerVersion":"4.87","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniConfig = {"pages":["pages/index/index","pages/login/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"BD访客在线核销","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#96d6e9"},"preloadRule":{},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"BD访客在线核销","compilerVersion":"4.87","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true},"window":{"navigationStyle":"custom"}},{"path":"/pages/login/index","meta":{},"window":{"navigationStyle":"custom"}}];
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__2C03B0D","name":"BD访客在线核销","version":{"name":"1.0.2","code":102},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Camera":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"google":{"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\"/>"],"packagename":"uni.app.UNI2C03B0D","custompermissions":true},"apple":{"dSYMs":false,"devices":"universal"},"plugins":{"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"orientation":"portrait-primary"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"4.87","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html","adid":"122299150103"}}

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before

Width:  |  Height:  |  Size: 651 B

After

Width:  |  Height:  |  Size: 651 B

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__DF76F27","name":"迈柯唯访客在线核销","version":{"name":"1.0.2","code":102},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Camera":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"google":{"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\"/>"],"packagename":"uni.app.UNIDF76F27","custompermissions":true},"apple":{"dSYMs":false,"devices":"universal"},"plugins":{"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"orientation":"portrait-primary"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"4.87","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html","adid":"122299150103"}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 785 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

@ -2,7 +2,7 @@
## 一、系统概述
BD柯唯访客核销系统是一个专门用于门岗访客管理的信息化系统支持H5浏览器版本和Android APK版本。系统主要用于访客信息查询、核销、登记等功能实现访客进出厂区的数字化管理。
BD访客核销系统是一个专门用于门岗访客管理的信息化系统支持H5浏览器版本和Android APK版本。系统主要用于访客信息查询、核销、登记等功能实现访客进出厂区的数字化管理。
### 主要功能
- ✅ 访客信息查询与核销

Loading…
Cancel
Save