宁夏预报废提交

This commit is contained in:
FrancisHu 2024-08-06 09:33:18 +08:00
parent 3803a53b2e
commit c2027920d5
7 changed files with 163 additions and 23 deletions

View File

@ -170,7 +170,7 @@ class HttpConfig {
submitPreExam: '/scrap/forecastWasteAudit', //提交审核
},
preCrashList: {
fetchPreSubList: '/scrap/getScrapTaskListApp', // 获取预报废提交列表
fetchPreSubList: '/scrap/getScrapTaskList', // 获取预报废提交列表
fetchDeptTree: '/user/deptTree', // 获取部门树状结构
submitCrashTask: '/scrap/submitScrapTask', // 预报废列表提交报废
},

View File

@ -514,6 +514,13 @@
"navigationBarTitleText": "综合服务中心审核详情"
}
},
{
"path" : "pages/IOTBinding/IOTBinding",
"style" :
{
"navigationBarTitleText" : "IOT设备绑定"
}
}
],
"tabBar": {

View File

@ -0,0 +1,108 @@
<template>
<view class="page">
<uni-forms ref="IOTForm" :modelValue="IOTFormData" :rules="IOTRules">
<uni-forms-item name="IOTCode" label="IOT编码">
<uni-easyinput v-model="IOTFormData.IOTCode"></uni-easyinput>
<h4 @click="scanIOT">扫一扫</h4>
</uni-forms-item>
<uni-forms-item name="deviceCode" label="机具编码">
<uni-easyinput v-model="IOTFormData.deviceCode"></uni-easyinput>
<h4 @click="scanDevice">扫一扫</h4>
</uni-forms-item>
<button class="submit-btn" @click="confirmBinding">确认绑定</button>
</uni-forms>
</view>
</template>
<script>
export default {
data() {
return {
IOTFormData: {
IOTCode: '',
deviceCode: ''
},
IOTRules: {
IOTCode: {
rules: [
{
required: true,
errorMessage: '请输入IOT设备编码'
}
]
},
deviceCode: {
rules: [
{
required: true,
errorMessage: '请输入机具装备编码!'
}
]
}
},
}
},
methods: {
scanIOT() {
uni.scanCode({
success: (res) => {
console.log(res.result, 'iot')
this.IOTFormData.IOTCode = res.result
}
})
},
scanDevice() {
uni.scanCode({
success: (res) => {
console.log(res.result, 'device')
this.IOTFormData.deviceCode = res.result
}
})
},
confirmBinding() {
this.$refs.IOTForm.validate().then(formData => {
console.log(formData)
})
}
}
}
</script>
<style lang="scss">
.page{
width: 100vw;
height: 100vh;
box-sizing: border-box;
padding: 10vw 5vw;
.uni-forms-item__content[data-v-61dfc0d0] {
display: flex;
align-items: center;
}
h4{
font-size: 14px;
font-weight: normal;
margin-left: 2vw;
color: #007CCA;
}
.submit-btn{
width: 60%;
box-sizing: border-box;
//padding: 5rpx 0;
display: flex;
justify-content: center;
align-items: center;
background-color: #169BD5;
color: #fff;
margin: 10vh auto;
}
}
</style>

View File

@ -60,7 +60,7 @@
</view>
<view
style="background-color: #09dcfc;"
v-show="pre.taskStatus == '58'"
v-show="pre.taskStatus == '58' || pre.taskStatus == '59'"
@click="seeListExamDetail(pre.scrapAuditorSetList)"
>
<uni-icons style="color: #fff;" type="chat"></uni-icons>
@ -228,6 +228,9 @@
export default {
data() {
return {
pageNum: 1,
pageSize: 10,
pageTotal: 0,
showLoading: false,
allChecked: false,
preCrashList: [],
@ -240,19 +243,23 @@
},
methods: {
searchKeyword () {
this.getSubList(this.subIpt)
this.preCrashList = []
this.getSubList()
},
getSubList (keyword) {
getSubList () {
let that = this
that.$api.preCrashList.fetchPreSubList({
keyword
pageNum: that.pageNum,
pageSize: that.pageSize,
keyword: that.subIpt
}).then(res => {
console.log(res);
that.pageTotal = res.data.total
if (res.data.code == 200) {
res.data.data.forEach(item => {
res.data.rows.forEach(item => {
item.checked = false
})
that.preCrashList = res.data.data
that.preCrashList = [...that.preCrashList, ...res.data.rows]
} else {
uni.showToast({
icon: 'none',
@ -432,8 +439,14 @@
}
},
onShow() {
this.getSubList('')
this.preCrashList = []
this.getSubList()
this.getDeptTree()
},
onReachBottom() {
if (this.preCrashList.length >= this.pageTotal) return;
this.pageNum++
this.getSubList()
}
}
</script>

View File

@ -163,13 +163,13 @@
}).then(res => {
console.log(res);
if (res.data.code == 200) {
res.data.data.forEach(item => {
res.data.rows.forEach(item => {
if (item.fileUrl != null) {
item.fileUrl = item.fileUrl.split(',')
}
item.chooseStatus = ''
})
that.preDetailList = res.data.data
that.preDetailList = res.data.rows
console.log(that.preDetailList);
}
}).catch(err => {

View File

@ -121,7 +121,12 @@
name: '试验检验审核',
pic: '/static/testExam.png',
url: 'testExam'
}
},
{
name: 'IOT设备绑定',
pic: '/static/testExam.png',
url: 'IOTBinding'
}
]
}
},

View File

@ -468,6 +468,13 @@ const router = createRouter({
"meta": {
"needAuth": "true"
}
},
{
"path" : "/pages/IOTBinding/IOTBinding",
"name": 'IOTBinding',
"meta": {
"needAuth": "true"
}
}
]
})