

<script>
/* eslint-disable */
// sd-skip-auto-import
import sdOpinionView from"@/webflow/sd-opinion-view.vue";import axios from"@/common/services/axios-instance";import components from"./_import-components/sd-opinion-import";const opinions=[{signContent:{signer:{name:"张三",deptName:"XX部门",userLevName:"普通员工"},signContent:"拟同意（演示数据，仅供查看效果）",signTime:1620886070201}}];export const metaInfo={caption:"意见展示",component:{props:["designerData"],render(){const e=arguments[0];return e(sdOpinionView,{attrs:{value:opinions,showField:this.designerData.attr.showField,signTimeFormat:"true"===this.designerData.attr.showTime?"YYYY-MM-DD HH:mm":"YYYY-MM-DD"}})}},icon:"highlight",order:1500,excludeFormTypes:[0,2,3],hiddenProps:["readonly","required","description"]};export const fieldProps={dataType:"OpinionView",readonly:true,attr:{showField:["content","user","group","time"],showDate:"true",showTime:"true",sortRule:"opinionTimeDescSort"}};export function updateOnPreview(e){e.attr.opinions=opinions}var _render=function e(){var t=this,o=t._self._c;return o("div",[o("a-form-model-item",{attrs:{label:"显示信息"}},[o("a-checkbox-group",{model:{value:t.component.attr.showField,callback:function(e){t.$set(t.component.attr,"showField",e)},expression:"component.attr.showField"}},t._l(t.showField,(function(e){return o("a-row",{key:e.value},[o("a-checkbox",{attrs:{value:e.value}},[t._v(" "+t._s(e.label)+" ")])],1)})),1)],1),t.component.attr.showField.includes("group")?o("a-form-model-item",{attrs:{label:"签署部门显示级别"}},[o("a-select",{attrs:{options:t.groupLevel,"allow-clear":""},model:{value:t.component.attr.groupLevel,callback:function(e){t.$set(t.component.attr,"groupLevel",e)},expression:"component.attr.groupLevel"}})],1):t._e(),t.component.attr.showField.includes("time")?o("a-form-model-item",{attrs:{label:"签署时间格式"}},[o("a-radio-group",{attrs:{options:[{label:"日期",value:"false"},{label:"日期+时间",value:"true"}]},model:{value:t.component.attr.showTime,callback:function(e){t.$set(t.component.attr,"showTime",e)},expression:"component.attr.showTime"}})],1):t._e(),o("a-form-model-item",{attrs:{label:"排序规则"}},[o("a-select",{attrs:{options:t.sortRule},model:{value:t.component.attr.sortRule,callback:function(e){t.$set(t.component.attr,"sortRule",e)},expression:"component.attr.sortRule"}})],1)],1)};var staticRenderFns=[];_render._withStripped=true;export default{name:"SdOpinion",components:components,data(){return{options:[],sortRule:[],showField:[],groupLevel:[]}},created(){axios.get("api/framework/v1/dict-manager/dictvalues?keyId=PLATFORM_OPINIONVIEW_SORTRULE").then((e=>{this.sortRule=e.data.map((e=>({value:e.id,label:e.name})))}));axios.get("api/framework/v1/dict-manager/dictvalues?keyId=PLATFORM_OPINIONVIEW_SHOWFIELD").then((e=>{this.showField=e.data.map((e=>({value:e.id,label:e.name})))}));axios.get("api/framework/v1/level/group-levels").then((e=>{this.groupLevel=e.data.map((e=>({value:e.code,label:e.name})))}))},methods:{},render:_render,staticRenderFns:staticRenderFns};</script>

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