|
@@ -6,16 +6,17 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="系数管理">
|
|
|
<m-card shadow="never">
|
|
|
- <template v-if="items.length">
|
|
|
- <el-collapse v-model="activeNames">
|
|
|
- <el-collapse-item
|
|
|
+ <template v-if="items.length" v-slot:default>
|
|
|
+ <el-tabs v-model="activeNames" >
|
|
|
+ <el-tab-pane
|
|
|
v-for="item in items"
|
|
|
:key="item.category"
|
|
|
:title="item.category"
|
|
|
:name="item.category"
|
|
|
+ :label="item.category"
|
|
|
>
|
|
|
<el-form-item
|
|
|
- label-width="100px"
|
|
|
+ label-width="150px"
|
|
|
v-for="(calculateConfiguration, index) in item.calculateConfigurations"
|
|
|
:key="index"
|
|
|
:label="calculateConfiguration.name"
|
|
@@ -24,8 +25,8 @@
|
|
|
<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"
|
|
|
+ :min="calculateConfiguration.miniValue"
|
|
|
+ :max="calculateConfiguration.maxValue"
|
|
|
:step="0.1"
|
|
|
></el-input-number>
|
|
|
</template>
|
|
@@ -43,10 +44,10 @@
|
|
|
</m-card>
|
|
|
</template>
|
|
|
</el-form-item>
|
|
|
- </el-collapse-item>
|
|
|
- </el-collapse>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
</template>
|
|
|
- <template v-else>
|
|
|
+ <template v-if="!items.length">
|
|
|
<el-empty description="尚未配置系数"></el-empty>
|
|
|
</template>
|
|
|
</m-card>
|
|
@@ -64,7 +65,7 @@ export default {
|
|
|
name: 'salarySolutionParam',
|
|
|
data () {
|
|
|
return {
|
|
|
- activeNames: [],
|
|
|
+ activeNames: null,
|
|
|
loading: false,
|
|
|
itemData: {},
|
|
|
items: []
|
|
@@ -84,12 +85,20 @@ export default {
|
|
|
e.calculateConfigurations = e.calculateConfigurations.map(item => {
|
|
|
if (item.valueCategory !== 0) {
|
|
|
item.value = JSON.parse(item.value)
|
|
|
+ return item
|
|
|
+ }
|
|
|
+
|
|
|
+ item.maxValue = !item.maxValue ? Infinity : Number(item.maxValue)
|
|
|
+ item.miniValue = !item.miniValue ? -Infinity : Number(item.miniValue)
|
|
|
+
|
|
|
+ if (item.value) {
|
|
|
+ item.value = Number(item.value)
|
|
|
}
|
|
|
return item
|
|
|
})
|
|
|
return e
|
|
|
})
|
|
|
- this.activeNames = this.items.map(item => item.category)
|
|
|
+ this.activeNames = this.items[0].category
|
|
|
} catch (error) {
|
|
|
this.$message.error(error)
|
|
|
} finally {
|