5 changed files with 1124 additions and 342 deletions
@ -1,116 +1,113 @@ |
|||||
<script setup lang="ts"> |
<script setup lang="ts"> |
||||
import { |
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app' |
||||
onLaunch, |
import { ref, getCurrentInstance } from 'vue' |
||||
onShow, |
|
||||
onHide |
|
||||
} from '@dcloudio/uni-app' |
|
||||
import { |
|
||||
ref, |
|
||||
getCurrentInstance |
|
||||
} from 'vue' |
|
||||
|
|
||||
import { |
import { storeToRefs } from 'pinia' |
||||
getAccessToken |
import { getAccessToken } from '@/utils/auth' |
||||
} from '@/utils/auth'; |
import { appUpdate } from '@/utils/appUpdate.js' |
||||
import { |
|
||||
appUpdate |
|
||||
} from '@/utils/appUpdate.js'; |
|
||||
const { proxy } = getCurrentInstance() |
|
||||
|
|
||||
import { storeToRefs } from 'pinia' |
import { useCountStore } from '@/store' |
||||
import { useCountStore } from '@/store' |
|
||||
|
|
||||
// 获取自定义的store |
const { proxy } = getCurrentInstance() |
||||
const store = useCountStore() |
|
||||
appUpdate(fasle); |
|
||||
onLaunch(async () => { |
|
||||
// #ifdef MP-WEIXIN |
|
||||
if (uni.canIUse('getUpdateManager')) { |
|
||||
const updateManager = uni.getUpdateManager() |
|
||||
updateManager.onCheckForUpdate(function (res) { |
|
||||
if (res.hasUpdate) { |
|
||||
updateManager.onUpdateReady(function () { |
|
||||
uni.showModal({ |
|
||||
title: '更新提示', |
|
||||
content: '新版本已经准备好,是否重启应用?', |
|
||||
success: function (res) { |
|
||||
if (res.confirm) { |
|
||||
updateManager.applyUpdate() |
|
||||
} |
|
||||
} |
|
||||
}) |
|
||||
}) |
|
||||
updateManager.onUpdateFailed(function () { |
|
||||
uni.showModal({ |
|
||||
title: '已经有新版本了哟~', |
|
||||
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~' |
|
||||
}) |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
} else { |
|
||||
uni.showModal({ |
|
||||
title: '提示', |
|
||||
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。' |
|
||||
}) |
|
||||
} |
|
||||
// #endif |
|
||||
|
|
||||
// #ifdef APP-PLUS |
// 获取自定义的store |
||||
const notificationAuthorized = uni.getAppAuthorizeSetting().notificationAuthorized |
const store = useCountStore() |
||||
if (notificationAuthorized == 'denied') { |
// #ifdef APP |
||||
uni.showModal({ |
appUpdate(fasle) |
||||
title: '提示', |
// #endif |
||||
content: '是否前往打开通知权限', |
|
||||
success: res => { |
onLaunch(async () => { |
||||
if (res.confirm) { |
// #ifdef MP-WEIXIN |
||||
// this.openTongZhi() |
if (uni.canIUse('getUpdateManager')) { |
||||
} else if (res.cancel) { |
const updateManager = uni.getUpdateManager() |
||||
} |
updateManager.onCheckForUpdate(function (res) { |
||||
} |
if (res.hasUpdate) { |
||||
}) |
updateManager.onUpdateReady(function () { |
||||
} |
uni.showModal({ |
||||
plus.push.addEventListener("click", function (data) { |
title: '更新提示', |
||||
// 0接单1报修人确认2是维修工单验证 |
content: '新版本已经准备好,是否重启应用?', |
||||
if(data.payload.status == 0 || data.payload.status == 1 || data.payload.status == 2){ |
success(res) { |
||||
uni.navigateTo({ |
if (res.confirm) { |
||||
url: (`/pages/repairOrder/detail?type=${data.payload.type}&number=${data.payload.number}`) |
updateManager.applyUpdate() |
||||
}) |
} |
||||
} |
} |
||||
// // 1报修申请人确认 |
}) |
||||
// if(data.payload.status == 1){ |
}) |
||||
// uni.navigateTo({ |
updateManager.onUpdateFailed(function () { |
||||
// url: (`/pages/repairOrder/detail?type=${data.payload.type}&number=${data.payload.number}`) |
uni.showModal({ |
||||
// }) |
title: '已经有新版本了哟~', |
||||
// } |
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~' |
||||
}, false); |
}) |
||||
uni.getPushClientId({ |
}) |
||||
success: (res) => { |
} |
||||
uni.setStorageSync('cid',res.cid) |
}) |
||||
}, |
} else { |
||||
fail(err) { |
uni.showModal({ |
||||
} |
title: '提示', |
||||
}) |
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。' |
||||
uni.onPushMessage((res) => { |
}) |
||||
}) |
} |
||||
// #endif |
// #endif |
||||
if (getAccessToken()) { |
|
||||
await store.GetPermissionInfo().then(res => { |
// #ifdef APP-PLUS |
||||
uni.setStorageSync('permissionInfo',res.permissions) |
const { notificationAuthorized } = uni.getAppAuthorizeSetting() |
||||
uni.setStorageSync('roles',res.roles) |
if (notificationAuthorized == 'denied') { |
||||
}).catch(() => { |
uni.showModal({ |
||||
}) |
title: '提示', |
||||
await store.GetInfo().then(res => { |
content: '是否前往打开通知权限', |
||||
}).catch(() => { }) |
success: (res) => { |
||||
} |
if (res.confirm) { |
||||
// 解决onLaunch和onLoad异步问题 |
// this.openTongZhi() |
||||
proxy.$isResolve(); |
} else if (res.cancel) { |
||||
}) |
} |
||||
onShow(() => { |
} |
||||
}) |
}) |
||||
onHide(() => { |
} |
||||
}) |
plus.push.addEventListener( |
||||
|
'click', |
||||
|
function (data) { |
||||
|
// 0接单1报修人确认2是维修工单验证 |
||||
|
if (data.payload.status == 0 || data.payload.status == 1 || data.payload.status == 2) { |
||||
|
uni.navigateTo({ |
||||
|
url: `/pages/repairOrder/detail?type=${data.payload.type}&number=${data.payload.number}` |
||||
|
}) |
||||
|
} |
||||
|
// // 1报修申请人确认 |
||||
|
// if(data.payload.status == 1){ |
||||
|
// uni.navigateTo({ |
||||
|
// url: (`/pages/repairOrder/detail?type=${data.payload.type}&number=${data.payload.number}`) |
||||
|
// }) |
||||
|
// } |
||||
|
}, |
||||
|
false |
||||
|
) |
||||
|
uni.getPushClientId({ |
||||
|
success: (res) => { |
||||
|
uni.setStorageSync('cid', res.cid) |
||||
|
}, |
||||
|
fail(err) {} |
||||
|
}) |
||||
|
uni.onPushMessage((res) => {}) |
||||
|
// #endif |
||||
|
if (getAccessToken()) { |
||||
|
await store |
||||
|
.GetPermissionInfo() |
||||
|
.then((res) => { |
||||
|
uni.setStorageSync('permissionInfo', res.permissions) |
||||
|
uni.setStorageSync('roles', res.roles) |
||||
|
}) |
||||
|
.catch(() => {}) |
||||
|
await store |
||||
|
.GetInfo() |
||||
|
.then((res) => {}) |
||||
|
.catch(() => {}) |
||||
|
} |
||||
|
// 解决onLaunch和onLoad异步问题 |
||||
|
proxy.$isResolve() |
||||
|
}) |
||||
|
onShow(() => {}) |
||||
|
onHide(() => {}) |
||||
</script> |
</script> |
||||
<style lang="scss"> |
<style lang="scss"> |
||||
@import 'vk-uview-ui/index.scss'; |
@import 'vk-uview-ui/index.scss'; |
||||
</style> |
</style> |
||||
|
@ -0,0 +1,779 @@ |
|||||
|
<template> |
||||
|
<!-- 详情 --> |
||||
|
<view class="detail-container"> |
||||
|
<view class="info"> |
||||
|
<view class="title"> |
||||
|
<view>点检工单</view> |
||||
|
</view> |
||||
|
<view class="dec"> |
||||
|
<view class="dec-item"> |
||||
|
<view>工单单号:</view> |
||||
|
<view>{{ data.number }}</view> |
||||
|
</view> |
||||
|
<view class="" style="display: flex; flex-direction: row; align-items: center; padding-bottom: 30rpx"> |
||||
|
<view style="color: red">*</view> |
||||
|
<view>点检描述:</view> |
||||
|
<view class=""> |
||||
|
<u-input v-model="data.describes" placeholder="请输入点检描述" /> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="" style="display: flex; flex-direction: row; align-items: center; padding-bottom: 30rpx" v-if="data.status != 'PECEIVED'"> |
||||
|
<view style="color: red">*</view> |
||||
|
<view>班次:</view> |
||||
|
<!-- <view>{{ data.classesName }}</view>sssssss --> |
||||
|
<view class="select" style="margin-left: 50rpx; width: 70%" @click="openSingleColumn('classes', '', maintenanceShift)"> |
||||
|
<view class="input" v-if="data.classesName"> |
||||
|
{{ data.classesName }} |
||||
|
</view> |
||||
|
<view class="placeholder" v-else> |
||||
|
{{ `请选择班次` }} |
||||
|
</view> |
||||
|
<u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="dec-item"> |
||||
|
<view>点检人:</view> |
||||
|
<view>{{ store.name }}</view> |
||||
|
</view> |
||||
|
<view class="dec-item"> |
||||
|
<view>点检时间:</view> |
||||
|
<view>{{ $time.formatDate(data.createTime) }}</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<div class="line"></div> |
||||
|
<view class="info" style="padding-bottom: 130rpx"> |
||||
|
<view class="tab"> |
||||
|
<u-tabs :list="list" :is-scroll="false" bar-height="2" bar-width="250" v-model="current" @change="change"></u-tabs> |
||||
|
</view> |
||||
|
|
||||
|
<view> |
||||
|
<view class="title"> |
||||
|
<view>{{ changeItem.name }}</view> |
||||
|
</view> |
||||
|
<view class="dec" v-if="changeItem.value == 1"> |
||||
|
<view class="dec-item"> |
||||
|
<view>编号:</view> |
||||
|
<view>{{ data.deviceNumber }}</view> |
||||
|
</view> |
||||
|
<view class="dec-item"> |
||||
|
<view>名称:</view> |
||||
|
<view>{{ data.name }}</view> |
||||
|
</view> |
||||
|
<view class="dec-item"> |
||||
|
<view>所属厂区:</view> |
||||
|
<view>{{ data.factoryAreaName }}</view> |
||||
|
</view> |
||||
|
<view class="dec-item"> |
||||
|
<view>类型:</view> |
||||
|
<view>{{ data.type == 'DEVICE' ? '设备' : data.type == 'TECH' ? '工艺' : '模具' }}</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<view class="list" v-if="changeItem.value == 2"> |
||||
|
<view class="item" v-for="(item, index) in subList" :key="index"> |
||||
|
<view class="item-box"> |
||||
|
<view class="spare-title"> |
||||
|
<view class="title-txt"> |
||||
|
{{ item.name }} |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<u-row gutter="16"> |
||||
|
<u-col :span="12"> |
||||
|
<view class="dec" style="margin-top: 10rpx"> |
||||
|
<view class=""> 设备部位名称: {{ item.equipmentPosition }} </view> |
||||
|
</view> |
||||
|
<view class="" style="margin-left: 30rpx; display: flex; flex-direction: row; color: #9c9c9c; align-items: center"> |
||||
|
<view class=""> 是否符合: </view> |
||||
|
<view class="" style="display: flex; margin-left: 20rpx; margin-top: 20rpx"> |
||||
|
<u-radio-group v-model="item.isConform"> |
||||
|
<view class="" style="display: flex; flex-direction: row"> |
||||
|
<view class=""> |
||||
|
<u-radio name="TRUE">符合</u-radio> |
||||
|
</view> |
||||
|
<view class=""> |
||||
|
<u-radio name="FALSE">不符合</u-radio> |
||||
|
</view> |
||||
|
</view> |
||||
|
</u-radio-group> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<view class="" style="display: flex; flex-direction: row; align-items: center"> |
||||
|
<view class=""> |
||||
|
<view class="" style="margin-left: 30rpx; color: #9c9c9c"> 巡检点检记录:</view> |
||||
|
</view> |
||||
|
<view class="" style="width: 60%; margin-left: 10rpx"> |
||||
|
<u-input v-model="item.records" :placeholder="'请输入巡检点检记录'" :class="{ error: item.numberNeedSwitch && !item.records }" /> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
|
<view class="image" style="margin-top: 20rpx"> |
||||
|
<view class="image-list" :key="refreshKey"> |
||||
|
<view class="image-item" v-for="(element, index) in item.imgList" :key="index"> |
||||
|
<image :src="element" mode=""></image> |
||||
|
<u-icon name="close-circle-fill" color="red" class="close" size="36" @click="delImage(index)"> </u-icon> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="image-item image-item1" @click="chooseImage(item)"> |
||||
|
<image src="../../static/images/photo.png" mode=""></image> |
||||
|
</view> |
||||
|
</view> |
||||
|
</u-col> |
||||
|
</u-row> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="footer"> |
||||
|
<view class="btns"> |
||||
|
<u-button type="primary" @click="submit()" :loading="loading" :disabled="loading">验证</u-button> |
||||
|
</view> |
||||
|
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom)"></view> |
||||
|
</view> |
||||
|
<!-- 验证完结--> |
||||
|
<u-popup v-model="isVerifyShowSuccess" mode="center" border-radius="14"> |
||||
|
<view class="popup-title">意见</view> |
||||
|
<view class="popup"> |
||||
|
<textarea v-model="data.applyContent" placeholder="请输入内容"></textarea> |
||||
|
</view> |
||||
|
<view class="popup-footer"> |
||||
|
<view class="sure" @click="apply('APPROVEPASS')">通过</view> |
||||
|
<view class="reject" @click="apply('APPROVEREJECTED')" style="color: red">驳回</view> |
||||
|
</view> |
||||
|
</u-popup> |
||||
|
|
||||
|
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom)"></view> |
||||
|
<u-select v-model="singleColumnShow" mode="single-column" :default-value="singleColumnDefaultValue" :list="singleColumnList" @confirm="chooseSingleColumn"></u-select> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { onLoad, onShow } from '@dcloudio/uni-app' |
||||
|
import { ref, getCurrentInstance } from 'vue' |
||||
|
import * as dictApi from '@/api/dict' |
||||
|
import * as repairOrderApi from '@/api/repairOrder' |
||||
|
import { useCountStore } from '@/store' |
||||
|
import * as spotCheckOrderApi from '@/api/spotCheckOrder' |
||||
|
import * as uploadApi from '@/api/upload' |
||||
|
|
||||
|
const { proxy } = getCurrentInstance() |
||||
|
// 获取自定义的store |
||||
|
const store = useCountStore() |
||||
|
|
||||
|
const list = ref([ |
||||
|
{ |
||||
|
name: '设备信息', |
||||
|
value: 1 |
||||
|
}, |
||||
|
{ |
||||
|
name: '维修内容', |
||||
|
value: 2 |
||||
|
} |
||||
|
]) |
||||
|
const current = ref(0) |
||||
|
const changeItem = ref({ |
||||
|
name: '设备信息', |
||||
|
value: 1 |
||||
|
}) |
||||
|
const subList = ref([]) |
||||
|
const data = ref({}) |
||||
|
const loading = ref(false) |
||||
|
const loading1 = ref(false) |
||||
|
const type = ref('') |
||||
|
const serviceList = ref([]) |
||||
|
const isShowSuccess = ref(false) |
||||
|
const isVerifyShowSuccess = ref(false) // 验证确认弹出层 |
||||
|
const isApplyShowSuccess = ref(false) // 维修确认弹出层 |
||||
|
const orderCompleteResult = ref([]) // 订单完成类型 |
||||
|
const result = ref('TEMPORARILY') |
||||
|
const data1 = ref('') |
||||
|
const number = ref('') |
||||
|
|
||||
|
const singleColumnShow = ref(false) |
||||
|
const singleColumnDefaultValue = ref([]) |
||||
|
const singleColumnList = ref([]) |
||||
|
const field = ref('') |
||||
|
const maintenanceShift = ref([]) // 班次字典项 |
||||
|
const faultType = ref([]) // 故障类型字典项 |
||||
|
const imgList = ref([]) |
||||
|
const refreshKey = ref(0) |
||||
|
|
||||
|
function change(index) { |
||||
|
current.value = index |
||||
|
changeItem.value = list.value[current.value] |
||||
|
} |
||||
|
// 添加表格表单 |
||||
|
function addSubForm(clickType, item) { |
||||
|
if (data.value.status == 'APPLYPASS' || data.value.status == 'COMPLETED') { |
||||
|
return |
||||
|
} |
||||
|
if (data.value.status == 'PENDING') { |
||||
|
proxy.$modal.showToast('请先接单') |
||||
|
return |
||||
|
} |
||||
|
if (clickType == 'updata') { |
||||
|
proxy.$tab.navigateTo(`/pages/repairOrder/addServiceRecord?type=${data.value.type}&factoryAreaNumber=${data.value.factoryAreaNumber}&number=${data.value.number}&data=${encodeURIComponent(JSON.stringify(item))}&deviceNumber=${data.value.deviceNumber}`) |
||||
|
} else { |
||||
|
proxy.$tab.navigateTo(`/pages/repairOrder/addServiceRecord?type=${data.value.type}&factoryAreaNumber=${data.value.factoryAreaNumber}&number=${data.value.number}&deviceNumber=${data.value.deviceNumber}`) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function submit() { |
||||
|
if (!data.value.describes) { |
||||
|
proxy.$modal.showToast('请输入点检描述') |
||||
|
return |
||||
|
} |
||||
|
if (!data.value.classesName) { |
||||
|
proxy.$modal.showToast('请选择班次') |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
const submitData = { |
||||
|
id: data.value.id, |
||||
|
describes: data.value.describes, |
||||
|
deviceNumber: data.value.deviceNumber, |
||||
|
maintenances: data.value.maintenances, |
||||
|
classes: data.value.classes, |
||||
|
subList: subList.value, |
||||
|
type: type.value |
||||
|
} |
||||
|
|
||||
|
proxy.$modal.confirm('是否提交?').then(() => { |
||||
|
proxy.$modal.loading('加载中') |
||||
|
loading.value = true |
||||
|
spotCheckOrderApi |
||||
|
.orderEditClick(submitData) |
||||
|
.then((res) => { |
||||
|
proxy.$modal.closeLoading() |
||||
|
if (res.data) { |
||||
|
proxy.$modal.showToast('提交成功') |
||||
|
setTimeout(() => { |
||||
|
proxy.$tab.navigateBack() |
||||
|
loading.value = false |
||||
|
}, 1500) |
||||
|
} else { |
||||
|
if (res.msg) { |
||||
|
proxy.$modal.showToast(res.msg) |
||||
|
} else { |
||||
|
proxy.$modal.showToast('提交失败') |
||||
|
} |
||||
|
loading.value = false |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
proxy.$modal.closeLoading() |
||||
|
loading.value = false |
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 单列模式点击确定之后 |
||||
|
function chooseSingleColumn(e) { |
||||
|
data.value[field.value] = e[0].value |
||||
|
if (field.value == 'classes') { |
||||
|
data.value.classesName = e[0].label |
||||
|
} |
||||
|
singleColumnShow.value = false |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 点击验证完结填写意见 |
||||
|
*/ |
||||
|
function orderClickVerify() { |
||||
|
data.value.applyContent = null |
||||
|
isVerifyShowSuccess.value = true |
||||
|
spotCheckOrderApi.orderEditClick |
||||
|
} |
||||
|
function cancel() { |
||||
|
data.value.applyContent = null |
||||
|
isVerifyShowSuccess.value = false |
||||
|
isApplyShowSuccess.value = false |
||||
|
} |
||||
|
|
||||
|
function radioGroupChange(e) { |
||||
|
result.value = e |
||||
|
} |
||||
|
function sure() { |
||||
|
isShowSuccess.value = false |
||||
|
orderClick(2) |
||||
|
} |
||||
|
/** |
||||
|
* 验证确认 |
||||
|
*/ |
||||
|
function verify() { |
||||
|
isVerifyShowSuccess.value = false |
||||
|
orderClick() |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 审核确认 |
||||
|
*/ |
||||
|
function apply(status) { |
||||
|
isVerifyShowSuccess.value = false |
||||
|
data.value.status = status |
||||
|
orderClick() |
||||
|
} |
||||
|
// 点击审核 |
||||
|
async function orderClick() { |
||||
|
const dataOne = { |
||||
|
number: data.value.number, |
||||
|
status: data.value.status, |
||||
|
id: data.value.id, |
||||
|
approveOpinion: data.value.applyContent |
||||
|
} |
||||
|
const tips = '是否确认提交' |
||||
|
proxy.$modal.loading('加载中') |
||||
|
loading.value = true |
||||
|
await spotCheckOrderApi |
||||
|
.orderClickVerify(dataOne, type.value) |
||||
|
.then((res) => { |
||||
|
if (res.data) { |
||||
|
proxy.$modal.showToast('操作成功') |
||||
|
setTimeout(() => { |
||||
|
proxy.$tab.navigateBack() |
||||
|
loading.value = false |
||||
|
}, 1500) |
||||
|
} else { |
||||
|
proxy.$modal.showToast(res.msg) |
||||
|
loading.value = false |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
proxy.$modal.closeLoading() |
||||
|
loading.value = false |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
function previewImage(index, filePathList) { |
||||
|
uni.previewImage({ |
||||
|
current: index, // 当前显示图片的索引 |
||||
|
urls: filePathList, // 需要预览的图片链接列表 |
||||
|
longPressActions: { |
||||
|
itemList: ['保存图片'], |
||||
|
success(data) { |
||||
|
console.log(`选中了第${data.tapIndex}个按钮`) |
||||
|
console.log(`选中了第${data.index}张图片`) |
||||
|
}, |
||||
|
fail(err) { |
||||
|
console.log(err.errMsg) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除图片 |
||||
|
function delImage(index) { |
||||
|
imgList.value.splice(index, 1) |
||||
|
} |
||||
|
|
||||
|
function chooseImage(dataItem) { |
||||
|
uni.chooseImage({ |
||||
|
count: 1, // 默认9 |
||||
|
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有 |
||||
|
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 |
||||
|
success: (res) => { |
||||
|
const filePath = res.tempFilePaths[0] |
||||
|
proxy.$modal.loading() |
||||
|
const fileInfo = ref({ |
||||
|
name: '', |
||||
|
url: '' |
||||
|
}) |
||||
|
uploadApi |
||||
|
.uploadFile({ |
||||
|
filePath, |
||||
|
name: 'file', |
||||
|
formData: { |
||||
|
user: 'test' |
||||
|
} |
||||
|
}) |
||||
|
.then((ret) => { |
||||
|
if (dataItem.imgList) { |
||||
|
dataItem.imgList.push(ret.data) |
||||
|
fileInfo.value.url = ret.data |
||||
|
dataItem.fileInfoList.push(fileInfo.value) |
||||
|
} else { |
||||
|
dataItem.imgList = [ret.data] |
||||
|
fileInfo.value.url = ret.data |
||||
|
dataItem.fileInfoList = [fileInfo.value] |
||||
|
} |
||||
|
proxy.$modal.closeLoading() |
||||
|
}) |
||||
|
.catch((err) => { |
||||
|
proxy.$modal.closeLoading() |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 单列模式 |
||||
|
function openSingleColumn(fieldName, val, list) { |
||||
|
singleColumnList.value = list |
||||
|
field.value = fieldName |
||||
|
if (val) { |
||||
|
singleColumnDefaultValue.value = [list.findIndex((item) => item.value == val)] |
||||
|
} else { |
||||
|
singleColumnDefaultValue.value = [] |
||||
|
} |
||||
|
singleColumnShow.value = true |
||||
|
} |
||||
|
|
||||
|
async function getDeviceRepairDetail(number) { |
||||
|
await repairOrderApi |
||||
|
.getDeviceRepairDetail(number, type.value) |
||||
|
.then((res) => { |
||||
|
proxy.$modal.closeLoading() |
||||
|
data.value = res.data |
||||
|
if (res.data) { |
||||
|
} |
||||
|
loading.value = false |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
proxy.$modal.closeLoading() |
||||
|
loading.value = false |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
onLoad(async (option) => { |
||||
|
if (option.data) { |
||||
|
data.value = JSON.parse(decodeURIComponent(option.data)) |
||||
|
} |
||||
|
if (option.type) type.value = option.type |
||||
|
if (option.number) { |
||||
|
number.value = option.number |
||||
|
selectListByNumber() |
||||
|
} |
||||
|
maintenanceShift.value = await dictApi.getDict('maintenance_shift') |
||||
|
changeItem.value = list.value[current.value] |
||||
|
orderCompleteResult.value = await dictApi.getDict('order_complete_result') |
||||
|
}) |
||||
|
onShow(async () => { |
||||
|
if (number.value) { |
||||
|
list.value = [ |
||||
|
{ |
||||
|
name: type.value == 'MOLD' ? '模具信息' : '设备信息', |
||||
|
value: 1 |
||||
|
}, |
||||
|
{ |
||||
|
name: '点检项内容', |
||||
|
value: 2 |
||||
|
} |
||||
|
] |
||||
|
} else { |
||||
|
list.value = [ |
||||
|
{ |
||||
|
name: type.value == 'MOLD' ? '模具信息' : '设备信息', |
||||
|
value: 1 |
||||
|
}, |
||||
|
{ |
||||
|
name: '点检项内容', |
||||
|
value: 2 |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
maintenanceShift.value = await dictApi.getDict('maintenance_shift') |
||||
|
faultType.value = await dictApi.getDict('fault_type') |
||||
|
}) |
||||
|
function selectListByNumber() { |
||||
|
const data = { |
||||
|
number: number.value |
||||
|
} |
||||
|
spotCheckOrderApi |
||||
|
.selectListByNumber(data, type.value) |
||||
|
.then((res) => { |
||||
|
if (res.data) { |
||||
|
subList.value = res.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => {}) |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.detail-container { |
||||
|
min-height: 100vh; |
||||
|
background: white; |
||||
|
} |
||||
|
|
||||
|
.line { |
||||
|
background: #f5f5f5; |
||||
|
height: 20rpx; |
||||
|
} |
||||
|
|
||||
|
.info { |
||||
|
background: white; |
||||
|
} |
||||
|
|
||||
|
.tab { |
||||
|
border-bottom: 1px solid #e4e4e4; |
||||
|
} |
||||
|
|
||||
|
.title { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
padding: 20rpx 30rpx; |
||||
|
border-bottom: 1px solid #e4e4e4; |
||||
|
|
||||
|
view { |
||||
|
&:nth-child(1) { |
||||
|
flex: 1; |
||||
|
border-left: 10rpx solid #409eff; |
||||
|
padding-left: 20rpx; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.dec { |
||||
|
padding: 30rpx; |
||||
|
|
||||
|
.dec-item { |
||||
|
padding-bottom: 30rpx; |
||||
|
display: flex; |
||||
|
|
||||
|
view { |
||||
|
&:nth-child(1) { |
||||
|
width: 160rpx; |
||||
|
} |
||||
|
|
||||
|
&:nth-child(2) { |
||||
|
color: #888888; |
||||
|
flex: 1; |
||||
|
width: 0px; |
||||
|
word-wrap: break-word; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.dec2 { |
||||
|
padding: 10rpx 30rpx; |
||||
|
display: flex; |
||||
|
|
||||
|
view { |
||||
|
&:nth-child(1) { |
||||
|
width: 160rpx; |
||||
|
} |
||||
|
|
||||
|
&:nth-child(2) { |
||||
|
color: #888888; |
||||
|
flex: 1; |
||||
|
width: 0px; |
||||
|
word-wrap: break-word; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.items { |
||||
|
margin: 20rpx 30rpx; |
||||
|
border-radius: 12rpx; |
||||
|
background: #f5f5f5; |
||||
|
padding-bottom: 20rpx; |
||||
|
|
||||
|
.items-name { |
||||
|
padding: 20rpx; |
||||
|
border-bottom: 1px solid #dedede; |
||||
|
} |
||||
|
|
||||
|
.items-dec { |
||||
|
padding: 0px 20rpx; |
||||
|
margin-top: 20rpx; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.popup-title { |
||||
|
text-align: center; |
||||
|
font-size: 32rpx; |
||||
|
font-weight: bold; |
||||
|
color: #409eff; |
||||
|
padding: 30rpx; |
||||
|
} |
||||
|
|
||||
|
.popup { |
||||
|
width: 600rpx; |
||||
|
padding: 0rpx 60rpx 0rpx; |
||||
|
} |
||||
|
|
||||
|
.popup-footer { |
||||
|
display: flex; |
||||
|
border-top: 1px solid #e4e4e4; |
||||
|
|
||||
|
view { |
||||
|
line-height: 100rpx; |
||||
|
flex: 1; |
||||
|
text-align: center; |
||||
|
|
||||
|
&.sure { |
||||
|
color: #409eff; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.footer { |
||||
|
position: fixed; |
||||
|
bottom: 0px; |
||||
|
left: 0px; |
||||
|
width: 100%; |
||||
|
background: white; |
||||
|
z-index: 22; |
||||
|
} |
||||
|
|
||||
|
.btns { |
||||
|
display: flex; |
||||
|
|
||||
|
padding: 20rpx; |
||||
|
box-shadow: 0px -2rpx 20rpx rgba(0, 0, 0, 0.1); |
||||
|
|
||||
|
button { |
||||
|
flex: 1; |
||||
|
margin: 0px 10rpx; |
||||
|
} |
||||
|
|
||||
|
.sure { |
||||
|
background: #409eff; |
||||
|
color: white; |
||||
|
border-radius: 8rpx; |
||||
|
|
||||
|
&::after { |
||||
|
border: 1px solid #409eff; |
||||
|
border-radius: 0px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.list { |
||||
|
padding: 20rpx; |
||||
|
|
||||
|
.item { |
||||
|
display: flex; |
||||
|
margin-bottom: 20rpx; |
||||
|
|
||||
|
.item-box { |
||||
|
border-radius: 12rpx; |
||||
|
border: 1px solid #dedede; |
||||
|
border-radius: 12rpx; |
||||
|
|
||||
|
flex: 1; |
||||
|
width: 0rpx; |
||||
|
} |
||||
|
|
||||
|
.spare-title { |
||||
|
padding: 20rpx 30rpx; |
||||
|
border-bottom: 1px solid #e4e4e4; |
||||
|
display: flex; |
||||
|
|
||||
|
.title-txt { |
||||
|
color: #409eff; |
||||
|
font-size: 30rpx; |
||||
|
font-weight: bold; |
||||
|
flex: 1; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.dec { |
||||
|
color: #9c9c9c; |
||||
|
padding: 0rpx 30rpx 20rpx; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.add-btn { |
||||
|
display: flex; |
||||
|
justify-content: flex-start; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
::v-deep .u-radio-group { |
||||
|
display: grid !important; |
||||
|
padding-bottom: 20rpx; |
||||
|
} |
||||
|
|
||||
|
.images { |
||||
|
display: flex; |
||||
|
width: 100%; |
||||
|
|
||||
|
image { |
||||
|
width: 30%; |
||||
|
margin-right: 20rpx; |
||||
|
height: 200rpx; |
||||
|
border-radius: 10rpx; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.select { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
height: 72rpx; |
||||
|
width: 100%; |
||||
|
|
||||
|
.input { |
||||
|
flex: 1; |
||||
|
font-size: 28rpx; |
||||
|
color: #000000; |
||||
|
} |
||||
|
|
||||
|
.placeholder { |
||||
|
flex: 1; |
||||
|
font-size: 28rpx; |
||||
|
color: rgb(192, 196, 204); |
||||
|
} |
||||
|
} |
||||
|
.images { |
||||
|
.preview-image { |
||||
|
width: 30%; |
||||
|
margin-right: 20rpx; |
||||
|
height: 200rpx; |
||||
|
border-radius: 10rpx; |
||||
|
cursor: pointer; // 添加这个属性以显示手型光标 |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.image { |
||||
|
padding: 0px 30rpx; |
||||
|
padding-bottom: 30rpx; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
|
||||
|
flex-wrap: wrap; |
||||
|
|
||||
|
.image-list { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
flex-wrap: wrap; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.image-item { |
||||
|
width: 210rpx; |
||||
|
height: 210rpx; |
||||
|
margin-right: 20rpx; |
||||
|
position: relative; |
||||
|
border: 1px solid rgba(230, 230, 230, 0.5); |
||||
|
margin-bottom: 20rpx; |
||||
|
border-radius: 20rpx; |
||||
|
overflow: hidden; |
||||
|
|
||||
|
image { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
} |
||||
|
|
||||
|
.close { |
||||
|
position: absolute; |
||||
|
right: 0px; |
||||
|
top: 0px; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.image-item1 { |
||||
|
border: none; |
||||
|
margin-right: 0px; |
||||
|
|
||||
|
image { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -1,240 +1,232 @@ |
|||||
<template> |
<template> |
||||
<!-- 点检工单 --> |
<!-- 点检工单 --> |
||||
<view class="container"> |
<view class="container"> |
||||
<u-navbar back-icon-color='#fff' :background="{ background: '#409eff'}" back-text="" title-color='#fff' |
<u-navbar back-icon-color="#fff" :background="{ background: '#409eff' }" back-text="" title-color="#fff" title="点检工单"> |
||||
title="点检工单"> |
<template v-slot:right> |
||||
<template v-slot:right> |
<u-icon name="plus" color="#fff" size="36" style="padding-right: 30rpx" @click="addForm" v-if="(params.type == 'DEVICE' && $auth.hasPermi('eam:device-spot-inspection-record-main:createAPP')) || (params.type == 'MOLD' && $auth.hasPermi('eam:mold-spot-inspection-record-main:createAPP')) || (params.type == 'TECH' && $auth.hasPermi('eam:tech-spot-inspection-record-main:createAPP'))"></u-icon> |
||||
<u-icon name="plus" color="#fff" size="36" style="padding-right: 30rpx;" @click="addForm" v-if="(params.type=='DEVICE'&&$auth.hasPermi('eam:device-spot-inspection-record-main:createAPP'))||(params.type=='MOLD'&&$auth.hasPermi('eam:mold-spot-inspection-record-main:createAPP'))||(params.type=='TECH'&&$auth.hasPermi('eam:tech-spot-inspection-record-main:createAPP'))"></u-icon> |
</template> |
||||
</template> |
</u-navbar> |
||||
</u-navbar> |
<view class="list"> |
||||
<view class="list"> |
<view class="item" v-for="(item, index) in list" :key="index"> |
||||
<view class="item" v-for="(item,index) in list" :key="index" > |
<view class="" @click="itemClick(item, index)"> |
||||
<view class="" @click="itemClick(item,index)"> |
<view class="title"> |
||||
<view class="title"> |
<view class="title-txt"> |
||||
<view class="title-txt"> |
{{ item.describes }} |
||||
{{item.describes}} |
</view> |
||||
</view> |
<u-tag text="待接单" v-if="item.status == 'PENDING'" bg-color="rgba(255,255,255,0)" color="#fe8463" border-color="#fe8463" type="primary" shape="circle" /> |
||||
<u-tag text="待接单" v-if="item.status == 'PENDING'" bg-color='rgba(255,255,255,0)' color='#fe8463' border-color='#fe8463' type="primary" shape='circle'/> |
<u-tag text="已撤回" v-else-if="item.status == 'REJECTED'" bg-color="rgba(255,255,255,0)" color="#d7d7d7" border-color="#d7d7d7 " type="warning" shape="circle" /> |
||||
<u-tag text="已撤回" v-else-if="item.status=='REJECTED'" bg-color='rgba(255,255,255,0)' color='#d7d7d7' border-color='#d7d7d7 ' type="warning" shape='circle'/> |
<u-tag text="已转办" v-else-if="item.status == 'TRANSFERRED'" bg-color="rgba(255,255,255,0)" color="#e01f54" border-color="#e01f54" type="success" shape="circle" /> |
||||
<u-tag text="已转办" v-else-if="item.status=='TRANSFERRED'" bg-color='rgba(255,255,255,0)' color='#e01f54' border-color='#e01f54' type="success" shape='circle'/> |
<u-tag text="已接单" v-else-if="item.status == 'PECEIVED'" bg-color="rgba(255,255,255,0)" color="#005eaa" border-color="#005eaa " type="error" shape="circle" /> |
||||
<u-tag text="已接单" v-else-if="item.status=='PECEIVED'" bg-color='rgba(255,255,255,0)' color='#005eaa' border-color='#005eaa ' type="error" shape='circle'/> |
<u-tag text="已验证" v-else-if="item.status == 'VERIFIED'" bg-color="rgba(255,255,255,0)" color="#2EC7C9" border-color="#2EC7C9" type="info" shape="circle" /> |
||||
<u-tag text="已验证" v-else-if="item.status=='VERIFIED'" bg-color='rgba(255,255,255,0)' color='#2EC7C9' border-color='#2EC7C9' type="info" shape='circle'/> |
<u-tag text="已完成" v-else-if="item.status == 'COMPLETED'" bg-color="rgba(255,255,255,0)" color="#2ba471" border-color="#2ba471" type="info" shape="circle" /> |
||||
<u-tag text="已完成" v-else-if="item.status=='COMPLETED'" bg-color='rgba(255,255,255,0)' color='#2ba471' border-color='#2ba471' type="info" shape='circle'/> |
<u-tag text="审核通过" v-else-if="item.status == 'APPROVEPASS'" bg-color="rgba(255,255,255,0)" color="#2ba471" border-color="#2ba471" type="info" shape="circle" /> |
||||
<u-tag text="审核通过" v-else-if="item.status=='APPROVEPASS'" bg-color='rgba(255,255,255,0)' color='#2ba471' border-color='#2ba471' type="info" shape='circle'/> |
<u-tag text="审核不通过" v-else-if="item.status == 'APPROVEREJECTED'" bg-color="rgba(255,255,255,0)" color="#e01f54" border-color="#e01f54" type="success" shape="circle" /> |
||||
<u-tag text="审核不通过" v-else-if="item.status=='APPROVEREJECTED'" bg-color='rgba(255,255,255,0)' color='#e01f54' border-color='#e01f54' type="success" shape='circle'/> |
</view> |
||||
</view> |
<view class="dec"> |
||||
<view class="dec"> |
工单单号:<span>{{ item.number }}</span> |
||||
工单单号:<span>{{item.number}}</span> |
</view> |
||||
</view> |
<view class="dec"> |
||||
<view class="dec"> |
类型:<span>{{ item.type == 'DEVICE' ? '设备' : item.type == 'TECH' ? '工艺' : '模具' }}</span> |
||||
类型:<span>{{item.type=='DEVICE'?'设备':item.type=='TECH'?'工艺':'模具'}}</span> |
</view> |
||||
</view> |
<view class="dec"> |
||||
<view class="dec"> |
{{ `${params.type == 'DEVICE' ? '设备' : '模具'}` }}编号:<span>{{ item.deviceNumber }}</span> |
||||
{{`${params.type=='DEVICE'?'设备' : '模具'}`}}编号:<span>{{item.deviceNumber}}</span> |
</view> |
||||
</view> |
<view class="dec"> |
||||
<view class="dec"> |
{{ `${params.type == 'DEVICE' ? '设备' : '模具'}` }}名称:<span>{{ item.name }}</span> |
||||
{{`${params.type=='DEVICE'?'设备' : '模具'}`}}名称:<span>{{item.name}}</span> |
</view> |
||||
</view> |
<view class="dec"> |
||||
<view class="dec"> |
所属厂区:<span>{{ item.factoryAreaName }}</span> |
||||
所属厂区:<span>{{item.factoryAreaName}}</span> |
</view> |
||||
</view> |
<view class="dec"> |
||||
<view class="dec"> |
班次:<span>{{ item.classesName }}</span> |
||||
班次:<span>{{item.classesName}}</span> |
</view> |
||||
</view> |
<view class="dec"> |
||||
<view class="dec"> |
点检人:<span>{{ item.maintenanceName }}</span> |
||||
点检人:<span>{{item.maintenanceName}}</span> |
</view> |
||||
</view> |
</view> |
||||
</view> |
<view class="bottom"> |
||||
<view class="bottom"> |
<view class="time" style="flex: 1"> |
||||
<view class="time" style="flex: 1;"> |
{{ `${$time.formatDate(item.createTime)}` }} |
||||
{{`${$time.formatDate(item.createTime)}`}} |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
<view style="height: 94rpx; padding-top: 30rpx"> |
||||
<view style="height: 94rpx;padding-top: 30rpx;"> |
<u-loadmore :status="status" v-if="status != 'loadmore'" /> |
||||
<u-loadmore :status="status" v-if="status != 'loadmore'" /> |
</view> |
||||
</view> |
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom)"></view> |
||||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
</view> |
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script setup lang="ts"> |
<script setup lang="ts"> |
||||
import { |
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app' |
||||
onLoad, |
import { ref, getCurrentInstance, nextTick } from 'vue' |
||||
onShow, |
import * as spotCheckOrderApi from '@/api/spotCheckOrder' |
||||
onReachBottom |
import { useCountStore } from '@/store' |
||||
} from '@dcloudio/uni-app' |
|
||||
import { |
const { proxy } = getCurrentInstance() |
||||
ref, |
// 获取自定义的store |
||||
getCurrentInstance, |
const store = useCountStore() |
||||
nextTick |
const params = ref({ |
||||
} from 'vue' |
pageNo: 1, |
||||
import * as spotCheckOrderApi from "@/api/spotCheckOrder" |
pageSize: 10, |
||||
import { useCountStore } from '@/store' |
type: '' |
||||
|
}) |
||||
const { proxy } = getCurrentInstance() |
const status = ref('loadmore') // 是否显示没有更多了 |
||||
// 获取自定义的store |
const list = ref([]) |
||||
const store = useCountStore() |
function itemClick(item, index) { |
||||
const params = ref({ |
if (item.status == 'PENDING') { |
||||
pageNo: 1, |
proxy.$tab.navigateTo(`/pages/spotCheckOrder/detailAndEdit?type=${params.value.type}&number=${item.number}&data=${encodeURIComponent(JSON.stringify(item))}`) |
||||
pageSize: 10, |
} else { |
||||
type: '', |
proxy.$tab.navigateTo(`/pages/spotCheckOrder/detail?type=${params.value.type}&number=${item.number}&data=${encodeURIComponent(JSON.stringify(item))}`) |
||||
}) |
} |
||||
const status = ref('loadmore') //是否显示没有更多了 |
} |
||||
const list = ref([]) |
function addForm(item) { |
||||
function itemClick(item, index) { |
proxy.$tab.navigateTo(`/pages/spotCheckOrder/addForm?type=${params.value.type}&data=${encodeURIComponent(JSON.stringify(item))}`) |
||||
proxy.$tab.navigateTo(`/pages/spotCheckOrder/detail?type=${params.value.type}&number=${item.number}&data=${encodeURIComponent(JSON.stringify(item))}`) |
} |
||||
} |
|
||||
function addForm(item) { |
async function getList() { |
||||
proxy.$tab.navigateTo(`/pages/spotCheckOrder/addForm?type=${params.value.type}&data=${encodeURIComponent(JSON.stringify(item))}`) |
if (status.value == 'nomore') return |
||||
} |
status.value = 'loading' |
||||
|
proxy.$modal.loading('加载中') |
||||
async function getList() { |
await spotCheckOrderApi |
||||
if (status.value == 'nomore') return; |
.spotCheckOrderPage(params.value, params.value.type) |
||||
status.value = 'loading'; |
.then((res) => { |
||||
proxy.$modal.loading('加载中') |
proxy.$modal.closeLoading() |
||||
await spotCheckOrderApi.spotCheckOrderPage(params.value,params.value.type).then((res) => { |
if (res.data.list.length > 0) { |
||||
proxy.$modal.closeLoading() |
list.value = list.value.concat(res.data.list) |
||||
if (res.data.list.length > 0) { |
params.value.pageNo++ |
||||
list.value = list.value.concat(res.data.list); |
status.value = 'loadmore' |
||||
params.value.pageNo++; |
} else { |
||||
status.value = 'loadmore' |
status.value = 'nomore' |
||||
} else { |
} |
||||
status.value = 'nomore' |
}) |
||||
} |
.catch(() => { |
||||
}).catch(() => { |
proxy.$modal.closeLoading() |
||||
proxy.$modal.closeLoading() |
}) |
||||
}) |
} |
||||
} |
onLoad((option) => { |
||||
onLoad((option) => { |
if (option.type) params.value.type = option.type |
||||
if (option.type) params.value.type = option.type; |
if (option.flag) params.value.flag = option.flag |
||||
if (option.flag) params.value.flag = option.flag; |
}) |
||||
}) |
onShow(() => { |
||||
onShow(() => { |
params.value.pageNo = 1 |
||||
params.value.pageNo = 1 |
list.value = [] |
||||
list.value = [] |
status.value = 'loadmore' |
||||
status.value = 'loadmore' |
getList() |
||||
getList() |
}) |
||||
|
onReachBottom(() => { |
||||
}) |
getList() |
||||
onReachBottom(() => { |
}) |
||||
getList() |
|
||||
}) |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||
.container{ |
.container { |
||||
background: #f5f5f5; |
background: #f5f5f5; |
||||
min-height: 100vh; |
min-height: 100vh; |
||||
} |
} |
||||
.list { |
.list { |
||||
background: #f5f5f5; |
background: #f5f5f5; |
||||
margin-top: 20rpx; |
margin-top: 20rpx; |
||||
|
|
||||
.item { |
.item { |
||||
padding: 30rpx 30rpx 0px 30rpx; |
padding: 30rpx 30rpx 0px 30rpx; |
||||
margin-top: 20rpx; |
margin-top: 20rpx; |
||||
background: white; |
background: white; |
||||
|
|
||||
.title { |
.title { |
||||
display: flex; |
display: flex; |
||||
align-items: center; |
align-items: center; |
||||
padding-bottom: 20rpx; |
padding-bottom: 20rpx; |
||||
|
|
||||
.title-txt { |
.title-txt { |
||||
color: #409eff; |
color: #409eff; |
||||
font-weight: bold; |
font-weight: bold; |
||||
font-size: 36rpx; |
font-size: 36rpx; |
||||
width: 0px; |
width: 0px; |
||||
flex: 1; |
flex: 1; |
||||
word-wrap: break-word; |
word-wrap: break-word; |
||||
} |
} |
||||
|
|
||||
.time { |
.time { |
||||
color: #919191; |
color: #919191; |
||||
|
} |
||||
} |
} |
||||
} |
|
||||
|
.dec { |
||||
.dec { |
padding-bottom: 20rpx; |
||||
padding-bottom: 20rpx; |
|
||||
|
span { |
||||
span { |
color: #999999; |
||||
color: #999999; |
} |
||||
} |
} |
||||
} |
|
||||
|
.last { |
||||
.last { |
padding-bottom: 30rpx; |
||||
padding-bottom: 30rpx; |
} |
||||
} |
|
||||
|
.bottom { |
||||
.bottom { |
display: flex; |
||||
display: flex; |
justify-content: space-between; |
||||
justify-content: space-between; |
align-items: center; |
||||
align-items: center; |
border-top: 1px solid #e4e4e4; |
||||
border-top: 1px solid #E4E4E4; |
padding: 20rpx 0px; |
||||
padding: 20rpx 0px; |
} |
||||
|
} |
||||
} |
} |
||||
} |
|
||||
} |
.list { |
||||
|
background: #f5f5f5; |
||||
.list { |
margin-top: 20rpx; |
||||
background: #f5f5f5; |
|
||||
margin-top: 20rpx; |
.item { |
||||
|
padding: 30rpx 30rpx 0px 30rpx; |
||||
.item { |
margin-top: 20rpx; |
||||
padding: 30rpx 30rpx 0px 30rpx; |
background: white; |
||||
margin-top: 20rpx; |
|
||||
background: white; |
.title { |
||||
|
display: flex; |
||||
.title { |
align-items: center; |
||||
display: flex; |
padding-bottom: 20rpx; |
||||
align-items: center; |
|
||||
padding-bottom: 20rpx; |
.title-txt { |
||||
|
color: #409eff; |
||||
.title-txt { |
font-weight: bold; |
||||
color: #409eff; |
font-size: 36rpx; |
||||
font-weight: bold; |
width: 0px; |
||||
font-size: 36rpx; |
flex: 1; |
||||
width: 0px; |
} |
||||
flex: 1; |
|
||||
} |
.time { |
||||
|
color: #919191; |
||||
.time { |
} |
||||
color: #919191; |
} |
||||
|
|
||||
} |
.dec { |
||||
} |
padding-bottom: 20rpx; |
||||
|
|
||||
.dec { |
span { |
||||
padding-bottom: 20rpx; |
color: #999999; |
||||
|
} |
||||
span { |
} |
||||
color: #999999; |
|
||||
} |
.last { |
||||
} |
padding-bottom: 30rpx; |
||||
|
} |
||||
.last { |
|
||||
padding-bottom: 30rpx; |
.bottom { |
||||
} |
display: flex; |
||||
|
justify-content: space-between; |
||||
.bottom { |
align-items: center; |
||||
display: flex; |
border-top: 1px solid #e4e4e4; |
||||
justify-content: space-between; |
padding: 20rpx 0px; |
||||
align-items: center; |
position: relative; |
||||
border-top: 1px solid #E4E4E4; |
|
||||
padding: 20rpx 0px; |
.button { |
||||
position: relative; |
position: absolute; |
||||
|
right: 0rpx; |
||||
|
} |
||||
.button { |
} |
||||
position: absolute; |
} |
||||
right: 0rpx; |
} |
||||
} |
</style> |
||||
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</style> |
|
||||
|
Loading…
Reference in new issue