@@ -13,20 +13,22 @@ ENV = 'development' | |||
# VITE_APP_BASE_URL = 'http://100.65.11.2:8086/nDev/' #线上地址 nDev | |||
# VITE_APP_BASE_URL = 'http://100.64.2.104:8087/nDev/' #线上地址 nDev | |||
# VITE_APP_BASE_URL = 'http://100.65.11.2:8086/ndev/' #线上地址 ndev | |||
VITE_APP_BASE_URL = 'http://100.65.11.2:8086/prod/' #线上地址 prod | |||
# VITE_APP_BASE_URL = 'http://100.65.11.2:8086/prod/' #线上地址 prod | |||
VITE_APP_BASE_URL = 'https://qtzl.etcjz.cn/ndev/' #线上地址 prod | |||
# VITE_APP_BASE_URL = 'http://100.64.2.104:8086/html/' | |||
# VITE_APP_BASE_URL = 'http://100.64.2.111:50001/' #宇轩给测试环境 | |||
# VITE_APP_BASE_URL = 'https://192.168.124.43:50001/' #宇轩服务器 | |||
# VITE_APP_BASE_URL = 'http://192.168.124.56:50001/' #试运行环境/青云环境/生成环境地址 | |||
# VITE_APP_BASE_URL_N = 'http://100.65.11.2:8086/ndev/' # 新地址 ndev | |||
VITE_APP_BASE_URL_N = 'http://100.65.11.2:8086/prod/' # 新地址 prod | |||
# VITE_APP_BASE_URL_N = 'http://100.65.11.2:8086/prod/' # 新地址 prod | |||
VITE_APP_BASE_URL_N = 'https://qtzl.etcjz.cn/ndev/' #线上地址 prod | |||
# VITE_APP_BASE_URL_N = 'http://100.64.2.104:8087/nDev/' #线上地址 nDev | |||
# VITE_APP_BASE_URL_N = 'https://qtzl.etcjz.cn/ndev/' # 新地址 | |||
# VITE_APP_BASE_URL_N = 'http://100.65.11.2:8086/nDev/' # 新地址 | |||
VITE_APP_EXPORT_URL = "http://162.14.97.68:11111/" | |||
VITE_APP_EXPORT_URL_NEW = "https://qtzl.etcjz.cn/" | |||
# VITE_APP_UPLOAD_URL = "http://192.168.100.158:8085/" | |||
# VITE_APP_UPLOAD_URL = "http://192.168.100.63:50001/" #测试环境地址 |
@@ -24,6 +24,7 @@ VITE_APP_BASE_URL_N = 'http://100.65.11.2:8086/prod/' # 新地址 prod生产 nde | |||
# VITE_APP_BASE_URL = "http://43.136.169.197:50001/" | |||
VITE_APP_EXPORT_URL = "http://162.14.97.68:11111/" | |||
VITE_APP_EXPORT_URL_NEW = "https://qtzl.etcjz.cn/" | |||
# VITE_APP_UPLOAD_URL = "http://192.168.100.63:50001/" | |||
# VITE_APP_UPLOAD_URL = "http://192.168.100.63:8087/" #测试环境地址 |
@@ -19,7 +19,7 @@ export function getMenuData(proxy: any, callback: any, lose: any) { | |||
BaseService.post('/userw/rbac/menusearch', {}).then((res: any) => { | |||
if (res && res.statusCode == 0) { | |||
let bizContent = res.data | |||
callback(bizContent.menu);ETC储值卡成本统计 | |||
callback(bizContent.menu);//ETC储值卡成本统计 | |||
} else { | |||
ElMessage.error(res.message) | |||
} |
@@ -272,7 +272,8 @@ function systmeClick(item: IObject) { | |||
systemType: item.code, | |||
openId: openId, | |||
} | |||
BaseService.post('/iaw/rbac/menuListBySystemTypeAndOpenId', params).then((res: any) => { | |||
//iaw/rbac/menuListBySystemTypeAndOpenId | |||
BaseService.post('/userw/rbac/menuListBySystemTypeAndOpenId', params).then((res: any) => { | |||
if (res && res.statusCode === 0) { | |||
let bizContent = res.data | |||
const menuList = bizContent.menuList || [] |
@@ -166,7 +166,8 @@ | |||
systemType: codeSelected, | |||
openId: openId | |||
} | |||
BaseService.post('/iaw/rbac/menuListBySystemTypeAndOpenId', params).then((res: any) => { | |||
//userw/rbac/menuListBySystemTypeAndOpenId | |||
BaseService.post('/userw/rbac/menuListBySystemTypeAndOpenId', params).then((res: any) => { | |||
if (res && res.statusCode === 0) { | |||
let bizContent = res.data | |||
const menuList = bizContent.menuList || []; |
@@ -17,7 +17,8 @@ export function goPage(params: type, router) { | |||
store.show = true; | |||
store.progress = 30; | |||
}, 0); | |||
BaseService.post('/userw/rbac/permsbyopenidandmenuid', { menuId: params.id }).then( | |||
//userw/rbac/permsbyopenidandmenuid | |||
BaseService.post('/userw/rbac/permsByOpenIdAndMenuId', { menuId: params.id }).then( | |||
(res: any) => { | |||
if (res && res.code === 0) { | |||
let bizContent = res.data |
@@ -41,7 +41,7 @@ export default createStore<any>({ | |||
// 字典 | |||
dictData(context, value) { | |||
//字典全量接口 | |||
BaseService.post('/userw/dict/itemgetall').then((res: any) => { | |||
BaseService.post('/userw/dict/itemGetAll').then((res: any) => { | |||
if (res && res.code === 0) { | |||
let bizContent = res.data | |||
let data = bizContent.dictTypeAndItem || {} | |||
@@ -83,8 +83,8 @@ export default createStore<any>({ | |||
let params = { | |||
openId: openId, | |||
} | |||
// 根据用户标识返回其可访问的所有系统类型) | |||
BaseService.post('/iaw/rbac/systemTypeByAccountRole', params).then((res: any) => { | |||
// 根据用户标识返回其可访问的所有系统类型)iaw/rbac/systemTypeByAccountRole | |||
BaseService.post('/userw/rbac/systemTypeByAccountRole', params).then((res: any) => { | |||
if (res && res.statusCode === 0) { | |||
let bizContent = res.data | |||
console.log('可访问的系统',bizContent,'请求参数',bizContent); |
@@ -44,6 +44,42 @@ export function syncAjax(code: string, body: IObject, callback: any) { | |||
} | |||
} | |||
/** | |||
* 检查数组中是否包含指定的地址路径 | |||
* @param {Array} array - 要搜索的数组 | |||
* @param {string} path - 要查找的地址路径 | |||
* @param {boolean} [exactMatch=true] - 是否要求完全匹配(默认true) | |||
* @returns {boolean} 如果找到返回true,否则返回false | |||
*/ | |||
function hasPathInArray(array, path, exactMatch = true) { | |||
if (!Array.isArray(array)) { | |||
console.warn('第一个参数必须是数组'); | |||
return false; | |||
} | |||
if (typeof path !== 'string') { | |||
console.warn('第二个参数必须是字符串'); | |||
return false; | |||
} | |||
// 标准化路径(移除开头/结尾的斜杠) | |||
const normalizedPath = path.replace(/^\/|\/$/g, ''); | |||
return array.some(item => { | |||
if (typeof item !== 'string') return false; | |||
const normalizedItem = item.replace(/^\/|\/$/g, ''); | |||
if (exactMatch) { | |||
return normalizedItem === normalizedPath; | |||
} | |||
// 非精确匹配:检查是否包含路径 | |||
return normalizedItem.includes(normalizedPath) || | |||
normalizedPath.includes(normalizedItem); | |||
}); | |||
} | |||
/** | |||
* 常用CRUD | |||
*/ | |||
@@ -80,9 +116,71 @@ export default { | |||
body?: IObject, | |||
headers?: IObject | |||
): Promise<IHttpResponse> { | |||
const paths = [ | |||
'/iaw/portal/loginByCode', | |||
'/iaw/portal/loginConfirm', | |||
'/iaw/portal/logout', | |||
'/iaw/portal/sendCode', | |||
'/userw/dict/typeQuery', | |||
'/userw/rbac/systemTypeByAccountRole', | |||
'/userw/rbac/menuListBySystemTypeAndOpenId', | |||
'/userw/rbac/permsByOpenIdAndMenuId', | |||
'/userw/dict/itemAdd', | |||
'/userw/dict/itemDelete', | |||
'/userw/dict/itemUpdate', | |||
'/userw/dict/typeAdd', | |||
'/userw/dict/typeDelete', | |||
'/userw/dict/typeUpdate', | |||
'/userw/dict/typeView', | |||
'/userw/agency/agencyquery', | |||
'/userw/agency/agencyinsert', | |||
'/userw/centerAgency/page', | |||
'/userw/centerAgency/addOrUpDate', | |||
'/userw/centerAgency/delete', | |||
'/userw/centerServiceHall/addOrUpDate', | |||
'/userw/centerServiceHall/delete', | |||
'/userw/centerServiceHall/page', | |||
'/userw/centerServiceHall/getCenterServiceHall', | |||
'/userw/centerAgency/getCenterAgencyId', | |||
'/userw/agency/getAgencyId', | |||
'/ifmw/interface/query', | |||
'/ifmw/interface/insert', | |||
'/ifmw/interface/querybyid', | |||
'/ifmw/interface/update', | |||
'/ifmw/businessConfig/query', | |||
'/ifmw/field/query', | |||
'/ifmw/field/insert', | |||
'/ifmw/field/querybyid', | |||
'/ifmw/field/update', | |||
'/ifmw/ip/insert', | |||
'/ifmw/ip/query', | |||
'/ifmw/ip/querybyid', | |||
'/ifmw/ip/update', | |||
'/ifmw/ident/insert', | |||
'/ifmw/ident/query', | |||
'/ifmw/ident/querybyid', | |||
'/ifmw/ident/querysource', | |||
'/ifmw/ident/update', | |||
'/ifmw/ident/updateSecret', | |||
'/userw/centerServiceHall/addOrUpDate', | |||
'/userw/centerServiceHall/delete', | |||
'/userw/centerServiceHall/getCenterServiceHall', | |||
'/userw/centerServiceHall/page', | |||
'/userw/serviceHall/serviceHallSelect', | |||
'/userw/serviceHall/getServiceHallId', | |||
'/userw/serviceHall/queryLocations', | |||
'/userw/serviceHall/registerFullBath', | |||
'/userw/serviceHall/registerLocationBath', | |||
'/userw/serviceHall/serviceHallDelete', | |||
'/userw/serviceHall/serviceHallInsert', | |||
'/userw/serviceHall/serviceHallSonSelect', | |||
'/userw/serviceHall/serviceHallUpdate', | |||
'/userw/dict/itemGetAll', | |||
// '/userw/staff/getinfobyopenid', | |||
]; | |||
return httpN({ | |||
url: url, | |||
url: hasPathInArray(paths, url) ? '/newDev/ndev' + url : url, | |||
method: 'post', | |||
timeout: 60000, | |||
headers: { | |||
@@ -93,7 +191,8 @@ export default { | |||
{ | |||
...body, | |||
}, | |||
2 | |||
2, | |||
hasPathInArray(paths, url) | |||
), | |||
}) | |||
}, |
@@ -6,7 +6,7 @@ import { getToken } from "./cache"; | |||
import { getValueByKeys } from "./utils"; | |||
import { ElMessage } from "element-plus"; | |||
import { SM4Util } from '@/utils/sm4'; | |||
import {sm4Key } from '@/utils/utils'; | |||
import { sm4Key } from '@/utils/utils'; | |||
import BaseService from "@/utils/baseService"; | |||
import { setCache } from '@/utils/cache' | |||
const sm4 = new SM4Util(); | |||
@@ -28,7 +28,7 @@ const http = axios.create({ | |||
}); | |||
http.interceptors.request.use( | |||
function (config:any) { | |||
function (config: any) { | |||
config.headers["X-Requested-With"] = "XMLHttpRequest"; | |||
config.headers["Request-Start"] = new Date().getTime(); | |||
const token = getToken(); | |||
@@ -50,17 +50,18 @@ http.interceptors.request.use( | |||
http.interceptors.response.use( | |||
(response) => { | |||
if (response.data.code === 401002) { | |||
// 刷新token | |||
BaseService.post('/iaw/portal/phoneLogin', {}).then((res: any) => { | |||
if (res && res.code === 0) { | |||
setCache('refreshCacheAccessToken', res.data, false) | |||
ElMessage.warning('token更新,请重试!') | |||
} else { | |||
ElMessage.error(response.data.message) | |||
redirectLogin(); | |||
} | |||
return | |||
}) | |||
// redirectLogin(); | |||
// // 刷新token | |||
// BaseService.post('/iaw/portal/phoneLogin', {}).then((res: any) => { | |||
// if (res && res.code === 0) { | |||
// setCache('refreshCacheAccessToken', res.data, false) | |||
// ElMessage.warning('token更新,请重试!') | |||
// } else { | |||
// ElMessage.error(response.data.message) | |||
// redirectLogin(); | |||
// } | |||
// return | |||
// }) | |||
} else if (response.data.code === 401001) { | |||
redirectLogin(); | |||
} else if (response.data.code === 403003 || response.data.code === 403001 || response.data.code === 403004) { | |||
@@ -101,7 +102,7 @@ const redirectLogin = () => { | |||
export default (o: AxiosRequestConfig): Promise<IHttpResponse> => { | |||
return new Promise((resolve, reject) => { | |||
http(o) | |||
.then((res:any) => { | |||
.then((res: any) => { | |||
//登录失效 | |||
if (res.data && res.data.statusCode === 401) { | |||
router.push("/login"); | |||
@@ -117,7 +118,7 @@ export default (o: AxiosRequestConfig): Promise<IHttpResponse> => { | |||
// ElMessage.error("接口返回解密数据,解密失败!") | |||
// } | |||
// } else { | |||
// return resolve(res.data); | |||
// return resolve(res.data); | |||
// } | |||
res.data.code = res.data.statusCode | |||
return resolve(res.data); |
@@ -56,19 +56,20 @@ httpN.interceptors.request.use( | |||
) | |||
httpN.interceptors.response.use( | |||
(response) => { | |||
if (response.data.code === 401002) { | |||
// 刷新token | |||
BaseService.post('/iaw/portal/phoneLogin', {}).then((res: any) => { | |||
if (res && res.code === 0) { | |||
setCache('refreshCacheAccessToken', res.data, false) | |||
ElMessage.warning('token更新,请重试!') | |||
} else { | |||
ElMessage.error(response.data.message) | |||
redirectLogin() | |||
} | |||
return | |||
}) | |||
// redirectLogin() | |||
// // 刷新token | |||
// BaseService.post('/iaw/portal/phoneLogin', {}).then((res: any) => { | |||
// if (res && res.code === 0) { | |||
// setCache('refreshCacheAccessToken', res.data, false) | |||
// ElMessage.warning('token更新,请重试!') | |||
// } else { | |||
// ElMessage.error(response.data.message) | |||
// redirectLogin() | |||
// } | |||
// return | |||
// }) | |||
} else if (response.data.code === 401001) { | |||
redirectLogin() | |||
} else if ( | |||
@@ -107,7 +108,7 @@ httpN.interceptors.response.use( | |||
const redirectLogin = () => { | |||
console.log('redirectLogin'); | |||
router.push('/login') | |||
return | |||
} |
@@ -388,11 +388,11 @@ export function encryption(urlcode, subdata, type) { | |||
// requestData['encryptType'] = 'SM4'; | |||
// requestData['bizContent'] = sm4.encryptData_CBC(subdata, sm4Key); | |||
// } else { | |||
requestData['appId'] = 'admin001' | |||
requestData['encryptType'] = 'NONE' | |||
requestData['bizContent'] = JSON.stringify(subdata) | |||
requestData['appId'] = 'admin001' | |||
requestData['encryptType'] = 'NONE' | |||
requestData['bizContent'] = JSON.stringify(subdata) | |||
// } | |||
//根据需求获取到毫秒级别 | |||
requestData['reqId'] = | |||
requestData['appId'] + | |||
@@ -411,26 +411,26 @@ export function encryption(urlcode, subdata, type) { | |||
// } else { | |||
// requestData['bizContent'] = subdata; | |||
// } | |||
requestData['signType'] = 'SM3' | |||
requestData['accessToken'] = getToken() | |||
let sm3Data = | |||
'appId=' + | |||
requestData['appId'] + | |||
'&bizContent=' + | |||
requestData['bizContent'] + | |||
'&signType=SM3' + | |||
'&encryptType=' + requestData["encryptType"] + | |||
'×tamp=' + | |||
requestData['timestamp'] + | |||
'&ifCode=' + | |||
urlcode + | |||
'&reqId=' + | |||
requestData['reqId'] | |||
if (requestData['accessToken']) { | |||
sm3Data += `&accessToken=${requestData['accessToken']}` | |||
} | |||
requestData['sign'] = sm3(sm3Data, key) | |||
requestData['signType'] = 'SM3' | |||
requestData['accessToken'] = getToken() | |||
let sm3Data = | |||
'appId=' + | |||
requestData['appId'] + | |||
'&bizContent=' + | |||
requestData['bizContent'] + | |||
'&signType=SM3' + | |||
'&encryptType=' + requestData["encryptType"] + | |||
'×tamp=' + | |||
requestData['timestamp'] + | |||
'&ifCode=' + | |||
urlcode + | |||
'&reqId=' + | |||
requestData['reqId'] | |||
if (requestData['accessToken']) { | |||
sm3Data += `&accessToken=${requestData['accessToken']}` | |||
} | |||
requestData['sign'] = sm3(sm3Data, key) | |||
// requestData['signType'] = 'MD5' | |||
@@ -446,28 +446,32 @@ export function encryption(urlcode, subdata, type) { | |||
// // + '&accessToken=' + requestData['accessToken'] | |||
// ) | |||
// console.log(subdata,'请求参数'); | |||
// console.log(subdata,'请求参数'); | |||
let endData = arrayToJson(requestData) | |||
// console.log('输出内容', endData) | |||
return endData | |||
} | |||
/**中台参数封装结束 */ | |||
export function encryptionN(subdata, type) { | |||
export function encryptionN(subdata, type, start = false) { | |||
subdata['loginSource'] = subdata['loginSource'] || '713b5ffba6b04fbd8480d46f625cef51' //登录来源方 | |||
//用户标识 | |||
let cacheAccessToken = getCache( | |||
//用户标识 | |||
let cacheAccessToken = getCache( | |||
'cacheAccessToken', | |||
{ isSessionStorage: false }, | |||
{} | |||
) | |||
subdata['accessToken'] = getToken() | |||
let openId = cacheAccessToken['openId'] | |||
subdata['openId'] = openId // 用户标识 | |||
subdata['opId'] = openId // 用户标识 | |||
subdata['agentId'] = cacheAccessToken['agencyId'] // 用户标识 | |||
subdata['channelId'] = cacheAccessToken['serviceHallId'] // 用户标识 | |||
subdata['staffId'] = cacheAccessToken['staffId'] // 用户标识 | |||
if (!start) { | |||
subdata['openId'] = openId // 用户标识 | |||
subdata['opId'] = openId // 用户标识 | |||
subdata['channelId'] = cacheAccessToken['serviceHallId'] // 用户标识 | |||
subdata['agentId'] = cacheAccessToken['agencyId'] // 用户标识 | |||
} | |||
let endData = arrayToJson(subdata) | |||
// if (res && res.statusCode === 0) { | |||
@@ -859,22 +863,22 @@ export function timesDiff(timesData: any) { | |||
} | |||
// 敏感数据脱敏 | |||
export function dataDesensitization(numStr){ | |||
let newStr | |||
if (numStr) { | |||
if (numStr.length <= 3) { //姓名 | |||
if (numStr.length === 2) { | |||
newStr = `${numStr.substring(0, 1)}*` | |||
} else { | |||
newStr = `${numStr.substring(0, 1)}*${numStr.substring(numStr.length - 1)}` | |||
} | |||
} else if (numStr.length === 11) { //手机号码 | |||
newStr = `${numStr.substring(0, 3)}****${numStr.substring(numStr.length - 4)}` | |||
} else if (numStr.length === 18) {//身份证 | |||
newStr = `${numStr.substring(0, 6)}********${numStr.substring(numStr.length - 4)}` | |||
} else { //银行卡 | |||
newStr = `${numStr.substring(0, 4)} **** **** **** ${numStr.substring(numStr.length - 3)}` | |||
} | |||
} | |||
return newStr | |||
} | |||
export function dataDesensitization(numStr) { | |||
let newStr | |||
if (numStr) { | |||
if (numStr.length <= 3) { //姓名 | |||
if (numStr.length === 2) { | |||
newStr = `${numStr.substring(0, 1)}*` | |||
} else { | |||
newStr = `${numStr.substring(0, 1)}*${numStr.substring(numStr.length - 1)}` | |||
} | |||
} else if (numStr.length === 11) { //手机号码 | |||
newStr = `${numStr.substring(0, 3)}****${numStr.substring(numStr.length - 4)}` | |||
} else if (numStr.length === 18) {//身份证 | |||
newStr = `${numStr.substring(0, 6)}********${numStr.substring(numStr.length - 4)}` | |||
} else { //银行卡 | |||
newStr = `${numStr.substring(0, 4)} **** **** **** ${numStr.substring(numStr.length - 3)}` | |||
} | |||
} | |||
return newStr | |||
} |
@@ -75,7 +75,8 @@ function clickHandle(item: IObject) { | |||
systemType: item.code, | |||
openId: openId, | |||
} | |||
BaseService.post('/iaw/rbac/menuListBySystemTypeAndOpenId', params).then((res: any) => { | |||
//iaw/rbac/menuListBySystemTypeAndOpenId | |||
BaseService.post('/userw/rbac/menuListBySystemTypeAndOpenId', params).then((res: any) => { | |||
if (res && res.statusCode === 0) { | |||
let bizContent = res.data | |||
const menuList = bizContent.menuList || [] |
@@ -176,7 +176,8 @@ | |||
// 点击验证 | |||
function unitClick(e, item, value, type) { | |||
console.log(value, 'value') | |||
BaseService.post('/iaw/message/sendMessage', { mobile: value }).then((res: any) => { | |||
//iaw/message/sendMessage | |||
BaseService.post('/iaw/portal/sendCode', { mobile: value }).then((res: any) => { | |||
if (res && res.statusCode === 0) { | |||
ElMessage.success("验证码已发送到手机"); | |||
timerHandler(type) |
@@ -0,0 +1,81 @@ | |||
import { IsPermission } from "@/router/routerUtil"; | |||
let formLabelWidth = '150px'; | |||
// 表单数据配置(改为函数形式,接收route参数) | |||
export const getZxqdFindConfig = (route) => ({ | |||
tabSize: "small", //Table 的尺寸 large / default /small (默认default) | |||
searchShow: false, //是否显示搜索模块(默认false) IsPermission(route, 'QUERY_BASE') | |||
border: true, //是否添加边框(默认false) | |||
dialogCustom: false, //自定义Dialog (默认false) | |||
dialogFooter: false, //隐藏弹窗页脚显示 (默认false) | |||
dialogWidth: "40%", //dialog宽度 (默认40%) | |||
dialogInfoWidth: "60%", | |||
crudShow: true, //是否显示CURD操作栏 (默认true) | |||
crudChildShow: true, //是否显示CURD子操作栏 (默认true) | |||
paginStart: true, //是否显示分页查询 (默认false) | |||
dataListLoading: false, | |||
paging: { | |||
pageSize: 10, | |||
currentPage: 1, | |||
total: 0 | |||
}, | |||
crud: { | |||
add: IsPermission(route, 'ADD_BASE'), | |||
edit: false, | |||
delete: false, | |||
derive: false, | |||
search: false, | |||
refresh: false, | |||
}, | |||
searchOperation: { | |||
isDownload: false, | |||
isAdd: false, | |||
isTransferMachine: false, | |||
}, | |||
tableSize: -1, | |||
operateShow: true, //是否为表格添加操作栏(默认true) | |||
operateTitle: "操作", //操作栏标题(默认为"") | |||
operateFixed: true, //操作栏是否固定(默认false) | |||
operateWidth: "200", //操作栏宽度 | |||
operate: { | |||
edit: IsPermission(route, 'EDIT_LIST'), //是否编辑(默认true) | |||
info: IsPermission(route, 'INFO_LIST'), //是否编辑(默认true) | |||
delete: true, //是否删除(默认true) IsPermission(route, 'DEL_LIST') | |||
announcement: false, // 公告 | |||
remark: false, // 详情 | |||
forbidden: false, // 禁用 | |||
enable: false, // 启用 | |||
authorization: false, // 授权 | |||
cancel: false, // 取消订单 | |||
writeOff: false, // 注销 | |||
make: false, // 补缴 | |||
}, | |||
extend: [ | |||
{ | |||
label: "序号", | |||
type: "index", //类型:selection,index,expand | |||
width: "80px", //表头宽度 | |||
}, | |||
], | |||
field: [ | |||
{ | |||
prop: "centerAgencyId", | |||
label: "中心渠道编号", | |||
form: { | |||
hideEdit: true, | |||
formLabelWidth: formLabelWidth, | |||
type: 'input', | |||
required: true, | |||
} | |||
}, | |||
{ | |||
prop: "centerAgencyName", | |||
label: "中心渠道名称", | |||
form: { | |||
formLabelWidth: formLabelWidth, | |||
type: 'input', | |||
required: true, | |||
disabled: false | |||
} | |||
} | |||
] | |||
}); |
@@ -0,0 +1,81 @@ | |||
import { IsPermission } from "@/router/routerUtil"; | |||
let formLabelWidth = '150px'; | |||
// 表单数据配置(改为函数形式,接收route参数) | |||
export const getZxqdFindConfig = (route) => ({ | |||
tabSize: "small", //Table 的尺寸 large / default /small (默认default) | |||
searchShow: false, //是否显示搜索模块(默认false) IsPermission(route, 'QUERY_BASE') | |||
border: true, //是否添加边框(默认false) | |||
dialogCustom: false, //自定义Dialog (默认false) | |||
dialogFooter: false, //隐藏弹窗页脚显示 (默认false) | |||
dialogWidth: "40%", //dialog宽度 (默认40%) | |||
dialogInfoWidth: "60%", | |||
crudShow: true, //是否显示CURD操作栏 (默认true) | |||
crudChildShow: true, //是否显示CURD子操作栏 (默认true) | |||
paginStart: true, //是否显示分页查询 (默认false) | |||
dataListLoading: false, | |||
paging: { | |||
pageSize: 10, | |||
currentPage: 1, | |||
total: 0 | |||
}, | |||
crud: { | |||
add: IsPermission(route, 'ADD_BASE'), | |||
edit: false, | |||
delete: false, | |||
derive: false, | |||
search: false, | |||
refresh: false, | |||
}, | |||
searchOperation: { | |||
isDownload: false, | |||
isAdd: false, | |||
isTransferMachine: false, | |||
}, | |||
tableSize: -1, | |||
operateShow: true, //是否为表格添加操作栏(默认true) | |||
operateTitle: "操作", //操作栏标题(默认为"") | |||
operateFixed: true, //操作栏是否固定(默认false) | |||
operateWidth: "200", //操作栏宽度 | |||
operate: { | |||
edit: IsPermission(route, 'EDIT_LIST'), //是否编辑(默认true) | |||
info: IsPermission(route, 'INFO_LIST'), //是否编辑(默认true) | |||
delete: true, //是否删除(默认true) IsPermission(route, 'DEL_LIST') | |||
announcement: false, // 公告 | |||
remark: false, // 详情 | |||
forbidden: false, // 禁用 | |||
enable: false, // 启用 | |||
authorization: false, // 授权 | |||
cancel: false, // 取消订单 | |||
writeOff: false, // 注销 | |||
make: false, // 补缴 | |||
}, | |||
extend: [ | |||
{ | |||
label: "序号", | |||
type: "index", //类型:selection,index,expand | |||
width: "80px", //表头宽度 | |||
}, | |||
], | |||
field: [ | |||
{ | |||
prop: "centerServiceHallId", | |||
label: "中心网点编号", | |||
form: { | |||
hideEdit: true, | |||
formLabelWidth: formLabelWidth, | |||
type: 'input', | |||
required: true, | |||
} | |||
}, | |||
{ | |||
prop: "centerServicehallName", | |||
label: "中心网点名称", | |||
form: { | |||
formLabelWidth: formLabelWidth, | |||
type: 'input', | |||
required: true, | |||
disabled: false | |||
} | |||
} | |||
] | |||
}); |
@@ -2,12 +2,16 @@ | |||
<div class="as-layout-horizontal" style="padding: 0 20px"> | |||
<el-card style="width: 60%; margin-right: 20px"> | |||
<div class="as-layout-horizontal"> | |||
<el-input maxlength="60" v-trim clearable v-if="IsPermission(route, 'QUERY_BASE')" v-model="describe" | |||
style="width: 200px; margin: 0 10px 10px 0" placeholder="请输入名称或描述" /> | |||
<el-select clearable v-if="IsPermission(route, 'QUERY_BASE')" v-model="systemType" | |||
<el-input maxlength="60" v-trim clearable v-if="IsPermission(route, 'QUERY_BASE')" v-model="code" | |||
style="width: 200px; margin: 0 10px 10px 0" placeholder="字典类型编码" /> | |||
<el-input maxlength="60" v-trim clearable v-if="IsPermission(route, 'QUERY_BASE')" v-model="description" | |||
style="width: 200px; margin: 0 10px 10px 0" placeholder="字典类型描述" /> | |||
<el-input maxlength="60" v-trim clearable v-if="IsPermission(route, 'QUERY_BASE')" v-model="name" | |||
style="width: 200px; margin: 0 10px 10px 0" placeholder="字典类型名称" /> | |||
<!-- <el-select clearable v-if="IsPermission(route, 'QUERY_BASE')" v-model="systemType" | |||
style="width: 200px; margin: 0 10px 0 0" placeholder="请选择所属系统"> | |||
<el-option v-for="item in systemList" :key="item.value" :label="item.label" :value="item.value" /> | |||
</el-select> | |||
</el-select> --> | |||
<el-button v-if="IsPermission(route, 'QUERY_BASE')" type="success" icon="search" @click="search" | |||
:loading="loading"> | |||
@@ -58,7 +62,7 @@ | |||
<el-table-column prop="name" label="字典标签" width="120" /> | |||
<el-table-column prop="code" label="字典值" /> | |||
<el-table-column prop="description" label="备注" width="120" /> | |||
<el-table-column prop="order" label="字典排序" width="80" /> | |||
<el-table-column prop="itemOrder" label="字典排序" width="80" /> | |||
<el-table-column label="操作" fixed="right" width="140"> | |||
<template #default="scope"> | |||
<el-button size="small" v-if="IsPermission(route, 'EDIT_LIST_LEVEL2')" | |||
@@ -84,12 +88,12 @@ | |||
<el-form-item label="字典名称" prop="name"> | |||
<el-input maxlength="60" v-trim clearable v-model="sizeForm.name" placeholder="类型名称(例:用户类型)"></el-input> | |||
</el-form-item> | |||
<el-form-item label="所属系统:"> | |||
<el-form-item label="所属系统:" prop="systemType"> | |||
<el-select clearable v-model="sizeForm.systemType" style="width: 100%" placeholder="请选择所属系统"> | |||
<el-option v-for="item in systemList" :key="item.value" :label="item.label" :value="item.value" /> | |||
</el-select> | |||
</el-form-item> | |||
<el-form-item label="字典描述"> | |||
<el-form-item label="字典描述" prop="description"> | |||
<el-input maxlength="60" v-trim clearable v-model="sizeForm.description" placeholder="请输入字典描述"></el-input> | |||
</el-form-item> | |||
</el-form> | |||
@@ -111,8 +115,8 @@ | |||
<el-form-item label="描述" prop="description"> | |||
<el-input maxlength="60" v-trim clearable v-model="childNodeForm.description" placeholder="请输入描述"></el-input> | |||
</el-form-item> | |||
<el-form-item label="排序" prop="order"> | |||
<el-input maxlength="60" v-trim number clearable v-model="childNodeForm.order" :min="1" /> | |||
<el-form-item label="排序" prop="itemOrder"> | |||
<el-input maxlength="60" v-trim number clearable v-model="childNodeForm.itemOrder" :min="1" /> | |||
</el-form-item> | |||
</el-form> | |||
<template #footer> | |||
@@ -150,9 +154,11 @@ let dictionaries = ref(false) | |||
let childNode = ref(false) | |||
let initTable = ref(false) | |||
let sizeForm: any = ref({}) | |||
let childNodeForm: any = ref({ order: 1 }) | |||
let childNodeForm: any = ref({ itemOrder: 1 }) | |||
let systemList: any = ref([]) | |||
let describe = ref('') //名称或描述 | |||
let code = ref('') //名称或描述 | |||
let description = ref('') //名称或描述 | |||
let name = ref('') //名称或描述 | |||
let title = ref('') | |||
let systemType = ref('') //名称或描述 | |||
let loading = ref(false) //名称或描述 | |||
@@ -169,6 +175,8 @@ let rules = ref({ | |||
let rulesTwo = ref({ | |||
name: [{ required: true, message: '字典名称不能为空', trigger: 'blur' }], | |||
code: [{ required: true, message: '字典key值不能为空', trigger: 'blur' }], | |||
itemOrder: [{ required: true, message: '字典排序不能为空', trigger: 'blur' }], | |||
description: [{ required: true, message: '字典描述不能为空', trigger: 'blur' }], | |||
}) | |||
const tableData = ref([]) | |||
@@ -190,7 +198,9 @@ function addEnt() { | |||
} | |||
//重置 | |||
function refreshLeft() { | |||
describe.value = '' | |||
code.value = '' | |||
name.value = '' | |||
description.value = '' | |||
systemType.value = '' | |||
getList() | |||
} | |||
@@ -229,6 +239,10 @@ function handleChildEdit(idx, row) { | |||
//校验 dictTypeId | |||
childNode.value = true | |||
childNodeForm.value = row | |||
childNodeForm.value.typeId = childNodeForm.value.dictTypeId | |||
childNodeForm.value.itemOrder = childNodeForm.value.order | |||
console.log(JSON.stringify(childNodeForm.value) + '----'); | |||
} | |||
function handleChildDelete(idx, row) { | |||
ElMessageBox.confirm('确定要删除么?', '', { | |||
@@ -241,11 +255,12 @@ function handleChildDelete(idx, row) { | |||
let params: any = { | |||
dictItemId: row.dictItemId, | |||
} | |||
BaseService.postN('/userw/dict/itemdelete', params).then((res: any) => { | |||
BaseService.postN('/userw/dict/itemDelete', params).then((res: any) => { | |||
if (res && res.code === 0) { | |||
tableLodingChange.value = false | |||
$storeinitData.dispatch('initData') | |||
getListChild(childNodeForm.value.dictTypeId) | |||
// getListChild(childNodeForm.value.dictTypeId) | |||
getListChild(childNodeForm.value.typeId) | |||
ElMessage.success(res.message) | |||
} else { | |||
tableLodingChange.value = false | |||
@@ -266,9 +281,10 @@ function handleDelete(idx, row) { | |||
.then(() => { | |||
tableLodingChange.value = true | |||
let params: any = { | |||
dictTypeId: row.id, | |||
// dictTypeId: row.id, | |||
typeId: row.id, | |||
} | |||
BaseService.postN('/userw/dict/typedelete', params).then((res: any) => { | |||
BaseService.postN('/userw/dict/typeDelete', params).then((res: any) => { | |||
if (res && res.code === 0) { | |||
tableLodingChange.value = false | |||
getList() | |||
@@ -300,13 +316,16 @@ function getList() { | |||
pageNo: currentPage.value, | |||
pageSize: pageSize.value, | |||
systemType: systemType.value, //所属系统 | |||
name: describe.value, | |||
name: name.value, //字典类型名称 | |||
code: code.value, //字典类型编码 | |||
description: description.value, // 字典类型描述 | |||
} | |||
BaseService.postN('/userw/dict/typelistquery', params).then((res: any) => { | |||
///userw/dict/typeQuery typelistquery | |||
BaseService.postN('/userw/dict/typeQuery', params).then((res: any) => { | |||
if (res && res.code === 0) { | |||
//数据转换 | |||
let bizContent = res.data | |||
let data = bizContent.data || [] | |||
let data = bizContent.result || [] | |||
//数据渲染 | |||
console.log('data', bizContent) | |||
tableData.value = data | |||
@@ -323,7 +342,8 @@ function getList() { | |||
//点击行 | |||
function rowClick(row, column, event) { | |||
initTable.value = true | |||
childNodeForm.value.dictTypeId = row.id //添加所关联的ID | |||
// childNodeForm.value.dictTypeId = row.id //添加所关联的ID | |||
childNodeForm.value.typeId = row.id //添加所关联的ID | |||
title.value = row.name //标题 | |||
getListChild(row.id) | |||
} | |||
@@ -331,15 +351,20 @@ function rowClick(row, column, event) { | |||
//获取子List | |||
function getListChild(dictTypeId) { | |||
tableLodingChange.value = true | |||
BaseService.postN('/userw/dict/itemlistquery', { | |||
dictTypeId: dictTypeId, | |||
///userw/dict/itemlistquery | |||
BaseService.postN('/userw/dict/typeView', { | |||
// dictTypeId: dictTypeId, | |||
typeId: dictTypeId, | |||
}).then((res: any) => { | |||
if (res && res.code === 0) { | |||
//数据转换 | |||
let bizContent = res.data | |||
let data = bizContent.dictItems || [] | |||
let data = bizContent.dictType.dictItems || [] | |||
//数据渲染 | |||
sonData.value = data | |||
sonData.value.forEach(item => { | |||
item.itemOrder = item.order | |||
}); | |||
tableLodingChange.value = false | |||
} else { | |||
tableLodingChange.value = false | |||
@@ -352,9 +377,10 @@ function getListChild(dictTypeId) { | |||
function submitForm(formEl) { | |||
formEl.validate((valid: any, fields: any) => { | |||
if (valid) { | |||
sizeForm.value.dictTypeId = sizeForm.value.id | |||
// sizeForm.value.dictTypeId = sizeForm.value.id | |||
sizeForm.value.typeId = sizeForm.value.id | |||
BaseService.postN( | |||
addStart.value ? '/userw/dict/typeupdate' : '/userw/dict/typeadd', | |||
addStart.value ? '/userw/dict/typeUpdate' : '/userw/dict/typeAdd', | |||
sizeForm.value | |||
).then((res: any) => { | |||
if (res && res.code === 0) { | |||
@@ -376,9 +402,10 @@ function submitForm(formEl) { | |||
function formSubmission(formEl) { | |||
formEl.validate((valid: any, fields: any) => { | |||
if (valid) { | |||
// sizeForm.value.typeId = sizeForm.value.id | |||
//添加 | |||
BaseService.postN( | |||
addStart.value ? '/userw/dict/itemupdate' : '/userw/dict/itemadd', | |||
addStart.value ? '/userw/dict/itemUpdate' : '/userw/dict/itemAdd', | |||
childNodeForm.value | |||
).then((res: any) => { | |||
if (res && res.code === 0) { | |||
@@ -390,10 +417,11 @@ function formSubmission(formEl) { | |||
name: '', | |||
code: '', | |||
description: '', | |||
order: 1, | |||
itemOrder: 1, | |||
} | |||
childNode.value = false | |||
getListChild(childNodeForm.value.dictTypeId) | |||
// getListChild(childNodeForm.value.dictTypeId) | |||
getListChild(childNodeForm.value.typeId) | |||
} else { | |||
ElMessage.error(res.message) | |||
} |
@@ -398,7 +398,13 @@ const codeHandle = (type) => { | |||
if (!valid) { | |||
return false | |||
} | |||
BaseService.post('/iaw/message/sendMessage', { mobile: dataForm.value.mobile }).then( | |||
//0登录 1注册 2忘记密码 3修改手机号 | |||
const data = { | |||
businessType: 0, | |||
loginSource: '713b5ffba6b04fbd8480d46f625cef51', | |||
mobile: dataForm.value.mobile | |||
} | |||
BaseService.post('/iaw/portal/sendCode', data).then( | |||
(res: any) => { | |||
if (res && res.statusCode === 0) { | |||
ElMessage.success('验证码已成功发送') |
@@ -216,7 +216,8 @@ | |||
if (!valid) { | |||
return false; | |||
} | |||
BaseService.post('/iaw/message/sendMessage', { mobile: dataForm.value.mobile }).then((res: any) => { | |||
//iaw/message/sendMessage | |||
BaseService.post('/iaw/portal/sendCode', { mobile: dataForm.value.mobile }).then((res: any) => { | |||
if (res && res.statusCode === 0) { | |||
ElMessage.success("验证码已成功"); | |||
} else { |
@@ -18,11 +18,24 @@ export default defineConfig(({ command, mode }) => { | |||
return { | |||
base: './', //打包路径 | |||
// ...其他配置... | |||
optimizeDeps: { | |||
include: [ | |||
'vue', | |||
'vue-router', | |||
'pinia', // 如果你用了 Pinia | |||
// 其他核心依赖... | |||
], | |||
exclude: [ | |||
// 'lodash', // 排除已知重型依赖 | |||
'moment' // 排除已知重型依赖 | |||
] | |||
}, | |||
plugins: [ | |||
legacy({ | |||
// targets: ['defaults'], // 需要兼容的目标列表,可以设置多个 , 'not IE 11' | |||
// additionalLegacyPolyfills: ['regenerator-runtime/runtime'] // 面向IE11时需要此插件 | |||
}), | |||
// legacy({ | |||
// // targets: ['defaults'], // 需要兼容的目标列表,可以设置多个 , 'not IE 11' | |||
// // additionalLegacyPolyfills: ['regenerator-runtime/runtime'] // 面向IE11时需要此插件 | |||
// }), | |||
vue(), | |||
VueLayouts(), | |||
@@ -62,13 +75,21 @@ export default defineConfig(({ command, mode }) => { | |||
}, | |||
//启动服务配置 | |||
server: { | |||
host: '0.0.0.0', | |||
host: 'localhost', | |||
port: 8085, | |||
hmr:true, | |||
open: true, // 类型: boolean | string在服务器启动时自动在浏览器中打开应用程序; | |||
// hmr: true, // 确保 HMR 启用 | |||
// force: true, // 强制依赖预构建(vite 3.x+) | |||
// open: true, // 类型: boolean | string在服务器启动时自动在浏览器中打开应用程序; | |||
cors: true, // 类型: boolean | CorsOptions 为开发服务器配置 CORS。默认启用并允许任何源 | |||
watch: { | |||
usePolling: true, // 轮询文件变化 | |||
interval: 1000 // 每秒检查一次 | |||
}, | |||
hmr: { | |||
host: 'localhost', // 显式指定 host | |||
port: 5173, // 指定端口(需与 dev server 一致) | |||
protocol: 'ws' // 强制使用 WebSocket | |||
}, | |||
proxy: { | |||
'/common': { | |||
target: 'https://medusa.etcjz.cn', //这里填入你要请求的接口的前缀 | |||
@@ -115,6 +136,10 @@ export default defineConfig(({ command, mode }) => { | |||
'/userw': { | |||
target: env.VITE_APP_BASE_URL_N, | |||
changeOrigin: true, | |||
}, | |||
'/newDev': { | |||
target: env.VITE_APP_EXPORT_URL_NEW, | |||
changeOrigin: true, | |||
}, | |||
'/invw': { | |||
target: env.VITE_APP_BASE_URL_N, |