Compare commits

...

4 Commits

Author SHA1 Message Date
QJK
2fc6825cf5 11.9 2024-11-09 18:20:01 +08:00
QJK
7d50c4b699 Merge remote-tracking branch 'origin/master' 2024-11-09 18:10:17 +08:00
QJK
46e81a48fb Merge remote-tracking branch 'origin/master'
# Conflicts:
#	pages/index/selectProject.vue
2024-11-09 17:58:56 +08:00
QJK
b8fc167109 11.9 2024-11-09 17:56:06 +08:00
3 changed files with 1195 additions and 1153 deletions

View File

@ -1,9 +1,9 @@
// 应用全局配置
module.exports = {
//baseUrl: 'https://www.nuoyunr.com/admin-api',
baseUrl: 'http://127.0.0.1:48080/admin-api',
// baseUrl: 'https://www.nuoyunr.com/admin-api',
baseUrl: 'http://192.168.31.130:48080/admin-api',
imagesUrl: 'http://www.nuoyunr.com/lananRsc',
baseImageUrl: 'https://www.nuoyunr.com/minio',
baseImageUrl: 'https://www.nuoyunr.com/minio',
// 应用信息
appInfo: {
// 应用名称

File diff suppressed because it is too large Load Diff

View File

@ -1,201 +1,233 @@
<template>
<view class="content">
<view style="width: 100%; height: 44px;"></view>
<view class="top-heder">
<view class="t-left" @click="getback()">
<uni-icons type="left" size="18"></uni-icons>
</view>
<view class="t-title">
<text>选择检测项目</text>
</view>
<view class="t-you"></view>
</view>
<view class="cont_box">
<view class="content">
<view style="width: 100%; height: 44px;"></view>
<view class="top-heder">
<view class="t-left" @click="getback()">
<uni-icons type="left" size="18"></uni-icons>
</view>
<view class="t-title">
<text>选择检测项目</text>
</view>
<view class="t-you"></view>
</view>
<view class="cont_box">
<view class="title_">
可选检测项目
</view>
<view class="box_">
<view class="box_button " :class="{ 'box_button_x' :selectProject.indexOf(item)>-1 }"
v-for="item in inpectionProjects" @click="clickProject(item)">{{ item.projectName }}
</view>
</view>
<view class="title_">
可选检测项目
</view>
<view class="box_">
<view class="box_button " :class="{ 'box_button_x' :selectProject.indexOf(item)>-1 }"
v-for="item in inpectionProjects" @click="clickProject(item)">{{ item.projectName }}
</view>
</view>
<view class="title_">
已选检测项目
</view>
<u-steps activeColor="#0D2E8D" direction="column">
<u-steps-item :iconSize="iconSize" v-for="item in selectProject" :title="item.projectName">
</u-steps-item>
<view class="title_">
已选检测项目
</view>
<view style="margin-bottom: 15px;" v-for="(item,index) in selectProject" :key="index">
<view class="steps_">
<view class="index_">{{index+1}}</view>
<view style="font-size: 20px; font-weight: bold;">{{item.projectName}}</view>
</view>
<view class="xb_" v-if="index != selectProject.length - 1 "> </view>
</view>
</u-steps>
<!-- <u-steps activeColor="#0D2E8D" direction="column">
<u-steps-item :iconSize="iconSize" v-for="item in selectProject" :title="item.projectName">
</u-steps-item>
</u-steps> -->
</view>
</view>
<view class="dlanniu" @click="sureChoose()">
<text>确定选择</text>
</view>
<view class="dlanniu" @click="sureChoose()">
<text>确定选择</text>
</view>
</view>
</view>
</template>
<script>
import request from '../../utils/request';
import request from '../../utils/request';
export default {
data() {
return {
iconSize: 130,
inpectionProjects: [],
selectProject: []
}
},
onShow() {
this.getProjects()
export default {
data() {
return {
iconSize: 130,
inpectionProjects: [],
selectProject: []
}
},
onShow() {
this.getProjects()
},
methods: {
sureChoose() {
if (this.selectProject.length == 0) {
uni.showToast({
title: '请选择项目!',
icon: 'none'
})
return
}
this.selectProject.map(item => {
item.projectId = item.id
item.id = undefined
})
uni.$emit('selectProject', this.selectProject);
this.getback()
},
getback() {
uni.navigateBack()
},
async getProjects() {
let res = await request({
url: '/inspection/dl-inspection-project/page',
method: 'get',
params: {
pageNo: 1,
pageSize: 100
}
},
methods: {
sureChoose() {
if (this.selectProject.length == 0) {
uni.showToast({
title: '请选择项目!',
icon: 'none'
})
return
}
this.selectProject.map(item => {
item.projectId = item.id
item.id = undefined
})
uni.$emit('selectProject', this.selectProject);
this.getback()
},
getback() {
uni.navigateBack()
},
async getProjects() {
let res = await request({
url: '/inspection/dl-inspection-project/page',
method: 'get',
params: {
pageNo: 1,
pageSize: 100
}
})
this.inpectionProjects = res.data.records
},
clickProject(data) {
let idx = this.selectProject.indexOf(data)
if (idx > -1) {
// 使splice
this.selectProject.splice(idx, 1);
} else {
this.selectProject.push(data)
}
})
this.inpectionProjects = res.data.records
},
clickProject(data) {
let idx = this.selectProject.indexOf(data)
if (idx > -1) {
// 使splice
this.selectProject.splice(idx, 1);
} else {
this.selectProject.push(data)
}
}
}
}
}
}
}
</script>
<style scoped>
::v-deep .step-style{
.u-steps-item__content{
.u-text__value {
font-size:80rpx !important;
line-height: 90rpx !important;
}
}
}
.cont_box {
box-sizing: border-box;
padding: 10px;
}
.steps_ {
display: flex;
align-items: center;
.title_ {
font-weight: bold;
margin-bottom: 5px;
}
}
.box_ {
width: 100%;
display: flex;
flex-wrap: wrap;
}
.cont_box {
box-sizing: border-box;
padding: 10px;
}
.box_button_x {
border-radius: 6px;
border: 1px solid #0D2E8D;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
box-sizing: border-box;
padding: 10px 15px;
margin-right: 15px;
margin-bottom: 15px;
background: #0D2E8D;
color: #fff;
}
.title_ {
font-weight: bold;
margin-bottom: 5px;
}
.box_button {
border-radius: 6px;
border: 1px solid #999;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
box-sizing: border-box;
padding: 10px 15px;
margin-right: 15px;
margin-bottom: 15px;
}
.box_ {
width: 100%;
display: flex;
flex-wrap: wrap;
}
.dlanniu {
width: 80%;
height: 45px;
background: linear-gradient(180deg, #3F61C0 0%, #0D2E8D 100%);
border-radius: 50px;
display: flex;
align-items: center;
justify-content: center;
margin: 20px auto;
color: white;
}
.box_button_x {
border-radius: 6px;
border: 1px solid #0D2E8D;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
box-sizing: border-box;
padding: 10px 15px;
margin-right: 15px;
margin-bottom: 15px;
background: #0D2E8D;
color: #fff;
}
.t-you {
height: 100%;
width: 20%;
}
.box_button {
.content {
box-sizing: border-box;
width: 100%;
height: calc(100vh);
background: white;
}
border-radius: 6px;
border: 1px solid #999;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
box-sizing: border-box;
padding: 10px 15px;
margin-right: 15px;
margin-bottom: 15px;
}
.top-heder {
width: 100%;
height: 46px;
background: white;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 5px 15px;
}
.dlanniu {
width: 80%;
height: 45px;
background: linear-gradient(180deg, #3F61C0 0%, #0D2E8D 100%);
border-radius: 50px;
display: flex;
align-items: center;
justify-content: center;
margin: 20px auto;
color: white;
}
.t-title {
font-size: 17px;
font-weight: bold;
color: #333333;
}
.t-you {
height: 100%;
width: 20%;
}
.t-left {
width: 10%;
}
.content {
box-sizing: border-box;
width: 100%;
height: calc(100vh);
background: white;
}
.top-heder {
width: 100%;
height: 46px;
background: white;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 5px 15px;
}
.t-title {
font-size: 17px;
font-weight: bold;
color: #333333;
}
.t-left {
width: 10%;
}
.index_ {
width: 35px;
height: 35px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-weight: bold;
font-size: 18px;
background: #0D2E8D;
border-radius: 50%;
margin-right: 10px;
}
.xb_ {
width: 35px;
height: 35px;
display: flex;
align-items: center;
justify-content: center;
color: #0D2E8D;
font-size: 22px;
font-weight: bold;
}
</style>