wangyx 1 month ago
parent
commit
4593b52703
  1. 17
      App.vue
  2. 4
      pages.json
  3. 532
      pages/login/login.vue
  4. 8
      pages/tabBar/work/index.vue
  5. 7
      pages/tabBar/xjPage/xj.vue
  6. 47
      pagesA/checkout/detail/detail.vue
  7. 2
      pagesA/checkout/list/list.vue
  8. 78
      pagesA/force/index/index.vue
  9. 37
      pagesA/release/detail/detail.vue
  10. 6
      pagesA/release/list/list.vue

17
App.vue

@ -2,22 +2,7 @@
export default { export default {
onLaunch: function() { onLaunch: function() {
console.log('App Launch'); console.log('App Launch');
// uni.logincode
uni.login({
provider:'weixin',
success: function(loginRes) {
// code
console.log('获取的用户code是:' + loginRes.code);
uni.request({
url:'',
method:'POST'
})
},
fail: function(error) {
//
console.error('登录失败:', error);
}
});
}, },
onShow: function() { onShow: function() {
console.log('App Show') console.log('App Show')

4
pages.json

@ -62,14 +62,14 @@
{ {
"path": "pages/tabBar/sdPage/sfReport", "path": "pages/tabBar/sdPage/sfReport",
"style": { "style": {
"navigationBarTitleText": "水上报", "navigationBarTitleText": "水上报",
"disableScroll": true "disableScroll": true
} }
}, },
{ {
"path": "pages/tabBar/sdPage/dfReport", "path": "pages/tabBar/sdPage/dfReport",
"style": { "style": {
"navigationBarTitleText": "电上报", "navigationBarTitleText": "电上报",
"disableScroll": true "disableScroll": true
} }
} }

532
pages/login/login.vue

@ -1,266 +1,282 @@
<template> <template>
<view class="login-bg"> <view class="login-bg">
<view class="login-welcome"> <view class="login-welcome">
<image <image class="login-bg-img" src="../../static/img/login-top.png" mode="aspectFill"></image>
class="login-bg-img" <view class="login-welcome-content">
src="../../static/img/login-top.png" <text class="login-title">您好</text>
mode="aspectFill" <text class="login-title">欢迎使用</text>
></image> </view>
<view class="login-welcome-content"> </view>
<text class="login-title">您好</text> <view class="login-form-box">
<text class="login-title">欢迎使用</text> <view class="login-form-item">
</view> <text class="login-label">用户名</text>
</view> <u-input v-model="form.username" placeholder="请输入用户名" type="text" border="none" shape="circle"
<view class="login-form-box"> custom-style="background:#f6f6f6;padding:16rpx 0;padding-left:16px;" />
<view class="login-form-item"> </view>
<text class="login-label">用户名</text> <view class="login-form-item">
<u-input <text class="login-label">密码</text>
v-model="form.username" <u-input v-model="form.password" placeholder="请输入密码" type="password" border="none" shape="circle"
placeholder="请输入用户名" custom-style="background:#f6f6f6;padding:16rpx 0;padding-left:16px;" />
type="text" </view>
border="none" <view class="login-form-item captcha-row">
shape="circle" <text class="login-label">验证码</text>
custom-style="background:#f6f6f6;padding:16rpx 0;padding-left:16px;" <view class="captcha-flex">
/> <u-input v-model="form.code" placeholder="验证码" border="none" shape="circle"
</view> custom-style="background:#f6f6f6;padding:16rpx 0;padding-left:16px;" />
<view class="login-form-item"> <image :src="codeUrl" class="captcha-img" mode="aspectFit" @click="getCaptcha" />
<text class="login-label">密码</text> </view>
<u-input </view>
v-model="form.password" </view>
placeholder="请输入密码" <view class="login-btn-box">
type="password" <u-button :hairline="false" shape="circle" :custom-style="btnStyle" @click="handleLogin"
border="none" color="#fff">登录</u-button>
shape="circle" </view>
custom-style="background:#f6f6f6;padding:16rpx 0;padding-left:16px;" </view>
/>
</view>
<view class="login-form-item captcha-row">
<text class="login-label">验证码</text>
<view class="captcha-flex">
<u-input
v-model="form.code"
placeholder="验证码"
border="none"
shape="circle"
custom-style="background:#f6f6f6;padding:16rpx 0;padding-left:16px;"
/>
<image
:src="codeUrl"
class="captcha-img"
mode="aspectFit"
@click="getCaptcha"
/>
</view>
</view>
</view>
<view class="login-btn-box">
<u-button
:hairline="false"
shape="circle"
:custom-style="btnStyle"
@click="handleLogin"
color="#fff"
>登录</u-button
>
</view>
</view>
</template> </template>
<script> <script>
import { login, getCodeImg } from "../api"; import {
import { encrypt, decrypt } from "../../utils/jsencrypt"; login,
export default { getCodeImg
data() { } from "../api";
return { import {
form: { encrypt,
username: "",//admin decrypt
password: "",//!Aa12345 } from "../../utils/jsencrypt";
code: "", export default {
uuid: "", data() {
rememberMe: false, return {
}, form: {
loading: false, username: "", //admin
loginFailCounts: {}, // password: "", //!Aa12345
accountLockTimes: {}, // code: "",
codeUrl: "", // base64url uuid: "",
btnStyle: { rememberMe: false,
width: "60%", },
height: "44px", loading: false,
fontSize: "18px", loginFailCounts: {}, //
margin: "50px", accountLockTimes: {}, //
marginTop: "200rpx", codeUrl: "", // base64url
background: "linear-gradient(90deg, #0DC6C6 0%, #13C2C2 100%)", btnStyle: {
}, width: "60%",
}; height: "44px",
}, fontSize: "18px",
methods: { margin: "50px",
async getCaptcha() { marginTop: "200rpx",
const res = await getCodeImg(); background: "linear-gradient(90deg, #0DC6C6 0%, #13C2C2 100%)",
this.captchaEnabled = },
res.captchaEnabled === undefined ? true : res.captchaEnabled; };
if (this.captchaEnabled) { },
this.codeUrl = "data:image/gif;base64," + res.img; methods: {
this.form.uuid = res.uuid; async getCaptcha() {
} const res = await getCodeImg();
}, this.captchaEnabled =
async handleLogin() { res.captchaEnabled === undefined ? true : res.captchaEnabled;
const username = String(this.form.username); // if (this.captchaEnabled) {
// 1. this.codeUrl = "data:image/gif;base64," + res.img;
const lockInfo = JSON.parse( this.form.uuid = res.uuid;
uni.getStorageSync(`lock_${username}`) || "{}" }
); },
if (lockInfo.lockEndTime) { async handleLogin() {
const currentTime = new Date().getTime(); // uni.logincode
if (currentTime < lockInfo.lockEndTime) { uni.login({
const remainingMinutes = Math.ceil( provider: 'weixin',
(lockInfo.lockEndTime - currentTime) / (1000 * 60) success: function(loginRes) {
); // code
uni.showToast({ console.log('获取的用户code是:' + loginRes.code);
title: `账号被锁定,请${remainingMinutes}分钟后再试`, // uni.request({
icon: "none", // url: '',
}); // method: 'POST'
return; // }).then(res => {
} else { // console.log(res, 'res')
uni.removeStorageSync(`lock_${username}`); // })
} },
} fail: function(error) {
// 2. //
if (!this.form.username || !this.form.password || !this.form.code) { console.error('登录失败:', error);
uni.showToast({ title: "请填写完整信息", icon: "none" }); }
return; });
} const username = String(this.form.username); //
this.loading = true; // 1.
// 3. const lockInfo = JSON.parse(
if (this.form.rememberMe) { uni.getStorageSync(`lock_${username}`) || "{}"
uni.setStorageSync("username", this.form.username); );
uni.setStorageSync("password", encrypt(this.form.password)); // if (lockInfo.lockEndTime) {
uni.setStorageSync("rememberMe", true); const currentTime = new Date().getTime();
} else { if (currentTime < lockInfo.lockEndTime) {
uni.removeStorageSync("username"); const remainingMinutes = Math.ceil(
uni.removeStorageSync("password"); (lockInfo.lockEndTime - currentTime) / (1000 * 60)
uni.removeStorageSync("rememberMe"); );
} uni.showToast({
const res = await login({ title: `账号被锁定,请${remainingMinutes}分钟后再试`,
username: String(this.form.username), icon: "none",
password: encrypt(this.form.password), // });
code: this.form.code, return;
uuid: this.form.uuid, } else {
client: "gypc", uni.removeStorageSync(`lock_${username}`);
}); }
this.loading = false; }
console.log(res); // 2.
if (!this.form.username || !this.form.password || !this.form.code) {
if (res.code === 200) { uni.showToast({
this.loginFailCounts[username] = 0; title: "请填写完整信息",
uni.setStorageSync("token", res.token); icon: "none"
uni.switchTab({ url: "/pages/tabBar/work/index" }); });
} else { return;
uni.showToast({ title: res.msg, icon: "none" }); }
// this.loading = true;
this.loginFailCounts[username] = // 3.
(this.loginFailCounts[username] || 0) + 1; if (this.form.rememberMe) {
if (this.loginFailCounts[username] >= 5) { uni.setStorageSync("username", this.form.username);
const lockEndTime = new Date().getTime() + 10 * 60 * 1000; uni.setStorageSync("password", encrypt(this.form.password)); //
this.accountLockTimes[username] = lockEndTime; uni.setStorageSync("rememberMe", true);
uni.setStorageSync( } else {
`lock_${username}`, uni.removeStorageSync("username");
JSON.stringify({ lockEndTime, username }) uni.removeStorageSync("password");
); uni.removeStorageSync("rememberMe");
uni.showToast({ }
title: "账号登录失败次数过多,已锁定10分钟", const res = await login({
icon: "none", username: String(this.form.username),
}); password: encrypt(this.form.password), //
} else { code: this.form.code,
uni.showToast({ title: res[1].data.msg || "登录失败", icon: "none" }); uuid: this.form.uuid,
} client: "gypc",
this.getCaptcha(); });
} this.loading = false;
}, console.log(res);
},
mounted() { if (res.code === 200) {
this.getCaptcha(); this.loginFailCounts[username] = 0;
}, uni.setStorageSync("token", res.token);
}; uni.switchTab({
url: "/pages/tabBar/work/index"
});
} else {
uni.showToast({
title: res.msg,
icon: "none"
});
//
this.loginFailCounts[username] =
(this.loginFailCounts[username] || 0) + 1;
if (this.loginFailCounts[username] >= 5) {
const lockEndTime = new Date().getTime() + 10 * 60 * 1000;
this.accountLockTimes[username] = lockEndTime;
uni.setStorageSync(
`lock_${username}`,
JSON.stringify({
lockEndTime,
username
})
);
uni.showToast({
title: "账号登录失败次数过多,已锁定10分钟",
icon: "none",
});
} else {
uni.showToast({
title: res[1].data.msg || "登录失败",
icon: "none"
});
}
this.getCaptcha();
}
},
},
mounted() {
this.getCaptcha();
},
};
</script> </script>
<style scoped> <style scoped>
.login-bg { .login-bg {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
background: #f7fafd; background: #f7fafd;
height: 100vh; height: 100vh;
} }
.login-welcome {
position: relative; .login-welcome {
width: 100vw; position: relative;
padding-top: 244rpx; width: 100vw;
overflow: hidden; padding-top: 244rpx;
} overflow: hidden;
.login-bg-img { }
position: absolute;
left: 0; .login-bg-img {
top: 0; position: absolute;
width: 100vw; left: 0;
height: 526px; top: 0;
z-index: 1; width: 100vw;
} height: 526px;
.login-welcome-content { z-index: 1;
position: relative; }
z-index: 2;
width: 100%; .login-welcome-content {
height: 100%; position: relative;
display: flex; z-index: 2;
flex-direction: column; width: 100%;
justify-content: center; height: 100%;
padding-left: 60rpx; display: flex;
margin-bottom: 70rpx; flex-direction: column;
} justify-content: center;
.login-title { padding-left: 60rpx;
font-size: 36rpx; margin-bottom: 70rpx;
font-weight: bold; }
color: #222;
margin-bottom: 10rpx; .login-title {
} font-size: 36rpx;
font-weight: bold;
color: #222;
margin-bottom: 10rpx;
}
.login-form-box {
width: 85%;
background: #fff;
border-radius: 24rpx;
box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.06);
padding: 40rpx 30rpx 30rpx 30rpx;
margin-bottom: -46rpx;
}
.login-form-item {
margin-bottom: 36rpx;
}
.login-label {
font-size: 28rpx;
font-weight: bold;
color: #222;
margin-bottom: 12rpx;
display: block;
}
.login-btn-box {
width: 100%;
display: flex;
justify-content: center;
}
.captcha-row {
display: flex;
flex-direction: column;
}
.captcha-flex {
display: flex;
align-items: center;
}
.login-form-box { .captcha-img {
width: 85%; width: 160rpx;
background: #fff; height: 60rpx;
border-radius: 24rpx; margin-left: 16rpx;
box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.06); border: 1rpx solid #e0e0e0;
padding: 40rpx 30rpx 30rpx 30rpx; border-radius: 8rpx;
margin-bottom: -46rpx; background: #fff;
} box-sizing: border-box;
.login-form-item { }
margin-bottom: 36rpx; </style>
}
.login-label {
font-size: 28rpx;
font-weight: bold;
color: #222;
margin-bottom: 12rpx;
display: block;
}
.login-btn-box {
width: 100%;
display: flex;
justify-content: center;
}
.captcha-row {
display: flex;
flex-direction: column;
}
.captcha-flex {
display: flex;
align-items: center;
}
.captcha-img {
width: 160rpx;
height: 60rpx;
margin-left: 16rpx;
border: 1rpx solid #e0e0e0;
border-radius: 8rpx;
background: #fff;
box-sizing: border-box;
}
</style>

8
pages/tabBar/work/index.vue

@ -71,8 +71,8 @@ export default {
{ image: '/static/img/记录.png', text: '巡检记录' }, { image: '/static/img/记录.png', text: '巡检记录' },
], ],
sdList: [ sdList: [
{ image: '/static/img/水费.png', text: '水上报' }, { image: '/static/img/水费.png', text: '水上报' },
{ image: '/static/img/电费.png', text: '电上报' }, { image: '/static/img/电费.png', text: '电上报' },
], ],
bxList: [ bxList: [
{ image: '/static/img/上报.png', text: '上报' }, { image: '/static/img/上报.png', text: '上报' },
@ -130,11 +130,11 @@ export default {
} }
}, },
handelSdClick (item) { handelSdClick (item) {
if(item.text === '水上报'){ if(item.text === '水上报'){
uni.navigateTo({ uni.navigateTo({
url: '/pages/tabBar/sdPage/sfReport' url: '/pages/tabBar/sdPage/sfReport'
}) })
} else if(item.text === '电上报'){ } else if(item.text === '电上报'){
uni.navigateTo({ uni.navigateTo({
url: '/pages/tabBar/sdPage/dfReport' url: '/pages/tabBar/sdPage/dfReport'
}) })

7
pages/tabBar/xjPage/xj.vue

@ -38,6 +38,8 @@
accept="all" accept="all"
@afterRead="afterRead" @afterRead="afterRead"
@delete="onDelete" @delete="onDelete"
:maxSize="10 * 1024 * 1024"
@oversize="oversize"
> >
<view class="custom-upload-btn"> <view class="custom-upload-btn">
<view class="icon-box"> <view class="icon-box">
@ -158,6 +160,11 @@ export default {
}); });
}); });
this.form.imageList = arry this.form.imageList = arry
},
//
oversize(e) {
this.$u.toast("请传10MB以内大小的图片/视频!");
return false;
}, },
getDictType(){ getDictType(){
getDicts('inspection_question_type').then((res) => { getDicts('inspection_question_type').then((res) => {

47
pagesA/checkout/detail/detail.vue

@ -100,6 +100,8 @@ import { detail } from '@/api/mz/contract';
:maxCount="10" :maxCount="10"
uploadIconColor="#12c3c3" uploadIconColor="#12c3c3"
:previewImage="true" :previewImage="true"
:maxSize="10 * 1024 * 1024"
@oversize="oversize"
> >
<view class="custom-upload-btn"> <view class="custom-upload-btn">
<view class="icon-box"> <view class="icon-box">
@ -197,6 +199,11 @@ export default {
beforeRead(event) { beforeRead(event) {
console.log("event", event); console.log("event", event);
}, },
//
oversize(e) {
this.$u.toast("请传10MB以内大小的图片/视频!");
return false;
},
// //
async afterRead(event) { async afterRead(event) {
@ -210,19 +217,33 @@ export default {
}); });
}); });
for (let i = 0; i < lists.length; i++) { for (let i = 0; i < lists.length; i++) {
const result = await uploadImage(lists[i].url); try {
let item = this[`fileList${event.name}`][fileListLen]; const result = await uploadImage(lists[i].url);
let item = this[`fileList${event.name}`][fileListLen];
this[`fileList${event.name}`].splice( this[`fileList${event.name}`].splice(
fileListLen, fileListLen,
1, 1,
Object.assign(item, { Object.assign(item, {
status: "success", status: "success",
message: "", message: "",
url: result.url, url: result.url,
}) })
); );
fileListLen++; fileListLen++;
} catch (err) {
//
let msg = (err && err.msg) || (err && err.message) || "上传失败";
console.log('344',err);
uni.showToast({
title: msg,
icon: "none",
duration: 3000
});
//
this[`fileList${event.name}`].splice(fileListLen, 1);
return; //
}
} }
var arry = []; var arry = [];
this.fileList.filter((v, i) => { this.fileList.filter((v, i) => {

2
pagesA/checkout/list/list.vue

@ -32,7 +32,7 @@
</view> </view>
<view style="text-align: center;" v-if="isLoading">加载中...</view> <view style="text-align: center;" v-if="isLoading">加载中...</view>
<view v-else-if="listData.length <= 0" class="no-data"> 暂无数据~ </view> <view v-else-if="listData.length <= 0" class="no-data"> 暂无数据~ </view>
<view v-else-if="noMore && listData.length > 0" style="text-align: center;">没有更多了~</view> <!-- <view v-else-if="noMore && listData.length > 0" style="text-align: center;">没有更多了~</view> -->
</scroll-view> </scroll-view>
</view> </view>
</template> </template>

78
pagesA/force/index/index.vue

@ -9,9 +9,10 @@
placeholder="请输入身份证号" placeholder="请输入身份证号"
v-model="form.idCard" v-model="form.idCard"
shape="round" shape="round"
:showAction="false" :showAction="false"
@search="handleQuery" @search="handleQuery"
@clear="handleClear" @clear="handleClear"
@clickIcon="handleQuery"
></u-search> ></u-search>
</u-form-item> </u-form-item>
</view> </view>
@ -53,13 +54,13 @@
/> --> /> -->
</u-form-item> </u-form-item>
<view style="border-bottom: 2rpx solid #e5e5e5; margin: 0"></view> <view style="border-bottom: 2rpx solid #e5e5e5; margin: 0"></view>
<u-form-item <!-- <u-form-item
label="退房日期" label="退房日期"
prop="leaveDate" prop="leaveDate"
required required
@click="showDate = false" @click="showDate = false"
> >
<text style="text-align: right">{{ baseInfo.checkOutTime }}</text> <text style="text-align: right">{{ baseInfo.checkOutTime }}</text> -->
<!-- <u--input <!-- <u--input
v-model="baseInfo.checkOutTime" v-model="baseInfo.checkOutTime"
placeholder="请选择退房日期" placeholder="请选择退房日期"
@ -67,7 +68,7 @@
readonly readonly
input-align="right" input-align="right"
></u--input> --> ></u--input> -->
</u-form-item> <!-- </u-form-item> -->
<!-- <u-form-item <!-- <u-form-item
label="问题类型" label="问题类型"
prop="problemType" prop="problemType"
@ -104,6 +105,8 @@
:maxCount="10" :maxCount="10"
uploadIconColor="#12c3c3" uploadIconColor="#12c3c3"
:previewImage="true" :previewImage="true"
:maxSize="10 * 1024 * 1024"
@oversize="oversize"
> >
<view class="custom-upload-btn"> <view class="custom-upload-btn">
<view class="icon-box"> <view class="icon-box">
@ -209,27 +212,29 @@ export default {
this.showInfo = true; this.showInfo = true;
} }
this.baseInfo.roomId = res.data.roomId; this.baseInfo.roomId = res.data.roomId;
} else { } else {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: "none", icon: "none",
}); });
} }
}); });
}, },
handleClear() { handleClear() {
this.form = { (this.baseInfo.graduateName = ""),
room: "", (this.baseInfo.telephone = ""),
name: "", (this.baseInfo.idCard = ""),
idCard: "", (this.baseInfo.checkOutTime = ""),
phone: "", (this.baseInfo.apartmentName = ""),
leaveDate: "", (this.baseInfo.buildingName = ""),
desc: "", (this.baseInfo.unitName = ""),
imageUrl: "", (this.baseInfo.roomTypeName = "");
pickerValue: "", },
problemType: "", //
}; oversize(e) {
}, this.$u.toast("请传10MB以内大小的图片/视频!");
return false;
},
// //
beforeRead(event) { beforeRead(event) {
// //
@ -315,13 +320,22 @@ export default {
}, },
handleTempSave(params) { handleTempSave(params) {
forceRelease(params).then((res) => { forceRelease(params).then((res) => {
uni.showToast({ if (res.code === 200) {
title: res.msg, uni.showToast({
icon: "success", title: res.msg,
}); icon: "success",
uni.switchTab({ });
url: "/pages/tabBar/work/index", setTimeout(() => {
}); uni.switchTab({
url: "/pages/tabBar/work/index",
});
}, 1500);
} else {
uni.showToast({
title: res.msg,
icon: "error",
});
}
}); });
}, },
}, },

37
pagesA/release/detail/detail.vue

@ -1,7 +1,11 @@
<template> <template>
<view class="checkout-detail-bg"> <view class="checkout-detail-bg">
<!-- 房间图片 --> <!-- 房间图片 -->
<image class="room-img" :src="userInfo.houseTypeCoverImg" mode="aspectFill"></image> <image
class="room-img"
:src="userInfo.houseTypeCoverImg"
mode="aspectFill"
></image>
<!-- 基本信息卡片 --> <!-- 基本信息卡片 -->
<view class="info-card"> <view class="info-card">
<view class="info-header"> <view class="info-header">
@ -78,7 +82,9 @@
uploadIconColor="#12c3c3" uploadIconColor="#12c3c3"
uploadText="点击上传" uploadText="点击上传"
:previewImage="true" :previewImage="true"
accept="media" accept="all"
:maxSize="10 * 1024 * 1024"
@oversize="oversize"
> >
</u-upload> </u-upload>
<!-- #endif --> <!-- #endif -->
@ -92,6 +98,8 @@
uploadIconColor="#12c3c3" uploadIconColor="#12c3c3"
:previewImage="true" :previewImage="true"
accept="image/*,video/*" accept="image/*,video/*"
:maxSize="10 * 1024 * 1024"
@oversize="oversize"
> >
<view class="custom-upload-btn"> <view class="custom-upload-btn">
<view class="icon-box"> <view class="icon-box">
@ -186,6 +194,11 @@ export default {
}); });
this.fileList = arry; this.fileList = arry;
}, },
//
oversize(e) {
this.$u.toast("请传10MB以内大小的图片/视频!");
return false;
},
// //
async afterRead(event) { async afterRead(event) {
let lists = [].concat(event.file); let lists = [].concat(event.file);
@ -284,14 +297,17 @@ export default {
} }
// //
if (!this.roomDetail.facilitiesCheckResults || this.roomDetail.facilitiesCheckResults.length === 0) { if (
!this.roomDetail.facilitiesCheckResults ||
this.roomDetail.facilitiesCheckResults.length === 0
) {
uni.showToast({ title: "请完成设备检查", icon: "none" }); uni.showToast({ title: "请完成设备检查", icon: "none" });
return; return;
} }
// //
const unfinishedDevices = this.roomDetail.facilitiesCheckResults.filter(item => const unfinishedDevices = this.roomDetail.facilitiesCheckResults.filter(
item.checkResult === undefined || item.checkResult === null (item) => item.checkResult === undefined || item.checkResult === null
); );
if (unfinishedDevices.length > 0) { if (unfinishedDevices.length > 0) {
uni.showToast({ title: "请完成所有设备检查", icon: "none" }); uni.showToast({ title: "请完成所有设备检查", icon: "none" });
@ -299,11 +315,14 @@ export default {
} }
// 0 // 0
const nonIntactDevices = this.roomDetail.facilitiesCheckResults.filter(item => const nonIntactDevices = this.roomDetail.facilitiesCheckResults.filter(
item.checkResult !== 0 (item) => item.checkResult !== 0
); );
if (nonIntactDevices.length > 0) { if (nonIntactDevices.length > 0) {
uni.showToast({ title: "所有设备必须都是完好状态才能提交", icon: "none" }); uni.showToast({
title: "所有设备必须都是完好状态才能提交",
icon: "none",
});
return; return;
} }
@ -313,7 +332,7 @@ export default {
cleaned: this.cleaned, cleaned: this.cleaned,
facilitiesCheckDesc: this.value, facilitiesCheckDesc: this.value,
facilitiesCheckImages: this.fileList, facilitiesCheckImages: this.fileList,
imageList:this.fileList imageList: this.fileList,
}; };
const res = await releaseRoom(parm); const res = await releaseRoom(parm);

6
pagesA/release/list/list.vue

@ -9,7 +9,7 @@
@scrolltolower="loadMore" @scrolltolower="loadMore"
style="height: 100vh;" style="height: 100vh;"
> >
<view v-for="item in listData" :key="item.id"> <view v-for="(item,index) in listData" :key="item.roomId">
<view class="checkout-card" @click="goDetail(item)"> <view class="checkout-card" @click="goDetail(item)">
<image :src="item.houseTypeCoverImg" class="room-img" mode="aspectFill"></image> <image :src="item.houseTypeCoverImg" class="room-img" mode="aspectFill"></image>
<view class="room-info"> <view class="room-info">
@ -23,7 +23,7 @@
</view> </view>
<view style="text-align: center;" v-if="isLoading">加载中...</view> <view style="text-align: center;" v-if="isLoading">加载中...</view>
<view v-else-if="listData.length <= 0" class="no-data"> 暂无数据~ </view> <view v-else-if="listData.length <= 0" class="no-data"> 暂无数据~ </view>
<view v-else-if="noMore && listData.length > 0" style="text-align: center;">没有更多了~</view> <!-- <view v-else-if="noMore " style="text-align: center;">没有更多了~</view> -->
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
@ -102,6 +102,8 @@ export default {
} }
}, },
goDetail(item) { goDetail(item) {
console.log(item,'item');
uni.navigateTo({ uni.navigateTo({
url: `/pagesA/release/detail/detail?roomId=${item.roomId}&userInfo=${JSON.stringify(item)}` url: `/pagesA/release/detail/detail?roomId=${item.roomId}&userInfo=${JSON.stringify(item)}`
}); });

Loading…
Cancel
Save