From 964faa1077a89713910063c39ebe08fac4e4c56e Mon Sep 17 00:00:00 2001 From: Houjie <714924425@qq.com> Date: 星期四, 24 七月 2025 17:44:18 +0800 Subject: [PATCH] 企业维修适配修改 --- pages/maintenanceReport/maintenanceReportDetils/maintenanceReportDetils.vue | 2 pages/spare/spare.vue | 4 pages/historicalInspection/historicalInspection.vue | 2 pages/home/home.vue | 80 ++- package-lock.json | 12 pages/ToDoList/ToDoSpareParts/ToDoSpareParts.vue | 26 pages/baoZhou/baoZhouDetils/baoZhouDetils.vue | 2 pages/maintenanceReport/maintenanceReport.vue | 14 pages/baoZhou/baoZhou.vue | 2 pages/ToDoList/ToDoListDeils/ToDoCheckDetils/ToDoCheckDetils.vue | 6 store/index.js | 1 pages/TaskManager/TaskManagerDeils/TaskManagerDeils.vue | 10 pages/ToDoList/ToDoBaoZhou/ToDoBaoZhou.vue | 6 pages/device/deviceWebDeils/deviceWebDeils.vue | 850 ++++++++++++++++++++-------------------- pages/checkList/checkList.vue | 2 pages/historicalMaintenance/historicalMaintenance.vue | 2 pages/index/index.vue | 14 pages/ToDoList/ToDoListDeils/ToDoListDeils.vue | 2 pages/reportRepair/reportRepair.vue | 16 pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure.vue | 14 common/service/config.service.js | 10 pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure.vue | 5 pages.json | 3 pages/device/device.vue | 4 pages/TaskManager/TaskManagerList.vue | 36 + pages/ToDoList/ToDoList.vue | 40 + pages/login/loginOauth2.vue | 4 static/banner/eam_banner4.png | 0 pages/historicalRepair/historicalRepair.vue | 2 pages/user/people.vue | 10 /dev/null | 0 common/router/modules/routes.js | 2 manifest.json | 26 pages/checkList/checkListDetils/checkListDetils.vue | 2 pages/reportRepair/reportRepairDeils/reportRepairDeils.vue | 2 pages/common/helloWorld.vue | 2 pages/device/deviceDeils/deviceDeils.vue | 2 static/banner/eam_banner3.png | 0 38 files changed, 650 insertions(+), 567 deletions(-) diff --git a/common/router/modules/routes.js b/common/router/modules/routes.js index d6e0abf..0ce99a8 100644 --- a/common/router/modules/routes.js +++ b/common/router/modules/routes.js @@ -318,7 +318,7 @@ meta: { title: 'helloWorld', }, - }, + } ] diff --git a/common/service/config.service.js b/common/service/config.service.js index 9cc8b0c..f6f5691 100644 --- a/common/service/config.service.js +++ b/common/service/config.service.js @@ -1,12 +1,14 @@ -let BASE_URL = 'http://192.168.1.68:9918/jeecg-boot' +let BASE_URL = '' if (process.env.NODE_ENV == 'development') { - BASE_URL = 'http://192.168.1.68:9918/jeecg-boot' // 寮�鍙戠幆澧� + BASE_URL = '/jeecg-boot' // 寮�鍙戠幆澧� } else { - BASE_URL = 'http://192.168.1.68:9918/jeecg-boot' // 鐢熶骇鐜 + BASE_URL = '/jeecg-boot' // 鐢熶骇鐜 } let staticDomainURL ='/sys/common/static'; -let staticURL ='http://125.76.225.53:8086/jeecg-boot/sys/common/static/'; +// let staticURL ='http://125.76.225.53:8086/jeecg-boot/sys/common/static/'; +let staticURL ='https://fastwoke.cn:8087/jeecg-boot/sys/common/static/'; + const configService = { apiUrl: BASE_URL, staticDomainURL: staticDomainURL, diff --git a/manifest.json b/manifest.json index 03fa220..eb93c96 100644 --- a/manifest.json +++ b/manifest.json @@ -80,23 +80,23 @@ }, "h5" : { "title" : "璁惧绠$悊", - "domain" : "houjie.xalxzn.com", + "domain" : "fastwoke.cn", "router" : { "mode" : "hash", "base" : "/h5/" }, - // "devServer" : { - // "port" : "8866", - // "https" : false, - // "proxy" : { - // /**閰嶇疆鏈嶅姟鍣ㄨ矾寰�**/ - // "/jeecg-boot" : { - // "target" : "http://houjie.xalxzn.com:8866", - // "changeOrigin" : true, - // "secure": false - // } - // } - // }, + "devServer" : { + "port" : 8086, + "https" : false, + "proxy" : { + /**閰嶇疆鏈嶅姟鍣ㄨ矾寰�**/ + "/jeecg-boot" : { + "target" : "https://192.168.4.20:8086", + "changeOrigin" : true, + "secure" : false + } + } + }, "optimization" : { "treeShaking" : { "enable" : false diff --git a/package-lock.json b/package-lock.json index 7f7b3a9..287d37e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,8 @@ { - "requires": true, + "name": "da-dropdown 涓嬫媺绛涢�夎彍鍗�(鏀寔涓婚鑹层�佸姛鑳戒赴瀵岋紝Vue2鐗�)", + "version": "2.2.1", "lockfileVersion": 1, + "requires": true, "dependencies": { "@dcloudio/uni-ui": { "version": "1.5.7", @@ -19,8 +21,7 @@ "@zxing/text-encoding": { "version": "0.9.0", "resolved": "https://registry.npmmirror.com/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", - "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", - "optional": true + "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==" }, "file-saver": { "version": "2.0.5", @@ -32,6 +33,11 @@ "resolved": "https://registry.npmmirror.com/html5-qrcode/-/html5-qrcode-2.3.8.tgz", "integrity": "sha512-jsr4vafJhwoLVEDW3n1KvPnCCXWaQfRng0/EEYk1vNcQGcG/htAdhJX0be8YyqMoSz7+hZvOZSTAepsabiuhiQ==" }, + "openai": { + "version": "5.8.3", + "resolved": "https://registry.npmmirror.com/openai/-/openai-5.8.3.tgz", + "integrity": "sha512-IdotKmquCnpouTRvF9xRXVhMx6K5Sc8zkD6Usf+so+NTQ+qiJ8bLSCd7LBb8b/Rof7uYltlSxJhNp+spphKI4Q==" + }, "ts-custom-error": { "version": "3.3.1", "resolved": "https://registry.npmmirror.com/ts-custom-error/-/ts-custom-error-3.3.1.tgz", diff --git a/pages.json b/pages.json index 50af30c..dcdf52e 100644 --- a/pages.json +++ b/pages.json @@ -348,6 +348,7 @@ "navigationBarTitleText" : "" } } + ], @@ -358,7 +359,7 @@ "allowsBounceVertical": "NO" }, "navigationBarBackgroundColor": "#0081ff", - "navigationBarTitleText": "MDC", + "navigationBarTitleText": "璁惧绠$悊", "navigationStyle": "custom", "navigationBarTextStyle": "white" }, diff --git a/pages/TaskManager/TaskManagerDeils/TaskManagerDeils.vue b/pages/TaskManager/TaskManagerDeils/TaskManagerDeils.vue index b623095..7b07dd4 100644 --- a/pages/TaskManager/TaskManagerDeils/TaskManagerDeils.vue +++ b/pages/TaskManager/TaskManagerDeils/TaskManagerDeils.vue @@ -351,20 +351,20 @@ this.partTakeAdviceDetailList.forEach(item => { item.restle = [{ text: "姝e父", - value: 1 + value: "1" }, { text: "寮傚父", - value: 2 + value: "2" } ]; // 鏂板瓧娈碉紝鍊间负涓�涓┖鏁扮粍 item.type = [{ text: "鍚�", - value: 0 + value: "0" }, { text: "鏄�", - value: 1 + value: "1" } ]; // 鏂板瓧娈碉紝鍊间负涓�涓┖鏁扮粍 item.istrue = true; @@ -574,7 +574,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/TaskManager/TaskManagerList.vue b/pages/TaskManager/TaskManagerList.vue index e8cbec6..b4a3e42 100644 --- a/pages/TaskManager/TaskManagerList.vue +++ b/pages/TaskManager/TaskManagerList.vue @@ -16,11 +16,11 @@ <!-- 鍩虹琛ㄥ崟鏍¢獙 --> <uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext"> <uni-group title="" top="0"> - <uni-forms-item name="type" :labelWidth="80" label="娴佺▼鍒嗙被:"> + <uni-forms-item name="type" :labelWidth="80" label="娴佺▼鍒嗙被:"> <uni-data-select v-model="formData.type" :localdata="storageTypeList" @change="changeSelectType" /> </uni-forms-item> - <uni-forms-item name="num" :labelWidth="80" label="璁惧缂栧彿:"> + <uni-forms-item name="num" :labelWidth="80" label="璁惧缂栧彿:"> <uni-easyinput v-model="formData.num" placeholder="璇疯緭鍏ヨ澶囩紪鍙�" /> </uni-forms-item> </uni-group> @@ -49,16 +49,17 @@ @click="onClickProductionTask(item)"> <view class="flex"> <view class="flex-sub text-light bg-white padding-xs margin-xs radius">娴佺▼鍒嗙被:</view> - <view class="flex-sub bg-white padding-xs margin-xs text-bold text-blue radius text-right"> + <view + class="flex-sub bg-white padding-xs margin-xs text-bold text-blue radius text-right"> {{item.category_dictText}} </view> </view> - <view class="flex"> + <!-- <view class="flex"> <view class="flex-sub text-light bg-white padding-xs margin-xs radius">娴佺▼鍚嶇О:</view> <view class="flex-sub bg-white padding-xs margin-xs text-bold radius text-right"> {{item.procDefName}} </view> - </view> + </view> --> <view class="flex"> <view class="flex-sub text-light bg-white padding-xs margin-xs radius">浠诲姟鍚嶇О:</view> <view class="flex-sub bg-white padding-xs margin-xs text-orange radius text-right"> @@ -97,7 +98,7 @@ scrollLeft: 0, formData: { type: '', - num:'' + num: '' }, storageTypeList: [], NavBarColor: this.NavBarColor, @@ -190,9 +191,9 @@ case (name === '鍛ㄤ繚鎵ц' && type === '璁惧鍛ㄤ繚'): url = '/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure'; break; - case (name === '鍛ㄤ繚棰嗗彇' && type === '璁惧鍛ㄤ繚'): - url = '/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure'; - break; + case (name === '鍛ㄤ繚棰嗗彇' && type === '璁惧鍛ㄤ繚'): + url = '/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure'; + break; case (name === '鐝粍闀跨‘璁�' && type === '璁惧鐐规'): url = '/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure'; break; @@ -214,6 +215,9 @@ case (name === '缁翠慨鎵ц' && type === '璁惧缁翠慨'): url = '/pages/ToDoList/ToDoSpareParts/ToDoSpareParts'; break; + case (name === '缁翠慨宸ユ帴鍗�' && type === '璁惧缁翠慨'): + url = '/pages/ToDoList/ToDoSpareParts/ToDoSpareParts'; + break; case (name === '鐐规宸ュ崟' && type === '璁惧鐐规'): url = '/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure'; break; @@ -226,10 +230,14 @@ } if (url) { - uni.redirectTo({ + uni.navigateTo({ url: `${url}?item=${encodeURIComponent(JSON.stringify(item))}&flag=${flag}` }); + // uni.redirectTo({ + + // url: `${url}?item=${encodeURIComponent(JSON.stringify(item))}&flag=${flag}` + // }); } }, @@ -277,8 +285,8 @@ /* 閲嶇疆鏌ヨ鏉′欢 */ resetTask() { this.formData.type = '', - this.formData.num='', - this.$refs.popup.close(); + this.formData.num = '', + this.$refs.popup.close(); this.mescroll.resetUpScroll() }, @@ -294,7 +302,7 @@ column: 'createTime', order: 'desc', category: this.formData.type, - title:this.formData.num + title: this.formData.num }, }).then(res => { @@ -348,7 +356,7 @@ } .popupView { - margin-top: 45px; + margin-top: 55px; height: auto; } </style> \ No newline at end of file diff --git a/pages/ToDoList/ToDoBaoZhou/ToDoBaoZhou.vue b/pages/ToDoList/ToDoBaoZhou/ToDoBaoZhou.vue index 4e07235..632e077 100644 --- a/pages/ToDoList/ToDoBaoZhou/ToDoBaoZhou.vue +++ b/pages/ToDoList/ToDoBaoZhou/ToDoBaoZhou.vue @@ -409,11 +409,11 @@ ]; // 鏂板瓧娈碉紝鍊间负涓�涓┖鏁扮粍 item.type = [{ text: "鍚�", - value: 0 + value: "0" }, { text: "鏄�", - value: 1 + value: "1" } ]; // 鏂板瓧娈碉紝鍊间负涓�涓┖鏁扮粍 item.istrue = true; @@ -580,7 +580,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } diff --git a/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure.vue b/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure.vue index 9baefc1..6e6be67 100644 --- a/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure.vue +++ b/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure.vue @@ -429,9 +429,6 @@ title: '鎻愪氦鎴愬姛', duration: 2000 }); - // this.$Router.replace({ - // name: 'ToDoList' - // }) this.$Router.replaceAll({ name: 'ToDoList' }) @@ -973,7 +970,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } diff --git a/pages/ToDoList/ToDoList.vue b/pages/ToDoList/ToDoList.vue index 7ab14d5..c3452a3 100644 --- a/pages/ToDoList/ToDoList.vue +++ b/pages/ToDoList/ToDoList.vue @@ -26,17 +26,19 @@ <uni-easyinput v-model="formData.num" placeholder="璇疯緭鍏ヨ澶囩紪鍙�" /> </uni-forms-item> </uni-group> + <uni-forms-item> + <view class="flex"> + <view + class="cuIcon-search flex-sub bg-blue radius padding-sm margin-xs margin-left-lg margin-right-lg text-sm text-center" + @click="getSera">鏌ヨ + </view> + <view + class="cuIcon-refresh flex-sub bg-white solids padding-sm margin-xs radius text-sm text-center margin-left-lg margin-right-lg" + @click="resetTask">閲嶇疆</view> + </view> + </uni-forms-item> </uni-forms> - <view class="flex"> - - <view - class="cuIcon-search flex-sub bg-blue padding-sm margin-xs margin-left-lg margin-right-lg text-sm text-center" - @click="getSera">鏌ヨ - </view> - <view - class="cuIcon-refresh flex-sub bg-white solids padding-sm margin-xs radius text-sm text-center margin-left-lg margin-right-lg" - @click="resetTask">閲嶇疆</view> - </view> + </view> </uni-popup> @@ -55,12 +57,12 @@ {{item.category_dictText}} </view> </view> - <view class="flex"> + <!-- <view class="flex"> <view class="flex-sub text-light bg-white padding-xs margin-xs radius">娴佺▼鍚嶇О:</view> <view class="flex-sub bg-white padding-xs margin-xs text-bold radius text-right"> {{item.flowName}} </view> - </view> + </view> --> <view class="flex"> <view class="flex-sub text-light bg-white padding-xs margin-xs radius">涔嬪墠澶勭悊浜�:</view> @@ -96,6 +98,8 @@ </template> <script> + + import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js"; export default { mixins: [MescrollMixin], // 浣跨敤mixin @@ -212,7 +216,7 @@ case (name === '璁捐兘閮ㄧ粓楠�' && type === '璁惧鍛ㄤ繚'): url = '/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure'; break; - case (name === '绠$悊鍛橀鐢ㄥ浠�' && type === '璁惧缁翠慨'): + case (name === '绛夊緟澶囦欢涓�' && type === '璁惧缁翠慨'): url = '/pages/ToDoList/ToDoSpareParts/ToDoSpareParts'; break; case (name === '鎿嶄綔宸ョ‘璁�' && type === '璁惧缁翠慨'): @@ -223,6 +227,8 @@ break; case (name === '鐐规宸ュ崟' && type === '璁惧鐐规'): url = '/pages/ToDoList/ToDoListDeils/ToDoCheckDetils'; + case (name === '鐐规宸ュ崟' && type === '璁惧鐐规'): + url = '/pages/ToDoList/ToDoListDeils/ToDoCheckDetils'; break; default:ToDoCheckDetils @@ -231,9 +237,13 @@ } if (url) { - uni.redirectTo({ + + uni.navigateTo({ url: `${url}?item=${encodeURIComponent(JSON.stringify(item))}` }); + // uni.redirectTo({ + // url: `${url}?item=${encodeURIComponent(JSON.stringify(item))}` + // }); } }, @@ -352,7 +362,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure.vue b/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure.vue index c0ac52f..a2a1fa3 100644 --- a/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure.vue +++ b/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure.vue @@ -97,8 +97,8 @@ <view class="flex"> <view class="flex-sub text-light bg-white padding-xs margin-xs radius">寮傚父鏄惁鎶ヤ慨:</view> <view class="flex-sub bg-white padding-xs text-right margin-xs radius"> - <uni-data-select :localdata="item.type" v-model="item.reportFlag" - :disabled="item.istrue" /> + <uni-data-select :localdata="item.type" @change="handleType($event, index)" v-model="item.reportFlag" + :disabled="item.istrue"/> </view> </view> @@ -202,6 +202,7 @@ taskId: '', imageFilesList: [], inspectionResult: '', + reportFlag:'', upOption: { page: { num: 0, // 褰撳墠椤电爜,榛樿0,鍥炶皟涔嬪墠浼氬姞1,鍗砪allback(page)浼氫粠1寮�濮� @@ -374,6 +375,9 @@ changeEquipmentList(e) { this.formData.num = e; }, + handleType(e, index) { + console.log(e); + }, handleCode(e, index) { console.log(index); // 鏍规嵁 e 鐨勫�兼潵鍒ゆ柇鏄惁闇�瑕佹洿鏂� isTrue 鐨勭姸鎬� @@ -431,11 +435,11 @@ ]; // 鏂板瓧娈碉紝鍊间负涓�涓┖鏁扮粍 item.type = [{ text: "鍚�", - value: 0 + value: "0" }, { text: "鏄�", - value: 1 + value: "1" } ]; // 鏂板瓧娈碉紝鍊间负涓�涓┖鏁扮粍 item.istrue = true; @@ -645,7 +649,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } diff --git a/pages/ToDoList/ToDoListDeils/ToDoCheckDetils/ToDoCheckDetils.vue b/pages/ToDoList/ToDoListDeils/ToDoCheckDetils/ToDoCheckDetils.vue index e85293b..9059d62 100644 --- a/pages/ToDoList/ToDoListDeils/ToDoCheckDetils/ToDoCheckDetils.vue +++ b/pages/ToDoList/ToDoListDeils/ToDoCheckDetils/ToDoCheckDetils.vue @@ -464,11 +464,11 @@ ]; // 鏂板瓧娈碉紝鍊间负涓�涓┖鏁扮粍 item.type = [{ text: "鍚�", - value: 0 + value: "0" }, { text: "鏄�", - value: 1 + value: "1" } ]; // 鏂板瓧娈碉紝鍊间负涓�涓┖鏁扮粍 item.istrue = true; @@ -651,7 +651,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } diff --git a/pages/ToDoList/ToDoListDeils/ToDoListDeils.vue b/pages/ToDoList/ToDoListDeils/ToDoListDeils.vue index 660a6f0..444ef29 100644 --- a/pages/ToDoList/ToDoListDeils/ToDoListDeils.vue +++ b/pages/ToDoList/ToDoListDeils/ToDoListDeils.vue @@ -376,7 +376,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/ToDoList/ToDoSpareParts/ToDoSpareParts.vue b/pages/ToDoList/ToDoSpareParts/ToDoSpareParts.vue index 82b9e97..5beac26 100644 --- a/pages/ToDoList/ToDoSpareParts/ToDoSpareParts.vue +++ b/pages/ToDoList/ToDoSpareParts/ToDoSpareParts.vue @@ -24,8 +24,16 @@ <uni-forms-item :label-width="100" name="installationPosition_dictText" label="瀹夎浣嶇疆:"> <uni-easyinput v-model="formData.installationPosition_dictText" :disabled="true" /> </uni-forms-item> - <uni-forms-item :label-width="100" name="faultName" label="鏁呴殰绠�绉�:"> - <uni-easyinput v-model="formData.faultName" :disabled="true" /> + <uni-forms-item :label-width="100" name="faultType" label="鏁呴殰绠�绉�:"> + <uni-easyinput v-model="formData.faultType_dictText" :disabled="true" /> + </uni-forms-item> + <uni-forms-item :label-width="100" name="faultDescription" label="鏁呴殰鎻忚堪:"> + <uni-easyinput v-model="formData.faultDescription" :disabled="true" /> + </uni-forms-item> + <uni-forms-item :label-width="100" name="outNum" label="鎶ヤ慨鍥剧墖:"> + <uni-file-picker limit="9" :value="fileList" :image-styles="imageStyles" @select="select" + :sourceType="sourceType" @progress="progress" @success="success" @fail="fail" + @delete="deletea" :readonly="readonly" /> </uni-forms-item> <uni-forms-item :label-width="100" name="remark" label="鏁呴殰寮�濮嬫椂闂�:"> <uni-easyinput v-model="formData.faultStartTime" :disabled="true" /> @@ -42,15 +50,10 @@ <uni-forms-item :label-width="100" name="repairerPhone_dictText" label="缁翠慨浜虹數璇�:"> <uni-easyinput v-model="formData.repairerPhone_dictText" :disabled="true" /> </uni-forms-item> - <uni-forms-item :label-width="100" name="remark" label="澶囨敞:"> + <!-- <uni-forms-item :label-width="100" name="remark" label="澶囨敞:"> <uni-easyinput v-model="formData.remark" :disabled="true" /> - </uni-forms-item> - <uni-forms-item :label-width="100" name="outNum" label="鎶ヤ慨鍥剧墖:"> + </uni-forms-item> --> - <uni-file-picker limit="9" :value="fileList" :image-styles="imageStyles" @select="select" - :sourceType="sourceType" @progress="progress" @success="success" @fail="fail" - @delete="deletea" :readonly="readonly" /> - </uni-forms-item> <view class="divider"><text>鏄惁闇�瑕侀鐢ㄥ浠�</text></view> <uni-forms-item :label-width="140" required name="num" label="鏄惁闇�瑕侀鐢ㄥ浠�:"> @@ -589,12 +592,13 @@ this.formData.repairCode = this.announcement1.repairCode this.formData.installationPosition_dictText = this.announcement1 .installationPosition_dictText - this.formData.faultName = this.announcement1.faultName + this.formData.faultType_dictText = this.announcement1.faultType_dictText this.formData.repairer_dictText = this.announcement1.repairer_dictText this.formData.repairerPhone_dictText = this.announcement1.repairerPhone_dictText this.formData.reporter_dictText = this.announcement1.reporter_dictText this.formData.reporterPhone_dictText = this.announcement1.reporterPhone_dictText this.formData.faultStartTime = this.announcement1.faultStartTime + this.formData.faultDescription=this.announcement1.faultDescription this.formData.remark = this.announcement1.remark this.formData.repairDescription = this.announcement1.repairDescription this.formData.faultReason = this.announcement1.faultReason @@ -722,7 +726,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/baoZhou/baoZhou.vue b/pages/baoZhou/baoZhou.vue index a21122a..39afdc5 100644 --- a/pages/baoZhou/baoZhou.vue +++ b/pages/baoZhou/baoZhou.vue @@ -340,7 +340,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/baoZhou/baoZhouDetils/baoZhouDetils.vue b/pages/baoZhou/baoZhouDetils/baoZhouDetils.vue index e893d82..e3596ac 100644 --- a/pages/baoZhou/baoZhouDetils/baoZhouDetils.vue +++ b/pages/baoZhou/baoZhouDetils/baoZhouDetils.vue @@ -393,7 +393,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/checkList/checkList.vue b/pages/checkList/checkList.vue index 88c2b17..2fbbd9d 100644 --- a/pages/checkList/checkList.vue +++ b/pages/checkList/checkList.vue @@ -417,7 +417,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/checkList/checkListDetils/checkListDetils.vue b/pages/checkList/checkListDetils/checkListDetils.vue index ee6752f..dff35e0 100644 --- a/pages/checkList/checkListDetils/checkListDetils.vue +++ b/pages/checkList/checkListDetils/checkListDetils.vue @@ -394,7 +394,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } diff --git a/pages/common/helloWorld.vue b/pages/common/helloWorld.vue index fb5d979..65f8dd4 100644 --- a/pages/common/helloWorld.vue +++ b/pages/common/helloWorld.vue @@ -256,7 +256,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/device/device.vue b/pages/device/device.vue index 52619df..9aeec8f 100644 --- a/pages/device/device.vue +++ b/pages/device/device.vue @@ -5,7 +5,7 @@ </cu-custom> <view class="container"> - <uni-search-bar @confirm="search" :focus="true" v-model="searchValue" placeholder="璇烽�氳繃鍚嶇О妫�绱�" + <uni-search-bar @confirm="search" :focus="true" v-model="searchValue" placeholder="璇烽�氳繃璁惧鍚嶇О妫�绱�" @input="input" @cancel="cancel()" cancelButton="always"> </uni-search-bar> <mescroll-uni ref="mescrollRef" @init="mescrollInit" :top="top" @down="downCallback" @up="upCallback"> @@ -231,7 +231,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/device/deviceDeils/deviceDeils.vue b/pages/device/deviceDeils/deviceDeils.vue index d335a69..37fd193 100644 --- a/pages/device/deviceDeils/deviceDeils.vue +++ b/pages/device/deviceDeils/deviceDeils.vue @@ -516,7 +516,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } diff --git a/pages/device/deviceWebDeils/deviceWebDeils.vue b/pages/device/deviceWebDeils/deviceWebDeils.vue index dceca9c..8b19167 100644 --- a/pages/device/deviceWebDeils/deviceWebDeils.vue +++ b/pages/device/deviceWebDeils/deviceWebDeils.vue @@ -1,467 +1,463 @@ <template> - <view class="container"> - <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> - <block slot="backText">杩斿洖</block> - <block slot="content">璁惧璇︽儏</block> - <block slot="right"> - <view @click="goHome"> - <image class="search" src="/static/icon/icon_home.png" style="width: 25px; height: 25px;" alt="" /> - </view> - </block> - </cu-custom> - <view class="container"> + <view class="container"> + <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> + <block slot="backText">杩斿洖</block> + <block slot="content">璁惧璇︽儏</block> + <!-- <block slot="right"> + <view @click="goHome"> + <image class="search" src="/static/icon/icon_home.png" style="width: 25px; height: 25px;" alt="" /> + </view> + </block> --> + </cu-custom> + <view class="container"> + <uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext"> + <uni-group top="1"> + <uni-forms-item :label-width="100" required name="num" label="璁惧缂栧彿:"> + <uni-easyinput v-model="formData.equipmentCode" :disabled="true"/> + </uni-forms-item> + <uni-forms-item :label-width="100" name="remark" label="璁惧鍚嶇О:"> + <uni-easyinput v-model="formData.equipmentName" :disabled="true"/> + </uni-forms-item> + <view class="text-gray margin-bottom-lg">鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�� 鍩烘湰淇℃伅 鈥斺�斺�斺�斺�斺�斺�斺�斺�斺��</view> + <uni-forms-item :label-width="100" name="taskCode" label="缁翠慨鐘舵��:"> + <uni-easyinput :disabled="true" v-model="formData.repairStatus_dictText"/> + </uni-forms-item> + <uni-forms-item :label-width="100" name="endLocation" label="淇濆吇鐘舵��:"> + <uni-easyinput :disabled="true" v-model="formData.maintenanceStatus_dictText"/> - <uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext"> - <uni-group top="1"> + </uni-forms-item> + <uni-forms-item :label-width="100" name="endLocation" label="浣跨敤杞﹂棿:"> + <uni-easyinput :disabled="true" v-model="formData.orgId_dictText"/> - <uni-forms-item :label-width="100" required name="num" label="璁惧缂栧彿:"> - <uni-easyinput v-model="formData.equipmentCode" :disabled="true" /> - </uni-forms-item> + </uni-forms-item> - <uni-forms-item :label-width="100" name="remark" label="璁惧鍚嶇О:"> - <uni-easyinput v-model="formData.equipmentName" :disabled="true" /> - </uni-forms-item> - <!-- <uni-forms-item :label-width="100" name="outNum" label="鍏抽敭璁惧鏍囪瘑:"> - <uni-easyinput v-model="formData.equipmentImportance" :disabled="true" /> - </uni-forms-item> --> - <view class="text-gray margin-bottom-lg">鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�� 鍩烘湰淇℃伅 鈥斺�斺�斺�斺�斺�斺�斺�斺�斺��</view> - <uni-forms-item :label-width="100" name="taskCode" label="缁翠慨鐘舵��:"> - <uni-easyinput :disabled="true" v-model="formData.repairStatus_dictText" /> - </uni-forms-item> - <uni-forms-item :label-width="100" name="endLocation" label="淇濆吇鐘舵��:"> - <uni-easyinput :disabled="true" v-model="formData.maintenanceStatus_dictText" /> + <uni-forms-item :label-width="100" name="endLocation" label="瀹夎浣嶇疆:"> + <uni-easyinput :disabled="true" v-model="formData.installationPosition"/> + </uni-forms-item> + <uni-forms-item :label-width="100" name="endLocation" label="鎶�鏈姸鎬�:"> + <uni-easyinput :disabled="true" v-model="formData.technologyStatus_dictText"/> + </uni-forms-item> + <uni-forms-item :label-width="100" name="endLocation" label="璁惧绠$悊鍛�:"> + <uni-easyinput :disabled="true" v-model="formData.equipmentManager_dictText"/> + </uni-forms-item> + <uni-forms-item :label-width="100" name="endLocation" label="鍑哄巶鏃ユ湡:"> + <uni-easyinput :disabled="true" v-model="formData.leaveFactoryDate"/> + </uni-forms-item> + <uni-forms-item :label-width="100" name="outNum" label="璁惧鏂囨。:"> + <uni-file-picker v-model="fileLists" :extension="['.pdf']" @fail="uploadFail" + :list-styles="listStyles" :delIcon="del" :max-count="5" file-mediatype="all" + @downloadFile="downloadFile" @select="onFileSelect" @delete="onFileDelete"> + <button size="mini" type="primary">鐐瑰嚮涓婁紶</button> + </uni-file-picker> + </uni-forms-item> + </uni-group> + </uni-forms> + <view class="file-list margin-sm"> + <view class="file-item" v-for="(file, index) in this.selectedFiles" :key="index"> + <view class="file-icon"> + <!-- 鏂囦欢鍥炬爣 --> + <image src="/static/icon_file.png" style="height: 25px; width: 25px; margin-right: 10px;" + mode='aspectFit' class="zai-logo "></image> - </uni-forms-item> - <uni-forms-item :label-width="100" name="endLocation" label="浣跨敤杞﹂棿:"> - <uni-easyinput :disabled="true" v-model="formData.orgId_dictText" /> - - </uni-forms-item> - - <uni-forms-item :label-width="100" name="endLocation" label="瀹夎浣嶇疆:"> - <uni-easyinput :disabled="true" v-model="formData.installationPosition" /> - </uni-forms-item> - <uni-forms-item :label-width="100" name="endLocation" label="鎶�鏈姸鎬�:"> - <uni-easyinput :disabled="true" v-model="formData.technologyStatus_dictText" /> - </uni-forms-item> - <uni-forms-item :label-width="100" name="endLocation" label="璁惧绠$悊鍛�:"> - <uni-easyinput :disabled="true" v-model="formData.equipmentManager_dictText" /> - </uni-forms-item> - <uni-forms-item :label-width="100" name="endLocation" label="鍑哄巶鏃ユ湡:"> - <uni-easyinput :disabled="true" v-model="formData.leaveFactoryDate" /> - </uni-forms-item> - </uni-group> - </uni-forms> - <view class="file-list margin-sm"> - <view class="file-item" v-for="(file, index) in this.selectedFiles" :key="index"> - <view class="file-icon"> - <!-- 鏂囦欢鍥炬爣 --> - <image src="/static/icon_file.png" style="height: 25px; width: 25px; margin-right: 10px;" - mode='aspectFit' class="zai-logo "></image> - - </view> - <view class="file-name"> - <!-- 鏂囦欢鍚� --> - {{file.fileName}} - </view> - <view class="file-actions"> - <!-- 涓嬭浇鎸夐挳 --> - <image v-show="showBtn" src="/static/icon_down.png" @click="downloadFile(file)" - style="height: 25px; width: 25px; margin-right: 10px;"></image> - </view> - </view> - </view> - <view class="flex margin-bottom-xs"> - <button v-if="authIncludes('eam:reportRepair:add')" class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" - @click="goReportRepair()">鎶ヤ慨</button> - <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" - @click="goCheck()">鐐规</button> - <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" - @click="goBaoZhou()">鍛ㄤ繚</button> - <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" - @click="goMaintenance()">缁翠慨</button> - </view> - </view> - </view> + </view> + <view class="file-name"> + <!-- 鏂囦欢鍚� --> + {{ file.fileName }} + </view> + <view class="file-actions"> + <!-- 涓嬭浇鎸夐挳 --> + <image v-show="showBtn" src="/static/icon_down.png" @click="downloadFile(file)" + style="height: 25px; width: 25px; margin-right: 10px;"></image> + </view> + </view> + </view> + <view class="flex margin-bottom-xs"> + <button v-if="authIncludes('eam:reportRepair:add')" class="flex-sub cu-btn bg-blue margin-sm lg" + hover-class="is-hover" + @click="goReportRepair()">鎶ヤ慨 + </button> + <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" + @click="goCheck()">鐐规 + </button> + <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" + @click="goBaoZhou()">鍛ㄤ繚 + </button> + <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" + @click="goMaintenance()">缁翠慨 + </button> + </view> + </view> + </view> </template> <script> - import { - stringify - } from "querystring"; - import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js"; - import { - saveAs - } from 'file-saver'; // 寮曞叆 file-saver 搴� - export default { - mixins: [MescrollMixin], // 浣跨敤mixin - data() { - return { +import { + stringify +} from "querystring"; +import { + saveAs +} from 'file-saver'; // 寮曞叆 file-saver 搴� +export default { + data() { + return { + listStyles: { + "borderStyle": { + "width": "0", // 杈规瀹藉害 + }, + "border": false, // 鏄惁鏄剧ず杈规 + "dividline": false + }, + formData: { + equipmentCode: '', + equipmentName: '', + repairStatus_dictText: '', + maintenanceStatus_dictText: '', + orgId_dictText: '', + installationPosition: '', + technologyStatus_dictText: '', + equipmentManager_dictText: '', + leaveFactoryDate: '' + }, + fileLists: [], + NavBarColor: this.NavBarColor, + url: { + stallList: "/eam/equipment/queryById", + add: 'eam/equipmentAttachment/add', + upload: "/eam/sysFiles/batch_upload", + downloadFile: 'eam/equipmentAttachment/downloadFile' + }, + id: '', + styles: { + color: '#2979FF', + borderColor: '#2979FF' + }, + msg1Count: 0, + msg2Count: 0, + msg1Title: "" + } + }, - formData: { - fileLists: [] - }, - fileLists: [], - NavBarColor: this.NavBarColor, - url: { - stallList: "/eam/equipment/queryById", - add: 'eam/equipmentAttachment/add', - upload: "/eam/sysFiles/batch_upload", - downloadFile: 'eam/equipmentAttachment/downloadFile' - }, - id: '', - upOption: { - page: { - num: 0, // 褰撳墠椤电爜,榛樿0,鍥炶皟涔嬪墠浼氬姞1,鍗砪allback(page)浼氫粠1寮�濮� - size: 10 // 姣忛〉鏁版嵁鐨勬暟閲� - }, - noMoreSize: 4, //濡傛灉鍒楄〃宸叉棤鏁版嵁,鍙缃垪琛ㄧ殑鎬绘暟閲忚澶т簬鍗婇〉鎵嶆樉绀烘棤鏇村鏁版嵁;閬垮厤鍒楄〃鏁版嵁杩囧皯(姣斿鍙湁涓�鏉℃暟鎹�),鏄剧ず鏃犳洿澶氭暟鎹細涓嶅ソ鐪�; 榛樿5 - empty: { - tip: '~ 鏆傛棤鏁版嵁 ~', // 鎻愮ず - }, - loading: '', - text: '鍏ㄩ儴', - isShowNoMore: false, - textNoMore: '鎴戞槸鏈夊簳绾跨殑 >_<' - }, - styles: { - color: '#2979FF', - borderColor: '#2979FF' - }, - msg1Count: 0, - msg2Count: 0, - msg1Title: "" - } - }, - - computed: { - authList() { - return this.$store.getters.getAuth || [] - }, - top() { - return this.CustomBar * 2 + 160 - }, - style() { - var StatusBar = this.StatusBar; - var CustomBar = this.CustomBar; - var CustomBar = this.CustomBar; - var style = `height:${CustomBar}px;padding-top:${StatusBar}px;`; - return style - }, - }, - onLoad(options) { - const decodedEquipmentId = decodeURIComponent(options.equipmentId); - this.id = decodedEquipmentId; - console.log(this.id) - if (!this.id) { - uni.showModal({ - title: '鎻愮ず', - content: "閿欒涓嶅瓨鍦�", - showCancel: false - }); - } else { - this.upCallback(); - } + computed: { + authList() { + return this.$store.getters.getAuth || [] + }, + top() { + return this.CustomBar * 2 + 160 + }, + style() { + var StatusBar = this.StatusBar; + var CustomBar = this.CustomBar; + var CustomBar = this.CustomBar; + var style = `height:${CustomBar}px;padding-top:${StatusBar}px;`; + return style + }, + }, + // onLoad(options) { + // const decodedEquipmentId = decodeURIComponent(options.equipmentId); + // this.id = decodedEquipmentId; + // console.log(this.id) + // if (!this.id) { + // uni.showModal({ + // title: '鎻愮ず', + // content: "閿欒涓嶅瓨鍦�", + // showCancel: false + // }); + // } + // + // }, + onUnload() { + this.id = null; + this.formData = {}; // 娓呯┖鏁版嵁 + this.fileLists = []; + }, + onLoad(options) { + const decodedEquipmentId = decodeURIComponent(options.equipmentId); + this.id = decodedEquipmentId; + console.log(this.id) + if (!this.id) { + uni.showModal({ + title: '鎻愮ず', + content: "閿欒涓嶅瓨鍦�", + showCancel: false + }); + } else { + this.getData(); // 鉁� 鍙墽琛屼竴娆� + } + }, - }, - onShow() { - // 浠庤矾鐢卞弬鏁颁腑鑾峰彇equipmentId - const equipmentIdFromRoute = this.$router.query.equipmentId; - if (equipmentIdFromRoute) { - // 濡傛灉瀛樺湪锛屾洿鏂皌his.id - this.id = equipmentIdFromRoute; - // 閲嶆柊鑾峰彇璁惧璇︽儏鏁版嵁 - this.upCallback(); - } - }, - watch: { - // 鐩戝惉$route鍙樺寲 - $route(to, from) { - // 鏇存柊equipmentId鍙傛暟 - this.id = to.query.equipmentId; - console.log('鏇存柊鍚庣殑equipmentId:', this.equipmentId); - } - }, - created() {}, - methods: { - authIncludes(code) { - return this.authList.some(auth => auth.action === code) - }, - downloadFile(item) { - uni.showModal({ - title: '鎻愮ず', - content: '纭瑕佷笅杞藉悧', - cancelText: '鍙栨秷', - confirmText: '纭', - success: res => { - if (res.confirm) { - this.downFile(item) - } - } - }) + created() { - }, + this.getFileList(); + }, + methods: { + getData() { + this.$http.get(this.url.stallList, { + params: { + pageNo: 999, + pageSize: 1, + order: 'asc', + column: 'createTime', + id: this.id + }, + + }).then(res => { + this.announcement1 = res.data.result + console.log("url", res) + //璁剧疆鍒楄〃鏁版嵁 + if (res.data.success) { + console.log("res", res.data.result.equipmentCode) + this.formData = this.announcement1 + } + }).catch(() => { + //鑱旂綉澶辫触, 缁撴潫鍔犺浇 + }) + }, + authIncludes(code) { + return this.authList.some(auth => auth.action === code) + }, + downloadFile(item) { + uni.showModal({ + title: '鎻愮ず', + content: '纭瑕佷笅杞藉悧', + cancelText: '鍙栨秷', + confirmText: '纭', + success: res => { + if (res.confirm) { + this.downFile(item) + } + } + }) + + }, - downFile(item) { - this.$http.download(this.url.downloadFile, { - params: { - id: item.id - }, - responseType: 'blob' // 纭繚鍝嶅簲绫诲瀷涓� blob - }).then(response => { - console.log('Response:', response); // 鏌ョ湅瀹屾暣鍝嶅簲缁撴瀯 + downFile(item) { + this.$http.download(this.url.downloadFile, { + params: { + id: item.id + }, + responseType: 'blob' // 纭繚鍝嶅簲绫诲瀷涓� blob + }).then(response => { + console.log('Response:', response); // 鏌ョ湅瀹屾暣鍝嶅簲缁撴瀯 - // 鑾峰彇 tempFilePath锛圔lob URL锛� - const tempFilePath = response.tempFilePath; + // 鑾峰彇 tempFilePath锛圔lob URL锛� + const tempFilePath = response.tempFilePath; - if (!tempFilePath) { - uni.showToast({ - title: '鏂囦欢涓嬭浇澶辫触', - icon: 'none' - }); - return; - } + if (!tempFilePath) { + uni.showToast({ + title: '鏂囦欢涓嬭浇澶辫触', + icon: 'none' + }); + return; + } - let fileName = item.fileName; + let fileName = item.fileName; - // 鍒涘缓 <a> 鏍囩骞惰Е鍙戜笅杞� - const link = document.createElement('a'); - link.href = tempFilePath; - link.setAttribute('download', fileName); - link.style.display = 'none'; + // 鍒涘缓 <a> 鏍囩骞惰Е鍙戜笅杞� + const link = document.createElement('a'); + link.href = tempFilePath; + link.setAttribute('download', fileName); + link.style.display = 'none'; - document.body.appendChild(link); - link.click(); + document.body.appendChild(link); + link.click(); - // 娓呯悊璧勬簮 - document.body.removeChild(link); + // 娓呯悊璧勬簮 + document.body.removeChild(link); - }).catch(err => { - console.error('Download error:', err); - uni.showToast({ - title: '鏂囦欢涓嬭浇澶辫触', - icon: 'none' - }); - }); - }, - getFileList() { - this.$http.get(this.url.fileList, { - params: { - equipmentId: this.id, - pageNo: 1, - pageSize: 999, - column: 'createTime', - order: 'desc' - }, - }).then(res => { - if (res.data.success) { - this.selectedFiles = res.data.result.records || []; + }).catch(err => { + console.error('Download error:', err); + uni.showToast({ + title: '鏂囦欢涓嬭浇澶辫触', + icon: 'none' + }); + }); + }, + getFileList() { + this.$http.get(this.url.fileList, { + params: { + equipmentId: this.id, + pageNo: 1, + pageSize: 999, + column: 'createTime', + order: 'desc' + }, + }).then(res => { + if (res.data.success) { + this.selectedFiles = res.data.result.records || []; - } - }).catch(() => { - uni.showToast({ - title: '鑾峰彇鏂囦欢鍒楄〃澶辫触', - icon: 'none' - }); - }); - }, - uploadFail(e) { - console.log('涓婁紶澶辫触锛�', e) - }, + } + }).catch(() => { + uni.showToast({ + title: '鑾峰彇鏂囦欢鍒楄〃澶辫触', + icon: 'none' + }); + }); + }, + uploadFail(e) { + console.log('涓婁紶澶辫触锛�', e) + }, + onFileSelect(e) { + const tempFilePaths = e.tempFilePaths; - onFileSelect(e) { - const tempFilePaths = e.tempFilePaths; + uni.showLoading({ + title: '涓婁紶涓�...' + }); - uni.showLoading({ - title: '涓婁紶涓�...' - }); + const uploadPromises = tempFilePaths.map((filePath, index) => { + return new Promise((resolve, reject) => { + this.$http.upload(this.url.upload, { + filePath: filePath, + name: 'file' + }) + .then(uploadRes => { + const serverFile = uploadRes.data.result[0]; + console.log(serverFile); + // 鎻愬彇fileSuffix骞舵嫾鎺� + if (serverFile.fileSuffix && serverFile.fileName && !serverFile + .fileName.includes('.')) { + serverFile.fileName += '.' + serverFile.fileSuffix; + } + this.fileLists = []; + // 闃叉閲嶅娣诲姞锛堟牴鎹� id 鎴� fileName 鍒ゆ柇锛� + if (!this.fileLists.some(file => file.id === serverFile.id)) { + this.fileLists.push(serverFile); + } + resolve(); + }) + .catch(err => { + console.error(`鏂囦欢 ${index + 1} 涓婁紶澶辫触`, err); + uni.showToast({ + title: `绗� ${index + 1} 涓枃浠朵笂浼犲け璐, + icon: 'none' + }); + reject(err); + }); + }); + }); - const uploadPromises = tempFilePaths.map((filePath, index) => { - return new Promise((resolve, reject) => { - this.$http.upload(this.url.upload, { - filePath: filePath, - name: 'file' - }) - .then(uploadRes => { - const serverFile = uploadRes.data.result[0]; - console.log(serverFile); - // 鎻愬彇fileSuffix骞舵嫾鎺� - if (serverFile.fileSuffix && serverFile.fileName && !serverFile - .fileName.includes('.')) { - serverFile.fileName += '.' + serverFile.fileSuffix; - } - this.fileLists = []; - // 闃叉閲嶅娣诲姞锛堟牴鎹� id 鎴� fileName 鍒ゆ柇锛� - if (!this.fileLists.some(file => file.id === serverFile.id)) { - this.fileLists.push(serverFile); - } - resolve(); - }) - .catch(err => { - console.error(`鏂囦欢 ${index + 1} 涓婁紶澶辫触`, err); - uni.showToast({ - title: `绗� ${index + 1} 涓枃浠朵笂浼犲け璐, - icon: 'none' - }); - reject(err); - }); - }); - }); + Promise.all(uploadPromises) + .then(() => { + uni.hideLoading(); + uni.showToast({ + title: '鍏ㄩ儴涓婁紶鎴愬姛锛屾鍦ㄦ彁浜�...' + }); + this.submitFileList(); // 鑷姩鎻愪氦鎵�鏈夋枃浠� + }) + .catch(() => { + uni.hideLoading(); + uni.showToast({ + title: '閮ㄥ垎涓婁紶澶辫触', + icon: 'none' + }); + }); + }, + // 鏂囦欢鍒犻櫎鍥炶皟 + onFileDelete(e) { + console.log('鍒犻櫎鏂囦欢:', e.index); + }, - Promise.all(uploadPromises) - .then(() => { - uni.hideLoading(); - uni.showToast({ - title: '鍏ㄩ儴涓婁紶鎴愬姛锛屾鍦ㄦ彁浜�...' - }); - this.submitFileList(); // 鑷姩鎻愪氦鎵�鏈夋枃浠� - }) - .catch(() => { - uni.hideLoading(); - uni.showToast({ - title: '閮ㄥ垎涓婁紶澶辫触', - icon: 'none' - }); - }); - }, - // 鏂囦欢鍒犻櫎鍥炶皟 - onFileDelete(e) { - console.log('鍒犻櫎鏂囦欢:', e.index); - }, - - // 鍒犻櫎鍗曚釜鏂囦欢 - deleteFile(index) { - this.fileLists.splice(index, 1); - }, + // 鍒犻櫎鍗曚釜鏂囦欢 + deleteFile(index) { + this.fileLists.splice(index, 1); + }, - submitFileList() { - if (!this.fileLists.length) { - uni.showToast({ - title: '娌℃湁鍙彁浜ょ殑鏂囦欢', - icon: 'none' - }); - return; - } - console.log(this.fileLists) - this.$http.post(this.url.add, { - equipmentId: this.id, - fileList: this.fileLists - }).then(res => { - if (res.data.success) { - uni.showToast({ - title: '鎻愪氦鎴愬姛' - }); - this.getFileList(); - } else { - uni.showToast({ - title: '鎻愪氦澶辫触', - icon: 'none' - }); - } - }).catch(err => { - uni.showToast({ - title: '鎻愪氦寮傚父', - icon: 'none' - }); - console.error('鎻愪氦澶辫触:', err); - }); - }, - goHome() { - uni.reLaunch({ - url: '/pages/index/index' - }) - }, - /** - * 鎶ヤ慨 - */ - goReportRepair() { - uni.redirectTo({ - url: `/pages/reportRepair/reportRepair?equipmentId=${encodeURIComponent(this.id)}` - }); - }, - /** - * 鐐规 - */ - goCheck() { - uni.redirectTo({ - // url: '/pages/checkList/checkList', - url: `/pages/checkList/checkList?equipmentId=${encodeURIComponent(this.id)}` - }); - }, - /** - * 鍛ㄤ繚 - */ - goBaoZhou() { - uni.redirectTo({ - // url: '/pages/baoZhou/baoZhou', - url: `/pages/baoZhou/baoZhou?equipmentId=${encodeURIComponent(this.id)}` - }); - }, - /** - * 鍛ㄤ繚 - */ - goMaintenance() { - uni.redirectTo({ - // url: '/pages/maintenanceReport/maintenanceReport', - url: `/pages/maintenanceReport/maintenanceReport?equipmentId=${encodeURIComponent(this.id)}` - }); - }, - upCallback() { - console.log("id", this.id) - this.$http.get(this.url.stallList, { - params: { - pageNo: 999, - pageSize: 1, - order: 'asc', - column: 'createTime', - id: this.id - }, + submitFileList() { + if (!this.fileLists.length) { + uni.showToast({ + title: '娌℃湁鍙彁浜ょ殑鏂囦欢', + icon: 'none' + }); + return; + } + console.log(this.fileLists) + this.$http.post(this.url.add, { + equipmentId: this.id, + fileList: this.fileLists + }).then(res => { + if (res.data.success) { + uni.showToast({ + title: '鎻愪氦鎴愬姛' + }); + this.getFileList(); + } else { + uni.showToast({ + title: '鎻愪氦澶辫触', + icon: 'none' + }); + } + }).catch(err => { + uni.showToast({ + title: '鎻愪氦寮傚父', + icon: 'none' + }); + console.error('鎻愪氦澶辫触:', err); + }); + }, - }).then(res => { - this.announcement1 = res.data.result - console.log("url", res) - //璁剧疆鍒楄〃鏁版嵁 - if (res.data.success) { - console.log("res", res.data.result.equipmentCode) - this.formData = this.announcement1 - } - }).catch(() => { - //鑱旂綉澶辫触, 缁撴潫鍔犺浇 - }) - }, + /** + * 鎶ヤ慨 + */ + goReportRepair() { + uni.redirectTo({ + url: `/pages/reportRepair/reportRepair?equipmentId=${encodeURIComponent(this.id)}` + }); + }, + /** + * 鐐规 + */ + goCheck() { + uni.redirectTo({ + // url: '/pages/checkList/checkList', + url: `/pages/checkList/checkList?equipmentId=${encodeURIComponent(this.id)}` + }); + }, + /** + * 鍛ㄤ繚 + */ + goBaoZhou() { + uni.redirectTo({ + // url: '/pages/baoZhou/baoZhou', + url: `/pages/baoZhou/baoZhou?equipmentId=${encodeURIComponent(this.id)}` + }); + }, + /** + * 鍛ㄤ繚 + */ + goMaintenance() { + uni.redirectTo({ + // url: '/pages/maintenanceReport/maintenanceReport', + url: `/pages/maintenanceReport/maintenanceReport?equipmentId=${encodeURIComponent(this.id)}` + }); + }, - mescrollInit(mescroll) { - console.log('mescrollInit') - this.mescroll = mescroll; - }, - }, + }, - } +} </script> <style> - .is-hover { - color: rgba(255, 255, 255, 0.6); - background-color: #55aaff; - border-color: #55aaff; - } +.is-hover { + color: rgba(255, 255, 255, 0.6); + background-color: #55aaff; + border-color: #55aaff; +} +.content { + margin-top: 5px; +} - .content { - margin-top: 5px; - } +.content scroll-view { + scrollIndicator: "none" +} - .content scroll-view { - scrollIndicator: "none" - } - - .popupView { - margin-top: 85px; - height: auto; - } -</style> \ No newline at end of file +.popupView { + margin-top: 45px; + height: auto; +} +</style> diff --git a/pages/historicalInspection/historicalInspection.vue b/pages/historicalInspection/historicalInspection.vue index fee575f..bb0b7bc 100644 --- a/pages/historicalInspection/historicalInspection.vue +++ b/pages/historicalInspection/historicalInspection.vue @@ -362,7 +362,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/historicalMaintenance/historicalMaintenance.vue b/pages/historicalMaintenance/historicalMaintenance.vue index 4b03758..a59cb28 100644 --- a/pages/historicalMaintenance/historicalMaintenance.vue +++ b/pages/historicalMaintenance/historicalMaintenance.vue @@ -336,7 +336,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/historicalRepair/historicalRepair.vue b/pages/historicalRepair/historicalRepair.vue index bb7fd85..7ed0276 100644 --- a/pages/historicalRepair/historicalRepair.vue +++ b/pages/historicalRepair/historicalRepair.vue @@ -320,7 +320,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/home/home.vue b/pages/home/home.vue index 2a927ef..b159b0a 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -53,7 +53,10 @@ <view class="cu-item animation-slide-bottom" :style="[{animationDelay: (index + 1)*0.1 + 's'}]" v-for="(item,index) in osList" :key="index" @tap="goPage(item.page)"> <view class="padding text-center"> - <image :src="item.icon" style="width:28px;height:28px;" /> + <image :src="item.icon" style="width:28px;height:28px;"> + <view class="cu-tag badge margin-top-sm" style="margin-left:1.2em" + v-if="getTtemDotInfo(item)"></view> + </image> <view class="margin-top-xs">{{item.title}}</view> </view> </view> @@ -70,7 +73,10 @@ <view class="cu-item animation-slide-bottom" :style="[{animationDelay: (index + 1)*0.1 + 's'}]" v-for="(item,index) in wsList" :key="index" @tap="goPage(item.page)"> <view class="padding text-center"> - <image :src="item.icon" style="width:28px;height:28px;" /> + <image :src="item.icon" style="width:28px;height:28px;"> + <view class="cu-tag badge margin-top-sm" style="margin-left:1.2em" + v-if="getTtemDotInfo(item)"></view> + </image> <view class="margin-top-xs">{{item.title}}</view> </view> </view> @@ -96,45 +102,50 @@ props: { cur: String, }, + // watch: { + // cur: { + // immediate: true, + // handler: function(val, oldVal) { + // console.log('cur', val, oldVal) + // this.initMenu() + // }, + // }, + // }, watch: { - cur: { - immediate: true, - handler: function(val, oldVal) { - console.log('cur', val, oldVal) - this.initMenu() - }, - }, + cur: { + immediate: true, + handler: function(val, oldVal) { + console.log('cur', val, oldVal) + // 鍗充娇鍊兼病鏈夊彉鍖栵紝涔熶富鍔ㄨ皟鐢� initMenu + this.initMenu() + }, + }, }, data() { return { url: { bindingThirdPhone: '/sys/permission/getUserPermissionByToken', - countItem: '/assign/flow/taskCountBySelf' + countItem: '/assign/flow/taskCountBySelf', + waitTiem: 'eam/dashboard/pendingExecOrderCountBySelf' }, swiperList: [{ id: 1, type: 'image', - url: '/static/banner/eam_banner1.png', + url: '/static/banner/fashite-banner.png', link: '' }, { id: 2, type: 'image', - url: '/static/banner/eam_banner2.png', + url: '/static/banner/eam_banner3.png', link: '' }, { id: 3, type: 'image', - url: '/static/banner/eam_banner3.png', - link: '' - }, - { - id: 4, - type: 'image', url: '/static/banner/eam_banner4.png', link: '' - }, + } ], middleApps: [{ icon: 'line2_icon1.png', @@ -152,7 +163,9 @@ wsList: ws.data, msgCount: 0, toDomsgCount: 0, - + unExecRepairOrderCount: 0, + unExecInspectionOrderCount: 0, + unExecMaintenanceOrderCount: 0, dot: { mailHome: false } @@ -165,6 +178,7 @@ this.onSocketReceive() this.saveClientId() this.taskCountBySelf(); + this.getItemCount(); this.loadCount(0); }, goPage(page) { @@ -206,6 +220,22 @@ this.toDomsgCount = res.data.result }) }, + + getItemCount() { + this.$http.get(this.url.waitTiem).then(res => { + const { + unExecRepairOrderCount, + unExecInspectionOrderCount, + unExecMaintenanceOrderCount + } = res.data.result; + + // 鎴栬�呭崟鐙祴鍊肩粰涓嶅悓鐨勬暟鎹睘鎬� + this.unExecRepairOrderCount = unExecRepairOrderCount; + this.unExecInspectionOrderCount = unExecInspectionOrderCount; + this.unExecMaintenanceOrderCount = unExecMaintenanceOrderCount; + }); + }, + loadCount(flag) { console.log("loadCount::flag", flag) let url = '/sys/annountCement/listByUser'; @@ -247,11 +277,17 @@ }, getTtemDotInfo(item) { if (item.page === 'ToDoList' && this.toDomsgCount > 0) { - // return this.toDomsgCount - return true + return true; + } else if (item.page === 'maintenanceReport' && this.unExecRepairOrderCount > 0) { + return true; + } else if (item.page === 'checkList' && this.unExecInspectionOrderCount > 0) { + return true; + } else if (item.page === 'baoZhou' && this.unExecMaintenanceOrderCount > 0) { + return true; } return false; } + } } </script> diff --git a/pages/index/index.vue b/pages/index/index.vue index 0ac998d..1acf9f2 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -42,10 +42,20 @@ ++this.commponent3Key }, methods: { - NavChange: function(e) { - this.PageCur = e.currentTarget.dataset.cur + NavChange(e) { + const cur = e.currentTarget.dataset.cur + // 濡傛灉鍒囨崲鍒伴椤碉紝鎵嬪姩鏇存柊 cur 鍊硷紝瑙﹀彂 watch + if (cur === 'home') { + // 鍋囪 home 缁勪欢宸叉寕杞斤紝鍙�氳繃 ref 璋冪敤鏂规硶鎴栨洿鏂� prop + this.$refs.home && this.$refs.home.$emit('update:cur', 'home') + } + this.PageCur = cur } + // NavChange: function(e) { + // this.PageCur = e.currentTarget.dataset.cur + // } + } } </script> diff --git a/pages/login/loginOauth2.vue b/pages/login/loginOauth2.vue index 8df0d77..6d23796 100644 --- a/pages/login/loginOauth2.vue +++ b/pages/login/loginOauth2.vue @@ -2,7 +2,7 @@ <view class="zai-box"> <!-- 鐧诲綍鍔犺浇寮圭獥 --> <view class="cu-load load-modal"> - <image src="https://static.jeecg.com/upload/test/login4_1595818039175.png" mode="aspectFit" + <image src="../../static/logo-lx.png" mode="aspectFit" class="round"></image> <view class="gray-text">姝e湪鐧诲綍涓�...</view> </view> @@ -149,7 +149,7 @@ /** 鍚庡彴鏋勯�爋auth2鐧诲綍鍦板潃 */ sysOAuth2Login(source) { let domainURL = configService.apiUrl; - let url = `http://houjie.xalxzn.com:8866/jeecg-boot/sys/thirdLogin/oauth2/${source}/login`; + let url = `https://fastwoke.cn:8087/jeecg-boot/sys/thirdLogin/oauth2/${source}/login`; let state = window.location.origin + window.location.search url += `?state=${encodeURIComponent(state)}`; console.log('sysOAuth2Login====銆�', url) diff --git a/pages/maintenanceReport/maintenanceReport.vue b/pages/maintenanceReport/maintenanceReport.vue index 997c486..35a438a 100644 --- a/pages/maintenanceReport/maintenanceReport.vue +++ b/pages/maintenanceReport/maintenanceReport.vue @@ -68,18 +68,22 @@ </view> </view> <view class="flex"> + <view class="flex-sub text-light bg-white padding-xs margin-xs radius">鏁呴殰鎻忚堪:</view> + <view class="flex-sub bg-white padding-xs margin-xs text-green radius text-right"> + {{item.faultDescription}} + </view> + </view> + <view class="flex"> <view class="flex-sub text-light bg-white padding-xs margin-xs radius">鏁呴殰寮�濮嬫椂闂�:</view> <view class="flex-sub bg-white padding-xs margin-xs text-blue radius text-right"> {{item.faultStartTime}} </view> </view> - <view class="flex"> + <view v-if="authIncludes('eam:repair:collect')" class="flex"> <view class="flex-sub text-light bg-white padding-xs margin-xs radius">鎿嶄綔:</view> - <view v-if="authIncludes('eam:repair:collect')" - class="flex-sub bg-blue padding-xs margin-xs radius text-sm text-center" + <view class="flex-sub bg-blue padding-xs margin-xs radius text-sm text-center" @click.stop="handleStartWork(item)" hover-class="is-hover">棰嗗彇</view> - </view> </uni-card> </view> @@ -341,7 +345,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/maintenanceReport/maintenanceReportDetils/maintenanceReportDetils.vue b/pages/maintenanceReport/maintenanceReportDetils/maintenanceReportDetils.vue index ba3b5cb..0b2cbd5 100644 --- a/pages/maintenanceReport/maintenanceReportDetils/maintenanceReportDetils.vue +++ b/pages/maintenanceReport/maintenanceReportDetils/maintenanceReportDetils.vue @@ -343,7 +343,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/reportRepair/reportRepair.vue b/pages/reportRepair/reportRepair.vue index dff451c..f86e6a8 100644 --- a/pages/reportRepair/reportRepair.vue +++ b/pages/reportRepair/reportRepair.vue @@ -22,6 +22,10 @@ <uni-forms-item required :label-width="100" name="faultDescription" label="鏁呴殰鎻忚堪:"> <uni-easyinput v-model="formData.faultDescription" /> </uni-forms-item> + <uni-forms-item name="outNum" label="鎶ヤ慨鍥剧墖:"> + <uni-file-picker limit="9" :value="fileLists" :image-styles="imageStyles" :sourceType="sourceType" + @select="select" @progress="progress" @success="success" @fail="fail" @delete="deletea" /> + </uni-forms-item> <uni-forms-item required name="name" :label-width="100" label="鏄惁鍋滄満:"> <uni-data-select v-model="formData.breakdownFlag" :localdata="isTrueList" @change="changeisTrueList" placeholder="璇烽�夋嫨" /> @@ -30,14 +34,10 @@ <uni-datetime-picker type="datetime" v-model="formData.loadTime" /> </uni-forms-item> - <uni-forms-item name="outNum" label="鎶ヤ慨鍥剧墖:"> - <uni-file-picker limit="9" :value="fileLists" :image-styles="imageStyles" :sourceType="sourceType" - @select="select" @progress="progress" @success="success" @fail="fail" @delete="deletea" /> - </uni-forms-item> - <uni-forms-item name="faultDescription" label="澶囨敞:"> +<!-- <uni-forms-item name="faultDescription" label="澶囨敞:"> <uni-easyinput type="textarea" v-model="formData.remark" /> - </uni-forms-item> + </uni-forms-item> --> </uni-group> </uni-forms> @@ -233,7 +233,7 @@ for (let i = 0; i < this.formData.faultNameList.length; i++) { if (this.formData.faultNameList[i].id === value) { this.formData.faultType = this.formData.faultNameList[i].faultCategory_dictText - this.formData.faultDescription = this.formData.faultNameList[i].faultDescription + // this.formData.faultDescription = this.formData.faultNameList[i].faultDescription } } @@ -431,7 +431,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/reportRepair/reportRepairDeils/reportRepairDeils.vue b/pages/reportRepair/reportRepairDeils/reportRepairDeils.vue index e5140d1..125f107 100644 --- a/pages/reportRepair/reportRepairDeils/reportRepairDeils.vue +++ b/pages/reportRepair/reportRepairDeils/reportRepairDeils.vue @@ -330,7 +330,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file diff --git a/pages/spare/spare.vue b/pages/spare/spare.vue index 083c2d0..6b2ca81 100644 --- a/pages/spare/spare.vue +++ b/pages/spare/spare.vue @@ -30,7 +30,7 @@ methods: { navigateToDeviceDetails(equipmentId) { this.hasNavigated = true; // 鏍囪宸茬粡璺宠浆 - uni.navigateTo({ + uni.redirectTo({ url: `/pages/device/deviceWebDeils/deviceWebDeils?equipmentId=${encodeURIComponent(equipmentId)}`, success: () => { console.log('Navigated to device details'); @@ -131,4 +131,4 @@ left: 50%; transform: translate(-50%, -50%); } -</style> \ No newline at end of file +</style> diff --git a/pages/user/people.vue b/pages/user/people.vue index 431a2c4..17c1530 100644 --- a/pages/user/people.vue +++ b/pages/user/people.vue @@ -13,7 +13,10 @@ <view class="text-xl text-orange">{{personalList.username}}</view> <view class="margin-top-sm"><text class="cuIcon-people"></text> 鐢ㄦ埛</view> </view> - + <view class="flex flex-sub flex-direction animation-slide-top" :style="[{animationDelay: '0.2s'}]"> + <view class="text-xl text-blue">{{personalList.workNo?personalList.workNo:'宸ュ彿'}}</view> + <view class="margin-top-sm"><text class="cuIcon-activity"></text> 宸ュ彿</view> + </view> <view class="flex flex-sub flex-direction animation-slide-top" :style="[{animationDelay: '0.2s'}]"> <view class="text-xl text-green">{{personalList.post?personalList.post:'鍛樺伐'}}</view> <view class="margin-top-sm"><text class="cuIcon-news"></text> 鑱屽姟</view> @@ -74,7 +77,8 @@ avatar:'', realname:'', username:'', - post:'' + post:'', + workNo:'' }, positionUrl:'/sys/position/list', departUrl:'/sys/user/userDepartList', @@ -124,7 +128,7 @@ // let avatar=(perArr.avatar && perArr.avatar.length > 0)? api.getFileAccessHttpUrl(perArr.avatar):'/static/avatar_boy.png' this.personalList.avatar =res.data.result.avatar - + this.personalList.workNo =res.data.result.workNo // this.personalList.realname = perArr.realname this.personalList.username = res.data.result.realname // this.personalList.depart = perArr.departIds diff --git a/static/banner/eam_banner1.png b/static/banner/eam_banner1.png deleted file mode 100644 index 9615e9f..0000000 --- a/static/banner/eam_banner1.png +++ /dev/null Binary files differ diff --git a/static/banner/eam_banner2.png b/static/banner/eam_banner2.png deleted file mode 100644 index 400c9f2..0000000 --- a/static/banner/eam_banner2.png +++ /dev/null Binary files differ diff --git a/static/banner/eam_banner3.png b/static/banner/eam_banner3.png index 6f43fca..2c6b6f0 100644 --- a/static/banner/eam_banner3.png +++ b/static/banner/eam_banner3.png Binary files differ diff --git a/static/banner/eam_banner4.png b/static/banner/eam_banner4.png index e981ea0..41ceafc 100644 --- a/static/banner/eam_banner4.png +++ b/static/banner/eam_banner4.png Binary files differ diff --git a/store/index.js b/store/index.js index f074e10..22ff7ca 100644 --- a/store/index.js +++ b/store/index.js @@ -108,6 +108,7 @@ const userInfo = result.userInfo uni.setStorageSync(ACCESS_TOKEN, result.token); uni.setStorageSync(USER_INFO, userInfo); + uni.setStorageSync("userId", userInfo.id); uni.setStorageSync(X_TENANT_ID, userInfo.loginTenantId); commit('SET_TOKEN', result.token) -- Gitblit v1.9.3