This commit is contained in:
BianLzhaoMin 2025-04-02 10:43:35 +08:00
parent c9ac67d7df
commit 283e61a07e
25 changed files with 407 additions and 75 deletions

6
package-lock.json generated
View File

@ -25,6 +25,7 @@
"@dcloudio/uni-quickapp-webview": "3.0.0-4050720250324001",
"clipboard": "^2.0.11",
"dayjs": "^1.11.13",
"lodash-es": "^4.17.21",
"pinia": "^2.3.0",
"pinia-plugin-persistedstate": "^4.2.0",
"uview-plus": "^3.3.62",
@ -9112,6 +9113,11 @@
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"node_modules/lodash-es": {
"version": "4.17.21",
"resolved": "https://repo.huaweicloud.com/repository/npm/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
},
"node_modules/lodash.camelcase": {
"version": "4.3.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",

View File

@ -51,6 +51,7 @@
"@dcloudio/uni-quickapp-webview": "3.0.0-4050720250324001",
"clipboard": "^2.0.11",
"dayjs": "^1.11.13",
"lodash-es": "^4.17.21",
"pinia": "^2.3.0",
"pinia-plugin-persistedstate": "^4.2.0",
"uview-plus": "^3.3.62",

View File

@ -8,18 +8,31 @@
</view>
</template>
<template #right>
<text style="color: #2979ff">上传记录</text>
<template #right v-if="showUploadRecord">
<text style="color: #2979ff" @tap="onHandleUploadRecord">上传记录</text>
</template>
</up-navbar>
</template>
<script setup>
const props = defineProps({
//
navBarTitle: {
type: String,
default: () => '个人中心',
},
//
showUploadRecord: {
type: Boolean,
default: () => false,
},
// url
uploadRecordUrl: {
type: String,
default: () => '',
},
})
//
@ -28,6 +41,13 @@ const onHandleBack = () => {
delta: 1,
})
}
//
const onHandleUploadRecord = () => {
uni.navigateTo({
url: props.uploadRecordUrl,
})
}
</script>
<style scoped>

View File

@ -1,31 +1,31 @@
{
"name": "项目全过程影像管理工具",
"appid": "",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
"name" : "项目全过程影像管理工具",
"appid" : "__UNI__F75AFA9",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"compatible": {
"ignoreVersion": true //trueHBuilderX1.9.0
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"compatible" : {
"ignoreVersion" : true //trueHBuilderX1.9.0
},
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules": {},
"modules" : {},
/* */
"distribute": {
"distribute" : {
/* android */
"android": {
"permissions": [
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
@ -44,37 +44,71 @@
]
},
/* ios */
"ios": {},
"ios" : {
"dSYMs" : false
},
/* SDK */
"sdkConfigs": {}
"sdkConfigs" : {},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
}
},
/* */
"quickapp": {},
"quickapp" : {},
/* */
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents": true,
"mergeVirtualHostAttributes": true
"usingComponents" : true,
"mergeVirtualHostAttributes" : true
},
"mp-alipay": {
"usingComponents": true
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu": {
"usingComponents": true
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao": {
"usingComponents": true,
"mergeVirtualHostAttributes": true
"mp-toutiao" : {
"usingComponents" : true,
"mergeVirtualHostAttributes" : true
},
"uniStatistics": {
"enable": false
"uniStatistics" : {
"enable" : false
},
"vueVersion": "3",
"h5": {
"title": ""
"vueVersion" : "3",
"h5" : {
"title" : ""
}
}

View File

@ -45,6 +45,14 @@
"navigationStyle": "custom"
}
},
// ---- ---
{
"path": "pages/safetyViolations/upload-record/index",
"style": {
"navigationBarTitleText": "custom",
"navigationStyle": "custom"
}
},
// ----
{
"path": "pages/qualityInspection/index",

View File

@ -14,10 +14,10 @@
<up-input
readonly
border="none"
placeholder="点击选择项目"
:placeholder="props.addAndEditFormType == 3 ? '' : '点击选择项目'"
v-model="addAndEditModel.projectName"
>
<template #suffix>
<template #suffix v-if="props.addAndEditFormType != 3">
<up-icon name="arrow-right" @tap="onSelectProject" />
</template>
</up-input>
@ -26,10 +26,10 @@
<up-input
border="none"
readonly
placeholder="点击选择专业"
v-model="addAndEditModel.major"
:placeholder="props.addAndEditFormType == 3 ? '' : '点击选择专业'"
>
<template #suffix>
<template #suffix v-if="props.addAndEditFormType != 3">
<up-icon name="arrow-right" @tap="onSelectMajor" />
</template>
</up-input>
@ -38,10 +38,10 @@
<up-input
border="none"
readonly
placeholder="点击选择工序"
v-model="addAndEditModel.procedure"
:placeholder="props.addAndEditFormType == 3 ? '' : '点击选择工序'"
>
<template #suffix>
<template #suffix v-if="props.addAndEditFormType != 3">
<up-icon name="arrow-right" @tap="onSelectProcedure" />
</template>
</up-input>
@ -49,17 +49,21 @@
<TitleTipModal :TitleTip="`违章信息`" />
<up-form-item prop="examiner" label="检查人">
<up-input placeholder="请输入" border="none" />
<up-input
border="none"
:readonly="props.addAndEditFormType == 3"
:placeholder="props.addAndEditFormType == 3 ? '' : '请输入检查人'"
/>
</up-form-item>
<up-form-item prop="inspectTime" label="检查日期">
<up-input
readonly
border="none"
inputAlign="right"
placeholder="点击选择检查日期"
v-model="addAndEditModel.inspectTime"
:placeholder="props.addAndEditFormType == 3 ? '' : '点击选择检查日期'"
>
<template #suffix>
<template #suffix v-if="props.addAndEditFormType != 3">
<up-icon name="arrow-right" @tap="onSelectDate(1)" />
</template>
</up-input>
@ -68,42 +72,53 @@
<up-input
readonly
border="none"
placeholder="点击选择整改期限"
inputAlign="right"
v-model="addAndEditModel.correctionTerm"
:placeholder="props.addAndEditFormType == 3 ? '' : '点击选择整改期限'"
>
<template #suffix>
<template #suffix v-if="props.addAndEditFormType != 3">
<up-icon name="arrow-right" @tap="onSelectDate(2)" />
</template>
</up-input>
</up-form-item>
<up-form-item prop="vrLocation" label="违章地点" required>
<up-input placeholder="请输入" border="none" v-model="addAndEditModel.vrLocation" />
<up-input
border="none"
v-model="addAndEditModel.vrLocation"
:readonly="props.addAndEditFormType == 3"
:placeholder="props.addAndEditFormType == 3 ? '' : '请输入违章地点'"
/>
</up-form-item>
<up-form-item prop="vrDescribe" label="违章描述" required>
<up-textarea
placeholder="请输入"
autoHeight
border="none"
v-model="addAndEditModel.vrDescribe"
:readonly="props.addAndEditFormType == 3"
:placeholder="props.addAndEditFormType == 3 ? '' : '请输入违章描述'"
/>
</up-form-item>
<up-form-item prop="vrImgList" label="违章照片(最多9张)" required>
<up-form-item
prop="vrImgList"
:label="props.addAndEditFormType == 3 ? '违章照片' : '违章照片(最多9张)'"
required
>
<up-upload
name="1"
multiple
:maxCount="9"
:fileList="addAndEditModel.vrImgList"
@afterRead="onAfterReadVrImgList"
@delete="onDeletePicVrImgList"
@afterRead="onAfterReadVrImgList"
:fileList="addAndEditModel.vrImgList"
:maxCount="props.addAndEditFormType == 3 ? 1 : 9"
/>
</up-form-item>
<TitleTipModal :TitleTip="`整改信息`" />
<up-form-item prop="correctionPerson" label="整改人" required>
<up-input
placeholder="请输入"
border="none"
:readonly="props.addAndEditFormType == 3"
v-model="addAndEditModel.correctionPerson"
:placeholder="props.addAndEditFormType == 3 ? '' : '请输入整改人'"
/>
</up-form-item>
<up-form-item prop="correctionTime" label="整改日期">
@ -111,10 +126,10 @@
readonly
border="none"
inputAlign="right"
placeholder="点击选择整改日期"
v-model="addAndEditModel.correctionTime"
:placeholder="props.addAndEditFormType == 3 ? '' : '点击选择整改日期'"
>
<template #suffix>
<template #suffix v-if="props.addAndEditFormType != 3">
<up-icon name="arrow-right" @tap="onSelectDate(3)" />
</template>
</up-input>
@ -123,18 +138,23 @@
<up-textarea
autoHeight
border="none"
placeholder="请输入"
:readonly="props.addAndEditFormType == 3"
v-model="addAndEditModel.correctionDescribe"
:placeholder="props.addAndEditFormType == 3 ? '' : '请输入整改说明'"
/>
</up-form-item>
<up-form-item prop="examiner" label="整改照片(最多9张)">
<up-form-item
prop="examiner"
:label="props.addAndEditFormType == 3 ? '整改照片' : '整改照片(最多9张)'"
>
<up-upload
name="1"
multiple
:maxCount="9"
:fileList="addAndEditModel.correctionImgList"
@afterRead="onAfterReadCorrectionImgList"
@delete="onDeleteCorrectionImgList"
@afterRead="onAfterReadCorrectionImgList"
:deletable="!props.addAndEditFormType == 3"
:fileList="addAndEditModel.correctionImgList"
:maxCount="props.addAndEditFormType == 3 ? 1 : 9"
/>
</up-form-item>
@ -149,8 +169,8 @@
<up-input
clearable
placeholder="输入工程名称搜索"
v-model.trim="onSearchProjectName"
suffixIconStyle="color: #909399"
v-model.trim="onSearchProjectName"
>
<template #suffix>
<up-icon name="search" size="24" @tap="onSearchInProjectPopup" />
@ -200,10 +220,20 @@
@confirm="onConfirmDate"
@cancel="dateShow = !dateShow"
/>
<up-loading-page
color="#333"
fontSize="16"
loadingColor="#2979ff"
:loading="sendLoading"
bg-color="rgba(0,0,0,0.3)"
loading-text="正在提交,请稍后..."
/>
</template>
<script setup>
import { reactive, ref } from 'vue'
import { debounce } from 'lodash-es' //
import TitleTipModal from '@/components/TitleTipModal/index'
const addAndEditModelRef = ref(null)
@ -213,15 +243,18 @@ const procedureShow = ref(false) // 工序选择器
const dateShow = ref(false) //
const onSearchProjectName = ref('') //
const dateValue = ref(Date.now()) //
const sendLoading = ref(false) //
const dateType = ref(1)
const props = defineProps({
// 1. 2. 3.
formType: {
type: Number,
addAndEditFormType: {
type: [Number, String],
default: () => 1,
},
})
console.log(props.addAndEditFormType, '表单类型')
//
const addAndEditModel = reactive({
projectName: '',
@ -467,14 +500,28 @@ const onDeleteCorrectionImgList = (event) => {
}
//
const onSubmitForm = () => {
const onSubmitForm = debounce(() => {
console.log('---提交')
sendLoading.value = true
addAndEditModelRef.value.validate().then((valid) => {
if (valid) {
console.log('校验通过')
sendLoading.value = false
}
})
}, 1000)
//
const getFormDetail = () => {
console.log('---获取详情数据')
}
// props.addAndEditFormType 2
if (props.addAndEditFormType == 2) {
//
getFormDetail()
}
//
</script>
<style scoped lang="scss">

View File

@ -1,10 +1,14 @@
<template>
<!-- 安全违章一级页面 -->
<view class="safetyViolations">
<NavBarModal :navBarTitle="`安全违章`" />
<NavBarModal
:navBarTitle="`安全违章`"
:uploadRecordUrl="uploadRecordUrl"
:showUploadRecord="addAndEditFormType == 1 ? true : false"
/>
<view class="container">
<AddAndEditForm />
<AddAndEditForm :addAndEditFormType="addAndEditFormType" />
</view>
</view>
</template>
@ -13,6 +17,16 @@
import NavBarModal from '@/components/NavBarModal/index'
import AddAndEditForm from './componetns/addAndEditForm.vue'
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
const addAndEditFormType = ref(1)
const uploadRecordUrl = ref('/pages/safetyViolations/upload-record/index')
onLoad((query) => {
if (query.type) {
addAndEditFormType.value = query.type
}
})
</script>
<style lang="scss" scoped>

View File

@ -0,0 +1,202 @@
<template>
<!-- 安全违章 ---- 上传记录 -->
<view class="upload-record">
<NavBarModal :navBarTitle="`安全违章`" />
<view class="container">
<view class="search-input">
<view style="width: 90%; margin: 0 auto">
<up-input
clearable
placeholder="输入搜索关键词"
v-model.trim="onSearchKeyword"
suffixIconStyle="color: #909399"
>
<template #suffix>
<up-icon name="search" size="24" @tap="onSearchRecord" />
</template>
</up-input>
</view>
</view>
<view class="upload-record-list">
<up-list @scrolltolower="onScrollTolower" style="width: 100%">
<up-list-item v-for="item in 10" :key="item" @tap.stop="onHandleViewDetails">
<view class="record-item">
<!-- 日期 -->
<view class="item-date">
<text>2024-05-06</text>
<view>
<up-button
size="mini"
text="修改"
type="primary"
@tap="onHandleEditRecord"
/>
</view>
</view>
<!-- 名称 -->
<view class="item-name">
<text>N3917</text>
</view>
<!-- 文字内容 -->
<view class="text-content">
<up-text
:lines="2"
text="关于uview-plus的取名来由首字母u来自于uni-app首字母
uni-app是基VuejsVue和View(延伸为UI视图之意)同音同时view组件uni-app中
最础最重要的组件故取名uview-plus表达源于uni-app和Vue之意同时在此也对它示感谢"
></up-text>
</view>
<!-- 图片内容 -->
<view class="swiper-container">
<up-swiper :list="list1" :indicator="true" interval="5000" />
<view class="swiper-count"> 3 </view>
</view>
<!-- 检查人 -->
<view class="inspect-person">
<view> 检查人武松 </view>
<view> 整改日期2025-05-06 </view>
</view>
</view>
</up-list-item>
</up-list>
<view class="loading-text">
{{ finish ? '没有更多数据了~' : '正在加载...' }}
</view>
</view>
</view>
</view>
</template>
<script setup>
import NavBarModal from '@/components/NavBarModal/index'
import { ref, reactive } from 'vue'
import { debounce } from 'lodash-es' //
const scrollTop = ref(0)
const onSearchKeyword = ref('')
const finish = ref(false)
const list1 = reactive([
'https://img1.baidu.com/it/u=1361177696,203903602&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1455',
'https://img1.baidu.com/it/u=1361177696,203903602&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1455',
'https://img1.baidu.com/it/u=1361177696,203903602&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1455',
])
//
const onScrollTolower = debounce(() => {
console.log('onScrollTolower')
}, 500)
//
const onSearchRecord = () => {
console.log('onSearchRecord', onSearchKeyword.value)
}
//
const onHandleEditRecord = () => {
console.log('onHandleEditRecord')
uni.redirectTo({
url: `/pages/safetyViolations/index?type=2&id=1`, //
})
}
//
const onHandleViewDetails = () => {
uni.redirectTo({
url: `/pages/safetyViolations/index?type=3&id=1`, //
})
}
</script>
<style lang="scss" scoped>
.upload-record {
height: 100%;
padding-top: 50px;
box-sizing: border-box;
background-color: #f6f9ff;
.container {
height: 100%;
display: flex;
flex-direction: column;
.search-input {
width: 100%;
padding: 36rpx 0;
background-color: #fff;
}
.upload-record-list {
flex: 1;
overflow-y: auto;
}
.record-item {
width: 90%;
margin: 18rpx auto 22rpx;
padding: 8rpx;
border-radius: 6rpx;
background-color: #fff;
.item-date {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
& text {
color: #999;
}
}
.item-name,
.text-content {
padding: 16rpx;
font-size: 14px;
}
.swiper-container {
position: relative;
.swiper-count {
position: absolute;
top: 20rpx;
right: 30rpx;
padding: 3rpx 16rpx;
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
text-align: center;
font-size: 13px;
border-radius: 16rpx;
}
}
.inspect-person {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10rpx 16rpx;
font-size: 14px;
color: #3d3939;
}
}
}
}
::v-deep .u-input {
background-color: #f7f8fc;
border-radius: 16rpx;
}
//
.loading-text {
text-align: center;
font-size: 26rpx;
color: #8c8c8c;
padding: 32rpx 0;
letter-spacing: 1rpx;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB