Commit e0b54889 authored by caimeng's avatar caimeng

下班前提交一下

parent d79805f6
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
<el-row> <el-row>
<el-col v-for='(o, index) in clientIdCardInfoResponse' :key='index' :span='4' :offset='index > 0 ? 1 : 0'> <el-col v-for='(o, index) in clientIdCardInfoResponse' :key='index' :span='4' :offset='index > 0 ? 1 : 0'>
<el-card :body-style="{ padding: '10px' }"> <el-card :body-style="{ padding: '10px' }">
<el-image class='el-card-image' :src='o[1]' @click.native='showImgViewer(clientIdCardInfoResponse,"idCard")'></el-image> <el-image class='el-card-image' :src='o[1]'
@click.native='showImgViewer(clientIdCardInfoResponse,"idCard")'></el-image>
<div class='el-card-intro'> <div class='el-card-intro'>
<span v-if='o[0]==="frontImgPath"'>身份证正面</span> <span v-if='o[0]==="frontImgPath"'>身份证正面</span>
<span v-else>身份证反面</span> <span v-else>身份证反面</span>
...@@ -21,7 +22,8 @@ ...@@ -21,7 +22,8 @@
<el-row> <el-row>
<el-col v-for='(o, index) in faceInfoResponse' :key='index' :span='4' :offset='index > 0 ? 1 : 0'> <el-col v-for='(o, index) in faceInfoResponse' :key='index' :span='4' :offset='index > 0 ? 1 : 0'>
<el-card :body-style="{ padding: '10px' }"> <el-card :body-style="{ padding: '10px' }">
<el-image class='el-card-image' :src='o[1]' @click.native='showImgViewer(faceInfoResponse,"face")'></el-image> <el-image class='el-card-image' :src='o[1]'
@click.native='showImgViewer(faceInfoResponse,"face")'></el-image>
<div class='el-card-intro'> <div class='el-card-intro'>
<span v-if='o[0]==="panoramaImgPath"'>全景照</span> <span v-if='o[0]==="panoramaImgPath"'>全景照</span>
<span v-else-if='o[0]==="randomImgPath"'>随机照</span> <span v-else-if='o[0]==="randomImgPath"'>随机照</span>
...@@ -38,26 +40,31 @@ ...@@ -38,26 +40,31 @@
<el-row> <el-row>
<el-col v-for='(o, index) in creditAttachInfo' :key='index' :span='4' :offset='index > 0 ? 1 : 0'> <el-col v-for='(o, index) in creditAttachInfo' :key='index' :span='4' :offset='index > 0 ? 1 : 0'>
<el-card :body-style="{ padding: '10px' }"> <el-card :body-style="{ padding: '10px' }">
<el-image class='el-card-image' :src='o.echoList[0]' <el-image class='el-card-image' :src='o.screenList[0]'
@click.native='showImgViewer(o.echoList,"annex")'></el-image> @click.native='showImgViewer(o.screenList,"annex")'></el-image>
<div class='el-card-intro'> <div class='el-card-intro'>
<span>{{ o.tit }}</span> <span>{{ o.attachTypeStr }}</span>
</div>
</el-card>
</el-col>
</el-row>
</template>
<template v-if='supplAttachInfo.length'>
<block-header title='客户附件信息' />
<el-row>
<el-col v-for='(o, index) in supplAttachInfo' :key='index' :span='4' :offset='index > 0 ? 1 : 0'>
<el-card :body-style="{ padding: '10px' }">
<el-image class='el-card-image' :src='o.screenList[0]'
@click.native='showImgViewer(o.screenList,"annex")'></el-image>
<div class='el-card-intro'>
<span>{{ o.attachTypeStr }}</span>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
<block-header title='客户附件信息' />
<el-row v-if='false'>
<el-col v-for='(o, index) in data.PRODUCTS' :key='index' :span='4' :offset='index > 0 ? 1 : 0'>
<el-card :body-style="{ padding: '10px' }">
<el-image class='el-card-image' :src='o.content' :preview-src-list='imgList'></el-image>
<div class='el-card-intro'>
<span>{{ o.name }}</span>
</div>
</el-card>
</el-col>
</el-row>
<!--机审报告--> <!--机审报告-->
<template v-if='reportResponse!==null'> <template v-if='reportResponse!==null'>
...@@ -94,7 +101,7 @@ ...@@ -94,7 +101,7 @@
clientIdCardInfoResponse: [], clientIdCardInfoResponse: [],
reportResponse: null, reportResponse: null,
thirdPartyReport: null, thirdPartyReport: null,
supplAttachInfo: [],
imgViewerVisible: false, imgViewerVisible: false,
imgList: [] imgList: []
...@@ -108,18 +115,18 @@ ...@@ -108,18 +115,18 @@
creditAttachInfo, creditAttachInfo,
faceInfoResponse, faceInfoResponse,
reportResponse, reportResponse,
thirdPartyReport thirdPartyReport,
supplAttachInfo
} = this.info } = this.info
this.data = this.info this.data = this.info
this.approvalResultResponse = approvalResultResponse this.approvalResultResponse = approvalResultResponse
this.clientIdCardInfoResponse = Object.entries(clientIdCardInfoResponse) this.clientIdCardInfoResponse = Object.entries(clientIdCardInfoResponse)
this.faceInfoResponse = Object.entries(faceInfoResponse) this.faceInfoResponse = Object.entries(faceInfoResponse)
this.creditAttachInfo = JSON.parse(creditAttachInfo) this.creditAttachInfo = creditAttachInfo // 授信图片信息
this.reportResponse = reportResponse this.reportResponse = reportResponse
this.thirdPartyReport = thirdPartyReport this.thirdPartyReport = thirdPartyReport
this.supplAttachInfo = supplAttachInfo // 附件信息
console.log(creditAttachInfo, '信息')
}, },
methods: { methods: {
...@@ -130,11 +137,11 @@ ...@@ -130,11 +137,11 @@
case 'face': case 'face':
const arr = [] const arr = []
item.forEach(o => { item.forEach(o => {
console.log(o,'是啥'); console.log(o, '是啥')
arr.push(o[1]) arr.push(o[1])
}) })
console.log(arr,'预览图片的地址'); console.log(arr, '预览图片的地址')
this.imgList = arr this.imgList = arr
......
...@@ -7,6 +7,7 @@ import ApprovalResult from '@/components/approval-result' ...@@ -7,6 +7,7 @@ import ApprovalResult from '@/components/approval-result'
import AuditResult from '@/components/audit-result' import AuditResult from '@/components/audit-result'
import UserBaseInfo from '@/components/user-base-info' import UserBaseInfo from '@/components/user-base-info'
import UserProjectInfo from '@/components/user-project-info' import UserProjectInfo from '@/components/user-project-info'
import moment from 'moment'
export default { export default {
name: 'Minix', name: 'Minix',
...@@ -22,6 +23,53 @@ export default { ...@@ -22,6 +23,53 @@ export default {
UserProjectInfo, UserProjectInfo,
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer') 'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer')
}, },
data(){
return {
datePickerOptions:{
shortcuts: [
{
text: '今日',
onClick: (picker) => {
const end = new Date()
const start = moment().format('YYYY-MM-DD')
const startTime = `${start} 00:00:00`
picker.$emit('pick', [startTime, end]);
},
},
{
text: '昨日',
onClick: (picker) => {
const end = moment().subtract(1, 'days').format('YYYY-MM-DD')
const start = moment().subtract(1, 'days').format('YYYY-MM-DD')
const startTime = `${start} 00:00:00`
const endTime = `${end} 23:59:59`
picker.$emit('pick', [startTime, endTime]);
},
},
{
text: '最近7天',
onClick: (picker) => {
const end = moment().format('YYYY-MM-DD HH:mm:ss')
const start = moment().subtract(7, 'days').format('YYYY-MM-DD')
const startTime = `${start} 00:00:00`
const endTime = `${end}`
picker.$emit('pick', [startTime, endTime]);
},
},
{
text: '最近30天',
onClick: (picker) => {
const end = moment().format('YYYY-MM-DD HH:mm:ss')
const start = moment().subtract(30, 'days').format('YYYY-MM-DD')
const startTime = `${start} 00:00:00`
const endTime = `${end}`
picker.$emit('pick', [startTime, endTime]);
},
}
],
},
}
},
methods: { methods: {
onReset(formName) { onReset(formName) {
if (formName) { if (formName) {
......
import request from "@/utils/request"; import request from '@/utils/request'
// 登录 // 登录
export default { export default {
// 登录 // 登录
login(data) { login(data) {
return request({ return request({
url: "/login", url: '/login',
method: "post", method: 'post',
data data
}); })
}, },
// 登出 // 登出
logout(data) { logout(data) {
return request({ return request({
url: "/login/logout", url: '/login/logout',
method: "post", method: 'post',
data data
}); })
}, },
// 用户信息 // 用户信息
userInfo(params) { userInfo(params) {
return request({ return request({
url: "/user/get", url: '/user/get',
method: "get", method: 'get',
params params
}); })
}, },
// 发送验证码 // 发送验证码
send_msg_code(data) { send_msg_code(data) {
return request({ return request({
url: "/login/sendLoginSms", url: '/login/sendLoginSms',
method: "post", method: 'post',
data data
}); })
}, },
// 获取菜单列表 // 获取菜单列表
menu(params) { menu(params) {
return request({ return request({
url: "/sysUser/getRouters", url: '/sysUser/getRouters',
method: "get", method: 'get',
params params
}); })
}, },
// 商户列表 // 商户列表
merchant_list(data) { merchant_list(data) {
return request({ return request({
url: "/macy/selectMacyList", url: '/macy/selectMacyList',
method: "post", method: 'post',
data data
}); })
}, },
// 商户新增 // 商户新增
merchant_add(data) { merchant_add(data) {
return request({ return request({
url: "/macy/createdMacy", url: '/macy/createdMacy',
method: "post", method: 'post',
data data
}); })
}, },
// 商户更新 // 商户更新
merchant_update(data) { merchant_update(data) {
return request({ return request({
url: "/macy/editMacy", url: '/macy/editMacy',
method: "post", method: 'post',
data data
}); })
}, },
// 商户详情 // 商户详情
merchant_view(params) { merchant_view(params) {
return request({ return request({
url: "/macy/selectMacyByTenantNo", url: '/macy/selectMacyByTenantNo',
method: "get", method: 'get',
params params
}); })
}, },
// 产品列表 // 产品列表
merchant_select(params) { merchant_select(params) {
return request({ return request({
url: "/macy/selectList", url: '/macy/selectList',
method: "get", method: 'get',
params params
}); })
}, },
// 产品列表 // 产品列表
prod_list(data) { prod_list(data) {
return request({ return request({
url: "/macy/selectProductPageList", url: '/macy/selectProductPageList',
method: "post", method: 'post',
data data
}); })
}, },
// 产品新增 // 产品新增
prod_add(data) { prod_add(data) {
return request({ return request({
url: "/macy/createdProductInfo", url: '/macy/createdProductInfo',
method: "post", method: 'post',
data data
}); })
}, },
// 产品编辑 // 产品编辑
prod_update(data) { prod_update(data) {
return request({ return request({
url: "/macy/editProductInfo", url: '/macy/editProductInfo',
method: "post", method: 'post',
data data
}); })
}, },
// 产品上下架 // 产品上下架
prod_switch_upDown(params) { prod_switch_upDown(params) {
return request({ return request({
url: "/macy/editProductInfoByStatus", url: '/macy/editProductInfoByStatus',
method: "get", method: 'get',
params params
}); })
}, },
// 产品查看 // 产品查看
prod_view(params) { prod_view(params) {
return request({ return request({
url: "/macy/selectProductInfoByappNo", url: '/macy/selectProductInfoByappNo',
method: "get", method: 'get',
params params
}); })
}, },
// 申请列表 // 申请列表
apply_list(data) { apply_list(data) {
return request({ return request({
url: "/zeus/pageQueryApply", url: '/zeus/pageQueryApply',
method: "post", method: 'post',
data data
}); })
}, },
// 推送 // 推送
apply_push(params) { apply_push(params) {
return request({ return request({
url: "/zeus/applyRetryPush", url: '/zeus/applyRetryPush',
method: "get", method: 'get',
params params
}); })
}, },
// 公告列表 // 公告列表
notice_list(data) { notice_list(data) {
return request({ return request({
url: "/smgw/getBackPageList", url: '/smgw/getBackPageList',
method: "post", method: 'post',
data data
}); })
}, },
// 公告发送 // 公告发送
notice_add(data) { notice_add(data) {
return request({ return request({
url: "/smgw/sendZnx", url: '/smgw/sendZnx',
method: "post", method: 'post',
data data
}); })
}, },
// 公告编辑 // 公告编辑
notice_detail(data) { notice_detail(data) {
return request({ return request({
url: "/smgw/getNotice", url: '/smgw/getNotice',
method: "post", method: 'post',
data data
}); })
}, },
// 公告编辑 // 公告编辑
notice_edit(data) { notice_edit(data) {
return request({ return request({
url: "/smgw/updateNotice", url: '/smgw/updateNotice',
method: "post", method: 'post',
data data
}); })
}, },
// 回现APP设置 // 回现APP设置
app_setting(params) { app_setting(params) {
return request({ return request({
url: "/manage/getList", url: '/manage/getList',
method: "get", method: 'get',
params params
}); })
}, },
// 变更状态 // 变更状态
app_setting_update(data) { app_setting_update(data) {
return request({ return request({
url: "/manage/update", url: '/manage/update',
method: "post", method: 'post',
data data
}); })
}, },
// 变更状态 // 变更状态
dict(params) { dict(params) {
return request({ return request({
url: "/dictData/selectBydictType", url: '/dictData/selectBydictType',
method: "get", method: 'get',
params params
}); })
}, },
...@@ -200,64 +200,101 @@ export default { ...@@ -200,64 +200,101 @@ export default {
// 预授信列表 // 预授信列表
preCreditList(data) { preCreditList(data) {
return request({ return request({
url: "/credit/preList", url: '/credit/preList',
method: "post", method: 'post',
data data
}); })
}, },
// 预授信详情 // 预授信详情
preCreditDetail(params) { preCreditDetail(params) {
return request({ return request({
url: "/credit/preDetail", url: '/credit/preDetail',
method: "get", method: 'get',
params params
}); })
}, },
// 预授信申述 // 预授信申述
preCreditPlead(params) { preCreditPlead(params) {
return request({ return request({
url: "/credit/preSubmit", url: '/credit/preSubmit',
method: "post", method: 'post',
data data
}); })
}, },
// 授信列表 // 授信列表
creditList(data) { creditList(data) {
return request({ return request({
url: "/credit/creditList", url: '/credit/creditList',
method: "post", method: 'post',
data data
}); })
}, },
// 授信详情 // 授信详情
creditDetail(params) { creditDetail(params) {
return request({ return request({
url: "/credit/creditDetail", url: '/credit/creditDetail',
method: "get", method: 'get',
params params
}); })
}, },
// 授信详情申述 // 授信详情申述
creditPlead(data) { creditPlead(data) {
return request({ return request({
url: "/credit/myAllotSubmit", url: '/credit/myAllotSubmit',
method: "post", method: 'post',
data data
}); })
}, },
// 初始化过滤条件的基础数据 // 初始化过滤条件的基础数据
initSearchData(data) { initSearchData(data) {
return request({ return request({
url: "/credit/statusList", url: '/credit/statusList',
method: "post", method: 'post',
data data
}); })
}, },
// 审批管理
// 初始化审批订单列表
initApproveList(data) {
return request({
url: '/approve/myOrderList',
method: 'post',
data
})
},
// 初始化审批订单详情
initApproveDetail(data) {
return request({
url: '/approve/myOrderDetail',
method: 'post',
data
})
},
// 审批人员上下线
approveOnOff(data) {
return request({
url: '/approve/onLineOrOffLine',
method: 'post',
data
})
},
// 转派
approveReassignment(data) {
return request({
url: '/approve/reassignment',
method: 'post',
data
})
},
// 审批订单审批提交
approveSubmit(data) {
return request({
url: '/approve/myOrderSubmit',
method: 'post',
data
})
}
}
};
const getters = { const getters = {
searchData: state => state.common.searchData, searchData: state => state.common.searchData,
user: state => state.user.user
} }
export default getters export default getters
...@@ -59,8 +59,7 @@ const actions = { ...@@ -59,8 +59,7 @@ const actions = {
commit('setUsername', user.nickName) commit('setUsername', user.nickName)
} }
// 设置假的token // 设置token
const accessToken = Cookies.get('x-auth-token') const accessToken = Cookies.get('x-auth-token')
if (accessToken) { if (accessToken) {
commit('setAccessToken', accessToken) commit('setAccessToken', accessToken)
...@@ -72,9 +71,6 @@ const actions = { ...@@ -72,9 +71,6 @@ const actions = {
*/ */
async send_msg_code({ commit }, userInfo) { async send_msg_code({ commit }, userInfo) {
const result = await API.send_msg_code(userInfo) const result = await API.send_msg_code(userInfo)
console.log(result, '验证码返回结果')
if (result.success) { if (result.success) {
return result return result
} }
...@@ -85,17 +81,25 @@ const actions = { ...@@ -85,17 +81,25 @@ const actions = {
* @returns * @returns
*/ */
async getUserInfo({ commit, dispatch, state }) { async getUserInfo({ commit, dispatch, state }) {
const {user} = state;
const result = await API.userInfo({ const result = await API.userInfo({
//loginName: user.loginName
loginName: 'caimm' loginName: 'caimm'
}) });
if (result.success) { if (result.success) {
const { loginName } = result.result const { loginName,userCell,userName,status } = result.result;
commit('setUsername', loginName) commit('setUsername', userName)
//commit('setAvatar') commit('setAvatar', 'https://i.gtimg.cn/club/item/face/img/2/15922_100.gif');
commit('setAvatar', 'https://i.gtimg.cn/club/item/face/img/2/15922_100.gif')
// 当不传递roles或ability时,默认使用管理员权限,可查看所有路由和按钮 commit('setUser', result.result)
dispatch('acl/setFull', true, { root: true })
if(status==='NORMAL'){
dispatch('acl/setFull', true, { root: true })
}else{
await dispatch('resetAll')
}
} else { } else {
await dispatch('resetAll') await dispatch('resetAll')
} }
......
...@@ -3,41 +3,56 @@ ...@@ -3,41 +3,56 @@
<!--搜索--> <!--搜索-->
<block-header title='搜索' /> <block-header title='搜索' />
<div class='search'> <div class='search'>
<el-form <el-form label-suffix=':' :inline='true' ref='form' :model='queryForm' class='form-inline'>
label-suffix=':'
:inline='true' <el-form-item prop='creditNo' label='授信编号'>
:model='queryForm'
class='form-inline'
>
<el-form-item label='授信类型'>
<el-input <el-input
v-model='queryForm.tenantNo' v-model='queryForm.creditNo'
clearable clearable
placeholder='请输入机构编号' placeholder='请输入授信编号'
/> />
</el-form-item> </el-form-item>
<el-form-item label='审批状态'> <el-form-item prop='realName' label='客户姓名'>
<el-input <el-input
v-model='queryForm.appName' v-model='queryForm.realName'
clearable clearable
placeholder='请输入机构名称' placeholder='请输入客户姓名'
/> />
</el-form-item> </el-form-item>
<el-form-item label='创建时间'>
<el-input <el-form-item label='授信类型'>
v-model='queryForm.appName' <el-select clearable v-model='queryForm.creditType' placeholder='请选择授信类型'>
clearable <el-option
placeholder='请输入机构名称' v-for='(item,index) in searchData.creditTypeResponseList'
/> :label='item.creditTypeStr'
:key='index'
:value='item.creditType'></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item label='审批状态'>
<el-button <el-select clearable v-model='queryForm.creditStatus' placeholder='请选择授信类型'>
icon='el-icon-search' <el-option
type='primary' v-for='(item,index) in searchData.creditStatusResponseList'
@click='onSubmit' :label='item.creditStatusStr'
:key='index'
:value='item.creditStatus'></el-option>
</el-select>
</el-form-item>
<el-form-item prop='time' label='申请时间'>
<el-date-picker
v-model='queryForm.time'
type='datetimerange'
:picker-options='pickerConfig'
range-separator='至'
start-placeholder='开始时间'
end-placeholder='结束时间'
> >
搜 索 </el-date-picker>
</el-button> </el-form-item>
<el-form-item>
<el-button icon='el-icon-search' type='primary' @click='onSearch'>搜 索</el-button>
<el-button icon='el-icon-delete' type='default' @click="onReset('form')">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -46,7 +61,7 @@ ...@@ -46,7 +61,7 @@
<block-header title='订单列表' /> <block-header title='订单列表' />
<el-form label-suffix=':' label-width='80px'> <el-form label-suffix=':' label-width='80px'>
<el-form-item label='上线开关'> <el-form-item label='上线开关'>
<el-switch v-model='value2'></el-switch> <el-switch @change='handleChangeOnLineStatus' v-model='isOnLine'></el-switch>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -133,12 +148,11 @@ ...@@ -133,12 +148,11 @@
<!--分页--> <!--分页-->
<el-pagination <el-pagination
:current-page='queryForm.current' :current-page='queryForm.current'
:layout='layout' layout='total, prev, pager, next'
:page-size='queryForm.size' :page-size='queryForm.size'
:total='total' :total='total'
background background
@current-change='handleCurrentChange' @current-change='handleCurrentChange'
@size-change='handleSizeChange'
/> />
<!--转派弹框--> <!--转派弹框-->
...@@ -153,6 +167,8 @@ ...@@ -153,6 +167,8 @@
import _ from 'lodash' import _ from 'lodash'
import API from '@/server/api' import API from '@/server/api'
import Reassignment from './components/reassignment' import Reassignment from './components/reassignment'
import { mapGetters } from 'vuex'
import Vue from 'vue'
export default { export default {
name: 'ApprovalOrder', name: 'ApprovalOrder',
...@@ -161,8 +177,7 @@ ...@@ -161,8 +177,7 @@
}, },
data() { data() {
return { return {
value2: true, isOnLine: false,
visible: false, visible: false,
checkList: ['授信编号', '客户姓名', '对应BD', '商户区域', '审核金额', '审核结果', '审批状态', '创建时间'], checkList: ['授信编号', '客户姓名', '对应BD', '商户区域', '审核金额', '审核结果', '审批状态', '创建时间'],
...@@ -213,14 +228,20 @@ ...@@ -213,14 +228,20 @@
], ],
list: [], list: [],
listLoading: true, listLoading: true,
layout: 'total, sizes, prev, pager, next, jumper',
total: 0, total: 0,
pickerConfig: this.datePickerOptions,
queryForm: { queryForm: {
current: 1, current: 1,
size: 10, size: 10,
status: '',
appName: '',
tenantNo: '' creditNo: '',
realName: '',
creditStatus: '',
creditType: '',
time: '',
startTime: '',
endTime: ''
} }
} }
}, },
...@@ -234,17 +255,23 @@ ...@@ -234,17 +255,23 @@
}) })
return _.sortBy(finallyArray, (item) => item.order) return _.sortBy(finallyArray, (item) => item.order)
//return finallyArray; //return finallyArray;
} },
}, ...mapGetters(['searchData', 'user'])
created() {
//防止三级以上路由时多次走created
if (this.$route.name === this.$options.name) this.fetchData()
}, },
mounted() { mounted() {
this.fetchData() this.fetchData()
}, },
methods: { methods: {
onSubmit() { onSearch() {
const { time } = this.queryForm
this.queryForm.current = 1
if (time) {
this.queryForm.startTime = time[0]
this.queryForm.endTime = time[1]
} else {
this.queryForm.startTime = ''
this.queryForm.endTime = ''
}
this.fetchData() this.fetchData()
}, },
handleView(row) { handleView(row) {
...@@ -254,28 +281,42 @@ ...@@ -254,28 +281,42 @@
query: { appNo } query: { appNo }
}) })
}, },
handleSizeChange(val) {
this.queryForm.size = val
this.fetchData()
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.queryForm.current = val this.queryForm.current = val
this.fetchData() this.fetchData()
}, },
handleQuery() {
this.queryForm.current = 1
this.fetchData()
},
async fetchData() { async fetchData() {
this.listLoading = true this.listLoading = true
const result = await API.prod_list(this.queryForm) const form = this.queryForm
const params = Object.assign({}, form)
delete params.time
params.userId = this.user.userId
const result = await API.initApproveList({ ...params })
const { records, total } = result.result const { records, total } = result.result
this.list = records this.list = records
this.total = total this.total = total
this.listLoading = false this.listLoading = false
}, },
// 转派弹框
async handleClick(row) { async handleClick(row) {
this.visible = true this.visible = true
},
// 修改上下线状态
async handleChangeOnLineStatus(e) {
const userId = this.user.userId
const userDutyState = e ? 'ONLINE' : 'OFFLINE'
const result = await API.approveOnOff({
userId,
userDutyState
});
if(result.success){
Vue.prototype.$baseMessage(
'操作成功',
'success'
)
}
} }
} }
} }
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<el-date-picker <el-date-picker
v-model="queryForm.time" v-model="queryForm.time"
type="datetimerange" type="datetimerange"
:picker-options="pickerOptions" :picker-options="pickerConfig"
range-separator="至" range-separator="至"
start-placeholder="开始时间" start-placeholder="开始时间"
end-placeholder="结束时间" end-placeholder="结束时间"
...@@ -112,12 +112,11 @@ ...@@ -112,12 +112,11 @@
<el-pagination <el-pagination
:current-page="queryForm.current" :current-page="queryForm.current"
:layout="layout" layout='total, prev, pager, next'
:page-size="queryForm.size" :page-size="queryForm.size"
:total="total" :total="total"
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
@size-change="handleSizeChange"
/> />
</div> </div>
</template> </template>
...@@ -185,51 +184,8 @@ ...@@ -185,51 +184,8 @@
], ],
list: [], list: [],
listLoading: true, listLoading: true,
layout: "total, prev, pager, next",
total: 1, total: 1,
pickerOptions:{ pickerConfig:this.datePickerOptions,
shortcuts: [
{
text: '今日',
onClick: (picker) => {
const end = new Date()
const start = moment().format('YYYY-MM-DD')
const startTime = `${start} 00:00:00`
picker.$emit('pick', [startTime, end]);
},
},
{
text: '昨日',
onClick: (picker) => {
const end = moment().subtract(1, 'days').format('YYYY-MM-DD')
const start = moment().subtract(1, 'days').format('YYYY-MM-DD')
const startTime = `${start} 00:00:00`
const endTime = `${end} 23:59:59`
picker.$emit('pick', [startTime, endTime]);
},
},
{
text: '最近7天',
onClick: (picker) => {
const end = moment().format('YYYY-MM-DD HH:mm:ss')
const start = moment().subtract(7, 'days').format('YYYY-MM-DD')
const startTime = `${start} 00:00:00`
const endTime = `${end}`
picker.$emit('pick', [startTime, endTime]);
},
},
{
text: '最近30天',
onClick: (picker) => {
const end = moment().format('YYYY-MM-DD HH:mm:ss')
const start = moment().subtract(30, 'days').format('YYYY-MM-DD')
const startTime = `${start} 00:00:00`
const endTime = `${end}`
picker.$emit('pick', [startTime, endTime]);
},
}
],
},
queryForm: { queryForm: {
current: 1, current: 1,
size: 9, size: 9,
...@@ -266,6 +222,15 @@ ...@@ -266,6 +222,15 @@
}, },
methods: { methods: {
onSearch() { onSearch() {
const { time } = this.queryForm;
this.queryForm.current = 1;
if (time) {
this.queryForm.startTime = time[0];
this.queryForm.endTime = time[1];
} else {
this.queryForm.startTime = "";
this.queryForm.endTime = "";
}
this.fetchData(); this.fetchData();
}, },
// 预授信详情 // 预授信详情
...@@ -276,21 +241,16 @@ ...@@ -276,21 +241,16 @@
query: { creditNo } query: { creditNo }
}) })
}, },
handleSizeChange(val) {
this.queryForm.size = val;
this.fetchData();
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.queryForm.current = val; this.queryForm.current = val;
this.fetchData(); this.fetchData();
}, },
handleQuery() {
this.queryForm.current = 1;
this.fetchData();
},
async fetchData() { async fetchData() {
this.listLoading = true; this.listLoading = true;
const result = await API.creditList(this.queryForm); const form = this.queryForm;
const params = Object.assign({}, form);
delete params.time;
const result = await API.creditList({...params});
const { records, total } = result.result; const { records, total } = result.result;
this.list = records; this.list = records;
this.total = total; this.total = total;
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<el-date-picker <el-date-picker
v-model='queryForm.time' v-model='queryForm.time'
type='datetimerange' type='datetimerange'
:picker-options='pickerOptions' :picker-options='pickerConfig'
:default-time="['00:00:00', '23:59:59']" :default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
range-separator='至' range-separator='至'
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<el-pagination <el-pagination
:current-page='queryForm.current' :current-page='queryForm.current'
:layout='layout' layout='total, prev, pager, next'
:page-size='queryForm.size' :page-size='queryForm.size'
:total='total' :total='total'
background background
...@@ -174,51 +174,8 @@ ...@@ -174,51 +174,8 @@
], ],
list: [], list: [],
listLoading: true, listLoading: true,
layout: 'total, prev, pager, next', pickerConfig:this.datePickerOptions,
total: 1, total: 1,
pickerOptions: {
shortcuts: [
{
text: '今日',
onClick: (picker) => {
const end = new Date()
const start = moment().format('YYYY-MM-DD')
const startTime = `${start} 00:00:00`
picker.$emit('pick', [startTime, end])
}
},
{
text: '昨日',
onClick: (picker) => {
const end = moment().subtract(1, 'days').format('YYYY-MM-DD')
const start = moment().subtract(1, 'days').format('YYYY-MM-DD')
const startTime = `${start} 00:00:00`
const endTime = `${end} 23:59:59`
picker.$emit('pick', [startTime, endTime])
}
},
{
text: '最近7天',
onClick: (picker) => {
const end = moment().format('YYYY-MM-DD HH:mm:ss')
const start = moment().subtract(7, 'days').format('YYYY-MM-DD')
const startTime = `${start} 00:00:00`
const endTime = `${end}`
picker.$emit('pick', [startTime, endTime])
}
},
{
text: '最近30天',
onClick: (picker) => {
const end = moment().format('YYYY-MM-DD HH:mm:ss')
const start = moment().subtract(30, 'days').format('YYYY-MM-DD')
const startTime = `${start} 00:00:00`
const endTime = `${end}`
picker.$emit('pick', [startTime, endTime])
}
}
]
},
queryForm: { queryForm: {
current: 1, current: 1,
size: 10, size: 10,
......
...@@ -253,7 +253,8 @@ export default { ...@@ -253,7 +253,8 @@ export default {
try { try {
this.loading = true; this.loading = true;
await this.login(this.form); await this.login(this.form);
await this.$router.push(this.handleRoute()); console.log(this.handleRoute(),'是啥');
await this.$router.push('/index');
} finally { } finally {
this.loading = false; this.loading = false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment