From 381357c9d11045ff6c0e73cf2d64b735b13c7b99 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期一, 18 八月 2025 09:59:18 +0800
Subject: [PATCH] uni-segmented-control text
---
pages/modal/5602.vue | 39 ++++++++++-----------------------------
1 files changed, 10 insertions(+), 29 deletions(-)
diff --git a/pages/modal/5602.vue b/pages/modal/5602.vue
index 0b0223a..619e05a 100644
--- a/pages/modal/5602.vue
+++ b/pages/modal/5602.vue
@@ -38,7 +38,7 @@
<!-- 椤电 -->
<view class="dv-tab">
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem"
- styvarype="button">
+ styvarype="text">
</uni-segmented-control>
</view>
<swiper class="view-tabpage" :current="current" @change="changeSwiper">
@@ -199,7 +199,7 @@
<script>
import {
Base64
- } from '@/js/Base64.js';
+ } from '@/js/Base64.js';
import {
appGetInfo,
dictGetInfo
@@ -214,7 +214,7 @@
export default {
data() {
return {
- largeMode: getApp().globalData.largeMode || false,
+ largeMode: getApp().globalData.largeMode || false,
title: this.translateSys("sorting"),
ClsID: "Distribution_CNTR_Detail",
ClsID2: "Picking_Result",
@@ -259,7 +259,8 @@
this.title = options.titlename;
this.param = JSON.parse(options.param);
// console.log(this.param);
- this.loadData(options.paramValue)
+ const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined
+ this.loadData(paramValue)
},
methods: {
setData: function(obj) {
@@ -289,27 +290,7 @@
await this.Head_UIStyleGetInfo(this.ClsID, this.param.Input_UI_Style.ID);
//浼犲叆鍙傛暟鍊� if (paramValue) {
- const attrs = paramValue.attrs || [];
- (this.head_styledef?.form?.items || []).forEach(async (ele, index) => {
- if (ele.name != "Layout") {
- attrs.forEach(async (ele2, index2) => {
- if (ele.fieldId == ele2.name) {
- ele.value = ele2.value;
- }
- });
- } else {
- ele.setting.colList.forEach(async (col) => {
- if (col) {
- attrs.forEach(async (ele2,
- index2) => {
- if (col.fieldId == ele2.name) {
- col.value = ele2.value;
- }
- });
- }
- });
- }
- })
+ this.setFormValues(paramValue)
}
//鍔犺浇鍒濆鐣岄潰
@@ -845,7 +826,7 @@
var tip = result.info ? typeof result.info == 'string' ? result.info :
result.info.join('<br/>') : '';
tip = tip || result.err_info
-
+
if (tip) uni.showModal({
title: this.translateSys("tip"),
content: tip,
@@ -1075,8 +1056,8 @@
},
setFormValues(attrs) {
const head_styledef = this.head_styledef
- if (JSON.stringify(attrs) == '{}') {
- return;
+ if (!Array.isArray(attrs)) {
+ return
}
console.log(attrs)
attrs.forEach(async (attr, key) => {
@@ -2517,7 +2498,7 @@
} else {
var tip = result.info ? typeof result.info == 'string' ? result.info : result.info
.join('<br/>') : '';
- tip = tip || result.err_info
+ tip = tip || result.err_info
if (tip) uni.showModal({
title: this.translateSys("tip"),
content: tip,
--
Gitblit v1.9.1