|
@@ -0,0 +1,104 @@
|
|
|
+<template>
|
|
|
+ <m-dialog ref="dialog" title="版本记录" append-to-body>
|
|
|
+ <div v-loading="loading">
|
|
|
+ <m-card
|
|
|
+ v-for="item in rules"
|
|
|
+ :key="item.category"
|
|
|
+ shadow="never"
|
|
|
+ >
|
|
|
+ <template #header>
|
|
|
+ {{ item.category }}
|
|
|
+ </template>
|
|
|
+ <el-form label-width="100px">
|
|
|
+ <el-form-item label="系数">
|
|
|
+ <el-descriptions
|
|
|
+ :labelStyle="{ width: '180px'}"
|
|
|
+ :column="1"
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <el-descriptions-item
|
|
|
+ v-for="(calculateConfiguration, index) in item.calculateConfigurations"
|
|
|
+ :key="index"
|
|
|
+ :label="calculateConfiguration.name"
|
|
|
+ >
|
|
|
+ <template v-if="calculateConfiguration.valueCategory === 0">
|
|
|
+ <el-tag size="small">{{ calculateConfiguration.value }}</el-tag>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <m-table
|
|
|
+ clearHeader
|
|
|
+ shadow="never"
|
|
|
+ :headers="[
|
|
|
+ { label: '名称', prop: 'name' },
|
|
|
+ { label: '值', prop: 'value' }
|
|
|
+ ]"
|
|
|
+ :items="calculateConfiguration.value"
|
|
|
+ >
|
|
|
+ </m-table>
|
|
|
+ </template>
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </m-card>
|
|
|
+ </div>
|
|
|
+ </m-dialog>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {
|
|
|
+ getSolutionDetails
|
|
|
+} from '@/api/salary'
|
|
|
+export default {
|
|
|
+ name: 'salaryCoefficientHistoryPanel',
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ loading: false,
|
|
|
+ itemData: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ open (item) {
|
|
|
+ this.$refs.dialog.open()
|
|
|
+ this.onHistory(item)
|
|
|
+ },
|
|
|
+ async onHistory ({ performanceSolutionId }) {
|
|
|
+ this.loading = true
|
|
|
+ try {
|
|
|
+ const { data } = await getSolutionDetails({ performanceSolutionId })
|
|
|
+ const { performanceSolutionDetailRespCategoryVos, ...obj } = data
|
|
|
+ const resolveData = {
|
|
|
+ ...obj,
|
|
|
+ performanceSolutionDetailRespCategoryVos: performanceSolutionDetailRespCategoryVos.map(e => {
|
|
|
+ e.calculateConfigurations = e.calculateConfigurations.map(item => {
|
|
|
+ if (item.valueCategory !== 0) {
|
|
|
+ item.value = JSON.parse(item.value)
|
|
|
+ return item
|
|
|
+ }
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ return e
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.itemData = {
|
|
|
+ ...resolveData.entity,
|
|
|
+ ...resolveData
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error(error)
|
|
|
+ } finally {
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ rules () {
|
|
|
+ return this.itemData.performanceSolutionDetailRespCategoryVos || []
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+
|
|
|
+</style>
|