

<script>
/* eslint-disable */
// sd-skip-auto-import
import runtimeUtil from"./runtime-util";import util from"./util";import components from"./_import-components/sd-mobile-render-import";var _render=function e(){var t=this,r=t._self._c;return r("div",{class:t.$style.wrapper},[r("div",{class:t.$style.title},[t._v(t._s(t.formProps.tableTxt))]),r("a-tabs",{class:t.$style.tabs,attrs:{"active-key":"1"}},[r("a-tab-pane",{key:"1",attrs:{tab:"表单"}}),r("a-tab-pane",{key:"2",attrs:{tab:"流转"}}),r("a-tab-pane",{key:"3",attrs:{tab:"关联文件"}})],1),r("div",{class:t.$style.form},[r("sd-form",{attrs:{"init-values":t.fields}},t._l(t.fieldInfo,(function(e){return r("div",{key:e.name,class:{[t.$style.item]:true,[t.$style.readonly]:e.readonly,[t.$style.hideLabel]:e.hideLabel}},[!e.hideLabel?r("div",{class:{[t.$style.label]:true,[t.$style.required]:e.required}},[t._v(t._s(e.caption))]):t._e(),r("sd-form-item",t._b({attrs:{label:""}},"sd-form-item",e,false))],1)})),0)],1)],1)};var staticRenderFns=[];_render._withStripped=true;export default{name:"SdMobileRender",components:components,props:{fields:{type:Array,required:true},formProps:{type:Object,required:true}},data(){return{}},computed:{fieldInfo(){return this.fields.filter((e=>e.mobileVisible&&true!==e.attrFD.hidden)).map((e=>({...e,component:runtimeUtil.getRender(e.attrFD.cid),hideLabel:util.getComponentByID(e.attrFD.cid).fieldProps.attrFD?.hideLabel})))}},methods:{},render:_render,staticRenderFns:staticRenderFns};</script>

<style module lang="scss">
@use '@/common/design' as *;
.wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  // 预览时禁止上传文件
  [class*='sd-attachment'] {
    pointer-events: none;
  }
}
.title {
  flex: 0 0 auto;
  height: 74px;
  padding: 40px;
  /* stylelint-disable-next-line */
  font-size: 18px;
  font-weight: 700;
  color: $white;
  text-align: center;
  background-color: $primary-color;
}
.tabs {
  flex: 0 0 auto;
  text-align: center;
  :global(.ant-tabs-bar) {
    margin: 0;
  }
}
.form {
  flex: auto;
  padding-bottom: 20px;
  overflow: auto;
  :global .ant-form-item {
    display: inline-block;
    width: 65%;
    margin-bottom: 0;
    .ant-form-item-control {
      padding: 0;
      line-height: normal;
    }
  }
}
.item {
  padding: 15px 10px;
  &.hide-label {
    :global .ant-form-item {
      width: 100%;
    }
  }
}
.item + .item {
  border-top: 1px solid #ededed;
}
.label {
  display: inline-block;
  width: 35%;
  max-width: 200px;
}
.required::after {
  color: $red-6;
  content: '*';
}
</style>
