|
@@ -7,33 +7,52 @@
|
|
|
:items="items"
|
|
|
@sort-change="onSortChange"
|
|
|
@page-change="onPageChange"
|
|
|
+ @selection-change="onSelectionChange"
|
|
|
>
|
|
|
+ <template #header>
|
|
|
+ <div class="text-right">
|
|
|
+ <m-button type="orange" @click="onComparison">已选项对比</m-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<template #actions="{ row }">
|
|
|
- <m-button text type="primary" @click="open(row)">查看方案</m-button>
|
|
|
- <m-button text type="primary" @click="open(row)">查看结果</m-button>
|
|
|
+ <m-button text type="primary" @click="onDetails(row)">查看方案</m-button>
|
|
|
+ <m-button text type="primary" @click="onResult(row)">查看结果</m-button>
|
|
|
</template>
|
|
|
</m-table>
|
|
|
+ <SandboxResult ref="sandboxResultRefs" append-to-body></SandboxResult>
|
|
|
+ <SandboxDetails ref="sandboxDetailsRefs" append-to-body></SandboxDetails>
|
|
|
+ <SandboxComparison ref="sandboxComparisonRefs" append-to-body></SandboxComparison>
|
|
|
</m-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import SandboxResult from './sandboxResult.vue'
|
|
|
+import SandboxDetails from './sandboxDetails.vue'
|
|
|
+import SandboxComparison from './sandboxComparison.vue'
|
|
|
export default {
|
|
|
name: 'sandboxHistory',
|
|
|
+ components: {
|
|
|
+ SandboxResult,
|
|
|
+ SandboxDetails,
|
|
|
+ SandboxComparison
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
+ select: [],
|
|
|
headers: [
|
|
|
+ { type: 'selection', width: 55, prop: 'selection' },
|
|
|
{ label: '测算时间', prop: 'time' },
|
|
|
{ label: '方案名称', prop: 'name' },
|
|
|
{ label: '绩效汇总', prop: 'performance' },
|
|
|
{ label: '操作', prop: 'actions' }
|
|
|
],
|
|
|
items: [
|
|
|
- { time: '2020-01-01 12:00:00', name: '方案1', performance: '100' },
|
|
|
- { time: '2020-01-01 12:00:00', name: '方案2', performance: '100' },
|
|
|
- { time: '2020-01-01 12:00:00', name: '方案3' },
|
|
|
- { time: '2020-01-01 12:00:00', name: '方案4' },
|
|
|
- { time: '2020-01-01 12:00:00', name: '方案5' },
|
|
|
- { time: '2020-01-01 12:00:00', name: '方案6' }
|
|
|
+ { id: 0, time: '2020-01-01 12:00:00', name: '方案1', performance: '100' },
|
|
|
+ { id: 1, time: '2020-01-01 12:00:00', name: '方案2', performance: '100' },
|
|
|
+ { id: 2, time: '2020-01-01 12:00:00', name: '方案3' },
|
|
|
+ { id: 3, time: '2020-01-01 12:00:00', name: '方案4' },
|
|
|
+ { id: 4, time: '2020-01-01 12:00:00', name: '方案5' },
|
|
|
+ { id: 5, time: '2020-01-01 12:00:00', name: '方案6' }
|
|
|
]
|
|
|
}
|
|
|
},
|
|
@@ -42,7 +61,25 @@ export default {
|
|
|
this.$refs.dialog.open()
|
|
|
},
|
|
|
onSortChange () {},
|
|
|
- onPageChange () {}
|
|
|
+ onPageChange () {},
|
|
|
+ onDetails (item) {
|
|
|
+ this.$refs.sandboxDetailsRefs.open({
|
|
|
+ performanceSolutionId: '1940675479925174274'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onResult (item) {
|
|
|
+ this.$refs.sandboxResultRefs.open()
|
|
|
+ },
|
|
|
+ onSelectionChange (v) {
|
|
|
+ this.select = v.map(e => e.id)
|
|
|
+ },
|
|
|
+ onComparison () {
|
|
|
+ if (!this.select.length) {
|
|
|
+ this.$message.warning('请选择对比项')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$refs.sandboxComparisonRefs.open()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|