This commit is contained in:
77
2024-05-05 16:19:26 +08:00
parent 0bb4fad95e
commit 2643eb2f05
7 changed files with 120 additions and 24 deletions

9
src/api/dk/home.js Normal file
View File

@@ -0,0 +1,9 @@
import request from '@/utils/request'
// 查询借款计划列表
export function homeIndex() {
return request({
url: '/dk/home/index',
method: 'get'
})
}

View File

@@ -7,9 +7,9 @@
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text"> <div class="card-panel-text">
访客 总注册人数
</div> </div>
<count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" /> <count-to :start-val="0" :end-val="count.totalRegister" :duration="1000" class="card-panel-num" />
</div> </div>
</div> </div>
</el-col> </el-col>
@@ -20,9 +20,9 @@
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text"> <div class="card-panel-text">
消息 今日注册人数
</div> </div>
<count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" /> <count-to :start-val="0" :end-val="count.todayRegister" :duration="1000" class="card-panel-num" />
</div> </div>
</div> </div>
</el-col> </el-col>
@@ -33,9 +33,9 @@
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text"> <div class="card-panel-text">
金额 总订单数
</div> </div>
<count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num" /> <count-to :start-val="0" :end-val="count.totalBorrow" :duration="1000" class="card-panel-num" />
</div> </div>
</div> </div>
</el-col> </el-col>
@@ -46,9 +46,9 @@
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text"> <div class="card-panel-text">
订单 今日订单
</div> </div>
<count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" /> <count-to :start-val="0" :end-val="count.todayBorrow" :duration="1000" class="card-panel-num" />
</div> </div>
</div> </div>
</el-col> </el-col>
@@ -57,14 +57,30 @@
<script> <script>
import CountTo from 'vue-count-to' import CountTo from 'vue-count-to'
import { homeIndex } from '@/api/dk/home'
export default { export default {
components: { components: {
CountTo CountTo
}, },
data(){
return {
count:{
todayRegister: 0,
totalRegister: 0,
todayBorrow: 0,
totalBorrow: 0,
}
}
},
created() {
homeIndex().then(response => {
this.count = response.data
})
},
methods: { methods: {
handleSetLineChartData(type) { handleSetLineChartData(type) {
this.$emit('handleSetLineChartData', type) // this.$emit('handleSetLineChartData', type)
} }
} }
} }

View File

@@ -45,12 +45,17 @@
<el-table v-loading="loading" :data="BorrowStatusList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="BorrowStatusList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="id" v-if="false"/> <el-table-column label="状态编码" align="center" prop="id" min-width="20" />
<el-table-column label="是否打款" align="center" prop="usedRemit" min-width="20"> <el-table-column label="是否打款" align="center" prop="usedRemit" min-width="20">
<template v-slot="scope"> <template v-slot="scope">
<zl-dict-tag :options="yesOrNoList" :value="scope.row.usedRemit"/> <zl-dict-tag :options="yesOrNoList" :value="scope.row.usedRemit"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="允许提现" align="center" prop="withdrawFlag" min-width="20">
<template v-slot="scope">
<zl-dict-tag :options="booleanList" :value="scope.row.withdrawFlag"/>
</template>
</el-table-column>
<el-table-column label="借款状态" align="center" prop="borrowName" min-width="20"> <el-table-column label="借款状态" align="center" prop="borrowName" min-width="20">
<template v-slot="scope"> <template v-slot="scope">
<span :style={color:scope.row.borrowNameStyle}>{{scope.row.borrowName}}</span> <span :style={color:scope.row.borrowNameStyle}>{{scope.row.borrowName}}</span>
@@ -103,6 +108,12 @@
<el-radio :label="0" border></el-radio> <el-radio :label="0" border></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="允许提现" prop="withdrawFlag">
<el-radio-group v-model="form.withdrawFlag" fill="green" size="mini">
<el-radio :label="true" border></el-radio>
<el-radio :label="false" border></el-radio>
</el-radio-group>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
@@ -121,7 +132,7 @@ import {
updateBorrowStatus, updateBorrowStatus,
exportBorrowStatus, exportBorrowStatus,
} from '@/api/dk/BorrowStatus' } from '@/api/dk/BorrowStatus'
import { yesOrNoList } from '@/constant/module/statusMap' import { booleanList, yesOrNoList } from '@/constant/module/statusMap'
export default { export default {
name: "BorrowStatus", name: "BorrowStatus",
@@ -129,9 +140,9 @@ export default {
}, },
data() { data() {
return { return {
yesOrNoList, yesOrNoList,booleanList,
//按钮loading //按钮loading
buttonLoading: false, buttonLoading: false,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
@@ -202,6 +213,7 @@ export default {
borrowName: undefined, borrowName: undefined,
borrowRemark: undefined, borrowRemark: undefined,
borrowNameStyle: undefined, borrowNameStyle: undefined,
withdrawFlag: undefined,
createTime: undefined, createTime: undefined,
updateTime: undefined updateTime: undefined
}; };

View File

@@ -47,11 +47,12 @@
<span style="font-weight: bold">月利率:</span><span>{{scope.row.loanMonthRate*100}}</span><br> <span style="font-weight: bold">月利率:</span><span>{{scope.row.loanMonthRate*100}}</span><br>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="总贷款额" align="center" prop="totalLoanMoney" />
<el-table-column label="还款月数" align="center" prop="totalMonth" />
<el-table-column label="月利率" align="center" prop="loanMonthRate" />
<el-table-column label="每月还款额" align="center" prop="avgRepayment" />-->
<el-table-column label="创建日期" align="center" prop="createTime" /> <el-table-column label="创建日期" align="center" prop="createTime" />
<el-table-column label="允许提现" align="center" prop="withdrawFlag">
<template v-slot="scope">
<zl-dict-tag :options="booleanList" :value="scope.row.withdrawFlag"/>
</template>
</el-table-column>
<el-table-column label="是否打款" align="center" prop="remitFlag" > <el-table-column label="是否打款" align="center" prop="remitFlag" >
<template v-slot="scope"> <template v-slot="scope">
<zl-dict-tag :options="yesOrNoList" :value="scope.row.remitFlag"/> <zl-dict-tag :options="yesOrNoList" :value="scope.row.remitFlag"/>
@@ -150,7 +151,7 @@ import UpdateStatusDialog from './update-status'
import CustomerInfoDialog from '../dkCustomer/info' import CustomerInfoDialog from '../dkCustomer/info'
import TransAccountDialog from '@/views/dk/borrow/trans-account' import TransAccountDialog from '@/views/dk/borrow/trans-account'
import UpdateTransRemarkDialog from '@/views/dk/borrow/update-trans-remark' import UpdateTransRemarkDialog from '@/views/dk/borrow/update-trans-remark'
import { yesOrNoList } from '@/constant/module/statusMap' import { booleanList, yesOrNoList } from '@/constant/module/statusMap'
export default { export default {
name: "Borrow", name: "Borrow",
@@ -159,7 +160,7 @@ export default {
}, },
data() { data() {
return { return {
yesOrNoList, yesOrNoList,booleanList,
infoVisible: false, infoVisible: false,
updateBankVisible: false, updateBankVisible: false,
updateLoanVisible: false, updateLoanVisible: false,

View File

@@ -85,6 +85,7 @@
this.form.borrowNameStyle = response.data.borrowNameStyle; this.form.borrowNameStyle = response.data.borrowNameStyle;
this.form.borrowName = response.data.borrowName; this.form.borrowName = response.data.borrowName;
this.form.borrowRemark = response.data.borrowRemark; this.form.borrowRemark = response.data.borrowRemark;
this.form.borrowStatusId = response.data.borrowStatusId;
this.open = true; this.open = true;
this.title = "修改状态"; this.title = "修改状态";
}); });
@@ -101,6 +102,7 @@
borrowName: this.form.borrowName, borrowName: this.form.borrowName,
borrowRemark: this.form.borrowRemark, borrowRemark: this.form.borrowRemark,
usedRemit: this.form.usedRemit, usedRemit: this.form.usedRemit,
borrowStatusId: this.form.borrowStatusId
}).then(data => { }).then(data => {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.buttonLoading = false; this.buttonLoading = false;
@@ -117,6 +119,7 @@
this.form.borrowName = borrowStatus.borrowName; this.form.borrowName = borrowStatus.borrowName;
this.form.borrowRemark = borrowStatus.borrowRemark; this.form.borrowRemark = borrowStatus.borrowRemark;
this.form.usedRemit = borrowStatus.usedRemit; this.form.usedRemit = borrowStatus.usedRemit;
this.form.borrowStatusId = borrowStatus.id
} }
} }
} }

View File

@@ -1,21 +1,76 @@
<template> <template>
<div class="dashboard-editor-container"> <div class="dashboard-editor-container">
<panel-group @handleSetLineChartData="handleSetLineChartData" />
</div> </div>
</template> </template>
<script> <script>
import PanelGroup from './dashboard/PanelGroup'
import LineChart from './dashboard/LineChart'
import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart'
const lineChartData = {
newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145]
},
messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140],
actualData: [180, 160, 151, 106, 145, 150, 130]
},
purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100],
actualData: [120, 90, 100, 138, 142, 130, 130]
},
shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130]
}
}
export default { export default {
name: 'Index', name: 'Index',
components: { components: {
PanelGroup,
LineChart,
RaddarChart,
PieChart,
BarChart
}, },
data() { data() {
return { return {
lineChartData: lineChartData.newVisitis
} }
}, },
created() {
},
methods: { methods: {
handleSetLineChartData(type) {
this.lineChartData = lineChartData[type]
}
} }
} }
</script> </script>
<style lang="scss" scoped>
.dashboard-editor-container {
padding: 32px;
background-color: rgb(240, 242, 245);
position: relative;
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
margin-bottom: 32px;
}
}
@media (max-width:1024px) {
.chart-wrapper {
padding: 8px;
}
}
</style>

View File

@@ -33,8 +33,8 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:8082`, target: `http://localhost:8082`,
target: `http://dk.qiqizl.com/prod-api`, // target: `http://dk.qiqizl.com/prod-api`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''