diff --git a/.env b/.env
index c38ef8b..80a1924 100644
--- a/.env
+++ b/.env
@@ -38,9 +38,9 @@ VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api/ # 访客线上
#VITE_APP_PROD_SERVICE = http://123.156.228.134:48080/app-api
; #VITE_APP_PROD_SERVICE = http://59.202.170.152:81/api
#VITE_APP_PROD_SERVICE = https://stgl.pj.gov.cn/api
-VITE_APP_PROD_SERVICE = http://60.12.184.86:8089/api
+VITE_APP_PROD_SERVICE = http://123.156.230.15:8089/api
#VITE_APP_PROD_SERVICE = http://59.202.170.152:81/api # 信创线上
# ******************** end 生产环境 end ********************
-VITE_DEV_ENV = dev
-# VITE_DEV_ENV = prod
+#VITE_DEV_ENV = dev
+ VITE_DEV_ENV = prod
diff --git a/src/App.vue b/src/App.vue
index 2f3028f..fd143f1 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,203 +1,105 @@
-
-
-
+
+
+
diff --git a/src/pages.json b/src/pages.json
index 9129d45..86b8eaa 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -9,61 +9,42 @@
}
},
"pages": [
- // {
- // "path": "pages/tabbar/canteen",
- // "style": {
- // "navigationBarTitleText": "食堂",
- // "disableScroll": true
- // }
- // },
- // {
- // "path": "pages/tabbar/selfMerchant",
- // "style": {
- // "navigationBarTitleText": "自营商家",
- // "disableScroll": true
- // }
- // },
- // {
- // "path": "pages/tabbar/coopMerchant",
- // "style": {
- // "navigationBarTitleText": "合作商家",
- // "disableScroll": true
- // }
- // },
- // {
- // "path": "pages/tabbar/order",
- // "style": {
- // "navigationBarTitleText": "订单",
- // "disableScroll": true
- // }
- // },
- // {
- // "path": "pages/tabbar/flowStatistics",
- // "style": {
- // "navigationBarTitleText": "流水统计",
- // "disableScroll": true
- // }
- // },
- // {
- // "path": "pages/tabbar/individualOrder",
- // "style": {
- // "navigationBarTitleText": "订单",
- // "disableScroll": true
- // }
- // },
- // {
- // "path": "pages/integrated/visitor/myvisitor",
- // "style": {
- // "navigationBarTitleText": "访客",
- // "disableScroll": true
- // }
- // },
{
"path": "pages/tabbar/my",
"style": {
"navigationBarTitleText": "我的",
"disableScroll": true
}
+ },
+ {
+ "path": "pages/integrated/visitor/index",
+ "style": {
+ "navigationBarTitleText": "访客申请"
+ }
+ },
+ {
+ "path": "pages/integrated/visitor/myvisitor",
+ "style": {
+ "navigationBarTitleText": "申请记录"
+ }
+ },
+ {
+ "path": "pages/integrated/visitor/myyyvisitor",
+ "style": {
+ "navigationBarTitleText": "主动邀约"
+ }
+ },
+ {
+ "path": "pages/integrated/visitor/myyyvisitorlist",
+ "style": {
+ "navigationBarTitleText": "邀约记录"
+ }
+ },
+ {
+ "path": "pages/integrated/visitor/verify",
+ "style": {
+ "navigationBarTitleText": "访客核销"
+ }
}
],
"subPackages": [
@@ -237,158 +218,7 @@
{
"path": "login",
"style": {
- "navigationBarTitleText": "",
- "disableScroll": true
- }
- }
- ]
- },
- {
- "root": "pages/wallet",
- "pages": [
- {
- "path": "list",
- "style": {
- "navigationBarTitleText": "",
- "disableScroll": true
- }
- },
- {
- "path": "detail",
- "style": {
- "navigationBarTitleText": "",
- "disableScroll": true
- }
- },
- {
- "path": "recharge",
- "style": {
- "navigationBarTitleText": "",
- "disableScroll": true
- }
- }
- ]
- },
- {
- "root": "pages/human-face",
- "pages": [
- {
- "path": "list",
- "style": {
- "navigationBarTitleText": "",
- "disableScroll": true
- }
- },
- {
- "path": "apply",
- "style": {
- "navigationBarTitleText": "",
- "disableScroll": true
- }
- }
- ]
- },
- {
- "root": "pages/user",
- "pages": [
- {
- "path": "userRole",
- "style": {
- "navigationBarTitleText": "用户身份",
- "disableScroll": true
- }
- }
- ]
- },
- {
- "root": "pages/pay",
- "pages": [
- {
- "path": "scanPay",
- "style": {
- "navigationBarTitleText": "支付",
- "disableScroll": true
- }
- },
- {
- "path": "payComplete",
- "style": {
- "navigationBarTitleText": "支付完成",
- "disableScroll": true
- }
- },
- {
- "path": "transferMoney",
- "style": {
- "navigationBarTitleText": "转账",
- "disableScroll": true
- }
- }
- ]
- },
- {
- "root": "pages/integrated",
- "pages": [
- {
- "path": "feedback/index",
- "style": {
- "navigationBarTitleText": "意见反馈"
- }
- }
- ]
- },
- {
- "root": "pages/integrated",
- "pages": [
- {
- "path": "visitor/index",
- "style": {
- "navigationBarTitleText": "访客"
- }
- }
- ]
- },
- {
- "root": "pages/integrated",
- "pages": [
- {
- "path": "visitor/myvisitor",
- "style": {
- "navigationBarTitleText": "访客记录"
- }
- }
- ]
- },
- {
- "root": "pages/integrated",
- "pages": [
- {
- "path": "visitor/myyyvisitor",
- "style": {
- "navigationBarTitleText": "邀约访客"
- }
- }
- ]
- },
- {
- "root": "pages/integrated",
- "pages": [
- {
- "path": "visitor/myyyvisitorlist",
- "style": {
- "navigationBarTitleText": "邀约记录"
- }
- }
- ]
- },
- {
- "root": "pages/integrated",
- "pages": [
- {
- "path": "visitor/visitorDetail",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "记录详情"
+ "navigationBarTitleText": "登录"
}
}
]
@@ -396,12 +226,15 @@
],
"globalStyle": {
"navigationBarTextStyle": "black",
- "navigationBarTitleText": "小程序",
- "navigationBarBackgroundColor": "#1777FF",
- "backgroundColor": "#ecf4f9",
- "navigationStyle": "custom"
+ "navigationBarTitleText": "uni-app",
+ "navigationBarBackgroundColor": "#F8F8F8",
+ "backgroundColor": "#F8F8F8"
},
"tabBar": {
+ "color": "#7A7E83",
+ "selectedColor": "#3cc51f",
+ "borderStyle": "black",
+ "backgroundColor": "#ffffff",
"list": [
{
"pagePath": "pages/integrated/visitor/index",
@@ -415,7 +248,6 @@
"iconPath": "/static/tabbar/my.png",
"selectedIconPath": "/static/tabbar/my-select.png"
},
-
{
"pagePath": "pages/integrated/visitor/myyyvisitor",
"text": "访客邀约",
@@ -430,7 +262,7 @@
},
{
"pagePath": "pages/integrated/visitor/verify",
- "text": "核销",
+ "text": "访客核销",
"iconPath": "/static/tabbar/my.png",
"selectedIconPath": "/static/tabbar/my-select.png"
},
diff --git a/src/pages/integrated/visitor/index.vue b/src/pages/integrated/visitor/index.vue
index febf505..d01521e 100644
--- a/src/pages/integrated/visitor/index.vue
+++ b/src/pages/integrated/visitor/index.vue
@@ -221,6 +221,21 @@
+
+
+ {{ user.name }}
+
+
+ {{ searchKeyword ? "未找到相关接待人" : "暂无接待人数据" }}
+
+
+
@@ -237,21 +252,21 @@ import deptApi from "@/sheep/api/integrated/dept"
// 表单数据
const formData = reactive({
- name: "测试访客",
- mobile: "13800138000",
- companyName: "测试公司",
- isOtherPeople: "1", // 默认有随行人员
- isDrive: "1", // 默认有车辆
- deptId: "", // 这个需要等部门列表加载后设置
- deptName: "",
- userId: "", // 这个需要等用户列表加载后设置
- userName: "",
- vstartDate: "", // 这个会在页面加载时设置
- vendDate: "",
- type: "1",
- checkStatus: "0",
- reasonValue: "", // 这个需要等原因列表加载后设置
- reasonLabel: "",
+ name: '测试访客',
+ mobile: '13800138000',
+ companyName: '测试公司',
+ isOtherPeople: '1', // 默认有随行人员
+ isDrive: '1', // 默认有车辆
+ deptId: '', // 这个需要等部门列表加载后设置
+ deptName: '',
+ receiveId: '', // 这个需要等用户列表加载后设置
+ userName: '',
+ vstartDate: '', // 这个会在页面加载时设置
+ vendDate: '',
+ type: '1',
+ checkStatus: '0',
+ reasonValue: '', // 这个需要等原因列表加载后设置
+ reasonLabel: '',
})
// 随行人员列表默认数据
@@ -316,9 +331,11 @@ const timeList = computed(() => {
// 过滤后的用户列表
const filteredUserList = computed(() => {
- if (!searchKeyword.value) return userList.value
- const keyword = searchKeyword.value.toLowerCase()
- return userList.value.filter((user) => user.name.toLowerCase().includes(keyword))
+ if (!searchKeyword.value) return userList.value
+ const keyword = searchKeyword.value.toLowerCase()
+ return userList.value.filter(user =>
+ user.name.toLowerCase().includes(keyword)
+ )
})
// 获取部门数据
@@ -395,31 +412,31 @@ const goBack = () => {
// 表单验证
const validateForm = () => {
- if (!formData.name) {
- uni.showToast({ title: "请输入姓名", icon: "none" })
- return false
- }
- if (!formData.mobile) {
- uni.showToast({ title: "请输入联系方式", icon: "none" })
- return false
- }
- if (!formData.deptId || !formData.deptName) {
- uni.showToast({ title: "请选择到访单位", icon: "none" })
- return false
- }
- if (!formData.userId || !formData.userName) {
- uni.showToast({ title: "请选择接待人", icon: "none" })
- return false
- }
- if (!formData.vstartDate || !formData.vendDate) {
- uni.showToast({ title: "请选择到访时间", icon: "none" })
- return false
- }
- if (!formData.reasonValue || !formData.reasonLabel) {
- uni.showToast({ title: "请选择拜访原因", icon: "none" })
- return false
- }
- return true
+ if (!formData.name) {
+ uni.showToast({ title: '请输入姓名', icon: 'none' })
+ return false
+ }
+ if (!formData.mobile) {
+ uni.showToast({ title: '请输入联系方式', icon: 'none' })
+ return false
+ }
+ if (!formData.deptId || !formData.deptName) {
+ uni.showToast({ title: '请选择到访单位', icon: 'none' })
+ return false
+ }
+ if (!formData.receiveId || !formData.userName) {
+ uni.showToast({ title: '请选择接待人', icon: 'none' })
+ return false
+ }
+ if (!formData.vstartDate || !formData.vendDate) {
+ uni.showToast({ title: '请选择到访时间', icon: 'none' })
+ return false
+ }
+ if (!formData.reasonValue || !formData.reasonLabel) {
+ uni.showToast({ title: '请选择拜访原因', icon: 'none' })
+ return false
+ }
+ return true
}
// 提交表单
@@ -443,30 +460,30 @@ const handleSubmit = async () => {
uni.hideLoading()
- if (code === 0) {
- uni.showToast({
- title: "提交成功,请耐心等待您的拜访对象接受此次申请",
- icon: "none",
- duration: 3000,
- })
+ if (code === 0) {
+ uni.showToast({
+ title: '提交成功,请耐心等待您的拜访对象接受此次申请',
+ icon: 'none',
+ duration: 3000
+ })
- // 延迟返回,让用户能看到提示
- setTimeout(() => {
- uni.navigateBack()
- }, 2000)
- } else {
- uni.showToast({
- title: msg || "提交失败",
- icon: "none",
- })
- }
- } catch (error) {
- uni.hideLoading()
- uni.showToast({
- title: "提交失败",
- icon: "none",
- })
- }
+ // 延迟返回,让用户能看到提示
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 2000)
+ } else {
+ uni.showToast({
+ title: msg || '提交失败',
+ icon: 'none'
+ })
+ }
+ } catch (error) {
+ uni.hideLoading()
+ uni.showToast({
+ title: '提交失败',
+ icon: 'none'
+ })
+ }
}
// 显示时间选择器
@@ -534,26 +551,26 @@ const selectDept = (dept: any) => {
// 部门选择确认
const confirmDeptSelect = () => {
- if (!selectedDeptId.value) {
- uni.showToast({
- title: "请选择到访单位",
- icon: "none",
- })
- return
- }
+ if (!selectedDeptId.value) {
+ uni.showToast({
+ title: '请选择到访单位',
+ icon: 'none'
+ })
+ return
+ }
- // 更新表单数据,同时保存ID和名称
- formData.deptId = selectedDeptId.value
- formData.deptName = selectedDeptName.value
+ // 更新表单数据,同时保存ID和名称
+ formData.deptId = selectedDeptId.value
+ formData.deptName = selectedDeptName.value
- // 清空已选择的接待人
- formData.userId = ""
- formData.userName = ""
- selectedUserName.value = ""
- selectedUserId.value = ""
+ // 清空已选择的接待人
+ formData.receiveId = ''
+ formData.userName = ''
+ selectedUserName.value = ''
+ selectedUserId.value = ''
- // 关闭弹窗
- closeDeptPicker()
+ // 关闭弹窗
+ closeDeptPicker()
}
// 获取部门下的用户列表
@@ -578,42 +595,42 @@ const selectUser = (user: any) => {
// 用户选择确认
const confirmUserSelect = () => {
- if (!selectedUserId.value) {
- uni.showToast({
- title: "请选择接待人",
- icon: "none",
- })
- return
- }
+ if (!selectedUserId.value) {
+ uni.showToast({
+ title: '请选择接待人',
+ icon: 'none'
+ })
+ return
+ }
- // 更新表单数据,同时保存ID和名称
- formData.userId = selectedUserId.value
- formData.userName = selectedUserName.value
+ // 更新表单数据,同时保存ID和名称
+ formData.receiveId = selectedUserId.value
+ formData.userName = selectedUserName.value
- // 关闭弹窗
- closeUserPicker()
+ // 关闭弹窗
+ closeUserPicker()
}
// 显示用户选择器
const showUserPicker = async () => {
- if (!formData.deptId) {
- uni.showToast({
- title: "请先选择到访单位",
- icon: "none",
- })
- return
- }
+ if (!formData.deptId) {
+ uni.showToast({
+ title: '请先选择到访单位',
+ icon: 'none'
+ })
+ return
+ }
- // 如果切换了部门,重新获取用户列表
- if (formData.deptId !== currentDeptId.value) {
- await getUserList(formData.deptId)
- currentDeptId.value = formData.deptId
- // 清空选择
- selectedUserId.value = ""
- selectedUserName.value = ""
- }
+ // 如果切换了部门,重新获取用户列表
+ if (formData.deptId !== currentDeptId.value) {
+ await getUserList(formData.deptId)
+ currentDeptId.value = formData.deptId
+ // 清空选择
+ selectedUserId.value = ''
+ selectedUserName.value = ''
+ }
- showUserPopup.value = true
+ showUserPopup.value = true
}
// 关闭用户选择器
@@ -660,8 +677,18 @@ onMounted(async () => {
formData.deptId = firstDept.id
formData.deptName = firstDept.name
- // 获取该部门的用户列表
- await getUserList(firstDept.id)
+ // 获取该部门的用户列表
+ await getUserList(firstDept.id)
+
+ // 设置默认的接待人(选择第一个用户)
+ if (userList.value.length > 0) {
+ const firstUser = userList.value[0]
+ selectedUserId.value = firstUser.userId
+ selectedUserName.value = firstUser.name
+ formData.receiveId = firstUser.userId
+ formData.userName = firstUser.name
+ }
+ }
// 设置默认的接待人(选择第一个用户)
if (userList.value.length > 0) {
diff --git a/src/pages/integrated/visitor/myvisitor.vue b/src/pages/integrated/visitor/myvisitor.vue
index 3d1ac70..bb1c96e 100644
--- a/src/pages/integrated/visitor/myvisitor.vue
+++ b/src/pages/integrated/visitor/myvisitor.vue
@@ -321,170 +321,159 @@ onMounted(() => {
\ No newline at end of file
diff --git a/src/pages/integrated/visitor/myyyvisitorlist.vue b/src/pages/integrated/visitor/myyyvisitorlist.vue
index bb4b466..5c100bf 100644
--- a/src/pages/integrated/visitor/myyyvisitorlist.vue
+++ b/src/pages/integrated/visitor/myyyvisitorlist.vue
@@ -46,7 +46,7 @@
拜访原因:
- {{ getReasonText(item.description) }}
+ {{ getReasonText(item.reasonValue) }}