自测修复
This commit is contained in:
parent
f24b443062
commit
0b41710b70
|
|
@ -1 +1 @@
|
|||
VITE_API_BASE_URL = /api
|
||||
VITE_API_BASE_URL = http://192.168.0.14:11997
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { useCommonStore } from '@/stores/index'
|
||||
const commonStore = useCommonStore()
|
||||
import { useCommonStore } from '@/stores'
|
||||
|
||||
|
||||
export function useCommon() {
|
||||
const commonStore = useCommonStore()
|
||||
// 获取项目数据(自动处理缓存)
|
||||
const getProjectList = async () => {
|
||||
return await commonStore.getProjectList()
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { createSSRApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import pinia from './stores/index'
|
||||
import uviewPlus from 'uview-plus'
|
||||
import App from './App.vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
app.use(pinia)
|
||||
app.use(uviewPlus)
|
||||
app.use(pinia)
|
||||
return {
|
||||
app,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
width="100%"
|
||||
height="120"
|
||||
:src="icon.imgUrl"
|
||||
@tap="onHandleImage(icon.imgUrl)"
|
||||
mode="aspectFit"
|
||||
@tap="onHandleImage(icon)"
|
||||
/>
|
||||
<view class="collect">
|
||||
<view>{{ icon.uploadTime }}</view>
|
||||
|
|
@ -42,7 +43,7 @@
|
|||
<!-- 展示图片 -->
|
||||
<up-popup :show="showImg" mode="center" @close="showImg = !showImg" bgColor="transparent">
|
||||
<view class="img-show-box">
|
||||
<up-image width="100%" height="100%" :src="showImgUrl" />
|
||||
<up-image width="100%" height="100%" :src="showImgUrl" mode="aspectFit" />
|
||||
<view class="upload-btn">
|
||||
<view @tap="onHandleYtUpload"> 原图下载 </view>
|
||||
<view @tap="onHandleSyUpload"> 水印下载 </view>
|
||||
|
|
@ -64,13 +65,24 @@
|
|||
<script setup>
|
||||
import { computed, ref, reactive } from 'vue'
|
||||
import { useMemberStore } from '@/stores'
|
||||
import { editCollectTypeApi } from '@/services/comprehensiveQuery.js'
|
||||
import { editCollectTypeApi, getGenerateWatermarkImgApi } from '@/services/comprehensiveQuery.js'
|
||||
|
||||
const memberStore = useMemberStore()
|
||||
const token = memberStore.token
|
||||
const token = memberStore?.token
|
||||
const baseURL = import.meta.env.VITE_API_BASE_URL // 获取当前的url地址
|
||||
|
||||
const showModalCollect = ref(false)
|
||||
const collectContent = ref('')
|
||||
|
||||
// 水印图查询参数
|
||||
const watermarkQueryParams = reactive({
|
||||
uploadTime: '',
|
||||
proName: '',
|
||||
uploadTypeName: '',
|
||||
sourceType: '',
|
||||
sourceTypeName: '',
|
||||
})
|
||||
|
||||
const collectEditParams = ref({
|
||||
id: '',
|
||||
collectType: '',
|
||||
|
|
@ -125,9 +137,29 @@ const onConfirmCollect = async () => {
|
|||
}
|
||||
|
||||
// 点击图片
|
||||
const onHandleImage = (url) => {
|
||||
console.log('图片点击了', url)
|
||||
showImgUrl.value = url
|
||||
const onHandleImage = (icon) => {
|
||||
console.log('图片点击了', icon)
|
||||
|
||||
const {
|
||||
uploadTime,
|
||||
proName,
|
||||
uploadTypeName,
|
||||
sourceType,
|
||||
sourceTypeName,
|
||||
id,
|
||||
originalFilePath,
|
||||
} = icon
|
||||
|
||||
Object.assign(watermarkQueryParams, {
|
||||
uploadTime,
|
||||
proName,
|
||||
uploadTypeName,
|
||||
sourceType,
|
||||
sourceTypeName,
|
||||
id,
|
||||
originalFilePath,
|
||||
})
|
||||
showImgUrl.value = icon.imgUrl
|
||||
showImg.value = true
|
||||
}
|
||||
|
||||
|
|
@ -142,11 +174,56 @@ const setBackgroundColor = (type) => {
|
|||
|
||||
// 原图下载
|
||||
const onHandleYtUpload = () => {
|
||||
showImg.value = false
|
||||
downloadImage(showImgUrl.value)
|
||||
}
|
||||
|
||||
const downloadImage = async (imageUrl) => {
|
||||
try {
|
||||
// 显示加载中
|
||||
uni.showLoading({
|
||||
title: '下载中...',
|
||||
})
|
||||
|
||||
// 第一步:下载文件到本地
|
||||
const { tempFilePath } = await uni.downloadFile({
|
||||
url: imageUrl,
|
||||
})
|
||||
|
||||
// 第二步:保存到相册
|
||||
await uni.saveImageToPhotosAlbum({
|
||||
filePath: tempFilePath,
|
||||
})
|
||||
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '保存成功',
|
||||
icon: 'none',
|
||||
})
|
||||
|
||||
showImg.value = false
|
||||
} catch (error) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '保存失败',
|
||||
icon: 'none',
|
||||
})
|
||||
showImg.value = false
|
||||
// console.error('下载失败:', error)
|
||||
}
|
||||
}
|
||||
// 水印下载
|
||||
const onHandleSyUpload = () => {
|
||||
showImg.value = false
|
||||
const onHandleSyUpload = async () => {
|
||||
const res = await getGenerateWatermarkImgApi(watermarkQueryParams)
|
||||
if (res.code === 200) {
|
||||
downloadImage(`${baseURL}/imgTool/files${res.data}?token=${token}`)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '水印图片获取失败',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
|
||||
// showImg.value = false
|
||||
}
|
||||
|
||||
// 点击我的收藏
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<!-- 照片总数 -->
|
||||
<view class="total-count">
|
||||
<view class="total-count" @tap="onHandleViewImgTotal">
|
||||
<view>
|
||||
<view class="count">{{ formatCustomNumber(totalCount) }} 张</view>
|
||||
<view class="count-text">照片总数</view>
|
||||
|
|
@ -20,6 +20,12 @@ const props = defineProps({
|
|||
default: () => 0,
|
||||
},
|
||||
})
|
||||
|
||||
const emits = defineEmits(['HandleViewImgTotal'])
|
||||
|
||||
const onHandleViewImgTotal = () => {
|
||||
emits('HandleViewImgTotal')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</view>
|
||||
|
||||
<view class="photo-container">
|
||||
<PhotoTotal :totalCount="imgCount?.totalNum" />
|
||||
<PhotoTotal :totalCount="imgCount?.totalNum" @HandleViewImgTotal="HandleViewImgTotal" />
|
||||
<PhotoClass
|
||||
:imgCount="imgCount"
|
||||
@handleGetImgListByImgType="handleGetImgListByImgType"
|
||||
|
|
@ -499,6 +499,13 @@ const handleGetImgListByImgType = (type) => {
|
|||
getImgListData(true)
|
||||
}
|
||||
|
||||
// 查看照片总数
|
||||
const HandleViewImgTotal = () => {
|
||||
queryParams.value.uploadType = ''
|
||||
queryParams.value.searchType = 2
|
||||
getImgListData(true)
|
||||
}
|
||||
|
||||
// 日期格式化
|
||||
const formatter = (type, value) => {
|
||||
if (type === 'year') {
|
||||
|
|
|
|||
|
|
@ -231,6 +231,11 @@ import {
|
|||
} from '@/services/coordinatePhotos.js'
|
||||
import TitleTipModal from '@/components/TitleTipModal/index'
|
||||
|
||||
import { useMemberStore } from '@/stores'
|
||||
const memberStore = useMemberStore()
|
||||
const baseURL = import.meta.env.VITE_API_BASE_URL // 获取当前的url地址
|
||||
const token = memberStore?.token
|
||||
|
||||
const { getProjectList, getMajorList } = useCommon()
|
||||
const addAndEditModelRef = ref(null)
|
||||
const projectShow = ref(false) // 项目选择弹框
|
||||
|
|
@ -290,6 +295,14 @@ const addAndEditModelRules = ref({
|
|||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
buildPlace: [
|
||||
{
|
||||
type: 'string',
|
||||
max: 100,
|
||||
message: '建设地点不能超过100个字符',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
// 日期格式化
|
||||
|
|
@ -727,21 +740,21 @@ const getFormDetail = async () => {
|
|||
if (e?.sourceType == 6) {
|
||||
buildBeforeImgList.push({
|
||||
isEdit: true,
|
||||
url: e.originalFilePath,
|
||||
url: `${baseURL}/imgTool/files${e.originalFilePath}?token=${token}`,
|
||||
...e,
|
||||
})
|
||||
}
|
||||
if (e?.sourceType == 7) {
|
||||
buildUnderImgList.push({
|
||||
isEdit: true,
|
||||
url: e.originalFilePath,
|
||||
url: `${baseURL}/imgTool/files${e.originalFilePath}?token=${token}`,
|
||||
...e,
|
||||
})
|
||||
}
|
||||
if (e?.sourceType == 8) {
|
||||
buildAfterImgList.push({
|
||||
isEdit: true,
|
||||
url: e.originalFilePath,
|
||||
url: `${baseURL}/imgTool/files${e.originalFilePath}?token=${token}`,
|
||||
...e,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
<!-- 文字内容 -->
|
||||
</view>
|
||||
<view class="text-content">
|
||||
<view class="text-content" @tap="onHandleViewDetails(item.id)">
|
||||
<view style="position: absolute; left: 0; top: -5rpx">
|
||||
<up-button
|
||||
size="mini"
|
||||
|
|
@ -54,20 +54,21 @@
|
|||
</view>
|
||||
<up-text :lines="2" :text="item.buildBeforeDesc" />
|
||||
</view>
|
||||
<view>
|
||||
<view @tap="onHandleViewDetails(item.id)">
|
||||
<!-- 图片内容 -->
|
||||
<view class="swiper-container">
|
||||
<up-swiper
|
||||
:list="item?.buildBeforeImgList"
|
||||
interval="5000"
|
||||
@click="onClickSwiper"
|
||||
imgMode="aspectFit"
|
||||
height="180"
|
||||
/>
|
||||
<view class="swiper-count">
|
||||
{{ item?.buildBeforeImgList.length }}张
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-content">
|
||||
<view class="text-content" @tap="onHandleViewDetails(item.id)">
|
||||
<view style="position: absolute; left: 0; top: -5rpx">
|
||||
<up-button
|
||||
size="mini"
|
||||
|
|
@ -78,20 +79,21 @@
|
|||
</view>
|
||||
<up-text :lines="2" :text="item.buildUnderDesc" />
|
||||
</view>
|
||||
<view>
|
||||
<view @tap="onHandleViewDetails(item.id)">
|
||||
<!-- 图片内容 -->
|
||||
<view class="swiper-container">
|
||||
<up-swiper
|
||||
:list="item?.buildUnderImgList"
|
||||
interval="5000"
|
||||
@click="onClickSwiper"
|
||||
imgMode="aspectFit"
|
||||
height="180"
|
||||
/>
|
||||
<view class="swiper-count">
|
||||
{{ item?.buildUnderImgList.length }}张
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-content">
|
||||
<view class="text-content" @tap="onHandleViewDetails(item.id)">
|
||||
<view style="position: absolute; left: 0; top: -5rpx">
|
||||
<up-button
|
||||
size="mini"
|
||||
|
|
@ -102,13 +104,14 @@
|
|||
</view>
|
||||
<up-text :lines="2" :text="item.buildAfterDesc" />
|
||||
</view>
|
||||
<view>
|
||||
<view @tap="onHandleViewDetails(item.id)">
|
||||
<!-- 图片内容 -->
|
||||
<view class="swiper-container">
|
||||
<up-swiper
|
||||
:list="item?.buildAfterImgList"
|
||||
interval="5000"
|
||||
@click="onClickSwiper"
|
||||
imgMode="aspectFit"
|
||||
height="180"
|
||||
/>
|
||||
<view class="swiper-count">
|
||||
{{ item?.buildAfterImgList.length }}张
|
||||
|
|
@ -133,11 +136,16 @@
|
|||
import NavBarModal from '@/components/NavBarModal/index'
|
||||
import { ref, computed } from 'vue'
|
||||
import { debounce } from 'lodash-es' // 引入防抖函数
|
||||
import { useMemberStore } from '@/stores'
|
||||
import { getCoordinatePhotoListApi } from '@/services/coordinatePhotos.js'
|
||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
const coordinatePhotosList = ref([])
|
||||
const total = ref(0)
|
||||
|
||||
const memberStore = useMemberStore()
|
||||
const baseURL = import.meta.env.VITE_API_BASE_URL // 获取当前的url地址
|
||||
const token = memberStore?.token
|
||||
|
||||
// 查询条件
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
|
|
@ -183,6 +191,16 @@ const getCoordinatePhotoListData = async (isTap = false) => {
|
|||
e.buildBeforeImgList = e?.sysFileResourceList.filter((i) => i?.sourceType == 6)
|
||||
e.buildUnderImgList = e?.sysFileResourceList.filter((i) => i?.sourceType == 7)
|
||||
e.buildAfterImgList = e?.sysFileResourceList.filter((i) => i?.sourceType == 8)
|
||||
|
||||
e.buildBeforeImgList = e.buildBeforeImgList.map((z) => {
|
||||
return `${baseURL}/imgTool/files${z.originalFilePath}?token=${token}`
|
||||
})
|
||||
e.buildUnderImgList = e.buildUnderImgList.map((x) => {
|
||||
return `${baseURL}/imgTool/files${x.originalFilePath}?token=${token}`
|
||||
})
|
||||
e.buildAfterImgList = e.buildAfterImgList.map((y) => {
|
||||
return `${baseURL}/imgTool/files${y.originalFilePath}?token=${token}`
|
||||
})
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -197,6 +197,11 @@ import {
|
|||
import { getProcedureApi } from '@/services/common.js'
|
||||
import TitleTipModal from '@/components/TitleTipModal/index'
|
||||
|
||||
import { useMemberStore } from '@/stores'
|
||||
const memberStore = useMemberStore()
|
||||
const baseURL = import.meta.env.VITE_API_BASE_URL // 获取当前的url地址
|
||||
const token = memberStore?.token
|
||||
|
||||
const { getProjectList, getMajorList } = useCommon()
|
||||
const addAndEditModelRef = ref(null)
|
||||
const projectShow = ref(false) // 项目选择弹框
|
||||
|
|
@ -246,7 +251,7 @@ const addAndEditModel = reactive({
|
|||
|
||||
// 校验规则
|
||||
const addAndEditModelRules = ref({
|
||||
projectName: [
|
||||
proName: [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
|
|
@ -254,6 +259,14 @@ const addAndEditModelRules = ref({
|
|||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
title: [
|
||||
{
|
||||
type: 'string',
|
||||
max: 50,
|
||||
message: '标题不可超过50个字符',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
|
||||
content: [
|
||||
{
|
||||
|
|
@ -605,7 +618,7 @@ const getFormDetail = async () => {
|
|||
correctionImgListEdit = sysFileResourceList.map((e) => {
|
||||
return {
|
||||
idEdit: true,
|
||||
url: e.originalFilePath,
|
||||
url: `${baseURL}/imgTool/files${e.originalFilePath}?token=${token}`,
|
||||
...e,
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -47,15 +47,14 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 图片内容 -->
|
||||
<view class="swiper-container">
|
||||
<view class="swiper-container" @tap="onHandleViewDetails(item.id)">
|
||||
<up-swiper
|
||||
:list="item.sysFileResourceList"
|
||||
:list="item?.fileList"
|
||||
interval="5000"
|
||||
@click="onClickSwiper"
|
||||
imgMode="aspectFit"
|
||||
height="180"
|
||||
/>
|
||||
<view class="swiper-count">
|
||||
{{ item?.sysFileResourceList.length }}张
|
||||
</view>
|
||||
<view class="swiper-count"> {{ item?.fileList.length }}张 </view>
|
||||
</view>
|
||||
|
||||
<!-- 检查人 -->
|
||||
|
|
@ -78,11 +77,16 @@
|
|||
import NavBarModal from '@/components/NavBarModal/index'
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { debounce } from 'lodash-es' // 引入防抖函数
|
||||
import { useMemberStore } from '@/stores'
|
||||
import { getImportantMattersListApi } from '@/services/importantMatters.js'
|
||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
const importantMattersList = ref([])
|
||||
const total = ref(0)
|
||||
|
||||
const memberStore = useMemberStore()
|
||||
const baseURL = import.meta.env.VITE_API_BASE_URL // 获取当前的url地址
|
||||
const token = memberStore?.token
|
||||
|
||||
// 查询条件
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
|
|
@ -122,6 +126,12 @@ const getImportantMattersListData = async (isTap = false) => {
|
|||
importantMattersList.value = [...importantMattersList.value, ...res.list]
|
||||
}
|
||||
}
|
||||
|
||||
importantMattersList.value.forEach((e) => {
|
||||
e.fileList = e.sysFileResourceList.map((j) => {
|
||||
return `${baseURL}/imgTool/files${j.originalFilePath}?token=${token}`
|
||||
})
|
||||
})
|
||||
} catch (error) {
|
||||
// 发生错误时重置数据
|
||||
if (isTap) {
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ const memberStore = useMemberStore() // 用户信息
|
|||
|
||||
// 表单数据源
|
||||
const opinionModel = ref({
|
||||
username: '',
|
||||
password: '',
|
||||
username: '!Admin',
|
||||
password: 'Bonus@admin123',
|
||||
})
|
||||
|
||||
const opinionRules = ref({
|
||||
|
|
|
|||
|
|
@ -255,6 +255,11 @@ import {
|
|||
} from '@/services/qualityInspection.js'
|
||||
import TitleTipModal from '@/components/TitleTipModal/index'
|
||||
|
||||
import { useMemberStore } from '@/stores'
|
||||
const memberStore = useMemberStore()
|
||||
const baseURL = import.meta.env.VITE_API_BASE_URL // 获取当前的url地址
|
||||
const token = memberStore?.token
|
||||
|
||||
const { getProjectList, getMajorList } = useCommon()
|
||||
|
||||
const addAndEditModelRef = ref(null)
|
||||
|
|
@ -372,6 +377,15 @@ const addAndEditModelRules = ref({
|
|||
message: '请填写整改人',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
{
|
||||
trigger: ['blur', 'change'],
|
||||
pattern: /^(?:[\u4e00-\u9fa5]{1,10}|[a-zA-Z][a-zA-Z\s\-.]{1,19})$/,
|
||||
// 正则检验前先将值转为字符串
|
||||
transform(value) {
|
||||
return String(value)
|
||||
},
|
||||
message: '请填写正确的人名',
|
||||
},
|
||||
],
|
||||
rectDesc: [
|
||||
{
|
||||
|
|
@ -756,7 +770,7 @@ const getFormDetail = async () => {
|
|||
rectPhotoListEdit = rectPhotoList.map((e) => {
|
||||
return {
|
||||
isEdit: true,
|
||||
url: e.originalFilePath,
|
||||
url: `${baseURL}/imgTool/files${e.originalFilePath}?token=${token}`,
|
||||
...e,
|
||||
}
|
||||
})
|
||||
|
|
@ -765,7 +779,7 @@ const getFormDetail = async () => {
|
|||
vioPhotoListEdit = vioPhotoList.map((e) => {
|
||||
return {
|
||||
isEdit: true,
|
||||
url: e.originalFilePath,
|
||||
url: `${baseURL}/imgTool/files${e.originalFilePath}?token=${token}`,
|
||||
...e,
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -48,18 +48,19 @@
|
|||
</view>
|
||||
|
||||
<!-- 图片内容 -->
|
||||
<view class="swiper-container">
|
||||
<view class="swiper-container" @tap="onHandleViewDetails(item.id)">
|
||||
<up-swiper
|
||||
:list="item.vioPhotoList"
|
||||
interval="5000"
|
||||
:indicator="true"
|
||||
@click="onClickSwiper"
|
||||
imgMode="aspectFit"
|
||||
height="180"
|
||||
/>
|
||||
<view class="swiper-count"> {{ item.vioPhotoNum }}张 </view>
|
||||
</view>
|
||||
|
||||
<!-- 检查人 -->
|
||||
<view class="inspect-person">
|
||||
<view class="inspect-person" @tap="onHandleViewDetails(item.id)">
|
||||
<view> 检查人:{{ item.checkUserName }} </view>
|
||||
<view> 整改日期:{{ item.rectTime }} </view>
|
||||
</view>
|
||||
|
|
@ -81,10 +82,14 @@
|
|||
import NavBarModal from '@/components/NavBarModal/index'
|
||||
import { ref, computed } from 'vue'
|
||||
import { debounce } from 'lodash-es' // 引入防抖函数
|
||||
import { useMemberStore } from '@/stores'
|
||||
import { getQualityInspectionListApi } from '@/services/qualityInspection.js'
|
||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
const total = ref(0)
|
||||
const qualityInspectionList = ref([])
|
||||
const memberStore = useMemberStore()
|
||||
const baseURL = import.meta.env.VITE_API_BASE_URL // 获取当前的url地址
|
||||
const token = memberStore?.token
|
||||
|
||||
// 查询条件
|
||||
const queryParams = ref({
|
||||
|
|
@ -128,6 +133,9 @@ const getQualityInspectionListData = async (isTap = false) => {
|
|||
|
||||
qualityInspectionList.value.forEach((e) => {
|
||||
e.vioPhotoList = e.vioPhoto?.split(',')
|
||||
e.vioPhotoList = e.vioPhotoList.map((j) => {
|
||||
return `${baseURL}/imgTool/files${j}?token=${token}`
|
||||
})
|
||||
})
|
||||
} catch (error) {
|
||||
// 发生错误时重置数据
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@
|
|||
autoHeight
|
||||
border="none"
|
||||
maxlength="200"
|
||||
:disabled="props.addAndEditFormType == 3"
|
||||
:readonly="props.addAndEditFormType == 3"
|
||||
v-model="addAndEditModel.checkDesc"
|
||||
:placeholder="props.addAndEditFormType == 3 ? '' : '请输入检查描述'"
|
||||
|
|
@ -200,6 +201,11 @@ import {
|
|||
import { getProcedureApi } from '@/services/common.js'
|
||||
import TitleTipModal from '@/components/TitleTipModal/index'
|
||||
|
||||
import { useMemberStore } from '@/stores'
|
||||
const memberStore = useMemberStore()
|
||||
const baseURL = import.meta.env.VITE_API_BASE_URL // 获取当前的url地址
|
||||
const token = memberStore?.token
|
||||
|
||||
const { getProjectList, getMajorList } = useCommon()
|
||||
const addAndEditModelRef = ref(null)
|
||||
const projectShow = ref(false) // 项目选择弹框
|
||||
|
|
@ -250,6 +256,17 @@ const addAndEditModelRules = ref({
|
|||
},
|
||||
],
|
||||
|
||||
checkUserName: [
|
||||
{
|
||||
trigger: ['blur', 'change'],
|
||||
pattern: /^(?:[\u4e00-\u9fa5]{1,10}|[a-zA-Z][a-zA-Z\s\-.]{1,19})$/,
|
||||
// 正则检验前先将值转为字符串
|
||||
transform(value) {
|
||||
return String(value)
|
||||
},
|
||||
message: '请填写正确的人名',
|
||||
},
|
||||
],
|
||||
checkPlace: [
|
||||
{
|
||||
type: 'string',
|
||||
|
|
@ -614,7 +631,7 @@ const getFormDetail = async () => {
|
|||
correctionImgListEdit = sysFileResourceList.map((e) => {
|
||||
return {
|
||||
isEdit: true,
|
||||
url: e.originalFilePath,
|
||||
url: `${baseURL}/imgTool/files${e.originalFilePath}?token=${token}`,
|
||||
...e,
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -47,20 +47,19 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 图片内容 -->
|
||||
<view class="swiper-container">
|
||||
<view class="swiper-container" @tap="onHandleViewDetails(item.id)">
|
||||
<up-swiper
|
||||
:list="item?.sysFileResourceList"
|
||||
:list="item?.fileList"
|
||||
keyName="originalFilePath"
|
||||
interval="5000"
|
||||
@click="onClickSwiper"
|
||||
imgMode="aspectFit"
|
||||
height="180"
|
||||
/>
|
||||
<view class="swiper-count">
|
||||
{{ item?.sysFileResourceList.length }}张
|
||||
</view>
|
||||
<view class="swiper-count"> {{ item?.fileList.length }}张 </view>
|
||||
</view>
|
||||
|
||||
<!-- 检查人 -->
|
||||
<view class="inspect-person">
|
||||
<view class="inspect-person" @tap="onHandleViewDetails(item.id)">
|
||||
<view> 检查人:{{ item.checkUserName }}</view>
|
||||
<!-- <view> 整改日期:2025-05-06 </view> -->
|
||||
</view>
|
||||
|
|
@ -82,11 +81,16 @@
|
|||
import NavBarModal from '@/components/NavBarModal/index'
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { debounce } from 'lodash-es' // 引入防抖函数
|
||||
import { useMemberStore } from '@/stores'
|
||||
import { getSafetyMeasureListApi } from '@/services/safetyMeasure.js'
|
||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
const safetyMeasureList = ref([])
|
||||
const total = ref(0)
|
||||
|
||||
const memberStore = useMemberStore()
|
||||
const baseURL = import.meta.env.VITE_API_BASE_URL // 获取当前的url地址
|
||||
const token = memberStore?.token
|
||||
|
||||
// 查询条件
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
|
|
@ -126,6 +130,11 @@ const getSafetyMeasureListData = async (isTap = false) => {
|
|||
safetyMeasureList.value = [...safetyMeasureList.value, ...res.list]
|
||||
}
|
||||
}
|
||||
safetyMeasureList.value.forEach((e) => {
|
||||
e.fileList = e.sysFileResourceList.map((j) => {
|
||||
return `${baseURL}/imgTool/files${j.originalFilePath}?token=${token}`
|
||||
})
|
||||
})
|
||||
} catch (error) {
|
||||
// 发生错误时重置数据
|
||||
if (isTap) {
|
||||
|
|
|
|||
|
|
@ -253,9 +253,13 @@ import {
|
|||
editSafetyViolationsApi,
|
||||
getSafetyViolationsDetailsByIdApi,
|
||||
} from '@/services/safetyViolations.js'
|
||||
|
||||
import TitleTipModal from '@/components/TitleTipModal/index'
|
||||
|
||||
import { useMemberStore } from '@/stores'
|
||||
const memberStore = useMemberStore()
|
||||
const baseURL = import.meta.env.VITE_API_BASE_URL // 获取当前的url地址
|
||||
const token = memberStore?.token
|
||||
|
||||
const { getProjectList, getMajorList } = useCommon()
|
||||
const addAndEditModelRef = ref(null)
|
||||
const projectShow = ref(false) // 项目选择弹框
|
||||
|
|
@ -314,7 +318,7 @@ const addAndEditModel = reactive({
|
|||
|
||||
// 校验规则
|
||||
const addAndEditModelRules = ref({
|
||||
projectName: [
|
||||
proName: [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
|
|
@ -322,6 +326,17 @@ const addAndEditModelRules = ref({
|
|||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
checkUserName: [
|
||||
{
|
||||
trigger: ['blur', 'change'],
|
||||
pattern: /^(?:[\u4e00-\u9fa5]{1,10}|[a-zA-Z][a-zA-Z\s\-.]{1,19})$/,
|
||||
// 正则检验前先将值转为字符串
|
||||
transform(value) {
|
||||
return String(value)
|
||||
},
|
||||
message: '请填写正确的人名',
|
||||
},
|
||||
],
|
||||
rectDate: [
|
||||
{
|
||||
type: 'string',
|
||||
|
|
@ -361,6 +376,15 @@ const addAndEditModelRules = ref({
|
|||
message: '请填写整改人',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
{
|
||||
trigger: ['blur', 'change'],
|
||||
pattern: /^(?:[\u4e00-\u9fa5]{1,10}|[a-zA-Z][a-zA-Z\s\-.]{1,19})$/,
|
||||
// 正则检验前先将值转为字符串
|
||||
transform(value) {
|
||||
return String(value)
|
||||
},
|
||||
message: '请填写正确的人名',
|
||||
},
|
||||
],
|
||||
rectDesc: [
|
||||
{
|
||||
|
|
@ -747,7 +771,7 @@ const getFormDetail = async () => {
|
|||
rectPhotoListEdit = rectPhotoList.map((e) => {
|
||||
return {
|
||||
isEdit: true,
|
||||
url: e.originalFilePath,
|
||||
url: `${baseURL}/imgTool/files${e.originalFilePath}?token=${token}`,
|
||||
...e,
|
||||
}
|
||||
})
|
||||
|
|
@ -756,7 +780,7 @@ const getFormDetail = async () => {
|
|||
vioPhotoListEdit = vioPhotoList.map((e) => {
|
||||
return {
|
||||
isEdit: true,
|
||||
url: e.originalFilePath,
|
||||
url: `${baseURL}/imgTool/files${e.originalFilePath}?token=${token}`,
|
||||
...e,
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -47,17 +47,18 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 图片内容 -->
|
||||
<view class="swiper-container">
|
||||
<view class="swiper-container" @tap="onHandleViewDetails(item.id)">
|
||||
<up-swiper
|
||||
:list="item.vioPhotoList"
|
||||
interval="5000"
|
||||
@click="onClickSwiper"
|
||||
imgMode="aspectFit"
|
||||
height="180"
|
||||
/>
|
||||
<view class="swiper-count">{{ item.vioPhotoNum }} 张 </view>
|
||||
</view>
|
||||
|
||||
<!-- 检查人 -->
|
||||
<view class="inspect-person">
|
||||
<view class="inspect-person" @tap="onHandleViewDetails(item.id)">
|
||||
<view> 检查人:{{ item.checkUserName }} </view>
|
||||
<view> 整改日期:{{ item.rectTime }} </view>
|
||||
</view>
|
||||
|
|
@ -79,11 +80,15 @@
|
|||
import NavBarModal from '@/components/NavBarModal/index'
|
||||
import { ref, computed } from 'vue'
|
||||
import { debounce } from 'lodash-es' // 引入防抖函数
|
||||
import { useMemberStore } from '@/stores'
|
||||
import { getSafetyViolationsListApi } from '@/services/safetyViolations.js'
|
||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
const upListRef = ref(null) // 获取列表组件的引用
|
||||
const total = ref(0)
|
||||
const safetyViolationsList = ref([])
|
||||
const memberStore = useMemberStore()
|
||||
const baseURL = import.meta.env.VITE_API_BASE_URL // 获取当前的url地址
|
||||
const token = memberStore?.token
|
||||
|
||||
// 查询条件
|
||||
const queryParams = ref({
|
||||
|
|
@ -127,7 +132,12 @@ const getSafetyViolationsListData = async (isTap = false) => {
|
|||
|
||||
safetyViolationsList.value.forEach((e) => {
|
||||
e.vioPhotoList = e.vioPhoto?.split(',')
|
||||
e.vioPhotoList = e.vioPhotoList.map((j) => {
|
||||
return `${baseURL}/imgTool/files${j}?token=${token}`
|
||||
})
|
||||
})
|
||||
|
||||
console.log(' safetyViolationsList.value', safetyViolationsList.value)
|
||||
} catch (error) {
|
||||
// 发生错误时重置数据
|
||||
if (isTap) {
|
||||
|
|
|
|||
|
|
@ -36,3 +36,15 @@ export const editCollectTypeApi = (data) => {
|
|||
data,
|
||||
})
|
||||
}
|
||||
// 综合查询 查询水印图片地址
|
||||
export const getGenerateWatermarkImgApi = (data) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/imgTool/app/synthesisQuery/generateWatermark',
|
||||
isPassWord: true,
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ref } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import { getProjectApi, getMajorApi } from '@/services/common'
|
||||
|
||||
export const useCommonStore = defineStore('common', () => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
// 加解密方法
|
||||
import CryptoJS from 'crypto-js'
|
||||
|
||||
const key = 'zhst@bonus@zhst@bonus@1234567890' // 加密密钥
|
||||
// const key = 'zhst@bonus@zhst@bonus@1234567890' // 加密密钥
|
||||
const key = 'zhst@bonus@zhst@' // 加密密钥
|
||||
const utf8Key = CryptoJS.enc.Utf8.parse(key)
|
||||
|
||||
// AES 加密(UTF-8 处理)
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
const ENV = process.env.NODE_ENV
|
||||
const platform = uni.getSystemInfoSync().platform
|
||||
// let BASE_URL = 'http://192.168.2.188:21907/gz_att_wechat' // 本地
|
||||
// let BASE_URL = 'http://192.168.0.14:21907/gz_att_wechat' // 测试服务地址
|
||||
// let BASE_URL = 'https://jj.jypxks.com/gz_att_wechat' // 生产服务地址
|
||||
// let BASE_URL = 'http://192.168.0.50:1907/gz_att_wechat' // 孙亮
|
||||
let BASE_URL = 'http://192.168.2.131:1907/gz_att_wechat' // 孙亮
|
||||
|
||||
// 如果是浏览器调试会产生跨域 则配置请求基地址为 api 或其他 必须与vue.config.js 中配置的代理一致 解决跨域问题
|
||||
// if (ENV === 'development' && (platform === 'h5' || platform === 'windows')) {
|
||||
// BASE_URL = 'api'
|
||||
// }
|
||||
// // 生产则直接配置 线上ip 或者 nginx代理的路径
|
||||
// if (ENV === 'production' && (platform === 'h5' || platform === 'windows')) {
|
||||
// BASE_URL = '/prod-api'
|
||||
// }
|
||||
// // app不产生跨域 直接配置请求基地址 开发环境
|
||||
// if (ENV === 'development' && (platform === 'android' || platform === 'ios')) {
|
||||
// BASE_URL = 'https://test-cc.zhgkxt.com/sgzbgl-api'
|
||||
// }
|
||||
// // app不产生跨域 直接配置请求基地址 生产环境
|
||||
// if (ENV === 'production' && (platform === 'android' || platform === 'ios')) {
|
||||
// BASE_URL = 'http://*****'
|
||||
// }
|
||||
|
||||
export default BASE_URL
|
||||
Loading…
Reference in New Issue