diff --git a/admin/src/api/systemConfig.js b/admin/src/api/systemConfig.js index 1b116ca26b04754c9e907944b6084fc1a3929697..265618761cda716c6013d59b80e0ea83faae2cf7 100644 --- a/admin/src/api/systemConfig.js +++ b/admin/src/api/systemConfig.js @@ -8,51 +8,51 @@ // | Author: CRMEB Team // +---------------------------------------------------------------------- -import request from '@/utils/request' +import request from "@/utils/request"; export function configCheckUnique(pram) { const data = { name: pram.name - } + }; return request({ - url: '/admin/system/config/check', - method: 'GET', + url: "/admin/system/config/check", + method: "GET", params: data - }) + }); } export function configDelete(pram) { const data = { id: pram.id - } + }; return request({ - url: '/admin/system/config/delete', - method: 'GET', + url: "/admin/system/config/delete", + method: "GET", params: data - }) + }); } export function configInfo(pram) { const data = { formId: pram.id - } + }; return request({ - url: '/admin/system/config/info', - method: 'GET', + url: "/admin/system/config/info", + method: "GET", params: data - }) + }); } export function configList(pram) { const data = { page: pram.page, limit: pram.limit - } + }; return request({ - url: '/admin/system/config/list', - method: 'GET', + url: "/admin/system/config/list", + method: "GET", params: data - }) + }); } export function configSave(pram) { @@ -67,55 +67,73 @@ export function configSave(pram) { type: pram.type, value: pram.value // value 存储表单配置数据,其他的参数来自于父级数据 justForAPI } - } + }; return request({ - url: '/admin/system/config/save', - method: 'POST', + url: "/admin/system/config/save", + method: "POST", params: data - }) + }); } export function configSaveForm(pram) { return request({ - url: '/admin/system/config/save/form', - method: 'POST', + url: "/admin/system/config/save/form", + method: "POST", data: pram - }) + }); } export function configUpdate(pram) { const data = { id: pram.id, systemConfigRequest: pram.systemConfigRequest - } + }; return request({ - url: '/admin/system/config/update', - method: 'POST', + url: "/admin/system/config/update", + method: "POST", params: data - }) + }); } export function configSaveUniq(pram) { const data = { key: pram.key, value: pram.value - } + }; return request({ - url: '/admin/system/config/saveuniq', - method: 'POST', + url: "/admin/system/config/saveuniq", + method: "POST", params: data - }) + }); } export function configGetUniq(pram) { const data = { key: pram.key - } + }; return request({ - url: '/admin/system/config/getuniq', - method: 'GET', + url: "/admin/system/config/getuniq", + method: "GET", params: data - }) + }); } - +/** + * @description 一号通 应用保存 + */ +export function passAppSaveApi(data) { + return request({ + url: "/admin/pass/appsave", + method: "post", + data + }); +} +/** + * @description 一号通 应用详情获取 + */ +export function passAppInfoApi() { + return request({ + url: "/admin/pass/appget", + method: "get" + }); +} diff --git a/admin/src/router/modules/operation.js b/admin/src/router/modules/operation.js index b4d242b5dd68f3f7250b036fe76e7accdd551b42..df8271d5664360052115d72979729b72e29e2033 100644 --- a/admin/src/router/modules/operation.js +++ b/admin/src/router/modules/operation.js @@ -8,157 +8,182 @@ // | Author: CRMEB Team // +---------------------------------------------------------------------- -import Layout from '@/layout' +import Layout from "@/layout"; const operationRouter = { - path: '/operation', + path: "/operation", component: Layout, - redirect: '/operation/setting', - name: 'Operation', + redirect: "/operation/setting", + name: "Operation", meta: { - title: '设置', - icon: 'clipboard', - roles: ['admin'] + title: "设置", + icon: "clipboard", + roles: ["admin"] }, children: [ { - path: 'setting', - name: 'setting', - component: () => import('@/views/systemSetting/setting'), + path: "setting", + name: "setting", + component: () => import("@/views/systemSetting/setting"), meta: { - title: '系统设置', - icon: 'clipboard' + title: "系统设置", + icon: "clipboard" } }, { - path:'notification', - name:'notification', - component: () => import('@/views/systemSetting/notification'), - meta:{ - title:'消息通知', - icon:'clipboard' + path: "notification", + name: "notification", + component: () => import("@/views/systemSetting/notification"), + meta: { + title: "消息通知", + icon: "clipboard" + } + }, + { + path: "onePass", + name: "onePass", + component: () => import("@/views/sms/smsConfig"), + meta: { + title: "一号通", + icon: "clipboard" } }, { - path: 'onePass', - name: 'onePass', - component: () => import('@/views/sms/smsConfig'), + path: "onePassConfig", + name: "onePassConfig", + component: () => import("@/views/sms/smsConfig/config"), meta: { - title: '一号通', - icon: 'clipboard' + title: "一号通配置", + icon: "clipboard" } }, { - path: 'roleManager', - name: 'RoleManager', - component: () => import('@/views/systemSetting/administratorAuthority'), + path: "roleManager", + name: "RoleManager", + component: () => import("@/views/systemSetting/administratorAuthority"), meta: { - title: '管理权限', - icon: 'clipboard', - roles: ['admin'] + title: "管理权限", + icon: "clipboard", + roles: ["admin"] }, children: [ { - path: 'identityManager', - component: () => import('@/views/systemSetting/administratorAuthority/identityManager'), - name: 'identityManager', - meta: { title: '角色管理', icon: '' } + path: "identityManager", + component: () => + import("@/views/systemSetting/administratorAuthority/identityManager"), + name: "identityManager", + meta: { title: "角色管理", icon: "" } }, { - path: 'adminList', - component: () => import('@/views/systemSetting/administratorAuthority/adminList'), - name: 'adminList', - meta: { title: '管理员列表', icon: '' } + path: "adminList", + component: () => + import("@/views/systemSetting/administratorAuthority/adminList"), + name: "adminList", + meta: { title: "管理员列表", icon: "" } }, { - path: 'promiseRules', - component: () => import('@/views/systemSetting/administratorAuthority/permissionRules'), - name: 'promiseRules', - meta: { title: '权限规则', icon: '' } + path: "promiseRules", + component: () => + import("@/views/systemSetting/administratorAuthority/permissionRules"), + name: "promiseRules", + meta: { title: "权限规则", icon: "" } } ] }, { - path: 'systemSms', - component: () => import('@/views/sms'), - name: 'systemSms', + path: "systemSms", + component: () => import("@/views/sms"), + name: "systemSms", meta: { - title: '短信设置', - icon: 'clipboard', - roles: ['admin'] + title: "短信设置", + icon: "clipboard", + roles: ["admin"] }, children: [ { - path: 'config', - component: () => import('@/views/sms/smsConfig'), - name: 'SmsConfig', - meta: { title: '短信账户', noCache: true } + path: "config", + component: () => import("@/views/sms/smsConfig"), + name: "SmsConfig", + meta: { title: "短信账户", noCache: true } }, { - path: 'template', - component: () => import('@/views/sms/smsTemplate'), - name: 'SmsTemplate', - meta: { title: '短信模板', noCache: true, activeMenu: `/operation/onePass` } + path: "template", + component: () => import("@/views/sms/smsTemplate"), + name: "SmsTemplate", + meta: { + title: "短信模板", + noCache: true, + activeMenu: `/operation/onePass` + } }, { - path: 'pay', - component: () => import('@/views/sms/smsPay'), - name: 'SmsPay', - meta: { title: '短信购买', noCache: true, activeMenu: `/operation/onePass` } + path: "pay", + component: () => import("@/views/sms/smsPay"), + name: "SmsPay", + meta: { + title: "短信购买", + noCache: true, + activeMenu: `/operation/onePass` + } }, { - path: 'message', - component: () => import('@/views/sms/smsMessage'), - name: 'SmsMessage', - meta: { title: '短信开关', noCache: true } + path: "message", + component: () => import("@/views/sms/smsMessage"), + name: "SmsMessage", + meta: { title: "短信开关", noCache: true } } ] }, { - path: 'deliverGoods', - name: 'deliverGoods', + path: "deliverGoods", + name: "deliverGoods", alwaysShow: true, - component: () => import('@/views/systemSetting/deliverGoods'), + component: () => import("@/views/systemSetting/deliverGoods"), meta: { - title: '发货设置', - roles: ['admin'] + title: "发货设置", + roles: ["admin"] }, children: [ { - path: 'takeGoods', - component: () => import('@/views/systemSetting/deliverGoods/takeGoods'), - name: 'takeGoods', - meta: { title: '提货设置', noCache: true,roles: ['admin'] }, + path: "takeGoods", + component: () => + import("@/views/systemSetting/deliverGoods/takeGoods"), + name: "takeGoods", + meta: { title: "提货设置", noCache: true, roles: ["admin"] }, children: [ { - path: 'deliveryAddress', - component: () => import('@/views/systemSetting/deliverGoods/takeGoods/deliveryAddress'), - name: 'deliveryAddress', - meta: { title: '提货点', icon: '' } + path: "deliveryAddress", + component: () => + import("@/views/systemSetting/deliverGoods/takeGoods/deliveryAddress"), + name: "deliveryAddress", + meta: { title: "提货点", icon: "" } }, { - path: 'collateOrder', - component: () => import('@/views/systemSetting/deliverGoods/takeGoods/collateOrder'), - name: 'collateOrder', - meta: { title: '核销订单', icon: '' } + path: "collateOrder", + component: () => + import("@/views/systemSetting/deliverGoods/takeGoods/collateOrder"), + name: "collateOrder", + meta: { title: "核销订单", icon: "" } }, { - path: 'collateUser', - component: () => import('@/views/systemSetting/deliverGoods/takeGoods/collateUser'), - name: 'collateUser', - meta: { title: '核销员', icon: '' } - }, + path: "collateUser", + component: () => + import("@/views/systemSetting/deliverGoods/takeGoods/collateUser"), + name: "collateUser", + meta: { title: "核销员", icon: "" } + } ] }, { - path: 'freightSet', - component: () => import('@/views/systemSetting/deliverGoods/freightSet'), - name: 'freightSet', - meta: { title: '运费模板', noCache: true } - }, + path: "freightSet", + component: () => + import("@/views/systemSetting/deliverGoods/freightSet"), + name: "freightSet", + meta: { title: "运费模板", noCache: true } + } ] - }, + } ] -} +}; -export default operationRouter //collate +export default operationRouter; //collate diff --git a/admin/src/utils/ZBKJIutil.js b/admin/src/utils/ZBKJIutil.js index c0ed74a8570a3b2e840af2155695c16c39973b57..aa57de6097088cb5ce16e9d0abbd7ba6bb2a9414 100644 --- a/admin/src/utils/ZBKJIutil.js +++ b/admin/src/utils/ZBKJIutil.js @@ -8,7 +8,7 @@ // | Author: CRMEB Team // +---------------------------------------------------------------------- -import store from '@/store' +import store from "@/store"; /** * 根据需求过滤掉treeData中的child.length === 0的数据 @@ -16,38 +16,51 @@ import store from '@/store' * @returns {Uint8Array | BigInt64Array | any[] | Float64Array | Int8Array | Float32Array | Int32Array | Uint32Array | Uint8ClampedArray | BigUint64Array | Int16Array | Uint16Array} */ export function clearTreeData(treeData) { - return treeData.map((item) => { + return treeData.map(item => { if (item.child.length === 0) { - delete item.child + delete item.child; } else { - clearTreeData(item.child) + clearTreeData(item.child); } - return item - }) + return item; + }); } -export function addTreeListLabel(treeData) { // 因树形控件在slot-scope模式下显示字段只能为label为此自定义添加label字段和child=children - return treeData.map((item) => { - if ((item.name === '设置' || item.name === '管理员列表' || - item.name === '身份管理' || item.name === '管理权限' || - item.name === '管理员列表' || item.name === '权限规则') && store.getters.name !== 'admin') { - item.disabled = true +export function addTreeListLabel(treeData) { + // 因树形控件在slot-scope模式下显示字段只能为label为此自定义添加label字段和child=children + return treeData.map(item => { + if ( + (item.name === "设置" || + item.name === "管理员列表" || + item.name === "身份管理" || + item.name === "管理权限" || + item.name === "管理员列表" || + item.name === "权限规则") && + store.getters.name !== "admin" + ) { + item.disabled = true; } - item.label = item.name - return item - }) + item.label = item.name; + return item; + }); } export function addTreeListLabelForCasCard(treeData, child) { - treeData.map((item) => { - if ((item.name === '设置' || item.name === '管理员列表' || - item.name === '身份管理' || item.name === '管理权限' || - item.name === '管理员列表' || item.name === '权限规则') && store.getters.name !== 'admin') { - item.disabled = true + treeData.map(item => { + if ( + (item.name === "设置" || + item.name === "管理员列表" || + item.name === "身份管理" || + item.name === "管理权限" || + item.name === "管理员列表" || + item.name === "权限规则") && + store.getters.name !== "admin" + ) { + item.disabled = true; } - item.label = item.name - return item - }) + item.label = item.name; + return item; + }); } //加法函数,用来得到精确的加法结果 @@ -58,14 +71,14 @@ export function Add(arg1, arg2) { arg2 = parseFloat(arg2); var r1, r2, m; try { - r1 = arg1.toString().split(".")[1].length + r1 = arg1.toString().split(".")[1].length; } catch (e) { - r1 = 0 + r1 = 0; } try { - r2 = arg2.toString().split(".")[1].length + r2 = arg2.toString().split(".")[1].length; } catch (e) { - r2 = 0 + r2 = 0; } m = Math.pow(100, Math.max(r1, r2)); return (this.Mul(arg1, m) + this.Mul(arg2, m)) / m; @@ -82,30 +95,46 @@ export function Mul(arg1, arg2) { s1 = arg1.toString(), s2 = arg2.toString(); try { - m += s1.split(".")[1].length + m += s1.split(".")[1].length; } catch (e) {} try { - m += s2.split(".")[1].length + m += s2.split(".")[1].length; } catch (e) {} - return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m); + return ( + (Number(s1.replace(".", "")) * Number(s2.replace(".", ""))) / + Math.pow(10, m) + ); } //替换安全域名 export function setDomain(url) { - url = url ? url.toString() : ''; + url = url ? url.toString() : ""; // 正则替换存在的转义符 - url = url.replace(/\\/g,''); - url = window.location.protocol==='https:'? url.replace('http://','https://') : url; - if(url.startsWith('src="')){ - url = url.replaceAll('src="',''); + url = url.replace(/\\/g, ""); + url = + window.location.protocol === "https:" + ? url.replace("http://", "https://") + : url; + if (url.startsWith('src="')) { + url = url.replaceAll('src="', ""); } - if(url.startsWith('//img') && window.location.protocol==='https:'){ - url = url.replace('//img','https://img'); + if (url.startsWith("//img") && window.location.protocol === "https:") { + url = url.replace("//img", "https://img"); } return url; } // 过滤富文本中的 img 相对路径访问 export function replaceImgSrcHttps(content) { - return content.replaceAll('src="//','src="https://'); + return content.replaceAll('src="//', 'src="https://'); +} +/** + *计算table固定高度 + */ +export function getTableHeight(height) { + let windowHeight = + document.documentElement.clientHeight || document.body.clientHeight; + let herderHeight = 100; + let footerHeight = 20; + return windowHeight - herderHeight - footerHeight - height; } diff --git a/admin/src/views/sms/smsConfig/components/forgetPassword.vue b/admin/src/views/sms/smsConfig/components/forgetPassword.vue deleted file mode 100644 index 9b25bb02d1699129337815b9e9aa1470358707e2..0000000000000000000000000000000000000000 --- a/admin/src/views/sms/smsConfig/components/forgetPassword.vue +++ /dev/null @@ -1,238 +0,0 @@ - - - - - diff --git a/admin/src/views/sms/smsConfig/components/forgetPhone.vue b/admin/src/views/sms/smsConfig/components/forgetPhone.vue deleted file mode 100644 index dc8b405a17d4c4b991e83e7efb5a9e5dbbd8ed66..0000000000000000000000000000000000000000 --- a/admin/src/views/sms/smsConfig/components/forgetPhone.vue +++ /dev/null @@ -1,220 +0,0 @@ - - - - - diff --git a/admin/src/views/sms/smsConfig/components/loginFrom.vue b/admin/src/views/sms/smsConfig/components/loginFrom.vue deleted file mode 100644 index 70de1e95040b48a3ccecfe06b11d45d25f0e78ae..0000000000000000000000000000000000000000 --- a/admin/src/views/sms/smsConfig/components/loginFrom.vue +++ /dev/null @@ -1,188 +0,0 @@ - - - - diff --git a/admin/src/views/sms/smsConfig/components/register.vue b/admin/src/views/sms/smsConfig/components/register.vue deleted file mode 100644 index 397c903c3240bc886697774850f3e6fc164c7c6c..0000000000000000000000000000000000000000 --- a/admin/src/views/sms/smsConfig/components/register.vue +++ /dev/null @@ -1,225 +0,0 @@ - - - - diff --git a/admin/src/views/sms/smsConfig/components/tableList.vue b/admin/src/views/sms/smsConfig/components/tableList.vue deleted file mode 100644 index 786238e06755de491d934a5ea14a1a67198f9b9a..0000000000000000000000000000000000000000 --- a/admin/src/views/sms/smsConfig/components/tableList.vue +++ /dev/null @@ -1,693 +0,0 @@ - - - - - diff --git a/admin/src/views/sms/smsConfig/config.vue b/admin/src/views/sms/smsConfig/config.vue new file mode 100644 index 0000000000000000000000000000000000000000..70d45a9611361b9d29dcc418f82e5bf6be970b5c --- /dev/null +++ b/admin/src/views/sms/smsConfig/config.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/admin/src/views/sms/smsConfig/index.vue b/admin/src/views/sms/smsConfig/index.vue index 85ddf4d3a4b6e6820860602e27e8b64df4e066bf..8751dbab7a046433d1ef51885bcfb2d3e5394454 100644 --- a/admin/src/views/sms/smsConfig/index.vue +++ b/admin/src/views/sms/smsConfig/index.vue @@ -1,329 +1,35 @@ - -