2023-04-07 19:07:56 +08:00

98 lines
2.3 KiB
Vue

<template>
<div class="main">
<p class="title">分析</p>
<div class="text">{{ analyseText }}</div>
</div>
</template>
<script>
import request from '@/util/index.js'
export default {
name: "analyse",
data(){
return {
time:'',
serviceInfo:{},
analyseText:''
}
},
props:{
analyseInfo:{
type: Object,
default:()=>{}
}
},
watch:{
analyseInfo:{
handler(value){
console.log('analyseInfowatch',value)
this.getLabelDetail()
},
immediate:true,
deep:true
}
},
onLoad(){
this.time = uni.getStorageSync('lastDay')
},
methods:{
async getLabelDetail(){
this.time = uni.getStorageSync('lastDay')
let id = uni.getStorageSync('currentService')
let req = {
SearchParameter:{
ANALYSISINS_TYPE:this.analyseInfo.analysisins_type,
ANALYSISINS_FORMAT:this.analyseInfo.analysisins_format,
ANALYSISINS_STATE:1,
SERVERPART_ID:id.Serverpart_ID,
},
PageIndex:1,
PageSize:10
}
const data = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',req)
this.analyseText = data.Result_Data.List[0].ANALYSIS_CONTENT
console.log('getLabelDetail',data)
},
}
}
</script>
<style scoped lang="scss">
.main{
width: 100%;
height: 48px;
box-sizing: border-box;
padding: 6px 8px;
background: #F1F3F7;
border-radius: 4px;
display: flex;
margin-top: 12px;
.title{
width: 28px;
height: 18px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #160002;
line-height: 18px;
padding: 0 4px;
text-align: center;
border-radius: 4px;
background:rgba(6, 93, 255, 0.1);
}
.text{
width: calc(100% - 46px);
padding-left: 6px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 18px;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
-webkit-line-clamp: 2;
}
}
</style>