Merge branch 'master' of http://gitea.bugtc.com/zhouyanli/property-manager-side
# Conflicts: # wuye-manager-uniapp/pages/index/index.vue
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
* @Author: Zy
|
* @Author: Zy
|
||||||
* @Date: 2026-05-16 15:43:07
|
* @Date: 2026-05-16 15:43:07
|
||||||
* @LastEditor: Zy
|
* @LastEditor: Zy
|
||||||
* @LastEditTime: 2026-05-19 16:25:14
|
* @LastEditTime: 2026-06-03 18:19:51
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import request, {
|
import request, {
|
||||||
@@ -41,7 +41,7 @@ import request, {
|
|||||||
* */
|
* */
|
||||||
/**
|
/**
|
||||||
* @description: 获取巡检任务列表
|
* @description: 获取巡检任务列表
|
||||||
* @param { RequestParams<{ date?:string }> } data
|
* @param { RequestParams<{ date:string, status:number }> } data
|
||||||
* @return { Promise<RowsResult<InspectionListType>> }
|
* @return { Promise<RowsResult<InspectionListType>> }
|
||||||
*/
|
*/
|
||||||
export const getInspectionList = (data) => {
|
export const getInspectionList = (data) => {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
* @property {number} total 总条数
|
* @property {number} total 总条数
|
||||||
* @property {T[]} rows 数据列表
|
* @property {T[]} rows 数据列表
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回结果
|
* 返回结果
|
||||||
* @template T
|
* @template T
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
style="height: 100%; flex: 1"
|
style="height: 100%; flex: 1"
|
||||||
scroll-y="true"
|
scroll-y="true"
|
||||||
lower-threshold="160"
|
lower-threshold="160"
|
||||||
|
v-if="list.length > 0"
|
||||||
@scrolltolower="scrolltolower"
|
@scrolltolower="scrolltolower"
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
@@ -52,6 +53,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
<view class="nodata" v-else>
|
||||||
|
<span>暂无数据</span>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -229,6 +233,12 @@ function scrolltolower() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nodata {
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -175,21 +175,22 @@ onLoad(options => {
|
|||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
.title_box {
|
.title_box {
|
||||||
height: 40rpx;
|
|
||||||
line-height: 40rpx;
|
|
||||||
.title {
|
.title {
|
||||||
font-weight: 550;
|
font-weight: 550;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
min-height: 40rpx;
|
||||||
|
text-wrap: wrap;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
.line {
|
.line {
|
||||||
|
display: block;
|
||||||
width: 6rpx;
|
width: 6rpx;
|
||||||
height: 28rpx;
|
|
||||||
background: #4d5dfa;
|
background: #4d5dfa;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.inspection_status {
|
.inspection_status {
|
||||||
|
width: 100rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
|||||||
@@ -68,14 +68,14 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="items_picker_box">
|
<view class="items_picker_box">
|
||||||
<view class="label">
|
<view class="label">
|
||||||
<text v-if="info.inspectSetting === 1" class="is-required">*</text>
|
<text class="is-required">*</text>
|
||||||
<text>巡检照片</text>
|
<text>巡检照片</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="filePickerbox" v-if="!ite.complated">
|
<view class="filePickerbox" v-if="!ite.complated">
|
||||||
<filePicker
|
<filePicker
|
||||||
v-model="ite.files"
|
v-model="ite.files"
|
||||||
file-field-name="file"
|
file-field-name="file"
|
||||||
uploadUrl="/resource/oss/upload"
|
uploadUrl="/api/butler/file/uploadImage"
|
||||||
@fail="onUploadFail"
|
@fail="onUploadFail"
|
||||||
></filePicker>
|
></filePicker>
|
||||||
</view>
|
</view>
|
||||||
@@ -106,9 +106,8 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import filePicker from '@/components/filePicker/filePicker.vue'
|
import filePicker from '@/components/filePicker/filePicker.vue'
|
||||||
import { getInspectionMain } from '@/api/insepction.js'
|
import { getInspectionMain, putInsepctionPoint } from '@/api/insepction.js'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { putInsepctionPoint } from '@/api/insepction.js'
|
|
||||||
|
|
||||||
const statuslist = [
|
const statuslist = [
|
||||||
{
|
{
|
||||||
@@ -202,15 +201,13 @@ function onUploadFail() {
|
|||||||
|
|
||||||
/** 提交巡检点 检查情况 */
|
/** 提交巡检点 检查情况 */
|
||||||
function handleSubmit(item) {
|
function handleSubmit(item) {
|
||||||
if (info.value.inspectSetting === 1) {
|
if (item.files.length <= 0) {
|
||||||
if (item.files.length <= 0) {
|
uni.showToast({
|
||||||
uni.showToast({
|
icon: 'error',
|
||||||
icon: 'error',
|
mask: true,
|
||||||
mask: true,
|
title: '必须拍照'
|
||||||
title: '必须拍照'
|
})
|
||||||
})
|
return
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
let obj = {
|
let obj = {
|
||||||
pointId: item.pointId,
|
pointId: item.pointId,
|
||||||
@@ -271,14 +268,14 @@ function previewImages(images, currentIndex) {
|
|||||||
.inspection_title {
|
.inspection_title {
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
.title {
|
.title {
|
||||||
font-size: 32rpx;
|
font-size: 30rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
height: 40rpx;
|
min-height: 40rpx;
|
||||||
|
text-wrap: wrap;
|
||||||
.line {
|
.line {
|
||||||
display: block;
|
display: block;
|
||||||
width: 6rpx;
|
width: 6rpx;
|
||||||
height: 28rpx;
|
|
||||||
background: #4d5dfa;
|
background: #4d5dfa;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
margin-top: 6rpx;
|
margin-top: 6rpx;
|
||||||
@@ -288,6 +285,7 @@ function previewImages(images, currentIndex) {
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #4d5dfa;
|
color: #4d5dfa;
|
||||||
|
width: 100rpx;
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,12 +54,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import TabsComponents from '@/components/tabs/tabs.vue'
|
import TabsComponents from '@/components/tabs/tabs.vue'
|
||||||
import { onShow } from '@dcloudio/uni-app'
|
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||||
import { getInspectionList } from '@/api/insepction.js'
|
import { InspectionListType, getInspectionList } from '@/api/insepction.js'
|
||||||
import { parseTime } from '@/utils/time.js'
|
import { parseTime } from '@/utils/time.js'
|
||||||
|
|
||||||
// tabs =========================================================
|
// tabs =========================================================
|
||||||
const activeValue = ref(0)
|
const activeValue = ref(2)
|
||||||
const tabslist = ref([
|
const tabslist = ref([
|
||||||
{
|
{
|
||||||
name: '全部',
|
name: '全部',
|
||||||
@@ -86,7 +86,7 @@ const isComputed = (status: string) => {
|
|||||||
const awaitlist = ['未完成', '待执行', '执行中']
|
const awaitlist = ['未完成', '待执行', '执行中']
|
||||||
return !awaitlist.includes(status)
|
return !awaitlist.includes(status)
|
||||||
}
|
}
|
||||||
const list = ref([])
|
const list = ref<InspectionListType[]>([])
|
||||||
const queryParmas = ref({
|
const queryParmas = ref({
|
||||||
date: '',
|
date: '',
|
||||||
status: 2,
|
status: 2,
|
||||||
@@ -133,7 +133,7 @@ function getlist() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
/** 跳转到巡检上传页面 */
|
/** 跳转到巡检上传页面 */
|
||||||
function handleTap(ite) {
|
function handleTap(ite: InspectionListType) {
|
||||||
if (isComputed(ite.taskStatus)) {
|
if (isComputed(ite.taskStatus)) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageSubPack/inspection/inspection_main?id=' + ite.id
|
url: '/pageSubPack/inspection/inspection_main?id=' + ite.id
|
||||||
@@ -151,8 +151,13 @@ function init() {
|
|||||||
getlist()
|
getlist()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onLoad(options => {
|
||||||
|
activeValue.value = Number(options.type)
|
||||||
|
console.log(activeValue.value)
|
||||||
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
init()
|
handleTabs(activeValue.value)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -158,10 +158,17 @@ function getlist() {
|
|||||||
hasMore.value = reportRecords.value.length < total.value
|
hasMore.value = reportRecords.value.length < total.value
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
uni.showToast({
|
if (err.code === 500 && err.msg === '您没有权限访问') {
|
||||||
icon: 'error',
|
uni.showToast({
|
||||||
title: '网络错误'
|
icon: 'error',
|
||||||
})
|
title: '没有权限'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'error',
|
||||||
|
title: '网络异常'
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
isLoading.value = false
|
isLoading.value = false
|
||||||
@@ -396,8 +403,8 @@ function handlePrivew(imgs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tag-item {
|
.tag-item {
|
||||||
width: 112rpx;
|
|
||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
|
padding: 0 10rpx;
|
||||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
border: 1rpx solid #999999;
|
border: 1rpx solid #999999;
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ function getlist() {
|
|||||||
hasMore.value = reportRecords.value.length < total.value
|
hasMore.value = reportRecords.value.length < total.value
|
||||||
total.value = res.total
|
total.value = res.total
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
title: '网络异常'
|
title: '网络异常'
|
||||||
@@ -392,7 +392,7 @@ function handlePrivew(imgs) {
|
|||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
.tag-item {
|
.tag-item {
|
||||||
width: 112rpx;
|
padding: 0 10rpx;
|
||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
border: 1rpx solid #999999;
|
border: 1rpx solid #999999;
|
||||||
|
|||||||
@@ -241,7 +241,6 @@ function handleStop(row) {
|
|||||||
stepList.value[2].desc = `维修人员(${row.repairName})维修中`
|
stepList.value[2].desc = `维修人员(${row.repairName})维修中`
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log(status)
|
|
||||||
if (status === '2') {
|
if (status === '2') {
|
||||||
currentStep.value = 4
|
currentStep.value = 4
|
||||||
stepList.value[0].desc = '提交报修成功'
|
stepList.value[0].desc = '提交报修成功'
|
||||||
|
|||||||
@@ -156,7 +156,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { onLoad, onUnload ,onShow} from '@dcloudio/uni-app'
|
import { onLoad, onUnload, onShow } from '@dcloudio/uni-app'
|
||||||
import {
|
import {
|
||||||
getCurrentVillage,
|
getCurrentVillage,
|
||||||
getTodayInspection,
|
getTodayInspection,
|
||||||
@@ -215,7 +215,7 @@ const goToMyTicket = () => {
|
|||||||
// 跳转到 今日巡检
|
// 跳转到 今日巡检
|
||||||
const goToDaysInspection = () => {
|
const goToDaysInspection = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageSubPack/inspection/toDays_inscpection'
|
url: '/pageSubPack/inspection/toDays_inscpection?type=0'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 跳转到 巡检记录
|
// 跳转到 巡检记录
|
||||||
@@ -305,10 +305,12 @@ const slelctHomeData = data => {
|
|||||||
getNoticeData()
|
getNoticeData()
|
||||||
getInspectionData()
|
getInspectionData()
|
||||||
}
|
}
|
||||||
|
|
||||||
onShow(()=>{
|
onShow(()=>{
|
||||||
getbannarData()
|
getbannarData()
|
||||||
getInspectionData()
|
getInspectionData()
|
||||||
currentVillageData()
|
currentVillageData()
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user