|
@@ -1,32 +1,38 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <m-dialog title="绩效测算" ref="dialog" v-loading="loading" width="1200px">
|
|
|
|
|
- <div v-if="!isCalculate && !isSuccess" class="d-flex align-center justify-center">
|
|
|
|
|
|
|
+ <m-dialog title="绩效测算" ref="dialog" width="1200px">
|
|
|
|
|
+ <div v-if="!isSuccess" class="d-flex align-center justify-center">
|
|
|
正在测算中,请稍后...
|
|
正在测算中,请稍后...
|
|
|
</div>
|
|
</div>
|
|
|
- <el-result v-if="isCalculate" icon="success" title="测算完成"></el-result>
|
|
|
|
|
- <template v-if="isSuccess">
|
|
|
|
|
- <el-radio-group v-model="choose" @input="getList">
|
|
|
|
|
- <el-radio
|
|
|
|
|
- v-for="item in radioItems"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- :label="item.id"
|
|
|
|
|
- >
|
|
|
|
|
- {{ item.name }}
|
|
|
|
|
- </el-radio>
|
|
|
|
|
- </el-radio-group>
|
|
|
|
|
- <m-table
|
|
|
|
|
- class="mt-3"
|
|
|
|
|
- shadow="never"
|
|
|
|
|
- clearHeader
|
|
|
|
|
- :items="tableItems"
|
|
|
|
|
- :headers="tableHeaders"
|
|
|
|
|
- :page-size="tablePageInfo.size"
|
|
|
|
|
- :page-current="tablePageInfo.current"
|
|
|
|
|
- :total="tableTotal"
|
|
|
|
|
- @page-change="onPageChange"
|
|
|
|
|
- @sort-change="onSortChange"
|
|
|
|
|
- ></m-table>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <div v-loading="loading">
|
|
|
|
|
+ <template v-if="isSuccess">
|
|
|
|
|
+ <m-card shadow="never">
|
|
|
|
|
+ <el-radio-group v-model="choose" @input="getList">
|
|
|
|
|
+ <el-radio
|
|
|
|
|
+ v-for="item in radioItems"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :label="item.id"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ item.name }}
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </m-card>
|
|
|
|
|
+
|
|
|
|
|
+ <m-search class="mt-3" shadow="never" :items="searchItems" v-model="searchValues" @search="onSearch"></m-search>
|
|
|
|
|
+
|
|
|
|
|
+ <m-table
|
|
|
|
|
+ class="mt-3"
|
|
|
|
|
+ shadow="never"
|
|
|
|
|
+ clearHeader
|
|
|
|
|
+ :items="tableItems"
|
|
|
|
|
+ :headers="tableHeaders"
|
|
|
|
|
+ :page-size="tablePageInfo.size"
|
|
|
|
|
+ :page-current="tablePageInfo.current"
|
|
|
|
|
+ :total="tableTotal"
|
|
|
|
|
+ @page-change="onPageChange"
|
|
|
|
|
+ @sort-change="onSortChange"
|
|
|
|
|
+ ></m-table>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </div>
|
|
|
</m-dialog>
|
|
</m-dialog>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -41,7 +47,6 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
choose: null,
|
|
choose: null,
|
|
|
loading: false,
|
|
loading: false,
|
|
|
- isCalculate: false,
|
|
|
|
|
isSuccess: false,
|
|
isSuccess: false,
|
|
|
radioItems: [],
|
|
radioItems: [],
|
|
|
tableTotal: 0,
|
|
tableTotal: 0,
|
|
@@ -51,12 +56,40 @@ export default {
|
|
|
current: 1
|
|
current: 1
|
|
|
},
|
|
},
|
|
|
tableItems: [],
|
|
tableItems: [],
|
|
|
- tableHeaders: []
|
|
|
|
|
|
|
+ tableHeaders: [],
|
|
|
|
|
+ searchValues: {}
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ searchItems () {
|
|
|
|
|
+ return [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '列名',
|
|
|
|
|
+ prop: 'column',
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ options: {
|
|
|
|
|
+ placeholder: '请选择列名',
|
|
|
|
|
+ items: this.tableHeaders.map(e => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ label: e.label,
|
|
|
|
|
+ value: e.prop
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '值',
|
|
|
|
|
+ prop: 'value',
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ options: {
|
|
|
|
|
+ placeholder: '请输入值'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
async open (item) {
|
|
async open (item) {
|
|
|
- this.isCalculate = false
|
|
|
|
|
this.isSuccess = false
|
|
this.isSuccess = false
|
|
|
this.$refs.dialog.open()
|
|
this.$refs.dialog.open()
|
|
|
this.loading = true
|
|
this.loading = true
|
|
@@ -68,9 +101,7 @@ export default {
|
|
|
if (this.radioItems.length) {
|
|
if (this.radioItems.length) {
|
|
|
this.choose = this.radioItems[0].id
|
|
this.choose = this.radioItems[0].id
|
|
|
}
|
|
}
|
|
|
- this.isCalculate = true
|
|
|
|
|
await this.getList()
|
|
await this.getList()
|
|
|
- this.isCalculate = false
|
|
|
|
|
this.isSuccess = true
|
|
this.isSuccess = true
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
this.$message.error(error)
|
|
this.$message.error(error)
|
|
@@ -80,14 +111,21 @@ export default {
|
|
|
},
|
|
},
|
|
|
async getList () {
|
|
async getList () {
|
|
|
this.loading = true
|
|
this.loading = true
|
|
|
|
|
+ const item = this.radioItems.find(e => e.id === this.choose)
|
|
|
try {
|
|
try {
|
|
|
- const { data } = await getSandboxResultPage({
|
|
|
|
|
|
|
+ const param = {
|
|
|
page: {
|
|
page: {
|
|
|
...this.tablePageInfo,
|
|
...this.tablePageInfo,
|
|
|
orders: this.tableOrders
|
|
orders: this.tableOrders
|
|
|
},
|
|
},
|
|
|
- id: this.choose
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ id: this.choose,
|
|
|
|
|
+ type: item.node_type
|
|
|
|
|
+ // query: [{ column: item, compare: '=', value: '当期个人贷款月累计收息' }]
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.searchValues.column && this.searchValues.value) {
|
|
|
|
|
+ param.query = [{ column: this.searchValues.column, compare: '=', value: this.searchValues.value }]
|
|
|
|
|
+ }
|
|
|
|
|
+ const { data } = await getSandboxResultPage(param)
|
|
|
this.tableHeaders = data.dataColumn.map(e => {
|
|
this.tableHeaders = data.dataColumn.map(e => {
|
|
|
return {
|
|
return {
|
|
|
label: e.name,
|
|
label: e.name,
|
|
@@ -102,6 +140,10 @@ export default {
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ onSearch () {
|
|
|
|
|
+ this.tablePageInfo.current = 1
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ },
|
|
|
onPageChange (index) {
|
|
onPageChange (index) {
|
|
|
this.tablePageInfo.current = index
|
|
this.tablePageInfo.current = index
|
|
|
this.getList()
|
|
this.getList()
|