cuiqian2004
2025-03-20 c094d4a32180130de0c26c75a5abc414128a5ec1
pages/modal/5601.vue
@@ -1,122 +1,10 @@
<template>
   <view class="uni-page-modal-5601">
      <!-- 表头样式 -->
      <uni-forms ref="baseForm" label-align="right">
         <view v-for="(item,index) in head_styledef.form.items" :key="index" class="v-head-style">
            <!-- 普通布局 -->
            <uni-forms-item v-if="item.name != 'Layout'" :label="item.label ?item.label +':':'' "
               :label-width="item.labelWidth+'px'">
               <uni-data-picker v-if="item.name=='Select'" :class="item.disabled?'input-disabled':''"
                  v-model="item.value" :localdata="item.useDict ? item.dict : item.selections"
                  @change="onEnterChange(item)" :readonly="item.disabled" :clear-icon="false"
                  :popup-title="item.label"></uni-data-picker>
               <view class="input-wrapper" v-if="item.name=='Input' || item.name=='InputNumber'">
                  <text v-if="item.setting.prefix" class="uni-icon" :class="[item.setting.prefix]"
                     @click="classAttr_extButton(item)">&#xe568;</text>
                  <input class="uni-input" :class="item.disabled?'input-disabled':''"
                     :style="{'padding-left':item.setting.prefix?0 : '8rpx','right':item.setting.suffix?0 : '8rpx'}"
                     :type="item.name=='Input'?'text':'number'" v-model="item.value" :disabled="item.disabled"
                     :placeholder="item.placeholder" :focus="focusFieldId == item.fieldId" @focus="ontap(item)"
                     @click="onClick(item)" @keyup.enter="onEnterChange(item)" @blur="onEnterChange(item)"
                     :maxlength="-1" />
                  <text v-if="item.setting.suffix" class="uni-icon" :class="[item.setting.suffix]"
                     @click="classAttr_extButton(item)"></text>
               </view>
               <!-- 复选框 -->
               <checkbox-group v-if="item.name=='Checkbox'" :class="item.disabled?'input-disabled':''"
                  :disabled="item.disabled" @change="onCheckBoxValue" :data-attr="item.fieldId"
                  :data-index="index">
                  <label v-for="(item2) in item.selections" :key="item2.value">
                     <checkbox :value="item2.value" :checked="item.value.includes(item2.value)" />
                     <text>{{item2.label}}</text>
                  </label>
               </checkbox-group>
               <!-- 单选框 -->
               <radio-group v-if="item.name=='Radio'" :class="item.disabled?'input-disabled':''"
                  :disabled="item.disabled" @change="onRadioBoxValue" :data-attr="item.fieldId"
                  :data-index="index">
                  <label v-for="(item2) in item.selections" :key="item2.value">
                     <radio :value="item2.value" :checked="item2.value === item.value" />
                     <text>{{item2.label}}</text>
                  </label>
               </radio-group>
               <!-- Switch开关 -->
               <switch class="input-switch" v-if="item.name=='Switch'" :class="item.disabled?'input-disabled':''"
                  :disabled="item.disabled" v-model="item.value" @change="onEnterChange(item)" />
               <OIDatePicker v-if="item.name=='DatePicker'" :class="item.disabled?'input-disabled':''"
                  :disabled="item.disabled" v-model="item.value" :placeholder="item.placeholder"
                  :defaultToday="item.setting.defaultToday" :format="item.setting.format"
                  @change="onModelValue(item)" />
               <OIDatePickerRange v-if="item.name=='DatePickerRange'" :rangeSeparator="item.setting.separator"
                  :format="item.setting.format" :class="item.disabled?'input-disabled':''"
                  :disabled="item.disabled" v-model="item.value" :placeholder="item.placeholder"
                  @change="onModelValue(item)" />
               <OITimePicker v-if="item.name=='TimePicker'" :class="item.disabled?'input-disabled':''"
                  :disabled="item.disabled" v-model="item.value" :placeholder="item.placeholder"
                  @change="onModelValue(item)" />
      <OIForm ref="refBaseForm" class="v-headStyle" :form="head_styledef.form" :focusId="focusFieldId"
         @on-click="onClick" @on-focus="ontap" @on-change="onEnterChange" @on-click-prefix="classAttr_extButton"
         @on-click-suffix="classAttr_extButton"></OIForm>
            </uni-forms-item>
            <!-- 栅格布局 -->
            <uni-row v-else :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">
                  <uni-forms-item v-if="col!=null" :label="col.label ? col.label +':':''"
                     :label-width="col.labelWidth+'px'">
                     <uni-data-picker v-if="col.name=='Select'" :class="col.disabled?'input-disabled':''"
                        v-model="col.value" :localdata="col.useDict ? col.dict : col.selections"
                        @change="onEnterChange(col)" :readonly="col.disabled" :clear-icon="false"
                        :popup-title="col.label"></uni-data-picker>
                     <view class="input-wrapper" v-if="col.name=='Input' || col.name=='InputNumber'">
                        <text v-if="col.setting.prefix" class="uni-icon" :class="[col.setting.prefix]"
                           @click="classAttr_extButton(col)">&#xe568;</text>
                        <input class="uni-input" :class="col.disabled?'input-disabled':''"
                           :style="{'padding-left':col.setting.prefix?0 : '8px','right':col.setting.suffix?0 : '8px'}"
                           :type="col.name=='Input'?'text':'number'" v-model="col.value"
                           :disabled="col.disabled" :placeholder="col.placeholder"
                           :focus="focusFieldId == col.fieldId" @focus="ontap(col)" @click="onClick(col)"
                           @keyup.enter="onEnterChange(col)" @blur="onEnterChange(col)" :maxlength="-1" />
                        <text v-if="col.setting.suffix" class="uni-icon" :class="[col.setting.suffix]"
                           @click="classAttr_extButton(col)"></text>
                     </view>
                     <!-- 复选框 -->
                     <checkbox-group v-if="col.name=='Checkbox'" :class="col.disabled?'input-disabled':''"
                        :disabled="col.disabled" @change="onCheckBoxValue" :data-attr="col.fieldId"
                        :data-index="index" :data-iindex="key">
                        <label v-for="(col2) in col.selections" :key="col2.value">
                           <checkbox :value="col2.value" :checked="col.value.includes(col2.value)" />
                           <text>{{col2.label}}</text>
                        </label>
                     </checkbox-group>
                     <!-- 单选框 -->
                     <radio-group v-if="col.name=='Radio'" :class="col.disabled?'input-disabled':''"
                        :disabled="col.disabled" @change="onRadioBoxValue" :data-attr="col.fieldId"
                        :data-index="index" :data-iindex="key">
                        <label v-for="(col2) in col.selections" :key="col2.value">
                           <radio :value="col2.value" :checked="col2.value === col.value" />
                           <text>{{col2.label}}</text>
                        </label>
                     </radio-group>
                     <!-- Switch开关 -->
                     <switch v-if="col.name=='Switch'" :class="col.disabled?'input-disabled':''"
                        :disabled="col.disabled" v-model="col.value" @change="onEnterChange(col)" />
                     <OIDatePicker v-if="col.name=='DatePicker'" :class="col.disabled?'input-disabled':''"
                        :disabled="col.disabled" v-model="col.value" :placeholder="col.placeholder"
                        :defaultToday="col.setting.defaultToday" :format="col.setting.format"
                        @change="onModelValue(col)" />
                     <OIDatePickerRange v-if="col.name=='DatePickerRange'"
                        :rangeSeparator="col.setting.separator" :format="col.setting.format"
                        :class="col.disabled?'input-disabled':''" :disabled="col.disabled" v-model="col.value"
                        :placeholder="col.placeholder" @change="onModelValue(col)" />
                     <OITimePicker v-if="col.name=='TimePicker'" :class="col.disabled?'input-disabled':''"
                        :disabled="col.disabled" v-model="col.value" :placeholder="col.placeholder"
                        @change="onModelValue(col)" />
                  </uni-forms-item>
                  <uni-forms-item v-else label=""></uni-forms-item>
               </uni-col>
            </uni-row>
         </view>
      </uni-forms>
      <view class="view-content">
         <!-- 码盘子界面 -->
         <view v-if="param.Show_Welcom_Page==false" class="uni-panel-content">
@@ -135,47 +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':''">
                              <uni-forms class="dv-panel-form" label-align="right">
                                 <div class="dv-panel-form-item" v-for="(item,index) in style.form.items">
                                    <!-- 普通布局 -->
                                    <uni-forms-item v-if="item.name != 'Layout'"
                                       :label="item.label ?item.label +':':'' "
                                       :label-width="item.labelWidth+'px'">
                                       <span class="form-item-span"
                                          v-if="item.disabled">{{item.value}}</span>
                                       <input v-else class="uni-input"
                                          :type="item.name=='InputNumber'?'number':'text'"
                                          v-model="item.value" :disabled="item.disabled"
                                          :placeholder="item.placeholder" :maxlength="-1" />
                                    </uni-forms-item>
                                 <view v-for="(item,index) in style.form.items" :key="index">
                                    <!-- 栅格布局 -->
                                    <uni-row v-else :gutter="item.setting.gutter">
                                    <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">
                                          <uni-forms-item v-if="col!=null"
                                             :label="col.label ? col.label +':':''"
                                             :label-width="col.labelWidth+'px'">
                                             <span class="form-item-span"
                                                v-if="col.disabled">{{col.value}}</span>
                                             <input v-else class="uni-input"
                                          :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" :disabled="col.disabled"
                                                :placeholder="col.placeholder" :maxlength="-1" />
                                                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>
                                 </div>
                                    <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> -->
@@ -265,9 +159,10 @@
      runCustomEvent,
   } from "@/api/data.js"
   import dayjs from "dayjs";
   import OIDatePicker from '@/components/oi-date-time-picker/oi-date-picker.vue'
   import OIDatePickerRange from '@/components/oi-date-time-picker/oi-date-picker-range.vue'
   import OITimePicker from '@/components/oi-date-time-picker/oi-time-picker.vue'
   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",
@@ -275,9 +170,11 @@
         Base64,
      },
      components: {
         OIDatePicker,
         OIDatePickerRange,
         OITimePicker
         OIForm,
         OIFormItem,
         OIFormInput,
         OIFormInputNumber
      },
      data() {
         return {
@@ -299,7 +196,6 @@
            selectAttrObj: {},
            global_attr: [],
            refdatastore: [], //引用数据存储区// {attr:'G_PRJ_' + bindattr + '_ID', value:info.id}
            popupType: "center",
            check_list: {},
            popupParam: {},
@@ -773,10 +669,11 @@
               console.log(result.decodedata);
               item.value = result.decodedata;
               var $this = this;
               if (item.oldvalue != item.value && item.value.trim() != "") {
                  item.oldvalue = item.value;
               let newVal = item.value.trim()
               if (newVal) {
                  item.oldvalue = newVal;
                  var attr = item.fieldId;
                  this.head_styledef.form.model[attr] = item.value;
                  this.head_styledef.form.model[attr] = newVal;
                  var onChangeEvent = item.bind.onChangeEvent; //内容变化后事件
                  var onSuffixClickCallbackEvent = item.bind
                     .onSuffixClickCallbackEvent; //后图标点击事件
@@ -787,36 +684,60 @@
                  if (onChangeEvent?.id) { //内容变化后事件
                     $this.onChange(onChangeEvent);
                  }
                  if (item.value) { //第一个输入框不为空
                     //初始化,下个输入框focus属性
                     var findd = false
                     for (let i in $this.head_styledef.form.items) {
                        const ele = $this.head_styledef.form.items[i]
                        if (ele.name != "Layout") {
                           if (ele.name == 'Input' || ele.name ==
                              'InputNumber') {
                              if (attr == ele.fieldId) {
                                 findd = true
                              } else {
                                 if (findd) {
                                    $this.setData({
                                       focusFieldId: ele.fieldId
                                    })
                                    break
                                 }
                  //初始化,下个输入框focus属性
                  var findd = false
                  for (let i in $this.head_styledef.form.items) {
                     const ele = $this.head_styledef.form.items[i]
                     if (ele.name != "Layout") {
                        if (ele.name == 'Input' || ele.name ==
                           'InputNumber') {
                           if (attr == ele.fieldId) {
                              findd = true
                           } else {
                              if (findd) {
                                 $this.setData({
                                    focusFieldId: ele.fieldId
                                 })
                                 break
                              }
                           }
                        } else {
                           if (findd) {
                              let curIndex = ele.setting.colList.findIndex((
                                 col, index2, arr) => {
                                 return (col.name == 'Input' || col
                                    .name == 'InputNumber');
                        }
                     } else {
                        if (findd) {
                           let curIndex = ele.setting.colList.findIndex((
                              col, index2, arr) => {
                              return (col.name == 'Input' || col
                                 .name == 'InputNumber');
                           })
                           if (curIndex > -1) {
                              $this.setData({
                                 focusFieldId: ele.setting
                                    .colList[curIndex]
                                    .fieldId
                              })
                              if (curIndex > -1) {
                              break
                           }
                        } else {
                           let curIndex = ele.setting.colList.findIndex((
                              col, index2, arr) => {
                              return attr == col.fieldId;
                           })
                           if (curIndex > -1) {
                              findd = true
                              let curIndex2 = ele.setting.colList
                                 .findIndex((col, index2, arr) => {
                                    return (col.name == 'Input' ||
                                          col.name ==
                                          'InputNumber') &&
                                       index2 >
                                       curIndex;
                                 })
                              if (curIndex2 > -1) {
                                 $this.setData({
                                    focusFieldId: ele.setting
                                       .colList[curIndex]
@@ -824,47 +745,27 @@
                                 })
                                 break
                              }
                           } else {
                              let curIndex = ele.setting.colList.findIndex((
                                 col, index2, arr) => {
                                 return attr == col.fieldId;
                              })
                              if (curIndex > -1) {
                                 findd = true
                                 let curIndex2 = ele.setting.colList
                                    .findIndex((col, index2, arr) => {
                                       return (col.name == 'Input' ||
                                             col.name ==
                                             'InputNumber') &&
                                          index2 >
                                          curIndex;
                                    })
                                 if (curIndex2 > -1) {
                                    $this.setData({
                                       focusFieldId: ele.setting
                                          .colList[curIndex]
                                          .fieldId
                                    })
                                    break
                                 }
                              }
                           }
                        }
                     }
                  }
               }
            })
         },
         onEnterChange(item) { //回车,点击按钮,取消节点事件
            console.log(item);
            if (item.oldvalue != item.value && item.value.trim() != "") {
               item.oldvalue = item.value;
            let newVal = item.value
            if (typeof item.value == "string") {
               newVal = item.value.trim()
               if (!newVal)
                  return
            }
            if (item.oldvalue != newVal) {
               item.oldvalue = newVal;
               var attr = item.fieldId;
               this.head_styledef.form.model[attr] = item.value;
               this.head_styledef.form.model[attr] = newVal;
               var onChangeEvent = item.bind.onChangeEvent; //内容变化后事件
               if (onChangeEvent?.id) { //内容变化后事件
@@ -873,67 +774,7 @@
            }
         },
         onCheckBoxValue(e) { //绑定Model值
            let values = e.detail.value || []
            const item = this.head_styledef.form.items[e.currentTarget?.dataset?.index || 0]
            if (item?.setting?.colList) {
               const col = item.setting.colList[e.currentTarget?.dataset?.iindex || 0]
               if (col) {
                  col.value = values
                  let attr = col.fieldId;
                  this.head_styledef.form.model[attr] = col.value;
                  var onChangeEvent = col.bind.onChangeEvent; //内容变化后事件
                  if (onChangeEvent?.id) { //内容变化后事件
                     this.onChange(onChangeEvent);
                  }
                  return
               }
            } else {
               if (item) {
                  item.value = values
                  let attr = item.fieldId;
                  this.head_styledef.form.model[attr] = item.value;
                  var onChangeEvent = item.bind.onChangeEvent; //内容变化后事件
                  if (onChangeEvent?.id) { //内容变化后事件
                     this.onChange(onChangeEvent);
                  }
               }
            }
         },
         onRadioBoxValue(e) { //绑定Model值
            let values = e.detail.value || ""
            const item = this.head_styledef.form.items[e.currentTarget?.dataset?.index || 0]
            if (item?.setting?.colList) {
               const col = item.setting.colList[e.currentTarget?.dataset?.iindex || 0]
               if (col) {
                  col.value = values
                  let attr = col.fieldId;
                  this.head_styledef.form.model[attr] = col.value;
                  var onChangeEvent = col.bind.onChangeEvent; //内容变化后事件
                  if (onChangeEvent?.id) { //内容变化后事件
                     this.onChange(onChangeEvent);
                  }
                  return
               }
            } else {
               if (item) {
                  item.value = values
                  let attr = item.fieldId;
                  this.head_styledef.form.model[attr] = item.value;
                  var onChangeEvent = item.bind.onChangeEvent; //内容变化后事件
                  if (onChangeEvent?.id) { //内容变化后事件
                     this.onChange(onChangeEvent);
                  }
               }
            }
         },
         onModelValue(item) {
            var attr = item.fieldId;
            this.head_styledef.form.model[attr] = item.value;
         },
         classAttr_extButton(item) {
            var onSuffixClickCallbackEvent = item.bind.onSuffixClickCallbackEvent; //后图标点击事件
            var onSuffixClickEvent = item.bind.onSuffixClickEvent; //后图标点击回调
@@ -1195,12 +1036,15 @@
                              } else if (item.action_type == "clear_subpage_rows") {
                                 var value = item.value;
                                 const pageData = $this.pageDetail.find((page) => {
                                 const pageIndex = $this.pageDetail.findIndex((page) => {
                                    return value.page_name == page.Name;
                                 });
                                 if (pageData) {
                                 if (pageIndex > -1) {
                                    const pageData = $this.pageDetail[pageIndex]
                                    pageData.DefList = []
                                    pageData.ExtData = {}
                                    $this.$set(this.pageDetail, pageIndex, pageData)
                                 }
                              } else if (item.action_type == "set_dlg_current_edit_attr") {
@@ -1328,9 +1172,12 @@
            if (JSON.stringify(value.row) == '{}') {
               return;
            }
            const pageData = this.pageDetail.find((page) => {
            const pageIndex = $this.pageDetail.findIndex((page, index2, arr) => {
               return value.page_name == page.Name;
            });
            })
            if (pageIndex < 0)
               return
            const pageData = $this.pageDetail[pageIndex]
            if (pageData?.DefList) //判断返回的action的page_name是否是待分拣//清除面板中指定id的数据
            {
               value.row.forEach((row) => {
@@ -1341,12 +1188,12 @@
                  });
               });
            }
            $this.$set(this.pageDetail, pageIndex, pageData)
         },
         //更新分页签中的列表项内容
         viewActionSetRow(value) {
            const $this = this
            const pageIndex = $this.pageDetail.findIndex((
               page, index2, arr) => {
            const pageIndex = $this.pageDetail.findIndex((page, index2, arr) => {
               return value.page_name == page.Name;
            })
            if (pageIndex < 0)
@@ -1359,48 +1206,27 @@
                     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
                                             )
                                       }
                                    }
                                 })
                              }
                           });
                        });
@@ -1440,51 +1266,29 @@
                        }
                     }
                     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)
                                       }
                                    }
                                 })
                              }
                           });
                        });
@@ -1517,28 +1321,21 @@
               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;
                              }
                           });
                        }
                     });
                  });
@@ -1581,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;
                                 }
                              });
                        }
@@ -1602,42 +1396,22 @@
                  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;
                        }
@@ -1651,7 +1425,7 @@
               });
            }
            $this.$set(this.pageDetail, pageIndex, pageData)
         },
         setFormValues(attrs) {
            const head_styledef = this.head_styledef
@@ -1997,36 +1771,25 @@
                        } 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));
@@ -2054,63 +1817,8 @@
                  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 => {
@@ -2146,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 = {
@@ -2665,6 +2361,7 @@
                        }
                     })
                     $this.$set($this.pageDetail, pageIndex, pageData)
                     console.log($this.pageDetail)
                  },
               }
@@ -2874,9 +2571,7 @@
                        //   uni.showModal({title:this.translateSys("tip"),content:JSON.stringify(result.action),showCancel:false,confirmText:this.translateSys("cancel")});
                        result.action.forEach(item => {
                           if (item.action_type ==
                              "insert_subtable_page_row"
                           ) { //码盘中
                           if (item.action_type == "insert_subtable_page_row") { //码盘中
                              var value = item.value;
                              //加载已经码盘数据
                              $this.viewAceionRow(value);
@@ -2952,12 +2647,15 @@
                           } else if (item.action_type == "clear_subpage_rows") {
                              var value = item.value;
                              const pageData = $this.pageDetail.find((page) => {
                              const pageIndex = $this.pageDetail.findIndex((page) => {
                                 return value.page_name == page.Name;
                              });
                              if (pageData) {
                              if (pageIndex > -1) {
                                 const pageData = $this.pageDetail[pageIndex]
                                 pageData.DefList = []
                                 pageData.ExtData = {}
                                 $this.$set(this.pageDetail, pageIndex, pageData)
                              }
                           } else if (item.action_type == "set_dlg_current_edit_attr") {
                              if ($this.focusOldFieldId == item.value)
@@ -3231,10 +2929,6 @@
            padding: 0px;
            margin: 0;
            .dv-panel-form-item {
               margin: 0;
               padding: 0px;
            }
            .uni-forms-item {
               padding-bottom: 5rpx;
@@ -3261,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);
               }
            }
         }
@@ -3393,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;