| | |
| | | <view class="top-right"> |
| | | <button class="refresh-btn" @click="refresh">刷新</button> |
| | | </view> |
| | | <!--<view> |
| | | <view> |
| | | <h4>一台机台只能选择一条工单(多选默认为最后一条)</h4> |
| | | </view>--> |
| | | </view> |
| | | <view class="section top-section"> |
| | | <view class="form-row"> |
| | | <view> |
| | |
| | | <view v-if="isShow" class="overlay"> |
| | | <view class="popup"> |
| | | <view class="form-row"> |
| | | <view> |
| | | <view style="display: flex; align-items: center;"> |
| | | <label style="float: left;margin-top: 18px;">点击按钮筛选工单状态:</label> |
| | | <superwei-combox :candidates="engineeringNoMapList" placeholder="请选择" v-model="engineeringNo" |
| | | @select="onEngineeringNoChange" class="picker" |
| | | style="padding: 7px 46px;width: 650px;"></superwei-combox> |
| | | <span style="margin-left: 20px; color: #ff6600; font-size: 18px;">多选时只保留最后一条工单</span> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | let day = String(date.getDate()).padStart(2, '0'); // 获取日期并补零 |
| | | return `${year}-${month}-${day}`; // 返回格式化后的字符串 |
| | | }, |
| | | selectionChange(e) { |
| | | // 只保留最后选中的那一条 |
| | | if (e.detail && e.detail.index !== undefined) { |
| | | this.selectedIndexs = [e.detail.index]; |
| | | |
| | | // 取消其他已选 |
| | | this.$nextTick(() => { |
| | | // 获取表格ref |
| | | const table = this.$refs.table; |
| | | if (table && table.clearSelection) { |
| | | table.clearSelection(); |
| | | // 重新选中当前 |
| | | table.toggleRowSelection(this.tableData[e.detail.index], true); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | selectionChange(e) { |
| | | // 单选直接赋值 |
| | | this.selectedIndexs = [e.detail.index]; |
| | | }, |
| | | |
| | | selectedItems() { |
| | | return this.selectedIndexs.map(i => this.tableData[i]) |