|
@@ -13,23 +13,15 @@
|
|
@page-change="onPageChange"
|
|
@page-change="onPageChange"
|
|
@sort-change="onSortChange"
|
|
@sort-change="onSortChange"
|
|
>
|
|
>
|
|
- <template #card-tools>
|
|
|
|
- <m-button type="orange" size="small" icon="el-icon-plus" @click="onOpen('sandboxEditRefs')" >新增</m-button>
|
|
|
|
- </template>
|
|
|
|
<template #actions="{ row }">
|
|
<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('sandboxEditRefs', row)">编辑</m-button>
|
|
|
|
- <m-button text type="primary" size="small" @click="onOpen('salarySolutionRulesRefs', row)">规则配置</m-button>
|
|
|
|
|
|
+ <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="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="success" size="small" @click="onCalculate(row)">开始测算</m-button>
|
|
<m-button text type="primary" size="small" @click="onCalculateHistory(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="success" size="small" @click="onSend(row)">发布</m-button>
|
|
- <m-button text type="danger" size="small" @click="onDel(row)">删除</m-button>
|
|
|
|
</template>
|
|
</template>
|
|
</m-table>
|
|
</m-table>
|
|
<SandboxDetails ref="sandboxDetailsRefs"></SandboxDetails>
|
|
<SandboxDetails ref="sandboxDetailsRefs"></SandboxDetails>
|
|
- <SandboxEdit ref="sandboxEditRefs" @refresh="onInit"></SandboxEdit>
|
|
|
|
- <SalarySolutionRules ref="salarySolutionRulesRefs" @refresh="onInit"></SalarySolutionRules>
|
|
|
|
<SandboxParam ref="sandboxParamRefs" @refresh="onInit"></SandboxParam>
|
|
<SandboxParam ref="sandboxParamRefs" @refresh="onInit"></SandboxParam>
|
|
<SandboxCalculate ref="sandboxCalculateRefs"></SandboxCalculate>
|
|
<SandboxCalculate ref="sandboxCalculateRefs"></SandboxCalculate>
|
|
<SandboxHistory ref="sandboxHistoryRefs"></SandboxHistory>
|
|
<SandboxHistory ref="sandboxHistoryRefs"></SandboxHistory>
|
|
@@ -38,12 +30,9 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
- deleteSolution,
|
|
|
|
sendSalaryRelease,
|
|
sendSalaryRelease,
|
|
getSolutionPage
|
|
getSolutionPage
|
|
} from '@/api/salary'
|
|
} from '@/api/salary'
|
|
-import SandboxEdit from './sandboxEdit.vue'
|
|
|
|
-import SalarySolutionRules from './salarySolutionRules.vue'
|
|
|
|
import SandboxDetails from './sandboxDetails.vue'
|
|
import SandboxDetails from './sandboxDetails.vue'
|
|
import SandboxParam from './sandboxParam.vue'
|
|
import SandboxParam from './sandboxParam.vue'
|
|
import SandboxCalculate from './sandboxCalculate.vue'
|
|
import SandboxCalculate from './sandboxCalculate.vue'
|
|
@@ -57,8 +46,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
- SandboxEdit,
|
|
|
|
- SalarySolutionRules,
|
|
|
|
SandboxDetails,
|
|
SandboxDetails,
|
|
SandboxParam,
|
|
SandboxParam,
|
|
SandboxCalculate,
|
|
SandboxCalculate,
|
|
@@ -75,6 +62,18 @@ export default {
|
|
options: {
|
|
options: {
|
|
placeholder: '请输入方案名称'
|
|
placeholder: '请输入方案名称'
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '时间',
|
|
|
|
+ type: 'datePicker',
|
|
|
|
+ prop: 'time',
|
|
|
|
+ options: {
|
|
|
|
+ rangeSeparator: '至',
|
|
|
|
+ startPlaceholder: '开始时间',
|
|
|
|
+ endPlaceholder: '结束时间',
|
|
|
|
+ valueFormat: 'yyyy-MM-dd',
|
|
|
|
+ type: 'daterange'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
],
|
|
],
|
|
searchValues: {},
|
|
searchValues: {},
|
|
@@ -82,7 +81,6 @@ export default {
|
|
headers: [
|
|
headers: [
|
|
{ label: '名称', prop: 'title' },
|
|
{ label: '名称', prop: 'title' },
|
|
{ label: '描述', prop: 'tag' },
|
|
{ label: '描述', prop: 'tag' },
|
|
- { label: '模型名称', prop: 'modelName' },
|
|
|
|
{ label: '创建日期', prop: 'createDate' },
|
|
{ label: '创建日期', prop: 'createDate' },
|
|
{ label: '操作', prop: 'actions', width: 500, fixed: 'right' }
|
|
{ label: '操作', prop: 'actions', width: 500, fixed: 'right' }
|
|
],
|
|
],
|
|
@@ -103,6 +101,7 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
async onInit () {
|
|
async onInit () {
|
|
this.loading = true
|
|
this.loading = true
|
|
|
|
+ const { time, ...query } = this.searchValues
|
|
try {
|
|
try {
|
|
const { data } = await getSolutionPage({
|
|
const { data } = await getSolutionPage({
|
|
page: {
|
|
page: {
|
|
@@ -110,10 +109,12 @@ export default {
|
|
orders: this.orders
|
|
orders: this.orders
|
|
},
|
|
},
|
|
entity: {
|
|
entity: {
|
|
- ...this.searchQuery,
|
|
|
|
- history: 0,
|
|
|
|
- env: 1
|
|
|
|
- }
|
|
|
|
|
|
+ ...query,
|
|
|
|
+ history: 1,
|
|
|
|
+ env: 0
|
|
|
|
+ },
|
|
|
|
+ startDate: time?.[0],
|
|
|
|
+ endDate: time?.[1]
|
|
})
|
|
})
|
|
this.items = data.records.map(e => e.entity)
|
|
this.items = data.records.map(e => e.entity)
|
|
this.total = data.total
|
|
this.total = data.total
|
|
@@ -155,18 +156,18 @@ export default {
|
|
},
|
|
},
|
|
onOpen (ref, item) {
|
|
onOpen (ref, item) {
|
|
this.$refs[ref]?.open && this.$refs[ref].open(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(_ => {})
|
|
|
|
}
|
|
}
|
|
|
|
+ // 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>
|
|
</script>
|