|
|
@ -1 +1 @@
|
|||
VITE_API_BASE_URL = http://112.29.103.165:1616
|
||||
VITE_API_BASE_URL = http://192.168.0.133:58080
|
||||
|
|
@ -6208,7 +6208,8 @@
|
|||
"node_modules/dayjs": {
|
||||
"version": "1.11.13",
|
||||
"resolved": "https://repo.huaweicloud.com/repository/npm/dayjs/-/dayjs-1.11.13.tgz",
|
||||
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
|
||||
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.4.0",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
"versionName": "1.0.3",
|
||||
"versionCode": 103,
|
||||
"transformPx": false,
|
||||
|
||||
/* 5+App特有相关 */
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
|
|
@ -45,9 +46,15 @@
|
|||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>"
|
||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>"
|
||||
]
|
||||
},
|
||||
"webview": {
|
||||
"allowFileAccess": true,
|
||||
"allowUniversalAccessFromFileURLs": true
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios": {
|
||||
"permissions": {
|
||||
|
|
@ -78,7 +85,9 @@
|
|||
"idfa": false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs": {},
|
||||
"sdkConfigs": {
|
||||
"maps": {}
|
||||
},
|
||||
"icons": {
|
||||
"android": {
|
||||
"hdpi": "unpackage/res/icons/72x72.png",
|
||||
|
|
|
|||
|
|
@ -1,19 +1,30 @@
|
|||
<template>
|
||||
<!-- AR检查 -->
|
||||
<view class="ar-check-container">
|
||||
<!-- 右上角叠加模型框 -->
|
||||
<view class="stacking-modal"></view>
|
||||
|
||||
<!-- 地步操作栏 -->
|
||||
<!-- 底部操作栏 -->
|
||||
<view class="handel-bar">
|
||||
<view>
|
||||
<up-image :src="cameraIcon" mode="aspectFit" width="26" height="26" />
|
||||
<up-image
|
||||
:src="cameraIcon"
|
||||
mode="aspectFit"
|
||||
width="26"
|
||||
height="26"
|
||||
@click="takePhoto"
|
||||
/>
|
||||
</view>
|
||||
<view>检查反馈</view>
|
||||
<view>
|
||||
<up-image :src="videoIcon" mode="aspectFit" width="26" height="26" />
|
||||
<up-image
|
||||
:src="videoIcon"
|
||||
mode="aspectFit"
|
||||
width="26"
|
||||
height="26"
|
||||
@click="startRecord"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="debug-btn" @click="debug">调试</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -22,6 +33,27 @@ import { ref, onMounted } from 'vue'
|
|||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import videoIcon from '@/static/image/video.png' // 录像图标
|
||||
import cameraIcon from '@/static/image/camera.png' // 拍照图标
|
||||
|
||||
const debug = () => {
|
||||
console.log('调试')
|
||||
|
||||
const ctx = uni.requireNativePlugin('bonus-textodule"')
|
||||
ctx.openNativePage(
|
||||
{
|
||||
a: 2,
|
||||
b: 2,
|
||||
},
|
||||
(e) => {
|
||||
uni.showToast({
|
||||
title: JSON.stringify(e),
|
||||
icon: 'none',
|
||||
duration: 6000,
|
||||
})
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
onMounted(() => {})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
@ -51,8 +83,8 @@ import cameraIcon from '@/static/image/camera.png' // 拍照图标
|
|||
justify-content: center;
|
||||
|
||||
view {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
border-radius: 50%;
|
||||
background-color: #165dff;
|
||||
display: flex;
|
||||
|
|
@ -66,5 +98,17 @@ import cameraIcon from '@/static/image/camera.png' // 拍照图标
|
|||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.debug-btn {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 50%;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
<up-input
|
||||
class="code-input-ref"
|
||||
clearable
|
||||
prefixIcon="account"
|
||||
prefixIcon="email"
|
||||
placeholder="填输入右侧验证码"
|
||||
v-model="opinionModel.code"
|
||||
/>
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
</up-form-item>
|
||||
|
||||
<up-form-item>
|
||||
<up-button type="primary" text="登录" @tap="onSubmitLogin" shape="circle" />
|
||||
<up-button type="primary" text="登录" @tap="onSubmitLogin" />
|
||||
</up-form-item>
|
||||
</up-form>
|
||||
</view>
|
||||
|
|
@ -176,66 +176,69 @@ const onHandleCodeImg = async () => {
|
|||
// 登录按钮
|
||||
const onSubmitLogin = debounce(() => {
|
||||
// 原登录逻辑 调试时放开即可
|
||||
sendLoading.value = true
|
||||
loginModelRef.value
|
||||
.validate()
|
||||
.then(async (valid) => {
|
||||
if (valid) {
|
||||
try {
|
||||
console.log(
|
||||
'%c🔍 登录请求入参 %c',
|
||||
'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;',
|
||||
'',
|
||||
opinionModel.value,
|
||||
)
|
||||
const res = await loginApi(opinionModel.value)
|
||||
console.log(
|
||||
'%c🔍 登录请求出参 %c',
|
||||
'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;',
|
||||
'',
|
||||
res,
|
||||
)
|
||||
sendLoading.value = false
|
||||
if (res.code === 200) {
|
||||
memberStore.setToken(res.token)
|
||||
console.log(opinionModel.value.remember, 'opinionModel.value.remember')
|
||||
if (opinionModel.value.remember) {
|
||||
const encryptedPwd = btoa(opinionModel.value.password)
|
||||
uni.setStorageSync('userInfo', {
|
||||
username: opinionModel.value.username,
|
||||
password: encryptedPwd,
|
||||
})
|
||||
} else {
|
||||
const userInfo = uni.getStorageSync('userInfo')
|
||||
if (userInfo) {
|
||||
uni.removeStorage('userInfo')
|
||||
uni.removeStorageSync('userInfo')
|
||||
}
|
||||
}
|
||||
// getUserInfo()
|
||||
// sendLoading.value = true
|
||||
// loginModelRef.value
|
||||
// .validate()
|
||||
// .then(async (valid) => {
|
||||
// if (valid) {
|
||||
// try {
|
||||
// console.log(
|
||||
// '%c🔍 登录请求入参 %c',
|
||||
// 'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;',
|
||||
// '',
|
||||
// opinionModel.value,
|
||||
// )
|
||||
// const res = await loginApi(opinionModel.value)
|
||||
// console.log(
|
||||
// '%c🔍 登录请求出参 %c',
|
||||
// 'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;',
|
||||
// '',
|
||||
// res,
|
||||
// )
|
||||
|
||||
uni.$u.toast('登录成功')
|
||||
setTimeout(() => {
|
||||
// uni.switchTab({ url: '/pages/workbenches/index' })
|
||||
uni.navigateTo({ url: '/pages/projectSelect/index' })
|
||||
}, 500)
|
||||
} else {
|
||||
uni.$u.toast('登录失败' + res.message)
|
||||
}
|
||||
} catch (error) {
|
||||
sendLoading.value = false
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 处理验证错误
|
||||
sendLoading.value = false
|
||||
})
|
||||
// sendLoading.value = false
|
||||
|
||||
// if (res.code === 200) {
|
||||
// memberStore.setToken(res.token)
|
||||
// console.log(opinionModel.value.remember, 'opinionModel.value.remember')
|
||||
// if (opinionModel.value.remember) {
|
||||
// const encryptedPwd = btoa(opinionModel.value.password)
|
||||
// uni.setStorageSync('userInfo', {
|
||||
// username: opinionModel.value.username,
|
||||
// password: encryptedPwd,
|
||||
// })
|
||||
// } else {
|
||||
// const userInfo = uni.getStorageSync('userInfo')
|
||||
// if (userInfo) {
|
||||
// uni.removeStorage('userInfo')
|
||||
// uni.removeStorageSync('userInfo')
|
||||
// }
|
||||
// }
|
||||
// // getUserInfo()
|
||||
|
||||
// uni.$u.toast('登录成功')
|
||||
// setTimeout(() => {
|
||||
// // uni.switchTab({ url: '/pages/workbenches/index' })
|
||||
// uni.navigateTo({ url: '/pages/projectSelect/index' })
|
||||
// }, 500)
|
||||
// } else {
|
||||
// sendLoading.value = false
|
||||
// uni.$u.toast('登录失败' + res.message)
|
||||
// }
|
||||
// } catch (error) {
|
||||
// sendLoading.value = false
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {
|
||||
// // 处理验证错误
|
||||
// sendLoading.value = false
|
||||
// })
|
||||
|
||||
uni.$u.toast('登录成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({ url: '/pages/projectSelect/index' })
|
||||
}, 500)
|
||||
}, 500)
|
||||
|
||||
const checkboxChange = (value) => {
|
||||
|
|
@ -321,4 +324,13 @@ onMounted(() => {
|
|||
letter-spacing: 2rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.uni-input-placeholder {
|
||||
color: #393a3a;
|
||||
}
|
||||
|
||||
.u-border,
|
||||
.up-border {
|
||||
border-color: #777d8e !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,60 @@
|
|||
<!-- 在你的 Vue 组件中 -->
|
||||
<template>
|
||||
<!-- 地图导航 -->
|
||||
<view class="map-nav-container">
|
||||
<web-view src="/static/map.html"></web-view>
|
||||
<view class="container">
|
||||
<!-- 添加 ref 属性用于操作 WebView -->
|
||||
<!-- <web-view
|
||||
ref="baiduMap"
|
||||
:src="mapUrl"
|
||||
@message="handleMessage"
|
||||
@load="onMapLoaded"
|
||||
></web-view> -->
|
||||
|
||||
<web-view ref="mapView" src="/static/map.html" @message="handleMessage"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.map-nav-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f7f8fa;
|
||||
const baiduMap = ref(null)
|
||||
const mapUrl = ref('')
|
||||
|
||||
onMounted(() => {
|
||||
// 动态设置地图 URL,可以在这里添加参数
|
||||
mapUrl.value = '/static/map.html'
|
||||
|
||||
// 延迟发送消息给 WebView,确保它已加载完成
|
||||
setTimeout(() => {
|
||||
sendMessageToMap({ type: 'init', data: {} })
|
||||
}, 1000)
|
||||
})
|
||||
|
||||
// 处理来自 WebView 的消息
|
||||
const handleMessage = (event) => {
|
||||
const { data } = event.detail
|
||||
console.log('收到来自地图的消息:', data)
|
||||
|
||||
if (data.type === 'projectSelected') {
|
||||
// 处理项目选择事件
|
||||
onHandleSelectProject(data.project)
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
// 向 WebView 发送消息
|
||||
const sendMessageToMap = (message) => {
|
||||
if (baiduMap.value) {
|
||||
baiduMap.value.postMessage(message)
|
||||
}
|
||||
}
|
||||
|
||||
// 地图加载完成回调
|
||||
const onMapLoaded = () => {
|
||||
console.log('百度地图加载完成')
|
||||
}
|
||||
|
||||
// 处理项目选择的方法
|
||||
const onHandleSelectProject = (project) => {
|
||||
console.log('选中项目:', project)
|
||||
// 在这里添加你的业务逻辑
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -84,7 +84,15 @@ import { getProjectListApi } from '@/services/projectSelect'
|
|||
|
||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
|
||||
const projectList = ref([])
|
||||
const projectList = ref([
|
||||
{ proId: 1, proName: '项目1', level: '一级', manager: '张三', location: '北京' },
|
||||
{ proId: 2, proName: '项目2', level: '二级', manager: '李四', location: '上海' },
|
||||
{ proId: 3, proName: '项目3', level: '三级', manager: '王五', location: '广州' },
|
||||
{ proId: 4, proName: '项目4', level: '四级', manager: '赵六', location: '深圳' },
|
||||
{ proId: 5, proName: '项目5', level: '五级', manager: '孙七', location: '成都' },
|
||||
{ proId: 6, proName: '项目6', level: '六级', manager: '周八', location: '重庆' },
|
||||
{ proId: 7, proName: '项目7', level: '七级', manager: '吴九', location: '西安' },
|
||||
])
|
||||
const total = ref(100)
|
||||
|
||||
// 定义查询条件
|
||||
|
|
@ -140,7 +148,7 @@ const onHandleSelectProject = (item) => {
|
|||
}
|
||||
|
||||
onMounted(() => {
|
||||
getProjectList()
|
||||
// getProjectList()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
>
|
||||
<up-row justify="space-between" gutter="10">
|
||||
<up-col span="5.5">
|
||||
<up-form-item prop="projectName" label="勘察项目名称">
|
||||
<up-form-item prop="projectName" label="项目名称">
|
||||
<up-input
|
||||
clearable
|
||||
disabled
|
||||
|
|
@ -99,13 +99,36 @@
|
|||
</up-row>
|
||||
<up-row justify="space-between" gutter="10">
|
||||
<up-col span="5.5">
|
||||
<up-form-item prop="surveyAttach" label="勘察附件" required>
|
||||
<up-form-item prop="fileList" label="勘察附件" required>
|
||||
<!-- <up-input
|
||||
clearable
|
||||
placeholder="填输入勘察项目名称"
|
||||
v-model="addOrEditFormModel.proName"
|
||||
/> -->
|
||||
<up-button type="primary" text="上传附件" size="mini" />
|
||||
<!-- <up-button type="primary" text="上传附件" size="small" /> -->
|
||||
<view
|
||||
:key="index"
|
||||
class="file-list-show"
|
||||
v-for="(item, index) in addOrEditFormModel.fileList"
|
||||
>
|
||||
附件 {{ index + 1 }}
|
||||
|
||||
<!-- 右上角删除按钮 -->
|
||||
<up-icon
|
||||
size="22"
|
||||
color="#333"
|
||||
class="delete-icon"
|
||||
name="close-circle-fill"
|
||||
@click="onHandleDelete(index)"
|
||||
/>
|
||||
</view>
|
||||
<view
|
||||
class="upload-box"
|
||||
@click="onHandleUpload"
|
||||
v-if="addOrEditFormModel.fileList.length < 6"
|
||||
>
|
||||
<up-icon name="camera-fill" size="26" color="#d3d4d6" />
|
||||
</view>
|
||||
</up-form-item>
|
||||
</up-col>
|
||||
</up-row>
|
||||
|
|
@ -113,7 +136,7 @@
|
|||
<up-row justify="flex-end" gutter="10">
|
||||
<up-col span="1">
|
||||
<up-form-item>
|
||||
<up-button text="取消" size="mini" />
|
||||
<up-button text="取消" size="small" />
|
||||
</up-form-item>
|
||||
</up-col>
|
||||
<up-col span="1">
|
||||
|
|
@ -121,7 +144,7 @@
|
|||
<up-button
|
||||
type="primary"
|
||||
text="确认"
|
||||
size="mini"
|
||||
size="small"
|
||||
@click="onHandleSubmit"
|
||||
/>
|
||||
</up-form-item>
|
||||
|
|
@ -135,9 +158,9 @@
|
|||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { addSurveyDataApi } from '@/services/survey.js'
|
||||
import { addSurveyDataApi, getSurveyDataDetailApi, editSurveyDataApi } from '@/services/survey.js'
|
||||
import dayjs from 'dayjs'
|
||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
|
||||
const projectName = ref('')
|
||||
const addOrEditFormModelRef = ref(null)
|
||||
const addOrEditFormModel = ref({
|
||||
|
|
@ -149,7 +172,8 @@ const addOrEditFormModel = ref({
|
|||
surveyContent: '', // 勘察内容
|
||||
modelId: '3', // 模型id
|
||||
surveyResult: '', // 勘察结果
|
||||
surveyAttach: '测试', // 勘察附件
|
||||
surveyAttach: '', // 勘察附件
|
||||
fileList: [],
|
||||
})
|
||||
const addOrEditFormRules = ref({
|
||||
date: [
|
||||
|
|
@ -161,9 +185,9 @@ const addOrEditFormRules = ref({
|
|||
surveyResult: [
|
||||
{ type: 'string', required: true, message: '请输入勘察结果', trigger: ['blur', 'change'] },
|
||||
],
|
||||
surveyAttach: [
|
||||
{ type: 'string', required: true, message: '请上传勘察附件', trigger: ['blur', 'change'] },
|
||||
],
|
||||
// fileList: [
|
||||
// { type: 'string', required: true, message: '请上传勘察附件', trigger: ['blur', 'change'] },
|
||||
// ],
|
||||
})
|
||||
|
||||
// 返回操作
|
||||
|
|
@ -173,56 +197,87 @@ const onHandleLeftClick = () => {
|
|||
})
|
||||
}
|
||||
|
||||
// 把时间戳转为xxxx-xx-xx格式
|
||||
const formatter = (value) => {
|
||||
const date = new Date(Number(value))
|
||||
const year = date.getFullYear()
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0') // 月份补零
|
||||
const day = String(date.getDate()).padStart(2, '0') // 日期补零
|
||||
return `${year}-${month}-${day}`
|
||||
}
|
||||
|
||||
// 日期确认
|
||||
const onHandleConfirm = (e) => {
|
||||
console.log(e)
|
||||
// 把时间戳转为xxxx-xx-xx格式
|
||||
}
|
||||
|
||||
// 上传附件
|
||||
const onHandleUpload = () => {
|
||||
uni.chooseFile({
|
||||
count: 6, // 选择文件的数量
|
||||
// type: 'all', // 可以指定为 'all'(全部)、'image'、'video'、'file'(仅H5)
|
||||
extension: ['.doc', '.docx', '.pdf', '.xls', '.xlsx'], // 指定文件后缀名(H5和App有效)
|
||||
success: (res) => {
|
||||
const tempFilePaths = res.tempFiles[0].path // 获取文件路径
|
||||
uni.uploadFile({
|
||||
url: '/common/uploadFile',
|
||||
filePath: tempFilePaths,
|
||||
name: 'file',
|
||||
formData: {
|
||||
file: 'file',
|
||||
},
|
||||
success: (res) => {
|
||||
const result = JSON.parse(res.data)
|
||||
if (result.code === 200) {
|
||||
addOrEditFormModel.value.fileList.push(result.data)
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('上传失败', err)
|
||||
},
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('选择文件失败', err)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
// 删除附件
|
||||
const onHandleDelete = (index) => {
|
||||
addOrEditFormModel.value.fileList.splice(index, 1)
|
||||
}
|
||||
|
||||
// 确认提交按钮
|
||||
const onHandleSubmit = () => {
|
||||
console.log(addOrEditFormModel.value, '表单数据')
|
||||
|
||||
addOrEditFormModelRef.value.validate().then(async (valid) => {
|
||||
if (valid) {
|
||||
console.log(addOrEditFormModel.value, '表单数据')
|
||||
if (addOrEditFormModel.value.fileList.length === 0) {
|
||||
uni.$u.toast('请上传勘察附件')
|
||||
return
|
||||
}
|
||||
|
||||
const {
|
||||
projectName, // 勘察项目名称
|
||||
proId, // 勘察项目ID
|
||||
surveyUser, // 勘察人
|
||||
surveyTime, // 勘察日期转换后
|
||||
surveyContent, // 勘察内容
|
||||
modelId, // 模型id
|
||||
surveyResult, // 勘察结果
|
||||
surveyAttach, // 勘察附件
|
||||
date,
|
||||
fileList,
|
||||
} = addOrEditFormModel.value
|
||||
|
||||
const params = {
|
||||
projectName, // 勘察项目名称
|
||||
proId, // 勘察项目ID
|
||||
surveyUser, // 勘察人
|
||||
surveyTime, // 勘察日期转换后
|
||||
surveyTime: dayjs(date).format('YYYY-MM-DD'), // 勘察日期转换后
|
||||
surveyContent, // 勘察内容
|
||||
modelId, // 模型id
|
||||
surveyResult, // 勘察结果
|
||||
surveyAttach, // 勘察附件
|
||||
surveyAttach: fileList.map((item) => item.url).join(','), // 勘察附件
|
||||
}
|
||||
params.surveyTime = formatter(date)
|
||||
|
||||
const res = await addSurveyDataApi(addOrEditFormModel.value)
|
||||
const API = addOrEditFormModel.value.id ? editSurveyDataApi : addSurveyDataApi
|
||||
if (addOrEditFormModel.value.id) {
|
||||
params.id = addOrEditFormModel.value.id
|
||||
}
|
||||
const res = await API(params)
|
||||
if (res.code === 200) {
|
||||
uni.$u.toast('新增成功')
|
||||
|
||||
uni.$u.toast(addOrEditFormModel.value.id ? '修改成功' : '新增成功')
|
||||
// 返回后触发更新列表
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
|
|
@ -238,8 +293,30 @@ const onHandleSubmit = () => {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询详情
|
||||
const getSurveyDataDetail = async () => {
|
||||
const res = await getSurveyDataDetailApi(addOrEditFormModel.value.id)
|
||||
|
||||
console.log(res, 'res详情')
|
||||
const { surveyUser, surveyTime, surveyContent, modelId, surveyResult, surveyAttach } = res.data
|
||||
addOrEditFormModel.value.surveyUser = surveyUser
|
||||
addOrEditFormModel.value.date = dayjs(surveyTime).valueOf() // 把日期转成时间戳
|
||||
addOrEditFormModel.value.surveyContent = surveyContent
|
||||
addOrEditFormModel.value.modelId = modelId
|
||||
addOrEditFormModel.value.surveyResult = surveyResult
|
||||
addOrEditFormModel.value.fileList = surveyAttach?.split(',')
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
projectName.value = options?.projectName + '--勘察填报'
|
||||
// 判断是否为修改
|
||||
if (options?.isType === 'add') {
|
||||
addOrEditFormModel.value.id = null
|
||||
} else {
|
||||
addOrEditFormModel.value.id = options?.id
|
||||
getSurveyDataDetail()
|
||||
}
|
||||
projectName.value =
|
||||
options?.projectName + '--勘察' + (options?.isType === 'add' ? '填报' : '修改')
|
||||
addOrEditFormModel.value.proId = options?.proId
|
||||
addOrEditFormModel.value.projectName = options?.projectName
|
||||
})
|
||||
|
|
@ -252,4 +329,29 @@ onLoad((options) => {
|
|||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.upload-box,
|
||||
.file-list-show {
|
||||
width: 88px;
|
||||
height: 88px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #f4f5f7;
|
||||
border-radius: 10rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.file-list-show {
|
||||
margin-right: 6px;
|
||||
position: relative;
|
||||
|
||||
.delete-icon {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -10,17 +10,23 @@
|
|||
:style="{ paddingTop: safeAreaInsets?.top + 44 + 'px' }"
|
||||
>
|
||||
<up-row :gutter="10" class="project-select-row">
|
||||
<up-col span="3"> </up-col>
|
||||
<!-- <up-col span="3">
|
||||
<up-input placeholder="项目类型" border="surround" v-model="queryParams.proType" />
|
||||
</up-col>
|
||||
<up-col span="3">
|
||||
<up-input
|
||||
border="surround"
|
||||
placeholder="项目经理"
|
||||
v-model="queryParams.proManager"
|
||||
/>
|
||||
</up-col> -->
|
||||
<up-datetime-picker
|
||||
hasInput
|
||||
placeholder="请选择日期"
|
||||
mode="date"
|
||||
:inputProps="{
|
||||
border: 'surround',
|
||||
shape: 'square',
|
||||
inputAlign: 'center',
|
||||
suffixIcon: 'calendar',
|
||||
}"
|
||||
v-model="queryDate"
|
||||
@confirm="onHandleConfirm"
|
||||
>
|
||||
</up-datetime-picker>
|
||||
</up-col>
|
||||
|
||||
<up-col span="3">
|
||||
<view class="project-select-button-box">
|
||||
<up-button type="primary" text="查询" @click="onHandleSearch" />
|
||||
|
|
@ -69,12 +75,26 @@
|
|||
<up-col class="table-td" span="1"> {{ item.surveyContent }} </up-col>
|
||||
<up-col class="table-td" span="1"> {{ item.modelId }} </up-col>
|
||||
<up-col class="table-td" span="1"> {{ item.projectName }} </up-col>
|
||||
<up-col class="table-td" span="1"> {{ item.surveyAttach }} </up-col>
|
||||
<up-col class="table-td" span="1" style="color: #007aff">
|
||||
{{ item.surveyAttach?.split(',').length || 0 }}
|
||||
</up-col>
|
||||
<up-col class="table-td" span="2"> {{ item.surveyResult }} </up-col>
|
||||
<up-col class="table-td" span="1.5">
|
||||
<view>
|
||||
<up-button type="primary" text="编辑" size="mini" />
|
||||
<up-button type="error" text="删除" size="mini" />
|
||||
<view style="display: flex; justify-content: space-between">
|
||||
<up-button
|
||||
type="primary"
|
||||
text="编辑"
|
||||
size="small"
|
||||
style="width: 45%"
|
||||
@click="onHandleEdit(item)"
|
||||
/>
|
||||
<up-button
|
||||
type="error"
|
||||
text="删除"
|
||||
size="small"
|
||||
style="width: 45%"
|
||||
@click="onHandleDelete(item)"
|
||||
/>
|
||||
</view>
|
||||
</up-col>
|
||||
</up-row>
|
||||
|
|
@ -91,23 +111,38 @@
|
|||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<up-modal
|
||||
title="温馨提示"
|
||||
:show="showModalDelete"
|
||||
:showCancelButton="true"
|
||||
@cancel="onCancelDelete"
|
||||
@confirm="onConfirmDelete"
|
||||
content="是否确认永久删除该数据?"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, onUnmounted } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { getProjectListApi } from '@/services/projectSelect'
|
||||
import { getSurveyDataListApi } from '@/services/survey.js'
|
||||
import { getSurveyDataListApi, deleteSurveyDataApi } from '@/services/survey.js'
|
||||
import dayjs from 'dayjs'
|
||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
|
||||
const projectName = ref('')
|
||||
const proId = ref('')
|
||||
const projectList = ref([])
|
||||
const total = ref(100)
|
||||
const projectName = ref('') // 项目名称
|
||||
const proId = ref('') // 项目id
|
||||
const projectList = ref([]) // 项目列表
|
||||
const total = ref(0) // 总条数
|
||||
const showModalDelete = ref(false) // 是否显示删除弹窗
|
||||
const deleteId = ref('') // 删除id
|
||||
const queryDate = ref(Date.now()) // 查询日期
|
||||
|
||||
// 查询参数
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
surveyTime: '',
|
||||
})
|
||||
|
||||
// 返回操作
|
||||
|
|
@ -131,21 +166,49 @@ const onHandleCurrentChange = (page) => {
|
|||
// 新建
|
||||
const onHandleAdd = () => {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/siteSurvey/addOrEditForm?projectName=' +
|
||||
projectName.value +
|
||||
'&proId=' +
|
||||
proId.value,
|
||||
url: `/pages/siteSurvey/addOrEditForm?projectName=${projectName.value}&proId=${proId.value}&isType=add`,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取项目数据
|
||||
const getSurveyDataList = async () => {
|
||||
queryParams.value.surveyTime = dayjs(queryDate.value).format('YYYY-MM-DD')
|
||||
const res = await getSurveyDataListApi(queryParams.value)
|
||||
projectList.value = res?.rows
|
||||
total.value = res?.total
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const onHandleEdit = (item) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/siteSurvey/addOrEditForm?projectName=${projectName.value}&proId=${proId.value}&id=${item.id}&isType=edit`,
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
const onHandleDelete = (item) => {
|
||||
showModalDelete.value = true
|
||||
deleteId.value = item.id
|
||||
}
|
||||
|
||||
// 取消删除
|
||||
const onCancelDelete = () => {
|
||||
showModalDelete.value = false
|
||||
}
|
||||
|
||||
// 确认删除
|
||||
const onConfirmDelete = async () => {
|
||||
// showModalDelete.value = false
|
||||
const res = await deleteSurveyDataApi(deleteId.value)
|
||||
if (res.code === 200) {
|
||||
uni.$u.toast('删除成功')
|
||||
getSurveyDataList()
|
||||
} else {
|
||||
uni.$u.toast('删除失败')
|
||||
}
|
||||
showModalDelete.value = false
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
projectName.value = options?.projectName
|
||||
proId.value = options?.proId
|
||||
|
|
|
|||
|
|
@ -8,6 +8,14 @@ export const addSurveyDataApi = (data) => {
|
|||
data,
|
||||
})
|
||||
}
|
||||
// 修改现场勘察填报数据
|
||||
export const editSurveyDataApi = (data) => {
|
||||
return http({
|
||||
method: 'PUT',
|
||||
url: '/survey',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 获取现场勘察填报数据列表
|
||||
export const getSurveyDataListApi = (data) => {
|
||||
return http({
|
||||
|
|
@ -16,3 +24,25 @@ export const getSurveyDataListApi = (data) => {
|
|||
data,
|
||||
})
|
||||
}
|
||||
// 删除现场勘察填报数据
|
||||
export const deleteSurveyDataApi = (id) => {
|
||||
return http({
|
||||
method: 'DELETE',
|
||||
url: `/survey/${id}`,
|
||||
})
|
||||
}
|
||||
// 查询现场勘察填报数据详情
|
||||
export const getSurveyDataDetailApi = (id) => {
|
||||
return http({
|
||||
method: 'GET',
|
||||
url: `/survey/${id}`,
|
||||
})
|
||||
}
|
||||
// 上传附件
|
||||
export const uploadFileApi = (data) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/survey/uploadFile',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<script async src="https://api.map.baidu.com/api?v=2.0&ak=cClgLBaLgGUdQDilX9dGvieL"></script>
|
||||
<script src="https://api.map.baidu.com/api?type=webgl&v=2.0&ak=cClgLBaLgGUdQDilX9dGvieL"></script>
|
||||
<script type="text/javascript" src="//api.map.baidu.com/library/TrackAnimation/src/TrackAnimation_min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="https://api.map.baidu.com/api?v=3.0&&type=webgl&ak=cClgLBaLgGUdQDilX9dGvieL"></script>
|
||||
|
||||
<title>百度地图</title>
|
||||
<style>
|
||||
#map-container {
|
||||
|
|
@ -24,13 +26,17 @@
|
|||
|
||||
<body>
|
||||
<div id="map-container"></div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
|
||||
document.addEventListener('UniAppJSBridgeReady', function () {
|
||||
const map = new BMapGL.Map('map-container') // 创建地图实例
|
||||
let point = new BMapGL.Point(117.13805, 31.8734) // 创建点坐标
|
||||
map.centerAndZoom(point, 12) // 初始化地图,设置中心点坐标和地图级别
|
||||
map.enableScrollWheelZoom(true) // 启用滚轮放大缩小
|
||||
})
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -51,7 +51,7 @@ export const http = (options) => {
|
|||
uni.request({
|
||||
...options,
|
||||
success(res) {
|
||||
console.log(res, 'res')
|
||||
console.log(res, 'res--')
|
||||
// 1. 判断是否请求成功
|
||||
if (res.statusCode >= 200 && res.statusCode < 300) {
|
||||
if (res.data.code >= 200 && res.data.code < 300) {
|
||||
|
|
@ -74,6 +74,7 @@ export const http = (options) => {
|
|||
icon: 'none',
|
||||
title: res?.data?.msg,
|
||||
})
|
||||
reject(res)
|
||||
}
|
||||
} else if (res.statusCode === 401) {
|
||||
// 2. 401 表示token过期 去往登录页重新登录
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>View</title>
|
||||
<link rel="icon" href="data:,">
|
||||
<link rel="stylesheet" href="app.css" />
|
||||
<script>var __uniConfig = {"globalStyle":{},"darkmode":false}</script>
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="uni-app-view.umd.js"></script>
|
||||
<script src="app-wxs.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
;(function(){
|
||||
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
|
||||
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F5F4F5","navigationBar":{"backgroundColor":"#F5F4F5","titleText":"AR水运","type":"default","titleColor":"#333"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"AR水运","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.57","entryPagePath":"pages/login/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
||||
const __uniRoutes = [{"path":"pages/login/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"custom","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/projectSelect/index","meta":{"navigationBar":{"titleText":"项目选择","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/workHome/index","meta":{"navigationBar":{"titleText":"custom","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/mapNav/index","meta":{"navigationBar":{"titleText":"custom","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/arCheck/index","meta":{"navigationBar":{"titleText":"custom","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/siteSurvey/index","meta":{"navigationBar":{"titleText":"custom","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/siteSurvey/addOrEditForm","meta":{"navigationBar":{"titleText":"custom","style":"custom","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
__uniConfig.styles=[];//styles
|
||||
__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()})}});
|
||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:16})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:u,window:u,document:u,frames:u,self:u,location:u,navigator:u,localStorage:u,history:u,Caches:u,screen:u,alert:u,confirm:u,prompt:u,fetch:u,XMLHttpRequest:u,WebSocket:u,webkit:u,print:u}}}});
|
||||
})();
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
(function(){})();
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
var __wxsModules={};
|
||||
__wxsModules["5126814f"]=(()=>{var v=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var p=v((f,c)=>{function W(r,t){var l=r.detail,a=l.scrollWidth,o=l.scrollLeft,i=r.currentTarget.dataset,e=i.scrollWidth||i.scrollwidth||0,s=i.indicatorWidth||i.indicatorwidth||0,n=i.barWidth||i.barwidth||0,h=o/(a-e)*(s-n);d(t,h)}function _(r,t){t.callMethod("scrollEvent","right");var l=r.currentTarget.dataset,a=l.indicatorWidth||l.indicatorwidth||0,o=l.barWidth||l.barwidth||0;d(t,a-o)}function u(r,t){t.callMethod("scrollEvent","left"),d(t,0)}function d(r,t){r.selectComponent(".u-scroll-list__indicator__line__bar")&&r.selectComponent(".u-scroll-list__indicator__line__bar").setStyle({transform:"translateX("+t+"px)"})}c.exports={scroll:W,scrolltolower:_,scrolltoupper:u}});return p();})();
|
||||
|
||||
__wxsModules["973234d6"]=(()=>{var c=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports);var M=c((A,v)=>{function b(t,r){var s=t.instance,a=s.getState();if(!a.disabled){var e=t.touches;e&&e.length>1||(a.moving=!0,a.startX=e[0].pageX,a.startY=e[0].pageY,r.callMethod("closeOther"))}}function m(t,r){var s=t.instance,a=s.getState();if(!(a.disabled||!a.moving)){var e=t.touches,i=e[0].pageX,n=e[0].pageY,o=i-a.startX,u=n-a.startY,f=a.buttonsWidth;(Math.abs(o)>Math.abs(u)||Math.abs(o)>a.threshold)&&(t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation()),!(Math.abs(o)<Math.abs(u))&&(a.status==="open"?(o<0&&(o=0),o>f&&(o=f),g(-f+o,s,r)):(o>0&&(o=0),Math.abs(o)>f&&(o=-f),g(o,s,r)))}}function S(t,r){var s=t.instance,a=s.getState();if(!(!a.moving||a.disabled)){var e=t.changedTouches?t.changedTouches[0]:{},i=e.pageX,n=e.pageY,o=i-a.startX;if(a.status==="open"){if(o<0)return;if(o===0)return h(s,r);Math.abs(o)<a.threshold?l(s,r):h(s,r)}else{if(o>0)return;Math.abs(o)<a.threshold?h(s,r):l(s,r)}}}function p(t){return t.toString().indexOf("s")>=0?t:t>30?t+"ms":t+"s"}function g(t,r,s){var a=r.getState(),e=s.selectAllComponents(".u-swipe-action-item__right__button");r.requestAnimationFrame(function(){r.setStyle({transition:"none",transform:"translateX("+t+"px)","-webkit-transform":"translateX("+t+"px)"})})}function l(t,r){var s=t.getState(),a=r.selectAllComponents(".u-swipe-action-item__right__button"),e=p(s.duration),i=-s.buttonsWidth;t.requestAnimationFrame(function(){t.setStyle({transition:"transform "+e,transform:"translateX("+i+"px)","-webkit-transform":"translateX("+i+"px)"})}),d("open",t,r)}function d(t,r,s){var a=r.getState();a.status=t,s.callMethod("setState",t)}function h(t,r){var s=t.getState(),a=r.selectAllComponents(".u-swipe-action-item__right__button"),e=a.length,i=p(s.duration);t.requestAnimationFrame(function(){t.setStyle({transition:"transform "+i,transform:"translateX(0px)","-webkit-transform":"translateX(0px)"});for(var n=e-1;n>=0;n--)a[n].setStyle({transition:"transform "+i,transform:"translateX(0px)","-webkit-transform":"translateX(0px)"})}),d("close",t,r)}function X(t,r,s,a){var e=a.getState();e.disabled||(t==="close"&&e.status==="open"?h(a,s):t==="open"&&e.status==="close"&&l(a,s))}function _(t,r,s,a){var e=a.getState();if(!(!e||!t)){if(e.disabled=t.disabled,e.duration=t.duration,e.show=t.show,e.threshold=t.threshold,e.buttons=t.buttons,e.buttons)for(var i=e.buttons.length,n=0,o=t.buttons,u=0;u<i;u++)n+=o[u].width;e.buttonsWidth=n,e.show&&l(a,s)}}v.exports={touchstart:b,touchmove:m,touchend:S,sizeChange:_,statusChange:X}});return M();})();
|
||||
|
||||
__wxsModules["5e7f39f7"]=(()=>{var u=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var i=u((l,t)=>{var n={abbr:!0,b:!0,big:!0,code:!0,del:!0,em:!0,i:!0,ins:!0,label:!0,q:!0,small:!0,span:!0,strong:!0,sub:!0,sup:!0};t.exports={isInline:function(r,e){return n[r]||(e||"").indexOf("display:inline")!==-1}}});return i();})();
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__F75AFA9","name":"AR水运","version":{"name":"1.0.3","code":103},"description":"AR水运","developer":{"name":"","email":"","url":""},"permissions":{"Barcode":{},"Camera":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"compatible":{"ignoreVersion":true},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F5F4F5"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"control":"uni-v3","vueVersion":"3","compilerVersion":"4.57","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal","webView":{"minUserAgentVersion":"49.0"}}},"app-harmony":{"useragent":{"value":"uni-app","concatenate":true},"uniStatistics":{"enable":false}},"launch_path":"__uniappview.html"}
|
||||
|
|
@ -0,0 +1 @@
|
|||
.ar-check-container[data-v-9de9b339]{width:100%;height:100%;background:url(../../static/image/login_bg_new.png) no-repeat center center;background-size:cover;position:relative}.ar-check-container .stacking-modal[data-v-9de9b339]{position:absolute;top:.625rem;right:.625rem;width:3.125rem;height:3.125rem;background:rgba(255,255,255,.9);border-radius:.3125rem}.ar-check-container .handel-bar[data-v-9de9b339]{position:absolute;bottom:.625rem;left:0;width:100%;display:flex;justify-content:center}.ar-check-container .handel-bar uni-view[data-v-9de9b339]{width:68px;height:68px;border-radius:50%;background-color:#165dff;display:flex;align-items:center;justify-content:center}.ar-check-container .handel-bar uni-view[data-v-9de9b339]:nth-child(2){margin:0 .375rem;font-size:12px;color:#fff}.ar-check-container .debug-btn[data-v-9de9b339]{position:absolute;top:.625rem;right:50%;width:3.125rem;height:3.125rem;background:rgba(255,255,255,.9);border-radius:.3125rem;text-align:center;line-height:3.125rem}
|
||||
|
After Width: | Height: | Size: 676 B |
|
After Width: | Height: | Size: 2.8 MiB |
|
After Width: | Height: | Size: 465 B |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="https://api.map.baidu.com/api?v=3.0&&type=webgl&ak=cClgLBaLgGUdQDilX9dGvieL"></script>
|
||||
|
||||
<title>百度地图</title>
|
||||
<style>
|
||||
#map-container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/** 去除百度地图的水印和logo */
|
||||
.BMap_cpyCtrl,
|
||||
.anchorBL {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="map-container"></div>
|
||||
</body>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
document.addEventListener('UniAppJSBridgeReady', function () {
|
||||
const map = new BMapGL.Map('map-container') // 创建地图实例
|
||||
let point = new BMapGL.Point(117.13805, 31.8734) // 创建点坐标
|
||||
map.centerAndZoom(point, 12) // 初始化地图,设置中心点坐标和地图级别
|
||||
map.enableScrollWheelZoom(true) // 启用滚轮放大缩小
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
|
@ -9,7 +9,7 @@ export default defineConfig({
|
|||
// 在此处编写代理规则
|
||||
'/api': {
|
||||
// target: 'http://112.29.103.165:1616', // 测试环境
|
||||
target: 'http://192.168.0.133:58080', // 测试环境
|
||||
target: 'http://192.168.0.133:58080', // 梁超
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => {
|
||||
return path.replace(/\/api/, '')
|
||||
|
|
|
|||