Browse Source

debug 街道号

dev
巴林闲侠 1 year ago
parent
commit
ba7049dfbf
  1. 31
      weapp/src/packages/patrol/index.jsx
  2. 4
      web/client/src/sections/fillion/nav-item.js

31
weapp/src/packages/patrol/index.jsx

@ -160,8 +160,8 @@ const Index = () => {
Taro.getLocation({
// type: 'wgs84',
type: 'gcj02',
isHighAccuracy: true,
// isHighAccuracy: false,
// isHighAccuracy: true,
isHighAccuracy: false,
highAccuracyExpireTime: 1000 * 6,
success: function (res) {
setLongitude(res.longitude)
@ -169,6 +169,7 @@ const Index = () => {
Taro.request({
url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=${key}`,
success: function (res) {
console.log('地址:::', res);
// res
let addresscity = ''
addresscity =
@ -246,7 +247,7 @@ const Index = () => {
])
}, [reportType])
function report() {
function report () {
if (!canReport) { return }
if (
(isPatrol && (!projectType || !road))
@ -322,7 +323,7 @@ const Index = () => {
})
}
function deleteReport() {
function deleteReport () {
Taro.showModal({
title: '提示',
content: '确定删除吗?',
@ -349,7 +350,7 @@ const Index = () => {
})
}
function handleInput({ detail: { value } }, type) {
function handleInput ({ detail: { value } }, type) {
switch (type) {
case 'roadSectionStart':
setRoadSectionStart(value)
@ -384,15 +385,15 @@ const Index = () => {
}
}
function handleTypeChange(e) {
function handleTypeChange (e) {
setReportType(e.detail.value)
}
function handleImgChange(files, operationType, index, type) {
function handleImgChange (files, operationType, index, type) {
if (operationType === 'remove') {
setImg(false)
}
function setImg(isAdd, url) {
function setImg (isAdd, url) {
switch (type) {
case 'scenePic':
let nextImg = sceneImg
@ -492,12 +493,12 @@ const Index = () => {
}
}
function handleImgClick(index, file) {
function handleImgClick (index, file) {
Taro.previewImage({
urls: [file.url] // http
})
}
function handleImgClicks(index, file) {
function handleImgClicks (index, file) {
Taro.previewImage({
urls: [file] // http
})
@ -519,7 +520,7 @@ const Index = () => {
}
}
}, [road])
function handleOk() {
function handleOk () {
if (!canReport) { return }
let str = handleCenter.trim()
if (!str) {
@ -564,17 +565,17 @@ const Index = () => {
}
})
}
function addVideo() {
function addVideo () {
wx.chooseMedia({
count: 1,
mediaType: ['video'],
sourceType: ['album', 'camera'],
maxDuration: 15,
camera: 'back',
success(res) {
console.log(res,'上传的视频');
success (res) {
console.log(res, '上传的视频');
const tempFilePaths = res.tempFiles[0].tempFilePath
setVideo(res.tempFiles[0].tempFilePath)
let token = getState('token') || Taro.getStorageSync('token')
Taro.uploadFile({

4
web/client/src/sections/fillion/nav-item.js

@ -95,10 +95,10 @@ export function getNavItem(user, dispatch) {
<Menu.Item key="fillionassess">
<Link to="/fillion/assess">考核评分</Link>
</Menu.Item> : ''}
{/* {user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'VIDEOCENTER') ?
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'VIDEOCENTER') ?
<Menu.Item key="fillionvideoCenter">
<Link to="/fillion/videoCenter">视频中心</Link>
</Menu.Item> : ''} */}
</Menu.Item> : ''}
</SubMenu> : null
);
}

Loading…
Cancel
Save