Commit a5376a9f32c30cb66495b519de2eb7279f1a03c3
1 parent
d5bce5ef
查看详情
Showing
2 changed files
with
63 additions
and
48 deletions
pages-sub/daily/maintain-manage/finish-plan-detail.vue
| ... | ... | @@ -100,53 +100,53 @@ |
| 100 | 100 | </up-cell-group> |
| 101 | 101 | |
| 102 | 102 | <!-- 动态配置的养护字段填报值(garden_work_record/garden_work_field_value),未填报过则整段不显示 --> |
| 103 | - <up-cell-group | |
| 104 | - v-if="i.fieldRows && i.fieldRows.length" | |
| 105 | - :border="false" | |
| 106 | - inset | |
| 107 | - title="" | |
| 108 | - | |
| 109 | - > | |
| 110 | - <up-cell v-for="(f, fi) in i.fieldRows" :key="fi" align="middle"> | |
| 111 | - <template #title> | |
| 112 | - <view class="field-cell-title-multi">{{f.name}}</view> | |
| 103 | + <!-- 动态配置的养护字段填报值(garden_work_record/garden_work_field_value),未填报过则整段不显示 --> | |
| 104 | +<up-cell-group | |
| 105 | + v-if="i.fieldRows && i.fieldRows.length" | |
| 106 | + :border="false" | |
| 107 | + inset | |
| 108 | + title="" | |
| 109 | +> | |
| 110 | + <up-cell v-for="(f, fi) in i.fieldRows" :key="fi" align="middle"> | |
| 111 | + <template #title> | |
| 112 | +<view class="field-cell-title-multi">{{f.name}}</view> | |
| 113 | 113 | </template> |
| 114 | - <template #value> | |
| 115 | - <!-- 7 图片:复用本页照片的相册组件(预览/尺寸一致) --> | |
| 116 | - <up-album | |
| 117 | - v-if="f.kind === 'image'" | |
| 118 | - :urls="f.images" | |
| 119 | - singleSize="60" | |
| 120 | - multipleSize="60" | |
| 121 | - :preview-full-image="true" | |
| 122 | - ></up-album> | |
| 123 | - | |
| 124 | - <!-- 6 多选 / 3 历史多选 / 9 关联记录:标签平铺(自绘,避免引入未使用的组件) --> | |
| 125 | - <view v-else-if="f.kind === 'multi'" class="field-tags"> | |
| 126 | - <view v-for="(t, ti) in f.tags" :key="ti" class="field-tag">{{ t.text }}</view> | |
| 127 | - </view> | |
| 128 | - | |
| 129 | - <!-- 8 附件:点击下载后用系统应用打开 --> | |
| 130 | - <view v-else-if="f.kind === 'file'" class="field-tags"> | |
| 131 | - <text | |
| 132 | - v-for="(file, ui) in f.files" | |
| 133 | - :key="ui" | |
| 134 | - class="field-file" | |
| 135 | - @click="openFile(file)" | |
| 136 | - >{{ file.name }}</text> | |
| 137 | - </view> | |
| 138 | - | |
| 139 | - <!-- 10 链接:小程序不能直接打开外部 URL,点击复制 --> | |
| 140 | - <text v-else-if="f.kind === 'link'" class="field-link" @click="copyLink(f.text)">{{ f.text }}</text> | |
| 141 | - | |
| 142 | - <!-- 11 地理位置:点击调微信原生地图(无需地图 AK) --> | |
| 143 | - <text v-else-if="f.kind === 'geo' && f.geo" class="field-link" @click="openGeo(f.geo)">{{ f.text }}</text> | |
| 144 | - | |
| 145 | - <!-- 其余(1数值/2文本/3单选枚举/4日期/5布尔等)文本直出 --> | |
| 146 | - <text v-else class="common-text-color field-text">{{ f.text }}</text> | |
| 147 | - </template> | |
| 148 | - </up-cell> | |
| 149 | - </up-cell-group> | |
| 114 | + <template #value> | |
| 115 | + <!-- 7 图片:复用本页照片的相册组件(预览/尺寸一致) --> | |
| 116 | + <up-album | |
| 117 | + v-if="f.kind === 'image'" | |
| 118 | + :urls="f.images" | |
| 119 | + singleSize="60" | |
| 120 | + multipleSize="60" | |
| 121 | + :preview-full-image="true" | |
| 122 | + ></up-album> | |
| 123 | + <!-- 6 多选 / 3 历史多选 / 9 关联记录:标签平铺(自绘,避免引入未使用的组件) --> | |
| 124 | + <view v-else-if="f.kind === 'multi'" class="field-tags"> | |
| 125 | + <view v-for="(t, ti) in f.tags" :key="ti" class="field-tag">{{ t.text }}</view> | |
| 126 | + </view> | |
| 127 | + <!-- 8 附件:点击下载后用系统应用打开 --> | |
| 128 | + <view v-else-if="f.kind === 'file'" class="field-tags"> | |
| 129 | + <text | |
| 130 | + v-for="(file, ui) in f.files" | |
| 131 | + :key="ui" | |
| 132 | + class="field-file" | |
| 133 | + @click="openFile(file)" | |
| 134 | + >{{ file.name }}</text> | |
| 135 | + </view> | |
| 136 | + <!-- 10 链接:小程序不能直接打开外部 URL,点击复制 --> | |
| 137 | + <text v-else-if="f.kind === 'link'" class="field-link" @click="copyLink(f.text)">{{ f.text }}</text> | |
| 138 | + <!-- 11 地理位置:点击调微信原生地图(无需地图 AK) --> | |
| 139 | + <text v-else-if="f.kind === 'geo' && f.geo" class="field-link" @click="openGeo(f.geo)">{{ f.text }}</text> | |
| 140 | + <!-- 其余(1数值/2文本/3单选枚举/4日期/5布尔等)文本直出 --> | |
| 141 | + <text v-else class="common-text-color field-text">{{ f.text }}</text> | |
| 142 | + </template> | |
| 143 | + </up-cell> | |
| 144 | +</up-cell-group> | |
| 145 | +<!-- 当没有填报字段,提示暂无提交记录 --> | |
| 146 | +<view v-else class="no-record-tip"> | |
| 147 | + 直接结束了本次任务 | |
| 148 | +</view> | |
| 149 | + | |
| 150 | 150 | </view> |
| 151 | 151 | </template> |
| 152 | 152 | </view> |
| ... | ... | @@ -627,4 +627,11 @@ onLoad((options) => { |
| 627 | 627 | min-width: 160rpx; // 固定左侧标题最大宽度,文字会在这个宽度内自动换行 |
| 628 | 628 | } |
| 629 | 629 | |
| 630 | +.no-record-tip { | |
| 631 | + padding:24rpx 30rpx; | |
| 632 | + font-size:26rpx; | |
| 633 | + color:#999; | |
| 634 | +} | |
| 635 | + | |
| 636 | + | |
| 630 | 637 | </style> |
| 631 | 638 | \ No newline at end of file | ... | ... |
pages-sub/daily/maintain-manage/type-list-page.vue
| ... | ... | @@ -26,8 +26,8 @@ |
| 26 | 26 | <view class="info-text">任务次数:第{{ item.planFinishNum +1 }}次</view> |
| 27 | 27 | <!-- 待完成:去作业;已完成:去查看 --> |
| 28 | 28 | <view v-if="activeStatus === '1'" class="mini-btn" @click.stop="handleGoWork(item)">去作业</view> |
| 29 | - <view v-else-if="activeStatus === '2'" class="mini-btn" @click.stop="handleGoWork(item)">去查看</view> | |
| 30 | - <view v-else-if="activeStatus === '3'" class="mini-btn" @click.stop="handleGoWork(item)">去查看</view> | |
| 29 | + <view v-else-if="activeStatus === '2'" class="mini-btn" @click.stop="handleGoWorkLook(item)">去查看</view> | |
| 30 | + <view v-else-if="activeStatus === '3'" class="mini-btn" @click.stop="handleGoWorkLook(item)">去查看</view> | |
| 31 | 31 | </view> |
| 32 | 32 | <!-- 第三行:有效期 + 结束任务按钮 --> |
| 33 | 33 | <view class="row row-3"> |
| ... | ... | @@ -240,6 +240,14 @@ const handleGoWork = (item) => { |
| 240 | 240 | url: `/pages-sub/daily/maintain-manage/now-list-page?planNo=${item.planNo}&planTypeId=${planTypeId.value}&businessType=${item.busiLine}&isView=${isView}` |
| 241 | 241 | }) |
| 242 | 242 | } |
| 243 | +const handleGoWorkLook = (item) => { | |
| 244 | + const isView = activeStatus.value | |
| 245 | + uni.navigateTo({ | |
| 246 | + url: `/pages-sub/daily/maintain-manage/finish-plan-detail?planNo=${item.planNo}&planTypeId=${planTypeId.value}&businessType=${item.busiLine}&isView=${isView}` | |
| 247 | + }) | |
| 248 | +} | |
| 249 | + | |
| 250 | + | |
| 243 | 251 | const handleEndTask = async (item) => { |
| 244 | 252 | currentEndTaskItem.value = item |
| 245 | 253 | endTaskModalShow.value = true | ... | ... |