From f2aa6f75d70cc7df54bfd0cf33af46fe96401856 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期四, 12 十月 2023 15:33:04 +0800
Subject: [PATCH] 放空逻辑修改 提煤单状态显示字段修改
---
pages/customer-page/customer-my/customer-my.vue | 92 +++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 87 insertions(+), 5 deletions(-)
diff --git a/pages/customer-page/customer-my/customer-my.vue b/pages/customer-page/customer-my/customer-my.vue
index 7d3cf26..fb1ec25 100644
--- a/pages/customer-page/customer-my/customer-my.vue
+++ b/pages/customer-page/customer-my/customer-my.vue
@@ -75,6 +75,12 @@
type="primary"
@click="userManage"
v-if="roleType == 1 && userEntity.isHostUser === '0'"></u-button></view>
+ <view class="logout"><u-button text="淇敼瀵嗙爜"
+ type="primary"
+ @click="modifyPwd"></u-button></view>
+ <view class="logout"><u-button text="閲嶇疆瀵嗙爜"
+ type="primary"
+ @click="initPwd"></u-button></view>
<view class="logout"><u-button text="閫�鍑虹櫥褰�"
type="primary"
@click="logout()"></u-button></view>
@@ -103,9 +109,6 @@
border="none"
placeholder="璇疯緭鍏ヨ溅闃熷悕绉�"></u--input>
</u-form-item>
- <!-- <u-form-item label="杞︾墝" borderBottom ref="cars" labelWidth="80">
- <u--textarea maxlength="2000" v-model="addGroupForm.carNums" placeholder="璇疯緭鍏ヨ溅鐗�" height="150"></u--textarea>
- </u-form-item> -->
</u--form>
</view>
<view class="addCarButton"><u-button text="娣诲姞"
@@ -138,7 +141,7 @@
<view class="slot-content"><rich-text :nodes="deleteFleetContent"></rich-text></view>
</u-modal>
</view>
-
+ <!-- 閫�鍑虹櫥褰曞脊鍑烘 -->
<view class="logoutModel">
<u-modal :show="logoutShow"
:title="logoutTitle"
@@ -146,6 +149,30 @@
:content="logoutContent"
@confirm="logoutConfirm"
@cancel="logoutCancel"></u-modal>
+ </view>
+ <!-- 閲嶇疆瀵嗙爜寮瑰嚭妗� -->
+ <view class="initPwdModal">
+ <u-modal :show="initPwdShow"
+ title="閲嶇疆瀵嗙爜"
+ showCancelButton
+ content="鍒濆瀵嗙爜灏嗗彉鏇翠负123456,鏄惁纭閲嶇疆"
+ @confirm="initPwdConfirm"
+ @cancel="initPwdCancel"></u-modal>
+ </view>
+ <!-- 淇敼瀵嗙爜寮瑰嚭妗� -->
+ <view class="modifyPwdModal">
+ <u-modal :show="modifyPwdShow"
+ title="淇敼瀵嗙爜"
+ showCancelButton
+ @confirm="modifyPwdConfirm"
+ @cancel="modifyPwdCancel">
+ <view class="modifyPwd">
+ <u-input v-model="passwordModified"
+ placeholder="璇疯緭鍏ヤ慨鏀瑰悗鐨勫瘑鐮�"
+ border="surround"
+ type="password"></u-input>
+ </view>
+ </u-modal>
</view>
</view>
</template>
@@ -185,7 +212,10 @@
logoutTitle: '鎻愮ず',
logoutContent: '鏄惁纭閫�鍑�',
// 鐢ㄦ埛淇℃伅瀵硅薄
- userEntity: {}
+ userEntity: {},
+ initPwdShow: false,
+ modifyPwdShow: false,
+ passwordModified: ''
};
},
computed: {
@@ -355,11 +385,58 @@
url: `/pages/customer-page/fleet-management/fleet-management?id=${id}`
});
},
+ updateInfo() {
+ this.$reqPost('updateUser', this.userEntity, 'json').then(res => {
+ uni.hideLoading()
+ if (res.code == 0) {
+ uni.showToast({
+ title: '閲嶇疆鎴愬姛',
+ duration: 2000,
+ icon: 'success'
+ })
+ } else {
+ this.$u.toast(res.msg ? res.msg : '淇敼澶辫触');
+ }
+ }).catch(err => {
+ this.$u.toast('淇敼澶辫触');
+ });
+ },
+ initPwd() {
+ this.initPwdShow = true
+ },
+ initPwdConfirm() {
+ this.initPwdShow = false
+ uni.showLoading({
+ title: '鍔犺浇涓�'
+ })
+ this.userEntity.password = '123456'
+ this.updateInfo()
+ },
+ initPwdCancel() {
+ this.initPwdShow = false
+ },
+ modifyPwd() {
+ this.modifyPwdShow = true
+ this.passwordModified = ''
+ },
+ modifyPwdConfirm() {
+ if (this.passwordModified.length === 0) {
+ return this.$u.toast('瀵嗙爜涓嶈兘涓虹┖')
+ }
+ this.modifyPwdShow = false
+ this.userEntity.password = this.passwordModified
+ this.updateInfo()
+ },
+ modifyPwdCancel() {
+ this.modifyPwdShow = false
+ },
logout() {
this.logoutShow = true;
},
logoutConfirm() {
redirectLogin();
+ this.$store.commit('changeisLogin', false)
+ this.$store.dispatch('websocketOnClose')
},
logoutCancel() {
this.logoutShow = false;
@@ -513,5 +590,10 @@
}
}
}
+
+ .modifyPwd {
+ width: 100%;
+ border: 1rpx solid rgb(220, 223, 230);
+ }
}
</style>
\ No newline at end of file
--
Gitblit v1.9.1