|
@@ -14,29 +14,18 @@
|
|
|
@sort-change="onSortChange"
|
|
|
>
|
|
|
<template #actions="{ row }">
|
|
|
- <m-button text type="primary" size="small" @click="onOpen('sandboxDetailsRefs', row)">查看规则</m-button>
|
|
|
- <m-button text type="primary" size="small" @click="onOpen('sandboxParamRefs', row)">系数导向</m-button>
|
|
|
- <m-button text type="success" size="small" @click="onCalculate(row)">开始测算</m-button>
|
|
|
- <m-button text type="primary" size="small" @click="onCalculateHistory(row)">测算历史</m-button>
|
|
|
- <m-button text type="success" size="small" @click="onSend(row)">发布</m-button>
|
|
|
+ <m-button text type="primary" size="small" @click="onOpen('sandboxListRefs', row)">选择规则</m-button>
|
|
|
</template>
|
|
|
</m-table>
|
|
|
- <SandboxDetails ref="sandboxDetailsRefs"></SandboxDetails>
|
|
|
- <SandboxParam ref="sandboxParamRefs" @refresh="onInit"></SandboxParam>
|
|
|
- <SandboxCalculate ref="sandboxCalculateRefs"></SandboxCalculate>
|
|
|
- <SandboxHistory ref="sandboxHistoryRefs"></SandboxHistory>
|
|
|
+ <SandboxList ref="sandboxListRefs"></SandboxList>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- sendSalaryRelease,
|
|
|
getSolutionPage
|
|
|
} from '@/api/salary'
|
|
|
-import SandboxDetails from './sandboxDetails.vue'
|
|
|
-import SandboxParam from './sandboxParam.vue'
|
|
|
-import SandboxCalculate from './sandboxCalculate.vue'
|
|
|
-import SandboxHistory from './sandboxHistory.vue'
|
|
|
+import SandboxList from './sandboxList.vue'
|
|
|
export default {
|
|
|
name: 'salary-solution-list',
|
|
|
props: {
|
|
@@ -46,10 +35,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
- SandboxDetails,
|
|
|
- SandboxParam,
|
|
|
- SandboxCalculate,
|
|
|
- SandboxHistory
|
|
|
+ SandboxList
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
@@ -60,21 +46,21 @@ export default {
|
|
|
prop: 'title',
|
|
|
type: 'input',
|
|
|
options: {
|
|
|
- placeholder: '请输入方案名称'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '时间',
|
|
|
- type: 'datePicker',
|
|
|
- prop: 'time',
|
|
|
- options: {
|
|
|
- rangeSeparator: '至',
|
|
|
- startPlaceholder: '开始时间',
|
|
|
- endPlaceholder: '结束时间',
|
|
|
- valueFormat: 'yyyy-MM-dd',
|
|
|
- type: 'daterange'
|
|
|
+ placeholder: '请输入规则名称'
|
|
|
}
|
|
|
}
|
|
|
+ // {
|
|
|
+ // label: '时间',
|
|
|
+ // type: 'datePicker',
|
|
|
+ // prop: 'time',
|
|
|
+ // options: {
|
|
|
+ // rangeSeparator: '至',
|
|
|
+ // startPlaceholder: '开始时间',
|
|
|
+ // endPlaceholder: '结束时间',
|
|
|
+ // valueFormat: 'yyyy-MM-dd',
|
|
|
+ // type: 'daterange'
|
|
|
+ // }
|
|
|
+ // }
|
|
|
],
|
|
|
searchValues: {},
|
|
|
items: [],
|
|
@@ -101,7 +87,7 @@ export default {
|
|
|
methods: {
|
|
|
async onInit () {
|
|
|
this.loading = true
|
|
|
- const { time, ...query } = this.searchValues
|
|
|
+ // const { time, ...query } = this.searchValues
|
|
|
try {
|
|
|
const { data } = await getSolutionPage({
|
|
|
page: {
|
|
@@ -109,12 +95,12 @@ export default {
|
|
|
orders: this.orders
|
|
|
},
|
|
|
entity: {
|
|
|
- ...query,
|
|
|
- history: 1,
|
|
|
+ ...this.searchValues,
|
|
|
+ history: 0,
|
|
|
env: 0
|
|
|
- },
|
|
|
- startDate: time?.[0],
|
|
|
- endDate: time?.[1]
|
|
|
+ }
|
|
|
+ // startDate: time?.[0],
|
|
|
+ // endDate: time?.[1]
|
|
|
})
|
|
|
this.items = data.records.map(e => e.entity)
|
|
|
this.total = data.total
|
|
@@ -136,38 +122,10 @@ export default {
|
|
|
this.orders = v
|
|
|
this.onInit()
|
|
|
},
|
|
|
- async onSend (row) {
|
|
|
- this.loading = true
|
|
|
- try {
|
|
|
- await sendSalaryRelease({ performanceSolutionId: row.performanceSolutionId })
|
|
|
- this.$message.success('发布成功')
|
|
|
- this.onInit()
|
|
|
- } catch (error) {
|
|
|
- this.$message.error(error)
|
|
|
- } finally {
|
|
|
- this.loading = false
|
|
|
- }
|
|
|
- },
|
|
|
- onCalculate (item) {
|
|
|
- this.$refs.sandboxCalculateRefs.open(item)
|
|
|
- },
|
|
|
- onCalculateHistory (item) {
|
|
|
- this.$refs.sandboxHistoryRefs.open(item)
|
|
|
- },
|
|
|
+
|
|
|
onOpen (ref, item) {
|
|
|
this.$refs[ref]?.open && this.$refs[ref].open(item)
|
|
|
}
|
|
|
- // onDel (item) {
|
|
|
- // this.$confirm(`确定删除${item.title}吗?`, '提示').then(async () => {
|
|
|
- // try {
|
|
|
- // await deleteSolution({ performanceSolutionId: item.performanceSolutionId })
|
|
|
- // this.$message.success('删除成功')
|
|
|
- // this.onInit()
|
|
|
- // } catch (error) {
|
|
|
- // this.$message.error(error)
|
|
|
- // }
|
|
|
- // }).catch(_ => {})
|
|
|
- // }
|
|
|
}
|
|
|
}
|
|
|
</script>
|