From 57c5fcfd0a0120afab58a7a23023a6383c58d50b Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Fri, 26 Jan 2024 17:01:15 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E5=B7=A5=E5=8D=95=EF=BC=8C?=
=?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=8A=A5=E4=BF=AE=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 6 +-
api/device.js | 42 +++
api/dict.js | 23 ++
api/index.js | 9 +
api/login.js | 16 +-
api/repairOrder.js | 36 +++
components/form/index.vue | 9 +-
config.js | 2 +-
manifest.json | 23 +-
pages.json | 111 +++-----
pages/deviceReport/addForm.vue | 226 ++++++++++++++++
pages/deviceReport/index.vue | 242 +++++++++++++++++
pages/deviceReport/myDeviceReport.vue | 230 ++++++++++++++++
pages/index.vue | 98 ++++---
pages/login.vue | 33 +--
pages/mine/index.vue | 88 ++++---
pages/repairOrder/addForm.vue | 349 +++++++++++++++++++++++++
pages/repairOrder/detail.vue | 363 ++++++++++++++++++++++++++
pages/repairOrder/index.vue | 256 ++++++++++++++++++
pages/repairOrder/myDeviceReport.vue | 230 ++++++++++++++++
pages/repairOrder/screen.vue | 261 ++++++++++++++++++
pages/workOrderList/addForm.vue | 107 ++++++--
pages/workOrderList/index.vue | 4 +-
permission.js | 46 ++--
plugins/index.js | 3 +
plugins/modal.js | 1 -
plugins/time.js | 19 ++
static/scss/colorui.css | 2 +-
store/getters.js | 2 +-
store/modules/user.js | 16 +-
utils/constant.js | 2 +-
utils/storage.js | 2 +-
32 files changed, 2630 insertions(+), 227 deletions(-)
create mode 100644 api/device.js
create mode 100644 api/dict.js
create mode 100644 api/index.js
create mode 100644 api/repairOrder.js
create mode 100644 pages/deviceReport/addForm.vue
create mode 100644 pages/deviceReport/index.vue
create mode 100644 pages/deviceReport/myDeviceReport.vue
create mode 100644 pages/repairOrder/addForm.vue
create mode 100644 pages/repairOrder/detail.vue
create mode 100644 pages/repairOrder/index.vue
create mode 100644 pages/repairOrder/myDeviceReport.vue
create mode 100644 pages/repairOrder/screen.vue
create mode 100644 plugins/time.js
diff --git a/App.vue b/App.vue
index c5e0fb1..8d202ac 100644
--- a/App.vue
+++ b/App.vue
@@ -21,9 +21,9 @@
this.globalData.config = config
},
checkLogin() {
- if (!getAccessToken()) {
- this.$tab.reLaunch('/pages/login')
- }
+ // if (!getAccessToken()) {
+ // this.$tab.reLaunch('/pages/login')
+ // }
}
}
}
diff --git a/api/device.js b/api/device.js
new file mode 100644
index 0000000..30482a4
--- /dev/null
+++ b/api/device.js
@@ -0,0 +1,42 @@
+import request from '@/utils/request'
+
+// 根据设备/模具号查询信息
+export function getDetailsByNumber(params) {
+ return request({
+ url: '/eam/device-accounts/getDetailsByNumber',
+ 'method': 'GET',
+ params
+ })
+}
+// 添加报修
+export function deviceRepairCreate(data) {
+ return request({
+ url: '/eam/device-repair/create',
+ 'method': 'POST',
+ data
+ })
+}
+// 报修列表
+export function deviceRepairPage(params) {
+ return request({
+ url: '/eam/device-repair/getAppPage',
+ 'method': 'GET',
+ params
+ })
+}
+
+// 报修列表
+export function rejected(id) {
+ return request({
+ url: '/eam/device-repair/rejected?id='+id,
+ 'method': 'DELETE',
+ })
+}
+// 设备列表
+export function deviceList(params) {
+ return request({
+ url: '/eam/device-accounts/selectData',
+ 'method': 'GET',
+ params
+ })
+}
diff --git a/api/dict.js b/api/dict.js
new file mode 100644
index 0000000..47116d2
--- /dev/null
+++ b/api/dict.js
@@ -0,0 +1,23 @@
+import request from '@/utils/request'
+
+// 获取字典
+function getDictList(type) {
+ return request({
+ url: '/eam/device-maintenance-main/getDictList?type=' + type,
+ 'method': 'GET',
+ })
+}
+export async function getDict(type) {
+ let data =[]
+ await getDictList(type).then((res) => {
+ if (res.code == 0) {
+ data = res.data.map(item=>{
+ return {
+ label:item.label,
+ value:item.code,
+ }
+ })
+ } else {}
+ }).catch((err) => {})
+ return data
+}
\ No newline at end of file
diff --git a/api/index.js b/api/index.js
new file mode 100644
index 0000000..2ed8dfa
--- /dev/null
+++ b/api/index.js
@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+// 获取首页数量信息
+export function getCounts() {
+ return request({
+ url: '/eam/device-accounts/getCounts',
+ 'method': 'GET'
+ })
+}
+
diff --git a/api/login.js b/api/login.js
index b79fd07..4c9663e 100644
--- a/api/login.js
+++ b/api/login.js
@@ -1,11 +1,15 @@
import request from '@/utils/request'
// 登录方法
-export function login(username, password, captchaVerification) {
+export function login(username, password, captchaVerification,tenantName,rememberMe,code,uuid) {
const data = {
username,
password,
- captchaVerification
+ captchaVerification,
+ tenantName,
+ rememberMe,
+ code,
+ uuid,
}
return request({
url: '/system/auth/login',
@@ -19,12 +23,18 @@ export function login(username, password, captchaVerification) {
// 获取用户详细信息
export function getInfo() {
+ return request({
+ url: '/system/user/profile/get',
+ 'method': 'GET'
+ })
+}
+// 获取权限
+export function getPermissionInfo() {
return request({
url: '/system/auth/get-permission-info',
'method': 'GET'
})
}
-
// 退出方法
export function logout() {
return request({
diff --git a/api/repairOrder.js b/api/repairOrder.js
new file mode 100644
index 0000000..9c926bc
--- /dev/null
+++ b/api/repairOrder.js
@@ -0,0 +1,36 @@
+import request from '@/utils/request'
+
+
+// 添加工单
+export function repairOrderCreate(data) {
+ return request({
+ url: '/eam/device-maintenance-main/create',
+ 'method': 'POST',
+ data
+ })
+}
+// 编辑工单
+export function repairOrderUpdate(data) {
+ return request({
+ url: '/eam/device-maintenance-main/update',
+ 'method': 'PUT',
+ data
+ })
+}
+// 报修列表
+export function repairOrderPage(params) {
+ return request({
+ url: '/eam/device-maintenance-main/getAppPage',
+ 'method': 'GET',
+ params
+ })
+}
+// 操作工单
+export function orderClick(params) {
+ return request({
+ url: '/eam/device-maintenance-main/orderClick',
+ 'method': 'GET',
+ params
+ })
+}
+
diff --git a/components/form/index.vue b/components/form/index.vue
index 0c03d7d..e83165f 100644
--- a/components/form/index.vue
+++ b/components/form/index.vue
@@ -53,6 +53,7 @@
:trim='item.trim'
:show-confirmbar='item.showConfirmbar'
:adjust-position='item.adjustPosition'
+ @blur="blur($event,item.field)"
v-if="item.type == 'text'||item.type == 'number'||item.type == 'idcard'||item.type == 'digit'||item.type == 'tel'||item.type == 'safePassword'||item.type == 'nickname'"
/>
@@ -249,7 +250,7 @@
-
+
{{item.isRightButton}}
@@ -418,6 +419,12 @@
switchChange(e,field) {
this.$emit('switchChange',e,field)
},
+ chickRightButton(field) {
+ this.$emit('chickRightButton',field)
+ },
+ blur(e,field) {
+ this.$emit('blur',e,field)
+ },
},
mounted() {
this.$refs.form.setRules(this.form.rules)
diff --git a/config.js b/config.js
index 935f140..42a267a 100644
--- a/config.js
+++ b/config.js
@@ -1,6 +1,6 @@
// 应用全局配置
module.exports = {
- baseUrl: process.env.NODE_ENV === 'development' ? 'http://localhost:12080' : 'http://api-dashboard.yudao.iocoder.cn',
+ baseUrl: process.env.NODE_ENV === 'development' ? 'http://192.168.0.165:12080' : 'http://api-dashboard.yudao.iocoder.cn',
baseApi:process.env.NODE_ENV === 'development' ? '/admin-api' : '/api/admin-api',
// 应用信息
appInfo: {
diff --git a/manifest.json b/manifest.json
index 2970939..aed232e 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,7 @@
{
- "name" : "芋道移动端",
- "appid" : "__UNI__EA67EB3",
+ "name" : "ema",
+ "appid" : "__UNI__89250D0",
+ "package" : "com.eam.uniapp",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
@@ -14,7 +15,9 @@
"autoclose" : true,
"delay" : 0
},
- "modules" : {},
+ "modules" : {
+ "Push" : {}
+ },
"distribute" : {
"android" : {
"permissions" : [
@@ -39,7 +42,19 @@
"dSYMs" : false
},
"sdkConfigs" : {
- "ad" : {}
+ "ad" : {},
+ "push" : {
+ "unipush" : {
+ "version" : "2",
+ "offline" : true,
+ "hms" : {},
+ "oppo" : {},
+ "vivo" : {},
+ "mi" : {},
+ "meizu" : {},
+ "fcm" : {}
+ }
+ }
}
}
},
diff --git a/pages.json b/pages.json
index 331c6b4..ce834c2 100644
--- a/pages.json
+++ b/pages.json
@@ -1,10 +1,5 @@
{
"pages": [{
- "path": "pages/login",
- "style": {
- "navigationStyle": "custom"
- }
- }, {
"path": "pages/index",
"style": {
"navigationBarTitleText": "首页",
@@ -17,13 +12,6 @@
"navigationBarBackgroundColor": "#409eff",
"navigationBarTextStyle": "white"
}
- }, {
- "path": "pages/device/screen",
- "style": {
- "navigationBarTitleText": "筛选",
- "navigationBarBackgroundColor": "#409eff",
- "navigationBarTextStyle": "white"
- }
}, {
"path": "pages/mold/index",
"style": {
@@ -41,98 +29,62 @@
"style": {
"navigationStyle": "custom"
}
- }, {
- "path": "pages/spareParts/screen",
- "style": {
- "navigationBarTitleText": "筛选",
- "navigationBarBackgroundColor": "#409eff",
- "navigationBarTextStyle": "white"
- }
- }, {
- "path": "pages/sparePartsApplication/index",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTextStyle": "white"
- }
- }, {
- "path": "pages/sparePartsApplication/screen",
- "style": {
- "navigationBarTitleText": "筛选",
- "navigationBarBackgroundColor": "#409eff",
- "navigationBarTextStyle": "white"
- }
- }, {
- "path": "pages/sparePartsApplication/addForm",
- "style": {
- "navigationBarTitleText": "添加申请",
- "navigationBarBackgroundColor": "#409eff",
- "navigationBarTextStyle": "white"
- }
- }, {
- "path": "pages/sparePartsServiceWorkOrderList/index",
+ },{
+ "path": "pages/login",
"style": {
- "navigationStyle": "custom",
- "navigationBarTextStyle": "white"
+ "navigationStyle": "custom"
}
- }, {
- "path": "pages/sparePartsServiceWorkOrderList/screen",
+ },{
+ "path": "pages/deviceReport/index",
"style": {
- "navigationBarTitleText": "筛选",
- "navigationBarBackgroundColor": "#409eff",
- "navigationBarTextStyle": "white"
+ "navigationBarTitleText": "设备报修",
+ "navigationStyle": "custom"
}
- }, {
- "path": "pages/sparePartsServiceWorkOrderList/addForm",
+ },{
+ "path": "pages/deviceReport/addForm",
"style": {
- "navigationBarTitleText": "添加申请",
+ "navigationBarTitleText": "添加报修",
"navigationBarBackgroundColor": "#409eff",
"navigationBarTextStyle": "white"
}
- }, {
- "path": "pages/notaic/index",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTextStyle": "white"
- }
- }, {
- "path": "pages/workOrderList/index",
+ },{
+ "path": "pages/deviceReport/myDeviceReport",
"style": {
+ "navigationBarTitleText": "我的报修",
"navigationStyle": "custom"
}
- }, {
- "path": "pages/workOrderList/screen",
+ },{
+ "path": "pages/repairOrder/index",
"style": {
- "navigationBarTitleText": "筛选",
- "navigationBarBackgroundColor": "#409eff",
- "navigationBarTextStyle": "white"
+ "navigationBarTitleText": "维修工单",
+ "navigationStyle": "custom"
}
- }, {
- "path": "pages/workOrderList/addForm",
+ },{
+ "path": "pages/repairOrder/addForm",
"style": {
- "navigationBarTitleText": "添加报修",
+ "navigationBarTitleText": "添加维修工单",
"navigationBarBackgroundColor": "#409eff",
"navigationBarTextStyle": "white"
}
- }, {
- "path": "pages/workOrderList/detail",
+ },{
+ "path": "pages/repairOrder/screen",
"style": {
- "navigationBarTitleText": "工单详情",
+ "navigationBarTitleText": "筛选",
"navigationBarBackgroundColor": "#409eff",
"navigationBarTextStyle": "white"
}
- }, {
- "path": "pages/mine/aboutUs",
+ },{
+ "path": "pages/repairOrder/detail",
"style": {
- "navigationBarTitleText": "关于我们",
+ "navigationBarTitleText": "维修工单详情",
"navigationBarBackgroundColor": "#409eff",
"navigationBarTextStyle": "white"
}
- }, {
- "path": "pages/mine/changePassword",
+ },{
+ "path": "pages/repairOrder/myDeviceReport",
"style": {
- "navigationBarTitleText": "修改密码",
- "navigationBarBackgroundColor": "#409eff",
- "navigationBarTextStyle": "white"
+ "navigationBarTitleText": "维修工单",
+ "navigationStyle": "custom"
}
}],
"tabBar": {
@@ -170,6 +122,7 @@
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "RuoYi",
- "navigationBarBackgroundColor": "#FFFFFF"
+ "navigationBarBackgroundColor": "#FFFFFF",
+ "backgroundColorBottom": "#f5f5f5"
}
}
\ No newline at end of file
diff --git a/pages/deviceReport/addForm.vue b/pages/deviceReport/addForm.vue
new file mode 100644
index 0000000..c1b830e
--- /dev/null
+++ b/pages/deviceReport/addForm.vue
@@ -0,0 +1,226 @@
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/deviceReport/index.vue b/pages/deviceReport/index.vue
new file mode 100644
index 0000000..68824b7
--- /dev/null
+++ b/pages/deviceReport/index.vue
@@ -0,0 +1,242 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.describes}}
+
+
+
+ {{`${$time.formatDate(item.createTime)}`}}
+
+
+
+ 报修单号:{{item.number}}
+
+
+ {{`${params.type=='DEVICE'?'设备' : '模具'}`}}编号:{{item.deviceNumber}}
+
+
+ {{`${params.type=='DEVICE'?'设备' : '模具'}`}}名称:{{item.name}}
+
+
+ 所属厂区:{{item.factoryAreaName}}
+
+
+
+
+
+
+ 撤销
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/deviceReport/myDeviceReport.vue b/pages/deviceReport/myDeviceReport.vue
new file mode 100644
index 0000000..c3c8a21
--- /dev/null
+++ b/pages/deviceReport/myDeviceReport.vue
@@ -0,0 +1,230 @@
+
+
+
+
+
+
+
+
+
+
+ {{item.describes}}
+
+
+ 2023-12-12 08:00:00
+
+
+
+ 报修单号:{{item.number}}
+
+
+ 设备编号:{{item.deviceNumber}}
+
+
+ 设备名称:{{item.name}}
+
+
+ 所属厂区:{{item.factoryAreaName}}
+
+
+
+
+
+
+ 撤销
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/index.vue b/pages/index.vue
index caada73..54db429 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -1,10 +1,12 @@
-
-
-
-
+
+
@@ -43,13 +45,13 @@
设备维护
-
+
设备报修
-
+
维修工单
@@ -76,7 +78,7 @@
模具维护
-
+
设备报修
@@ -103,42 +105,74 @@
备件管理
-
+
领用申请
-
+
维修工单
-
+
@@ -157,7 +191,7 @@
position: relative;
image {
- height: 410rpx;
+ height: calc(var(--status-bar-height) + 410rpx);
}
}
@@ -236,23 +270,27 @@
}
}
}
- .box{
- .title{
+
+ .box {
+ .title {
font-size: 32rpx;
font-weight: bold;
- padding: 50rpx 50rpx 30rpx;
+ padding: 50rpx 50rpx 30rpx;
}
- .icon-item{
+
+ .icon-item {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin: 20rpx 0px;
- image{
+
+ image {
width: 80rpx;
height: 80rpx;
}
- view{
+
+ view {
margin-top: 20rpx;
color: #999999;
}
diff --git a/pages/login.vue b/pages/login.vue
index baba105..2889360 100644
--- a/pages/login.vue
+++ b/pages/login.vue
@@ -1,7 +1,7 @@
-
+
智慧设备管理综合系统
让设备管理更智能、更高效
@@ -24,8 +24,6 @@
-
@@ -42,21 +40,22 @@
+
+
\ No newline at end of file
diff --git a/pages/repairOrder/detail.vue b/pages/repairOrder/detail.vue
new file mode 100644
index 0000000..afbe7a1
--- /dev/null
+++ b/pages/repairOrder/detail.vue
@@ -0,0 +1,363 @@
+
+
+
+
+
+ 维修工单
+ 转办
+
+
+
+ 工单单号
+ {{data.number}}
+
+
+ 报修描述
+ {{data.describes}}
+
+
+ 班次
+ {{data.classesName}}
+
+
+ 故障类型
+ {{data.faultTypeName}}
+
+
+ 维修工
+ {{data.maintenance}}
+
+
+
+
+
+
+
+
+
+
+ {{changeItem.name}}
+
+
+
+ 设备编号
+ {{deviceInfo.number}}
+
+
+ 设备名称
+ {{deviceInfo.name}}
+
+
+ 所属厂区
+ {{deviceInfo.factoryAreaName}}
+
+
+ 设备类型
+ {{deviceInfo.typeName}}
+
+
+
+
+ 工单单号
+ {{data.number}}
+
+
+ 报修描述
+ {{data.describes}}
+
+
+ 维修工
+ {{data.maintenance}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/repairOrder/index.vue b/pages/repairOrder/index.vue
new file mode 100644
index 0000000..3a25c72
--- /dev/null
+++ b/pages/repairOrder/index.vue
@@ -0,0 +1,256 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.describes}}
+
+
+
+
+
+
+
+
+
+ 报修单号:{{item.number}}
+
+
+ {{`${params.type=='DEVICE'?'设备' : '模具'}`}}编号:{{item.deviceNumber}}
+
+
+ {{`${params.type=='DEVICE'?'设备' : '模具'}`}}名称:{{item.name}}
+
+
+ 所属厂区:{{item.factoryAreaName}}
+
+
+ 班次:{{item.classesName}}
+
+
+ 故障类型:{{item.faultTypeName}}
+
+
+
+
+ {{`${$time.formatDate(item.createTime)}`}}
+
+
+ 编辑
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/repairOrder/myDeviceReport.vue b/pages/repairOrder/myDeviceReport.vue
new file mode 100644
index 0000000..31925a6
--- /dev/null
+++ b/pages/repairOrder/myDeviceReport.vue
@@ -0,0 +1,230 @@
+
+
+
+
+
+
+
+
+
+
+ {{item.describes}}
+
+
+ 2023-12-12 08:00:00
+
+
+
+ 报修单号:{{item.number}}
+
+
+ 设备编号:{{item.deviceNumber}}
+
+
+ 设备名称:{{item.name}}
+
+
+ 所属厂区:{{item.factoryAreaName}}
+
+
+
+
+
+
+ 撤销
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/repairOrder/screen.vue b/pages/repairOrder/screen.vue
new file mode 100644
index 0000000..85faacc
--- /dev/null
+++ b/pages/repairOrder/screen.vue
@@ -0,0 +1,261 @@
+
+
+
+
+
+
+
+
+
+
+ {{selectFormat(form.deviceName,deviceList)}}
+
+
+ {{`请输入${type=='DEVICE'?'设备' : '模具'}名称`}}
+
+
+
+
+
+
+
+
+
+
+ {{selectFormat(form.classes,maintenanceShift)}}
+
+
+ {{`请选择班次`}}
+
+
+
+
+
+
+
+ {{selectFormat(form.faultType,faultType)}}
+
+
+ {{`请选择故障类型`}}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/workOrderList/addForm.vue b/pages/workOrderList/addForm.vue
index cd03b43..e6b4ae1 100644
--- a/pages/workOrderList/addForm.vue
+++ b/pages/workOrderList/addForm.vue
@@ -1,7 +1,7 @@
-
+