这一段代码的目的是,在用户点击某个项目的时候,通过变量id,进入到此界面,此界面为数据详情,会通过匹配id,把其他所有的数据,渲染到其对应的位置上,id是一个变量import { request } from '@/utils'export function myDetailLogin(id){ return request({ url: `/api/projbase/getById/${id}` , method:'GET' })}这里是接口代码 - CSDN文库",
"datePublished": "2025-06-22",
"keywords": "
<template>
<Layout :have-tab-bar="false" icon="">
<span slot="title" class="topBarTitle">我的项目</span>
<view class="container">
<view class="containerBody">
<view class="search">
<view class="text">数据</view>
</view>
<view class="history_item">
<view style="padding:10px">
<view style="color: #82D4FF;margin-bottom: 38rpx;display: flex;justify-content: space-between">
项目基本信息
<view style="width: 25px;height: 25px;">
<uni-icons @click="editData" type="compose" size="20" color="#fff"></uni-icons>
</view>
</view>
<view style="display: flex">
<view>
<view class="info">
<view class="label">项目名称</view>
<view>{{name}}</view>
</view>
<view class="info">
<view class="label">项目地址</view>
<view>{{projAddr}}</view>
</view>
</view>
</view>
<view style="color: #82D4FF;margin-bottom: 38rpx">项目基本情况</view>
<view style="display: flex;color: #fff;padding-right:18rpx;padding-top: 18rpx;">
<view class="project">
<view style="display: flex">
<view class="project-item">
<view style="width: 118px">
盾构机直径m
</view>
<view class="project-item-input">
<input disabled :value="diameter"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="project-item">
<view class="project-item-num" style="white-space: nowrap">
掘进速度cm/min
</view>
<view class="project-item-input">
<input disabled :value="speed"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="project-item">
<view class="project-item-num">
送泥比重g/cm³
</view>
<view class="project-item-input">
<input disabled :value="propor"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
</view>
</view>
<view style="display: flex;color: #fff;padding-right:18rpx;padding-top: 18rpx;">
<view class="project">
<view style="display: flex">
<view class="project-item">
<view class="project-item-num">
每小时送泥流量
<view class="unit">g/cm³</view>
</view>
<view class="project-item-input">
<input disabled :value="timesend"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="project-item" style="margin-top: 42rpx">
<view class="project-item-num">
管片宽度m
</view>
<view class="project-item-input">
<input disabled :value="width"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="project-item" style="margin-top: 42rpx">
<view class="project-item-num">
日掘进环数
</view>
<view class="project-item-input">
<input disabled :value="dayTunnelleCylindernumber"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
</view>
</view>
<view style="display: flex;color: #fff;padding-right:18rpx;padding-top: 18rpx;">
<view class="project">
<view style="display: flex">
<view class="project-item">
<view class="project-item-num">
每小时排泥流量
<view>cm/min</view>
</view>
<view class="project-item-input">
<input disabled :value="hourSpoildisposal"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
</view>
</view>
<view class="situation" style="height: 400px;">
<view class="every">
<view>各地层基本情况</view>
<!-- <view @click="addStratum">-->
<!-- <uni-icons type="plusempty" size="16" color="#fff"></uni-icons>-->
<!-- </view>-->
</view>
<view class="item" v-for="(item, index) in stratumList" :key="index">
<view style="color: #fff;margin-left: 10px;display: flex;">地层编号:
<input disabled :value="item.num"
style="background-color: #303E63;margin-left: 10px;border-radius: 5px" />
<!-- <view style="width: 25px;height:25px;margin-left:10px;background-color: #303E63;color: #B6BAFF;border-radius: 6px;text-align: center">{{ index + 1}}</view>-->
</view>
<view style="color: #fff;margin-left: 10px;margin-top:10px;display: flex;">地层名称:
<input disabled :value="item.name"
style="background-color: #303E63;margin-left: 10px;border-radius: 5px" />
<!-- <view style="width: 25px;height:25px;margin-left:10px;background-color: #303E63;color: #B6BAFF;border-radius: 6px;text-align: center">{{ index + 1}}</view>-->
</view>
<view class="situation_item" style="height: 35px;">
<view class="stratum">
<view>地层特性</view>
<view class="stratum-select">
<view>
<uni-section>
<uni-data-select :value="item.features1" :localdata="characterOne"
:disabled="disabled" style="width: 100%;"></uni-data-select>
</uni-section>
</view>
<view v-if="value === 0" style="margin-left: 10px">
<uni-section>
<uni-data-select :value="item.features2" :localdata="characterTwo"
:disabled="disabled" style="width: 100%;"></uni-data-select>
</uni-section>
</view>
</view>
</view>
</view>
<view class="situation_item" style="height: 35px;">
<view class="stratum">
<view>
地层比重g/cm³
</view>
<view class="stratum-input">
<input disabled :value="item.proportion"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
<view class="situation_item" style="height: 35px;">
<view class="stratum">
<view>地层含水%</view>
<view class="stratum-input">
<input disabled :value="item.water"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
<view class="situation_item">
<view style="padding: 7px">
<view>颗分区间</view>
<view class="interval">
<view style="display: flex">
<view class="interval-item">
<view class="interval-item-num">
>10
</view>
<view class="interval-item-input">
<input disabled :value="item.particleSize.size1"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="interval-item">
<view class="interval-item-num">
10-2
</view>
<view class="interval-item-input">
<input disabled :value="item.particleSize.size2"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="interval-item">
<view class="interval-item-num">
2-0.5
</view>
<view class="interval-item-input">
<input disabled :value="item.particleSize.size3"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="interval-item">
<view class="interval-item-num">
0.5-0.25
</view>
<view class="interval-item-input">
<input disabled :value="item.particleSize.size4"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
</view>
<view class="interval">
<view style="display: flex">
<view class="interval-item">
<view class="interval-item-num">
0.25-0.075
</view>
<view class="interval-item-input">
<input disabled :value="item.particleSize.size5"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="interval-item">
<view class="interval-item-num" style="white-space: nowrap">
0.075-0.005
</view>
<view class="interval-item-input">
<input disabled :value="item.particleSize.size6"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="interval-item">
<view class="interval-item-num">
小于0.005
</view>
<view class="interval-item-input">
<input disabled :value="item.particleSize.size7"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="clay">
<view style="color: #82D4FF;margin-left: 18rpx;padding-top: 18rpx">泥水设备百分比设定</view>
<view style="color:#fff;margin-left: 28rpx;margin-top: 18rpx">黏土</view>
<view class="clay_item">
<view class="stratum">
<view class="title">滚动筛</view>
<view class="stratum-select">
<view>
<uni-section>
<uni-data-select :localdata="rollRange" :disabled="disabled"
:value="gdsObject.label" style="width: 100%;"></uni-data-select>
</uni-section>
</view>
<!-- <view class="number" style="width: 80px">-->
<!-- <uni-easyinput-->
<!-- type="number"-->
<!-- placeholder="0"-->
<!-- :styles="{-->
<!-- backgroundColor: 'rgba(187, 200, 242, 0.1)',-->
<!-- borderRadius: '4px'-->
<!-- }"-->
<!-- >-->
<!-- <template #right>-->
<!-- <view style="display:flex;flex-direction: column">-->
<!-- <uni-icons type="top" size="14" color="#ff0000" style="height: 15px"></uni-icons>-->
<!-- <uni-icons type="down" size="14" color="#ff0000" style="height: 15px"></uni-icons>-->
<!-- </view>-->
<!-- </template>-->
<!-- </uni-easyinput>-->
<!-- </view>-->
<view style="margin-left: 10px">
<uni-number-box disabled :step="0.001" :value="gdsObject.value"
@change="changeValue" />
</view>
<view class="checkbox" style="margin-left: 10rpx;white-space: nowrap">
<uni-data-checkbox disabled multiple :localdata="hobby"></uni-data-checkbox>
</view>
</view>
</view>
</view>
<view class="clay_item">
<view class="stratum">
<view class="title">振动筛</view>
<view class="stratum-select">
<view>
<uni-section>
<uni-data-select :localdata="vibrationRange" :disabled="disabled"
:value="zdsObject.label" style="width: 100%;"></uni-data-select>
</uni-section>
</view>
<view style="margin-left: 18rpx">
<uni-number-box disabled :step="0.001" :value="zdsObject.value"
@change="changeValue" />
</view>
<view class="checkbox" style="margin-left: 10rpx;white-space: nowrap">
<uni-data-checkbox disabled multiple :localdata="hobby"></uni-data-checkbox>
</view>
</view>
</view>
</view>
<view class="clay_item">
<view class="stratum" style="white-space: nowrap">
<view class="title">一级旋流器</view>
<view class="stratum-select-one">
<view>
<uni-section>
<uni-data-select :localdata="oneRange" :disabled="disabled"
:value="xlq1Object.label" style="width: 100%;"></uni-data-select>
</uni-section>
</view>
<view style="margin-left: 18rpx">
<uni-number-box disabled :step="0.001"
:value="xlq1Object.value" @change="changeValue" />
</view>
<view style="margin-left: 10rpx;white-space: nowrap">
<uni-data-checkbox disabled multiple :localdata="hobby"></uni-data-checkbox>
</view>
</view>
</view>
</view>
<view class="clay_item">
<view class="stratum" style="white-space: nowrap">
<view class="title">二级旋流器</view>
<view class="stratum-select-two">
<view>
<uni-section>
<uni-data-select :localdata="twoRange" :disabled="disabled"
:value="xlq2Object.label" style="width: 100%;"></uni-data-select>
</uni-section>
</view>
<view style="margin-left: 18rpx">
<uni-number-box disabled :step="0.001" :value="xlq2Object.value"
@change="changeValue" />
</view>
<view style="margin-left: 10rpx;white-space: nowrap">
<uni-data-checkbox disabled multiple :localdata="hobby"></uni-data-checkbox>
</view>
</view>
</view>
</view>
<view class="clay_item">
<view class="stratum">
<view class="title">脱水筛</view>
<view class="stratum-select">
<view>
<uni-section>
<uni-data-select :localdata="dehydrationRange" :disabled="disabled"
:value="tssObject.label" style="width: 100%;"></uni-data-select>
</uni-section>
</view>
<view style="margin-left: 18rpx">
<uni-number-box disabled :step="0.001" :value="tssObject.value"
@change="changeValue" />
</view>
<view style="margin-left: 10rpx;white-space: nowrap">
<uni-data-checkbox disabled multiple :localdata="hobby"></uni-data-checkbox>
</view>
</view>
</view>
</view>
<view class="clay_item" style="height: 198rpx;">
<view class="sieve">
<view class="title">滚动筛</view>
<view class="sieve-select">
<view>滚动筛喷淋水容量:</view>
<view>
<uni-number-box disabled :step="0.001" :value="gdsDzsplsrl"
@change="changeValue" />
</view>
</view>
</view>
</view>
<view class="clay_item" style="height: 198rpx;">
<view class="sieve">
<view class="title">脱水筛</view>
<view class="sieve-select">
<view>筛上物密度:</view>
<view>
<uni-number-box disabled :step="0.001" :value="ttsSswmd"
@change="changeValue" />
</view>
</view>
</view>
</view>
<view class="clay_item" style="height: 258rpx;">
<view class="sieve">
<view class="title">预筛</view>
<view class="sieve-select" style="margin-bottom: 18rpx">
<view>筛上物密度:</view>
<view>
<uni-number-box disabled :step="0.001" :value="ysSswmd"
@change="changeValue" />
</view>
</view>
<view class="sieve-select">
<view>振动筛喷淋水容量:</view>
<view>
<uni-number-box disabled :step="0.001" :value="ysZdsplsrl"
@change="changeValue" />
</view>
</view>
</view>
</view>
<view class="clay_item" style="height: 258rpx;">
<view class="sieve">
<view class="title">旋流器</view>
<view class="sieve-select" style="margin-bottom: 18rpx">
<view>一级底流物密度:</view>
<view>
<uni-number-box disabled :step="0.001" :value="xlq1Dlwmd"
@change="changeValue" />
</view>
</view>
<view class="sieve-select">
<view>二级底流物密度:</view>
<view>
<uni-number-box disabled :step="0.001" :value="xlq2Dlwm"
@change="changeValue" />
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view style="color: #fff;margin:38rpx 0 38rpx 18rpx;">输出</view>
<view class="history_item">
<view style="padding:18rpx">
<view class="mudRes">
<view style="color: #82D4FF;margin-left: 18rpx;padding-top: 18rpx">计算处理百分比</view>
<view class="mudRes_item" v-for="(item,index) in 5" :key="index">
<view class="title">黏土</view>
<view class="content">
<view style="display: flex">
<view class="content_item">
<view class="content-item-title">
滚动筛%
</view>
<view class="content-item-input">
<input disabled :value="rollingScreen"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="content_item">
<view class="content-item-title">
振动筛%
</view>
<view class="content-item-input">
<input disabled :value="vibratingScreen"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="content_item">
<view class="content-item-title">
一级旋流器%
</view>
<view class="content-item-input">
<input disabled :value="xlq1"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
<view class="content_item">
<view class="content-item-title" style="width: 198rpx">
二级旋流器%
</view>
<view class="content-item-input">
<input disabled :value="xlq2"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
</view>
<view class="mudRes_item" v-for="(item,index) in 2" :key="index">
<view class="title">滚动筛筛下物</view>
<view class="content">
<view style="display: flex">
<view class="content_item">
<view class="content-item-title">
流量m³/R
</view>
<view class="content-item-input">
<input disabled :value="flow"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="content_item">
<view class="content-item-title">
比重g/m³
</view>
<view class="content-item-input">
<input disabled :value="weight"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="content_item">
<view class="content-item-title">
固相T/R
</view>
<view class="content-item-input">
<input disabled :value="solid"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
<view class="content_item">
<view class="content-item-title" style="width: 198rpx">
液相m³/R
</view>
<view class="content-item-input">
<input disabled :value="liquid"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
</view>
<view class="title" style="color: #82D4FF">泥浆池数据</view>
<view class="mudRes_item">
<view class="content">
<view style="display: flex">
<view class="content_item">
<view class="content-item-title">
调整池m³
</view>
<view class="content-item-input">
<input disabled :value="adjustmentPool"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="content_item">
<view class="content-item-title">
废浆池m³
</view>
<view class="content-item-input">
<input disabled :value="wasteMudPool"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="content_item">
<view class="content-item-title">
清水池m³
</view>
<view class="content-item-input">
<input disabled :value="cleanWaterPool"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
<view style="display: flex">
<view class="content_item">
<view class="content-item-title" style="width: 198rpx">
新浆池m³
</view>
<view class="content-item-input">
<input disabled :value="newMudPool"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="content_item">
<view class="content-item-title" style="width: 198rpx">
工业水池m³
</view>
<view class="content-item-input">
<input disabled :value="industrialWaterPool"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="content_item">
<view class="content-item-title" style="width: 198rpx">
集土坑m³
</view>
<view class="content-item-input">
<input disabled :value="soilCollectionPit"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
</view>
</view>
<view class="title" style="color: #82D4FF">干化配置数据</view>
<view class="mudRes_item">
<view v-for="(item,index) in 5" :key="index">
<view class="title">黏土</view>
<view class="content">
<view style="display: flex">
<view class="content_item">
<view class="content-item-title">
弃土量m³/R
</view>
<view class="content-item-input">
<input disabled :value="qituliang"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="content_item">
<view class="content-item-title">
弃浆量m³/R
</view>
<view class="content-item-input">
<input disabled :value="qijiangliang"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="content_item">
<view class="content-item-title">
需水量m³/R
</view>
<view class="content-item-input">
<input disabled :value="xushuiliang"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
<view style="display: flex">
<view class="content_item">
<view class="content-item-title" style="width: 210rpx">
干化配置推荐
</view>
<view class="content-item-input">
<input disabled :value="ganhuaConfiguration"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
<view class="content_item">
<view class="content-item-title" style="width: 210rpx">
弃浆配置推荐
</view>
<view class="content-item-input">
<input disabled :value="qijiangConfiguration"
style="width: 100%; height: 100%; background: transparent; border: none; outline: none; color: inherit; text-align: inherit;" />
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</Layout>
</template>
<script setup>
import {
ref,
onMounted,
onUnmounted,
watch,
nextTick
} from 'vue'
import Layout from '@/layout/index.vue'
import {
error
} from 'uview-plus';
import {
myDetailLogin
} from '../../apis/myDetail';
const detail = async () => {
error.value = '';
loading.value = true;
}
const rollRange = [{
value: 0,
text: "10mm"
},
{
value: 1,
text: "7mm"
},
{
value: 2,
text: "5mm"
},
]
const vibrationRange = [{
value: 0,
text: "6mm"
},
{
value: 1,
text: "3mm"
},
{
value: 2,
text: "1.5mm"
},
]
const oneRange = [{
value: 0,
text: "500"
},
{
value: 1,
text: "375"
},
{
value: 2,
text: "350"
},
{
value: 3,
text: "250"
},
]
const twoRange = [{
value: 0,
text: "150"
},
{
value: 1,
text: "125"
},
{
value: 2,
text: "100"
},
]
const dehydrationRange = [{
value: 0,
text: "0.6mm"
},
{
value: 1,
text: "0.35mm"
},
]
const characterOne = [{
value: 0,
text: "黏土"
},
{
value: 1,
text: "粉土"
},
{
value: 2,
text: "砂"
},
{
value: 3,
text: "圆砾"
},
{
value: 4,
text: "卵石"
},
{
value: 5,
text: "岩层"
},
{
value: 6,
text: "淤泥"
},
]
const characterTwo = [{
value: 0,
text: "流塑"
},
{
value: 1,
text: "软塑"
},
{
value: 2,
text: "可塑"
},
{
value: 3,
text: "硬塑"
},
]
const hobby = [{
text: '已选中项',
value: 0
}]
const stratumList = ref([{
particleSize: {
size1: '0',
size2: '0',
size3: '0',
size4: '0',
size5: '0',
size6: '70',
size7: '30'
}
}]);
const switchTab = (tab) => {
activeTab.value = tab
}
const open = () => {
uni.navigateTo({
url: '/pages/index/index'
})
}
//添加地层
const addStratum = () => {
//添加一个新的地层对象到数组
stratumList.value.push({});
// 滚动到底部
nextTick(() => {
const container = uni.createSelectorQuery().select('.situation');
container.boundingClientRect(data => {
uni.pageScrollTo({
scrollTop: data.height,
duration: 300
});
}).exec();
});
}
//编辑数据
const editData = () => {
//跳转到计算页
uni.navigateTo({
url: '/pages/calculate/index'
});
}
watch(value, (newVal) => {
if (newVal === 0) { // 黏土
const currentStratum = stratumList.value[stratumList.value.length - 1];
if (currentStratum) {
currentStratum.particleSize = {
size1: '0',
size2: '0',
size3: '0',
size4: '0',
size5: '0',
size6: '70', // 0.075-0.005
size7: '30' // <0.005
};
}
}
if (newVal === 1) { // 粉土
const currentStratum = stratumList.value[stratumList.value.length - 1];
if (currentStratum) {
currentStratum.particleSize = {
size1: '0',
size2: '0',
size3: '0',
size4: '0',
size5: '45',
size6: '45',
size7: '10'
};
}
}
if (newVal === 2) { // 砂
const currentStratum = stratumList.value[stratumList.value.length - 1];
if (currentStratum) {
currentStratum.particleSize = {
size1: '0',
size2: '0',
size3: '5',
size4: '25',
size5: '25',
size6: '40',
size7: '5'
};
}
}
if (newVal === 3) { // 圆砾
const currentStratum = stratumList.value[stratumList.value.length - 1];
if (currentStratum) {
currentStratum.particleSize = {
size1: '40',
size2: '15',
size3: '10',
size4: '10',
size5: '5',
size6: '15',
size7: '5'
};
}
}
if (newVal === 4 || newVal === 5) { //卵石 岩层
const currentStratum = stratumList.value[stratumList.value.length - 1];
if (currentStratum) {
currentStratum.particleSize = {
size1: '0',
size2: '0',
size3: '0',
size4: '0',
size5: '0',
size6: '0',
size7: '0'
};
}
}
});
onMounted(() => {
})
// 组件卸载时执行
onUnmounted(() => {
})
</script>
这一段代码的目的是,在用户点击某个项目的时候,通过变量id,进入到此界面,此界面为数据详情,会通过匹配id,把其他所有的数据,渲染到其对应的位置上,id是一个变量
import { request } from '@/utils'
export function myDetailLogin(id){
return request({
url: `/api/projbase/getById/${id}` ,
method:'GET'
})
}这里是接口代码