update 抽屉样式调整

This commit is contained in:
赵霄
2023-09-07 11:35:43 +08:00
parent 6967d4d6a4
commit f156b08ec2
4 changed files with 210 additions and 203 deletions
@@ -8,10 +8,10 @@
@close="onClose"
:visible="visible"
:maskClosable="false"
style="height: 100%;overflow: auto;"
>
<a-spin :spinning="confirmLoading" style="width: 100%;height:100%">
<div class="drawer-container">
class="custom-drawer-style">
<div class="custom-drawer-style-scroll">
<a-spin :spinning="confirmLoading">
<a-form-model
:model="form"
:rules="validatorRules"
@@ -113,14 +113,14 @@
</a-form-model-item>
</template>
</a-form-model>
<div class="drawer-footer">
<a-button @click="handleOk" type="primary" style="margin-bottom: 0;">
{{ $t('preservation') }}
</a-button>
<a-button @click="handleCancel" style="margin-bottom: 0;">{{ $t('close') }}</a-button>
</div>
</div>
</a-spin>
</a-spin>
</div>
<div class="custom-drawer-style-bottom-btn">
<a-button @click="handleCancel" style="margin-bottom: 0;" :loading="confirmLoading">{{ $t('close') }}</a-button>
<a-button @click="handleOk" type="primary" style="margin-bottom: 0;" :loading="confirmLoading">
{{ $t('preservation') }}
</a-button>
</div>
</a-drawer>
</template>
+168 -170
View File
@@ -1,188 +1,186 @@
<!--国内法规新增字段-->
<template>
<div class="domestic-drawer-div">
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="true"
@close="onClose"
:visible="visible"
:maskClosable="false"
style="height: 100%;overflow: auto;"
>
<a-spin :spinning="confirmLoading" style="width: 100%;height:100%">
<div class="drawer-container">
<a-form-model
:model="form"
:rules="validatorRules"
ref="editForm"
:label-col="labelCol"
:wrapper-col="wrapperCol"
>
<a-row>
<!--基本信息-->
<p class="tag-info">{{ $t('system.tag.essentialInformation') }}</p>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="true"
@close="onClose"
:visible="visible"
:maskClosable="false"
class="custom-drawer-style"
>
<div class="custom-drawer-style-scroll">
<a-spin :spinning="confirmLoading">
<a-form-model
:model="form"
:rules="validatorRules"
ref="editForm"
:label-col="labelCol"
:wrapper-col="wrapperCol"
>
<a-row>
<!--基本信息-->
<p class="tag-info">{{ $t('system.tag.essentialInformation') }}</p>
<a-divider dashed />
<!--所属模块-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.module')" prop="isModel">
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.module')" disabled v-model="form.isModel">
<a-select-option v-for="item in moduleArr" :key="item.value" :value="item.value">
{{ translate(item.langKey) }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<!-- 属性名称-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.attributeName')" prop="dbFieldTxt">
<a-input
v-model="form.dbFieldTxt" :placeholder="$t('pleaseEnter') + $t('system.tag.attributeName')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="120"
></a-input>
</a-form-model-item>
</a-col>
<!-- 英文名称-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.attributeNameEnglish')" prop="dbFieldEnName">
<a-input
v-model="form.dbFieldEnName"
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="120"
></a-input>
</a-form-model-item>
</a-col>
<!-- 字段名称-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.fieldName')" prop="dbFieldName">
<a-input
v-model="form.dbFieldName"
:placeholder="$t('pleaseEnter') + $t('system.tag.fieldName')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="60"
></a-input>
</a-form-model-item>
</a-col>
<!-- 属性类型-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.attributeType')" prop="fieldShowType">
<j-dict-select-tag type="list" v-model="form.fieldShowType" dictCode="field_show_type"
:placeholder="$t('pleaseSelect') + $t('system.tag.attributeType')"
:disabled="disabledEdit" />
</a-form-model-item>
</a-col>
<!--选项内容-->
<a-col :span="24" v-if="isTagContent">
<a-form-model-item :label="$t('system.tag.optionContent')" prop="dictId" key="dictId">
<template>
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.optionContent')" v-model="form.dictId">
<a-select-option v-for="item in contentOption" :key="item.id" :value="item.id">
{{ item.dictName }}
</a-select-option>
</a-select>
</template>
</a-form-model-item>
</a-col>
<!--字段长度 key 值必须加解决验证错位的问题-->
<a-col :span="24" v-if="isLength">
<a-form-model-item :label="$t('system.tag.fieldLength')" prop="dbLength" key="dbLength">
<a-input-number v-model="form.dbLength" :min="1" :max="200"
:placeholder="$t('pleaseEnter') + $t('system.tag.fieldLength')"
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
</a-form-model-item>
</a-col>
<!--展示顺序-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.displayOrder')" prop="orderNum">
<a-input-number v-model="form.orderNum"
:placeholder="$t('pleaseEnter') + $t('system.tag.displayOrder')" style="width: 100%"
:min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber" />
</a-form-model-item>
</a-col>
<!--是否必填-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.required')" prop="fieldMustInput">
<j-dict-select-tag type="list" v-model="form.fieldMustInput" dictCode="yn"
:placeholder="$t('pleaseSelect') + $t('system.tag.required')" />
</a-form-model-item>
</a-col>
<template>
<!--文档库模块展示-->
<p class="tag-info">{{ $t('system.tag.documentLibraryModuleDisplay') }}</p>
<a-divider dashed />
<!--所属模块-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.module')" prop="isModel">
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.module')" disabled v-model="form.isModel">
<a-select-option v-for="item in moduleArr" :key="item.value" :value="item.value">
{{ translate(item.langKey) }}
<a-form-model-item :label="$t('system.tag.documentLibraryListDisplay')" prop="isShowList">
<j-dict-select-tag type="list" v-model="form.isShowList" dictCode="yn"
:placeholder="$t('system.tag.selectWhetherDisplayList')" />
</a-form-model-item>
</a-col>
<!--详情页展示-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.isShowDetail')" prop="isShowForm">
<j-dict-select-tag type="list" v-model="form.isShowForm" dictCode="yn"
:placeholder="$t('system.tag.isShowDetailMessage')" />
</a-form-model-item>
</a-col>
<!--展示区域-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.showArea')" prop="showArea">
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.showArea')" v-model="form.showArea">
<a-select-option v-for="(item) in areaOptions" :key="item.id" :value="item.id">
{{ item.showArea }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<!-- 属性名称-->
<!--是否搜索-->
<a-col :span="24" v-if="isSearch">
<a-form-model-item :label="$t('system.tag.search')" prop="isQuery" key="isQuery">
<j-dict-select-tag type="list" v-model="form.isQuery" dictCode="yn"
:placeholder="$t('pleaseSelect') + $t('system.tag.search')" />
</a-form-model-item>
</a-col>
<!--是否排序-->
<a-col :span="24" v-if="isSearch">
<a-form-model-item :label="$t('system.tag.isSort')" prop="sortFlag" key="sortFlag">
<j-dict-select-tag type="list" v-model="form.sortFlag" dictCode="yn"
:placeholder="$t('pleaseSelect') + $t('system.tag.isSort')" />
</a-form-model-item>
</a-col>
</template>
<!--其它模块展示-->
<template>
<p class="tag-info">{{ $t('system.tag.displayOtherModules') }}</p>
<a-divider dashed />
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.attributeName')" prop="dbFieldTxt">
<a-input
v-model="form.dbFieldTxt" :placeholder="$t('pleaseEnter') + $t('system.tag.attributeName')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="120"
></a-input>
<a-form-model-item :label="$t('system.tag.regulationsListDisplay')" prop="isShowLawsList">
<j-dict-select-tag type="list" v-model="form.isShowLawsList" dictCode="yn"
:placeholder="$t('system.tag.selectDisplayListRegulations')" />
</a-form-model-item>
</a-col>
<!-- 英文名称-->
<!--搜索中心展示-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.attributeNameEnglish')" prop="dbFieldEnName">
<a-input
v-model="form.dbFieldEnName"
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="120"
></a-input>
<a-form-model-item :label="$t('system.tag.searchCenterDisplay')" prop="isShowSearch">
<j-dict-select-tag type="list" v-model="form.isShowSearch" dictCode="yn"
:placeholder="$t('system.tag.selectSearchCenterDisplayed')" />
</a-form-model-item>
</a-col>
<!-- 字段名称-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.fieldName')" prop="dbFieldName">
<a-input
v-model="form.dbFieldName"
:placeholder="$t('pleaseEnter') + $t('system.tag.fieldName')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="60"
></a-input>
</a-form-model-item>
</a-col>
<!-- 属性类型-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.attributeType')" prop="fieldShowType">
<j-dict-select-tag type="list" v-model="form.fieldShowType" dictCode="field_show_type"
:placeholder="$t('pleaseSelect') + $t('system.tag.attributeType')"
:disabled="disabledEdit" />
</a-form-model-item>
</a-col>
<!--选项内容-->
<a-col :span="24" v-if="isTagContent">
<a-form-model-item :label="$t('system.tag.optionContent')" prop="dictId" key="dictId">
<template>
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.optionContent')" v-model="form.dictId">
<a-select-option v-for="item in contentOption" :key="item.id" :value="item.id">
{{ item.dictName }}
</a-select-option>
</a-select>
</template>
</a-form-model-item>
</a-col>
<!--字段长度 key 值必须加解决验证错位的问题-->
<a-col :span="24" v-if="isLength">
<a-form-model-item :label="$t('system.tag.fieldLength')" prop="dbLength" key="dbLength">
<a-input-number v-model="form.dbLength" :min="1" :max="200"
:placeholder="$t('pleaseEnter') + $t('system.tag.fieldLength')"
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
</a-form-model-item>
</a-col>
<!--展示顺序-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.displayOrder')" prop="orderNum">
<a-input-number v-model="form.orderNum"
:placeholder="$t('pleaseEnter') + $t('system.tag.displayOrder')" style="width: 100%"
:min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber" />
</a-form-model-item>
</a-col>
<!--是否必填-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.required')" prop="fieldMustInput">
<j-dict-select-tag type="list" v-model="form.fieldMustInput" dictCode="yn"
:placeholder="$t('pleaseSelect') + $t('system.tag.required')" />
</a-form-model-item>
</a-col>
<template>
<!--文档库模块展示-->
<p class="tag-info">{{ $t('system.tag.documentLibraryModuleDisplay') }}</p>
<a-divider dashed />
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.documentLibraryListDisplay')" prop="isShowList">
<j-dict-select-tag type="list" v-model="form.isShowList" dictCode="yn"
:placeholder="$t('system.tag.selectWhetherDisplayList')" />
</a-form-model-item>
</a-col>
<!--详情页展示-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.isShowDetail')" prop="isShowForm">
<j-dict-select-tag type="list" v-model="form.isShowForm" dictCode="yn"
:placeholder="$t('system.tag.isShowDetailMessage')" />
</a-form-model-item>
</a-col>
<!--展示区域-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.showArea')" prop="showArea">
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.showArea')" v-model="form.showArea">
<a-select-option v-for="(item) in areaOptions" :key="item.id" :value="item.id">
{{ item.showArea }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<!--是否搜索-->
<a-col :span="24" v-if="isSearch">
<a-form-model-item :label="$t('system.tag.search')" prop="isQuery" key="isQuery">
<j-dict-select-tag type="list" v-model="form.isQuery" dictCode="yn"
:placeholder="$t('pleaseSelect') + $t('system.tag.search')" />
</a-form-model-item>
</a-col>
<!--是否排序-->
<a-col :span="24" v-if="isSearch">
<a-form-model-item :label="$t('system.tag.isSort')" prop="sortFlag" key="sortFlag">
<j-dict-select-tag type="list" v-model="form.sortFlag" dictCode="yn"
:placeholder="$t('pleaseSelect') + $t('system.tag.isSort')" />
</a-form-model-item>
</a-col>
</template>
<!--其它模块展示-->
<template>
<p class="tag-info">{{ $t('system.tag.displayOtherModules') }}</p>
<a-divider dashed />
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.regulationsListDisplay')" prop="isShowLawsList">
<j-dict-select-tag type="list" v-model="form.isShowLawsList" dictCode="yn"
:placeholder="$t('system.tag.selectDisplayListRegulations')" />
</a-form-model-item>
</a-col>
<!--搜索中心展示-->
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.searchCenterDisplay')" prop="isShowSearch">
<j-dict-select-tag type="list" v-model="form.isShowSearch" dictCode="yn"
:placeholder="$t('system.tag.selectSearchCenterDisplayed')" />
</a-form-model-item>
</a-col>
</template>
</a-row>
</a-form-model>
</div>
<div class="drawer-footer">
<a-button @click="handleOk" type="primary" style="margin-bottom: 0;">
{{ $t('preservation') }}
</a-button>
<a-button @click="handleCancel" style="margin-bottom: 0;">{{ $t('close') }}</a-button>
</div>
</template>
</a-row>
</a-form-model>
</a-spin>
</a-drawer>
</div>
</div>
<div class="custom-drawer-style-bottom-btn">
<a-button @click="handleCancel" style="margin-bottom: 0;">{{ $t('close') }}</a-button>
<a-button @click="handleOk" type="primary" style="margin-bottom: 0;">
{{ $t('preservation') }}
</a-button>
</div>
</a-drawer>
</template>
<script>