添加文档库弹框组件

This commit is contained in:
qq787203167
2022-02-15 17:53:00 +08:00
parent 469c190dc1
commit 12ac3223e1
7 changed files with 863 additions and 294 deletions
@@ -19,6 +19,7 @@
@editTable="editTable"
@deleteTable="deleteTable"
:url="url"
showAction
@Collection="Collection"
@subscribe="subscribe"
/>
@@ -28,6 +29,11 @@
:url="url"
:flag="'1'"
/>
<frameAssembly
:url="url"
ref="frameAssemblyRef"
/>
</a-card>
</template>
@@ -35,14 +41,15 @@
import search from '@/components/search/index'
import tableData from '@/components/tableDate/index'
import addForm from './modules/addForm'
import frameAssembly from '@/components/frameAssembly/index'
export default {
name: 'docLibrary',
components: {
search,
addForm,
tableData
tableData,
frameAssembly
},
data() {
return {
@@ -74,7 +81,7 @@
addInfo:'document/bussDocumentLibraryEO/addInfo', //新增
updateInfo:'document/bussDocumentLibraryEO/updateInfo', //编辑
getDocumentInfo:'document/bussDocumentLibraryEO/getDocumentInfoById', //查看
}
},
}
},
methods: {
@@ -97,6 +104,9 @@
},
handleCompare() {
this.$nextTick(()=>{
this.$refs.frameAssemblyRef.visible = true
})
// this.$refs.addFormRef.add()
},
handleFileImport(){
@@ -104,8 +114,7 @@
},
//编辑按钮
editTable(val) {
this.$refs.addFormRef.edit()
console.log(val)
this.$refs.addFormRef.edit(val)
},
//删除按钮
deleteTable(val){
@@ -12,22 +12,18 @@
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 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/addForm/index'
import addFormData from '@/components/libraryAddForm/index'
export default {
name: 'docLibraryAddForm',
@@ -36,15 +32,15 @@
},
data() {
return {
title: '添加',
title: '新增',
drawerWidth: 900,
visible: false,
confirmLoading: false,
isDisplayType:false,
dataList:[]
isDisplayType: false,
dataList: []
}
},
props:{
props: {
flag: {
type: String,
default: ''
@@ -53,7 +49,7 @@
url: {
type: Object,
default: {}
},
}
},
mounted() {
@@ -63,17 +59,25 @@
this.visible = false
},
add() {
this.title = '新增'
this.visible = true
this.$nextTick(() => {
this.$refs.addFormDataRef.add()
})
},
edit() {
edit(item) {
this.title = '编辑'
this.visible = true
this.$nextTick(() => {
this.$refs.addFormDataRef.edit(item)
})
},
handleSubmit() {
this.$refs.addFormDataRef.sumber()
},
addFormClick(){
addFormClick() {
this.visible = false
},
}
}
}
</script>