Files
laws_weilai/jero-web/src/views/documentManage/library/modules/addForm.vue
T

93 lines
1.9 KiB
Java

<template>
<a-drawer
:title="title"
:maskClosable="true"
:width="drawerWidth"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<addFormData
ref="addFormDataRef"
@addFormClick="addFormClick"
:flag="'1'"
isDisplayType
v-if="visible"
:url="url"
/>
<div class="drawer-bootom-button">
<a-popconfirm :title="$t('AreYouWantDiscardEditing')" @confirm="handleCancel" :okText="$t('determine')"
:cancelText="$t('cancel')">
<a-button style="margin-right: .8rem">{{$t('cancel')}}</a-button>
</a-popconfirm>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import addFormData from '@/components/addForm/index'
export default {
name: 'docLibraryAddForm',
components: {
addFormData
},
data() {
return {
title: '添加',
drawerWidth: 1000,
visible: false,
confirmLoading: false,
isDisplayType:false,
dataList:[]
}
},
props:{
flag: {
type: String,
default: ''
},
//接口
url: {
type: Object,
default: {}
},
},
mounted() {
},
methods: {
handleCancel() {
this.visible = false
},
add() {
this.visible = true
},
edit() {
this.visible = true
},
handleSubmit() {
this.$refs.addFormDataRef.sumber()
},
addFormClick(){
this.visible = false
},
}
}
</script>
<style lang="less" scoped>
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>