| | |
| | | <template> |
| | | <view class="uni-page-modal-small-wnd-line"> |
| | | |
| | | |
| | | |
| | | <uni-forms ref="baseForm" :modelValue="form" :label-position="control_style=='左右布局' ? 'left':'top'" |
| | | :label-align="control_style=='左右布局' ? 'right':'left'" :label-width="titleWdith"> |
| | | <view class="uni-group-item" v-for="(group,index) in show_style" :key="group.attrgroup_name"> |
| | |
| | | v-for="(attr,i) in group.attrs" :key="`attr-${index}-${i}`"> |
| | | <uni-forms-item :label="attrLabel(attr)" :required="attrRequired(attr)" :error="errTip[attr.attr]"> |
| | | <view class="input-wrapper"> |
| | | <view class="uni-panel-ext-button" v-if="attr.ext_button==true"> |
| | | <input class="uni-panel-input" type="text" v-model="visible" :disabled="disabled" @on-blur="onChange" /> |
| | | <view class="uni-panel-right-ico"> |
| | | <a @click="onClickExtButton"><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | </view> |
| | | </view> |
| | | <input v-if="attr.type == 'input'" :ref="`ref${attr.attr}`" v-model="form[attr.attr]" |
| | | :ref="`ref${attr.attr}`" :disabled="!attr.edit" @on-blur="onChange(attr)" /> |
| | | <textarea v-else-if="attr.type == 'textarea'" :ref="`ref${attr.attr}`" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import Base64 from '../../components/js-base64/base64.js' |
| | | import { |
| | | Base64 |
| | | } from '@/js/Base64.js'; |
| | | import pickerAddress from '../../js/pickerAddress/pickerAddress.vue' |
| | | import utils from "@/js/utils.js" |
| | | export default { |
| | |
| | | }); |
| | | }, |
| | | methods: { |
| | | setData(obj) { |
| | | let that = this; |
| | | let keys = []; |
| | | let val, data; |
| | | |
| | | Object.keys(obj).forEach(function(key) { |
| | | keys = key.split("."); |
| | | val = obj[key]; |
| | | data = that.$data; |
| | | keys.forEach(function(key2, index) { |
| | | if (index + 1 == keys.length) { |
| | | that.$set(data, key2, val); |
| | | } else { |
| | | if (!data[key2]) { |
| | | that.$set(data, key2, {}); |
| | | } |
| | | } |
| | | data = data[key2]; |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | isValid() { |
| | | let flag = true; |
| | | this.show_style.forEach((group) => { |
| | |
| | | this.showError(ex); |
| | | } |
| | | }, |
| | | onClickExtButton(gindex, index) {}, |
| | | onClickExtButton(gindex, index) { |
| | | |
| | | }, |
| | | onClickAddPsn(gindex, index) {}, |
| | | onClickAddPrj(gindex, index) {}, |
| | | |
| | |
| | | </script> |
| | | |
| | | |
| | | <style lang="less"> |
| | | <style lang="scss"> |
| | | .uni-page-modal-small-wnd-line { |
| | | width: 100%; |
| | | display: flex; |