feat:待审数据
This commit is contained in:
@@ -3,41 +3,16 @@
|
||||
<view>
|
||||
<u-popup :show="showPopup" @close="close" @open="open" mode="left">
|
||||
<view class="detail_title">
|
||||
{{ taskDetail.sampleCode }}
|
||||
{{ taskDetail.sampleName }}
|
||||
{{ taskDetail.sampleAssayCode }}
|
||||
</view>
|
||||
<view>
|
||||
<scroll-view scroll-y style="height: 100vh; width: 30vw">
|
||||
<view style="padding: 10px">
|
||||
<up-collapse :value="getAllIndexes(fieldGroup)" :accordion="false">
|
||||
<up-collapse-item
|
||||
v-for="(fields, groupIndex) in fieldGroup"
|
||||
:title="fields.title"
|
||||
:key="groupIndex"
|
||||
v-if="curParameterKey === '' || curParameterKey === fields.title"
|
||||
>
|
||||
<view
|
||||
class="form-item-my"
|
||||
v-for="(field, fieldIndex) in fields.fields"
|
||||
:key="groupIndex + '-' + fieldIndex"
|
||||
>
|
||||
<view
|
||||
class="label-my"
|
||||
v-html="
|
||||
field.name +
|
||||
(typeof field.unit !== 'undefined' && field.unit !== null ? '(' + field.unit + ')' : '')
|
||||
"
|
||||
></view>
|
||||
<view class="content-my">
|
||||
<view class="content-my-text" v-if="field.type !== 'select'">
|
||||
<text class="content-my-text-value">{{ field.value }}</text>
|
||||
</view>
|
||||
<view class="content-my-text" v-else>
|
||||
<text class="content-my-text-value">{{ field.valueText }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-collapse-item>
|
||||
</up-collapse>
|
||||
<view class="form-item-my" v-for="(field, index) in fields" :key="index">
|
||||
<view class="label-my">{{ field.title }}</view>
|
||||
<view class="value-my">{{ field.value }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="p30"></view>
|
||||
</scroll-view>
|
||||
@@ -56,23 +31,16 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
detailPopupParam: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
taskDetailId: ''
|
||||
})
|
||||
detailId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:showPopup'])
|
||||
// Data
|
||||
const curSample = ref({})
|
||||
const curParameterKey = ref('')
|
||||
const fieldGroup = ref([])
|
||||
const fields = ref([])
|
||||
const taskDetail = ref({})
|
||||
const optionParameterClassify = ref([])
|
||||
const conAssayTaskId = ref('')
|
||||
const busSubCSampleId = ref('')
|
||||
|
||||
// Methods
|
||||
const getAllIndexes = arr => {
|
||||
@@ -84,25 +52,12 @@ const close = () => {
|
||||
}
|
||||
|
||||
const getSampleData = () => {
|
||||
const taskDetailId = props.detailPopupParam.taskDetailId
|
||||
nx.$api.assayTask.queryFieldsByTaskDetail({ taskDetailId }).then(res => {
|
||||
fieldGroup.value = res.result
|
||||
|
||||
const arr = [{ label: '全部', value: '' }]
|
||||
for (const g of fieldGroup.value) {
|
||||
const title = g.title
|
||||
arr.push({
|
||||
label: title,
|
||||
value: title
|
||||
})
|
||||
}
|
||||
optionParameterClassify.value = arr // 字段分类
|
||||
conAssayTaskId.value = res.additionalProperties.conAssayTaskId
|
||||
busSubCSampleId.value = res.additionalProperties.busSubCSampleId
|
||||
taskDetail.value = res.additionalProperties.taskDetail
|
||||
const businessAssayTaskDataId = props.detailId
|
||||
nx.$api.assayTask.getSampleAnalysisDataByTaskDataId({ businessAssayTaskDataId }).then(res => {
|
||||
taskDetail.value = res
|
||||
fields.value = res.columns
|
||||
})
|
||||
}
|
||||
|
||||
const open = () => {
|
||||
getSampleData()
|
||||
}
|
||||
@@ -112,41 +67,20 @@ const open = () => {
|
||||
.form-item-my {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 4px 0;
|
||||
}
|
||||
.label-my {
|
||||
width: 180px; /* 标签宽度 */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.label-my sub {
|
||||
font-size: 0.6em; /* 调整下标字体大小 */
|
||||
vertical-align: sub; /* 调整下标垂直对齐 */
|
||||
}
|
||||
|
||||
.content-my {
|
||||
flex: 1;
|
||||
padding-left: 7px;
|
||||
}
|
||||
|
||||
.content-my-text {
|
||||
height: 35px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.content-my-text-value {
|
||||
color: rgb(48, 49, 51);
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.detail_title {
|
||||
display: flex;
|
||||
justify-content: center; /* 水平居中 */
|
||||
align-items: center; /* 垂直居中 */
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 10px;
|
||||
padding: 10px;
|
||||
background-color: $uni-color-primary;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user