123
This commit is contained in:
9
src/api/dk/home.js
Normal file
9
src/api/dk/home.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询借款计划列表
|
||||
export function homeIndex() {
|
||||
return request({
|
||||
url: '/dk/home/index',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -7,9 +7,9 @@
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
访客
|
||||
总注册人数
|
||||
</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>
|
||||
</el-col>
|
||||
@@ -20,9 +20,9 @@
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
消息
|
||||
今日注册人数
|
||||
</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>
|
||||
</el-col>
|
||||
@@ -33,9 +33,9 @@
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
金额
|
||||
总订单数
|
||||
</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>
|
||||
</el-col>
|
||||
@@ -46,9 +46,9 @@
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
订单
|
||||
今日订单数
|
||||
</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>
|
||||
</el-col>
|
||||
@@ -57,14 +57,30 @@
|
||||
|
||||
<script>
|
||||
import CountTo from 'vue-count-to'
|
||||
import { homeIndex } from '@/api/dk/home'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CountTo
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
count:{
|
||||
todayRegister: 0,
|
||||
totalRegister: 0,
|
||||
todayBorrow: 0,
|
||||
totalBorrow: 0,
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
homeIndex().then(response => {
|
||||
this.count = response.data
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
handleSetLineChartData(type) {
|
||||
this.$emit('handleSetLineChartData', type)
|
||||
// this.$emit('handleSetLineChartData', type)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,12 +45,17 @@
|
||||
|
||||
<el-table v-loading="loading" :data="BorrowStatusList" @selection-change="handleSelectionChange">
|
||||
<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">
|
||||
<template v-slot="scope">
|
||||
<zl-dict-tag :options="yesOrNoList" :value="scope.row.usedRemit"/>
|
||||
</template>
|
||||
</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">
|
||||
<template v-slot="scope">
|
||||
<span :style={color:scope.row.borrowNameStyle}>{{scope.row.borrowName}}</span>
|
||||
@@ -103,6 +108,12 @@
|
||||
<el-radio :label="0" border>否</el-radio>
|
||||
</el-radio-group>
|
||||
</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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
@@ -121,7 +132,7 @@ import {
|
||||
updateBorrowStatus,
|
||||
exportBorrowStatus,
|
||||
} from '@/api/dk/BorrowStatus'
|
||||
import { yesOrNoList } from '@/constant/module/statusMap'
|
||||
import { booleanList, yesOrNoList } from '@/constant/module/statusMap'
|
||||
|
||||
export default {
|
||||
name: "BorrowStatus",
|
||||
@@ -129,9 +140,9 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
yesOrNoList,
|
||||
//按钮loading
|
||||
buttonLoading: false,
|
||||
yesOrNoList,booleanList,
|
||||
//按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
@@ -202,6 +213,7 @@ export default {
|
||||
borrowName: undefined,
|
||||
borrowRemark: undefined,
|
||||
borrowNameStyle: undefined,
|
||||
withdrawFlag: undefined,
|
||||
createTime: undefined,
|
||||
updateTime: undefined
|
||||
};
|
||||
|
||||
@@ -47,11 +47,12 @@
|
||||
<span style="font-weight: bold">月利率:</span><span>{{scope.row.loanMonthRate*100}}</span><br>
|
||||
</template>
|
||||
</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="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" >
|
||||
<template v-slot="scope">
|
||||
<zl-dict-tag :options="yesOrNoList" :value="scope.row.remitFlag"/>
|
||||
@@ -150,7 +151,7 @@ import UpdateStatusDialog from './update-status'
|
||||
import CustomerInfoDialog from '../dkCustomer/info'
|
||||
import TransAccountDialog from '@/views/dk/borrow/trans-account'
|
||||
import UpdateTransRemarkDialog from '@/views/dk/borrow/update-trans-remark'
|
||||
import { yesOrNoList } from '@/constant/module/statusMap'
|
||||
import { booleanList, yesOrNoList } from '@/constant/module/statusMap'
|
||||
|
||||
export default {
|
||||
name: "Borrow",
|
||||
@@ -159,7 +160,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
yesOrNoList,
|
||||
yesOrNoList,booleanList,
|
||||
infoVisible: false,
|
||||
updateBankVisible: false,
|
||||
updateLoanVisible: false,
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
this.form.borrowNameStyle = response.data.borrowNameStyle;
|
||||
this.form.borrowName = response.data.borrowName;
|
||||
this.form.borrowRemark = response.data.borrowRemark;
|
||||
this.form.borrowStatusId = response.data.borrowStatusId;
|
||||
this.open = true;
|
||||
this.title = "修改状态";
|
||||
});
|
||||
@@ -101,6 +102,7 @@
|
||||
borrowName: this.form.borrowName,
|
||||
borrowRemark: this.form.borrowRemark,
|
||||
usedRemit: this.form.usedRemit,
|
||||
borrowStatusId: this.form.borrowStatusId
|
||||
}).then(data => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.buttonLoading = false;
|
||||
@@ -117,6 +119,7 @@
|
||||
this.form.borrowName = borrowStatus.borrowName;
|
||||
this.form.borrowRemark = borrowStatus.borrowRemark;
|
||||
this.form.usedRemit = borrowStatus.usedRemit;
|
||||
this.form.borrowStatusId = borrowStatus.id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,76 @@
|
||||
<template>
|
||||
<div class="dashboard-editor-container">
|
||||
|
||||
<panel-group @handleSetLineChartData="handleSetLineChartData" />
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<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 {
|
||||
name: 'Index',
|
||||
components: {
|
||||
PanelGroup,
|
||||
LineChart,
|
||||
RaddarChart,
|
||||
PieChart,
|
||||
BarChart
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lineChartData: lineChartData.newVisitis
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
handleSetLineChartData(type) {
|
||||
this.lineChartData = lineChartData[type]
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
|
||||
@@ -33,8 +33,8 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
// target: `http://localhost:8082`,
|
||||
target: `http://dk.qiqizl.com/prod-api`,
|
||||
target: `http://localhost:8082`,
|
||||
// target: `http://dk.qiqizl.com/prod-api`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
||||
Reference in New Issue
Block a user