diff --git a/public/favicon.ico b/public/favicon.ico index bb4651c..d186dd7 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/img/logo1.png b/public/img/logo1.png index d483520..d186dd7 100644 Binary files a/public/img/logo1.png and b/public/img/logo1.png differ diff --git a/src/api/model/orders.js b/src/api/model/orders.js index f2ddcee..33be3e1 100644 --- a/src/api/model/orders.js +++ b/src/api/model/orders.js @@ -11,6 +11,13 @@ export default { return await http.post(this.url, params); }, }, + emailDelete:{ + url: `${config.API_URL}/mail.sync.delete`, + name: "邮件同步记录删除", + post: async function (params) { + return await http.post(this.url, params); + }, + }, info:{ url: `${config.API_URL}/mail.sync.body.info`, name: "邮件正文", @@ -83,6 +90,13 @@ export default { return await http.post(this.url, params); }, }, + field:{ + url: `${config.API_URL}/`, + name: "维修工单检索", + post: async function (params) { + return await http.post(this.url,params); + } + } }, maintenance:{ list:{ @@ -168,6 +182,36 @@ export default { post: async function (params) { return await http.post(this.url,params); } + }, + status:{ + url: `${config.API_URL}/maintenance.order.business.status.list`, + name: "维保工单业务状态", + post: async function (params) { + return await http.post(this.url,params); + } + }, + optionList:{ + url: `${config.API_URL}/maintenance.repair.options.const.list`, + name: "维保工单常量下拉", + post: async function (params) { + return await http.post(this.url,params); + } + }, + }, + plan:{ + list:{ + url: `${config.API_URL}/maintenance.plan.list`, + name: "维保计划列表", + get: async function (params) { + return await http.post(this.url, params); + }, + }, + field:{ + url: `${config.API_URL}/`, + name: "维保计划检索", + post: async function (params) { + return await http.post(this.url,params); + } } }, sock: { @@ -177,6 +221,13 @@ export default { get: async function (params) { return await http.post(this.url, params); }, + }, + field:{ + url: `${config.API_URL}/inventory.field.list`, + name: "库存列表检索", + post: async function (params) { + return await http.post(this.url,params); + } } }, out:{ @@ -186,6 +237,13 @@ export default { get: async function (params) { return await http.post(this.url, params); }, + }, + field:{ + url: `${config.API_URL}/out.stock.field.list`, + name: "销售出库清单检索", + post: async function (params) { + return await http.post(this.url,params); + } } } } diff --git a/src/api/model/setup.js b/src/api/model/setup.js index b7fd029..afed544 100644 --- a/src/api/model/setup.js +++ b/src/api/model/setup.js @@ -6,16 +6,168 @@ export default { add: { url: `${config.API_URL}/machine.room.add`, name: "新增机房配置", - post: async function (data = {}) { + post: async function (data) { return await http.post(this.url, data); }, }, list: { url: `${config.API_URL}/machine.room.list`, name: "机房配置列表", - get: async function (data = {}) { + get: async function (data) { return await http.post(this.url, data); }, }, + }, + mail:{ + set:{ + url: `${config.API_URL}/mail.config.set`, + name: "源邮件配置", + post: async function (data) { + return await http.post(this.url, data); + }, + }, + get:{ + url: `${config.API_URL}/mail.config.get`, + name: "源邮件获取", + post: async function (data) { + return await http.post(this.url, data); + }, + } + }, + k3:{ + set:{ + url: `${config.API_URL}/k3.api.config.set`, + name: "金蝶ERP接口配置", + post: async function (data) { + return await http.post(this.url, data); + }, + }, + get:{ + url: `${config.API_URL}/k3.api.config.get`, + name: "金蝶ERP接口配置获取", + post: async function (data) { + return await http.post(this.url, data); + }, + } + }, + cost:{ + list:{ + url: `${config.API_URL}/cost.config.const.list`, + name: "费用类别常量列表", + post: async function (data) { + return await http.post(this.url, data); + }, + }, + set:{ + url: `${config.API_URL}/cost.category.add`, + name: "新增费用类别配置", + post: async function (data) { + return await http.post(this.url, data); + }, + }, + get:{ + url: `${config.API_URL}/cost.category.list`, + name: "费用类别配置", + post: async function (data) { + return await http.post(this.url, data); + }, + } + }, + material:{ + list:{ + url: `${config.API_URL}/material.cost.list`, + name: "物料成本列表", + get: async function (data) { + return await http.post(this.url, data); + }, + }, + add:{ + url: `${config.API_URL}/material.cost.add`, + name: "物料成本添加", + post: async function (data) { + return await http.post(this.url, data); + }, + }, + template:{ + url: `${config.API_URL}/material.cost.import.template`, + name: "物料成本导入模版", + post: async function (params) { + return await http.get(this.url,params,{responseType: 'arraybuffer'}); + } + }, + import:{ + url: `${config.API_URL}/material.cost.batch.import`, + name: "物料成本导入", + post: async function (params) { + return await http.post(this.url,params,{'Content-Type': 'multipart/form-data'}); + } + }, + }, + crontab:{ + configList:{ + url: `${config.API_URL}/crontab.config.list`, + name: "定时系统配置列表", + get: async function (data) { + return await http.post(this.url, data); + }, + }, + list:{ + url: `${config.API_URL}/crontab.list`, + name: "定时任务列表", + get: async function (data) { + return await http.post(this.url, data); + }, + }, + add:{ + url: `${config.API_URL}/crontab.add`, + name: "添加配置", + post: async function (data) { + return await http.post(this.url, data); + }, + }, + status:{ + url: `${config.API_URL}/crontab.status`, + name: "定时任务状态", + post: async function (data) { + return await http.post(this.url, data); + }, + }, + delete:{ + url: `${config.API_URL}/crontab.delete`, + name: "删除配置", + post: async function (data) { + return await http.post(this.url, data); + }, + }, + describe:{ + url: `${config.API_URL}/crontab.describe`, + name: "定时任务表达式转换", + post: async function (data) { + return await http.post(this.url, data); + }, + } + }, + bom:{ + list:{ + url: `${config.API_URL}/bom.list`, + name: "bom列表", + get: async function (data) { + return await http.post(this.url, data); + }, + }, + info:{ + url: `${config.API_URL}/bom.detail`, + name: "bom详情", + post: async function (data) { + return await http.post(this.url, data); + }, + }, + refresh:{ + url: `${config.API_URL}/bom.refresh`, + name: "重新拉取bom", + post: async function (data) { + return await http.post(this.url, data); + }, + } } }; diff --git a/src/api/model/system.js b/src/api/model/system.js index bf86218..ad2e459 100644 --- a/src/api/model/system.js +++ b/src/api/model/system.js @@ -113,6 +113,20 @@ export default { return await http.post(this.url, params); } }, + dataMenu:{ + url: `${config.API_URL}/auth.data.permission.checked`, + name: "数据权限", + post: async function (params) { + return await http.post(this.url, params); + } + }, + dataAuth:{ + url: `${config.API_URL}/auth.data.permission.add`, + name: "数据授权", + post: async function (params) { + return await http.post(this.url, params); + } + }, roleCode: { url: `${config.API_URL}/authorize.role.codes`, name: "角色对应CODE列表", @@ -482,5 +496,5 @@ export default { } } }, - + }; diff --git a/src/assets/icons/ConfirmOrder.vue b/src/assets/icons/ConfirmOrder.vue new file mode 100644 index 0000000..055b709 --- /dev/null +++ b/src/assets/icons/ConfirmOrder.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/assets/icons/CostSetup.vue b/src/assets/icons/CostSetup.vue new file mode 100644 index 0000000..7c55723 --- /dev/null +++ b/src/assets/icons/CostSetup.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/assets/icons/JbDelete.vue b/src/assets/icons/JbDelete.vue new file mode 100644 index 0000000..7af94d2 --- /dev/null +++ b/src/assets/icons/JbDelete.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/assets/icons/K3Api.vue b/src/assets/icons/K3Api.vue new file mode 100644 index 0000000..742997d --- /dev/null +++ b/src/assets/icons/K3Api.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/assets/icons/MaintenanceSetup.vue b/src/assets/icons/MaintenanceSetup.vue new file mode 100644 index 0000000..9771a3d --- /dev/null +++ b/src/assets/icons/MaintenanceSetup.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/assets/icons/MaterialSetup.vue b/src/assets/icons/MaterialSetup.vue new file mode 100644 index 0000000..12731cb --- /dev/null +++ b/src/assets/icons/MaterialSetup.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/assets/icons/RegularTime.vue b/src/assets/icons/RegularTime.vue new file mode 100644 index 0000000..cacedf8 --- /dev/null +++ b/src/assets/icons/RegularTime.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/src/assets/icons/index.js b/src/assets/icons/index.js index 3c548e4..b262b39 100644 --- a/src/assets/icons/index.js +++ b/src/assets/icons/index.js @@ -26,6 +26,12 @@ export { default as Finish } from './Finish.vue' export { default as FormXls } from './FormXls.vue' export { default as AgentMaintenance } from './AgentMaintenance.vue' export { default as CostAllocation } from './CostAllocation.vue' +export { default as K3Api } from './K3Api.vue' +export { default as RegularTime } from './RegularTime.vue' +export { default as CostSetup } from './CostSetup.vue' +export { default as MaterialSetup } from './MaterialSetup.vue' +export { default as MaintenanceSetup } from './MaintenanceSetup.vue' +export { default as ConfirmOrder } from './ConfirmOrder.vue' export { default as DataSource } from './DataSource.vue' export { default as MachineRoom } from './MachineRoom.vue' export { default as CreateFolder } from './CreateFolder.vue' @@ -54,6 +60,7 @@ export { default as FileDwg } from './file/Dwg.vue' export { default as FileTar } from './file/Tar.vue' // 列表按钮 +export { default as JbDelete } from './JbDelete.vue' export { default as Delete } from './Delete.vue' export { default as Edit } from './Edit.vue' export { default as Review } from './Review.vue' diff --git a/src/components/scImport/index.vue b/src/components/scImport/index.vue index 6c78af3..5b939e8 100644 --- a/src/components/scImport/index.vue +++ b/src/components/scImport/index.vue @@ -65,7 +65,6 @@ + + diff --git a/src/views/login/bindWechat.vue b/src/views/login/bindWechat.vue new file mode 100644 index 0000000..8bb6bbb --- /dev/null +++ b/src/views/login/bindWechat.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 056c0cd..c4cfdc2 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -26,11 +26,11 @@
{{ $t('login.signInOther') }}
-
+
微信登录
-
+
钉钉登录
@@ -103,31 +103,154 @@ } }, created: function () { + // 监听缓存变化 addEventListener + window.addEventListener('storage',this.storageChange); + this.$TOOL.cookie.remove("TOKEN") this.$TOOL.data.remove("USER_INFO") this.$TOOL.data.remove("MENU") + this.$TOOL.data.remove("USER_INFO") this.$TOOL.data.remove("PERMISSIONS") this.$TOOL.data.remove("DASHBOARDGRID") this.$TOOL.data.remove("grid") this.$store.commit("clearViewTags") this.$store.commit("clearKeepLive") this.$store.commit("clearIframeList") + + localStorage.removeItem('bindDingTalk'); + localStorage.removeItem('bindWechat'); + }, + unmounted() { + window.removeEventListener('storage', this.storageChange); }, methods: { - configDark() { - this.config.dark = this.config.dark ? false : true - }, configLang(command) { this.config.lang = command.value }, - wechatLogin() { - this.showWechatLogin = true - this.WechatLoginCode = "SCUI-823677237287236-" + new Date().getTime() - this.isWechatLoginResult = false - setTimeout(() => { - this.isWechatLoginResult = true - }, 3000) - } + + storageChange(e){ + let dingTalk = localStorage.getItem('bindDingTalk'); + let wechat = localStorage.getItem('bindWechat'); + if(e.key == 'DINGTALK_LOGIN_MESSAGE'){ + if(dingTalk == 1 && typeof e.newValue =="string" && e.newValue!=''){ + this.dingTalkLogin(e.newValue) + } + localStorage.removeItem("DINGTALK_LOGIN_MESSAGE"); + } + + if(e.key == 'WECHAT_LOGIN_MESSAGE'){ + if(wechat == 1 && typeof e.newValue =="string" && e.newValue!=''){ + this.wechatLogin(e.newValue); + } + localStorage.removeItem("WECHAT_LOGIN_MESSAGE"); + } + }, + // 微信扫码 + async bindWechat(){ + const res = await this.$API.auth.wechatCode.post(); + if(res.code == 200){ + const url = JSON.parse(JSON.stringify(res.data.redirect)); + localStorage.setItem('bindWechat','1'); + window.open(url); + } + }, + // 钉钉扫码 + async bindDingTalk(){ + const res = await this.$API.auth.dingTalkCode.post(); + if(res.code == 200){ + const url = JSON.parse(JSON.stringify(res.data.redirect)); + localStorage.setItem('bindDingTalk','1'); + window.open(url); + } + }, + // 钉钉登录 + async dingTalkLogin(e){ + let em = JSON.parse(e); + let params = {code:em.code}; + const user = await this.$API.auth.dingTalkLogin.post(params); + if(user.code == 200){ + await this.setLoginData(user); + }else{ + return false; + } + }, + + async setLoginData(user) { + this.$TOOL.cookie.set("TOKEN", user.data.token, { + expires: 0 + }) + this.$TOOL.data.set("USER_INFO", user.data.user) + if(user.data.user.avatar!=''){ + this.$store.commit("SET_LOGIN_AVATAR", user.data.user.avatar); + } + this.$store.commit("SET_LOGIN_NAME", user.data.user.name); + + //获取菜单 + let menu = null; + menu = await this.$API.system.menu.myMenus.get() + if (menu.code === 200) { + if (menu.data.menu.length === 0) { + this.islogin = false + await this.$alert("当前用户无任何菜单权限,请联系系统管理员", "无权限访问", { + type: 'error', + center: true + }) + return false + } + this.$TOOL.data.set("MENU", menu.data.menu) + const data_auth = this.$TOOL.objCopy(menu.data.permissions); + data_auth.auth = this.$TOOL.authPermissions(data_auth.data_permissions); + this.$TOOL.data.set("PERMISSIONS", data_auth) + this.$TOOL.data.set("DASHBOARDGRID", menu.data.dashboardGrid) + } else { + this.$message.warning(menu.msg) + return false + } + this.$router.replace({ + path: '/' + }) + }, + // passKey 登录 + async passKeyLogin(){ + const res = await this.$API.system.user.generateAuthentication.post(); + if(res.code == 200){ + const publicKeyConfigForLogin = { + challenge: Uint8Array.from(res.data.challenge), + timeout: res.data.timeout, + rpId:res.data.rpId, + userVerification: res.data.userVerification + }; + try { + const assertion = await navigator.credentials.get({ publicKey:publicKeyConfigForLogin }); + await this.passKeyVerify(assertion); + }catch(err){ + console.log(err,'您已取消'); + } + } + }, + async passKeyVerify(assertion) { + let params = { + id: assertion.id, + rawId: this.bufferToBase64URL(assertion.rawId), + type: assertion.type, + response: { + authenticatorData: this.bufferToBase64URL(assertion.response.authenticatorData), + clientDataJSON: this.bufferToBase64URL(assertion.response.clientDataJSON), + signature: this.bufferToBase64URL(assertion.response.signature), + userHandle:this.bufferToBase64URL(assertion.response.userHandle), + } + } + const user = await this.$API.system.user.verifyAuthentication.post(params); + if(user.code == 200){ + await this.setLoginData(user); + } + }, + bufferToBase64URL(buffer) { + return btoa(String.fromCharCode.apply(null, new Uint8Array(buffer))) + .replace(/\+/g, "-") + .replace(/\//g, "_") + .replace(/=/g, ""); + }, } } @@ -159,7 +282,7 @@ h2{ height: 36px; display: flex; - align-items: baseline; + align-items: flex-start; font-size: 24px; position: relative; padding-left: 18px; @@ -167,7 +290,7 @@ font-weight: 500; .origin{ position: absolute; - left: 0; + left: 4px; top: 12px; display: inline-block; width: 8px; diff --git a/src/views/order/create-order.vue b/src/views/order/create-order.vue index 758223b..bb262c8 100644 --- a/src/views/order/create-order.vue +++ b/src/views/order/create-order.vue @@ -2,7 +2,7 @@ - +
工作时间
@@ -29,14 +29,9 @@
维保单号
- - - - - - - + + @@ -47,36 +42,35 @@
- - + + - - - + + + - + - - - - - - - + + + + + + + - - - + + @@ -88,33 +82,25 @@ -
-
-
-
维保工单信息
-
- - - + + - - - + + - - - + + @@ -126,9 +112,8 @@ - - - + + @@ -142,12 +127,16 @@ +
+
+
+
维保工单信息
+
- - - + + @@ -181,7 +170,7 @@
- 保 存 + 确认保存
@@ -196,26 +185,32 @@ export default { return{ size:"small", isSave:false, + setMap:{ + maintenance_level:[], + fault_type:[], + }, form:{ - maintenance_level: "234", // 维修等级 - fault_type: "234", // 故障类型 - fault_description: "234", // 故障描述 - requires_shutdown: "234", // 是否需要关机 - city: "234", // 机房城市 - park_name: "234", // 园区名称 - data_center_name: "234", // 机房/IDC名称 - rack_position: "234", // 机架位置 - device_sn: "234", // 整机SN - device_manufacturer: "234", // 整机厂商 - device_model: "234", // 整机型号 - component_serial_no: "234", // 部件序列号 - component_manufacturer: "234", // 部件厂商 - component_model: "234", // 部件型号 - component_pn: "234", // 部件零件PN号 - sla_expiration: "2024-08-21", // SLA到期时间 - bd_backup_count: "234", // 剩余BD数 - pe_confirmation_time: "2024-08-21", // PE确认时间 - warranty_end_date: "2024-08-21", // 保修期结束 + repair_order_no:"", + maintenance_grade:"", // 维修等级 + maintenance_level: "", // 维修等级 + fault_type: "", // 故障类型 + fault_description: "", // 故障描述 + requires_shutdown: "", // 是否需要关机 + city: "", // 机房城市 + park_name: "", // 园区名称 + data_center_name: "", // 机房/IDC名称 + rack_position: "", // 机架位置 + device_sn: "", // 整机SN + device_manufacturer: "", // 整机厂商 + device_model: "", // 整机型号 + component_serial_no: "", // 部件序列号 + component_manufacturer: "", // 部件厂商 + component_model: "", // 部件型号 + component_pn: "", // 部件零件PN号 + sla_expiration: "", // SLA到期时间 + bd_backup_count: "", // 剩余BD数 + pe_confirmation_time: "", // PE确认时间 + warranty_end_date: "", // 保修期结束 maintenance_plan: '' // 维保等级:1-铜牌;常量维护项 } } @@ -224,6 +219,12 @@ export default { }, methods:{ + async getSelect(name,num) { + const res = await this.$API.orders.order.maintenance.optionList.post({const_type:num}); + if(res.code == 200){ + this.setMap[name] = res.data; + } + }, save(){ this.$refs.form.validate(async (valid) => { if (valid) { @@ -260,7 +261,7 @@ export default { } .btnBox{ margin-top: 15px; - text-align: right; + text-align: left; padding: 0 10px; } diff --git a/src/views/order/dataConfirm/index.vue b/src/views/order/dataConfirm/index.vue index c0f067f..dc14e56 100644 --- a/src/views/order/dataConfirm/index.vue +++ b/src/views/order/dataConfirm/index.vue @@ -10,7 +10,7 @@ 部分确认 - + @@ -24,6 +24,7 @@
+
@@ -43,9 +44,10 @@
{{emailParams.sent_at}}
- 查看原邮件 + + 查看原邮件 - 确认维保 + 确认维保