代码提交

test
zhangdi 1 year ago
parent dfee022ab8
commit 4893cfcef2
  1. 4
      pages/inspection/plan.vue
  2. 8
      pages/inspection/quest.vue
  3. 2
      pages/inspection/questDetails.vue
  4. 9
      pages/inspection/questOrder.vue
  5. 4
      pages/login/authInfo.vue
  6. 7
      pages/login/login.vue
  7. 21
      pages/my/my.vue
  8. 12
      pages/my/records.vue
  9. 8
      pages/register/index.vue
  10. 10
      pages/submission/components/subForm.vue
  11. 12
      pages/submission/evaluate.vue
  12. 14
      pages/submission/records.vue
  13. 4
      pages/submission/sendOrders.vue
  14. 6
      store/$u.mixin.js

@ -119,7 +119,7 @@ export default {
// //
getRecordsList() { getRecordsList() {
this.BetLoading.show(); // this.BetLoading.show();
this.$u.api.getDictionaryList().then(res => { this.$u.api.getDictionaryList().then(res => {
var totalPage = res.data.total; var totalPage = res.data.total;
@ -137,7 +137,7 @@ export default {
this.loadingState = "nomore"; this.loadingState = "nomore";
this.isNomore = true; this.isNomore = true;
} }
this.BetLoading.hide(); // this.BetLoading.hide();
}).catch(err => { }).catch(err => {
}) })

@ -233,7 +233,7 @@ export default {
methods: { methods: {
// //
async getRecordsList() { async getRecordsList() {
this.BetLoading.show(); // this.BetLoading.show();
this.loadingState = "loading"; this.loadingState = "loading";
let query = { let query = {
current: this.page.currentPage, // current: this.page.currentPage, //
@ -266,7 +266,7 @@ export default {
this.loadingState = "nomore"; this.loadingState = "nomore";
this.isNomore = true; this.isNomore = true;
} }
this.BetLoading.hide(); // this.BetLoading.hide();
} }
}, },
@ -388,11 +388,11 @@ export default {
let query = { let query = {
id: this.rowInfo.id, id: this.rowInfo.id,
} }
this.BetLoading.show(); // this.BetLoading.show();
this.$u.api.confirmPayment(query).then(res => { this.$u.api.confirmPayment(query).then(res => {
this.paymentShow = false this.paymentShow = false
this.BetLoading.hide(); // this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ title: "确认成功", icon: "none" }); uni.showToast({ title: "确认成功", icon: "none" });
this.getRecordsList() this.getRecordsList()

@ -141,7 +141,7 @@ export default {
width: 100%; width: 100%;
padding: 0; padding: 0;
padding-top: 26rpx; padding-top: 26rpx;
height: 100vh;
.info { .info {
margin: 0 24rpx 20rpx; margin: 0 24rpx 20rpx;
border-radius: 20rpx; border-radius: 20rpx;

@ -79,7 +79,7 @@
<!-- 填写内容 --> <!-- 填写内容 -->
<view class="info" v-if="!reservationDisabled"> <view class="info" v-if="!reservationDisabled">
<view class="info_title">巡检任务</view> <view class="info_title">巡检任务</view>
<u-collapse :accordion="false"> <u-collapse :accordion="false" ref="collapseTask">
<u-collapse-item v-for="(item, index) in detailForm.details" :key="index"> <u-collapse-item v-for="(item, index) in detailForm.details" :key="index">
<view slot="title"> <view slot="title">
<text class="collapse-title">实验室楼层{{ item.floorName }}</text> <text class="collapse-title">实验室楼层{{ item.floorName }}</text>
@ -129,7 +129,6 @@
<u-input :border="true" type="textarea" v-model="s.remark" :placeholder="'请输入'" /> <u-input :border="true" type="textarea" v-model="s.remark" :placeholder="'请输入'" />
</text> </text>
</view> </view>
<!-- v-if="dataTypes == 4 && detailForm.repairStatus == 1" -->
<view class="info_item"> <view class="info_item">
<text class="item_left_txt">价格</text> <text class="item_left_txt">价格</text>
<text class="item_right_txt"> <text class="item_right_txt">
@ -384,7 +383,7 @@ export default {
sizeType: ["original", "compressed"], // sizeType: ["original", "compressed"], //
sourceType: ["album", "camera"], // sourceType: ["album", "camera"], //
success: (res) => { success: (res) => {
this.BetLoading.show() // this.BetLoading.show()
// //
const tempFilePaths = res.tempFilePaths; const tempFilePaths = res.tempFilePaths;
this.uploadFile(tempFilePaths[0], index, vindex, sindex); this.uploadFile(tempFilePaths[0], index, vindex, sindex);
@ -407,10 +406,10 @@ export default {
let info = JSON.parse(res.data); let info = JSON.parse(res.data);
console.log("上传成功", info); // console.log("上传成功", info); //
this.detailForm.details[index].details[vindex].details[sindex].picUrl = info.data.link this.detailForm.details[index].details[vindex].details[sindex].picUrl = info.data.link
this.BetLoading.hide() // this.BetLoading.hide()
}, },
error: (uploadFileRes) => { error: (uploadFileRes) => {
this.BetLoading.hide() // this.BetLoading.hide()
}, },
}); });
}, },

@ -83,10 +83,6 @@
onShow() { onShow() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.tabbarRef.getPermission(); this.$refs.tabbarRef.getPermission();
this.BetLoading.show();
setTimeout(() => {
this.BetLoading.hide();
}, 1000);
}); });
// //
this.getworkbench(); this.getworkbench();

@ -85,8 +85,7 @@ export default {
uni.showToast({ title: "请输入密码", icon: "none" }); uni.showToast({ title: "请输入密码", icon: "none" });
return false; return false;
} }
// this.$refs.BetLoading.show(); this.$refs.BetLoading.show();
console.log(555555555555, this.$refs.BetLoading.show())
// // smCrypto child-component // // smCrypto child-component
// const smCryptoInstance = new smCrypto.SM2Instance(); // const smCryptoInstance = new smCrypto.SM2Instance();
// // // //
@ -126,7 +125,7 @@ export default {
}); });
this.$store.dispatch("changeTabbar", res); this.$store.dispatch("changeTabbar", res);
this.BetLoading.hide(); // this.BetLoading.hide();
}) })
.catch((err) => { .catch((err) => {
if (err.error_code == 2004) { if (err.error_code == 2004) {
@ -135,7 +134,7 @@ export default {
}); });
return false return false
} }
this.BetLoading.hide(); // this.BetLoading.hide();
}); });
}, },

@ -8,12 +8,12 @@
" alt="" /> " alt="" />
</view> </view>
<view class="top-item"> <view class="top-item">
<view class="top-name">{{ userIfo.businessName }}{{ userIfo.nick_name }} <view class="top-name">{{ userIfo.businessName?userIfo.businessName:'' }}{{ userIfo.nick_name }}
<!-- <u-tag text="签约" type="warning" mode="plain"/> --> <!-- <u-tag text="签约" type="warning" mode="plain"/> -->
</view> </view>
<view class="top-phone">{{ userIfo.user_name }}</view> <view class="top-phone">{{ userIfo.user_name?userIfo.user_name:'无' }}</view>
</view> </view>
<view class="top-item"> {{ userIfo.area }} </view> <view class="top-item"> {{ userIfo.area?userIfo.area:'' }} </view>
</view> </view>
<!-- --> <!-- -->
<view class="feature-box" v-if="status == 1"> <view class="feature-box" v-if="status == 1">
@ -76,14 +76,13 @@ export default {
if (info) { if (info) {
this.userIfo = JSON.parse(JSON.stringify(info)); this.userIfo = JSON.parse(JSON.stringify(info));
} }
console.log(11111, this.userIfo)
this.status = this.userIfo.detail.status this.status = this.userIfo.detail.status
this.$refs.tabbarRef.getPermission(); this.$refs.tabbarRef.getPermission();
this.BetLoading.show();
setTimeout(() => {
this.BetLoading.hide();
}, 1000);
}); });
},
mounted() {
}, },
methods: { methods: {
pageTo(item) { pageTo(item) {
@ -97,14 +96,14 @@ export default {
content: "请确认是否要退出登录?", content: "请确认是否要退出登录?",
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
this.BetLoading.show(); this.$refs.BetLoading.show()
this.$u.api.logout().then(res => { this.$u.api.logout().then(res => {
this.BetLoading.hide();
//TODO //TODO
uni.removeStorageSync("token"); uni.removeStorageSync("token");
uni.removeStorageSync("userinfo"); uni.removeStorageSync("userinfo");
uni.removeStorageSync("tabBarList"); uni.removeStorageSync("tabBarList");
global.tabBarCurrent = 0 global.tabBarCurrent = 0
this.$refs.BetLoading.hide()
uni.redirectTo({ uni.redirectTo({
url: "/pages/login/login", url: "/pages/login/login",
}); });
@ -124,7 +123,7 @@ export default {
.page-css { .page-css {
background: #efefef; background: #efefef;
padding: 0 0 32rpx 0; padding: 0 0 32rpx 0;
height: 100vh;
.sp-my-new { .sp-my-new {
color: #000000; color: #000000;

@ -69,7 +69,7 @@ export default {
methods: { methods: {
// getUserList // getUserList
getUserLists() { getUserLists() {
this.BetLoading.show() // this.BetLoading.show()
let query_ = { let query_ = {
current: 1, current: 1,
size: 10 size: 10
@ -79,7 +79,7 @@ export default {
this.getUserData = res.data.records this.getUserData = res.data.records
} }
this.BetLoading.hide() // this.BetLoading.hide()
}); });
}, },
// //
@ -96,7 +96,7 @@ export default {
}, },
// //
getLoginRcords() { getLoginRcords() {
this.BetLoading.show() // this.BetLoading.show()
let query_ = { let query_ = {
logType: 1, logType: 1,
userId: this.searchInfo.id userId: this.searchInfo.id
@ -105,12 +105,12 @@ export default {
if (res.code == 200) { if (res.code == 200) {
this.recordData = res.data this.recordData = res.data
} }
this.BetLoading.hide() // this.BetLoading.hide()
}); });
}, },
// //
getEditRcords() { getEditRcords() {
this.BetLoading.show() // this.BetLoading.show()
let query_ = { let query_ = {
logType: 2, //1 2 logType: 2, //1 2
userId: this.searchInfo.id userId: this.searchInfo.id
@ -120,7 +120,7 @@ export default {
this.recordData = res.data this.recordData = res.data
} }
this.BetLoading.hide() // this.BetLoading.hide()
}); });
}, },
searchData() { searchData() {

@ -178,7 +178,7 @@ export default {
uni.$u.toast("请勾选《注册服务协议》及《隐私权政策》"); uni.$u.toast("请勾选《注册服务协议》及《隐私权政策》");
return false; return false;
} }
this.BetLoading.show(); // this.BetLoading.show();
let query_ = { let query_ = {
"deptName": this.registerInfo.businessName,// "deptName": this.registerInfo.businessName,//
"address": this.registerInfo.area,// "address": this.registerInfo.area,//
@ -190,7 +190,7 @@ export default {
"verifyCode": this.registerInfo.verificationCode,// "verifyCode": this.registerInfo.verificationCode,//
} }
this.$u.api.registerUser(query_).then(res => { this.$u.api.registerUser(query_).then(res => {
this.BetLoading.hide(); // this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
setTimeout(() => { setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
@ -201,11 +201,11 @@ export default {
uni.$u.toast(res.msg); uni.$u.toast(res.msg);
} }
}).finally(err => { }).finally(err => {
this.BetLoading.hide(); // this.BetLoading.hide();
uni.$u.toast(err.data.msg); uni.$u.toast(err.data.msg);
}) })
} else { } else {
this.BetLoading.hide(); // this.BetLoading.hide();
console.log('验证失败'); console.log('验证失败');
} }
}); });

@ -148,7 +148,7 @@ export default {
this.$refs[`breakdownForm${index}`][0].setRules(this.rules) this.$refs[`breakdownForm${index}`][0].setRules(this.rules)
this.$refs[`breakdownForm${index}`][0].validate(valid => { this.$refs[`breakdownForm${index}`][0].validate(valid => {
if (!valid) { if (!valid) {
this.BetLoading.hide(); // this.BetLoading.hide();
validator = false validator = false
return return
} else { } else {
@ -168,14 +168,14 @@ export default {
// //
submit() { submit() {
this.$u.api.workOrderSave(this.breakdownInfo).then(res => { this.$u.api.workOrderSave(this.breakdownInfo).then(res => {
this.BetLoading.hide(); // this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/submission/records", url: "/pages/submission/records",
}); });
} }
}).catch(err => { }).catch(err => {
this.BetLoading.hide(); // this.BetLoading.hide();
}) })
}, },
// //
@ -185,14 +185,14 @@ export default {
id: this.pageId id: this.pageId
} }
this.$u.api.workOrderupdate(query_).then(res => { this.$u.api.workOrderupdate(query_).then(res => {
this.BetLoading.hide(); // this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
uni.redirectTo({ uni.redirectTo({
url: "/pages/submission/records", url: "/pages/submission/records",
}); });
} }
}).catch(err => { }).catch(err => {
this.BetLoading.hide(); // this.BetLoading.hide();
}) })
}, },
// //

@ -110,7 +110,7 @@ export default {
// signaturePerson: this.userInfo.user_name, // // signaturePerson: this.userInfo.user_name, //
// signatureTime: this.$u.timeFrom(timeNow, 'yyyy-mm-dd hh:MM:ss'), // // signatureTime: this.$u.timeFrom(timeNow, 'yyyy-mm-dd hh:MM:ss'), //
} }
this.BetLoading.show() // this.BetLoading.show()
if (this.completeValue == 1) {// if (this.completeValue == 1) {//
for (let i = 0; i < this.questionList.length; i++) { for (let i = 0; i < this.questionList.length; i++) {
if (this.questionList[i].type == null) { if (this.questionList[i].type == null) {
@ -123,7 +123,7 @@ export default {
if (this.istask == 'true') { if (this.istask == 'true') {
this.$u.api.repairRefuseFinish(query_).then(res => { this.$u.api.repairRefuseFinish(query_).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.BetLoading.hide() // this.BetLoading.hide()
uni.showToast({ title: "提交成功", icon: "none" }); uni.showToast({ title: "提交成功", icon: "none" });
// //
@ -135,7 +135,7 @@ export default {
} else { } else {
this.$u.api.evaluateRepairReject(query_).then(res => { this.$u.api.evaluateRepairReject(query_).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.BetLoading.hide() // this.BetLoading.hide()
uni.showToast({ title: "提交成功", icon: "none" }); uni.showToast({ title: "提交成功", icon: "none" });
// //
@ -185,7 +185,7 @@ export default {
if (this.istask == 'true') { if (this.istask == 'true') {
this.$u.api.repairConfirmFinish(query_).then(res => { this.$u.api.repairConfirmFinish(query_).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.BetLoading.hide() // this.BetLoading.hide()
uni.showToast({ title: "评价成功", icon: "none" }); uni.showToast({ title: "评价成功", icon: "none" });
// //
uni.navigateBack({ uni.navigateBack({
@ -196,7 +196,7 @@ export default {
} else { } else {
this.$u.api.evaluateSign(query_).then(res => { this.$u.api.evaluateSign(query_).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.BetLoading.hide() // this.BetLoading.hide()
uni.showToast({ title: "评价成功", icon: "none" }); uni.showToast({ title: "评价成功", icon: "none" });
// //
uni.navigateBack({ uni.navigateBack({
@ -209,7 +209,7 @@ export default {
}, },
error: (uploadFileRes) => { error: (uploadFileRes) => {
console.log("上传失败", uploadFileRes.data); // console.log("上传失败", uploadFileRes.data); //
this.BetLoading.hide() // this.BetLoading.hide()
}, },
}); });
} }

@ -259,7 +259,7 @@ export default {
this.loadingState = "nomore"; this.loadingState = "nomore";
this.isNomore = true; this.isNomore = true;
} }
this.BetLoading.hide(); // this.BetLoading.hide();
} }
}).catch(err => { }).catch(err => {
@ -304,13 +304,13 @@ export default {
subOrder(row) { subOrder(row) {
let query_ = [row] let query_ = [row]
this.$u.api.workOrderSave(query_).then(res => { this.$u.api.workOrderSave(query_).then(res => {
this.BetLoading.hide(); // this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
this.page.currentPage = 1; this.page.currentPage = 1;
this.getRecordsList() this.getRecordsList()
} }
}).catch(err => { }).catch(err => {
this.BetLoading.hide(); // this.BetLoading.hide();
}) })
}, },
@ -378,11 +378,11 @@ export default {
id: this.rowInfo.id, id: this.rowInfo.id,
closeReason: this.closeReason, closeReason: this.closeReason,
} }
this.BetLoading.show(); // this.BetLoading.show();
this.$u.api.cloneOrder(query).then(res => { this.$u.api.cloneOrder(query).then(res => {
this.cloneVisible = false this.cloneVisible = false
this.BetLoading.hide(); // this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ title: "关闭成功", icon: "none" }); uni.showToast({ title: "关闭成功", icon: "none" });
this.getRecordsList() this.getRecordsList()
@ -454,11 +454,11 @@ export default {
let query = { let query = {
id: this.rowInfo.id, id: this.rowInfo.id,
} }
this.BetLoading.show(); // this.BetLoading.show();
this.$u.api.cloneOrder(query).then(res => { this.$u.api.cloneOrder(query).then(res => {
this.paymentShow = false this.paymentShow = false
this.BetLoading.hide(); // this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ title: "确认成功", icon: "none" }); uni.showToast({ title: "确认成功", icon: "none" });
this.submitOrderShow = false this.submitOrderShow = false

@ -505,7 +505,7 @@ export default {
} }
this.$u.api.workOrderupdate(updayeQuery).then(res => { this.$u.api.workOrderupdate(updayeQuery).then(res => {
this.BetLoading.hide(); // this.BetLoading.hide();
if (res.code == 200) { if (res.code == 200) {
this.$u.api.serviceman(sendOrderQuery_).then(res => { this.$u.api.serviceman(sendOrderQuery_).then(res => {
if (res.code == 200) { if (res.code == 200) {
@ -517,7 +517,7 @@ export default {
}) })
} }
}).catch(err => { }).catch(err => {
this.BetLoading.hide(); // this.BetLoading.hide();
}) })

@ -19,9 +19,9 @@ module.exports = {
} }
}, },
computed: { computed: {
BetLoading() { // BetLoading() {
return this.$refs.BetLoading // return this.$refs.BetLoading
}, // },
// 将vuex的state中的所有变量,解构到全局混入的mixin中 // 将vuex的state中的所有变量,解构到全局混入的mixin中
...mapState(StoreKey), ...mapState(StoreKey),
} }

Loading…
Cancel
Save