From 2968bbc44d7c2f3952a6839c8f006e202a3e6539 Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Mon, 20 Mar 2023 17:33:33 +0800
Subject: [PATCH] upup
---
manifest.json | 2 +-
pages/bd/mine.vue | 186 +++++++++++++++++++++++---------
pages/bd/record.vue | 240 +++++++++++++++++++++++++----------------
pages/index/index.vue | 17 +--
pages/index/login.vue | 71 +++++++++---
pages/visit/detail.vue | 161 +++++++++++++++++----------
static/css/bd.css | 7 +-
utils/util.js | 17 +--
8 files changed, 479 insertions(+), 222 deletions(-)
diff --git a/manifest.json b/manifest.json
index a1ade3b..5abab88 100644
--- a/manifest.json
+++ b/manifest.json
@@ -50,7 +50,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
- "appid" : "wxd7b6631f1d3bc6bd",
+ "appid" : "wx35190cc07e73eda1",
"setting" : {
"urlCheck" : false,
"minified" : false
diff --git a/pages/bd/mine.vue b/pages/bd/mine.vue
index f2b5b6c..10a8c76 100644
--- a/pages/bd/mine.vue
+++ b/pages/bd/mine.vue
@@ -7,7 +7,7 @@
Hi ~ {{userName}}
- www.bd.@mail.com
+ {{userEmail}}
@@ -33,60 +33,63 @@
待办
+
-
-
- 普通访客
-
- 待审核
-
- 访问时间 2023-03-06
- 10:00至11:00
-
-
-
-
- 被访人:章三
- 被访人部门:生产
- 长期访客申请:是
-
-
- 访问区域:章三
- 拜访人:生产
- 事由:是
-
-
+
+
+ {{item.type_text}}
+
+ {{item.audit_status_text}}
+
+ 访问时间:{{item.date}}
+ {{item.visit_time.start_time}}至{{item.visit_time.end_time}}
+
+
+
+
+ 被访人:{{item.accept_admin_id}}
+ 部门:生产
+ 访问区域:{{item.visit_area_id}}
+
+
+ 拜访人:{{item.name}}
+ 电话:{{item.mobile}}
+ 事由:{{item.reason}}
+ 车牌:{{item.plate}}
+
+
- 长期访问时间:2023-01-01 至 2023-12-31
-
+ 长期访客申请:{{item.long_time==0?'否':'是'}}
+ 长期访问时间:{{item.start_date}} 至 {{item.end_date}}
+
-
-
@@ -181,7 +271,5 @@
.mine .icontext {
text-align: center;
margin-top: 15rpx
- }
-
-
+ }
diff --git a/pages/bd/record.vue b/pages/bd/record.vue
index 8f369c1..9c717ab 100644
--- a/pages/bd/record.vue
+++ b/pages/bd/record.vue
@@ -1,92 +1,148 @@
-
-
-
-
- {{item.label}}
-
-
-
-
-
-
-
-
- 普通访客
-
- 待审核
-
- 访问时间 2023-03-06
- 10:00至11:00
-
-
-
-
- 被访人:章三
- 被访人部门:生产
- 长期访客申请:是
-
-
- 访问区域:章三
- 拜访人:生产
- 事由:是
-
-
-
- 长期访问时间:2023-01-01 至 2023-12-31
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+ {{item.label}}
+
+
+
+
+
+
+
+
+ {{item.type_text}}
+
+ {{item.audit_status_text}}
+
+ 访问时间:{{item.date}}
+ {{item.visit_time.start_time}}至{{item.visit_time.end_time}}
+
+
+
+
+ 被访人:{{item.accept_admin_id}}
+ 部门:生产
+ 访问区域:{{item.visit_area_id}}
+
+
+ 拜访人:{{item.name}}
+ 电话:{{item.mobile}}
+ 事由:{{item.reason}}
+ 车牌:{{item.plate}}
+
+
+
+ 长期访客申请:{{item.long_time==0?'否':'是'}}
+ 长期访问时间:{{item.start_date}} 至 {{item.end_date}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
index acdb5a3..bbd99e3 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -29,13 +29,13 @@
wlcl: require('../../static/img/wlcl1.png'),
sgry: require('../../static/img/sgry1.png'),
bdgl: require('../../static/img/bdgl.png'),
- winHeight: 0
+ winHeight: 0,
+ isBd:""
}
},
onLoad() {
- console.log(uni.getSystemInfoSync().statusBarHeight)
- this.winHeight = uni.getSystemInfoSync().screenHeight - uni.getSystemInfoSync().statusBarHeight * 2-20;
- console.log(this.winHeight)
+ this.winHeight = uni.getSystemInfoSync().screenHeight - uni.getSystemInfoSync().statusBarHeight * 2-20;
+ this.isBd = uni.getStorageSync("userInfo_BD_token").token
},
methods: {
toUrl(type) {
@@ -51,8 +51,13 @@
url = "/pages/visit/addrecord?type=3"
// url = "/pages/visit/study?type=3"
break;
- case 4:
- url = "/pages/index/login"
+ case 4:
+ if(!this.util.isNull(this.isBd)){
+ url = "/pages/bd/mine"
+ }else{
+ url = "/pages/index/login"
+ }
+
break;
}
console.log(url)
diff --git a/pages/index/login.vue b/pages/index/login.vue
index 35761ad..dec05ff 100644
--- a/pages/index/login.vue
+++ b/pages/index/login.vue
@@ -4,19 +4,20 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
登录
-
@@ -28,7 +29,20 @@
logo: require("../../static/img/bdlogo.png"),
winHeight: 0,
form: {},
- rules: {},
+ rules: {
+ name: {
+ rules: [{
+ required: true,
+ errorMessage: '请输入用户名'
+ }]
+ },
+ password: {
+ rules: [{
+ required: true,
+ errorMessage: '请输入密码'
+ }]
+ }
+ },
labelStyle:{
fontSize:'12px',
color:"#ccc"
@@ -41,9 +55,40 @@
methods: {
submit(){
- uni.navigateTo({
- url:"/pages/bd/mine"
+ let that = this
+ this.$refs['formdata'].validate().then(res => {
+ this.util.request({
+ api: '/api/admin/auth/login',
+ data: {
+ username:this.form.name,
+ password:this.form.password
+ },
+ method:'POST',
+ utilSuccess: function(res) {
+ console.log(res)
+ uni.setStorageSync("userInfo_BD_token", {
+ token:res.access_token
+ })
+ uni.showToast({
+ title:"登录成功",
+ success() {
+ uni.navigateTo({
+ url:"/pages/bd/mine"
+ })
+ }
+ })
+ },
+ utilFail: function(res) {}
+ })
+ }).catch(err => {
+ console.log('err', err);
})
+
+
+
+ // uni.navigateTo({
+ // url:"/pages/bd/mine"
+ // })
}
}
}
diff --git a/pages/visit/detail.vue b/pages/visit/detail.vue
index feb3105..35eecf7 100644
--- a/pages/visit/detail.vue
+++ b/pages/visit/detail.vue
@@ -4,67 +4,86 @@
- 普通访客
+ {{info.type_text}}
- 待审核
+ {{info.audit_status_text}}
- 访问时间 2023-03-06
- 10:00至11:00
-
-
-
-
- 被访人:章三
- 被访人部门:生产
- 长期访客申请:是
-
-
- 访问区域:章三
- 拜访人:生产
- 事由:是
-
-
-
- 长期访问时间:2023-01-01 至 2023-12-31
+ 访问时间:{{info.date}}
+ {{info.visit_time.start_time}}至{{info.visit_time.end_time}}
+
+ 施工时段:{{info.work_start_time}}至{{info.work_end_time}}
+
+
+ 被访人:{{info.accept_admin_id}}
+ 部门:生产
+ 访问区域:{{info.visit_area_id}}
+
+
+ 拜访人:{{info.name}}
+ 电话:{{info.mobile}}
+ 事由:{{info.reason}}
+ 车牌:{{info.plate}}
+
+
+
+ 长期访客申请:{{info.long_time==0?'否':'是'}}
+ 长期访问时间:{{info.start_date}} 至 {{info.end_date}}
+
+
随访人员
-
-
+
+
- 被访人:章三
+
+ 随访人:{{people.name}}
+
+ 证件类型:{{people.credent_name}}
+ 证件号:{{people.idcard}}
- 联系电话:18914071203
+ 联系电话:{{people.mobile}}
- 证件类型:生产
- 证件号:是
-
+
+
+
+ 无
+
+
+
到访车辆
-
-
-
- 车牌:章三
-
+
+
+ 车牌:{{info.cars}}
+
+
+
+ 收货人
+
+
+
+ 部门:{{info.accpet_department_id}}
+
+
+ 人员:{{info.accept_goods_admin_id}}
被访人员
-
-
-
- 部门:章三
-
-
- 人员:18914071203
-
+
+
+ 部门:{{info.accept_admin_sign}}
+
+
+ 人员:{{info.accept_admin_id}}
@@ -76,7 +95,54 @@