Files
laws_weilai/jero-web/src/views/documentManage/library/modules/addForm.vue
T
2022-02-24 14:56:40 +08:00

97 lines
2.0 KiB
Java

<template>
<a-drawer
:title="title"
:maskClosable="false"
: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'"
v-if="visible"
:url="url"
/>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import addFormData from '@/components/libraryAddForm/index'
export default {
name: 'docLibraryAddForm',
components: {
addFormData
},
data() {
return {
title: '新增',
drawerWidth: 900,
visible: false,
confirmLoading: false,
isDisplayType: false,
dataList: []
}
},
props: {
flag: {
type: String,
default: ''
},
//接口
url: {
type: Object,
default: {}
}
},
mounted() {
},
methods: {
handleCancel() {
this.visible = false
},
add() {
this.title = '新增'
this.visible = true
this.$nextTick(() => {
this.$refs.addFormDataRef.add()
})
},
edit(item) {
this.title = '编辑'
this.visible = true
this.$nextTick(() => {
this.$refs.addFormDataRef.edit(item)
})
},
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>