From 01fa158740467ca0db83b131249beeeb515a73c2 Mon Sep 17 00:00:00 2001 From: cuiqian2004 <cuiqian2004@163.com> Date: 星期二, 01 四月 2025 16:03:57 +0800 Subject: [PATCH] test --- pages/modal/3018_2.vue | 155 ++++++++++--------------- pages/modal/3200_view.vue | 20 ++ pages/modal/5601.vue | 58 ++++----- pages/modal/3200.vue | 12 + manifest.json | 4 components/oi-form/list/index.vue | 21 -- pages/modal/form/index.vue | 35 ----- 7 files changed, 122 insertions(+), 183 deletions(-) diff --git a/components/oi-form/list/index.vue b/components/oi-form/list/index.vue index b2d9f5d..a32dd99 100644 --- a/components/oi-form/list/index.vue +++ b/components/oi-form/list/index.vue @@ -1,5 +1,5 @@ <template> - <view :class="viewMode ? 'oi-form-item-view':'oi-form-item'"> + <view class="oi-form-item"> <uni-forms-item v-show="!hiddenIds.includes(data.fieldId)" :label="data.labelWidth === 0 ? '' : data.label? data.label+'锛�:''" :label-width="data.labelWidth || data.labelWidth === 0 ? data.labelWidth : 100+'px'" @@ -105,23 +105,12 @@ }; </script> -<style lang="scss" scoped> +<style lang="less" scoped> .oi-form-item { .uni-forms-item { - margin-bottom: 11rpx; - } - - } - - .oi-form-item-view { - .uni-forms-item { - padding-bottom: 5rpx; - margin-bottom: 0; - - .uni-forms-item__label { - height: 20px !important; - padding: 0 10rpx 0 0 !important; - } + margin-bottom: 15rpx; } } + + </style> \ No newline at end of file diff --git a/manifest.json b/manifest.json index 4191a1c..fd95543 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "MoboxPDA", "appid" : "__UNI__56D451E", "description" : "", - "versionName" : "1.1.52", - "versionCode" : 1152, + "versionName" : "1.1.54", + "versionCode" : 1154, "transformPx" : false, /* 5+App鐗规湁鐩稿叧 */ "app-plus" : { diff --git a/pages/modal/3018_2.vue b/pages/modal/3018_2.vue index 537f304..cb8a253 100644 --- a/pages/modal/3018_2.vue +++ b/pages/modal/3018_2.vue @@ -53,7 +53,7 @@ <script> import { Base64 - } from '@/js/Base64.js'; + } from '@/js/Base64.js'; import utils from "@/js/utils.js" import dayjs from "dayjs"; import OIForm from '@/components/oi-form/index.vue' @@ -67,9 +67,9 @@ dataObjCreate } from "@/api/data.js" import buttonClickMixin from '@/mixins/button-click.js'; - + export default { - mixins: [buttonClickMixin], + mixins: [buttonClickMixin], components: { OIForm, }, @@ -1468,16 +1468,17 @@ }, setFormValues(data) { const $this = this + const head_styledef = this.head_styledef for (var i = 0; i < data.length; i++) { - if (data[i].choice_list) { - for (var c = 0; c < $this.head_styledef.form.items - .length; c++) { - var attr = $this.head_styledef.form.items[c]; - if (attr.name != 'Layout') { - if (attr.fieldId == data[i].attr) { + const attr = attr + if (attr.choice_list) { + for (var c = 0; c < head_styledef.form.items.length; c++) { + const item = head_styledef.form.items[c]; + if (item.name != 'Layout') { + if (item.fieldId == attr.attr) { var dictItemList = []; - for (var d in data[i].choice_list) { - var val = data[i].choice_list[d]; + for (var d in attr.choice_list) { + var val = attr.choice_list[d]; dictItemList.push({ "CN_S_NAME": val, "CN_S_VALUE": val, @@ -1485,20 +1486,15 @@ "value": val }); } - attr.dict = dictItemList; + item.dict = dictItemList; } - } else if (attr.name == 'Layout') { - attr.setting.colList.forEach(col => { + } else if (item.name == 'Layout') { + item.setting.colList.forEach(col => { if (col) { - if (col.fieldId == data[ - i] - .attr) { + if (col.fieldId == attr.attr) { var dictItemList = []; - for (var d in data[i] - .choice_list) { - var val = data[i] - .choice_list[ - d]; + for (var d in attr.choice_list) { + var val = attr.choice_list[d]; dictItemList.push({ "CN_S_NAME": val, "CN_S_VALUE": val, @@ -1506,8 +1502,7 @@ "value": val }); } - col.dict = - dictItemList; + col.dict = dictItemList; } } }); @@ -1515,49 +1510,44 @@ } } - for (var c = 0; c < $this.head_styledef.form - .items - .length; c++) { - var attr = $this.head_styledef.form.items[c]; - // console.log(attr[j].Name+'=='+data[i].attr); + for (var c = 0; c < head_styledef.form.items.length; c++) { + const item = head_styledef.form.items[c]; + // console.log(attr[j].Name+'=='+attr.attr); //鍒ゆ柇琛ㄥ崟閲屾槸鍚︽湁杩斿洖瀛楁锛屾病鏈夊氨瑁呰浇鍒癿odel閲岋紝鐐瑰嚮纭畾鎻愪氦鐨勬椂鍊欏甫涓婅繖浜涙暟鎹�- if ($this.head_styledef.form.model[data[i] - .attr] == - undefined) { - $this.head_styledef.form.model[data[i] - .attr] = - data[i] - .value; + if (head_styledef.form.model[attr.attr] == undefined) { + head_styledef.form.model[attr.attr] = attr.value; } //鍒ゆ柇鏄惁鏄爡鏍艰〃鍗�- if (attr.name != 'Layout') { - if (attr.fieldId == data[i].attr) { - attr.value = ''; - attr.oldvalue = ''; - attr.value = data[i].value; - attr.oldvalue = data[i].value; - $this.head_styledef.form.model[attr - .fieldId] = - data[ - i].value; + if (item.name != 'Layout') { + if (item.fieldId == attr.attr) { + item.value = ''; + item.oldvalue = ''; + item.value = attr.value; + item.oldvalue = attr.value; + head_styledef.form.model[item.fieldId] = attr.value; + if (item.name == "Input") { + if (attr.prompt) item.placeholder = attr.prompt; + } + if (attr.enable !== undefined) { + if (attr.enable) item.disabled = false; + else item.disabled = true; + } } - } else if (attr.name == 'Layout') { - attr.setting.colList.forEach(col => { + } else if (item.name == 'Layout') { + item.setting.colList.forEach(col => { if (col) { - if (col.fieldId == data[i] - .attr) { + if (col.fieldId == attr.attr) { col.value = ''; col.oldvalue = ''; - col.value = data[i] - .value; - col.oldvalue = data[i] - .value; - $this.head_styledef.form - .model[ - col - .fieldId] = data[ - i] - .value; + col.value = attr.value; + col.oldvalue = attr.value; + if (col.name == "Input") { + if (attr.prompt) col.placeholder = attr.prompt; + } + if (attr.enable !== undefined) { + if (attr.enable) col.disabled = false; + else col.disabled = true; + } } } }); @@ -1568,42 +1558,25 @@ }, hideFormItems(data) { const $this = this + const head_styledef = this.head_styledef data.forEach(async (attr, key) => { - $this.head_styledef.form.items - .forEach( - async ( - ele, index) => { - //鍒ゆ柇鏄惁鏄爡鏍艰〃鍗�- if (ele.name != 'Layout') { - if (ele.fieldId == attr - .attr) { - ele.show = attr - .show; + head_styledef.form.items.forEach(async (ele, index) => { + //鍒ゆ柇鏄惁鏄爡鏍艰〃鍗�+ if (ele.name != 'Layout') { + if (ele.fieldId == attr.attr) { + ele.show = attr.show; + } + } else if (ele.name == 'Layout') { + ele.setting.colList.forEach((col) => { + if (col) { + if (col.fieldId == attr.attr) { + col.show = attr.show; } - } else if (ele.name == - 'Layout') { - ele.setting.colList - .forEach( - col => { - if (col) { - if (col - .fieldId == - attr - .attr - ) { - col.show = - attr - .show; - } - } - }); } }); + } + }); }); - var head_styledef = JSON.parse(JSON.stringify($this.$data - .head_styledef)); - $this.head_styledef = []; - $this.head_styledef = head_styledef; }, afterOK() { this.saving = true diff --git a/pages/modal/3200.vue b/pages/modal/3200.vue index 33e678a..6b3eadf 100644 --- a/pages/modal/3200.vue +++ b/pages/modal/3200.vue @@ -66,7 +66,7 @@ <script> import { Base64 - } from '@/js/Base64.js'; + } from '@/js/Base64.js'; import classUtils from "@/js/utils.js" import { appGetInfo, @@ -1935,6 +1935,16 @@ width: 91%; display: inline-block; text-align: left; + + .uni-forms-item { + padding-bottom: 5rpx; + margin-bottom: 0; + + .uni-forms-item__label { + height: 20px !important; + padding: 0 10rpx 0 0 !important; + } + } } .dv-panel-buticon { diff --git a/pages/modal/3200_view.vue b/pages/modal/3200_view.vue index f9c889a..d93b89e 100644 --- a/pages/modal/3200_view.vue +++ b/pages/modal/3200_view.vue @@ -36,7 +36,7 @@ <script> import { Base64 - } from '@/js/Base64.js'; + } from '@/js/Base64.js'; import classUtils from "@/js/utils.js" import { appGetInfo, @@ -49,7 +49,7 @@ } from "@/api/data.js" import OIForm from '@/components/oi-form/index.vue' import buttonClickMixin from '@/mixins/button-click.js'; - + export default { mixins: [buttonClickMixin], components: { @@ -350,14 +350,14 @@ } } }); - } else{ + } else { this.handleButtonClick((done) => { - that.onButtonClicked(btn); + that.onButtonClicked(btn); setTimeout(() => { done(); // 閲嶇疆鐘舵� }, 1000); }); - + } }, //鐐瑰嚮鎸夐挳鍒楄〃 @@ -812,6 +812,16 @@ width: 100%; display: inline-block; text-align: left; + + .uni-forms-item { + padding-bottom: 5rpx; + margin-bottom: 0; + + .uni-forms-item__label { + height: 20px !important; + padding: 0 10rpx 0 0 !important; + } + } } .dv-panel-buticon { diff --git a/pages/modal/5601.vue b/pages/modal/5601.vue index 1943ef7..8696077 100644 --- a/pages/modal/5601.vue +++ b/pages/modal/5601.vue @@ -1376,7 +1376,7 @@ } }) }); - pageData.DefList = detailStyleDefList + pageData.DefList = detailStyleDefList $this.$set(this.pageDetail, pageIndex, pageData) }, //鍔犺浇姝e湪鐮佺洏鍐呭 @@ -1557,6 +1557,13 @@ if (ele.fieldId == attr.attr) { ele.value = attr.value; ele.oldvalue = attr.value; + if (ele.name == "Input") { + if (attr.prompt) ele.placeholder = attr.prompt; + } + if (attr.enable !== undefined) { + if (attr.enable) ele.disabled = false; + else ele.disabled = true; + } } } else if (ele.name == "Layout") { ele.setting.colList.forEach((col) => { @@ -1564,6 +1571,13 @@ if (col.fieldId == attr.attr) { col.value = attr.value; col.oldvalue = attr.value; + if (col.name == "Input") { + if (attr.prompt) col.placeholder = attr.prompt; + } + if (attr.enable !== undefined) { + if (attr.enable) col.disabled = false; + else col.disabled = true; + } } } }); @@ -2903,39 +2917,7 @@ flex-direction: column; } - .v-head-style { - width: 98%; - - .uni-forms-item { - margin-bottom: 11rpx; - } - - .input-wrapper { - border: 1px solid #d5d5d5; - width: 100%; - display: flex; - flex-direction: row; - - .uni-input { - flex: 1; - padding: 12rpx 8rpx; - color: #2d8cf0; - // height: 40rpx; - // line-height: 40rpx; - } - - .uni-icon { - padding: 10rpx 5rpx; - font-size: 32rpx; - color: rgb(192, 196, 204); - } - } - - .input-wrapper:hover { - border: 1px solid rgb(41, 121, 255); - } - } - + .view-content { display: flex; flex: 1; @@ -3077,7 +3059,15 @@ padding: 0px; margin: 0; + .uni-forms-item { + padding-bottom: 5rpx; + margin-bottom: 0; + .uni-forms-item__label { + height: 20px !important; + padding: 0 10rpx 0 0 !important; + } + } } diff --git a/pages/modal/form/index.vue b/pages/modal/form/index.vue index 3d77b3a..bc51570 100644 --- a/pages/modal/form/index.vue +++ b/pages/modal/form/index.vue @@ -1838,40 +1838,7 @@ flex-direction: column; } - .v-head-style { - width: 98%; - - .uni-forms-item { - margin-bottom: 11rpx; - } - - .input-wrapper { - border: 1px solid #d5d5d5; - width: 100%; - display: flex; - flex-direction: row; - - .uni-input { - flex: 1; - padding: 12rpx 8rpx; - color: #2d8cf0; - // height: 40rpx; - // line-height: 40rpx; - } - - .uni-icon { - - padding: 10rpx 5rpx; - font-size: 32rpx; - color: rgb(192, 196, 204); - } - } - - .input-wrapper:hover { - border: 1px solid rgb(41, 121, 255); - } - } - + .view-content { display: flex; flex: 1; -- Gitblit v1.9.1