[update] 文档拆分的弹框拆分出来
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<a-modal
|
||||
class="show-setting"
|
||||
:title="$t('docTool.split.batchSetting')"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
style="width: 1000px;height: auto"
|
||||
>
|
||||
<add-form
|
||||
ref="fileForm"
|
||||
@submitFormData="submitFormData"
|
||||
:flag="'4'"
|
||||
:url="urlBatSet">
|
||||
</add-form>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddForm from '@/components/customField/AddForm'
|
||||
import { postAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'SplitDetailBatchSetting',
|
||||
components: { AddForm },
|
||||
data () {
|
||||
return {
|
||||
visible: false, // 批量设置弹框显示
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
addInfo: '/jero-boot/split/sarFileSplitItems/addSplitItems', // 新增
|
||||
updateInfo: '/jero-boot/split/sarFileSplitItems/updateSplitItems', // 编辑
|
||||
},
|
||||
urlBatSet: {
|
||||
getAddForm: 'split/sarFileSplitItems/getBatchSetForm',
|
||||
addInfo: '/jero-boot/split/sarFileSplitItems/batchSet'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open (ids) {
|
||||
this.ids = ids
|
||||
this.visible = true
|
||||
},
|
||||
// 批量设置确定
|
||||
handleOk () {
|
||||
this.$refs.fileForm.submit()
|
||||
},
|
||||
// 表单提交
|
||||
submitFormData (formInline) {
|
||||
if (this.confirmLoading) {
|
||||
return
|
||||
}
|
||||
this.confirmLoading = true
|
||||
let url = ''
|
||||
if (this.formInline.id) {
|
||||
url = this.url.updateInfo
|
||||
} else {
|
||||
url = this.url.addInfo
|
||||
}
|
||||
formInline.ids = this.ids
|
||||
postAction(url, formInline).then((res) => {
|
||||
if (res.data.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.visible = false
|
||||
this.$emit('ok')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
},
|
||||
// 批量设置取消
|
||||
handleCancel () {
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user