

<script>
/* eslint-disable */
// sd-skip-auto-import
import axios from"@/common/services/axios-instance";import components from"./_import-components/sd-sign-box-import";const signValue={user:"张三（演示数据，仅供查看效果）",group:"XX部门（演示数据，仅供查看效果）",date:"2022-09-10（演示数据，仅供查看效果）"};export const metaInfo={caption:"签署框",component:{props:["designerData"],render(){const e=arguments[0];return e("div",[signValue[this.designerData.attr.type]])}},icon:"audit",order:2e3,excludeFormTypes:[0,2,3],hiddenProps:["readonly","required","description","formula"]};export const fieldProps={dataType:"signType",readonly:true,attr:{setValueOnLoad:"false",isUpdate:"true",signFieldType:"name",type:"user"}};export function updateOnPreview(e){e.dataType="signType";e.value=signValue[e.attr.type]}var _render=function e(){var t=this,o=t._self._c;return o("div",[o("a-form-model-item",{attrs:{label:"签署类型"}},[o("a-select",{attrs:{options:t.signOptions,disabled:!!t.component.isDbSynch},on:{change:t.signTypeChange},model:{value:t.component.attr.type,callback:function(e){t.$set(t.component.attr,"type",e)},expression:"component.attr.type"}})],1),"group"===t.component.attr.type?o("a-form-model-item",{attrs:{label:"签署部门显示级别"}},[o("a-select",{attrs:{options:t.groupLevel,"allow-clear":""},model:{value:t.component.attr.lev,callback:function(e){t.$set(t.component.attr,"lev",e)},expression:"component.attr.lev"}})],1):t._e(),o("a-form-model-item",{attrs:{label:null}},[o("a-checkbox",{attrs:{checked:"true"===t.component.attr.isUpdate},on:{change:e=>t.component.attr.isUpdate=e.target.checked.toString()}},[t._v(" 处理环节每次提交时更新 "),o("a-tooltip",{attrs:{title:"勾选后，驳回后再次提交时，更新为新值"}},[o("a-icon",{attrs:{type:"question-circle-o"}})],1)],1)],1),o("a-form-model-item",{attrs:{label:null}},[o("a-checkbox",{attrs:{checked:"true"===t.component.attr.setValueOnLoad},on:{change:e=>t.component.attr.setValueOnLoad=e.target.checked.toString()}},[t._v(" 处理环节表单预览 "),o("a-tooltip",{attrs:{title:"勾选后，处理环节表单上会显示当前值"}},[o("a-icon",{attrs:{type:"question-circle-o"}})],1)],1)],1)],1)};var staticRenderFns=[];_render._withStripped=true;export default{name:"SdSignBox",components:components,data(){return{signOptions:[{value:"user",label:"签署人"},{value:"group",label:"签署部门"},{value:"date",label:"签署日期"}],groupLevel:[]}},created(){axios.get("api/framework/v1/level/group-levels").then((e=>{this.groupLevel=e.data.map((e=>({value:e.code,label:e.name})))}))},methods:{signTypeChange(){delete this.component.attr.lev;delete this.component.attr.showDate;switch(this.component.attr.type){case"group":this.$set(this.component.attr,"lev",void 0);break;case"date":this.$set(this.component.attr,"showDate","true");break;default:break}}},render:_render,staticRenderFns:staticRenderFns};</script>

<style module lang="scss">
@use '@/common/design' as *;
</style>
