Commit 5b5a4862b0b8ad73f75f85c4ac6798d847f79409
1 parent
0b29c178
按钮放大
Showing
17 changed files
with
333 additions
and
219 deletions
App.vue
| @@ -129,5 +129,41 @@ page { | @@ -129,5 +129,41 @@ page { | ||
| 129 | color: #606266 | 129 | color: #606266 |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | +// 通用按钮样式(支持任意top值,无需批量生成类名) | ||
| 133 | +.common-custom-btn { | ||
| 134 | + position: absolute; | ||
| 135 | + // 核心:用CSS变量接收动态top值,默认100px | ||
| 136 | + top: var(--btn-top, 100px); | ||
| 137 | + right: 15px; | ||
| 138 | + //transform: translateX(-50%); | ||
| 139 | + background-color: #3c9cff; | ||
| 140 | + color: #ffffff; | ||
| 141 | + border: none; | ||
| 142 | + border-radius: 4px; | ||
| 143 | + padding: 4px 10px; | ||
| 144 | + font-size: 14px; | ||
| 145 | + text-align: center; | ||
| 146 | + cursor: pointer; | ||
| 147 | + transition: all 0.2s ease; | ||
| 148 | + white-space: nowrap; | ||
| 149 | + z-index: 99; | ||
| 150 | + | ||
| 151 | + // 点击态 | ||
| 152 | + &:active { | ||
| 153 | + background-color: #2b88ee; | ||
| 154 | + opacity: 0.9; | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + // 禁用态 | ||
| 158 | + &.disabled { | ||
| 159 | + background-color: #a0c8f5; | ||
| 160 | + cursor: not-allowed; | ||
| 161 | + opacity: 0.7; | ||
| 162 | + } | ||
| 163 | +} | ||
| 164 | + | ||
| 165 | + | ||
| 166 | + | ||
| 167 | + | ||
| 132 | 168 | ||
| 133 | </style> | 169 | </style> |
| 134 | \ No newline at end of file | 170 | \ No newline at end of file |
pages-sub/daily/maintain-manage/finish-plan-detail.vue
| @@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
| 69 | <!-- 7. 处理结果 --> | 69 | <!-- 7. 处理结果 --> |
| 70 | <up-cell align="middle"> | 70 | <up-cell align="middle"> |
| 71 | <template #title> | 71 | <template #title> |
| 72 | - <view style="min-width: 200rpx">巡查描述</view> | 72 | + <view style="min-width: 200rpx">养护描述</view> |
| 73 | </template> | 73 | </template> |
| 74 | <template #value> | 74 | <template #value> |
| 75 | <view class="up-line-1 common-text-color">{{i.remark || '--'}}</view> | 75 | <view class="up-line-1 common-text-color">{{i.remark || '--'}}</view> |
| @@ -78,7 +78,7 @@ | @@ -78,7 +78,7 @@ | ||
| 78 | 78 | ||
| 79 | <up-cell | 79 | <up-cell |
| 80 | title="提交时间" | 80 | title="提交时间" |
| 81 | - :value="timeFormat(i.finishTime,'yyyy-mm-dd hh:MM:ss') || '--'" | 81 | + :value="i.finishTime==null?'--':timeFormat(i.finishTime,'yyyy-mm-dd hh:MM:ss')" |
| 82 | align="middle" | 82 | align="middle" |
| 83 | ></up-cell> | 83 | ></up-cell> |
| 84 | 84 |
pages-sub/daily/maintain-manage/index.vue
| @@ -70,6 +70,20 @@ | @@ -70,6 +70,20 @@ | ||
| 70 | > | 70 | > |
| 71 | <template #body> | 71 | <template #body> |
| 72 | <view class="card-body"> | 72 | <view class="card-body"> |
| 73 | +<!-- <view class="">--> | ||
| 74 | +<!-- <up-button--> | ||
| 75 | +<!-- type="primary"--> | ||
| 76 | +<!-- size="mini"--> | ||
| 77 | +<!-- @click="goToDetail(item)"--> | ||
| 78 | +<!-- class="submit-record-btn"--> | ||
| 79 | +<!-- >--> | ||
| 80 | +<!-- 计划明细--> | ||
| 81 | +<!-- </up-button>--> | ||
| 82 | +<!-- </view>--> | ||
| 83 | + | ||
| 84 | + <view class="common-custom-btn " style="--btn-top: 68px;" @click="goToDetail(item)"> | ||
| 85 | + 计划明细 | ||
| 86 | + </view> | ||
| 73 | <view class="u-body-item u-flex"> | 87 | <view class="u-body-item u-flex"> |
| 74 | <view class="u-body-item-title">道路名称:</view> | 88 | <view class="u-body-item-title">道路名称:</view> |
| 75 | <view class="u-line-1 u-body-value">{{ item.roadName || '-' }}</view> | 89 | <view class="u-line-1 u-body-value">{{ item.roadName || '-' }}</view> |
| @@ -83,16 +97,7 @@ | @@ -83,16 +97,7 @@ | ||
| 83 | 97 | ||
| 84 | <view class="u-body-item u-flex common-item-center common-justify-between"> | 98 | <view class="u-body-item u-flex common-item-center common-justify-between"> |
| 85 | <view class="u-body-item-title">养护级别: {{uni.$dict.getDictLabel('conserve_level', item.levelId) || '-'}}</view> | 99 | <view class="u-body-item-title">养护级别: {{uni.$dict.getDictLabel('conserve_level', item.levelId) || '-'}}</view> |
| 86 | - <view class=""> | ||
| 87 | - <up-button | ||
| 88 | - type="primary" | ||
| 89 | - size="mini" | ||
| 90 | - @click="goToDetail(item)" | ||
| 91 | - class="submit-record-btn" | ||
| 92 | - > | ||
| 93 | - 计划明细 | ||
| 94 | - </up-button> | ||
| 95 | - </view> | 100 | + |
| 96 | </view> | 101 | </view> |
| 97 | 102 | ||
| 98 | <!-- <view class="u-body-item u-flex">--> | 103 | <!-- <view class="u-body-item u-flex">--> |
| @@ -125,6 +130,9 @@ | @@ -125,6 +130,9 @@ | ||
| 125 | 130 | ||
| 126 | <template #body> | 131 | <template #body> |
| 127 | <view class="card-body"> | 132 | <view class="card-body"> |
| 133 | + <view class="common-custom-btn " v-if="item.finishState!==3" style="--btn-top: 100px;" @click="submitRecord(item)"> | ||
| 134 | + 提交记录 | ||
| 135 | + </view> | ||
| 128 | <view class="u-body-item u-flex"> | 136 | <view class="u-body-item u-flex"> |
| 129 | <view class="u-body-item-title">计划编码:</view> | 137 | <view class="u-body-item-title">计划编码:</view> |
| 130 | <view class="u-line-1 u-body-value">{{ item.planNo || '-' }}</view> | 138 | <view class="u-line-1 u-body-value">{{ item.planNo || '-' }}</view> |
| @@ -138,16 +146,16 @@ | @@ -138,16 +146,16 @@ | ||
| 138 | 146 | ||
| 139 | <view class="u-body-item u-flex common-item-center common-justify-between"> | 147 | <view class="u-body-item u-flex common-item-center common-justify-between"> |
| 140 | <view class="u-body-item-title">计划完成次数: {{ item.planNum || 0 }}</view> | 148 | <view class="u-body-item-title">计划完成次数: {{ item.planNum || 0 }}</view> |
| 141 | - <view class="" v-if="item.finishState!==3"> | ||
| 142 | - <up-button | ||
| 143 | - type="primary" | ||
| 144 | - size="mini" | ||
| 145 | - @click="submitRecord(item)" | ||
| 146 | - class="submit-record-btn" | ||
| 147 | - > | ||
| 148 | - 提交记录 | ||
| 149 | - </up-button> | ||
| 150 | - </view> | 149 | +<!-- <view class="" v-if="item.finishState!==3">--> |
| 150 | +<!-- <up-button--> | ||
| 151 | +<!-- type="primary"--> | ||
| 152 | +<!-- size="mini"--> | ||
| 153 | +<!-- @click="submitRecord(item)"--> | ||
| 154 | +<!-- class="submit-record-btn"--> | ||
| 155 | +<!-- >--> | ||
| 156 | +<!-- 提交记录--> | ||
| 157 | +<!-- </up-button>--> | ||
| 158 | +<!-- </view>--> | ||
| 151 | </view> | 159 | </view> |
| 152 | 160 | ||
| 153 | <view class="u-body-item u-flex"> | 161 | <view class="u-body-item u-flex"> |
pages-sub/daily/maintain-manage/pending-plan-detail.vue
| @@ -18,6 +18,20 @@ | @@ -18,6 +18,20 @@ | ||
| 18 | <!-- 卡片主体内容(原详情项) --> | 18 | <!-- 卡片主体内容(原详情项) --> |
| 19 | <template #body> | 19 | <template #body> |
| 20 | <view class="card-body"> | 20 | <view class="card-body"> |
| 21 | +<!-- <view class="">--> | ||
| 22 | +<!-- <up-button--> | ||
| 23 | +<!-- type="primary"--> | ||
| 24 | +<!-- size="mini"--> | ||
| 25 | +<!-- @click="gotoFinishPlanDetail(i)"--> | ||
| 26 | +<!-- class="submit-record-btn"--> | ||
| 27 | + | ||
| 28 | +<!-- >--> | ||
| 29 | +<!-- 查看记录--> | ||
| 30 | +<!-- </up-button>--> | ||
| 31 | +<!-- </view>--> | ||
| 32 | + <view class="common-custom-btn " style="--btn-top: 100px;" @click="gotoFinishPlanDetail(i)"> | ||
| 33 | + 查看记录 | ||
| 34 | + </view> | ||
| 21 | <!-- 计划编码 --> | 35 | <!-- 计划编码 --> |
| 22 | <view class="u-body-item u-flex"> | 36 | <view class="u-body-item u-flex"> |
| 23 | <view class="u-body-item-title">计划编码:</view> | 37 | <view class="u-body-item-title">计划编码:</view> |
| @@ -41,17 +55,7 @@ | @@ -41,17 +55,7 @@ | ||
| 41 | <!-- 已完成次数 + 查看记录按钮 --> | 55 | <!-- 已完成次数 + 查看记录按钮 --> |
| 42 | <view class="u-body-item u-flex common-item-center common-justify-between"> | 56 | <view class="u-body-item u-flex common-item-center common-justify-between"> |
| 43 | <view class="u-body-item-title">已完成次数: {{ i.planFinishNum || 0 }} 次</view> | 57 | <view class="u-body-item-title">已完成次数: {{ i.planFinishNum || 0 }} 次</view> |
| 44 | - <view class=""> | ||
| 45 | - <up-button | ||
| 46 | - type="primary" | ||
| 47 | - size="mini" | ||
| 48 | - @click="gotoFinishPlanDetail(i)" | ||
| 49 | - class="submit-record-btn" | ||
| 50 | - | ||
| 51 | - > | ||
| 52 | - 查看记录 | ||
| 53 | - </up-button> | ||
| 54 | - </view> | 58 | + |
| 55 | </view> | 59 | </view> |
| 56 | 60 | ||
| 57 | <!-- 计划有效期 --> | 61 | <!-- 计划有效期 --> |
pages-sub/daily/maintain-manage/record-detail-list.vue
pages-sub/daily/maintain-manage/road-detail-list.vue
| @@ -63,6 +63,27 @@ | @@ -63,6 +63,27 @@ | ||
| 63 | 63 | ||
| 64 | <template #body> | 64 | <template #body> |
| 65 | <view class="card-body"> | 65 | <view class="card-body"> |
| 66 | + | ||
| 67 | +<!-- <view class="">--> | ||
| 68 | +<!-- <up-button--> | ||
| 69 | +<!-- type="primary"--> | ||
| 70 | +<!-- size="mini"--> | ||
| 71 | +<!-- @click="submitRecord(item)"--> | ||
| 72 | +<!-- class="submit-record-btn"--> | ||
| 73 | +<!-- :disabled="item.finishState == 3"--> | ||
| 74 | +<!-- >--> | ||
| 75 | +<!-- {{ item.finishState ==3 ? '补交记录' : '提交记录' }}--> | ||
| 76 | +<!-- </up-button>--> | ||
| 77 | +<!-- </view>--> | ||
| 78 | + | ||
| 79 | + <view class="common-custom-btn " v-if="item.finishState ==3" style="--btn-top: 100px;" > | ||
| 80 | + 补交记录 | ||
| 81 | + </view> | ||
| 82 | + <view class="common-custom-btn " v-else style="--btn-top: 100px;" @click="submitRecord(item)"> | ||
| 83 | + 提交记录 | ||
| 84 | + </view> | ||
| 85 | + | ||
| 86 | + | ||
| 66 | <view class="u-body-item u-flex"> | 87 | <view class="u-body-item u-flex"> |
| 67 | <view class="u-body-item-title">计划编码:</view> | 88 | <view class="u-body-item-title">计划编码:</view> |
| 68 | <view class="u-line-1 u-body-value">{{ item.planNo || '-' }}</view> | 89 | <view class="u-line-1 u-body-value">{{ item.planNo || '-' }}</view> |
| @@ -76,42 +97,17 @@ | @@ -76,42 +97,17 @@ | ||
| 76 | 97 | ||
| 77 | <view class="u-body-item u-flex common-item-center common-justify-between"> | 98 | <view class="u-body-item u-flex common-item-center common-justify-between"> |
| 78 | <view class="u-body-item-title">计划完成次数: {{ item.planNum || 0 }}</view> | 99 | <view class="u-body-item-title">计划完成次数: {{ item.planNum || 0 }}</view> |
| 79 | - <view class=""> | ||
| 80 | - <up-button | ||
| 81 | - type="primary" | ||
| 82 | - size="mini" | ||
| 83 | - @click="submitRecord(item)" | ||
| 84 | - class="submit-record-btn" | ||
| 85 | - | ||
| 86 | - :disabled="item.finishState == 3" | ||
| 87 | - | ||
| 88 | - > | ||
| 89 | - | ||
| 90 | - {{ item.finishState ==3 ? '补交记录' : '提交记录' }} | ||
| 91 | - </up-button> | ||
| 92 | - | ||
| 93 | -<!-- :class="{ 'disabled-btn': item.finishState ==3 }"--> | 100 | +<!-- <view class="">--> |
| 94 | <!-- <up-button--> | 101 | <!-- <up-button--> |
| 95 | -<!-- v-if="item.finishState ==3"--> | ||
| 96 | <!-- type="primary"--> | 102 | <!-- type="primary"--> |
| 97 | <!-- size="mini"--> | 103 | <!-- size="mini"--> |
| 98 | -<!-- @click=""--> | 104 | +<!-- @click="submitRecord(item)"--> |
| 99 | <!-- class="submit-record-btn"--> | 105 | <!-- class="submit-record-btn"--> |
| 100 | -<!-- :disabled="true"--> | 106 | +<!-- :disabled="item.finishState == 3"--> |
| 101 | <!-- >--> | 107 | <!-- >--> |
| 102 | -<!-- 补交记录--> | 108 | +<!-- {{ item.finishState ==3 ? '补交记录' : '提交记录' }}--> |
| 103 | <!-- </up-button>--> | 109 | <!-- </up-button>--> |
| 104 | - | ||
| 105 | -<!-- <up-button--> | ||
| 106 | -<!-- v-if="item.finishState !== '3' && item.planFinishNum>0"--> | ||
| 107 | -<!-- type="primary"--> | ||
| 108 | -<!-- size="mini"--> | ||
| 109 | -<!-- @click="gotoFinishPlanDetail(item)"--> | ||
| 110 | -<!-- class="submit-record-btn"--> | ||
| 111 | -<!-- >--> | ||
| 112 | -<!-- 提交记录--> | ||
| 113 | -<!-- </up-button>--> | ||
| 114 | - </view> | 110 | +<!-- </view>--> |
| 115 | </view> | 111 | </view> |
| 116 | 112 | ||
| 117 | <view class="u-body-item u-flex"> | 113 | <view class="u-body-item u-flex"> |
pages-sub/daily/patrol-manage/finish-plan-detail.vue
| @@ -79,7 +79,7 @@ | @@ -79,7 +79,7 @@ | ||
| 79 | 79 | ||
| 80 | <up-cell | 80 | <up-cell |
| 81 | title="提交时间" | 81 | title="提交时间" |
| 82 | - :value="timeFormat(i.finishTime,'yyyy-mm-dd hh:MM:ss') || '--'" | 82 | + :value="i.finishTime==null?'--':timeFormat(i.finishTime,'yyyy-mm-dd hh:MM:ss') " |
| 83 | align="middle" | 83 | align="middle" |
| 84 | 84 | ||
| 85 | ></up-cell> | 85 | ></up-cell> |
pages-sub/daily/patrol-manage/index.vue
| @@ -56,6 +56,9 @@ | @@ -56,6 +56,9 @@ | ||
| 56 | > | 56 | > |
| 57 | <template #body> | 57 | <template #body> |
| 58 | <view class="card-body"> | 58 | <view class="card-body"> |
| 59 | + <view class="common-custom-btn " style="--btn-top: 80px;" @click="gotoDetail(item)"> | ||
| 60 | + 计划明细 | ||
| 61 | + </view> | ||
| 59 | <view class="u-body-item u-flex"> | 62 | <view class="u-body-item u-flex"> |
| 60 | <view class="u-body-item-title">道路名称:</view> | 63 | <view class="u-body-item-title">道路名称:</view> |
| 61 | <view class="u-line-1 u-body-value">{{ item.roadName || '-' }}</view> | 64 | <view class="u-line-1 u-body-value">{{ item.roadName || '-' }}</view> |
| @@ -71,16 +74,7 @@ | @@ -71,16 +74,7 @@ | ||
| 71 | 74 | ||
| 72 | <view class="u-body-item u-flex common-item-center common-justify-between"> | 75 | <view class="u-body-item u-flex common-item-center common-justify-between"> |
| 73 | <view class="u-body-item-title">养护级别: {{uni.$dict.getDictLabel('conserve_level', item.levelId) || '-'}}</view> | 76 | <view class="u-body-item-title">养护级别: {{uni.$dict.getDictLabel('conserve_level', item.levelId) || '-'}}</view> |
| 74 | - <view class=""> | ||
| 75 | - <up-button | ||
| 76 | - type="primary" | ||
| 77 | - size="mini" | ||
| 78 | - @click="gotoDetail(item)" | ||
| 79 | - class="submit-record-btn" | ||
| 80 | - > | ||
| 81 | - 计划明细 | ||
| 82 | - </up-button> | ||
| 83 | - </view> | 77 | + |
| 84 | </view> | 78 | </view> |
| 85 | 79 | ||
| 86 | <view class="u-body-item u-flex"> | 80 | <view class="u-body-item u-flex"> |
pages-sub/daily/patrol-manage/pending-plan-detail.vue
| @@ -23,55 +23,84 @@ | @@ -23,55 +23,84 @@ | ||
| 23 | 23 | ||
| 24 | <template #body> | 24 | <template #body> |
| 25 | <view class="card-body"> | 25 | <view class="card-body"> |
| 26 | - <view class="u-body-item u-flex"> | ||
| 27 | - <view class="u-body-item-title">计划编码:</view> | ||
| 28 | - <view class="u-line-1 u-body-value">{{ item.planNo || '-' }}</view> | ||
| 29 | - </view> | ||
| 30 | - <view class="u-body-item u-flex"> | ||
| 31 | - <view class="u-body-item-title">养护周期:</view> | ||
| 32 | - <view class="u-line-1 u-body-value">{{ item.rate || '-' }} | ||
| 33 | - {{ uni.$dict.getDictLabel('cycle_id_type', item.cycleId) }} | 26 | + |
| 27 | + <!-- <up-button--> | ||
| 28 | + <!-- v-if="item.finishState ==3"--> | ||
| 29 | + <!-- type="primary"--> | ||
| 30 | + <!-- size="mini"--> | ||
| 31 | + <!-- @click=""--> | ||
| 32 | + <!-- class="submit-record-btn"--> | ||
| 33 | + <!-- :disabled="true"--> | ||
| 34 | + <!-- >--> | ||
| 35 | + <!-- 补交记录--> | ||
| 36 | + <!-- </up-button>--> | ||
| 37 | + | ||
| 38 | + <!-- <up-button--> | ||
| 39 | + <!-- v-if="item.finishState !== 3 && item.planFinishNum > 0"--> | ||
| 40 | + <!-- type="primary"--> | ||
| 41 | + <!-- size="mini"--> | ||
| 42 | + <!-- @click="gotoFinishPlanDetail(item)"--> | ||
| 43 | + <!-- class="submit-record-btn"--> | ||
| 44 | + <!-- >--> | ||
| 45 | + <!-- 提交记录--> | ||
| 46 | + <!-- </up-button>--> | ||
| 47 | + <!-- </view>--> | ||
| 48 | + <view class="common-custom-btn disable" style="--btn-top: 120px;" v-if="item.finishState ==3"> | ||
| 49 | + 补交记录 | ||
| 50 | + </view> | ||
| 51 | + <view class="common-custom-btn " style="--btn-top: 120px;" | ||
| 52 | + v-if="item.finishState !== 3 && item.planFinishNum > 0" @click="gotoFinishPlanDetail(item)"> | ||
| 53 | + 提交记录 | ||
| 54 | + </view> | ||
| 55 | + <view class="u-body-item u-flex"> | ||
| 56 | + <view class="u-body-item-title">计划编码:</view> | ||
| 57 | + <view class="u-line-1 u-body-value">{{ item.planNo || '-' }}</view> | ||
| 58 | + </view> | ||
| 59 | + <view class="u-body-item u-flex"> | ||
| 60 | + <view class="u-body-item-title">养护周期:</view> | ||
| 61 | + <view class="u-line-1 u-body-value">{{ item.rate || '-' }} | ||
| 62 | + {{ uni.$dict.getDictLabel('cycle_id_type', item.cycleId) }} | ||
| 63 | + </view> | ||
| 34 | </view> | 64 | </view> |
| 35 | - </view> | ||
| 36 | 65 | ||
| 37 | - <view class="u-body-item u-flex common-item-center common-justify-between"> | ||
| 38 | - <view class="u-body-item-title">计划完成次数: {{ item.planNum || 0 }}</view> | ||
| 39 | - <view class=""> | ||
| 40 | - <up-button | ||
| 41 | - v-if="item.finishState ==3" | ||
| 42 | - type="primary" | ||
| 43 | - size="mini" | ||
| 44 | - @click="" | ||
| 45 | - class="submit-record-btn" | ||
| 46 | - :disabled="true" | ||
| 47 | - > | ||
| 48 | - 补交记录 | ||
| 49 | - </up-button> | 66 | + <view class="u-body-item u-flex common-item-center common-justify-between"> |
| 67 | + <view class="u-body-item-title">计划完成次数: {{ item.planNum || 0 }}</view> | ||
| 68 | + <!-- <view class="">--> | ||
| 69 | + <!-- <up-button--> | ||
| 70 | + <!-- v-if="item.finishState ==3"--> | ||
| 71 | + <!-- type="primary"--> | ||
| 72 | + <!-- size="mini"--> | ||
| 73 | + <!-- @click=""--> | ||
| 74 | + <!-- class="submit-record-btn"--> | ||
| 75 | + <!-- :disabled="true"--> | ||
| 76 | + <!-- >--> | ||
| 77 | + <!-- 补交记录--> | ||
| 78 | + <!-- </up-button>--> | ||
| 50 | 79 | ||
| 51 | - <up-button | ||
| 52 | - v-if="item.finishState !== 3 && item.planFinishNum > 0" | ||
| 53 | - type="primary" | ||
| 54 | - size="mini" | ||
| 55 | - @click="gotoFinishPlanDetail(item)" | ||
| 56 | - class="submit-record-btn" | ||
| 57 | - > | ||
| 58 | - 提交记录 | ||
| 59 | - </up-button> | 80 | + <!-- <up-button--> |
| 81 | + <!-- v-if="item.finishState !== 3 && item.planFinishNum > 0"--> | ||
| 82 | + <!-- type="primary"--> | ||
| 83 | + <!-- size="mini"--> | ||
| 84 | + <!-- @click="gotoFinishPlanDetail(item)"--> | ||
| 85 | + <!-- class="submit-record-btn"--> | ||
| 86 | + <!-- >--> | ||
| 87 | + <!-- 提交记录--> | ||
| 88 | + <!-- </up-button>--> | ||
| 89 | + <!-- </view>--> | ||
| 60 | </view> | 90 | </view> |
| 61 | - </view> | ||
| 62 | 91 | ||
| 63 | - <view class="u-body-item u-flex"> | ||
| 64 | - <view class="u-body-item-title">已完成次数:</view> | ||
| 65 | - <view class="u-line-1 u-body-value">{{ item.planFinishNum || 0 }}</view> | ||
| 66 | - </view> | 92 | + <view class="u-body-item u-flex"> |
| 93 | + <view class="u-body-item-title">已完成次数:</view> | ||
| 94 | + <view class="u-line-1 u-body-value">{{ item.planFinishNum || 0 }}</view> | ||
| 95 | + </view> | ||
| 67 | 96 | ||
| 68 | - <view class="u-body-item u-flex"> | ||
| 69 | - <view class="u-body-item-title">计划有效期:</view> | ||
| 70 | - <view class="u-line-1 u-body-value">{{ timeFormat(item.beginTime, 'yyyy-mm-dd') || '-' }} 至 | ||
| 71 | - {{ timeFormat(item.endTime, 'yyyy-mm-dd') || '-' }} | 97 | + <view class="u-body-item u-flex"> |
| 98 | + <view class="u-body-item-title">计划有效期:</view> | ||
| 99 | + <view class="u-line-1 u-body-value">{{ timeFormat(item.beginTime, 'yyyy-mm-dd') || '-' }} 至 | ||
| 100 | + {{ timeFormat(item.endTime, 'yyyy-mm-dd') || '-' }} | ||
| 101 | + </view> | ||
| 72 | </view> | 102 | </view> |
| 73 | </view> | 103 | </view> |
| 74 | - </view> | ||
| 75 | </template> | 104 | </template> |
| 76 | </up-card> | 105 | </up-card> |
| 77 | </view> | 106 | </view> |
pages-sub/daily/quick-order/index.vue
| @@ -54,6 +54,17 @@ | @@ -54,6 +54,17 @@ | ||
| 54 | 54 | ||
| 55 | <template #body> | 55 | <template #body> |
| 56 | <view class="card-body"> | 56 | <view class="card-body"> |
| 57 | + <view class="common-custom-btn " style="--btn-top: 64px;" @click="handleDetail(item)"> | ||
| 58 | + 工单详情 | ||
| 59 | + <!-- <up-button--> | ||
| 60 | + <!-- type="primary"--> | ||
| 61 | + | ||
| 62 | + <!-- @click="gotoDetail(item)"--> | ||
| 63 | + <!-- class="submit-record-btn"--> | ||
| 64 | + <!-- >--> | ||
| 65 | + <!-- 计划明细--> | ||
| 66 | + <!-- </up-button>--> | ||
| 67 | + </view> | ||
| 57 | <view class="u-body-item u-flex"> | 68 | <view class="u-body-item u-flex"> |
| 58 | <view class="u-body-item-title">工单编号:</view> | 69 | <view class="u-body-item-title">工单编号:</view> |
| 59 | <view class="u-line-1 u-body-value">{{ item.orderNo || '-' }}</view> | 70 | <view class="u-line-1 u-body-value">{{ item.orderNo || '-' }}</view> |
| @@ -75,16 +86,16 @@ | @@ -75,16 +86,16 @@ | ||
| 75 | 86 | ||
| 76 | <view class="u-body-item u-flex common-item-center common-justify-between"> | 87 | <view class="u-body-item u-flex common-item-center common-justify-between"> |
| 77 | <view class="u-body-item-title u-body-value">提交时间:{{ timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view> | 88 | <view class="u-body-item-title u-body-value">提交时间:{{ timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view> |
| 78 | - <view class=""> | ||
| 79 | - <up-button | ||
| 80 | - type="primary" | ||
| 81 | - size="mini" | ||
| 82 | - @click="handleDetail(item)" | ||
| 83 | - | ||
| 84 | - > | ||
| 85 | - 工单详情 | ||
| 86 | - </up-button> | ||
| 87 | - </view> | 89 | +<!-- <view class="">--> |
| 90 | +<!-- <up-button--> | ||
| 91 | +<!-- type="primary"--> | ||
| 92 | +<!-- size="mini"--> | ||
| 93 | +<!-- @click="handleDetail(item)"--> | ||
| 94 | + | ||
| 95 | +<!-- >--> | ||
| 96 | +<!-- 工单详情--> | ||
| 97 | +<!-- </up-button>--> | ||
| 98 | +<!-- </view>--> | ||
| 88 | 99 | ||
| 89 | </view> | 100 | </view> |
| 90 | </view> | 101 | </view> |
pages-sub/problem/regional-order-manage/index.vue
| @@ -62,6 +62,14 @@ | @@ -62,6 +62,14 @@ | ||
| 62 | > | 62 | > |
| 63 | <template #body> | 63 | <template #body> |
| 64 | <view class="card-body"> | 64 | <view class="card-body"> |
| 65 | +<!-- <view v-if="activeTab !== 0" class="ml-10">--> | ||
| 66 | +<!-- <up-button type="primary" size="mini" @click="handleDetail(item)">工单详情</up-button>--> | ||
| 67 | +<!-- </view>--> | ||
| 68 | + | ||
| 69 | + <view class="common-custom-btn " v-if="activeTab !== 0" style="--btn-top: 130px;" @click="handleDetail(item)"> | ||
| 70 | + 工单详情 | ||
| 71 | + </view> | ||
| 72 | + | ||
| 65 | <view class="u-body-item u-flex"> | 73 | <view class="u-body-item u-flex"> |
| 66 | <view class="u-body-item-title">工单编号:</view> | 74 | <view class="u-body-item-title">工单编号:</view> |
| 67 | <view class="u-line-1 u-body-value">{{ item.orderNo || '-' }}</view> | 75 | <view class="u-line-1 u-body-value">{{ item.orderNo || '-' }}</view> |
| @@ -78,16 +86,16 @@ | @@ -78,16 +86,16 @@ | ||
| 78 | <view class="u-body-item-title">情况描述:</view> | 86 | <view class="u-body-item-title">情况描述:</view> |
| 79 | <view class="u-line-1 u-body-value">{{ item.remark || '无' }}</view> | 87 | <view class="u-line-1 u-body-value">{{ item.remark || '无' }}</view> |
| 80 | </view> | 88 | </view> |
| 81 | - <!-- 核心修改:紧急程度行 合并工单详情按钮 【我发起的/已办】放到该行最右侧 --> | 89 | + |
| 82 | <view class="u-body-item u-flex common-justify-between common-item-center"> | 90 | <view class="u-body-item u-flex common-justify-between common-item-center"> |
| 83 | <view class="u-body-item-title">紧急程度:{{ uni.$dict.getDictLabel('workorder_pressing_type', item.pressingType) || '-' }}</view> | 91 | <view class="u-body-item-title">紧急程度:{{ uni.$dict.getDictLabel('workorder_pressing_type', item.pressingType) || '-' }}</view> |
| 84 | <!-- <view class="u-line-1 u-body-value flex-1 text-right">--> | 92 | <!-- <view class="u-line-1 u-body-value flex-1 text-right">--> |
| 85 | <!-- {{ uni.$dict.getDictLabel('workorder_pressing_type', item.pressingType) || '-' }}--> | 93 | <!-- {{ uni.$dict.getDictLabel('workorder_pressing_type', item.pressingType) || '-' }}--> |
| 86 | <!-- </view>--> | 94 | <!-- </view>--> |
| 87 | <!-- 只有 我发起的(1)、已办(2) 显示该行的详情按钮 --> | 95 | <!-- 只有 我发起的(1)、已办(2) 显示该行的详情按钮 --> |
| 88 | - <view v-if="activeTab !== 0" class="ml-10"> | ||
| 89 | - <up-button type="primary" size="mini" @click="handleDetail(item)">工单详情</up-button> | ||
| 90 | - </view> | 96 | +<!-- <view v-if="activeTab !== 0" class="ml-10">--> |
| 97 | +<!-- <up-button type="primary" size="mini" @click="handleDetail(item)">工单详情</up-button>--> | ||
| 98 | +<!-- </view>--> | ||
| 91 | </view> | 99 | </view> |
| 92 | <view class="u-body-item u-flex"> | 100 | <view class="u-body-item u-flex"> |
| 93 | <view class="u-body-item-title">工单状态:</view> | 101 | <view class="u-body-item-title">工单状态:</view> |
| @@ -99,11 +107,11 @@ | @@ -99,11 +107,11 @@ | ||
| 99 | </view> | 107 | </view> |
| 100 | 108 | ||
| 101 | <!-- 待办工单(0) 保留原来的操作按钮区 不变 --> | 109 | <!-- 待办工单(0) 保留原来的操作按钮区 不变 --> |
| 102 | - <view v-if="activeTab === 0" class="u-body-item u-flex common-justify-between common-item-center mt-20"> | ||
| 103 | - <up-button type="warning" size="mini" @click="handleReject(item)" v-show="nextStepMap[item.taskKey].backShow">回退</up-button> | ||
| 104 | - <up-button type="success" size="mini" @click="handleRenew(item)" v-show="nextStepMap[item.taskKey].renewShow">重新提交</up-button> | ||
| 105 | - <up-button type="primary" size="mini" @click="handleProcess(item)">{{ nextStepMap[item.taskKey].btnText }}</up-button> | ||
| 106 | - <up-button type="info" size="mini" @click="handleDetail(item)">详情</up-button> | 110 | + <view v-if="activeTab === 0" class="u-body-item u-body-item-btn-wrap u-flex common-justify-between common-item-center mt-20"> |
| 111 | + <up-button type="warning" size="large" @click="handleReject(item)" v-show="nextStepMap[item.taskKey].backShow">回退</up-button> | ||
| 112 | + <up-button type="success" size="large" @click="handleRenew(item)" v-show="nextStepMap[item.taskKey].renewShow">重新提交</up-button> | ||
| 113 | + <up-button type="primary" size="large" @click="handleProcess(item)">{{ nextStepMap[item.taskKey].btnText }}</up-button> | ||
| 114 | + <up-button type="info" size="large" @click="handleDetail(item)">详情</up-button> | ||
| 107 | </view> | 115 | </view> |
| 108 | 116 | ||
| 109 | <!-- 已删除:原来单独的【我发起的/已办】按钮区,不需要了 --> | 117 | <!-- 已删除:原来单独的【我发起的/已办】按钮区,不需要了 --> |
| @@ -222,8 +230,8 @@ const USER_ROLES = userStore.userInfo?.roles || []; | @@ -222,8 +230,8 @@ const USER_ROLES = userStore.userInfo?.roles || []; | ||
| 222 | 230 | ||
| 223 | // ========== 基础状态 (按模块分组,语义化更强) ========== | 231 | // ========== 基础状态 (按模块分组,语义化更强) ========== |
| 224 | // tab切换 | 232 | // tab切换 |
| 225 | -const activeTab = ref(0); // 0-待办 1-我发起的 2-已办 | ||
| 226 | -const tabList = [{name: '待办'}, {name: '我发起的任务'}, {name: '已办'}]; | 233 | +const activeTab = ref(0); // 0-待办 1-已办 2-我发起的任务 |
| 234 | +const tabList = [{name: '待办'}, {name: '已办'}, {name: '我发起的任务'}]; | ||
| 227 | // 排序与搜索 | 235 | // 排序与搜索 |
| 228 | const selectedSortValue = ref(1); | 236 | const selectedSortValue = ref(1); |
| 229 | const sortOptions = ref([ | 237 | const sortOptions = ref([ |
| @@ -347,8 +355,9 @@ const queryList = async (pageNo, pageSize) => { | @@ -347,8 +355,9 @@ const queryList = async (pageNo, pageSize) => { | ||
| 347 | try { | 355 | try { |
| 348 | const params = getQueryParams(pageNo, pageSize); | 356 | const params = getQueryParams(pageNo, pageSize); |
| 349 | let res; | 357 | let res; |
| 358 | + // 0-待办 1-已办 2-我发起的任务 | ||
| 350 | if (activeTab.value === 0) res = await todoBuzSimplePage(params); | 359 | if (activeTab.value === 0) res = await todoBuzSimplePage(params); |
| 351 | - else if (activeTab.value === 1) res = await myBuzSimplePage(params); | 360 | + else if (activeTab.value === 2) res = await myBuzSimplePage(params); |
| 352 | else res = await doneBuzSimplePage(params); | 361 | else res = await doneBuzSimplePage(params); |
| 353 | pagingHandle('complete', res?.list || [], res?.total || 0); | 362 | pagingHandle('complete', res?.list || [], res?.total || 0); |
| 354 | } catch (error) { | 363 | } catch (error) { |
| @@ -592,6 +601,11 @@ onLoad(() => { | @@ -592,6 +601,11 @@ onLoad(() => { | ||
| 592 | box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04); | 601 | box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04); |
| 593 | } | 602 | } |
| 594 | 603 | ||
| 604 | +.u-body-item-btn-wrap :deep(.u-button--large){ | ||
| 605 | + height: 28px; | ||
| 606 | +} | ||
| 607 | + | ||
| 608 | + | ||
| 595 | // 新增样式:解决按钮和文字间距、排版问题 | 609 | // 新增样式:解决按钮和文字间距、排版问题 |
| 596 | .flex-1 { flex: 1; } | 610 | .flex-1 { flex: 1; } |
| 597 | .text-right { text-align: right; } | 611 | .text-right { text-align: right; } |
pages-sub/problem/regional-order-manage/order-detail.vue
| @@ -203,7 +203,7 @@ | @@ -203,7 +203,7 @@ | ||
| 203 | 203 | ||
| 204 | <!-- 2. 原描述内容:时间 + 处理说明(最多200字) --> | 204 | <!-- 2. 原描述内容:时间 + 处理说明(最多200字) --> |
| 205 | <view class="step-desc"> | 205 | <view class="step-desc"> |
| 206 | - <view class="operator-name up-line-1"> | 206 | + <view class="operator-name up-line-1" v-if="item.tasks"> |
| 207 | 处理人: | 207 | 处理人: |
| 208 | <text>{{ item.tasks?.map(itemName => itemName.assigneeUser?.nickname).filter(Boolean).join(',') }}</text> | 208 | <text>{{ item.tasks?.map(itemName => itemName.assigneeUser?.nickname).filter(Boolean).join(',') }}</text> |
| 209 | </view> | 209 | </view> |
| @@ -545,7 +545,8 @@ const getLimitReason = (reason: string | null | undefined) => { | @@ -545,7 +545,8 @@ const getLimitReason = (reason: string | null | undefined) => { | ||
| 545 | const getCurrentStepIndex = () => { | 545 | const getCurrentStepIndex = () => { |
| 546 | const {activityNodes} = processData.value; | 546 | const {activityNodes} = processData.value; |
| 547 | if (!activityNodes || !activityNodes.length) return 0; | 547 | if (!activityNodes || !activityNodes.length) return 0; |
| 548 | - return activityNodes.length - 1; | 548 | + // return activityNodes.length - 1; |
| 549 | + return activityNodes.length; | ||
| 549 | } | 550 | } |
| 550 | 551 | ||
| 551 | /** | 552 | /** |
| @@ -557,12 +558,12 @@ const DetailQuery = async (taskIdStr: string) => { | @@ -557,12 +558,12 @@ const DetailQuery = async (taskIdStr: string) => { | ||
| 557 | loading.value = true; | 558 | loading.value = true; |
| 558 | const tabType = Number(activeTab.value); | 559 | const tabType = Number(activeTab.value); |
| 559 | let res: any; | 560 | let res: any; |
| 560 | - | 561 | + // 0-待办 1-已办 2-我发起的任务 |
| 561 | if (tabType === 0) { | 562 | if (tabType === 0) { |
| 562 | res = await getTodoTaskDetail({taskId: taskIdStr}); | 563 | res = await getTodoTaskDetail({taskId: taskIdStr}); |
| 563 | - } else if (tabType === 1) { | ||
| 564 | - res = await getMyTaskDetail({taskId: taskIdStr}); | ||
| 565 | } else if (tabType === 2) { | 564 | } else if (tabType === 2) { |
| 565 | + res = await getMyTaskDetail({taskId: taskIdStr}); | ||
| 566 | + } else if (tabType === 1) { | ||
| 566 | res = await getDoneTaskDetail({taskId: taskIdStr}); | 567 | res = await getDoneTaskDetail({taskId: taskIdStr}); |
| 567 | } else { | 568 | } else { |
| 568 | uni.showToast({title: '无效的工单类型', icon: 'none'}); | 569 | uni.showToast({title: '无效的工单类型', icon: 'none'}); |
pages-sub/problem/work-order-manage/index.vue
| @@ -101,20 +101,20 @@ | @@ -101,20 +101,20 @@ | ||
| 101 | <view class="u-line-1 u-body-value">{{ timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view> | 101 | <view class="u-line-1 u-body-value">{{ timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view> |
| 102 | </view> | 102 | </view> |
| 103 | <!-- 操作按钮行 --> | 103 | <!-- 操作按钮行 --> |
| 104 | - <view class="u-body-item u-flex common-justify-between common-item-center mt-20"> | ||
| 105 | - <up-button type="warning" size="mini" @click="handleReject(item)" | 104 | + <view class="u-body-item u-body-item-btn-wrap u-flex common-justify-between common-item-center mt-20"> |
| 105 | + <up-button type="warning" size="large" @click="handleReject(item)" | ||
| 106 | v-show="nextStepMap[item.taskKey].backShow">回退 | 106 | v-show="nextStepMap[item.taskKey].backShow">回退 |
| 107 | </up-button> | 107 | </up-button> |
| 108 | 108 | ||
| 109 | - <up-button type="success" size="mini" @click="handleRenew(item)" | 109 | + <up-button type="success" size="large" @click="handleRenew(item)" |
| 110 | v-show="nextStepMap[item.taskKey].renewShow">重新提交 | 110 | v-show="nextStepMap[item.taskKey].renewShow">重新提交 |
| 111 | </up-button> | 111 | </up-button> |
| 112 | 112 | ||
| 113 | - <up-button type="primary" size="mini" @click="handleProcess(item)">{{ | 113 | + <up-button type="primary" size="large" @click="handleProcess(item)">{{ |
| 114 | nextStepMap[item.taskKey].btnText | 114 | nextStepMap[item.taskKey].btnText |
| 115 | }} | 115 | }} |
| 116 | </up-button> | 116 | </up-button> |
| 117 | - <up-button type="info" size="mini" @click="handleDetail(item)">详情</up-button> | 117 | + <up-button type="info" size="large" @click="handleDetail(item)">详情</up-button> |
| 118 | </view> | 118 | </view> |
| 119 | </view> | 119 | </view> |
| 120 | </template> | 120 | </template> |
| @@ -132,6 +132,14 @@ | @@ -132,6 +132,14 @@ | ||
| 132 | > | 132 | > |
| 133 | <template #body> | 133 | <template #body> |
| 134 | <view class="card-body"> | 134 | <view class="card-body"> |
| 135 | + | ||
| 136 | +<!-- <view class=" ">--> | ||
| 137 | +<!-- <up-button type="primary" size="mini" @click="handleDetail(item)">工单详情</up-button>--> | ||
| 138 | +<!-- </view>--> | ||
| 139 | + <view class="common-custom-btn " style="--btn-top: 130px;" @click="handleDetail(item)"> | ||
| 140 | + 工单详情 | ||
| 141 | + </view> | ||
| 142 | + | ||
| 135 | <view class="u-body-item u-flex"> | 143 | <view class="u-body-item u-flex"> |
| 136 | <view class="u-body-item-title">工单编号:</view> | 144 | <view class="u-body-item-title">工单编号:</view> |
| 137 | <view class="u-line-1 u-body-value">{{ item.orderNo || '-' }}</view> | 145 | <view class="u-line-1 u-body-value">{{ item.orderNo || '-' }}</view> |
| @@ -152,9 +160,9 @@ | @@ -152,9 +160,9 @@ | ||
| 152 | <view class="u-body-item u-flex common-justify-between common-item-center"> | 160 | <view class="u-body-item u-flex common-justify-between common-item-center"> |
| 153 | <view class="u-body-item-title">紧急程度:{{ uni.$dict.getDictLabel('workorder_pressing_type', item.pressingType) }} | 161 | <view class="u-body-item-title">紧急程度:{{ uni.$dict.getDictLabel('workorder_pressing_type', item.pressingType) }} |
| 154 | </view> | 162 | </view> |
| 155 | - <view class=" "> | ||
| 156 | - <up-button type="primary" size="mini" @click="handleDetail(item)">工单详情</up-button> | ||
| 157 | - </view> | 163 | +<!-- <view class=" ">--> |
| 164 | +<!-- <up-button type="primary" size="mini" @click="handleDetail(item)">工单详情</up-button>--> | ||
| 165 | +<!-- </view>--> | ||
| 158 | </view> | 166 | </view> |
| 159 | <view class="u-body-item u-flex"> | 167 | <view class="u-body-item u-flex"> |
| 160 | <view class="u-body-item-title">工单状态:</view> | 168 | <view class="u-body-item-title">工单状态:</view> |
| @@ -286,11 +294,11 @@ import { useUploadImgs } from '@/common/utils/useUploadImgs' | @@ -286,11 +294,11 @@ import { useUploadImgs } from '@/common/utils/useUploadImgs' | ||
| 286 | // ========== 状态管理 ========== | 294 | // ========== 状态管理 ========== |
| 287 | const userStore = useUserStore(); | 295 | const userStore = useUserStore(); |
| 288 | // 标签页切换 | 296 | // 标签页切换 |
| 289 | -const activeTab = ref(0); // 0-待办 1-我发起的 2-已办 | 297 | +const activeTab = ref(0); //0-待办 1-已办 2-我发起的任务 |
| 290 | const tabList = ref([ | 298 | const tabList = ref([ |
| 291 | {name: '待办'}, | 299 | {name: '待办'}, |
| 292 | - {name: '我发起的任务'}, | ||
| 293 | - {name: '已办'} | 300 | + {name: '已办'}, |
| 301 | + {name: '我发起的任务'} | ||
| 294 | ]); | 302 | ]); |
| 295 | // 排序下拉框 | 303 | // 排序下拉框 |
| 296 | const selectedSortValue = ref(1); | 304 | const selectedSortValue = ref(1); |
| @@ -353,10 +361,11 @@ const queryList = async (pageNo, pageSize) => { | @@ -353,10 +361,11 @@ const queryList = async (pageNo, pageSize) => { | ||
| 353 | type: selectedSortValue.value // 1-位置 2-工单名称 3-情况描述 4-工单编号 | 361 | type: selectedSortValue.value // 1-位置 2-工单名称 3-情况描述 4-工单编号 |
| 354 | }; | 362 | }; |
| 355 | let res; | 363 | let res; |
| 364 | + // 0-待办 1-已办 2-我发起的任务 | ||
| 356 | if (activeTab.value == 0) { | 365 | if (activeTab.value == 0) { |
| 357 | // 待办工单 | 366 | // 待办工单 |
| 358 | res = await todoBuzSimplePage(apiParams); | 367 | res = await todoBuzSimplePage(apiParams); |
| 359 | - } else if (activeTab.value == 1) { | 368 | + } else if (activeTab.value == 2) { |
| 360 | // 我发起的任务 | 369 | // 我发起的任务 |
| 361 | res = await myBuzSimplePage(apiParams); | 370 | res = await myBuzSimplePage(apiParams); |
| 362 | } else { | 371 | } else { |
| @@ -403,7 +412,7 @@ const handleSearch = (val) => { | @@ -403,7 +412,7 @@ const handleSearch = (val) => { | ||
| 403 | // }; | 412 | // }; |
| 404 | // 工单详情 | 413 | // 工单详情 |
| 405 | const handleDetail = (item) => { | 414 | const handleDetail = (item) => { |
| 406 | - // 0-待办 1我发起的- 2-已办 | 415 | + // 0-待办 1-已办 2-我发起的任务 |
| 407 | uni.navigateTo({ | 416 | uni.navigateTo({ |
| 408 | url: `/pages-sub/problem/work-order-manage/order-detail?taskId=${item.taskId}&activeTab=${activeTab.value}&processInstanceId=${item.processInstanceId}`, | 417 | url: `/pages-sub/problem/work-order-manage/order-detail?taskId=${item.taskId}&activeTab=${activeTab.value}&processInstanceId=${item.processInstanceId}`, |
| 409 | events: { | 418 | events: { |
| @@ -609,7 +618,7 @@ const handleAcceptModalCancel = () => { | @@ -609,7 +618,7 @@ const handleAcceptModalCancel = () => { | ||
| 609 | // 验收弹窗 - 确定按钮(含returnImgs传参) | 618 | // 验收弹窗 - 确定按钮(含returnImgs传参) |
| 610 | const handleAcceptModalConfirm = async () => { | 619 | const handleAcceptModalConfirm = async () => { |
| 611 | // 1. 校验验收原因是否为空 | 620 | // 1. 校验验收原因是否为空 |
| 612 | - if (!acceptReason.value.trim()) { | 621 | + if (acceptRadioValue.value == 1 && !acceptReason.value.trim()) { |
| 613 | uni.showToast({title: '请填写验收原因', icon: 'none', duration: 1000}); | 622 | uni.showToast({title: '请填写验收原因', icon: 'none', duration: 1000}); |
| 614 | return; | 623 | return; |
| 615 | } | 624 | } |
| @@ -706,10 +715,11 @@ onLoad(() => { | @@ -706,10 +715,11 @@ onLoad(() => { | ||
| 706 | border-radius: 12rpx; | 715 | border-radius: 12rpx; |
| 707 | box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04); | 716 | box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04); |
| 708 | } | 717 | } |
| 718 | +.u-body-item-btn-wrap :deep(.u-button--large){ | ||
| 719 | + height: 28px; | ||
| 720 | +} | ||
| 709 | 721 | ||
| 710 | -.card-body { | ||
| 711 | 722 | ||
| 712 | -} | ||
| 713 | 723 | ||
| 714 | // 回退modal样式 | 724 | // 回退modal样式 |
| 715 | .reject-modal-content { | 725 | .reject-modal-content { |
pages-sub/problem/work-order-manage/order-detail.vue
| @@ -202,7 +202,7 @@ | @@ -202,7 +202,7 @@ | ||
| 202 | 202 | ||
| 203 | <!-- 2. 原描述内容:时间 + 处理说明(最多200字) --> | 203 | <!-- 2. 原描述内容:时间 + 处理说明(最多200字) --> |
| 204 | <view class="step-desc"> | 204 | <view class="step-desc"> |
| 205 | - <view class="operator-name up-line-1"> | 205 | + <view class="operator-name up-line-1" v-if="item.tasks"> |
| 206 | 处理人: | 206 | 处理人: |
| 207 | <text>{{ item.tasks?.map(itemName => itemName.assigneeUser?.nickname).filter(Boolean).join(',') }}</text> | 207 | <text>{{ item.tasks?.map(itemName => itemName.assigneeUser?.nickname).filter(Boolean).join(',') }}</text> |
| 208 | </view> | 208 | </view> |
| @@ -492,7 +492,8 @@ const getCurrentStepIndex = () => { | @@ -492,7 +492,8 @@ const getCurrentStepIndex = () => { | ||
| 492 | if (!activityNodes || !activityNodes.length) return 0; | 492 | if (!activityNodes || !activityNodes.length) return 0; |
| 493 | 493 | ||
| 494 | // 2. 若没有处理中的节点(全部已完成),则激活最后一个节点 | 494 | // 2. 若没有处理中的节点(全部已完成),则激活最后一个节点 |
| 495 | - return activityNodes.length - 1; | 495 | + // return activityNodes.length - 1; |
| 496 | + return activityNodes.length; | ||
| 496 | } | 497 | } |
| 497 | 498 | ||
| 498 | /** | 499 | /** |
| @@ -505,12 +506,12 @@ const DetailQuery = async (taskIdStr: string) => { | @@ -505,12 +506,12 @@ const DetailQuery = async (taskIdStr: string) => { | ||
| 505 | // 转换activeTab为数字类型,避免类型不一致导致接口调用失败 | 506 | // 转换activeTab为数字类型,避免类型不一致导致接口调用失败 |
| 506 | const tabType = Number(activeTab.value); | 507 | const tabType = Number(activeTab.value); |
| 507 | let res: any; | 508 | let res: any; |
| 508 | - | 509 | + // 0-待办 1-已办 2-我发起的任务 |
| 509 | if (tabType === 0) { | 510 | if (tabType === 0) { |
| 510 | res = await getTodoTaskDetail({taskId: taskIdStr}); | 511 | res = await getTodoTaskDetail({taskId: taskIdStr}); |
| 511 | - } else if (tabType === 1) { | ||
| 512 | - res = await getMyTaskDetail({taskId: taskIdStr}); | ||
| 513 | } else if (tabType === 2) { | 512 | } else if (tabType === 2) { |
| 513 | + res = await getMyTaskDetail({taskId: taskIdStr}); | ||
| 514 | + } else if (tabType === 1) { | ||
| 514 | res = await getDoneTaskDetail({taskId: taskIdStr}); | 515 | res = await getDoneTaskDetail({taskId: taskIdStr}); |
| 515 | } else { | 516 | } else { |
| 516 | uni.showToast({title: '无效的工单类型', icon: 'none'}); | 517 | uni.showToast({title: '无效的工单类型', icon: 'none'}); |
| @@ -547,10 +548,11 @@ const activeTopTabClick = async (item: any) => { | @@ -547,10 +548,11 @@ const activeTopTabClick = async (item: any) => { | ||
| 547 | // 关键:格式化数据,补充up-steps要求的title字段 | 548 | // 关键:格式化数据,补充up-steps要求的title字段 |
| 548 | if (res && res.activityNodes && res.activityNodes.length) { | 549 | if (res && res.activityNodes && res.activityNodes.length) { |
| 549 | // 1. 先过滤:剔除 name 为 "结束" 的节点 | 550 | // 1. 先过滤:剔除 name 为 "结束" 的节点 |
| 550 | - const filteredActivityNodes = res.activityNodes.filter(node => { | ||
| 551 | - // 返回 true 保留节点,返回 false 剔除节点 | ||
| 552 | - return node.name !== '结束'; | ||
| 553 | - }); | 551 | + // const filteredActivityNodes = res.activityNodes.filter(node => { |
| 552 | + // // 返回 true 保留节点,返回 false 剔除节点 | ||
| 553 | + // return node.name !== '结束'; | ||
| 554 | + // }); | ||
| 555 | + const filteredActivityNodes = res.activityNodes | ||
| 554 | const formatActivityNodes = filteredActivityNodes.map(node => ({ | 556 | const formatActivityNodes = filteredActivityNodes.map(node => ({ |
| 555 | ...node, | 557 | ...node, |
| 556 | title: node.name // 补充强制字段,满足3.3.48版本组件要求 | 558 | title: node.name // 补充强制字段,满足3.3.48版本组件要求 |
| @@ -785,7 +787,7 @@ const handleAcceptModalCancel = () => { | @@ -785,7 +787,7 @@ const handleAcceptModalCancel = () => { | ||
| 785 | // ========== 验收弹窗确认按钮(新增returnImgs传参) ========== | 787 | // ========== 验收弹窗确认按钮(新增returnImgs传参) ========== |
| 786 | const handleAcceptModalConfirm = async () => { | 788 | const handleAcceptModalConfirm = async () => { |
| 787 | // 1. 校验验收原因是否为空 | 789 | // 1. 校验验收原因是否为空 |
| 788 | - if (!acceptReason.value.trim()) { | 790 | + if (acceptRadioValue.value == 1 && !acceptReason.value.trim()) { |
| 789 | uni.showToast({title: '请填写验收原因', icon: 'none', duration: 1000}); | 791 | uni.showToast({title: '请填写验收原因', icon: 'none', duration: 1000}); |
| 790 | return; | 792 | return; |
| 791 | } | 793 | } |
pages/index/index.vue
| @@ -32,13 +32,18 @@ | @@ -32,13 +32,18 @@ | ||
| 32 | placeholder="请选择日期范围" | 32 | placeholder="请选择日期范围" |
| 33 | @confirm="handleDateConfirm" | 33 | @confirm="handleDateConfirm" |
| 34 | :max-date="maxDate" | 34 | :max-date="maxDate" |
| 35 | + | ||
| 36 | + @popup-show="handlePopupShow" | ||
| 37 | + @popup-hide="handlePopupHide" | ||
| 35 | /> | 38 | /> |
| 39 | +<!-- :minDate="minDate"--> | ||
| 36 | </view> | 40 | </view> |
| 37 | </view> | 41 | </view> |
| 38 | 42 | ||
| 39 | <!-- 双折线K线图 --> | 43 | <!-- 双折线K线图 --> |
| 40 | <view class="chart-container"> | 44 | <view class="chart-container"> |
| 41 | <uni-charts | 45 | <uni-charts |
| 46 | + v-if="!isDatePickerOpen" | ||
| 42 | type="line" | 47 | type="line" |
| 43 | :data="klineChartData" | 48 | :data="klineChartData" |
| 44 | :categories="klineCategories" | 49 | :categories="klineCategories" |
| @@ -75,6 +80,7 @@ | @@ -75,6 +80,7 @@ | ||
| 75 | :page-size="10" | 80 | :page-size="10" |
| 76 | use-page-scroll | 81 | use-page-scroll |
| 77 | > | 82 | > |
| 83 | + | ||
| 78 | <template #empty> | 84 | <template #empty> |
| 79 | <up-empty/> | 85 | <up-empty/> |
| 80 | </template> | 86 | </template> |
| @@ -122,8 +128,23 @@ import {getTaskCompletionSummary, getTaskDetails} from "@/api/index/index"; | @@ -122,8 +128,23 @@ import {getTaskCompletionSummary, getTaskDetails} from "@/api/index/index"; | ||
| 122 | const msgCount = ref(0); | 128 | const msgCount = ref(0); |
| 123 | const currentTab = ref('todo'); // todo:待办 done:已办 | 129 | const currentTab = ref('todo'); // todo:待办 done:已办 |
| 124 | const dateRange = ref([]); | 130 | const dateRange = ref([]); |
| 125 | -const maxDate = ref(timeFormat(new Date(), 'yyyy-mm-dd')); | 131 | +const yesterday = new Date(); |
| 132 | +yesterday.setDate(yesterday.getDate() - 1); // 日期减1天 = 昨天 | ||
| 133 | +const maxDate = ref(timeFormat(yesterday, 'yyyy-mm-dd')); | ||
| 134 | +const minDate = '2026-01-06' | ||
| 135 | + | ||
| 136 | +// 新增响应式变量:标记日期选择器弹窗是否打开 | ||
| 137 | +const isDatePickerOpen = ref(false); | ||
| 138 | + | ||
| 139 | +// 弹窗打开时触发 | ||
| 140 | +const handlePopupShow = () => { | ||
| 141 | + isDatePickerOpen.value = true; | ||
| 142 | +}; | ||
| 126 | 143 | ||
| 144 | +// 弹窗关闭时触发 | ||
| 145 | +const handlePopupHide = () => { | ||
| 146 | + isDatePickerOpen.value = false; | ||
| 147 | +}; | ||
| 127 | // Tab列表配置 | 148 | // Tab列表配置 |
| 128 | const tabList = ref([]); | 149 | const tabList = ref([]); |
| 129 | const todoTotal = ref(0); // 待办事项总数 | 150 | const todoTotal = ref(0); // 待办事项总数 |
| @@ -193,16 +214,18 @@ const rpx2px = (rpx) => { | @@ -193,16 +214,18 @@ const rpx2px = (rpx) => { | ||
| 193 | 214 | ||
| 194 | 215 | ||
| 195 | const initRecent7Days = async () => { | 216 | const initRecent7Days = async () => { |
| 196 | - const now = new Date(); | ||
| 197 | - const sevenDaysAgo = new Date(); | ||
| 198 | - sevenDaysAgo.setDate(now.getDate() - 6); | 217 | + const yesterday = new Date(); |
| 218 | + yesterday.setDate(yesterday.getDate() - 1); // 结束时间 = 昨天 | ||
| 219 | + const sevenDaysAgo = new Date(yesterday); | ||
| 220 | + sevenDaysAgo.setDate(yesterday.getDate() - 6); // 开始时间 = 昨天往前推6天(共7天) | ||
| 221 | + | ||
| 199 | // 格式化日期为 YYYY-MM-DD 格式 | 222 | // 格式化日期为 YYYY-MM-DD 格式 |
| 200 | dateRange.value = [ | 223 | dateRange.value = [ |
| 201 | timeFormat(sevenDaysAgo, 'yyyy-mm-dd'), | 224 | timeFormat(sevenDaysAgo, 'yyyy-mm-dd'), |
| 202 | - timeFormat(now, 'yyyy-mm-dd') | 225 | + timeFormat(yesterday, 'yyyy-mm-dd') |
| 203 | ]; | 226 | ]; |
| 204 | 227 | ||
| 205 | - initChartData(timeFormat(sevenDaysAgo, 'yyyy-mm-dd'), timeFormat(now, 'yyyy-mm-dd')); | 228 | + initChartData(timeFormat(sevenDaysAgo, 'yyyy-mm-dd'), timeFormat(yesterday, 'yyyy-mm-dd')); |
| 206 | }; | 229 | }; |
| 207 | 230 | ||
| 208 | const getUnread = async () => { | 231 | const getUnread = async () => { |
| @@ -381,8 +404,8 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | @@ -381,8 +404,8 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | ||
| 381 | justify-content: space-between; | 404 | justify-content: space-between; |
| 382 | align-items: center; | 405 | align-items: center; |
| 383 | color: #fff; | 406 | color: #fff; |
| 384 | - position: relative; | ||
| 385 | - z-index: 1; | 407 | + //position: relative; |
| 408 | + //z-index: 1; | ||
| 386 | 409 | ||
| 387 | .username { | 410 | .username { |
| 388 | font-size: 16px; | 411 | font-size: 16px; |
| @@ -415,8 +438,8 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | @@ -415,8 +438,8 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | ||
| 415 | margin-top: -122px; | 438 | margin-top: -122px; |
| 416 | border-radius: $border-radius $border-radius 0 0; | 439 | border-radius: $border-radius $border-radius 0 0; |
| 417 | background-color: $bg-color; | 440 | background-color: $bg-color; |
| 418 | - position: relative; | ||
| 419 | - z-index: 999; | 441 | + //position: relative; |
| 442 | + //z-index: 999; | ||
| 420 | overflow: hidden; | 443 | overflow: hidden; |
| 421 | padding-bottom: $spacing-lg; | 444 | padding-bottom: $spacing-lg; |
| 422 | } | 445 | } |
| @@ -446,7 +469,8 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | @@ -446,7 +469,8 @@ $border-color: #e5e5e5; // 新增边框颜色变量 | ||
| 446 | padding: 2px 4px; | 469 | padding: 2px 4px; |
| 447 | border-radius: 3px; | 470 | border-radius: 3px; |
| 448 | transition: background-color 0.2s; | 471 | transition: background-color 0.2s; |
| 449 | - | 472 | + position: relative; |
| 473 | + z-index: 999; | ||
| 450 | &:active { | 474 | &:active { |
| 451 | background-color: $bg-color; | 475 | background-color: $bg-color; |
| 452 | } | 476 | } |
pages/login/index.vue
| @@ -17,11 +17,11 @@ | @@ -17,11 +17,11 @@ | ||
| 17 | :activeStyle="{ | 17 | :activeStyle="{ |
| 18 | color: '#3c9cff', | 18 | color: '#3c9cff', |
| 19 | fontWeight:'500', | 19 | fontWeight:'500', |
| 20 | - fontSize: '14' | 20 | + fontSize: '14px' // 补充单位,避免样式异常 |
| 21 | }" | 21 | }" |
| 22 | :inactiveStyle="{ | 22 | :inactiveStyle="{ |
| 23 | color: '#606060', | 23 | color: '#606060', |
| 24 | - fontSize: '14' | 24 | + fontSize: '14px' // 补充单位,避免样式异常 |
| 25 | }" | 25 | }" |
| 26 | ></up-tabs> | 26 | ></up-tabs> |
| 27 | 27 | ||
| @@ -44,8 +44,6 @@ | @@ -44,8 +44,6 @@ | ||
| 44 | :disabled="isLoading" | 44 | :disabled="isLoading" |
| 45 | shape="circle" | 45 | shape="circle" |
| 46 | placeholder="请输入手机号" | 46 | placeholder="请输入手机号" |
| 47 | - selectionStart="10" | ||
| 48 | - selectionEnd="10" | ||
| 49 | @blur="() => loginFormRef.validateField('mobile')" | 47 | @blur="() => loginFormRef.validateField('mobile')" |
| 50 | /> | 48 | /> |
| 51 | </up-form-item> | 49 | </up-form-item> |
| @@ -95,8 +93,8 @@ | @@ -95,8 +93,8 @@ | ||
| 95 | iconSize="14" | 93 | iconSize="14" |
| 96 | labelSize="14" | 94 | labelSize="14" |
| 97 | labelColor="'#3F3F3F'" | 95 | labelColor="'#3F3F3F'" |
| 98 | - usedAlone | ||
| 99 | - v-model:checked="rememberPwd" | 96 | + usedAlone |
| 97 | + v-model:checked="rememberPwd" | ||
| 100 | > | 98 | > |
| 101 | </up-checkbox> | 99 | </up-checkbox> |
| 102 | </view> | 100 | </view> |
| @@ -126,20 +124,14 @@ import { useUserStore } from '@/pinia/user'; | @@ -126,20 +124,14 @@ import { useUserStore } from '@/pinia/user'; | ||
| 126 | import globalConfig from '@/common/config/global'; | 124 | import globalConfig from '@/common/config/global'; |
| 127 | import CryptoJS from 'crypto-js'; | 125 | import CryptoJS from 'crypto-js'; |
| 128 | 126 | ||
| 129 | -// ========== 加密工具函数(建议抽离到 @/utils/encrypt.js) ========== | ||
| 130 | -// 密钥配置:生产环境建议从后端接口获取,不要硬编码 | 127 | +// ========== 加密工具函数 ========== |
| 131 | const CRYPTO_CONFIG = { | 128 | const CRYPTO_CONFIG = { |
| 132 | - key: CryptoJS.enc.Utf8.parse('jcsscrypto123abc'), // 16位key(AES-128) | 129 | + key: CryptoJS.enc.Utf8.parse('jcsscrypto123abc'), // 16位key |
| 133 | iv: CryptoJS.enc.Utf8.parse('abc123jcsscrypto'), // 16位iv | 130 | iv: CryptoJS.enc.Utf8.parse('abc123jcsscrypto'), // 16位iv |
| 134 | mode: CryptoJS.mode.CBC, | 131 | mode: CryptoJS.mode.CBC, |
| 135 | padding: CryptoJS.pad.Pkcs7 | 132 | padding: CryptoJS.pad.Pkcs7 |
| 136 | }; | 133 | }; |
| 137 | 134 | ||
| 138 | -/** | ||
| 139 | - * AES加密 | ||
| 140 | - * @param {string} text 待加密文本 | ||
| 141 | - * @returns {string} 加密后的字符串 | ||
| 142 | - */ | ||
| 143 | const aesEncrypt = (text) => { | 135 | const aesEncrypt = (text) => { |
| 144 | if (!text) return ''; | 136 | if (!text) return ''; |
| 145 | try { | 137 | try { |
| @@ -154,11 +146,6 @@ const aesEncrypt = (text) => { | @@ -154,11 +146,6 @@ const aesEncrypt = (text) => { | ||
| 154 | } | 146 | } |
| 155 | }; | 147 | }; |
| 156 | 148 | ||
| 157 | -/** | ||
| 158 | - * AES解密 | ||
| 159 | - * @param {string} encryptedText 加密后的字符串 | ||
| 160 | - * @returns {string} 解密后的原始文本 | ||
| 161 | - */ | ||
| 162 | const aesDecrypt = (encryptedText) => { | 149 | const aesDecrypt = (encryptedText) => { |
| 163 | if (!encryptedText) return ''; | 150 | if (!encryptedText) return ''; |
| 164 | try { | 151 | try { |
| @@ -191,9 +178,9 @@ const rememberPwd = ref(true); | @@ -191,9 +178,9 @@ const rememberPwd = ref(true); | ||
| 191 | 178 | ||
| 192 | // 表单数据 | 179 | // 表单数据 |
| 193 | const form = reactive({ | 180 | const form = reactive({ |
| 194 | - account: '', | ||
| 195 | - mobile: '', | ||
| 196 | - password: '' | 181 | + account: '', // 账号 |
| 182 | + mobile: '', // 手机号 | ||
| 183 | + password: '' // 密码 | ||
| 197 | }); | 184 | }); |
| 198 | 185 | ||
| 199 | // 表单校验规则 | 186 | // 表单校验规则 |
| @@ -212,15 +199,12 @@ const loginFormRules = reactive({ | @@ -212,15 +199,12 @@ const loginFormRules = reactive({ | ||
| 212 | ] | 199 | ] |
| 213 | }); | 200 | }); |
| 214 | 201 | ||
| 215 | -// Tabs切换事件 | 202 | +// Tabs切换事件:移除清空输入框的逻辑 |
| 216 | const handleTabChange = ({ name }) => { | 203 | const handleTabChange = ({ name }) => { |
| 217 | if (isLoading.value) return; | 204 | if (isLoading.value) return; |
| 205 | + console.log('切换到:', name); | ||
| 218 | loginType.value = name; | 206 | loginType.value = name; |
| 219 | - if (name === '手机号登录') { | ||
| 220 | - form.account = ''; | ||
| 221 | - } else { | ||
| 222 | - form.mobile = ''; | ||
| 223 | - } | 207 | + // 只清空校验状态,不清除输入框内容 |
| 224 | nextTick(() => { | 208 | nextTick(() => { |
| 225 | loginFormRef.value?.clearValidate(); | 209 | loginFormRef.value?.clearValidate(); |
| 226 | }); | 210 | }); |
| @@ -260,20 +244,20 @@ const handleLogin = async () => { | @@ -260,20 +244,20 @@ const handleLogin = async () => { | ||
| 260 | // 保存数据:账号/密码 均用AES加密 | 244 | // 保存数据:账号/密码 均用AES加密 |
| 261 | if (rememberPwd.value) { | 245 | if (rememberPwd.value) { |
| 262 | try { | 246 | try { |
| 247 | + console.log('123+'+loginType.value) | ||
| 263 | if (loginType.value === '手机号登录') { | 248 | if (loginType.value === '手机号登录') { |
| 264 | uni.setStorageSync('login_mobile', aesEncrypt(form.mobile)); | 249 | uni.setStorageSync('login_mobile', aesEncrypt(form.mobile)); |
| 265 | - uni.removeStorageSync('login_account'); | 250 | + uni.removeStorageSync('login_account'); // 确保只存一种类型 |
| 266 | } else { | 251 | } else { |
| 267 | uni.setStorageSync('login_account', aesEncrypt(form.account)); | 252 | uni.setStorageSync('login_account', aesEncrypt(form.account)); |
| 268 | - uni.removeStorageSync('login_mobile'); | 253 | + uni.removeStorageSync('login_mobile'); // 确保只存一种类型 |
| 269 | } | 254 | } |
| 270 | - // 密码加密存储(可解密还原) | ||
| 271 | uni.setStorageSync('login_password', aesEncrypt(form.password)); | 255 | uni.setStorageSync('login_password', aesEncrypt(form.password)); |
| 272 | } catch (err) { | 256 | } catch (err) { |
| 273 | console.warn('保存登录信息失败:', err); | 257 | console.warn('保存登录信息失败:', err); |
| 274 | } | 258 | } |
| 275 | } else { | 259 | } else { |
| 276 | - // 清除缓存 | 260 | + // 清除所有缓存 |
| 277 | uni.removeStorageSync('login_account'); | 261 | uni.removeStorageSync('login_account'); |
| 278 | uni.removeStorageSync('login_mobile'); | 262 | uni.removeStorageSync('login_mobile'); |
| 279 | uni.removeStorageSync('login_password'); | 263 | uni.removeStorageSync('login_password'); |
| @@ -308,21 +292,23 @@ onMounted(() => { | @@ -308,21 +292,23 @@ onMounted(() => { | ||
| 308 | nextTick(() => { | 292 | nextTick(() => { |
| 309 | loginFormRef.value?.setRules(loginFormRules); | 293 | loginFormRef.value?.setRules(loginFormRules); |
| 310 | }); | 294 | }); |
| 311 | - // 读取缓存并解密填充 | 295 | + // 读取缓存并解密填充:修复逻辑漏洞,确保只填充当前登录类型的输入框 |
| 312 | if (rememberPwd.value) { | 296 | if (rememberPwd.value) { |
| 313 | try { | 297 | try { |
| 314 | const savedAccount = aesDecrypt(uni.getStorageSync('login_account') || ''); | 298 | const savedAccount = aesDecrypt(uni.getStorageSync('login_account') || ''); |
| 315 | const savedMobile = aesDecrypt(uni.getStorageSync('login_mobile') || ''); | 299 | const savedMobile = aesDecrypt(uni.getStorageSync('login_mobile') || ''); |
| 316 | const savedPwd = aesDecrypt(uni.getStorageSync('login_password') || ''); | 300 | const savedPwd = aesDecrypt(uni.getStorageSync('login_password') || ''); |
| 317 | 301 | ||
| 302 | + // 核心修正:只填充对应类型的输入框,另一类置空 | ||
| 318 | if (savedAccount) { | 303 | if (savedAccount) { |
| 319 | form.account = savedAccount; | 304 | form.account = savedAccount; |
| 320 | - loginType.value = '账号登录'; | 305 | + form.mobile = ''; // 清空手机号输入框 |
| 306 | + // loginType.value = '账号登录'; | ||
| 321 | } else if (savedMobile) { | 307 | } else if (savedMobile) { |
| 322 | form.mobile = savedMobile; | 308 | form.mobile = savedMobile; |
| 323 | - loginType.value = '手机号登录'; | 309 | + form.account = ''; // 清空账号输入框 |
| 310 | + // loginType.value = '手机号登录'; | ||
| 324 | } | 311 | } |
| 325 | - // 密码解密后填充到输入框(可展示) | ||
| 326 | form.password = savedPwd; | 312 | form.password = savedPwd; |
| 327 | } catch (err) { | 313 | } catch (err) { |
| 328 | console.warn('读取缓存失败:', err); | 314 | console.warn('读取缓存失败:', err); |
| @@ -332,7 +318,6 @@ onMounted(() => { | @@ -332,7 +318,6 @@ onMounted(() => { | ||
| 332 | </script> | 318 | </script> |
| 333 | 319 | ||
| 334 | <style scoped lang="scss"> | 320 | <style scoped lang="scss"> |
| 335 | - | ||
| 336 | .top-title { | 321 | .top-title { |
| 337 | background: url("https://img.jichengshanshui.com.cn:28207/appimg/bg.jpg") no-repeat; | 322 | background: url("https://img.jichengshanshui.com.cn:28207/appimg/bg.jpg") no-repeat; |
| 338 | background-size: 100% 100%; | 323 | background-size: 100% 100%; |
pages/mine/index.vue
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | 11 | ||
| 12 | <!-- 用户名+手机号 --> | 12 | <!-- 用户名+手机号 --> |
| 13 | <view class="user-info-content"> | 13 | <view class="user-info-content"> |
| 14 | - <view class="user-name">{{ userStore.isLogin ? userInfo.username : '未登录' }}</view> | 14 | + <view class="user-name">{{ userStore.isLogin ? userInfo.nickname : '未登录' }}</view> |
| 15 | <!-- <view class="user-phone">{{ userStore.isLogin ? userInfo.nickname : '--------' }}</view>--> | 15 | <!-- <view class="user-phone">{{ userStore.isLogin ? userInfo.nickname : '--------' }}</view>--> |
| 16 | <view class="user-phone">上次登录时间 {{ timeFormat(userInfo.loginDate)}}</view> | 16 | <view class="user-phone">上次登录时间 {{ timeFormat(userInfo.loginDate)}}</view> |
| 17 | 17 | ||
| @@ -129,7 +129,7 @@ export default { | @@ -129,7 +129,7 @@ export default { | ||
| 129 | background-size: 100% 100%; | 129 | background-size: 100% 100%; |
| 130 | z-index: -1; | 130 | z-index: -1; |
| 131 | display: flex; | 131 | display: flex; |
| 132 | - padding: 80px 0 0 20px; | 132 | + padding: 80px 0 0 15px; |
| 133 | } | 133 | } |
| 134 | .mine-content{ | 134 | .mine-content{ |
| 135 | margin-top: -150px; | 135 | margin-top: -150px; |