Commit 2d57b60f32d575538f081d96254fd287f29f7a8f

Authored by 刘淇
1 parent e46945ff

巡查详情

pages-sub/daily/maintain-manage/finish-plan-detail.vue
@@ -377,6 +377,20 @@ const parseGeo = (source, ext) => { @@ -377,6 +377,20 @@ const parseGeo = (source, ext) => {
377 */ 377 */
378 const buildFieldRow = (item) => { 378 const buildFieldRow = (item) => {
379 const row = { name: item.fieldName || item.fieldCode || '-', kind: 'text', text: '-', tags: [], images: [], files: [], geo: null }; 379 const row = { name: item.fieldName || item.fieldCode || '-', kind: 'text', text: '-', tags: [], images: [], files: [], geo: null };
  380 +
  381 + // ==========【新增修复代码】优先使用后端返回的text快照,解决ce_shi_4 / wu_liao不展示问题==========
  382 + if (item.text != null && String(item.text).trim() !== '') {
  383 + row.text = String(item.text).trim();
  384 + // 注意:图片/多选/布尔等类型,不能直接用item.text,要保留原有解析逻辑,所以只对普通文本类型生效
  385 + // 判断:不是新渲染类型、不是物料,才直接用快照文本
  386 + const isNewType = NEW_RENDER_TYPES.includes(item.fieldType);
  387 + const isMaterial = item.materialId != null;
  388 + if (!isNewType && !isMaterial) {
  389 + return row;
  390 + }
  391 + }
  392 + // =========================================================================================
  393 +
380 const raw = rawTextOf(item); 394 const raw = rawTextOf(item);
381 // ① 物料:优先级最高,即便凑巧带 multiple=1 也不当多值渲染 395 // ① 物料:优先级最高,即便凑巧带 multiple=1 也不当多值渲染
382 if (item.materialId != null || item.fieldType == null) { 396 if (item.materialId != null || item.fieldType == null) {
@@ -464,6 +478,7 @@ const buildFieldRow = (item) => { @@ -464,6 +478,7 @@ const buildFieldRow = (item) => {
464 return row; 478 return row;
465 }; 479 };
466 480
  481 +
467 /** 8 附件:下载后由系统应用打开(微信小程序无通用文件预览,失败给出提示) */ 482 /** 8 附件:下载后由系统应用打开(微信小程序无通用文件预览,失败给出提示) */
468 const openFile = (file) => { 483 const openFile = (file) => {
469 uni.showLoading({title: '正在打开...', mask: true}); 484 uni.showLoading({title: '正在打开...', mask: true});