components/oi-form/index.vue
@@ -1,27 +1,32 @@ <template> <uni-forms class="oi-form" ref="baseForm" label-align="right"> <template v-for="(item,index) in form.items"> <OIFormLayout v-if="item.name == 'Layout'" v-show="!item.isHidden" :focusId="focusId" :viewMode="viewMode" :hiddenIds="hiddenIds" :data="item" @change="onChange" @focus="onFocus" @click="onClick" @click-prefix="onClickPrefix" @click-suffix="onClickSuffix"> </OIFormLayout> <view v-for="(item,index) in form.items" :key="index"> <!-- 栅格布局 --> <uni-row v-if="item.name == 'Layout'" v-show="!item.isHidden" :gutter="item.setting.gutter"> <uni-col :span="item.setting.spanList && item.setting.spanList[key]? item.setting.spanList[key] : 24 / item.setting.col" v-for="(col,key) in item.setting.colList" :key="key"> <OIFormItem v-if="col != null" :focusId="focusId" :viewMode="viewMode" :data="col" :hiddenIds="hiddenIds" @on-change="onChange" @on-focus="onFocus" @on-click="onClick" @on-click-prefix="onClickPrefix" @on-click-suffix="onClickSuffix"></OIFormItem> <uni-forms-item v-else label=""></uni-forms-item> </uni-col> </uni-row> <OIFormItem v-else :hiddenIds="hiddenIds" :focusId="focusId" :viewMode="viewMode" :data="item" @change="onChange" @focus="onFocus" @click="onClick" @click-prefix="onClickPrefix" @click-suffix="onClickSuffix"> @on-change="onChange" @on-focus="onFocus" @on-click="onClick" @on-click-prefix="onClickPrefix" @on-click-suffix="onClickSuffix"> </OIFormItem> </template> </view> </uni-forms> </template> <script> import OIFormItem from './list/index.vue' import OIFormLayout from './list/layout/index.vue' export default { name: "OIForm", components: { OIFormItem, OIFormLayout }, props: { form: { @@ -73,27 +78,24 @@ onChange(item) { var attr = item.fieldId; this.form.model[attr] = item.value; this.$emit("change", item) this.$emit("on-change", item) }, onClick(item) { this.$emit("click", item) this.$emit("on-click", item) }, onFocus(item) { this.$emit("focus", item) this.$emit("on-focus", item) }, onClickPrefix(item) { this.$emit("click-prefix", item) this.$emit("on-click-prefix", item) }, onClickSuffix(item) { this.$emit("click-suffix", item) this.$emit("on-click-suffix", item) }, } }, }; </script> <style lang="less"> .oi-form { } .oi-form {} </style> components/oi-form/list/checkbox/index.vue
@@ -34,7 +34,7 @@ this.model[this.data.fieldId] = val } this.data.value = val this.$emit("change", val) this.$emit("on-change", val) }, } components/oi-form/list/index.vue
@@ -7,29 +7,29 @@ <OIFormText v-if="viewMode && data.disabled" :data="data" :model="model"> </OIFormText> <OIFormInput v-else-if="data.name == 'Input'" :viewMode="viewMode" :focus="focusId== data.fieldId" :data="data" :model="model" @change="onChange" @focus="onFocus" @click="onClick" @click-prefix="onClickPrefix" @click-suffix="onClickSuffix"> :data="data" :model="model" @on-change="onChange" @on-focus="onFocus" @on-click="onClick" @on-click-prefix="onClickPrefix" @on-click-suffix="onClickSuffix"> </OIFormInput> <OIFormInputNumber v-else-if="data.name == 'InputNumber'" :focus="focusId== data.fieldId" :data="data" :model="model" @change="onChange" @focus="onFocus" @click="onClick"> :model="model" @on-change="onChange" @on-focus="onFocus" @on-click="onClick"> </OIFormInputNumber> <OIFormTextArea v-else-if="data.name == 'Textarea'" :focus="focusId== data.fieldId" :data="data" :model="model" @change="onChange" @focus="onFocus" @click="onClick"> :model="model" @on-change="onChange" @on-focus="onFocus" @on-click="onClick"> </OIFormTextArea> <OIFormSelect v-else-if="data.name == 'Select'" :data="data" :model="model" @change="onChange"> <OIFormSelect v-else-if="data.name == 'Select'" :data="data" :model="model" @on-change="onChange"> </OIFormSelect> <OIFormSwitch v-else-if="data.name == 'Switch'" :data="data" :model="model" @change="onChange"> <OIFormSwitch v-else-if="data.name == 'Switch'" :data="data" :model="model" @on-change="onChange"> </OIFormSwitch> <OIFormCheckbox v-else-if="data.name == 'Checkbox'" :data="data" :model="model" @change="onChange"> <OIFormCheckbox v-else-if="data.name == 'Checkbox'" :data="data" :model="model" @on-change="onChange"> </OIFormCheckbox> <OIFormRadio v-else-if="data.name == 'Radio'" :data="data" :model="model" @change="onChange"> <OIFormRadio v-else-if="data.name == 'Radio'" :data="data" :model="model" @on-change="onChange"> </OIFormRadio> <OIFormDatePicker v-else-if="data.name == 'DatePicker'" :data="data" :model="model" @change="onChange"> <OIFormDatePicker v-else-if="data.name == 'DatePicker'" :data="data" :model="model" @on-change="onChange"> </OIFormDatePicker> <OIFormTimePicker v-else-if="data.name == 'TimePicker'" :data="data" :model="model" @change="onChange"> <OIFormTimePicker v-else-if="data.name == 'TimePicker'" :data="data" :model="model" @on-change="onChange"> </OIFormTimePicker> <OIFormDatePickerRange v-else-if="data.name == 'DatePickerRange'" :data="data" :model="model" @change="onChange"> @on-change="onChange"> </OIFormDatePickerRange> <OIFormText v-else-if="data.name == 'Text'" :data="data" :model="model"> </OIFormText> @@ -87,24 +87,21 @@ }, methods: { onChange(e) { this.$emit("change", this.data) this.$emit("on-change", this.data) }, onClick(e) { this.$emit("click", this.data) this.$emit("on-click", this.data) }, onFocus(e) { this.$emit("focus", this.data) this.$emit("on-focus", this.data) }, onClickPrefix() { this.$emit("click-prefix", this.data) this.$emit("on-click-prefix", this.data) }, onClickSuffix() { this.$emit("click-suffix", this.data) this.$emit("on-click-suffix", this.data) }, }, mounted() { console.log("item", this.data) } }; </script> @@ -115,6 +112,7 @@ } } .oi-form-item-view { .uni-forms-item { padding-bottom: 5rpx; components/oi-form/list/input-number/index.vue
@@ -1,11 +1,11 @@ <template> <view class="oi-form-input-number"> <input v-if="model" type="number" class="oi-input-number" :class="data.disabled?'input-disabled':''" v-model="model[data.fieldId]" :focus="focus" :placeholder="data.placeholder" @blur="onChange" @confirm="onConfirm" @click="onClick" :disabled="data.disabled"></input> <input v-else type="number" class="oi-input-number" :class="data.disabled?'input-disabled':''" v-model="data.value" :focus="focus" :placeholder="data.placeholder" @blur="onChange" @confirm="onConfirm" @click="onClick" :disabled="data.disabled"></input> <input v-if="model" type="number" class="oi-input-number" :class="data.disabled?'input-disabled':''" v-model="model[data.fieldId]" :focus="focus" :placeholder="data.placeholder" @focus="onFocus" @blur="onChange" @confirm="onConfirm" @click="onClick" :disabled="data.disabled"></input> <input v-else type="number" class="oi-input-number" :class="data.disabled?'input-disabled':''" v-model="data.value" :focus="focus" :placeholder="data.placeholder" @focus="onFocus" @blur="onChange" @confirm="onConfirm" @click="onClick" :disabled="data.disabled"></input> </view> </template> @@ -25,25 +25,26 @@ }, methods: { onChange(e) { this.$emit("change", e) this.$emit("on-change", e) }, onConfirm(e) { this.onChange(e) }, onClick(e) { this.$emit("click", e) this.$emit("on-click", e) }, onFocus(e) { this.$emit("on-focus", e) }, } }, }; </script> <style lang="less" scoped> .oi-form-input-number { border: 1px solid #d5d5d5; width: calc(100%- 6rpx); border-radius: 6px !important; padding: 3rpx; width: 100%; .input-disabled { background-color: #f3f3f3 !important; } @@ -65,8 +66,9 @@ transition-duration: 0.1s; vertical-align: middle; } } .oi-form-input-number:hover { .oi-input-number:hover { border: 1px solid rgb(41, 121, 255); } } </style> components/oi-form/list/input/index.vue
@@ -36,22 +36,22 @@ }, methods: { onChange(e) { this.$emit("change", e) this.$emit("on-change", e) }, onConfirm(e) { this.onChange(e) }, onClick(e) { this.$emit("click", e) this.$emit("on-click", e) }, onFocus(e) { this.$emit("focus", e) this.$emit("on-focus", e) }, onPrefixButton() { this.$emit("click-prefix") this.$emit("on-click-prefix") }, onSuffixButton() { this.$emit("click-suffix") this.$emit("on-click-suffix") }, } }; components/oi-form/list/layout/index.vue
File was deleted components/oi-form/list/select/index.vue
@@ -22,7 +22,7 @@ }, methods: { onChange(e) { this.$emit("change", e) this.$emit("on-change", e) }, } components/oi-form/list/switch/index.vue
@@ -20,7 +20,7 @@ }, methods: { onChange(e) { this.$emit("change", e) this.$emit("on-change", e) }, components/oi-form/list/textarea/index.vue
@@ -1,10 +1,10 @@ <template> <view class="oi-form-textarea"> <textarea v-if="model" class="textarea" :class="data.disabled?'input-disabled':''" v-model="model[data.fieldId]" :focus="focus" :placeholder="data.placeholder" @blur="onChange" @confirm="onConfirm" @click="onClick" :focus="focus" :placeholder="data.placeholder" @focus="onFocus" @blur="onChange" @confirm="onConfirm" @click="onClick" :disabled="data.disabled"></textarea> <textarea v-else class="textarea" :class="data.disabled?'input-disabled':''" v-model="data.value" :focus="focus" :placeholder="data.placeholder" @blur="onChange" @confirm="onConfirm" @click="onClick" :placeholder="data.placeholder" @focus="onFocus" @blur="onChange" @confirm="onConfirm" @click="onClick" :disabled="data.disabled"></textarea> </view> </template> @@ -25,13 +25,16 @@ }, methods: { onChange(e) { this.$emit("change", e) this.$emit("on-change", e) }, onConfirm(e) { this.onChange(e) }, onClick(e) { this.$emit("click", e) this.$emit("on-click", e) }, onFocus(e) { this.$emit("on-focus", e) }, main.js
@@ -1,6 +1,5 @@ import Vue from 'vue' import App from './App' import store from "./store"; // i18n import messages from './locale' import VueI18n from 'vue-i18n' @@ -12,13 +11,11 @@ Vue.use(VueI18n) Vue.config.productionTip = false Vue.prototype.$store = store App.mpType = 'app' const i18n = new VueI18n(i18nConfig) const app = new Vue({ store, ...App, i18n, }) manifest.json
@@ -2,8 +2,8 @@ "name" : "MoboxPDA", "appid" : "__UNI__56D451E", "description" : "", "versionName" : "1.1.48", "versionCode" : 1148, "versionName" : "1.1.50", "versionCode" : 1150, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { pages/modal/3018.vue
@@ -24,16 +24,18 @@ </div> <input :type="attr.Type=='整数' || attr.Type=='浮点数' || attr.Type=='int' || attr.Type=='float'?'number':'text'" :class="attr.edit?'':'input-disabled'" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"> :class="attr.edit?'':'input-disabled'" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"> <!-- =='flase'?true:false --> <textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'" :class="attr.edit?'':'input-disabled'" :data-index="index" :data-iindex="iindex" style="height:60px;" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea> :class="attr.edit?'':'input-disabled'" :data-index="index" :data-iindex="iindex" style="height:60px;" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea> <textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'" :class="attr.edit?'':'input-disabled'" :data-index="index" :data-iindex="iindex" style="height:90px;" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea> :class="attr.edit?'':'input-disabled'" :data-index="index" :data-iindex="iindex" style="height:90px;" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea> <!-- 扫码后事件返回 --> <div class="input_vallist"> <ul v-for="(inputval,vindex) in inputValList"> @@ -47,18 +49,19 @@ <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p> <input :type="attr.Type=='整数' || attr.Type=='浮点数' || attr.Type=='int' || attr.Type=='float' ?'number':'text'" class="attr_field" :class="attr.edit?'':'input-disabled'" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" class="attr_field" :class="attr.edit?'':'input-disabled'" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true"> <textarea class="attr_field" :class="attr.edit?'':'input-disabled'" :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'" :data-index="index" :data-iindex="iindex" style="height:60px;" <textarea class="attr_field" :class="attr.edit?'':'input-disabled'" :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'" :data-index="index" :data-iindex="iindex" style="height:60px;" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true"></textarea> <textarea class="attr_field" :class="attr.edit?'':'input-disabled'" :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'" :data-index="index" :data-iindex="iindex" style="height:90px;" <textarea class="attr_field" :class="attr.edit?'':'input-disabled'" :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'" :data-index="index" :data-iindex="iindex" style="height:90px;" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true"></textarea> <div class="text-right2" v-if="attr.ext_button==true"> @@ -153,7 +156,8 @@ </view> <view v-if="classattr.control_style=='左右布局'"> <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p> <input type="text" class="attr_field" :class="attr.edit?'':'input-disabled'" :data-index="index" :data-iindex="iindex" <input type="text" class="attr_field" :class="attr.edit?'':'input-disabled'" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}" disabled="true" :maxlength="-1"> <div class="text-right2" v-if="attr.Type=='引用对象(单个)'|| attr.Type=='obj-ref'"> @@ -179,12 +183,13 @@ <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i class="ace-icon fa fa-plus-circle"></i></a> </div> <input type="text" :class="attr.edit?'':'input-disabled'" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" :maxlength="-1"> <input type="text" :class="attr.edit?'':'input-disabled'" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" :maxlength="-1"> </view> <view v-if="classattr.control_style=='左右布局'"> <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p> <input type="text" class="attr_field" :class="attr.edit?'':'input-disabled'" :value="attr.Value" <input type="text" class="attr_field" :class="attr.edit?'':'input-disabled'" :value="attr.Value" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}" disabled="true" :maxlength="-1"> <div class="text-right2"> @@ -203,12 +208,13 @@ <a href="#" class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i class="ace-icon fa fa-plus-circle"></i></a> </div> <input type="text" :class="attr.edit?'':'input-disabled'" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" :maxlength="-1"> <input type="text" :class="attr.edit?'':'input-disabled'" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" :maxlength="-1"> </view> <view v-if="classattr.control_style=='左右布局'"> <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p> <input type="text" class="attr_field" :class="attr.edit?'':'input-disabled'" :value="attr.Value" <input type="text" class="attr_field" :class="attr.edit?'':'input-disabled'" :value="attr.Value" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}" disabled="true" :maxlength="-1"> <div class="text-right2"> @@ -223,12 +229,14 @@ <view v-if="classattr.control_style=='上下布局'"> <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true">*</i></text> <input type="text" :class="attr.edit?'':'input-disabled'" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true" :maxlength="-1"> <input type="text" :class="attr.edit?'':'input-disabled'" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true" :maxlength="-1"> </view> <view v-if="classattr.control_style=='左右布局'"> <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p> <input type="text" class="attr_field" :class="attr.edit?'':'input-disabled'" :data-index="index" :data-iindex="iindex" <input type="text" class="attr_field" :class="attr.edit?'':'input-disabled'" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}" :disabled="attr.edit?false:true" :maxlength="-1"> <i class="i_tishi" v-if="attr.notempty==true">*</i> @@ -925,29 +933,6 @@ } } for (var i = 0; i < value.length; i++) { var length = 0; if (!this.$data.refdatastore.filter(function( s) { return data[i].attr == s.attr }).length) { length = 1; this.$data.refdatastore.push(data[i]); } if (length == 0) { for (var j = 0; j < this.$data.refdatastore .length; j++) { if (this.$data.refdatastore[j].attr == data[i] .attr) { this.$data.refdatastore[j].value = data[i] .value; } } } } }, popupChange(e) { console.log('当前模式:' + e.type + ',状态:' + e.show); @@ -2513,9 +2498,11 @@ right: 30rpx; font-size: 60rpx; } .input-disabled { background-color: #f3f3f3 !important; } input::-webkit-input-placeholder { font-size: 12rpx; } pages/modal/3018_2.vue
@@ -3,8 +3,8 @@ <view class="view-content"> <!-- 表头样式 --> <OIForm ref="refBaseForm" class="v-headStyle" :form="head_styledef.form" :focusId="focusFieldId" @click="onClick" @focus="ontap" @change="onEnterChange" @click-prefix="classAttr_extButton" @click-suffix="classAttr_extButton"></OIForm> @on-click="onClick" @on-focus="ontap" @on-change="onEnterChange" @on-click-prefix="classAttr_extButton" @on-click-suffix="classAttr_extButton"></OIForm> </view> <view class="view-bottom"> @@ -685,6 +685,7 @@ var attr = item.fieldId; this.head_styledef.form.model[attr] = newVal; var onChangeEvent = item.bind.onChangeEvent; //内容变化后事件 // this.onScanValue(this.head_styledef.form.items[2].setting.colList[0], "test") if (onChangeEvent?.id) { //内容变化后事件 this.onChange(onChangeEvent); } @@ -978,44 +979,8 @@ if (data.result) { var result = data.result; $this.setFormValues(data.result) for (var i = 0; i < result.length; i++) { for (var c = 0; c < $this.$data.head_styledef.form.items .length; c++) { var attr = $this.$data.head_styledef.form.items[c]; //判断表单里是否有返回字段,没有就装载到model里,点击确定提交的时候带上这些数据 if ($this.head_styledef.form.model[result[i].attr] == undefined) { $this.head_styledef.form.model[result[i].attr] = result[i] .value; } //判断是否是栅格表单 if (attr.name != 'Layout') { if (attr.fieldId == result[i].attr) { attr.value = ''; attr.oldvalue = ''; attr.value = result[i].value; attr.oldvalue = result[i].value; $this.head_styledef.form.model[attr.fieldId] = result[i] .value; } } else if (attr.name == 'Layout') { attr.setting.colList.forEach(col => { if (col) { if (col.fieldId == result[i].attr) { col.value = ''; col.oldvalue = ''; col.value = result[i].value; col.oldvalue = result[i].value; $this.head_styledef.form.model[col .fieldId] = result[i].value; } } }); } } var length = 0; if (!$this.$data.refdatastore.filter(function(s) { @@ -1631,25 +1596,6 @@ } } }); } } var length = 0; if (!$this.$data.refdatastore.filter(function(s) { return data[i].attr == s.attr }).length) { length = 1; $this.$data.refdatastore.push(data[i]); } if (length == 0) { for (var j = 0; j < $this.$data.refdatastore .length; j++) { if ($this.$data.refdatastore[j].attr == data[ i] .attr) { $this.$data.refdatastore[j].value = data[ i] .value; } } } } pages/modal/3037.vue
@@ -196,7 +196,8 @@ <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i class="ace-icon fa fa-plus-circle"></i></a> </div> <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" :maxlength="-1"> <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" :maxlength="-1"> </view> <view v-if="classattr.control_style=='左右布局'"> <p class="tx_title2" @@ -222,7 +223,8 @@ <a href="#" class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i class="ace-icon fa fa-plus-circle"></i></a> </div> <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" :maxlength="-1"> <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" :maxlength="-1"> </view> <view v-if="classattr.control_style=='左右布局'"> <p class="tx_title2" @@ -295,7 +297,8 @@ <!-- 左右布局 --> <p class="tx_title2">{{param.Scan_Code.Name}}:</p> <input type="text" class="attr_field" :value="scanCodeVal" @focus="scan_ontap" @blur="scan_onevent" :style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'" :maxlength="-1"> :style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'" :maxlength="-1"> <div class="text-right2" v-if="param.Scan_Code.Have_Select_Button==true"> <a @tap="scan_classAttr_extButton()"><i class="ace-icon fa" :class="param.Scan_Code.Img?param.Scan_Code.Img:'fa-plus-circle'"></i></a> @@ -512,8 +515,8 @@ <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i class="ace-icon fa fa-plus-circle"></i></a> </div> <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" :maxlength="-1"> <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" :maxlength="-1"> </view> <view v-if="subclassattr.control_style=='左右布局'"> <p class="tx_title2" @@ -539,8 +542,8 @@ <a href="#" class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i class="ace-icon fa fa-plus-circle"></i></a> </div> <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" :maxlength="-1"> <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" :maxlength="-1"> </view> <view v-if="subclassattr.control_style=='左右布局'"> <p class="tx_title2" @@ -2757,68 +2760,6 @@ } } var length = 0; if (! this .$data .refdatastore .filter( function( s ) { return val[ i ] .attr == s .attr } ) .length ) { length = 1; this.$data .refdatastore .push( val[ i] ); } if (length == 0 ) { for ( var j = 0; j < this .$data .refdatastore .length; j++ ) { if (this .$data .refdatastore[ j ] .attr == val[ i] .attr ) { this.$data .refdatastore[ j ] .value = val[ i] .value; } } } } } } @@ -3108,73 +3049,6 @@ attr[ j] .Value = result[ i ] .value; } } } var length = 0; if (! $this .$data .refdatastore .filter( function( s ) { return result[ i ] .attr == s .attr } ) .length ) { length = 1; $this .$data .refdatastore .push( result[ i ] ); } if (length == 0 ) { for ( var j = 0; j < $this .$data .refdatastore .length; j++ ) { if ($this .$data .refdatastore[ j ] .attr == result[ i ] .attr ) { $this .$data .refdatastore[ j ] .value = result[ i ] @@ -4199,68 +4073,6 @@ } } var length = 0; if (! this .$data .refdatastore .filter( function( s ) { return val[ i ] .attr == s .attr } ) .length ) { length = 1; this.$data .refdatastore .push( val[ i] ); } if (length == 0 ) { for ( var j = 0; j < this .$data .refdatastore .length; j++ ) { if (this .$data .refdatastore[ j ] .attr == val[ i] .attr ) { this.$data .refdatastore[ j ] .value = val[ i] .value; } } } } } } @@ -4577,73 +4389,6 @@ ] .value; } } } } var length = 0; if (! $this .$data .refdatastore .filter( function( s ) { return result[ i ] .attr == s .attr } ) .length ) { length = 1; $this .$data .refdatastore .push( result[ i ] ); } if (length == 0 ) { for ( var j = 0; j < $this .$data .refdatastore .length; j++ ) { if ($this .$data .refdatastore[ j ] .attr == result[ i ] .attr ) { $this .$data .refdatastore[ j ] .value = result[ i ] .value; } } } pages/modal/3037_2.vue
@@ -1,8 +1,9 @@ <template> <view class="uni-page-modal-3017-2"> <!-- 表头样式 --> <OIForm ref="refBaseForm" class="v-headStyle" :form="head_styledef.form" @focus="ontap" @change="onEnterChange" @click-prefix="classAttr_extButton" @click-suffix="classAttr_extButton"></OIForm> <OIForm ref="refBaseForm" class="v-headStyle" :form="head_styledef.form" @on-focus="ontap" @on-change="onEnterChange" @on-click-prefix="classAttr_extButton" @on-click-suffix="classAttr_extButton"> </OIForm> <!-- 从数据 --> <view class="v-panel"> <div class="panel_title">{{param.Sub_Cls.Title}}</div> @@ -32,8 +33,38 @@ <!-- 从数据显示详情区 --> <view class="v-panellist" v-for="(subpanel,iiindex) in subPanelList" @tap="onPanelClick(iiindex)" :class="activelist[iiindex].active==true?'bk-active':''"> <OIForm class="v-area dv-panel" :form="subpanel.subClassAttr.form" viewMode></OIForm> <uni-forms class="v-area dv-panel" label-align="right"> <view v-for="(item,index) in subpanel.subClassAttr.form.items" :key="index"> <!-- 栅格布局 --> <uni-row v-if="item.name == 'Layout'" :gutter="item.setting.gutter"> <uni-col :span="item.setting.spanList && item.setting.spanList[key]? item.setting.spanList[key] : 24 / item.setting.col" v-for="(col,key) in item.setting.colList" :key="key"> <uni-forms-item v-if="col != null" :label="col.labelWidth === 0 ? '' : col.label? col.label+':':''" :label-width="col.labelWidth || col.labelWidth === 0 ? col.labelWidth : 100+'px'"> <view v-if="col.disabled">{{col.value}}</view> <input class="uni-input" v-else-if="col.name=='Input' || col.name=='InputNumber'" :type="col.name=='InputNumber'?'number':'text'" v-model="col.value" :placeholder="col.placeholder" :maxlength="-1" /> <view v-else>{{col.value}}</view> </uni-forms-item> <uni-forms-item v-else label=""></uni-forms-item> </uni-col> </uni-row> <uni-forms-item v-else :label="item.labelWidth === 0 ? '' : item.label? item.label+':':''" :label-width="item.labelWidth || item.labelWidth === 0 ? item.labelWidth : 100+'px'" :style="{ textAlign: item.setting.align }"> <view v-if="item.disabled">{{item.value}}</view> <input v-else-if="item.name=='Input' || item.name=='InputNumber' " class="uni-input" :type="item.name=='InputNumber'?'number':'text'" v-model="item.value" :disabled="item.disabled" :placeholder="item.placeholder" :maxlength="-1" /> <view v-else>{{item.value}}</view> </uni-forms-item> </view> </uni-forms> <view class="v-paneldel" v-if="param.Sub_Cls.Can_Add_Delete == true"> <a href="javascript:;" class="panel_del" @tap="panel_del(iiindex)"><i class="ace-icon fu-delete"></i></a> @@ -497,20 +528,6 @@ } } }); } } var length = 0; if (!$this.$data.refdatastore.filter(function(s) { return result[i].attr == s.attr }).length) { length = 1; $this.$data.refdatastore.push(result[i]); } if (length == 0) { for (var j = 0; j < $this.$data.refdatastore.length; j++) { if ($this.$data.refdatastore[j].attr == result[i].attr) { $this.$data.refdatastore[j].value = result[i].value; } } } } @@ -1564,20 +1581,7 @@ } } var length = 0; if (!$this.$data.refdatastore.filter(function(s) { return result[i].attr == s.attr }).length) { length = 1; $this.$data.refdatastore.push(result[i]); } if (length == 0) { for (var j = 0; j < $this.$data.refdatastore.length; j++) { if ($this.$data.refdatastore[j].attr == result[i].attr) { $this.$data.refdatastore[j].value = result[i].value; } } } } } else if (action.action_type == 'set_dlg_attr_show') { var result = action.value; @@ -1821,20 +1825,7 @@ } } } var length = 0; if (!$this.$data.refdatastore.filter(function(s) { return result[i].attr == s.attr }).length) { length = 1; $this.$data.refdatastore.push(result[i]); } if (length == 0) { for (var j = 0; j < $this.$data.refdatastore.length; j++) { if ($this.$data.refdatastore[j].attr == result[i].attr) { $this.$data.refdatastore[j].value = result[i].value; } } } } } else if (action.action_type == 'set_global_attr') { $this.$actiontr = action.value || []; @@ -2258,61 +2249,46 @@ /* padding: 10rpx 20rpx 4rpx 0px; */ border-radius: 12rpx; /* margin-bottom: 20rpx; */ text-align: right; .uni-forms-item { padding-bottom: 5rpx; margin-bottom: 0; .uni-forms-item__label { height: 20px !important; padding: 0 10rpx 0 0 !important; } .uni-input { width: calc(100% - 12rpx); padding: 5rpx; border: 1px solid #d5d5d5; color: #2d8cf0; height: 20px; background: #FFF; line-height: 20px; border-radius: 6px !important; font-size: 14px; font-family: inherit; box-shadow: none !important; transition-duration: 0.1s; vertical-align: middle; } .uni-input:hover { border: 1px solid rgb(41, 121, 255); } } } .dv-panel:first-child { padding-top: 10rpx; } .dv-panel-input { width: 100%; display: inline-block; text-align: left; } .dv-panel .txt_title { font-size: 34rpx; text-align: right; display: inline-block; vertical-align: 12px; } .dv-panel input { /* vertical-align: middle; */ display: inline-block; border: 1px solid #d5d5d5; width: 68%; height: 52rpx; line-height: 34rpx; background: #FFF; border-radius: 7px !important; color: #2d8cf0; padding: 6rpx 8rpx 8rpx; font-size: 32rpx; font-family: inherit; box-shadow: none !important; transition-duration: 0.1s; margin-top: 0rpx; } .dv-panel input::-webkit-input-placeholder { font-size: 10rpx; } .input-disabled { background-color: #f3f3f3 !important; } .dv-panel .form-item-span { vertical-align: top; color: #2d8cf0; white-space: normal; word-break: break-all; display: inline-block; width: calc(100% - 100px); /* border: 1rpx solid red; */ } #dv_select { display: inline-block; pages/modal/3200.vue
@@ -2,8 +2,8 @@ <view class="uni-page-modal-3200"> <view class="v-content"> <!-- 表头样式 --> <OIForm ref="refBaseForm" class="v-headStyle" :form="head_styledef.form" @focus="ontap" @change="onEnterChange" @click-prefix="onEnterChange" @click-suffix="onEnterChange"></OIForm> <OIForm ref="refBaseForm" class="v-headStyle" :form="head_styledef.form" @on-focus="ontap" @on-change="onEnterChange" @on-click-prefix="onEnterChange" @on-click-suffix="onEnterChange"></OIForm> <view class="v-scroll-view"> <scroll-view :scroll-top="scrollTop" :scroll-y="true" class="scroll-y" @scrolltolower="scrolltolower" @scroll="scroll"> @@ -25,8 +25,42 @@ </div> <div class="dv-panel-input" v-if="!ListHtml_Panel" :style="param.ListPage.CheckBox==true && param.ListPage.Click_View==true?'width:85%;':param.ListPage.CheckBox==false && param.ListPage.Click_View==true?'width:91%;':param.ListPage.CheckBox==true && param.ListPage.Click_View==false?'width:88%;':'width:100%;'"> <OIForm class="v-area dv-panel" :form="style.form.items" viewMode></OIForm> <uni-forms class="v-area dv-panel" label-align="right"> <view v-for="(item,index) in style.form.items" :key="index"> <!-- 栅格布局 --> <uni-row v-if="item.name == 'Layout'" :gutter="item.setting.gutter"> <uni-col :span="item.setting.spanList && item.setting.spanList[key]? item.setting.spanList[key] : 24 / item.setting.col" v-for="(col,key) in item.setting.colList" :key="key"> <uni-forms-item v-if="col != null" :label="col.labelWidth === 0 ? '' : col.label? col.label+':':''" :label-width="col.labelWidth || col.labelWidth === 0 ? col.labelWidth : 100+'px'"> <view v-if="col.disabled">{{col.value}}</view> <input class="uni-input" v-else-if="col.name=='Input' || col.name=='InputNumber'" :type="col.name=='InputNumber'?'number':'text'" v-model="col.value" :placeholder="col.placeholder" :maxlength="-1" /> <view v-else>{{col.value}}</view> </uni-forms-item> <uni-forms-item v-else label=""></uni-forms-item> </uni-col> </uni-row> <uni-forms-item v-else :label="item.labelWidth === 0 ? '' : item.label? item.label+':':''" :label-width="item.labelWidth || item.labelWidth === 0 ? item.labelWidth : 100+'px'" :style="{ textAlign: item.setting.align }"> <view v-if="item.disabled">{{item.value}}</view> <input v-else-if="item.name=='Input' || item.name=='InputNumber' " class="uni-input" :type="item.name=='InputNumber'?'number':'text'" v-model="item.value" :disabled="item.disabled" :placeholder="item.placeholder" :maxlength="-1" /> <view v-else>{{item.value}}</view> </uni-forms-item> </view> </uni-forms> </div> <div class="dv-panel-button" v-if="param.ListPage.Click_View==true"> <a @click="onViewPageClick(style)"><i class="mobox-normal-right-arrow" /></a> @@ -1916,9 +1950,37 @@ .dv-panel { background-color: #efefef; padding: 20rpx 20rpx 20rpx 0px; border-radius: 12rpx; margin-bottom: 20rpx; text-align: right; .uni-forms-item { padding-bottom: 5rpx; margin-bottom: 0; .uni-forms-item__label { height: 20px !important; padding: 0 10rpx 0 0 !important; } .uni-input { width: calc(100% - 12rpx); padding: 5rpx; border: 1px solid #d5d5d5; color: #2d8cf0; height: 20px; background: #FFF; line-height: 20px; border-radius: 6px !important; font-size: 14px; font-family: inherit; box-shadow: none !important; transition-duration: 0.1s; vertical-align: middle; } .uni-input:hover { border: 1px solid rgb(41, 121, 255); } } } .dv-listHtml-Panel, @@ -1959,47 +2021,6 @@ border-radius: 8rpx; } .dv-panel .txt_title { font-size: 34rpx; text-align: right; display: inline-block; } .dv-panel input { vertical-align: middle; display: inline-block; border: 2rpx solid #d5d5d5; width: 68%; height: 52rpx; line-height: 34rpx; background: #FFF; border-radius: 14rpx !important; color: #2d8cf0; padding: 6rpx 8rpx 8rpx; font-size: 32rpx; font-family: inherit; box-shadow: none !important; transition-duration: 0.1s; margin-top: 0rpx; } .dv-panel input::-webkit-input-placeholder { font-size: 10rpx; } .dv-panel .form-item-span { vertical-align: text-top; color: #2d8cf0; white-space: normal; word-break: break-all; display: inline-block; width: calc(100% - 100px); } .dv-panel .form-item-input { width: calc(100% - 100px); } .dv-panel-button { display: inline-block; pages/modal/3200_view.vue
@@ -12,7 +12,7 @@ </div> <!-- 自定义表单类型显示 --> <div v-if="!ViewHtml_Panel"> <OIForm :form="detail2_styledef.form.items" viewMode></OIForm> <OIForm :form="detail2_styledef.form" viewMode></OIForm> </div> </div> pages/modal/5601.vue
@@ -2,8 +2,8 @@ <view class="uni-page-modal-5601"> <!-- 表头样式 --> <OIForm ref="refBaseForm" class="v-headStyle" :form="head_styledef.form" :focusId="focusFieldId" @click="onClick" @focus="ontap" @change="onEnterChange" @click-prefix="classAttr_extButton" @click-suffix="classAttr_extButton"></OIForm> @on-click="onClick" @on-focus="ontap" @on-change="onEnterChange" @on-click-prefix="classAttr_extButton" @on-click-suffix="classAttr_extButton"></OIForm> <view class="view-content"> <!-- 码盘子界面 --> @@ -23,16 +23,53 @@ src="../../images/mobox_log_200x40.png"> </image> <checkbox-group @change="checkboxChange"> <div class="dv-panel" v-for="(style,ii) in pageData.DefList" <div class="dv-panel" v-for="(style,ii) in pageData.DefList" :key="ii" @tap="onPanelClick(ii,style.form.htmlobjId)" :id="'dvpanel'+style.form.htmlobjId" :class="style.form.htmlobjId==active_id?'bk-active':''"> <OIForm class="dv-panel-form" :form="style.form" viewMode></OIForm> <uni-forms class="dv-panel-form" label-align="right"> <view v-for="(item,index) in style.form.items" :key="index"> <!-- 栅格布局 --> <uni-row v-if="item.name == 'Layout'" :gutter="item.setting.gutter"> <uni-col :span="item.setting.spanList && item.setting.spanList[key]? item.setting.spanList[key] : 24 / item.setting.col" v-for="(col,key) in item.setting.colList" :key="key"> <uni-forms-item v-if="col != null" :label="col.labelWidth === 0 ? '' : col.label? col.label+':':''" :label-width="col.labelWidth || col.labelWidth === 0 ? col.labelWidth : 100+'px'"> <view v-if="col.disabled">{{col.value}}</view> <input class="uni-input" v-else-if="col.name=='Input' || col.name=='InputNumber'" :type="col.name=='InputNumber'?'number':'text'" v-model="col.value" :placeholder="col.placeholder" :maxlength="-1" /> <view v-else>{{col.value}}</view> </uni-forms-item> <uni-forms-item v-else label=""></uni-forms-item> </uni-col> </uni-row> <uni-forms-item v-else :label="item.labelWidth === 0 ? '' : item.label? item.label+':':''" :label-width="item.labelWidth || item.labelWidth === 0 ? item.labelWidth : 100+'px'" :style="{ textAlign: item.setting.align }"> <view v-if="item.disabled">{{item.value}}</view> <input v-else-if="item.name=='Input' || item.name=='InputNumber' " class="uni-input" :type="item.name=='InputNumber'?'number':'text'" v-model="item.value" :disabled="item.disabled" :placeholder="item.placeholder" :maxlength="-1" /> <view v-else>{{item.value}}</view> </uni-forms-item> </view> </uni-forms> <!-- <OIForm class="dv-panel-form" :form="style.form" viewMode></OIForm> --> <div class="dv-panel-button" v-if="pageData.Select_Button==true || pageData.Row_Button.length > 0"> <checkbox v-if="pageData.Select_Button==true" :model="ii" <checkbox v-if="pageData.Select_Button==true" :value="ii" :checked="style.SelBut_Checked" /> <!-- <text></text> --> <!-- <button type="primary" @click="savaItem(ii)" v-if="param.Sub_Page[0].OK_Button==true">保存</Button> --> @@ -123,6 +160,9 @@ } from "@/api/data.js" import dayjs from "dayjs"; import OIForm from '@/components/oi-form/index.vue' import OIFormItem from '@/components/oi-form/list/index.vue' import OIFormInput from '@/components/oi-form/list/input/index.vue' import OIFormInputNumber from '@/components/oi-form/list/input-number/index.vue' export default { name: "PageModal5601", @@ -131,6 +171,10 @@ }, components: { OIForm, OIFormItem, OIFormInput, OIFormInputNumber }, data() { return { @@ -152,7 +196,6 @@ selectAttrObj: {}, global_attr: [], refdatastore: [], //引用数据存储区// {attr:'G_PRJ_' + bindattr + '_ID', value:info.id} popupType: "center", check_list: {}, popupParam: {}, @@ -1163,44 +1206,23 @@ if (ele.form.objId == rowData.id) { rowData.attrs.forEach(attr => { ele.form.items.forEach(ele2 => { if (ele2.name != 'Layout') { if (ele2.fieldId == attr .attr) { ele2.value = $this .operationNumber( ele2 .value, attr .value, attr .operation if (ele2.name != 'Layout') { if (ele2.fieldId == attr.attr) { ele2.value = $this.operationNumber( ele2.value, attr.value, attr.operation ) } } else if (ele2.name == 'Layout') { ele2.setting .colList .forEach( col => { if ( col) { if (col .fieldId == attr .attr ) { col.value = $this } else if (ele2.name == 'Layout') { ele2.setting.colList.forEach(col => { if (col) { if (col.fieldId == attr.attr) { col.value = $this .operationNumber( col .value, attr .value, attr .operation col.value, attr.value, attr.operation ) } } @@ -1244,48 +1266,26 @@ } } if (bFindCondition) { rowData.attrs.forEach(attr => { ele.form.items.forEach(ele2 => { if (ele2.name != 'Layout') { if (ele2.fieldId == attr .attr) { if (ele2.name != 'Layout') { if (ele2.fieldId == attr.attr) { ele2.value = $this .operationNumber( ele2 .value, attr .value, attr .operation $this.operationNumber( ele2.value, attr.value, attr.operation ) } } else if (ele2.name == 'Layout') { ele2.setting .colList .forEach( col => { if ( col) { if (col .fieldId == attr .attr ) { } else if (ele2.name == 'Layout') { ele2.setting.colList.forEach(col => { if (col) { if (col.fieldId == attr.attr) { col.value = $this .operationNumber( col .value, attr .value, attr .operation ) $this.operationNumber( col.value, attr .value, attr .operation) } } }) @@ -1321,26 +1321,19 @@ data.row.forEach(row => { detailStyle = JSON.parse(styleStr); detailStyle.form.objId = row.id; detailStyle.form.htmlobjId = row.id ? row.id.replace(/-/g, '') .replace( '{', '').replace('}', '') : 'null'; detailStyle.form.htmlobjId = row.id ? row.id.replace(/-/g, '').replace('{', '').replace( '}', '') : 'null'; detailStyle.form.attrs = row.attrs; row.attrs.forEach(attr => { detailStyle.form.items.forEach(ele => { if (ele.name != 'Layout') { if (ele.fieldId == attr.attr) ele .value = attr.value; if (ele.fieldId == attr.attr) ele.value = attr.value; } else if (ele.name == 'Layout') { ele.setting.colList.forEach( col => { ele.setting.colList.forEach(col => { if (col) { if (col.fieldId == attr .attr) col .value = attr .value; if (col.fieldId == attr.attr) col.value = attr.value; } }); } @@ -1385,18 +1378,15 @@ cont.attrs.forEach(attr => { detailStyle.form.items.forEach(ele => { if (ele.name != 'Layout') { if (ele.fieldId == attr.attr) ele .value = attr.value; if (ele.fieldId == attr.attr) ele.value = attr.value; } else if (ele.name == 'Layout') { ele.setting.colList.forEach( col => { if (col) { if (col.fieldId == attr .attr) col .value = attr .value; attr.attr) col.value = attr.value; } }); } @@ -1406,38 +1396,18 @@ if (data.clear == false) { var isflag = true; pageData.DefList.forEach((style, index) => { if (style.form.objId == detailStyle.form .objId) { if (style.form.objId == detailStyle.form.objId) { cont.attrs.forEach(attr => { style.form.items.forEach( ele => { if (ele.name != 'Layout') { if (ele .fieldId == attr.attr) ele .value = attr.value; } else if (ele .name == 'Layout') { ele.setting .colList .forEach( col => { if ( col ) { if (col .fieldId == attr .attr ) col .value = attr .value; style.form.items.forEach(ele => { if (ele.name != 'Layout') { if (ele.fieldId == attr.attr) ele.value = attr.value; } else if (ele.name == 'Layout') { ele.setting.colList.forEach(col => { if (col) { if (col.fieldId == attr .attr) col.value = attr.value; } }); } @@ -1801,30 +1771,19 @@ } else if (action.action_type == 'set_dlg_attr_show') { var result = action.value; result.forEach(async (attr, key) => { $this.$data.head_styledef.form.items .forEach( async (ele, $this.$data.head_styledef.form.items.forEach(async (ele, index) => { //判断是否是栅格表单 if (ele.name != 'Layout') { if (ele.fieldId == attr .attr) { ele.show = attr .show; if (ele.fieldId == attr.attr) { ele.show = attr.show; } } else if (ele.name == 'Layout') { ele.setting.colList .forEach( col => { } else if (ele.name == 'Layout') { ele.setting.colList.forEach((col) => { if (col) { if (col .fieldId == attr .attr ) { col.show = attr if (col.fieldId == attr .attr) { col.show = attr .show; } } @@ -1858,62 +1817,7 @@ console.log($this.head_styledef); if (data.result) { var result = data.result; for (var i = 0; i < result.length; i++) { for (var c = 0; c < $this.$data.head_styledef.form.items .length; c++) { var attr = $this.$data.head_styledef.form.items[c]; //判断表单里是否有返回字段,没有就装载到model里,点击确定提交的时候带上这些数据 if ($this.head_styledef.form.model[result[i].attr] == undefined) { $this.head_styledef.form.model[result[i].attr] = result[i] .value; } //判断是否是栅格表单 if (attr.name != 'Layout') { if (attr.fieldId == result[i].attr) { attr.value = ''; attr.oldvalue = ''; attr.value = result[i].value; attr.oldvalue = result[i].value; $this.head_styledef.form.model[attr.fieldId] = result[i] .value; } } else if (attr.name == 'Layout') { attr.setting.colList.forEach(col => { if (col) { if (col.fieldId == result[i].attr) { col.value = ''; col.oldvalue = ''; col.value = result[i].value; col.oldvalue = result[i].value; $this.head_styledef.form.model[col .fieldId] = result[i].value; } } }); } } var length = 0; if (!$this.$data.refdatastore.filter(function(s) { return result[i].attr == s.attr }).length) { length = 1; $this.$data.refdatastore.push(result[i]); } if (length == 0) { for (var j = 0; j < $this.$data.refdatastore.length; j++) { if ($this.$data.refdatastore[j].attr == result[i] .attr) { $this.$data.refdatastore[j].value = result[i] .value; } } } } $this.setFormValues(result) } } @@ -1950,18 +1854,6 @@ attr: a, value: obj_attr[a] || "", })); if ($this.refdatastore.length > 0) { for (var i = 0; i < $this.refdatastore.length; i++) { if (!req.filter(function(s) { return $this.refdatastore[i].attr == s.name }).length) { req.push({ 'attr': $this.refdatastore[i].attr, 'value': $this.refdatastore[i].value }); } } } var extinfo = enviroment; extinfo.edit_dlg = { @@ -2469,6 +2361,7 @@ } }) $this.$set($this.pageDetail, pageIndex, pageData) console.log($this.pageDetail) }, } @@ -3036,10 +2929,6 @@ padding: 0px; margin: 0; .dv-panel-form-item { margin: 0; padding: 0px; } .uni-forms-item { padding-bottom: 5rpx; @@ -3066,15 +2955,10 @@ vertical-align: middle; } .form-item-span { vertical-align: text-top; color: #2d8cf0; white-space: normal; word-break: break-all; width: 100%; .uni-input:hover { border: 1px solid rgb(41, 121, 255); } } } @@ -3198,13 +3082,13 @@ background-color: #f3f3f3 !important; } ::v-deep .uni-row { margin-bottom: 0px; } // ::v-deep .uni-row { // margin-bottom: 0px; // } .view-tabpage ::v-deep .uni-row { margin-bottom: 5px; } // .view-tabpage ::v-deep .uni-row { // margin-bottom: 5px; // } .demo-uni-col { height: 36px; pages/modal/form/index.vue
@@ -83,7 +83,6 @@ global_attr: [], ext_info: {}, data_json: [], refdatastore: [], //引用数据存储区// {attr:'G_PRJ_' + bindattr + '_ID', value:info.id} popupType: "center", check_list: {}, popupParam: {}, @@ -1142,63 +1141,7 @@ } console.log($this.head_styledef); if (data.result) { var result = data.result; for (var i = 0; i < result.length; i++) { for (var c = 0; c < $this.$data.head_styledef.form.items .length; c++) { var attr = $this.$data.head_styledef.form.items[c]; //判断表单里是否有返回字段,没有就装载到model里,点击确定提交的时候带上这些数据 if ($this.head_styledef.form.model[result[i].attr] == undefined) { $this.head_styledef.form.model[result[i].attr] = result[i] .value; } //判断是否是栅格表单 if (attr.name != 'Layout') { if (attr.fieldId == result[i].attr) { attr.value = ''; attr.oldvalue = ''; attr.value = result[i].value; attr.oldvalue = result[i].value; $this.head_styledef.form.model[attr.fieldId] = result[i] .value; } } else if (attr.name == 'Layout') { attr.setting.colList.forEach(col => { if (col) { if (col.fieldId == result[i].attr) { col.value = ''; col.oldvalue = ''; col.value = result[i].value; col.oldvalue = result[i].value; $this.head_styledef.form.model[col .fieldId] = result[i].value; } } }); } } var length = 0; if (!$this.$data.refdatastore.filter(function(s) { return result[i].attr == s.attr }).length) { length = 1; $this.$data.refdatastore.push(result[i]); } if (length == 0) { for (var j = 0; j < $this.$data.refdatastore.length; j++) { if ($this.$data.refdatastore[j].attr == result[i] .attr) { $this.$data.refdatastore[j].value = result[i] .value; } } } } $this.setFormValues(data.result) } } @@ -1235,18 +1178,7 @@ attr: a, value: obj_attr[a] || "", })); if ($this.refdatastore.length > 0) { for (var i = 0; i < $this.refdatastore.length; i++) { if (!req.filter(function(s) { return $this.refdatastore[i].attr == s.name }).length) { req.push({ 'attr': $this.refdatastore[i].attr, 'value': $this.refdatastore[i].value }); } } } let global_attr = Base64.encode(JSON.stringify(this.global_attr)) let data_json = Base64.encode(JSON.stringify(this.data_json)) let ext_info = Base64.encode(JSON.stringify(this.ext_info)) store/index.js
File was deleted store/modules/app.js
File was deleted store/modules/user.js
File was deleted