Merge branch 'master_wp' into master_zhp
# Conflicts: # ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/Merchant.javapull/379/head
commit
a778eac754
|
|
@ -109,6 +109,10 @@ public class Merchant extends BaseEntity
|
||||||
@Excel(name = "标签")
|
@Excel(name = "标签")
|
||||||
private String label;
|
private String label;
|
||||||
|
|
||||||
|
/** 商户是否开启二要素 0 否 1 是 */
|
||||||
|
@Excel(name = "商户是否开启二要素")
|
||||||
|
private Boolean merchantAuth;
|
||||||
|
|
||||||
@Excel(name = "下游渠道标识")
|
@Excel(name = "下游渠道标识")
|
||||||
private String channelSign;
|
private String channelSign;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.mapper.MerchantMapper">
|
<mapper namespace="com.ruoyi.system.mapper.MerchantMapper">
|
||||||
|
|
||||||
|
|
||||||
<resultMap type="com.ruoyi.common.core.domain.http.Merchant" id="MerchantResult">
|
<resultMap type="com.ruoyi.common.core.domain.http.Merchant" id="MerchantResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="merchantType" column="merchant_type" />
|
<result property="merchantType" column="merchant_type" />
|
||||||
|
|
@ -26,6 +27,7 @@
|
||||||
<result property="ageLimitEnd" column="age_limit_end" />
|
<result property="ageLimitEnd" column="age_limit_end" />
|
||||||
<result property="phoneLimit" column="phone_limit" />
|
<result property="phoneLimit" column="phone_limit" />
|
||||||
<result property="label" column="label" />
|
<result property="label" column="label" />
|
||||||
|
<result property="merchantAuth" column="merchant_auth" />
|
||||||
<result property="socialSecurityNo" column="social_security_no" />
|
<result property="socialSecurityNo" column="social_security_no" />
|
||||||
<result property="socialSecurityLow" column="social_security_low" />
|
<result property="socialSecurityLow" column="social_security_low" />
|
||||||
<result property="socialSecurityHigh" column="social_security_high" />
|
<result property="socialSecurityHigh" column="social_security_high" />
|
||||||
|
|
@ -67,7 +69,7 @@
|
||||||
<result property="merchantName" column="merchant_name" />
|
<result property="merchantName" column="merchant_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="selectMerchantVo">
|
<sql id="selectMerchantVo">
|
||||||
select id, merchant_type, merchant_name, merchant_describe, merchant_company, logo, status, limit_num, limit_type,is_balance_monitoring,balance_monitoring,ispass, customer_info_filter_type,channel_limit_type,period,hit_url,regist_url,age_limit_start, age_limit_end, phone_limit,label, social_security_no, social_security_low, social_security_high, car_no, car_have, guarantee_slip_low, guarantee_slip_centre, guarantee_slip_high, education_middle, education_high_school, education_polytechnic, education_junior_college, education_undergraduate_course, education_postgraduate, accumulation_fund_low, accumulation_fund_high, hourse_no, hourse_full_payment, hourse_mortgaging, office_worker, civil_servant, private_property_owners, self_employed_person, other_occupations, hua_bei_low, hua_bei_middle, hua_bei_high, bai_tiao_low, bai_tiao_middle, bai_tiao_high, zhi_ma, create_time, update_time, remark from merchant
|
select id, merchant_type, merchant_name, merchant_describe, merchant_company, logo, status, limit_num, limit_type,is_balance_monitoring,balance_monitoring,ispass, customer_info_filter_type,channel_limit_type,period,hit_url,regist_url,age_limit_start, age_limit_end, phone_limit,label,merchant_auth, social_security_no, social_security_low, social_security_high, car_no, car_have, guarantee_slip_low, guarantee_slip_centre, guarantee_slip_high, education_middle, education_high_school, education_polytechnic, education_junior_college, education_undergraduate_course, education_postgraduate, accumulation_fund_low, accumulation_fund_high, hourse_no, hourse_full_payment, hourse_mortgaging, office_worker, civil_servant, private_property_owners, self_employed_person, other_occupations, hua_bei_low, hua_bei_middle, hua_bei_high, bai_tiao_low, bai_tiao_middle, bai_tiao_high, zhi_ma, create_time, update_time, remark from merchant
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="findAllMerchant">
|
<sql id="findAllMerchant">
|
||||||
select id, merchant_name from merchant
|
select id, merchant_name from merchant
|
||||||
|
|
@ -96,6 +98,7 @@
|
||||||
<if test="ageLimitEnd != null "> and age_limit_end = #{ageLimitEnd}</if>
|
<if test="ageLimitEnd != null "> and age_limit_end = #{ageLimitEnd}</if>
|
||||||
<if test="phoneLimit != null and phoneLimit != ''"> and phone_limit = #{phoneLimit}</if>
|
<if test="phoneLimit != null and phoneLimit != ''"> and phone_limit = #{phoneLimit}</if>
|
||||||
<if test="label != null and label != ''"> and label = #{label}</if>
|
<if test="label != null and label != ''"> and label = #{label}</if>
|
||||||
|
<if test="merchantAuth != null "> and merchant_auth = #{merchantAuth}</if>
|
||||||
<if test="socialSecurityNo != null "> and social_security_no = #{socialSecurityNo}</if>
|
<if test="socialSecurityNo != null "> and social_security_no = #{socialSecurityNo}</if>
|
||||||
<if test="socialSecurityLow != null "> and social_security_low = #{socialSecurityLow}</if>
|
<if test="socialSecurityLow != null "> and social_security_low = #{socialSecurityLow}</if>
|
||||||
<if test="socialSecurityHigh != null "> and social_security_high = #{socialSecurityHigh}</if>
|
<if test="socialSecurityHigh != null "> and social_security_high = #{socialSecurityHigh}</if>
|
||||||
|
|
@ -158,6 +161,7 @@
|
||||||
<if test="ageLimitEnd != null">age_limit_end,</if>
|
<if test="ageLimitEnd != null">age_limit_end,</if>
|
||||||
<if test="phoneLimit != null">phone_limit,</if>
|
<if test="phoneLimit != null">phone_limit,</if>
|
||||||
<if test="label != null">label,</if>
|
<if test="label != null">label,</if>
|
||||||
|
<if test="merchant_auth != null">merchantAuth,</if>
|
||||||
<if test="socialSecurityNo != null">social_security_no,</if>
|
<if test="socialSecurityNo != null">social_security_no,</if>
|
||||||
<if test="socialSecurityLow != null">social_security_low,</if>
|
<if test="socialSecurityLow != null">social_security_low,</if>
|
||||||
<if test="socialSecurityHigh != null">social_security_high,</if>
|
<if test="socialSecurityHigh != null">social_security_high,</if>
|
||||||
|
|
@ -214,6 +218,7 @@
|
||||||
<if test="ageLimitEnd != null">#{ageLimitEnd},</if>
|
<if test="ageLimitEnd != null">#{ageLimitEnd},</if>
|
||||||
<if test="phoneLimit != null">#{phoneLimit},</if>
|
<if test="phoneLimit != null">#{phoneLimit},</if>
|
||||||
<if test="label != null">#{label},</if>
|
<if test="label != null">#{label},</if>
|
||||||
|
<if test="merchantAuth != null">#{merchantAuth},</if>
|
||||||
<if test="socialSecurityNo != null">#{socialSecurityNo},</if>
|
<if test="socialSecurityNo != null">#{socialSecurityNo},</if>
|
||||||
<if test="socialSecurityLow != null">#{socialSecurityLow},</if>
|
<if test="socialSecurityLow != null">#{socialSecurityLow},</if>
|
||||||
<if test="socialSecurityHigh != null">#{socialSecurityHigh},</if>
|
<if test="socialSecurityHigh != null">#{socialSecurityHigh},</if>
|
||||||
|
|
@ -274,6 +279,7 @@
|
||||||
<if test="ageLimitEnd != null">age_limit_end = #{ageLimitEnd},</if>
|
<if test="ageLimitEnd != null">age_limit_end = #{ageLimitEnd},</if>
|
||||||
<if test="phoneLimit != null">phone_limit = #{phoneLimit},</if>
|
<if test="phoneLimit != null">phone_limit = #{phoneLimit},</if>
|
||||||
<if test="label != null">label = #{label},</if>
|
<if test="label != null">label = #{label},</if>
|
||||||
|
<if test="merchantAuth != null">merchant_auth = #{merchantAuth},</if>
|
||||||
<if test="socialSecurityNo != null">social_security_no = #{socialSecurityNo},</if>
|
<if test="socialSecurityNo != null">social_security_no = #{socialSecurityNo},</if>
|
||||||
<if test="socialSecurityLow != null">social_security_low = #{socialSecurityLow},</if>
|
<if test="socialSecurityLow != null">social_security_low = #{socialSecurityLow},</if>
|
||||||
<if test="socialSecurityHigh != null">social_security_high = #{socialSecurityHigh},</if>
|
<if test="socialSecurityHigh != null">social_security_high = #{socialSecurityHigh},</if>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 租研舍管理系统
|
VUE_APP_TITLE = 未信用秒租管理系统
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
# 租研舍管理系统/开发环境
|
# 未信用秒租管理系统/开发环境
|
||||||
VUE_APP_BASE_API = '/dev-api'
|
VUE_APP_BASE_API = '/dev-api'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 租研舍管理系统
|
VUE_APP_TITLE = 未信用秒租管理系统
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|
||||||
# 租研舍管理系统/生产环境
|
# 未信用秒租管理系统/生产环境
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
VUE_APP_BASE_API = 'http://124.222.144.55:80/dev-api'
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 租研舍管理系统
|
VUE_APP_TITLE = 未信用秒租管理系统
|
||||||
|
|
||||||
NODE_ENV = production
|
NODE_ENV = production
|
||||||
|
|
||||||
# 测试环境配置
|
# 测试环境配置
|
||||||
ENV = 'staging'
|
ENV = 'staging'
|
||||||
|
|
||||||
# 租研舍管理系统/测试环境
|
# 未信用秒租管理系统/测试环境
|
||||||
VUE_APP_BASE_API = '/stage-api'
|
VUE_APP_BASE_API = '/stage-api'
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "ruoyi",
|
"name": "ruoyi",
|
||||||
"version": "3.6.4",
|
"version": "3.6.4",
|
||||||
"description": "租研舍管理系统",
|
"description": "未信用秒租管理系统",
|
||||||
"author": "租研舍",
|
"author": "未信用秒租",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vue-cli-service serve",
|
"dev": "vue-cli-service serve",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
// 查询渠道配置列表
|
||||||
|
export function listChannel(query) {
|
||||||
|
return request({
|
||||||
|
url: "/system/channel/list",
|
||||||
|
method: "get",
|
||||||
|
params: query,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询渠道配置详细
|
||||||
|
export function getChannel(id) {
|
||||||
|
return request({
|
||||||
|
url: "/system/channel/" + id,
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增渠道配置
|
||||||
|
export function addChannel(data) {
|
||||||
|
return request({
|
||||||
|
url: "/system/channel/add",
|
||||||
|
method: "post",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改渠道配置
|
||||||
|
export function updateChannel(data) {
|
||||||
|
return request({
|
||||||
|
url: "/system/channel/edit",
|
||||||
|
method: "post",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除渠道配置
|
||||||
|
export function delChannel(id) {
|
||||||
|
return request({
|
||||||
|
url: "/system/channel/" + id,
|
||||||
|
method: "delete",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
// 查询客户信息列表
|
||||||
|
export function listCustomer(query) {
|
||||||
|
return request({
|
||||||
|
url: "/system/customer/list",
|
||||||
|
method: "get",
|
||||||
|
params: query,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询客户信息详细
|
||||||
|
export function getCustomer(id) {
|
||||||
|
return request({
|
||||||
|
url: "/system/customer/" + id,
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增客户信息
|
||||||
|
export function addCustomer(data) {
|
||||||
|
return request({
|
||||||
|
url: "/system/customer",
|
||||||
|
method: "post",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改客户信息
|
||||||
|
export function updateCustomer(data) {
|
||||||
|
return request({
|
||||||
|
url: "/system/customer",
|
||||||
|
method: "put",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除客户信息
|
||||||
|
export function delCustomer(id) {
|
||||||
|
return request({
|
||||||
|
url: "/system/customer/" + id,
|
||||||
|
method: "delete",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取商户(机构)的列表
|
||||||
|
export function getAllMerchantList() {
|
||||||
|
return request({
|
||||||
|
url: "/system/customer/getAllMerchantList",
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取渠道
|
||||||
|
export function getMerchantChannelList() {
|
||||||
|
return request({
|
||||||
|
url: "/system/merchant/getMerchantChannelList",
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询客户申请记录列表
|
||||||
|
export function listLog(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/log/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询客户申请记录详细
|
||||||
|
export function getLog(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/log/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增客户申请记录
|
||||||
|
export function addLog(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/log',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改客户申请记录
|
||||||
|
export function updateLog(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/log',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除客户申请记录
|
||||||
|
export function delLog(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/log/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
// 查询商户列表
|
||||||
|
export function listMerchant(query) {
|
||||||
|
return request({
|
||||||
|
url: "/system/merchant/list",
|
||||||
|
method: "get",
|
||||||
|
params: query,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询商户详细
|
||||||
|
export function getMerchant(id) {
|
||||||
|
return request({
|
||||||
|
url: "/system/merchant/" + id,
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增商户
|
||||||
|
export function addMerchant(data) {
|
||||||
|
return request({
|
||||||
|
url: "/system/merchant/add",
|
||||||
|
method: "post",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改商户
|
||||||
|
export function updateMerchant(data) {
|
||||||
|
return request({
|
||||||
|
url: "/system/merchant/edit",
|
||||||
|
method: "post",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除商户
|
||||||
|
export function delMerchant(id) {
|
||||||
|
return request({
|
||||||
|
url: "/system/merchant/" + id,
|
||||||
|
method: "delete",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取商户(机构)的列表
|
||||||
|
export function getAllMerchantList() {
|
||||||
|
return request({
|
||||||
|
url: "/system/customer/getAllMerchantList",
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -1,58 +1,62 @@
|
||||||
import router from './router'
|
import router from "./router";
|
||||||
import store from './store'
|
import store from "./store";
|
||||||
import { Message } from 'element-ui'
|
import { Message } from "element-ui";
|
||||||
import NProgress from 'nprogress'
|
import NProgress from "nprogress";
|
||||||
import 'nprogress/nprogress.css'
|
import "nprogress/nprogress.css";
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from "@/utils/auth";
|
||||||
import { isRelogin } from '@/utils/request'
|
import { isRelogin } from "@/utils/request";
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false })
|
NProgress.configure({ showSpinner: false });
|
||||||
|
|
||||||
const whiteList = ['/login', '/register']
|
const whiteList = ["/login", "/register"];
|
||||||
|
// const whiteList = ["/login", "/register", "/channel", "/merchant", "/customer"];
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
NProgress.start()
|
NProgress.start();
|
||||||
if (getToken()) {
|
if (getToken()) {
|
||||||
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
|
to.meta.title && store.dispatch("settings/setTitle", to.meta.title);
|
||||||
/* has token*/
|
/* has token*/
|
||||||
if (to.path === '/login') {
|
if (to.path === "/login") {
|
||||||
next({ path: '/' })
|
next({ path: "/" });
|
||||||
NProgress.done()
|
NProgress.done();
|
||||||
} else if (whiteList.indexOf(to.path) !== -1) {
|
} else if (whiteList.indexOf(to.path) !== -1) {
|
||||||
next()
|
next();
|
||||||
} else {
|
} else {
|
||||||
if (store.getters.roles.length === 0) {
|
if (store.getters.roles.length === 0) {
|
||||||
isRelogin.show = true
|
isRelogin.show = true;
|
||||||
// 判断当前用户是否已拉取完user_info信息
|
// 判断当前用户是否已拉取完user_info信息
|
||||||
store.dispatch('GetInfo').then(() => {
|
store
|
||||||
isRelogin.show = false
|
.dispatch("GetInfo")
|
||||||
store.dispatch('GenerateRoutes').then(accessRoutes => {
|
.then(() => {
|
||||||
// 根据roles权限生成可访问的路由表
|
isRelogin.show = false;
|
||||||
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
store.dispatch("GenerateRoutes").then((accessRoutes) => {
|
||||||
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
// 根据roles权限生成可访问的路由表
|
||||||
})
|
router.addRoutes(accessRoutes); // 动态添加可访问路由表
|
||||||
}).catch(err => {
|
next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
|
||||||
store.dispatch('LogOut').then(() => {
|
});
|
||||||
Message.error(err)
|
|
||||||
next({ path: '/' })
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
store.dispatch("LogOut").then(() => {
|
||||||
|
Message.error(err);
|
||||||
|
next({ path: "/" });
|
||||||
|
});
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
next()
|
next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 没有token
|
// 没有token
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
if (whiteList.indexOf(to.path) !== -1) {
|
||||||
// 在免登录白名单,直接进入
|
// 在免登录白名单,直接进入
|
||||||
next()
|
next();
|
||||||
} else {
|
} else {
|
||||||
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) // 否则全部重定向到登录页
|
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`); // 否则全部重定向到登录页
|
||||||
NProgress.done()
|
NProgress.done();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
router.afterEach(() => {
|
router.afterEach(() => {
|
||||||
NProgress.done()
|
NProgress.done();
|
||||||
})
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import Vue from 'vue'
|
import Vue from "vue";
|
||||||
import Router from 'vue-router'
|
import Router from "vue-router";
|
||||||
|
|
||||||
Vue.use(Router)
|
Vue.use(Router);
|
||||||
|
|
||||||
/* Layout */
|
/* Layout */
|
||||||
import Layout from '@/layout'
|
import Layout from "@/layout";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note: 路由配置项
|
* Note: 路由配置项
|
||||||
|
|
@ -31,153 +31,185 @@ import Layout from '@/layout'
|
||||||
// 公共路由
|
// 公共路由
|
||||||
export const constantRoutes = [
|
export const constantRoutes = [
|
||||||
{
|
{
|
||||||
path: '/redirect',
|
path: "/redirect",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/redirect/:path(.*)',
|
path: "/redirect/:path(.*)",
|
||||||
component: () => import('@/views/redirect')
|
component: () => import("@/views/redirect"),
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// path: "/channel",
|
||||||
|
// name: "渠道管理",
|
||||||
|
// component: Layout,
|
||||||
|
// meta: {
|
||||||
|
// title: "渠道管理",
|
||||||
|
// },
|
||||||
|
// component: () => import("@/views/channel/index"),
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "/merchant",
|
||||||
|
// name: "商户管理",
|
||||||
|
// component: Layout,
|
||||||
|
// meta: {
|
||||||
|
// title: "商户管理",
|
||||||
|
// },
|
||||||
|
// component: () => import("@/views/merchant/index"),
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "/customer",
|
||||||
|
// name: "用户管理",
|
||||||
|
// component: Layout,
|
||||||
|
// meta: {
|
||||||
|
// title: "用户管理",
|
||||||
|
// },
|
||||||
|
// component: () => import("@/views/customer/index"),
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
path: "/index",
|
||||||
|
component: () => import("@/views/index_v1"),
|
||||||
|
hidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: "/login",
|
||||||
component: () => import('@/views/login'),
|
component: () => import("@/views/login"),
|
||||||
hidden: true
|
hidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/register',
|
path: "/register",
|
||||||
component: () => import('@/views/register'),
|
component: () => import("@/views/register"),
|
||||||
hidden: true
|
hidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/404',
|
path: "/404",
|
||||||
component: () => import('@/views/error/404'),
|
component: () => import("@/views/error/404"),
|
||||||
hidden: true
|
hidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/401',
|
path: "/401",
|
||||||
component: () => import('@/views/error/401'),
|
component: () => import("@/views/error/401"),
|
||||||
hidden: true
|
hidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '',
|
path: "",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: 'index',
|
redirect: "system/user",
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: 'index',
|
// path: "index",
|
||||||
component: () => import('@/views/index'),
|
// component: () => import("@/views/index_v1"),
|
||||||
name: 'Index',
|
// name: "Index",
|
||||||
meta: { title: '首页', icon: 'dashboard', affix: true }
|
// meta: { title: "首页", icon: "dashboard", affix: true },
|
||||||
}
|
// },
|
||||||
]
|
// ],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/user',
|
path: "/user",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
redirect: 'noredirect',
|
redirect: "noredirect",
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'profile',
|
path: "profile",
|
||||||
component: () => import('@/views/system/user/profile/index'),
|
component: () => import("@/views/system/user/profile/index"),
|
||||||
name: 'Profile',
|
name: "Profile",
|
||||||
meta: { title: '个人中心', icon: 'user' }
|
meta: { title: "个人中心", icon: "user" },
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
]
|
];
|
||||||
|
|
||||||
// 动态路由,基于用户权限动态去加载
|
// 动态路由,基于用户权限动态去加载
|
||||||
export const dynamicRoutes = [
|
export const dynamicRoutes = [
|
||||||
{
|
{
|
||||||
path: '/system/user-auth',
|
path: "/system/user-auth",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['system:user:edit'],
|
permissions: ["system:user:edit"],
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'role/:userId(\\d+)',
|
path: "role/:userId(\\d+)",
|
||||||
component: () => import('@/views/system/user/authRole'),
|
component: () => import("@/views/system/user/authRole"),
|
||||||
name: 'AuthRole',
|
name: "AuthRole",
|
||||||
meta: { title: '分配角色', activeMenu: '/system/user' }
|
meta: { title: "分配角色", activeMenu: "/system/user" },
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/system/role-auth',
|
path: "/system/role-auth",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['system:role:edit'],
|
permissions: ["system:role:edit"],
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'user/:roleId(\\d+)',
|
path: "user/:roleId(\\d+)",
|
||||||
component: () => import('@/views/system/role/authUser'),
|
component: () => import("@/views/system/role/authUser"),
|
||||||
name: 'AuthUser',
|
name: "AuthUser",
|
||||||
meta: { title: '分配用户', activeMenu: '/system/role' }
|
meta: { title: "分配用户", activeMenu: "/system/role" },
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/system/dict-data',
|
path: "/system/dict-data",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['system:dict:list'],
|
permissions: ["system:dict:list"],
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'index/:dictId(\\d+)',
|
path: "index/:dictId(\\d+)",
|
||||||
component: () => import('@/views/system/dict/data'),
|
component: () => import("@/views/system/dict/data"),
|
||||||
name: 'Data',
|
name: "Data",
|
||||||
meta: { title: '字典数据', activeMenu: '/system/dict' }
|
meta: { title: "字典数据", activeMenu: "/system/dict" },
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/monitor/job-log',
|
path: "/monitor/job-log",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['monitor:job:list'],
|
permissions: ["monitor:job:list"],
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'index/:jobId(\\d+)',
|
path: "index/:jobId(\\d+)",
|
||||||
component: () => import('@/views/monitor/job/log'),
|
component: () => import("@/views/monitor/job/log"),
|
||||||
name: 'JobLog',
|
name: "JobLog",
|
||||||
meta: { title: '调度日志', activeMenu: '/monitor/job' }
|
meta: { title: "调度日志", activeMenu: "/monitor/job" },
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/tool/gen-edit',
|
path: "/tool/gen-edit",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['tool:gen:edit'],
|
permissions: ["tool:gen:edit"],
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'index/:tableId(\\d+)',
|
path: "index/:tableId(\\d+)",
|
||||||
component: () => import('@/views/tool/gen/editTable'),
|
component: () => import("@/views/tool/gen/editTable"),
|
||||||
name: 'GenEdit',
|
name: "GenEdit",
|
||||||
meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
|
meta: { title: "修改生成配置", activeMenu: "/tool/gen" },
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
]
|
];
|
||||||
|
|
||||||
// 防止连续点击多次路由报错
|
// 防止连续点击多次路由报错
|
||||||
let routerPush = Router.prototype.push;
|
let routerPush = Router.prototype.push;
|
||||||
let routerReplace = Router.prototype.replace;
|
let routerReplace = Router.prototype.replace;
|
||||||
// push
|
// push
|
||||||
Router.prototype.push = function push(location) {
|
Router.prototype.push = function push(location) {
|
||||||
return routerPush.call(this, location).catch(err => err)
|
return routerPush.call(this, location).catch((err) => err);
|
||||||
}
|
};
|
||||||
// replace
|
// replace
|
||||||
Router.prototype.replace = function push(location) {
|
Router.prototype.replace = function push(location) {
|
||||||
return routerReplace.call(this, location).catch(err => err)
|
return routerReplace.call(this, location).catch((err) => err);
|
||||||
}
|
};
|
||||||
|
|
||||||
export default new Router({
|
export default new Router({
|
||||||
mode: 'history', // 去掉url中的#
|
mode: "history", // 去掉url中的#
|
||||||
scrollBehavior: () => ({ y: 0 }),
|
scrollBehavior: () => ({ y: 0 }),
|
||||||
routes: constantRoutes
|
routes: constantRoutes,
|
||||||
})
|
});
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,534 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="68px">
|
||||||
|
<el-form-item label="渠道"
|
||||||
|
prop="channelName">
|
||||||
|
<el-input v-model="queryParams.channelName"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="渠道签名"
|
||||||
|
prop="channelSign">
|
||||||
|
<el-input v-model="queryParams.channelSign"
|
||||||
|
placeholder="请输入渠道签名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="渠道备注"
|
||||||
|
prop="remark">
|
||||||
|
<el-input v-model="queryParams.remark"
|
||||||
|
placeholder="请输入渠道备注"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="扣量比" prop="score">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.score"
|
||||||
|
placeholder="请输入扣量比"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<!-- <el-form-item label="推广页名称" prop="htmlName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.htmlName"
|
||||||
|
placeholder="请输入推广页名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<!-- <el-form-item label="推广页地址" prop="htmlLocation">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.htmlLocation"
|
||||||
|
placeholder="请输入推广页地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<!-- <el-form-item label="可访问IP" prop="ips">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.ips"
|
||||||
|
placeholder="请输入可访问IP"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="开启关闭时段" prop="period">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.period"
|
||||||
|
placeholder="请输入开启关闭时段"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>-->
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh"
|
||||||
|
size="mini"
|
||||||
|
@click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10"
|
||||||
|
class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate">修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['system:channel:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:channel:export']"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</el-col> -->
|
||||||
|
<!-- <right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar> -->
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading"
|
||||||
|
:data="channelList"
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection"
|
||||||
|
width="55"
|
||||||
|
align="center" />
|
||||||
|
<el-table-column label="ID"
|
||||||
|
align="center"
|
||||||
|
prop="id" />
|
||||||
|
<el-table-column label="渠道名称"
|
||||||
|
align="center"
|
||||||
|
prop="channelName" />
|
||||||
|
<el-table-column label="渠道签名"
|
||||||
|
align="center"
|
||||||
|
prop="channelSign" />
|
||||||
|
<!-- <el-table-column label="扣量比" align="center" prop="score" /> -->
|
||||||
|
<!-- <el-table-column label="推广页名称" align="center" prop="htmlName" /> -->
|
||||||
|
<el-table-column label="推广地址"
|
||||||
|
align="center"
|
||||||
|
prop="htmlLocation" />
|
||||||
|
<!-- <el-table-column label="可访问IP" align="center" prop="ips" /> -->
|
||||||
|
<!-- <el-table-column label="开启关闭时段" align="center" prop="period" /> -->
|
||||||
|
<el-table-column label="备注"
|
||||||
|
align="center"
|
||||||
|
prop="remark" />
|
||||||
|
<el-table-column label="修改时间"
|
||||||
|
align="center"
|
||||||
|
prop="updateTime">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)">修改</el-button>
|
||||||
|
<!-- <el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:channel:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
> -->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList" />
|
||||||
|
|
||||||
|
<!-- 添加或修改渠道配置对话框 -->
|
||||||
|
<el-dialog :title="title"
|
||||||
|
:visible.sync="open"
|
||||||
|
width="70"
|
||||||
|
append-to-body>
|
||||||
|
<el-form ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="120px">
|
||||||
|
<el-form-item label="渠道类型"
|
||||||
|
prop="channelType"
|
||||||
|
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||||
|
<el-radio-group v-model="form.channelType">
|
||||||
|
<el-radio label="1">H5</el-radio>
|
||||||
|
<el-radio label="2">联登</el-radio>
|
||||||
|
<el-radio label="3">半流程</el-radio>
|
||||||
|
<el-radio label="4">全流程</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="渠道名称"
|
||||||
|
prop="channelName"
|
||||||
|
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||||
|
<el-input v-model="form.channelName"
|
||||||
|
placeholder="请输入渠道名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="渠道签名"
|
||||||
|
prop="channelSign"
|
||||||
|
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||||
|
<el-input v-model="form.channelSign"
|
||||||
|
placeholder="请输入渠道签名"
|
||||||
|
disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="扣量比(%)"
|
||||||
|
prop="score"
|
||||||
|
:max="100"
|
||||||
|
:min="0"
|
||||||
|
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||||
|
<el-input v-model="form.score"
|
||||||
|
placeholder="请输入扣量比"
|
||||||
|
type="number">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="推广页名称"
|
||||||
|
prop="htmlName"
|
||||||
|
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||||
|
<el-input v-model="form.htmlName"
|
||||||
|
placeholder="请输入推广页名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="推广页地址" prop="htmlLocation">
|
||||||
|
<el-input
|
||||||
|
v-model="form.htmlLocation"
|
||||||
|
placeholder="请输入推广页地址"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="注册页模板"
|
||||||
|
prop="htmlLocation"
|
||||||
|
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||||
|
<el-upload :action="action"
|
||||||
|
:headers="uploadHeader"
|
||||||
|
class="avatar-uploader"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess">
|
||||||
|
<el-button size="small"
|
||||||
|
type="primary">点击上传</el-button>
|
||||||
|
<el-input v-model="form.htmlLocation"
|
||||||
|
readonly
|
||||||
|
style="margin-top: 20px" />
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="可访问IP"
|
||||||
|
prop="ips"
|
||||||
|
:rules="[{ required: true, message: '必填项', trigger: 'change' }]">
|
||||||
|
<el-input v-model="form.ips"
|
||||||
|
placeholder="请输入可访问IP" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="关闭时段"
|
||||||
|
prop="period">
|
||||||
|
<!-- <el-input v-model="form.period" placeholder="请输入开启关闭时段" /> -->
|
||||||
|
<el-checkbox :indeterminate="isIndeterminate"
|
||||||
|
@change="handleCheckAllChange"
|
||||||
|
v-model="checkAll">全选时段</el-checkbox>
|
||||||
|
<div style="margin: 15px 0"></div>
|
||||||
|
<el-checkbox-group v-model="form.period"
|
||||||
|
@change="handleCheckedCitiesChange">
|
||||||
|
<el-checkbox v-for="city in cityOptions"
|
||||||
|
:label="city"
|
||||||
|
:key="city">{{ city }}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注"
|
||||||
|
prop="remark">
|
||||||
|
<el-input v-model="form.remark"
|
||||||
|
placeholder="请输入"
|
||||||
|
type="textarea"
|
||||||
|
:rows="2" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer"
|
||||||
|
class="dialog-footer">
|
||||||
|
<el-button type="primary"
|
||||||
|
@click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listChannel,
|
||||||
|
getChannel,
|
||||||
|
delChannel,
|
||||||
|
addChannel,
|
||||||
|
updateChannel,
|
||||||
|
} from "@/api/system/channel";
|
||||||
|
import { getToken } from "@/utils/auth";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Channel",
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
action: "/dev-api/file/upload",
|
||||||
|
|
||||||
|
uploadHeader: { Authorization: getToken() },
|
||||||
|
//关闭时间是否全选
|
||||||
|
checkAll: false,
|
||||||
|
checkedCities: [],
|
||||||
|
cityOptions: [
|
||||||
|
"1",
|
||||||
|
"2",
|
||||||
|
"3",
|
||||||
|
"4",
|
||||||
|
"5",
|
||||||
|
"6",
|
||||||
|
"7",
|
||||||
|
"8",
|
||||||
|
"9",
|
||||||
|
"10",
|
||||||
|
"11",
|
||||||
|
"12",
|
||||||
|
"13",
|
||||||
|
"14",
|
||||||
|
"15",
|
||||||
|
"16",
|
||||||
|
"17",
|
||||||
|
"18",
|
||||||
|
"19",
|
||||||
|
"20",
|
||||||
|
"21",
|
||||||
|
"22",
|
||||||
|
"23",
|
||||||
|
],
|
||||||
|
isIndeterminate: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 渠道配置表格数据
|
||||||
|
channelList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
channelName: null,
|
||||||
|
channelSign: null,
|
||||||
|
score: null,
|
||||||
|
htmlName: null,
|
||||||
|
htmlLocation: null,
|
||||||
|
ips: null,
|
||||||
|
period: null,
|
||||||
|
},
|
||||||
|
options: [], //推广页模板
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 上传html
|
||||||
|
handleAvatarSuccess (res, file) {
|
||||||
|
console.log(res.data.name, file);
|
||||||
|
// this.form.htmlLocation = URL.createObjectURL(file.raw);
|
||||||
|
this.$set(this.form, "htmlLocation", res.data.url);
|
||||||
|
},
|
||||||
|
//随机字符串
|
||||||
|
randomString (len, an) {
|
||||||
|
an = an && an.toLowerCase();
|
||||||
|
var str = "",
|
||||||
|
i = 0,
|
||||||
|
min = an == "a" ? 10 : 0,
|
||||||
|
max = an == "n" ? 10 : 62;
|
||||||
|
for (; i++ < len;) {
|
||||||
|
var r = (Math.random() * (max - min) + min) << 0;
|
||||||
|
str += String.fromCharCode((r += r > 9 ? (r < 36 ? 55 : 61) : 48));
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
},
|
||||||
|
// 关闭时间是否全选
|
||||||
|
handleCheckAllChange (val) {
|
||||||
|
this.form.period = val ? this.cityOptions : [];
|
||||||
|
this.isIndeterminate = false;
|
||||||
|
},
|
||||||
|
handleCheckedCitiesChange (value) {
|
||||||
|
let checkedCount = value.length;
|
||||||
|
this.checkAll = checkedCount === this.cityOptions.length;
|
||||||
|
this.isIndeterminate =
|
||||||
|
checkedCount > 0 && checkedCount < this.cityOptions.length;
|
||||||
|
},
|
||||||
|
/** 查询渠道配置列表 */
|
||||||
|
getList () {
|
||||||
|
this.loading = true;
|
||||||
|
listChannel(this.queryParams).then((response) => {
|
||||||
|
this.channelList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel () {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset () {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
channelName: null,
|
||||||
|
channelSign: null,
|
||||||
|
score: null,
|
||||||
|
htmlName: null,
|
||||||
|
htmlLocation: null,
|
||||||
|
ips: null,
|
||||||
|
period: [],
|
||||||
|
createTime: null,
|
||||||
|
updateTime: null,
|
||||||
|
remark: null,
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery () {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery () {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange (selection) {
|
||||||
|
this.ids = selection.map((item) => item.id);
|
||||||
|
this.single = selection.length !== 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd () {
|
||||||
|
this.reset();
|
||||||
|
this.form.channelSign = this.randomString(16);
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加渠道配置";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate (row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getChannel(id).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.form.period = this.form.period.split(",");
|
||||||
|
//全选时段状态
|
||||||
|
let checkedCount = this.form.period.length;
|
||||||
|
this.checkAll = checkedCount === this.cityOptions.length;
|
||||||
|
this.isIndeterminate =
|
||||||
|
checkedCount > 0 && checkedCount < this.cityOptions.length;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改渠道配置";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm () {
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
let params = { ...this.form };
|
||||||
|
if (params.period) {
|
||||||
|
params.period = params.period.join(",");
|
||||||
|
}
|
||||||
|
updateChannel(params).then((response) => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let params = { ...this.form };
|
||||||
|
if (params.period) {
|
||||||
|
params.period = params.period.join(",");
|
||||||
|
}
|
||||||
|
addChannel(params).then((response) => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete (row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal
|
||||||
|
.confirm('是否确认删除渠道配置编号为"' + ids + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
|
return delChannel(ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport () {
|
||||||
|
this.download(
|
||||||
|
"system/channel/export",
|
||||||
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`channel_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,482 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="68px">
|
||||||
|
<el-form-item label=""
|
||||||
|
prop="phone">
|
||||||
|
<el-input v-model="queryParams.phone"
|
||||||
|
placeholder="请输入手机号或者姓名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label=""
|
||||||
|
prop="name">
|
||||||
|
<el-select v-model="queryParams.merchantName"
|
||||||
|
placeholder="请选择机构公司(可输入)"
|
||||||
|
clearable
|
||||||
|
filterable>
|
||||||
|
<el-option v-for="item in MerchantList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.merchantName"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label=""
|
||||||
|
prop="acturlName">
|
||||||
|
<el-select v-model="queryParams.channelName"
|
||||||
|
placeholder="请选择渠道(可输入)"
|
||||||
|
clearable
|
||||||
|
filterable>
|
||||||
|
<el-option v-for="item in merchantChannelList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.channelName"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label=""
|
||||||
|
prop="time">
|
||||||
|
<el-date-picker v-model="queryParams.time"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label=""
|
||||||
|
prop="city">
|
||||||
|
<el-input v-model="queryParams.city"
|
||||||
|
placeholder="请输入筛选城市"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh"
|
||||||
|
size="mini"
|
||||||
|
@click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10"
|
||||||
|
class="mb8">
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:customer:add']"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['system:customer:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['system:customer:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<!-- <right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar> -->
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading"
|
||||||
|
:data="customerList"
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||||
|
<!-- <el-table-column label="${comment}" align="center" prop="id" /> -->
|
||||||
|
<el-table-column label="姓名"
|
||||||
|
align="center"
|
||||||
|
prop="acturlName" />
|
||||||
|
<el-table-column label="手机号"
|
||||||
|
align="center"
|
||||||
|
prop="phone" />
|
||||||
|
<el-table-column label="分配机构"
|
||||||
|
align="center"
|
||||||
|
prop="socialSecurity">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{findMerchant(scope.row.channelId)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="所属城市"
|
||||||
|
align="center"
|
||||||
|
prop="city" />
|
||||||
|
<el-table-column label="所属渠道"
|
||||||
|
align="center"
|
||||||
|
prop="channelId">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{findChannel(scope.row.channelId)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="推送时间"
|
||||||
|
align="center"
|
||||||
|
prop="updateTime"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="点击时间"
|
||||||
|
align="center"
|
||||||
|
prop="createTime"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleUpdate(scope.row)">详细资料</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList" />
|
||||||
|
|
||||||
|
<!-- 添加或修改客户信息对话框 -->
|
||||||
|
<el-dialog title="用户详细资料"
|
||||||
|
:visible.sync="open"
|
||||||
|
width="40%"
|
||||||
|
append-to-body>
|
||||||
|
<el-row :gutter="10"
|
||||||
|
style="padding: 20px 0; font-size: 14px">
|
||||||
|
<el-col :span="12"> 姓名:{{ form.acturlName }} </el-col>
|
||||||
|
<el-col :span="8"> 性别:{{ form.sex == 0 ? "男" : "女" }} </el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="10"
|
||||||
|
style="
|
||||||
|
background-color: #e6e8f3;
|
||||||
|
padding: 20px 0;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
"
|
||||||
|
type="flex"
|
||||||
|
justify="space-around">
|
||||||
|
<!-- <el-col :span="4">
|
||||||
|
<div>姓名</div>
|
||||||
|
<div style="margin-top: 15px">程先生</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div>性别</div>
|
||||||
|
<div style="margin-top: 15px">男</div>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="4">
|
||||||
|
<div>所属城市</div>
|
||||||
|
<div style="margin-top: 15px">{{ form.city }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div>年龄</div>
|
||||||
|
<div style="margin-top: 15px">{{ form.age }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div>职业</div>
|
||||||
|
<div style="margin-top: 15px">{{ form.career }}</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="10"
|
||||||
|
style="padding: 20px 0">
|
||||||
|
<h3>用户资质</h3>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="10"
|
||||||
|
style="
|
||||||
|
background-color: #e6e8f3;
|
||||||
|
padding: 20px 0;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
"
|
||||||
|
type="flex"
|
||||||
|
justify="space-around">
|
||||||
|
<el-col :span="4">
|
||||||
|
<div style="color: #9c9c9c">社保</div>
|
||||||
|
<div style="margin-top: 15px">
|
||||||
|
{{ shebao[this.form.socialSecurity] }}
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div style="color: #9c9c9c">公积金</div>
|
||||||
|
<div style="margin-top: 15px">
|
||||||
|
{{ shebao[this.form.accumulationFund] }}
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div style="color: #9c9c9c">房产情况</div>
|
||||||
|
<div style="margin-top: 15px">{{ fangchan[this.form.hourse] }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div style="color: #9c9c9c">车辆情况</div>
|
||||||
|
<div style="margin-top: 15px">{{ chechan[form.car] }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div style="color: #9c9c9c">学历</div>
|
||||||
|
<div style="margin-top: 15px">{{ xueli[form.education] }}</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="10"
|
||||||
|
style="
|
||||||
|
background-color: #e6e8f3;
|
||||||
|
padding: 20px 0;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
"
|
||||||
|
type="flex"
|
||||||
|
justify="space-around">
|
||||||
|
<el-col :span="4">
|
||||||
|
<div style="color: #9c9c9c">芝麻分</div>
|
||||||
|
<div style="margin-top: 15px">{{ form.zhiMa || 0}}分</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div style="color: #9c9c9c">保单</div>
|
||||||
|
<div style="margin-top: 15px">{{baodan[this.form.guaranteeSlip]}}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div style="color: #9c9c9c">月收入</div>
|
||||||
|
<div style="margin-top: 15px">{{this.form.income || 0}}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div style="color: #9c9c9c">京东白条可用额度</div>
|
||||||
|
<div style="margin-top: 15px">{{ edu[this.form.baiTiao] }}</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div style="color: #9c9c9c">蚂蚁花呗可用额度</div>
|
||||||
|
<div style="margin-top: 15px">{{ edu[this.form.huaBei] }}</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- <div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div> -->
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listCustomer,
|
||||||
|
getCustomer,
|
||||||
|
delCustomer,
|
||||||
|
addCustomer,
|
||||||
|
updateCustomer,
|
||||||
|
getAllMerchantList,
|
||||||
|
getMerchantChannelList
|
||||||
|
} from "@/api/system/customer";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Customer",
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
options: [
|
||||||
|
{ name: "是", code: 1 },
|
||||||
|
{ name: "否", code: 0 },
|
||||||
|
],
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 客户信息表格数据
|
||||||
|
customerList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
time: [],
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
shebao: ['未缴纳', "缴纳未满6个月", "缴纳6个月以上"],
|
||||||
|
chechan: ['无车产', '有车产'],
|
||||||
|
fangchan: ["本地无房", "本地全款房", "本地按揭房"],
|
||||||
|
baodan: ["无保单", '缴纳不足一年', "缴纳1年以上", "缴纳2年以上"],
|
||||||
|
zhiye: ["上班族", "公务员/事业单位", "私营业主", "个体户", "其他职业"],
|
||||||
|
xueli: ["初中及以下", "高中", "中专", "大专", "本科", "研究生及以上"],
|
||||||
|
zhimafen: ['无芝麻分', '600分以下', '600-650分', '650-700分', "700分以上"],
|
||||||
|
edu: ["5000以下", "5000-10000", "大于10000"],
|
||||||
|
MerchantList: [],
|
||||||
|
merchantChannelList: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.getMerchantList()
|
||||||
|
this.getMerchantChannel()
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
findChannel (id) {
|
||||||
|
let str = '-'
|
||||||
|
let index = this.merchantChannelList.findIndex(item => item.id == id)
|
||||||
|
if (index != -1) {
|
||||||
|
str = this.merchantChannelList[index].channelName
|
||||||
|
}
|
||||||
|
return str
|
||||||
|
},
|
||||||
|
findMerchant (id) {
|
||||||
|
let str = '-'
|
||||||
|
let index = this.MerchantList.findIndex(item => item.id == id)
|
||||||
|
if (index != -1) {
|
||||||
|
str = this.MerchantList[index].merchantName
|
||||||
|
}
|
||||||
|
return str
|
||||||
|
},
|
||||||
|
//获取渠道
|
||||||
|
getMerchantChannel () {
|
||||||
|
getMerchantChannelList().then(res => {
|
||||||
|
this.merchantChannelList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//获取机构 商户
|
||||||
|
getMerchantList () {
|
||||||
|
getAllMerchantList().then(res => {
|
||||||
|
this.MerchantList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList () {
|
||||||
|
this.loading = true;
|
||||||
|
listCustomer(this.queryParams).then((response) => {
|
||||||
|
this.customerList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel () {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset () {
|
||||||
|
this.form = {};
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery () {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery () {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange (selection) {
|
||||||
|
this.ids = selection.map((item) => item.id);
|
||||||
|
this.single = selection.length !== 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd () {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "用户详细资料";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate (row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getCustomer(id).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "用户详细资料";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm () {
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateCustomer(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCustomer(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete (row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal
|
||||||
|
.confirm('是否确认删除客户信息编号为"' + ids + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
|
return delCustomer(ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport () {
|
||||||
|
this.download(
|
||||||
|
"system/customer/export",
|
||||||
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`customer_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -39,9 +39,9 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :sm="24" :lg="12" style="padding-left: 20px">
|
<el-col :sm="24" :lg="12" style="padding-left: 20px">
|
||||||
<h2>租研舍后台管理框架</h2>
|
<h2>未信用秒租后台管理框架</h2>
|
||||||
<p>
|
<p>
|
||||||
一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了租研舍管理系统,她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
|
一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了未信用秒租管理系统,她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b>当前版本:</b> <span>v{{ version }}</span>
|
<b>当前版本:</b> <span>v{{ version }}</span>
|
||||||
|
|
@ -118,22 +118,28 @@
|
||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<i class="el-icon-user-solid"></i> QQ群: <s> 满42799195 </s> <s> 满170157040 </s>
|
<i class="el-icon-user-solid"></i> QQ群: <s> 满42799195 </s>
|
||||||
<s> 满130643120 </s> <s> 满225920371 </s> <s> 满201705537 </s> <s> 满236543183 </s>
|
<s> 满170157040 </s> <s> 满130643120 </s> <s> 满225920371 </s>
|
||||||
<s> 满213618602 </s> <s> 满148794840 </s> <s> 满118752664 </s> <s> 满101038945 </s>
|
<s> 满201705537 </s> <s> 满236543183 </s> <s> 满213618602 </s>
|
||||||
<s> 满128355254 </s> <s> 满179219821 </s> <a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Z6j1amUmIPBXamuZzxpwjY8GwaP45XB6&authKey=zfSnxECfnScfY1HLCWilSqCq%2BmSVtr%2Bi%2F4oXeBcuQVwlq6XlrAfbZ0awp3%2B4Bdec&noverify=0&group_code=158753145" target="_blank">158753145</a>
|
<s> 满148794840 </s> <s> 满118752664 </s> <s> 满101038945 </s>
|
||||||
|
<s> 满128355254 </s> <s> 满179219821 </s>
|
||||||
|
<a
|
||||||
|
href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Z6j1amUmIPBXamuZzxpwjY8GwaP45XB6&authKey=zfSnxECfnScfY1HLCWilSqCq%2BmSVtr%2Bi%2F4oXeBcuQVwlq6XlrAfbZ0awp3%2B4Bdec&noverify=0&group_code=158753145"
|
||||||
|
target="_blank"
|
||||||
|
>158753145</a
|
||||||
|
>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<i class="el-icon-chat-dot-round"></i> 微信:<a
|
<i class="el-icon-chat-dot-round"></i> 微信:<a
|
||||||
href="javascript:;"
|
href="javascript:;"
|
||||||
>/ *租研舍</a
|
>/ *未信用秒租</a
|
||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<i class="el-icon-money"></i> 支付宝:<a
|
<i class="el-icon-money"></i> 支付宝:<a
|
||||||
href="javascript:;"
|
href="javascript:;"
|
||||||
class="支付宝信息"
|
class="支付宝信息"
|
||||||
>/ *租研舍</a
|
>/ *未信用秒租</a
|
||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -173,7 +179,9 @@
|
||||||
<li>修复未登录带参数访问成功后参数丢失问题</li>
|
<li>修复未登录带参数访问成功后参数丢失问题</li>
|
||||||
<li>修复HeaderSearch组件跳转query参数丢失问题</li>
|
<li>修复HeaderSearch组件跳转query参数丢失问题</li>
|
||||||
<li>修复数据字典列表页重置后标签值无法输入问题</li>
|
<li>修复数据字典列表页重置后标签值无法输入问题</li>
|
||||||
<li>修复Excels导入时无法获取到readConverterExp内容转表达式问题</li>
|
<li>
|
||||||
|
修复Excels导入时无法获取到readConverterExp内容转表达式问题
|
||||||
|
</li>
|
||||||
<li>优化Xss注解匹配方式</li>
|
<li>优化Xss注解匹配方式</li>
|
||||||
<li>优化权限字符匹配方式</li>
|
<li>优化权限字符匹配方式</li>
|
||||||
<li>优化下载zip方法新增遮罩层</li>
|
<li>优化下载zip方法新增遮罩层</li>
|
||||||
|
|
@ -223,7 +231,9 @@
|
||||||
<li>优化DictTag组件value没有匹配的值时则展示value</li>
|
<li>优化DictTag组件value没有匹配的值时则展示value</li>
|
||||||
<li>优化去除@EnableCustomSwagger注解后会启动失败问题</li>
|
<li>优化去除@EnableCustomSwagger注解后会启动失败问题</li>
|
||||||
<li>优化upload接口在文件过大和文件名过长的情况返回提示信息</li>
|
<li>优化upload接口在文件过大和文件名过长的情况返回提示信息</li>
|
||||||
<li>优化异步保存日志发生报错不进RemoteLogFallbackFactory问题</li>
|
<li>
|
||||||
|
优化异步保存日志发生报错不进RemoteLogFallbackFactory问题
|
||||||
|
</li>
|
||||||
<li>其他细节优化</li>
|
<li>其他细节优化</li>
|
||||||
</ol>
|
</ol>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
|
|
@ -317,7 +327,9 @@
|
||||||
<li>Excel注解支持color字体颜色</li>
|
<li>Excel注解支持color字体颜色</li>
|
||||||
<li>用户头像上传限制只能为图片格式</li>
|
<li>用户头像上传限制只能为图片格式</li>
|
||||||
<li>检查定时任务bean所在包名是否为白名单配置</li>
|
<li>检查定时任务bean所在包名是否为白名单配置</li>
|
||||||
<li>字典类型必须以字母开头,且只能为(小写字母,数字,下滑线)</li>
|
<li>
|
||||||
|
字典类型必须以字母开头,且只能为(小写字母,数字,下滑线)
|
||||||
|
</li>
|
||||||
<li>升级spring-cloud-alibaba到最新版2021.0.1.0</li>
|
<li>升级spring-cloud-alibaba到最新版2021.0.1.0</li>
|
||||||
<li>升级spring-cloud到最新版2021.0.3</li>
|
<li>升级spring-cloud到最新版2021.0.3</li>
|
||||||
<li>升级spring-boot到最新版本2.7.1</li>
|
<li>升级spring-boot到最新版本2.7.1</li>
|
||||||
|
|
@ -502,7 +514,9 @@
|
||||||
<li>修复多图组件验证失败被删除问题</li>
|
<li>修复多图组件验证失败被删除问题</li>
|
||||||
<li>请求参数新增reasonable分页合理化属性</li>
|
<li>请求参数新增reasonable分页合理化属性</li>
|
||||||
<li>修复代码生成页面数据编辑保存之后总是跳转第一页的问题</li>
|
<li>修复代码生成页面数据编辑保存之后总是跳转第一页的问题</li>
|
||||||
<li>修复带safari浏览器无法格式化utc日期格式yyyy-MM-dd'T'HH:mm:ss.SSS问题</li>
|
<li>
|
||||||
|
修复带safari浏览器无法格式化utc日期格式yyyy-MM-dd'T'HH:mm:ss.SSS问题
|
||||||
|
</li>
|
||||||
<li>其他细节优化</li>
|
<li>其他细节优化</li>
|
||||||
</ol>
|
</ol>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
|
|
@ -563,7 +577,9 @@
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item title="v3.0.0 - 2021-06-10">
|
<el-collapse-item title="v3.0.0 - 2021-06-10">
|
||||||
<ol>
|
<ol>
|
||||||
<li>新增菜单导航显示风格TopNav(false为左侧导航菜单,true为顶部导航菜单)</li>
|
<li>
|
||||||
|
新增菜单导航显示风格TopNav(false为左侧导航菜单,true为顶部导航菜单)
|
||||||
|
</li>
|
||||||
<li>布局设置支持保存&重置配置</li>
|
<li>布局设置支持保存&重置配置</li>
|
||||||
<li>富文本编辑器支持自定义上传地址</li>
|
<li>富文本编辑器支持自定义上传地址</li>
|
||||||
<li>富文本编辑组件新增readOnly属性</li>
|
<li>富文本编辑组件新增readOnly属性</li>
|
||||||
|
|
@ -766,7 +782,9 @@
|
||||||
<li>网关白名单放入nacos配置&支持模糊匹配</li>
|
<li>网关白名单放入nacos配置&支持模糊匹配</li>
|
||||||
<li>修复富文本工具栏样式不对齐问题</li>
|
<li>修复富文本工具栏样式不对齐问题</li>
|
||||||
<li>Editor组件优化,支持自定义高度&图片冲突问题</li>
|
<li>Editor组件优化,支持自定义高度&图片冲突问题</li>
|
||||||
<li>修复富文本空格和缩进保存后不生效问题&删除重复的placeholder</li>
|
<li>
|
||||||
|
修复富文本空格和缩进保存后不生效问题&删除重复的placeholder
|
||||||
|
</li>
|
||||||
<li>限制系统内置参数不允许删除</li>
|
<li>限制系统内置参数不允许删除</li>
|
||||||
<li>修正调用目标字符串最大长度</li>
|
<li>修正调用目标字符串最大长度</li>
|
||||||
<li>修改自定义权限实现</li>
|
<li>修改自定义权限实现</li>
|
||||||
|
|
@ -820,7 +838,9 @@
|
||||||
<li>代码生成浮点型改用BigDecimal</li>
|
<li>代码生成浮点型改用BigDecimal</li>
|
||||||
<li>表单类型为Integer/Long设置整形默认值</li>
|
<li>表单类型为Integer/Long设置整形默认值</li>
|
||||||
<li>修改用户管理复选框宽度,防止部分浏览器出现省略号</li>
|
<li>修改用户管理复选框宽度,防止部分浏览器出现省略号</li>
|
||||||
<li>RedisCache中所有方法参数添加final,并优化list取出效率,添加其它常用redis方法</li>
|
<li>
|
||||||
|
RedisCache中所有方法参数添加final,并优化list取出效率,添加其它常用redis方法
|
||||||
|
</li>
|
||||||
<li>修正定时任务日志权限字符</li>
|
<li>修正定时任务日志权限字符</li>
|
||||||
<li>添加Jackson时区配置</li>
|
<li>添加Jackson时区配置</li>
|
||||||
<li>代码生成相关问题修复</li>
|
<li>代码生成相关问题修复</li>
|
||||||
|
|
@ -874,14 +894,16 @@
|
||||||
<li>支持一级菜单(和主页同级)在main区域显示</li>
|
<li>支持一级菜单(和主页同级)在main区域显示</li>
|
||||||
<li>限制外链地址必须以http(s)😕/开头</li>
|
<li>限制外链地址必须以http(s)😕/开头</li>
|
||||||
<li>tagview & sidebar 主题颜色与element ui(全局)同步</li>
|
<li>tagview & sidebar 主题颜色与element ui(全局)同步</li>
|
||||||
<li>修复dict_sort不可update为0的问题&查询返回增加dict_sort升序排序</li>
|
<li>
|
||||||
|
修复dict_sort不可update为0的问题&查询返回增加dict_sort升序排序
|
||||||
|
</li>
|
||||||
<li>权限部分代码调整</li>
|
<li>权限部分代码调整</li>
|
||||||
<li>其他细节优化</li>
|
<li>其他细节优化</li>
|
||||||
</ol>
|
</ol>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item title="v1.0.0 - 2020-05-20">
|
<el-collapse-item title="v1.0.0 - 2020-05-20">
|
||||||
<ol>
|
<ol>
|
||||||
<li>租研舍微服务系统正式发布</li>
|
<li>未信用秒租微服务系统正式发布</li>
|
||||||
</ol>
|
</ol>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
</el-collapse>
|
</el-collapse>
|
||||||
|
|
@ -893,11 +915,7 @@
|
||||||
<span>捐赠支持</span>
|
<span>捐赠支持</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<img
|
<img src="@/assets/images/pay.png" alt="donate" width="100%" />
|
||||||
src="@/assets/images/pay.png"
|
|
||||||
alt="donate"
|
|
||||||
width="100%"
|
|
||||||
/>
|
|
||||||
<span style="display: inline-block; height: 30px; line-height: 30px"
|
<span style="display: inline-block; height: 30px; line-height: 30px"
|
||||||
>你可以请作者喝杯咖啡表示鼓励</span
|
>你可以请作者喝杯咖啡表示鼓励</span
|
||||||
>
|
>
|
||||||
|
|
@ -988,4 +1006,3 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,297 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="用户id" prop="customerId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.customerId"
|
||||||
|
placeholder="请输入用户id"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商户ID" prop="merchantId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.merchantId"
|
||||||
|
placeholder="请输入商户ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="${comment}" prop="channelId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.channelId"
|
||||||
|
placeholder="请输入${comment}"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="成交金额 分" prop="price">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.price"
|
||||||
|
placeholder="请输入成交金额 分"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:log:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['system:log:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['system:log:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:log:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="${comment}" align="center" prop="id" />
|
||||||
|
<el-table-column label="用户id" align="center" prop="customerId" />
|
||||||
|
<el-table-column label="商户ID" align="center" prop="merchantId" />
|
||||||
|
<el-table-column label="${comment}" align="center" prop="channelId" />
|
||||||
|
<el-table-column label="订单状态 0 已申请 1 注册中 2风控中 3下单中 4 下单成功 5已成交 " align="center" prop="orderStatus" />
|
||||||
|
<el-table-column label="成交金额 分" align="center" prop="price" />
|
||||||
|
<el-table-column label="${comment}" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:log:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:log:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改客户申请记录对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="用户id" prop="customerId">
|
||||||
|
<el-input v-model="form.customerId" placeholder="请输入用户id" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商户ID" prop="merchantId">
|
||||||
|
<el-input v-model="form.merchantId" placeholder="请输入商户ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="${comment}" prop="channelId">
|
||||||
|
<el-input v-model="form.channelId" placeholder="请输入${comment}" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="成交金额 分" prop="price">
|
||||||
|
<el-input v-model="form.price" placeholder="请输入成交金额 分" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="${comment}" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入${comment}" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listLog, getLog, delLog, addLog, updateLog } from "@/api/system/log";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Log",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 客户申请记录表格数据
|
||||||
|
logList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
customerId: null,
|
||||||
|
merchantId: null,
|
||||||
|
channelId: null,
|
||||||
|
orderStatus: null,
|
||||||
|
price: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询客户申请记录列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listLog(this.queryParams).then(response => {
|
||||||
|
this.logList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
customerId: null,
|
||||||
|
merchantId: null,
|
||||||
|
channelId: null,
|
||||||
|
orderStatus: null,
|
||||||
|
price: null,
|
||||||
|
createTime: null,
|
||||||
|
updateTime: null,
|
||||||
|
remark: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加客户申请记录";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getLog(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改客户申请记录";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateLog(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addLog(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除客户申请记录编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delLog(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/log/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `log_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<el-form
|
||||||
<h3 class="title">租研舍后台管理系统</h3>
|
ref="loginForm"
|
||||||
|
:model="loginForm"
|
||||||
|
:rules="loginRules"
|
||||||
|
class="login-form"
|
||||||
|
>
|
||||||
|
<h3 class="title">未信用秒租后台管理系统</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.username"
|
v-model="loginForm.username"
|
||||||
|
|
@ -9,7 +14,11 @@
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="账号"
|
placeholder="账号"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="user"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
|
|
@ -20,7 +29,11 @@
|
||||||
placeholder="密码"
|
placeholder="密码"
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="password"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="code" v-if="captchaEnabled">
|
<el-form-item prop="code" v-if="captchaEnabled">
|
||||||
|
|
@ -31,26 +44,36 @@
|
||||||
style="width: 63%"
|
style="width: 63%"
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="validCode"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
<div class="login-code">
|
||||||
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
<img :src="codeUrl" @click="getCode" class="login-code-img" />
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
<el-checkbox
|
||||||
<el-form-item style="width:100%;">
|
v-model="loginForm.rememberMe"
|
||||||
|
style="margin: 0px 0px 25px 0px"
|
||||||
|
>记住密码</el-checkbox
|
||||||
|
>
|
||||||
|
<el-form-item style="width: 100%">
|
||||||
<el-button
|
<el-button
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="medium"
|
size="medium"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>
|
>
|
||||||
<span v-if="!loading">登 录</span>
|
<span v-if="!loading">登 录</span>
|
||||||
<span v-else>登 录 中...</span>
|
<span v-else>登 录 中...</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<div style="float: right;" v-if="register">
|
<div style="float: right" v-if="register">
|
||||||
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
<router-link class="link-type" :to="'/register'"
|
||||||
|
>立即注册</router-link
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -64,7 +87,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { getCodeImg } from "@/api/login";
|
import { getCodeImg } from "@/api/login";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
import { encrypt, decrypt } from "@/utils/jsencrypt";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: "Login",
|
||||||
|
|
@ -76,32 +99,32 @@ export default {
|
||||||
password: "admin123",
|
password: "admin123",
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
code: "",
|
code: "",
|
||||||
uuid: ""
|
uuid: "",
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [
|
username: [
|
||||||
{ required: true, trigger: "blur", message: "请输入您的账号" }
|
{ required: true, trigger: "blur", message: "请输入您的账号" },
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
{ required: true, trigger: "blur", message: "请输入您的密码" }
|
{ required: true, trigger: "blur", message: "请输入您的密码" },
|
||||||
],
|
],
|
||||||
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
code: [{ required: true, trigger: "change", message: "请输入验证码" }],
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
// 验证码开关
|
// 验证码开关
|
||||||
captchaEnabled: true,
|
captchaEnabled: true,
|
||||||
// 注册开关
|
// 注册开关
|
||||||
register: false,
|
register: false,
|
||||||
redirect: undefined
|
redirect: undefined,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route: {
|
$route: {
|
||||||
handler: function(route) {
|
handler: function (route) {
|
||||||
this.redirect = route.query && route.query.redirect;
|
this.redirect = route.query && route.query.redirect;
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCode();
|
this.getCode();
|
||||||
|
|
@ -109,8 +132,9 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCode() {
|
getCode() {
|
||||||
getCodeImg().then(res => {
|
getCodeImg().then((res) => {
|
||||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
this.captchaEnabled =
|
||||||
|
res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
||||||
if (this.captchaEnabled) {
|
if (this.captchaEnabled) {
|
||||||
this.codeUrl = "data:image/gif;base64," + res.img;
|
this.codeUrl = "data:image/gif;base64," + res.img;
|
||||||
this.loginForm.uuid = res.uuid;
|
this.loginForm.uuid = res.uuid;
|
||||||
|
|
@ -120,38 +144,47 @@ export default {
|
||||||
getCookie() {
|
getCookie() {
|
||||||
const username = Cookies.get("username");
|
const username = Cookies.get("username");
|
||||||
const password = Cookies.get("password");
|
const password = Cookies.get("password");
|
||||||
const rememberMe = Cookies.get('rememberMe')
|
const rememberMe = Cookies.get("rememberMe");
|
||||||
this.loginForm = {
|
this.loginForm = {
|
||||||
username: username === undefined ? this.loginForm.username : username,
|
username: username === undefined ? this.loginForm.username : username,
|
||||||
password: password === undefined ? this.loginForm.password : decrypt(password),
|
password:
|
||||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
password === undefined ? this.loginForm.password : decrypt(password),
|
||||||
|
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.$refs.loginForm.validate(valid => {
|
this.$refs.loginForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
if (this.loginForm.rememberMe) {
|
if (this.loginForm.rememberMe) {
|
||||||
Cookies.set("username", this.loginForm.username, { expires: 30 });
|
Cookies.set("username", this.loginForm.username, { expires: 30 });
|
||||||
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
|
Cookies.set("password", encrypt(this.loginForm.password), {
|
||||||
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
|
expires: 30,
|
||||||
|
});
|
||||||
|
Cookies.set("rememberMe", this.loginForm.rememberMe, {
|
||||||
|
expires: 30,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
Cookies.remove("username");
|
Cookies.remove("username");
|
||||||
Cookies.remove("password");
|
Cookies.remove("password");
|
||||||
Cookies.remove('rememberMe');
|
Cookies.remove("rememberMe");
|
||||||
}
|
}
|
||||||
this.$store.dispatch("Login", this.loginForm).then(() => {
|
this.$store
|
||||||
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
.dispatch("Login", this.loginForm)
|
||||||
}).catch(() => {
|
.then(() => {
|
||||||
this.loading = false;
|
// this.$router.push({ path: this.redirect || "/" }).catch(() => {});
|
||||||
if (this.captchaEnabled) {
|
this.$router.push({ path: "/system/user" }).catch(() => {});
|
||||||
this.getCode();
|
})
|
||||||
}
|
.catch(() => {
|
||||||
});
|
this.loading = false;
|
||||||
|
if (this.captchaEnabled) {
|
||||||
|
this.getCode();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,917 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="120px">
|
||||||
|
<el-form-item label="上下架"
|
||||||
|
prop="status">
|
||||||
|
<el-select v-model="queryParams.status"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="是否选择上下架">
|
||||||
|
<el-option v-for="item in options"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商户名称"
|
||||||
|
prop="merchantName">
|
||||||
|
<el-input v-model="queryParams.merchantName"
|
||||||
|
placeholder="请输入商户名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商户形式"
|
||||||
|
prop="merchantType">
|
||||||
|
<el-select v-model="queryParams.merchantType"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择">
|
||||||
|
<el-option v-for="item in typeoptions"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商户备注"
|
||||||
|
prop="remark">
|
||||||
|
<el-input v-model="queryParams.remark"
|
||||||
|
placeholder="请输入商户备注"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh"
|
||||||
|
size="mini"
|
||||||
|
@click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10"
|
||||||
|
class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate">修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-s-marketing"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete">批量上下架</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="info"
|
||||||
|
plain
|
||||||
|
icon="el-icon-set-up"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete">批量修改配置</el-button>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:merchant:export']"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</el-col> -->
|
||||||
|
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading"
|
||||||
|
:data="merchantList"
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection"
|
||||||
|
width="55"
|
||||||
|
align="center" />
|
||||||
|
<el-table-column label="ID"
|
||||||
|
align="center"
|
||||||
|
prop="id" />
|
||||||
|
<el-table-column label="商户名称"
|
||||||
|
align="center"
|
||||||
|
prop="merchantName" />
|
||||||
|
<el-table-column label="LOGO"
|
||||||
|
align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-image style="width: 100px; height: 100px"
|
||||||
|
:src="scope.row.logo"
|
||||||
|
fit="fill"></el-image>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商户链接(双击复制)"
|
||||||
|
align="center"
|
||||||
|
prop="merchantCompany">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<p @dblclick="copyText(scope.row.merchantCompany)">{{ scope.row.merchantCompany }}</p>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否上下架"
|
||||||
|
align="center"
|
||||||
|
prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag :type="scope.row.status == '1' ? 'success' : 'danger'"
|
||||||
|
disable-transitions>{{ scope.row.status == '1' ? '上架' : '下架'}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商户形式"
|
||||||
|
align="center"
|
||||||
|
prop="merchantType">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ typeoptions[scope.row.merchantType - 1].name}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="余额"
|
||||||
|
align="center"
|
||||||
|
prop="score" />
|
||||||
|
<el-table-column label="商户备注"
|
||||||
|
align="center"
|
||||||
|
prop="remark" />
|
||||||
|
<el-table-column label="商户唯一编号"
|
||||||
|
align="center"
|
||||||
|
prop="id" />
|
||||||
|
<el-table-column label="申请限制数"
|
||||||
|
align="center"
|
||||||
|
prop="applyLimit" />
|
||||||
|
<el-table-column label="修改时间"
|
||||||
|
align="center"
|
||||||
|
prop="updateTime">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="small"
|
||||||
|
type="danger">下架</el-button>
|
||||||
|
<el-button size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleUpdate(scope.row)">修改</el-button>
|
||||||
|
<el-button size="small"
|
||||||
|
type="warning">充值</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList" />
|
||||||
|
|
||||||
|
<!-- 添加或修改商户对话框 -->
|
||||||
|
<el-dialog :title="title"
|
||||||
|
:visible.sync="open"
|
||||||
|
width="70"
|
||||||
|
append-to-body>
|
||||||
|
<el-form ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="120px">
|
||||||
|
<el-form-item label="商户形式"
|
||||||
|
prop="merchantType">
|
||||||
|
<el-radio-group v-model="form.merchantType">
|
||||||
|
<el-radio :label="1">H5</el-radio>
|
||||||
|
<el-radio :label="2">联登</el-radio>
|
||||||
|
<el-radio :label="3">半流程</el-radio>
|
||||||
|
<el-radio :label="4">全流程</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商户名称"
|
||||||
|
prop="merchantName">
|
||||||
|
<el-input v-model="form.merchantName"
|
||||||
|
placeholder="请输入商户名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商户描述"
|
||||||
|
prop="merchantDescribe">
|
||||||
|
<el-input v-model="form.merchantDescribe"
|
||||||
|
placeholder="请输入商户描述" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="日利率"
|
||||||
|
prop="merchantCompany">
|
||||||
|
<el-input v-model="form.merchantCompany"
|
||||||
|
type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="标签"
|
||||||
|
prop="label">
|
||||||
|
<el-input v-model="form.label"
|
||||||
|
maxlength="8"
|
||||||
|
show-word-limit />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="机构主体"
|
||||||
|
prop="limitNum">
|
||||||
|
<el-input v-model="form.limitNum"
|
||||||
|
maxlength="50"
|
||||||
|
show-word-limit />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="关联商户"
|
||||||
|
prop="merchantName">
|
||||||
|
<el-select v-model="form.merchantName"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="是否选择关联商户">
|
||||||
|
<el-option v-for="item in MerchantList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.merchantName"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商户LOGO"
|
||||||
|
prop="logo">
|
||||||
|
<el-upload :action="action"
|
||||||
|
:headers="uploadHeader"
|
||||||
|
class="avatar-uploader"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess"
|
||||||
|
:before-upload="beforeAvatarUpload">
|
||||||
|
<img v-if="form.logo"
|
||||||
|
:src="form.logo"
|
||||||
|
class="avatar" />
|
||||||
|
<i v-else
|
||||||
|
class="el-icon-plus avatar-uploader-icon"></i>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="上下架"
|
||||||
|
prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio :label="0">上架</el-radio>
|
||||||
|
<el-radio :label="1">下架</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="是否开启余额监控"
|
||||||
|
prop="isBalanceMonitoring"
|
||||||
|
label-width="160px">
|
||||||
|
<el-radio-group v-model="form.isBalanceMonitoring">
|
||||||
|
<el-radio :label="1">开启</el-radio>
|
||||||
|
<el-radio :label="2">不开启</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="注册页地址"
|
||||||
|
prop="registUrl">
|
||||||
|
<el-input v-model="form.registUrl" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="撞库URL"
|
||||||
|
prop="hitUrl">
|
||||||
|
<el-input v-model="form.hitUrl" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<div class="title">
|
||||||
|
<span>商户展示配置</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-form-item label="是否开启定量"
|
||||||
|
prop="limitType"
|
||||||
|
label-width="160px">
|
||||||
|
<el-radio-group v-model="form.limitType">
|
||||||
|
<el-radio :label="1">开启</el-radio>
|
||||||
|
<el-radio :label="2">关闭</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<el-input style="margin-top: 20px"
|
||||||
|
v-if="form.limitType == 1"
|
||||||
|
v-model="form.balanceMonitoring"
|
||||||
|
placeholder="请输入定量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="执行时段"
|
||||||
|
prop="period">
|
||||||
|
<!-- <el-input v-model="form.period" placeholder="请输入开启关闭时段" /> -->
|
||||||
|
<el-checkbox :indeterminate="isIndeterminate"
|
||||||
|
@change="handleCheckAllChange"
|
||||||
|
v-model="checkAll">全选时段</el-checkbox>
|
||||||
|
<div style="margin: 15px 0"></div>
|
||||||
|
<el-checkbox-group v-model="form.period"
|
||||||
|
@change="handleCheckedCitiesChange">
|
||||||
|
<el-checkbox v-for="city in cityOptions"
|
||||||
|
:label="city"
|
||||||
|
:key="city">{{ city }}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="渠道限定"
|
||||||
|
prop="channelLimitType">
|
||||||
|
<el-radio-group v-model="form.channelLimitType">
|
||||||
|
<el-radio :label="0">不限制</el-radio>
|
||||||
|
<el-radio :label="1">准入渠道</el-radio>
|
||||||
|
<el-radio :label="2">禁入渠道</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<el-select v-model="form.channelLimit"
|
||||||
|
placeholder="请选择渠道"
|
||||||
|
clearable
|
||||||
|
multiple
|
||||||
|
style="width:100%;margin-top:20px"
|
||||||
|
v-if="form.channelLimitType == 1 || form.channelLimitType == 2"
|
||||||
|
filterable>
|
||||||
|
<el-option v-for="item in merchantChannelList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.channelName"
|
||||||
|
:value="item.id + ''"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<div class="title"
|
||||||
|
style="margin-top: 20px">
|
||||||
|
<span>前筛配置</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-form-item label="年龄限制">
|
||||||
|
<el-input v-model="form.ageLimitStart"
|
||||||
|
style="width: 200px" />
|
||||||
|
-
|
||||||
|
<el-input v-model="form.ageLimitEnd"
|
||||||
|
style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="禁用手机号段(前三位)"
|
||||||
|
prop="phoneLimit"
|
||||||
|
label-width="120px">
|
||||||
|
<el-input v-model="form.phoneLimit"
|
||||||
|
type="textarea"
|
||||||
|
:rows="2"
|
||||||
|
placeholder="请输入手机号段,多个号段以因为逗号隔开" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="空值是否通过"
|
||||||
|
prop="ispass">
|
||||||
|
<el-radio-group v-model="form.ispass">
|
||||||
|
<el-radio :label="1">通过</el-radio>
|
||||||
|
<el-radio :label="0">不通过</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="资质条件筛选"
|
||||||
|
prop="customerInfoFilterType">
|
||||||
|
<el-radio-group v-model="form.customerInfoFilterType">
|
||||||
|
<el-radio :label="1">满足其一</el-radio>
|
||||||
|
<el-radio :label="2">满足全部条件</el-radio>
|
||||||
|
<el-radio :label="0">不筛选</el-radio></el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="社保">
|
||||||
|
<!-- <el-checkbox-group v-model="form.socialSecurity"
|
||||||
|
size="small">
|
||||||
|
<el-checkbox border
|
||||||
|
v-for="city in shebao"
|
||||||
|
:label="city"
|
||||||
|
:key="city"
|
||||||
|
style="margin-right:10px">{{city}}</el-checkbox>
|
||||||
|
</el-checkbox-group> -->
|
||||||
|
<el-button @click="btnchanges('socialSecurityNo')"
|
||||||
|
:type="form.socialSecurityNo == 1 ?'primary':''">无社保</el-button>
|
||||||
|
<el-button @click="btnchanges('socialSecurityLow')"
|
||||||
|
:type="form.socialSecurityLow == 1 ?'primary':''">社保未满6个月</el-button>
|
||||||
|
<el-button @click="btnchanges('socialSecurityHigh')"
|
||||||
|
:type="form.socialSecurityHigh == 1 ?'primary':''">社保6个月以上</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="公积金">
|
||||||
|
<!-- <el-checkbox-group v-model="form.accumulationFund"
|
||||||
|
size="small">
|
||||||
|
<el-checkbox border
|
||||||
|
v-for="city in shebao"
|
||||||
|
:label="city"
|
||||||
|
:key="city"
|
||||||
|
style="margin-right:10px">{{city}}</el-checkbox>
|
||||||
|
</el-checkbox-group> -->
|
||||||
|
<el-button @click="btnchanges('accumulationFundLow')"
|
||||||
|
:type="form.accumulationFundLow == 1 ?'primary':''">公积金未满6个月</el-button>
|
||||||
|
<el-button @click="btnchanges('accumulationFundHigh')"
|
||||||
|
:type="form.accumulationFundHigh == 1 ?'primary':''">公积金满6个月以上</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车产">
|
||||||
|
<!-- <el-checkbox-group v-model="form.car"
|
||||||
|
size="small">
|
||||||
|
<el-checkbox border
|
||||||
|
v-for="city in chechan"
|
||||||
|
:label="city"
|
||||||
|
:key="city"
|
||||||
|
style="margin-right:10px">{{city}}</el-checkbox>
|
||||||
|
</el-checkbox-group> -->
|
||||||
|
<el-button @click="btnchanges('carNo')"
|
||||||
|
:type="form.carNo == 1 ?'primary':''">无车</el-button>
|
||||||
|
<el-button @click="btnchanges('carHave')"
|
||||||
|
:type="form.carHave == 1 ?'primary':''">有车</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="房产">
|
||||||
|
<!-- <el-checkbox-group v-model="form.house"
|
||||||
|
size="small">
|
||||||
|
<el-checkbox border
|
||||||
|
v-for="city in fangchan"
|
||||||
|
:label="city"
|
||||||
|
:key="city"
|
||||||
|
style="margin-right:10px">{{city}}</el-checkbox>
|
||||||
|
</el-checkbox-group> -->
|
||||||
|
<el-button @click="btnchanges('hourseNo')"
|
||||||
|
:type="form.hourseNo == 1 ?'primary':''">本地无房</el-button>
|
||||||
|
<el-button @click="btnchanges('hourseFullPayment')"
|
||||||
|
:type="form.hourseFullPayment == 1 ?'primary':''">本地全款房</el-button>
|
||||||
|
<el-button @click="btnchanges('hourseMortgaging')"
|
||||||
|
:type="form.hourseMortgaging == 1 ?'primary':''">本地按揭</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="保单">
|
||||||
|
<!-- <el-checkbox-group v-model="form.guaranteeSlip"
|
||||||
|
size="small">
|
||||||
|
<el-checkbox border
|
||||||
|
v-for="city in baodan"
|
||||||
|
:label="city"
|
||||||
|
:key="city"
|
||||||
|
style="margin-right:10px">{{city}}</el-checkbox>
|
||||||
|
</el-checkbox-group> -->
|
||||||
|
<el-button @click="btnchanges('guaranteeSlipLow')"
|
||||||
|
:type="form.guaranteeSlipLow == 1 ?'primary':''">保单缴纳不满一年</el-button>
|
||||||
|
<el-button @click="btnchanges('guaranteeSlipCentre')"
|
||||||
|
:type="form.guaranteeSlipCentre == 1 ?'primary':''">保单缴纳一年以上</el-button>
|
||||||
|
<el-button @click="btnchanges('guaranteeSlipHigh')"
|
||||||
|
:type="form.guaranteeSlipHigh == 1 ?'primary':''">保单缴纳2年以上</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="职业">
|
||||||
|
<!-- <el-checkbox-group v-model="form.worker"
|
||||||
|
size="small">
|
||||||
|
<el-checkbox border
|
||||||
|
v-for="city in zhiye"
|
||||||
|
:label="city"
|
||||||
|
:key="city"
|
||||||
|
style="margin-right:10px">{{city}}</el-checkbox>
|
||||||
|
</el-checkbox-group> -->
|
||||||
|
<el-button @click="btnchanges('officeWorker')"
|
||||||
|
:type="form.officeWorker == 1 ?'primary':''">上班族</el-button>
|
||||||
|
<el-button @click="btnchanges('civilServant')"
|
||||||
|
:type="form.civilServant == 1 ?'primary':''">公务员</el-button>
|
||||||
|
<el-button @click="btnchanges('privatePropertyOwners')"
|
||||||
|
:type="form.privatePropertyOwners == 1 ?'primary':''">私营业主</el-button>
|
||||||
|
<el-button @click="btnchanges('selfEmployedPerson')"
|
||||||
|
:type="form.selfEmployedPerson == 1 ?'primary':''">个体户</el-button>
|
||||||
|
<el-button @click="btnchanges('otherOccupations')"
|
||||||
|
:type="form.otherOccupations == 1 ?'primary':''">其他职业</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="学历"
|
||||||
|
prop="education">
|
||||||
|
<el-checkbox-group v-model="form.education"
|
||||||
|
size="small">
|
||||||
|
<el-checkbox border
|
||||||
|
v-for="city in xueli"
|
||||||
|
:label="city"
|
||||||
|
:key="city"
|
||||||
|
style="margin-right:10px">{{city}}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="白条可用额度">
|
||||||
|
<!-- <el-checkbox-group v-model="form.baiTiao"
|
||||||
|
size="small">
|
||||||
|
<el-checkbox border
|
||||||
|
v-for="city in edu"
|
||||||
|
:label="city"
|
||||||
|
:key="city"
|
||||||
|
style="margin-right:10px">{{city}}</el-checkbox>
|
||||||
|
</el-checkbox-group> -->
|
||||||
|
<el-button @click="btnchanges('baiTiaoLow')"
|
||||||
|
:type="form.baiTiaoLow == 1 ?'primary':''">5000以下</el-button>
|
||||||
|
<el-button @click="btnchanges('baiTiaoMiddle')"
|
||||||
|
:type="form.baiTiaoMiddle == 1 ?'primary':''">5000-10000</el-button>
|
||||||
|
<el-button @click="btnchanges('baiTiaoHigh')"
|
||||||
|
:type="form.baiTiaoHigh == 1 ?'primary':''">10000以上</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="花呗可用额度">
|
||||||
|
<!-- <el-checkbox-group v-model="form.huaBei"
|
||||||
|
size="small">
|
||||||
|
<el-checkbox border
|
||||||
|
v-for="city in edu"
|
||||||
|
:label="city"
|
||||||
|
:key="city"
|
||||||
|
style="margin-right:10px">{{city}}</el-checkbox>
|
||||||
|
</el-checkbox-group> -->
|
||||||
|
<el-button @click="btnchanges('huaBeiLow')"
|
||||||
|
:type="form.huaBeiLow == 1 ?'primary':''">5000以下</el-button>
|
||||||
|
<el-button @click="btnchanges('huaBeiMiddle')"
|
||||||
|
:type="form.huaBeiMiddle == 1 ?'primary':''">5000-10000</el-button>
|
||||||
|
<el-button @click="btnchanges('huaBeiHigh')"
|
||||||
|
:type="form.huaBeiHigh == 1 ?'primary':''">10000以上</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="芝麻分>="
|
||||||
|
prop="zhiMa">
|
||||||
|
<el-input v-model="form.zhiMa"
|
||||||
|
placeholder=""
|
||||||
|
style="width:200px" />
|
||||||
|
分
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer"
|
||||||
|
class="dialog-footer">
|
||||||
|
<el-button type="primary"
|
||||||
|
@click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listMerchant,
|
||||||
|
getMerchant,
|
||||||
|
delMerchant,
|
||||||
|
addMerchant,
|
||||||
|
updateMerchant,
|
||||||
|
getAllMerchantList
|
||||||
|
} from "@/api/system/merchant";
|
||||||
|
import {
|
||||||
|
getMerchantChannelList
|
||||||
|
} from "@/api/system/customer";
|
||||||
|
import { getToken } from '@/utils/auth'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Merchant",
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
// action:process.env.NODE_ENV === "production" ? "/file/upload" : "/dev-api/file/upload",
|
||||||
|
action: "/dev-api/file/upload",
|
||||||
|
uploadHeader: { 'Authorization': getToken() },
|
||||||
|
// shebao: ['缴纳未满6个月', '缴纳6个月以上'],
|
||||||
|
// chechan: ['有车'],
|
||||||
|
// fangchan: ['有按揭房', '有全款房'],
|
||||||
|
// baodan: ['缴纳不足1年', '缴纳1年以上', '缴纳2年以上'],
|
||||||
|
// zhiye: ['上班族', '公务员/事业耽误', '私营业主', '个体户', '其他职业'],
|
||||||
|
// xueli: ['初中及以下', '高中', '中专', '大专', '本科', '研究生及以上'],
|
||||||
|
// edu: ['5000以下', '5000-10000', '大于10000'],
|
||||||
|
//关闭时间是否全选
|
||||||
|
checkAll: false,
|
||||||
|
checkedCities: [],
|
||||||
|
cityOptions: [
|
||||||
|
"1",
|
||||||
|
"2",
|
||||||
|
"3",
|
||||||
|
"4",
|
||||||
|
"5",
|
||||||
|
"6",
|
||||||
|
"7",
|
||||||
|
"8",
|
||||||
|
"9",
|
||||||
|
"10",
|
||||||
|
"11",
|
||||||
|
"12",
|
||||||
|
"13",
|
||||||
|
"14",
|
||||||
|
"15",
|
||||||
|
"16",
|
||||||
|
"17",
|
||||||
|
"18",
|
||||||
|
"19",
|
||||||
|
"20",
|
||||||
|
"21",
|
||||||
|
"22",
|
||||||
|
"23",
|
||||||
|
],
|
||||||
|
MerchantList: [],
|
||||||
|
typeoptions: [
|
||||||
|
{ name: 'H5', code: '1' },
|
||||||
|
{ name: '联登', code: '2' },
|
||||||
|
{ name: '半流程', code: '3' },
|
||||||
|
{ name: '全流程', code: '4' },
|
||||||
|
],
|
||||||
|
isIndeterminate: false,
|
||||||
|
options: [
|
||||||
|
{ name: "否", code: 0 },
|
||||||
|
{ name: "是", code: 1 },
|
||||||
|
],
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 商户表格数据
|
||||||
|
merchantList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: { period: [] },
|
||||||
|
merchantChannelList: [],
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
merchantType: [
|
||||||
|
{ required: true, message: "请选择商户形式", trigger: "change" },
|
||||||
|
],
|
||||||
|
merchantName: [
|
||||||
|
{ required: true, message: "请输入商户名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
merchantCompany: [
|
||||||
|
{ required: true, message: "请输入日利率", trigger: "blur" },
|
||||||
|
],
|
||||||
|
limitNum: [{ required: true, message: "机构主体不能为空", trigger: "blur" }],
|
||||||
|
// logo: [{ required: true, message: "logo不能为空", trigger: "blur" }],
|
||||||
|
status: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择上下架",
|
||||||
|
trigger: "change",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
registUrl: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "注册页地址不能为空",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
hitUrl: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "撞库URL不能为空",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
period: [
|
||||||
|
{ required: true, message: "请选择执行时段", trigger: "change" },
|
||||||
|
],
|
||||||
|
channelLimitType: [
|
||||||
|
{ required: true, message: "请选择渠道限定", trigger: "change" },
|
||||||
|
],
|
||||||
|
ispass: [
|
||||||
|
{ required: true, message: "请选择空值是否通过", trigger: "change" },
|
||||||
|
]
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.getMerchantList()
|
||||||
|
this.getMerchantChannel()
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//获取渠道
|
||||||
|
getMerchantChannel () {
|
||||||
|
getMerchantChannelList().then(res => {
|
||||||
|
this.merchantChannelList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
btnchanges (key) {
|
||||||
|
if (this.form[key] == 1) {
|
||||||
|
this.form[key] = 0
|
||||||
|
} else {
|
||||||
|
this.form[key] = 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// MerchantList
|
||||||
|
getMerchantList () {
|
||||||
|
getAllMerchantList().then(res => {
|
||||||
|
this.MerchantList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async copyText (text) {
|
||||||
|
try {
|
||||||
|
// 阻止默认的双击选中文本行为
|
||||||
|
event.preventDefault();
|
||||||
|
// 使用Clipboard API复制文本到剪贴板
|
||||||
|
await navigator.clipboard.writeText(text);
|
||||||
|
// 可以在这里提示用户复制成功
|
||||||
|
this.$modal.msgSuccess("文本已复制到剪贴板");
|
||||||
|
} catch (error) {
|
||||||
|
// 处理错误情况,例如用户拒绝剪贴板权限
|
||||||
|
console.error('复制失败', error);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 时间是否全选
|
||||||
|
handleCheckAllChange (val) {
|
||||||
|
this.form.period = val ? this.cityOptions : [];
|
||||||
|
this.isIndeterminate = false;
|
||||||
|
},
|
||||||
|
handleCheckedCitiesChange (value) {
|
||||||
|
let checkedCount = value.length;
|
||||||
|
this.checkAll = checkedCount === this.cityOptions.length;
|
||||||
|
this.isIndeterminate =
|
||||||
|
checkedCount > 0 && checkedCount < this.cityOptions.length;
|
||||||
|
},
|
||||||
|
// 上传图片
|
||||||
|
handleAvatarSuccess (res, file) {
|
||||||
|
console.log(res.data.name, file);
|
||||||
|
// this.form.htmlLocation = URL.createObjectURL(file.raw);
|
||||||
|
this.$set(this.form, "logo", res.data.url);
|
||||||
|
},
|
||||||
|
beforeAvatarUpload (file) {
|
||||||
|
const isJPG = file.type === "image/jpeg";
|
||||||
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
|
|
||||||
|
if (!isJPG) {
|
||||||
|
this.$message.error("上传头像图片只能是 JPG 格式!");
|
||||||
|
}
|
||||||
|
if (!isLt2M) {
|
||||||
|
this.$message.error("上传头像图片大小不能超过 2MB!");
|
||||||
|
}
|
||||||
|
return isJPG && isLt2M;
|
||||||
|
},
|
||||||
|
/** 查询商户列表 */
|
||||||
|
getList () {
|
||||||
|
// this.loading = true;
|
||||||
|
listMerchant(this.queryParams).then((response) => {
|
||||||
|
this.merchantList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel () {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset () {
|
||||||
|
this.form = {
|
||||||
|
period: [],
|
||||||
|
id: null,
|
||||||
|
logo: "",
|
||||||
|
socialSecurityNo: 0,
|
||||||
|
socialSecurityLow: 0,
|
||||||
|
socialSecurityHight: 0,
|
||||||
|
accumulationFundLow: 0,
|
||||||
|
accumulationFundHight: 0,
|
||||||
|
carNo: 0,
|
||||||
|
carHave: 0,
|
||||||
|
hourseNo: 0,
|
||||||
|
hourseFullPayment: 0,
|
||||||
|
hourseMortgaging: 0,
|
||||||
|
guaranteeSlipLow: 0,
|
||||||
|
guaranteeSlipCentre: 0,
|
||||||
|
guaranteeSlipHigt: 0,
|
||||||
|
officeWorker: 0,
|
||||||
|
civilServant: 0,
|
||||||
|
privatePropertyOwners: 0,
|
||||||
|
selfEmployedPerson: 0,
|
||||||
|
otherOccupations: 0,
|
||||||
|
baiTiaoLow: 0,
|
||||||
|
baiTiaoMiddle: 0,
|
||||||
|
baiTiaoHigh: 0,
|
||||||
|
huaBeiLow: 0,
|
||||||
|
huaBeiMiddle: 0,
|
||||||
|
huaBeiHigh: 0,
|
||||||
|
zhiMa: null,
|
||||||
|
channelLimit: []
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery () {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery () {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange (selection) {
|
||||||
|
this.ids = selection.map((item) => item.id);
|
||||||
|
this.single = selection.length !== 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd () {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加商户";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate (row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getMerchant(id).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.form.period = this.form.period ? this.form.period.split(",") : [];
|
||||||
|
this.form.channelLimit = this.form.channelLimit ? this.form.channelLimit.split(",") : [];
|
||||||
|
let checkedCount = this.form.period.length;
|
||||||
|
this.checkAll = checkedCount === this.cityOptions.length;
|
||||||
|
this.isIndeterminate =
|
||||||
|
checkedCount > 0 && checkedCount < this.cityOptions.length;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改商户";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm () {
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
let params = { ...this.form };
|
||||||
|
if (params.period) {
|
||||||
|
params.period = params.period.join(",");
|
||||||
|
}
|
||||||
|
if (params.channelLimit) {
|
||||||
|
params.channelLimit = params.channelLimit.join(",");
|
||||||
|
}
|
||||||
|
updateMerchant(params).then((response) => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let params = { ...this.form };
|
||||||
|
if (params.period) {
|
||||||
|
params.period = params.period.join(",");
|
||||||
|
}
|
||||||
|
if (params.channelLimit) {
|
||||||
|
params.channelLimit = params.channelLimit.join(",");
|
||||||
|
}
|
||||||
|
addMerchant(params).then((response) => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete (row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal
|
||||||
|
.confirm('是否确认删除商户编号为"' + ids + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
|
return delMerchant(ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport () {
|
||||||
|
this.download(
|
||||||
|
"system/merchant/export",
|
||||||
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`merchant_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.avatar-uploader .el-upload {
|
||||||
|
border: 1px dashed #d9d9d9;
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.avatar-uploader .el-upload:hover {
|
||||||
|
border-color: #409eff;
|
||||||
|
}
|
||||||
|
.avatar-uploader-icon {
|
||||||
|
font-size: 28px;
|
||||||
|
color: #8c939d;
|
||||||
|
width: 178px;
|
||||||
|
height: 178px;
|
||||||
|
line-height: 178px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.avatar {
|
||||||
|
width: 178px;
|
||||||
|
height: 178px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
width: 100%;
|
||||||
|
background: #d7d7d7;
|
||||||
|
margin: 20px 0;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 700;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,10 +1,24 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="register">
|
<div class="register">
|
||||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
<el-form
|
||||||
<h3 class="title">租研舍后台管理系统</h3>
|
ref="registerForm"
|
||||||
|
:model="registerForm"
|
||||||
|
:rules="registerRules"
|
||||||
|
class="register-form"
|
||||||
|
>
|
||||||
|
<h3 class="title">未信用秒租后台管理系统</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
<el-input
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
v-model="registerForm.username"
|
||||||
|
type="text"
|
||||||
|
auto-complete="off"
|
||||||
|
placeholder="账号"
|
||||||
|
>
|
||||||
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="user"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
|
|
@ -15,7 +29,11 @@
|
||||||
placeholder="密码"
|
placeholder="密码"
|
||||||
@keyup.enter.native="handleRegister"
|
@keyup.enter.native="handleRegister"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="password"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="confirmPassword">
|
<el-form-item prop="confirmPassword">
|
||||||
|
|
@ -26,7 +44,11 @@
|
||||||
placeholder="确认密码"
|
placeholder="确认密码"
|
||||||
@keyup.enter.native="handleRegister"
|
@keyup.enter.native="handleRegister"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="password"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="code" v-if="captchaEnabled">
|
<el-form-item prop="code" v-if="captchaEnabled">
|
||||||
|
|
@ -37,25 +59,31 @@
|
||||||
style="width: 63%"
|
style="width: 63%"
|
||||||
@keyup.enter.native="handleRegister"
|
@keyup.enter.native="handleRegister"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<svg-icon
|
||||||
|
slot="prefix"
|
||||||
|
icon-class="validCode"
|
||||||
|
class="el-input__icon input-icon"
|
||||||
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="register-code">
|
<div class="register-code">
|
||||||
<img :src="codeUrl" @click="getCode" class="register-code-img"/>
|
<img :src="codeUrl" @click="getCode" class="register-code-img" />
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width:100%;">
|
<el-form-item style="width: 100%">
|
||||||
<el-button
|
<el-button
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="medium"
|
size="medium"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
@click.native.prevent="handleRegister"
|
@click.native.prevent="handleRegister"
|
||||||
>
|
>
|
||||||
<span v-if="!loading">注 册</span>
|
<span v-if="!loading">注 册</span>
|
||||||
<span v-else>注 册 中...</span>
|
<span v-else>注 册 中...</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<div style="float: right;">
|
<div style="float: right">
|
||||||
<router-link class="link-type" :to="'/login'">使用已有账户登录</router-link>
|
<router-link class="link-type" :to="'/login'"
|
||||||
|
>使用已有账户登录</router-link
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -86,26 +114,40 @@ export default {
|
||||||
password: "",
|
password: "",
|
||||||
confirmPassword: "",
|
confirmPassword: "",
|
||||||
code: "",
|
code: "",
|
||||||
uuid: ""
|
uuid: "",
|
||||||
},
|
},
|
||||||
registerRules: {
|
registerRules: {
|
||||||
username: [
|
username: [
|
||||||
{ required: true, trigger: "blur", message: "请输入您的账号" },
|
{ required: true, trigger: "blur", message: "请输入您的账号" },
|
||||||
{ min: 2, max: 20, message: '用户账号长度必须介于 2 和 20 之间', trigger: 'blur' }
|
{
|
||||||
|
min: 2,
|
||||||
|
max: 20,
|
||||||
|
message: "用户账号长度必须介于 2 和 20 之间",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
{ required: true, trigger: "blur", message: "请输入您的密码" },
|
{ required: true, trigger: "blur", message: "请输入您的密码" },
|
||||||
{ min: 5, max: 20, message: "用户密码长度必须介于 5 和 20 之间", trigger: "blur" },
|
{
|
||||||
{ pattern: /^[^<>"'|\\]+$/, message: "不能包含非法字符:< > \" ' \\\ |", trigger: "blur" }
|
min: 5,
|
||||||
|
max: 20,
|
||||||
|
message: "用户密码长度必须介于 5 和 20 之间",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: /^[^<>"'|\\]+$/,
|
||||||
|
message: "不能包含非法字符:< > \" ' \\\ |",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
confirmPassword: [
|
confirmPassword: [
|
||||||
{ required: true, trigger: "blur", message: "请再次输入您的密码" },
|
{ required: true, trigger: "blur", message: "请再次输入您的密码" },
|
||||||
{ required: true, validator: equalToPassword, trigger: "blur" }
|
{ required: true, validator: equalToPassword, trigger: "blur" },
|
||||||
],
|
],
|
||||||
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
code: [{ required: true, trigger: "change", message: "请输入验证码" }],
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
captchaEnabled: true
|
captchaEnabled: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -113,8 +155,9 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCode() {
|
getCode() {
|
||||||
getCodeImg().then(res => {
|
getCodeImg().then((res) => {
|
||||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
this.captchaEnabled =
|
||||||
|
res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
||||||
if (this.captchaEnabled) {
|
if (this.captchaEnabled) {
|
||||||
this.codeUrl = "data:image/gif;base64," + res.img;
|
this.codeUrl = "data:image/gif;base64," + res.img;
|
||||||
this.registerForm.uuid = res.uuid;
|
this.registerForm.uuid = res.uuid;
|
||||||
|
|
@ -122,27 +165,37 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleRegister() {
|
handleRegister() {
|
||||||
this.$refs.registerForm.validate(valid => {
|
this.$refs.registerForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
register(this.registerForm).then(res => {
|
register(this.registerForm)
|
||||||
const username = this.registerForm.username;
|
.then((res) => {
|
||||||
this.$alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", '系统提示', {
|
const username = this.registerForm.username;
|
||||||
dangerouslyUseHTMLString: true,
|
this.$alert(
|
||||||
type: 'success'
|
"<font color='red'>恭喜你,您的账号 " +
|
||||||
}).then(() => {
|
username +
|
||||||
this.$router.push("/login");
|
" 注册成功!</font>",
|
||||||
}).catch(() => {});
|
"系统提示",
|
||||||
}).catch(() => {
|
{
|
||||||
this.loading = false;
|
dangerouslyUseHTMLString: true,
|
||||||
if (this.captchaEnabled) {
|
type: "success",
|
||||||
this.getCode();
|
}
|
||||||
}
|
)
|
||||||
})
|
.then(() => {
|
||||||
|
this.$router.push("/login");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
if (this.captchaEnabled) {
|
||||||
|
this.getCode();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
'use strict'
|
"use strict";
|
||||||
const path = require('path')
|
const path = require("path");
|
||||||
|
|
||||||
function resolve(dir) {
|
function resolve(dir) {
|
||||||
return path.join(__dirname, dir)
|
return path.join(__dirname, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
const CompressionPlugin = require('compression-webpack-plugin')
|
const CompressionPlugin = require("compression-webpack-plugin");
|
||||||
|
|
||||||
const name = process.env.VUE_APP_TITLE || '租研舍管理系统' // 网页标题
|
const name = process.env.VUE_APP_TITLE || "未信用秒租管理系统"; // 网页标题
|
||||||
|
|
||||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
const port = process.env.port || process.env.npm_config_port || 80; // 端口
|
||||||
|
|
||||||
// vue.config.js 配置说明
|
// vue.config.js 配置说明
|
||||||
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
||||||
|
|
@ -20,111 +20,111 @@ module.exports = {
|
||||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||||
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
||||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||||
outputDir: 'dist',
|
outputDir: "dist",
|
||||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||||
assetsDir: 'static',
|
assetsDir: "static",
|
||||||
// 是否开启eslint保存检测,有效值:ture | false | 'error'
|
// 是否开启eslint保存检测,有效值:ture | false | 'error'
|
||||||
lintOnSave: process.env.NODE_ENV === 'development',
|
lintOnSave: process.env.NODE_ENV === "development",
|
||||||
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
||||||
productionSourceMap: false,
|
productionSourceMap: false,
|
||||||
// webpack-dev-server 相关配置
|
// webpack-dev-server 相关配置
|
||||||
devServer: {
|
devServer: {
|
||||||
host: '0.0.0.0',
|
host: "localhost",
|
||||||
port: port,
|
port: 81,
|
||||||
open: true,
|
open: true,
|
||||||
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:8080`,
|
target: `http://r6a2wb.natappfree.cc`,
|
||||||
|
// target: `http://124.222.144.55/dev-api`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
["^" + process.env.VUE_APP_BASE_API]: "",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
disableHostCheck: true
|
disableHostCheck: true,
|
||||||
},
|
},
|
||||||
css: {
|
css: {
|
||||||
loaderOptions: {
|
loaderOptions: {
|
||||||
sass: {
|
sass: {
|
||||||
sassOptions: { outputStyle: "expanded" }
|
sassOptions: { outputStyle: "expanded" },
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
configureWebpack: {
|
configureWebpack: {
|
||||||
name: name,
|
name: name,
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': resolve('src')
|
"@": resolve("src"),
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
|
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
|
||||||
new CompressionPlugin({
|
new CompressionPlugin({
|
||||||
cache: false, // 不启用文件缓存
|
cache: false, // 不启用文件缓存
|
||||||
test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i, // 压缩文件格式
|
test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i, // 压缩文件格式
|
||||||
filename: '[path][base].gz[query]', // 压缩后的文件名
|
filename: "[path][base].gz[query]", // 压缩后的文件名
|
||||||
algorithm: 'gzip', // 使用gzip压缩
|
algorithm: "gzip", // 使用gzip压缩
|
||||||
minRatio: 0.8, // 压缩比例,小于 80% 的文件不会被压缩
|
minRatio: 0.8, // 压缩比例,小于 80% 的文件不会被压缩
|
||||||
deleteOriginalAssets: false // 压缩后删除原文件
|
deleteOriginalAssets: false, // 压缩后删除原文件
|
||||||
})
|
}),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
chainWebpack(config) {
|
chainWebpack(config) {
|
||||||
config.plugins.delete('preload') // TODO: need test
|
config.plugins.delete("preload"); // TODO: need test
|
||||||
config.plugins.delete('prefetch') // TODO: need test
|
config.plugins.delete("prefetch"); // TODO: need test
|
||||||
|
|
||||||
// set svg-sprite-loader
|
// set svg-sprite-loader
|
||||||
|
config.module.rule("svg").exclude.add(resolve("src/assets/icons")).end();
|
||||||
config.module
|
config.module
|
||||||
.rule('svg')
|
.rule("icons")
|
||||||
.exclude.add(resolve('src/assets/icons'))
|
|
||||||
.end()
|
|
||||||
config.module
|
|
||||||
.rule('icons')
|
|
||||||
.test(/\.svg$/)
|
.test(/\.svg$/)
|
||||||
.include.add(resolve('src/assets/icons'))
|
.include.add(resolve("src/assets/icons"))
|
||||||
.end()
|
.end()
|
||||||
.use('svg-sprite-loader')
|
.use("svg-sprite-loader")
|
||||||
.loader('svg-sprite-loader')
|
.loader("svg-sprite-loader")
|
||||||
.options({
|
.options({
|
||||||
symbolId: 'icon-[name]'
|
symbolId: "icon-[name]",
|
||||||
})
|
})
|
||||||
.end()
|
.end();
|
||||||
|
|
||||||
config.when(process.env.NODE_ENV !== 'development', config => {
|
config.when(process.env.NODE_ENV !== "development", (config) => {
|
||||||
config
|
config
|
||||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
.plugin("ScriptExtHtmlWebpackPlugin")
|
||||||
.after('html')
|
.after("html")
|
||||||
.use('script-ext-html-webpack-plugin', [{
|
.use("script-ext-html-webpack-plugin", [
|
||||||
|
{
|
||||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||||
inline: /runtime\..*\.js$/
|
inline: /runtime\..*\.js$/,
|
||||||
}])
|
},
|
||||||
.end()
|
])
|
||||||
|
.end();
|
||||||
|
|
||||||
config.optimization.splitChunks({
|
config.optimization.splitChunks({
|
||||||
chunks: 'all',
|
chunks: "all",
|
||||||
cacheGroups: {
|
cacheGroups: {
|
||||||
libs: {
|
libs: {
|
||||||
name: 'chunk-libs',
|
name: "chunk-libs",
|
||||||
test: /[\\/]node_modules[\\/]/,
|
test: /[\\/]node_modules[\\/]/,
|
||||||
priority: 10,
|
priority: 10,
|
||||||
chunks: 'initial' // only package third parties that are initially dependent
|
chunks: "initial", // only package third parties that are initially dependent
|
||||||
},
|
},
|
||||||
elementUI: {
|
elementUI: {
|
||||||
name: 'chunk-elementUI', // split elementUI into a single package
|
name: "chunk-elementUI", // split elementUI into a single package
|
||||||
test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
|
test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
|
||||||
priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
||||||
},
|
},
|
||||||
commons: {
|
commons: {
|
||||||
name: 'chunk-commons',
|
name: "chunk-commons",
|
||||||
test: resolve('src/components'), // can customize your rules
|
test: resolve("src/components"), // can customize your rules
|
||||||
minChunks: 3, // minimum common number
|
minChunks: 3, // minimum common number
|
||||||
priority: 5,
|
priority: 5,
|
||||||
reuseExistingChunk: true
|
reuseExistingChunk: true,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
config.optimization.runtimeChunk('single')
|
config.optimization.runtimeChunk("single");
|
||||||
})
|
});
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue