| | |
| | | <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: { |
| | |
| | | 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> |
| | |
| | | this.model[this.data.fieldId] = val |
| | | } |
| | | this.data.value = val |
| | | this.$emit("change", val) |
| | | this.$emit("on-change", val) |
| | | }, |
| | | |
| | | } |
| | |
| | | <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> |
| | |
| | | }, |
| | | 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> |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | .oi-form-item-view { |
| | | .uni-forms-item { |
| | | padding-bottom: 5rpx; |
| | |
| | | <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> |
| | | |
| | |
| | | }, |
| | | 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; |
| | | } |
| | |
| | | transition-duration: 0.1s; |
| | | vertical-align: middle; |
| | | } |
| | | } |
| | | .oi-form-input-number:hover { |
| | | border: 1px solid rgb(41, 121, 255); |
| | | |
| | | .oi-input-number:hover { |
| | | border: 1px solid rgb(41, 121, 255); |
| | | } |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | 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") |
| | | }, |
| | | } |
| | | }; |
| | |
| | | }, |
| | | methods: { |
| | | onChange(e) { |
| | | this.$emit("change", e) |
| | | this.$emit("on-change", e) |
| | | }, |
| | | |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | onChange(e) { |
| | | this.$emit("change", e) |
| | | this.$emit("on-change", e) |
| | | }, |
| | | |
| | | |
| | |
| | | <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> |
| | |
| | | }, |
| | | 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) |
| | | }, |
| | | |
| | | |
| | |
| | | import Vue from 'vue' |
| | | import App from './App' |
| | | import store from "./store"; |
| | | // i18n |
| | | import messages from './locale' |
| | | import VueI18n from 'vue-i18n' |
| | |
| | | |
| | | 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, |
| | | }) |
| | |
| | | "name" : "MoboxPDA", |
| | | "appid" : "__UNI__56D451E", |
| | | "description" : "", |
| | | "versionName" : "1.1.48", |
| | | "versionCode" : 1148, |
| | | "versionName" : "1.1.50", |
| | | "versionCode" : 1150, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | |
| | | <a @tap="classAttr_extButton(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <input |
| | | <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"> |
| | |
| | | <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"> |
| | |
| | | </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'"> |
| | |
| | | <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"> |
| | |
| | | <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"> |
| | |
| | | <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> |
| | |
| | | } |
| | | } |
| | | |
| | | 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); |
| | |
| | | right: 30rpx; |
| | | font-size: 60rpx; |
| | | } |
| | | |
| | | .input-disabled { |
| | | background-color: #f3f3f3 !important; |
| | | } |
| | | |
| | | input::-webkit-input-placeholder { |
| | | font-size: 12rpx; |
| | | } |
| | |
| | | padding: 20rpx; |
| | | line-height: 1.5; |
| | | // background: #fff; |
| | | // border: 1px solid #dcdee2; |
| | | // border: 1px solid #dcdee2; |
| | | // color: #000; |
| | | background: #fff; |
| | | color: #000; |
| | |
| | | <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"> |
| | |
| | | const $this = this; |
| | | //console.log("onScanValue", item); |
| | | item.value = value |
| | | let newVal = item.value |
| | | let newVal = item.value |
| | | if (typeof item.value == "string") { |
| | | newVal = item.value.trim() |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | |
| | | 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) { |
| | |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <a class="class_attr_add_ref"><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" |
| | | disabled="true" :maxlength="-1"> |
| | | disabled="true" :maxlength="-1"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </p> |
| | | <input type="text" class="attr_field" :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"> |
| | | disabled="true" :maxlength="-1"> |
| | | <div class="text-right2" v-if="attr.Type=='引用对象(单个)'|| attr.Type=='obj-ref'"> |
| | | <a @tap="classAttr_AddRef" :data-classid="attr.RelCls[0].id" |
| | | :data-classname="attr.RelCls[0].name"><i class="ace-icon fa fa-plus-circle"></i></a> |
| | |
| | | <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" |
| | |
| | | <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" |
| | |
| | | <!-- 左右布局 --> |
| | | <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> |
| | |
| | | <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" |
| | |
| | | <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" |
| | |
| | | <uni-popup class="view-popup" ref="popup" background-color="#fff" @change="popupChange"> |
| | | <view class="popup-header">{{check_list.title}}</view> |
| | | <view class="popup-content" :class="{ 'popup-height': popupType === 'left' || popupType === 'right' }" |
| | | :style="{'width':check_list.width?check_list.width+'px':'375rpx','height':check_list.height?check_list.height+'px':popupType =='center'?'60vh':'88vh'}"> |
| | | <view class="popup-cont" |
| | | :style="{'height':check_list.height?check_list.height-45+'px':popupType =='center'?'50vh':'80vh'}"> |
| | | :style="{'width':check_list.width?check_list.width+'px':'375rpx','height':check_list.height?check_list.height+'px':popupType =='center'?'60vh':'88vh'}"> |
| | | <view class="popup-cont" |
| | | :style="{'height':check_list.height?check_list.height-45+'px':popupType =='center'?'50vh':'80vh'}"> |
| | | <view class="view_popup_CheckList" v-for="(item,index) in check_list.items"> |
| | | <checkbox-group class="check_list" @change="checkChange" :data-ischeck="item.check" |
| | | :data-index="index" :style="{'margin-left': '10rpx'}"> |
| | |
| | | let that = this; |
| | | let keys = []; |
| | | let val, data; |
| | | |
| | | |
| | | Object.keys(obj).forEach(function(key) { |
| | | keys = key.split("."); |
| | | val = obj[key]; |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | |
| | | async loadData() { |
| | | //主数据类获取 |
| | | const param = this.param |
| | |
| | | } |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | 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 |
| | | ] |
| | |
| | | } |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | 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 == |
| | |
| | | margin-top: 50rpx; |
| | | padding: 20rpx; |
| | | line-height: 1.5; |
| | | /* background: #27A6E1; |
| | | /* background: #27A6E1; |
| | | border: none; |
| | | color: #fff; */ |
| | | background: #fff; |
| | |
| | | margin-top: 50rpx; |
| | | padding: 15rpx; |
| | | line-height: 1.5; |
| | | /* background: #27A6E1; |
| | | /* background: #27A6E1; |
| | | border: none; |
| | | color: #fff; */ |
| | | background: #fff; |
| | |
| | | <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> |
| | |
| | | <!-- 从数据显示详情区 --> |
| | | <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> |
| | |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | item.value = result.decodedata |
| | | let newVal = item.value |
| | | let newVal = item.value |
| | | if (typeof item.value == "string") { |
| | | newVal = item.value.trim() |
| | | } |
| | |
| | | //子数据类扫码查询数据 |
| | | if (isflag) { |
| | | uni.hideKeyboard(); |
| | | this.$data.scanCodeVal =newVal; |
| | | this.$data.scanCodeVal = newVal; |
| | | var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID; |
| | | if (eventid) { |
| | | //主数据类属性 |
| | |
| | | } |
| | | |
| | | } |
| | | 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; |
| | |
| | | } |
| | | } |
| | | } |
| | | 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 || []; |
| | |
| | | /* 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; |
| | |
| | | <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"> |
| | |
| | | </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> |
| | |
| | | .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, |
| | |
| | | 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; |
| | |
| | | </div> |
| | | <!-- 自定义表单类型显示 --> |
| | | <div v-if="!ViewHtml_Panel"> |
| | | <OIForm :form="detail2_styledef.form.items" viewMode></OIForm> |
| | | <OIForm :form="detail2_styledef.form" viewMode></OIForm> |
| | | |
| | | </div> |
| | | </div> |
| | |
| | | <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"> |
| | | <!-- 码盘子界面 --> |
| | |
| | | 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> --> |
| | |
| | | } 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", |
| | |
| | | }, |
| | | components: { |
| | | OIForm, |
| | | OIFormItem, |
| | | OIFormInput, |
| | | OIFormInputNumber |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | selectAttrObj: {}, |
| | | |
| | | global_attr: [], |
| | | refdatastore: [], //引用数据存储区// {attr:'G_PRJ_' + bindattr + '_ID', value:info.id} |
| | | popupType: "center", |
| | | check_list: {}, |
| | | popupParam: {}, |
| | |
| | | const pageData = $this.pageDetail[pageIndex] |
| | | pageData.DefList = [] |
| | | pageData.ExtData = {} |
| | | |
| | | |
| | | $this.$set(this.pageDetail, pageIndex, pageData) |
| | | } |
| | | |
| | |
| | | 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 |
| | | .operationNumber( |
| | | col |
| | | .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 |
| | | .operationNumber( |
| | | col.value, |
| | | attr.value, |
| | | attr.operation |
| | | ) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | }); |
| | |
| | | } |
| | | } |
| | | 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 |
| | | ) { |
| | | col.value = |
| | | $this |
| | | .operationNumber( |
| | | col |
| | | .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.operationNumber( |
| | | col.value, attr |
| | | .value, attr |
| | | .operation) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | }); |
| | |
| | | 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 => { |
| | | if (col) { |
| | | if (col.fieldId == |
| | | attr |
| | | .attr) col |
| | | .value = attr |
| | | .value; |
| | | } |
| | | }); |
| | | ele.setting.colList.forEach(col => { |
| | | if (col) { |
| | | if (col.fieldId == attr.attr) |
| | | col.value = attr.value; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | |
| | | 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; |
| | | } |
| | | }); |
| | | } |
| | |
| | | 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; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | isflag = false; |
| | | } |
| | |
| | | } 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, |
| | | index) => { |
| | | //判断是否是栅格表单 |
| | | if (ele.name != 'Layout') { |
| | | if (ele.fieldId == attr |
| | | $this.$data.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) { |
| | | ele.show = 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)); |
| | |
| | | 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) |
| | | } |
| | | } |
| | | } |
| | | |
| | | }).catch(ex => { |
| | |
| | | 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 = { |
| | |
| | | } |
| | | }) |
| | | $this.$set($this.pageDetail, pageIndex, pageData) |
| | | console.log($this.pageDetail) |
| | | |
| | | }, |
| | | } |
| | |
| | | padding: 0px; |
| | | margin: 0; |
| | | |
| | | .dv-panel-form-item { |
| | | margin: 0; |
| | | padding: 0px; |
| | | } |
| | | |
| | | .uni-forms-item { |
| | | padding-bottom: 5rpx; |
| | |
| | | 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); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | global_attr: [], |
| | | ext_info: {}, |
| | | data_json: [], |
| | | refdatastore: [], //引用数据存储区// {attr:'G_PRJ_' + bindattr + '_ID', value:info.id} |
| | | popupType: "center", |
| | | check_list: {}, |
| | | popupParam: {}, |
| | |
| | | } |
| | | 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) |
| | | } |
| | | } |
| | | |
| | |
| | | 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)) |