|
|
@@ -15,13 +15,33 @@
|
|
|
:name="item.category"
|
|
|
>
|
|
|
<el-form-item
|
|
|
- label-width="250px"
|
|
|
+ label-width="100px"
|
|
|
v-for="(calculateConfiguration, index) in item.calculateConfigurations"
|
|
|
:key="index"
|
|
|
:label="calculateConfiguration.name"
|
|
|
class="mt-3"
|
|
|
>
|
|
|
- <el-input-number v-model="calculateConfiguration.value" :min="0" :step="0.1"></el-input-number>
|
|
|
+ <template v-if="calculateConfiguration.valueCategory === 0">
|
|
|
+ <el-input-number
|
|
|
+ v-model="calculateConfiguration.value"
|
|
|
+ :min="calculateConfiguration.minValue ? Number(calculateConfiguration.minValue) : undefined"
|
|
|
+ :max="calculateConfiguration.maxValue ? Number(calculateConfiguration.maxValue) : undefined"
|
|
|
+ :step="0.1"
|
|
|
+ ></el-input-number>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <m-card shadow="never">
|
|
|
+ <el-form-item
|
|
|
+ v-for="(item, index) in calculateConfiguration.value"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ label-width="100px"
|
|
|
+ class="mt-3"
|
|
|
+ >
|
|
|
+ <el-input v-model="item.value" placeholder="请输入对应的值"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </m-card>
|
|
|
+ </template>
|
|
|
</el-form-item>
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
@@ -60,7 +80,15 @@ export default {
|
|
|
performanceSolutionId: item.performanceSolutionId
|
|
|
})
|
|
|
|
|
|
- this.items = data.performanceSolutionDetailRespCategoryVos
|
|
|
+ this.items = data.performanceSolutionDetailRespCategoryVos.map(e => {
|
|
|
+ e.calculateConfigurations = e.calculateConfigurations.map(item => {
|
|
|
+ if (item.valueCategory !== 0) {
|
|
|
+ item.value = JSON.parse(item.value)
|
|
|
+ }
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ return e
|
|
|
+ })
|
|
|
this.activeNames = this.items.map(item => item.category)
|
|
|
} catch (error) {
|
|
|
this.$message.error(error)
|