From 4893cfcef23b5d573553bdba02233e3b583e4b06 Mon Sep 17 00:00:00 2001 From: zhangdi <15053473693@163.com> Date: Fri, 6 Dec 2024 11:44:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/inspection/plan.vue | 4 ++-- pages/inspection/quest.vue | 8 ++++---- pages/inspection/questDetails.vue | 2 +- pages/inspection/questOrder.vue | 9 ++++----- pages/login/authInfo.vue | 4 ---- pages/login/login.vue | 7 +++---- pages/my/my.vue | 23 +++++++++++------------ pages/my/records.vue | 12 ++++++------ pages/register/index.vue | 8 ++++---- pages/submission/components/subForm.vue | 10 +++++----- pages/submission/evaluate.vue | 12 ++++++------ pages/submission/records.vue | 14 +++++++------- pages/submission/sendOrders.vue | 4 ++-- store/$u.mixin.js | 6 +++--- 14 files changed, 58 insertions(+), 65 deletions(-) diff --git a/pages/inspection/plan.vue b/pages/inspection/plan.vue index cf94ae1..4988197 100644 --- a/pages/inspection/plan.vue +++ b/pages/inspection/plan.vue @@ -119,7 +119,7 @@ export default { // 获取列表 getRecordsList() { - this.BetLoading.show(); + // this.BetLoading.show(); this.$u.api.getDictionaryList().then(res => { var totalPage = res.data.total; @@ -137,7 +137,7 @@ export default { this.loadingState = "nomore"; this.isNomore = true; } - this.BetLoading.hide(); + // this.BetLoading.hide(); }).catch(err => { }) diff --git a/pages/inspection/quest.vue b/pages/inspection/quest.vue index 536a881..4c65cfb 100644 --- a/pages/inspection/quest.vue +++ b/pages/inspection/quest.vue @@ -233,7 +233,7 @@ export default { methods: { // 获取列表 async getRecordsList() { - this.BetLoading.show(); + // this.BetLoading.show(); this.loadingState = "loading"; let query = { current: this.page.currentPage, //页数 @@ -266,7 +266,7 @@ export default { this.loadingState = "nomore"; this.isNomore = true; } - this.BetLoading.hide(); + // this.BetLoading.hide(); } }, @@ -388,11 +388,11 @@ export default { let query = { id: this.rowInfo.id, } - this.BetLoading.show(); + // this.BetLoading.show(); this.$u.api.confirmPayment(query).then(res => { this.paymentShow = false - this.BetLoading.hide(); + // this.BetLoading.hide(); if (res.code == 200) { uni.showToast({ title: "确认成功", icon: "none" }); this.getRecordsList() diff --git a/pages/inspection/questDetails.vue b/pages/inspection/questDetails.vue index 1a264b3..1b3d39b 100644 --- a/pages/inspection/questDetails.vue +++ b/pages/inspection/questDetails.vue @@ -141,7 +141,7 @@ export default { width: 100%; padding: 0; padding-top: 26rpx; - + height: 100vh; .info { margin: 0 24rpx 20rpx; border-radius: 20rpx; diff --git a/pages/inspection/questOrder.vue b/pages/inspection/questOrder.vue index 47b67a2..a986853 100644 --- a/pages/inspection/questOrder.vue +++ b/pages/inspection/questOrder.vue @@ -79,7 +79,7 @@ 巡检任务 - + 实验室楼层:{{ item.floorName }} @@ -129,7 +129,6 @@ - 价格: @@ -384,7 +383,7 @@ export default { sizeType: ["original", "compressed"], // 可以指定是原图还是压缩图,默认二者都有 sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有 success: (res) => { - this.BetLoading.show() + // this.BetLoading.show() // 成功选择图片后的回调 const tempFilePaths = res.tempFilePaths; this.uploadFile(tempFilePaths[0], index, vindex, sindex); @@ -407,10 +406,10 @@ export default { let info = JSON.parse(res.data); console.log("上传成功", info); // 上传成功后的操作 this.detailForm.details[index].details[vindex].details[sindex].picUrl = info.data.link - this.BetLoading.hide() + // this.BetLoading.hide() }, error: (uploadFileRes) => { - this.BetLoading.hide() + // this.BetLoading.hide() }, }); }, diff --git a/pages/login/authInfo.vue b/pages/login/authInfo.vue index 032c12c..99d401f 100644 --- a/pages/login/authInfo.vue +++ b/pages/login/authInfo.vue @@ -83,10 +83,6 @@ onShow() { this.$nextTick(() => { this.$refs.tabbarRef.getPermission(); - this.BetLoading.show(); - setTimeout(() => { - this.BetLoading.hide(); - }, 1000); }); //工作台 this.getworkbench(); diff --git a/pages/login/login.vue b/pages/login/login.vue index ae66c79..afbd9f1 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -85,8 +85,7 @@ export default { uni.showToast({ title: "请输入密码", icon: "none" }); return false; } - // this.$refs.BetLoading.show(); - console.log(555555555555, this.$refs.BetLoading.show()) + this.$refs.BetLoading.show(); // // 实例化smCrypto child-component // const smCryptoInstance = new smCrypto.SM2Instance(); // // 设置密钥 @@ -126,7 +125,7 @@ export default { }); this.$store.dispatch("changeTabbar", res); - this.BetLoading.hide(); + // this.BetLoading.hide(); }) .catch((err) => { if (err.error_code == 2004) { @@ -135,7 +134,7 @@ export default { }); return false } - this.BetLoading.hide(); + // this.BetLoading.hide(); }); }, diff --git a/pages/my/my.vue b/pages/my/my.vue index 7125173..d7eb79f 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -8,12 +8,12 @@ " alt="" /> - {{ userIfo.businessName }}{{ userIfo.nick_name }} + {{ userIfo.businessName?userIfo.businessName:'' }}{{ userIfo.nick_name }} - {{ userIfo.user_name }} + {{ userIfo.user_name?userIfo.user_name:'无' }} - {{ userIfo.area }} + {{ userIfo.area?userIfo.area:'' }} @@ -76,14 +76,13 @@ export default { if (info) { this.userIfo = JSON.parse(JSON.stringify(info)); } - console.log(11111, this.userIfo) + this.status = this.userIfo.detail.status this.$refs.tabbarRef.getPermission(); - this.BetLoading.show(); - setTimeout(() => { - this.BetLoading.hide(); - }, 1000); }); + }, + mounted() { + }, methods: { pageTo(item) { @@ -97,14 +96,14 @@ export default { content: "请确认是否要退出登录?", success: (res) => { if (res.confirm) { - this.BetLoading.show(); + this.$refs.BetLoading.show() this.$u.api.logout().then(res => { - this.BetLoading.hide(); //TODO uni.removeStorageSync("token"); uni.removeStorageSync("userinfo"); uni.removeStorageSync("tabBarList"); global.tabBarCurrent = 0 + this.$refs.BetLoading.hide() uni.redirectTo({ url: "/pages/login/login", }); @@ -124,10 +123,10 @@ export default { .page-css { background: #efefef; padding: 0 0 32rpx 0; - + height: 100vh; .sp-my-new { color: #000000; - + background: #F3F5F9; width: 750rpx; margin: 0 auto; diff --git a/pages/my/records.vue b/pages/my/records.vue index 7773785..3fb72a8 100644 --- a/pages/my/records.vue +++ b/pages/my/records.vue @@ -69,7 +69,7 @@ export default { methods: { // 获取人员列表 getUserList getUserLists() { - this.BetLoading.show() + // this.BetLoading.show() let query_ = { current: 1, size: 10 @@ -79,7 +79,7 @@ export default { this.getUserData = res.data.records } - this.BetLoading.hide() + // this.BetLoading.hide() }); }, // 人员选择 @@ -96,7 +96,7 @@ export default { }, // 获取登录记录 getLoginRcords() { - this.BetLoading.show() + // this.BetLoading.show() let query_ = { logType: 1, userId: this.searchInfo.id @@ -105,12 +105,12 @@ export default { if (res.code == 200) { this.recordData = res.data } - this.BetLoading.hide() + // this.BetLoading.hide() }); }, // 获取修改记录 getEditRcords() { - this.BetLoading.show() + // this.BetLoading.show() let query_ = { logType: 2, //1 登录日志 2 修改日志 userId: this.searchInfo.id @@ -120,7 +120,7 @@ export default { this.recordData = res.data } - this.BetLoading.hide() + // this.BetLoading.hide() }); }, searchData() { diff --git a/pages/register/index.vue b/pages/register/index.vue index 92aad5e..3df28f9 100644 --- a/pages/register/index.vue +++ b/pages/register/index.vue @@ -178,7 +178,7 @@ export default { uni.$u.toast("请勾选《注册服务协议》及《隐私权政策》"); return false; } - this.BetLoading.show(); + // this.BetLoading.show(); let query_ = { "deptName": this.registerInfo.businessName,//企业名称 "address": this.registerInfo.area,//详细地址 @@ -190,7 +190,7 @@ export default { "verifyCode": this.registerInfo.verificationCode,//验证码 } this.$u.api.registerUser(query_).then(res => { - this.BetLoading.hide(); + // this.BetLoading.hide(); if (res.code == 200) { setTimeout(() => { uni.navigateTo({ @@ -201,11 +201,11 @@ export default { uni.$u.toast(res.msg); } }).finally(err => { - this.BetLoading.hide(); + // this.BetLoading.hide(); uni.$u.toast(err.data.msg); }) } else { - this.BetLoading.hide(); + // this.BetLoading.hide(); console.log('验证失败'); } }); diff --git a/pages/submission/components/subForm.vue b/pages/submission/components/subForm.vue index 2d54d6e..6389e12 100644 --- a/pages/submission/components/subForm.vue +++ b/pages/submission/components/subForm.vue @@ -148,7 +148,7 @@ export default { this.$refs[`breakdownForm${index}`][0].setRules(this.rules) this.$refs[`breakdownForm${index}`][0].validate(valid => { if (!valid) { - this.BetLoading.hide(); + // this.BetLoading.hide(); validator = false return } else { @@ -168,14 +168,14 @@ export default { // 新提交 submit() { this.$u.api.workOrderSave(this.breakdownInfo).then(res => { - this.BetLoading.hide(); + // this.BetLoading.hide(); if (res.code == 200) { uni.navigateTo({ url: "/pages/submission/records", }); } }).catch(err => { - this.BetLoading.hide(); + // this.BetLoading.hide(); }) }, // 修改 @@ -185,14 +185,14 @@ export default { id: this.pageId } this.$u.api.workOrderupdate(query_).then(res => { - this.BetLoading.hide(); + // this.BetLoading.hide(); if (res.code == 200) { uni.redirectTo({ url: "/pages/submission/records", }); } }).catch(err => { - this.BetLoading.hide(); + // this.BetLoading.hide(); }) }, // 扫码成功 diff --git a/pages/submission/evaluate.vue b/pages/submission/evaluate.vue index 696e2d5..c287fe6 100644 --- a/pages/submission/evaluate.vue +++ b/pages/submission/evaluate.vue @@ -110,7 +110,7 @@ export default { // signaturePerson: this.userInfo.user_name, //签名人 // signatureTime: this.$u.timeFrom(timeNow, 'yyyy-mm-dd hh:MM:ss'), //签名时间 } - this.BetLoading.show() + // this.BetLoading.show() if (this.completeValue == 1) {//已完成 for (let i = 0; i < this.questionList.length; i++) { if (this.questionList[i].type == null) { @@ -123,7 +123,7 @@ export default { if (this.istask == 'true') { this.$u.api.repairRefuseFinish(query_).then(res => { if (res.code == 200) { - this.BetLoading.hide() + // this.BetLoading.hide() uni.showToast({ title: "提交成功", icon: "none" }); // 评价成功 返回上一级 @@ -135,7 +135,7 @@ export default { } else { this.$u.api.evaluateRepairReject(query_).then(res => { if (res.code == 200) { - this.BetLoading.hide() + // this.BetLoading.hide() uni.showToast({ title: "提交成功", icon: "none" }); // 评价成功 返回上一级 @@ -185,7 +185,7 @@ export default { if (this.istask == 'true') { this.$u.api.repairConfirmFinish(query_).then(res => { if (res.code == 200) { - this.BetLoading.hide() + // this.BetLoading.hide() uni.showToast({ title: "评价成功", icon: "none" }); // 评价成功 返回上一级 uni.navigateBack({ @@ -196,7 +196,7 @@ export default { } else { this.$u.api.evaluateSign(query_).then(res => { if (res.code == 200) { - this.BetLoading.hide() + // this.BetLoading.hide() uni.showToast({ title: "评价成功", icon: "none" }); // 评价成功 返回上一级 uni.navigateBack({ @@ -209,7 +209,7 @@ export default { }, error: (uploadFileRes) => { console.log("上传失败", uploadFileRes.data); // 上传成功后的操作 - this.BetLoading.hide() + // this.BetLoading.hide() }, }); } diff --git a/pages/submission/records.vue b/pages/submission/records.vue index 81c0534..b790e3b 100644 --- a/pages/submission/records.vue +++ b/pages/submission/records.vue @@ -259,7 +259,7 @@ export default { this.loadingState = "nomore"; this.isNomore = true; } - this.BetLoading.hide(); + // this.BetLoading.hide(); } }).catch(err => { @@ -304,13 +304,13 @@ export default { subOrder(row) { let query_ = [row] this.$u.api.workOrderSave(query_).then(res => { - this.BetLoading.hide(); + // this.BetLoading.hide(); if (res.code == 200) { this.page.currentPage = 1; this.getRecordsList() } }).catch(err => { - this.BetLoading.hide(); + // this.BetLoading.hide(); }) }, @@ -378,11 +378,11 @@ export default { id: this.rowInfo.id, closeReason: this.closeReason, } - this.BetLoading.show(); + // this.BetLoading.show(); this.$u.api.cloneOrder(query).then(res => { this.cloneVisible = false - this.BetLoading.hide(); + // this.BetLoading.hide(); if (res.code == 200) { uni.showToast({ title: "关闭成功", icon: "none" }); this.getRecordsList() @@ -454,11 +454,11 @@ export default { let query = { id: this.rowInfo.id, } - this.BetLoading.show(); + // this.BetLoading.show(); this.$u.api.cloneOrder(query).then(res => { this.paymentShow = false - this.BetLoading.hide(); + // this.BetLoading.hide(); if (res.code == 200) { uni.showToast({ title: "确认成功", icon: "none" }); this.submitOrderShow = false diff --git a/pages/submission/sendOrders.vue b/pages/submission/sendOrders.vue index e5829b0..3ede987 100644 --- a/pages/submission/sendOrders.vue +++ b/pages/submission/sendOrders.vue @@ -505,7 +505,7 @@ export default { } this.$u.api.workOrderupdate(updayeQuery).then(res => { - this.BetLoading.hide(); + // this.BetLoading.hide(); if (res.code == 200) { this.$u.api.serviceman(sendOrderQuery_).then(res => { if (res.code == 200) { @@ -517,7 +517,7 @@ export default { }) } }).catch(err => { - this.BetLoading.hide(); + // this.BetLoading.hide(); }) diff --git a/store/$u.mixin.js b/store/$u.mixin.js index c5d46ad..f123aa0 100644 --- a/store/$u.mixin.js +++ b/store/$u.mixin.js @@ -19,9 +19,9 @@ module.exports = { } }, computed: { - BetLoading() { - return this.$refs.BetLoading - }, + // BetLoading() { + // return this.$refs.BetLoading + // }, // 将vuex的state中的所有变量,解构到全局混入的mixin中 ...mapState(StoreKey), }