|
@@ -0,0 +1,97 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="pa-3 white">
|
|
|
|
+ <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
|
+ <el-tab-pane label="核算规则" name="Solution">
|
|
|
|
+ <Solution label="核算规则" ref="Solution" @history="onHistory"></Solution>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ <el-tab-pane label="系数导向" name="Coefficient">
|
|
|
|
+ <Coefficient label="系数导向" ref="Coefficient"></Coefficient>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ <el-tab-pane label="历史记录" name="History">
|
|
|
|
+ <History label="历史记录" ref="History" @history="onHistory"></History>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ </el-tabs>
|
|
|
|
+ <el-drawer
|
|
|
|
+ :title="itemData.title"
|
|
|
|
+ :visible.sync="show"
|
|
|
|
+ direction="rtl"
|
|
|
|
+ >
|
|
|
|
+ <div class="pa-3" v-loading="loading">
|
|
|
|
+ <SolutionDetails :item-data="itemData"></SolutionDetails>
|
|
|
|
+ </div>
|
|
|
|
+ </el-drawer>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import Solution from '../solution/salarySolution'
|
|
|
|
+import Coefficient from '../solution/salaryCoefficient'
|
|
|
|
+import History from '../solution/salarySolutionHistory'
|
|
|
|
+import SolutionDetails from '../solution/components/solutionDetails.vue'
|
|
|
|
+import {
|
|
|
|
+ getSolutionDetails
|
|
|
|
+} from '@/api/salary'
|
|
|
|
+export default {
|
|
|
|
+ name: 'Salary-Sandbox',
|
|
|
|
+ provide () {
|
|
|
|
+ return {
|
|
|
|
+ env: 1
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ components: {
|
|
|
|
+ Solution,
|
|
|
|
+ Coefficient,
|
|
|
|
+ History,
|
|
|
|
+ SolutionDetails
|
|
|
|
+ },
|
|
|
|
+ data () {
|
|
|
|
+ return {
|
|
|
|
+ itemData: {},
|
|
|
|
+ loading: false,
|
|
|
|
+ show: false,
|
|
|
|
+ activeName: 'Solution'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ mounted () {
|
|
|
|
+ this.$refs[this.activeName].onInit()
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ handleClick (tab, event) {
|
|
|
|
+ this.$refs[this.activeName].onInit()
|
|
|
|
+ },
|
|
|
|
+ async onHistory ({ performanceSolutionId }) {
|
|
|
|
+ this.show = true
|
|
|
|
+ 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
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
+
|
|
|
|
+</style>
|