批量生成文书
This commit is contained in:
parent
216a00f28c
commit
30b0a0a131
@ -1,109 +1,134 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="批量文书生成" :visible="true" width="600px" append-to-body :close-on-click-modal="false"
|
||||
@close="handleClose">
|
||||
<div class="dialog-content dialog-office-batch">
|
||||
<div class="pt-8">
|
||||
<div class="flex-row align-items-center justify-content-between mb-16 case-batch-num">
|
||||
<span>选中<a>{{eventTraDialog.caseids.length}}</a>个案件,数据量大时,生成文书需要较长时间,请您耐心等待!</span>
|
||||
</div>
|
||||
<el-collapse-transition>
|
||||
<el-row :gutter="56">
|
||||
<el-col :span="24">
|
||||
<div class="flex-row-center align-items-center height-40 mb-8">
|
||||
<span class="tabs__search-criteria-title flex-shrink-0 pr-16 f18">选择文书生成模板(多选)</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div class="mb-24 officelist">
|
||||
<el-checkbox-group v-model="ObjectInfo.methodIds">
|
||||
<el-checkbox border v-for="(item,index) in officeOptions" :label="item.label" :key="index" ></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-collapse-transition>
|
||||
<div>
|
||||
<el-dialog title="批量文书生成" :visible="true" width="600px" append-to-body :close-on-click-modal="false"
|
||||
@close="handleClose">
|
||||
<div class="dialog-content dialog-office-batch">
|
||||
<div class="pt-8">
|
||||
<div class="flex-row align-items-center justify-content-between mb-16 case-batch-num">
|
||||
<span>选中<a>{{ eventTraDialog.caseids.length }}</a>个案件,数据量大时,生成文书需要较长时间,请您耐心等待!</span>
|
||||
</div>
|
||||
<el-collapse-transition>
|
||||
<el-row :gutter="56">
|
||||
<el-col :span="24">
|
||||
<div class="flex-row-center align-items-center height-40 mb-8">
|
||||
<span class="tabs__search-criteria-title flex-shrink-0 pr-16 f18">选择文书生成模板(多选)</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div class="mb-24 officelist">
|
||||
<el-checkbox-group v-model="ObjectInfo.documentTypes">
|
||||
<el-checkbox border v-for="(item,index) in officeOptions" :label="item.value"
|
||||
:key="index">{{item.label}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-collapse-transition>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose()">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit()">批量生成</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import api from "@/services/caseManagement";
|
||||
export default {
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
eventTraDialog: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
officeOptions:[{label:'调解告知书',value:'1'},{label:'调解申请书',value:'2'},
|
||||
{label:'送达地址确认书',value:'3'},{label:'调解笔录',value:'4'},{label:'调解协议',value:'5'}],
|
||||
ObjectInfo:{
|
||||
methodIds:['调解告知书','调解申请书','送达地址确认书'],
|
||||
users:'',
|
||||
content:''
|
||||
},
|
||||
tableData:[],
|
||||
total:0,
|
||||
import caseManagement from "@/services/caseManagement";
|
||||
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
smsChange(){
|
||||
let jsonData = this.smsOptions.find(item=>{
|
||||
return this.ObjectInfo.methodId == item.value
|
||||
})
|
||||
this.ObjectInfo.users = jsonData.users
|
||||
this.ObjectInfo.content = jsonData.content
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
this.$emit('update:eventTraDialog', null)
|
||||
},
|
||||
}
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
eventTraDialog: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
officeOptions: [
|
||||
{label: '调解告知书', value: 'MEDIATE_NOTE'},
|
||||
{label: '调解申请书', value: 'MEDIATE_APPLICATION'},
|
||||
{label: '调解询问笔录', value: 'MEDIATE_RECORD'},
|
||||
{label: '调解协议', value: 'MEDIATE_AGREEMENT'},
|
||||
// {label: '司法申请书', value: 'JUDICATURE_APPLICATION'},
|
||||
// {label: '司法承诺书', value: 'JUDICATURE_PROMISE'},
|
||||
{label: '送达地址确认书', value: 'CONFIRMATION_OF_ADDRESS'},
|
||||
{label: '身份识别报告', value: 'VERIFY_IDD'}
|
||||
],
|
||||
ObjectInfo: {
|
||||
documentTypes: [],
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// smsChange() {
|
||||
// let jsonData = this.smsOptions.find(item => {
|
||||
// return this.ObjectInfo.methodId == item.value
|
||||
// })
|
||||
// this.ObjectInfo.users = jsonData.users
|
||||
// this.ObjectInfo.content = jsonData.content
|
||||
// },
|
||||
|
||||
handleClose() {
|
||||
this.$emit('update:eventTraDialog', null)
|
||||
},
|
||||
handleSubmit() {
|
||||
if (!this.ObjectInfo.documentTypes.length){ return; }
|
||||
if(!this.$clickThrottle()) { return }//防止重复点击
|
||||
let dataJson = {
|
||||
caseIdList: this.eventTraDialog.caseids,
|
||||
...this.ObjectInfo,
|
||||
}
|
||||
caseManagement.traceGenerateBatchCreate(dataJson).then(res => {
|
||||
this.$parent.getCaseInfoList(1)
|
||||
this.handleClose()
|
||||
this.$message.success("成功");
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-office-batch{
|
||||
padding: 16px 30px;
|
||||
max-height:500px;
|
||||
.tabs__search-criteria-title{
|
||||
width: 100%;
|
||||
.dialog-office-batch {
|
||||
padding: 16px 30px;
|
||||
max-height: 500px;
|
||||
|
||||
.tabs__search-criteria-title {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.case-batch-num {
|
||||
background-color: rgba(236, 238, 241, 0.8196078431);
|
||||
padding: 15px 20px;
|
||||
border-radius: 4px;
|
||||
|
||||
a {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #C66A5B;
|
||||
}
|
||||
.case-batch-num{
|
||||
background-color: rgba(236, 238, 241, 0.8196078431);
|
||||
padding: 15px 20px;
|
||||
border-radius: 4px;
|
||||
a{font-size: 16px;font-weight: 500;color: #C66A5B;}
|
||||
}
|
||||
.officelist{
|
||||
background-color: rgba(236, 238, 241, 0.8196078431);
|
||||
padding: 20px 20px;
|
||||
.el-checkbox
|
||||
{
|
||||
width: 230px;
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.officelist {
|
||||
background-color: rgba(236, 238, 241, 0.8196078431);
|
||||
padding: 20px 20px;
|
||||
|
||||
.el-checkbox {
|
||||
width: 230px;
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@ -22,17 +22,22 @@
|
||||
<div class="color-86909C mt-8">
|
||||
<a class="mr-16 ml-16 cursor-pointer"><i class="el-icon-plus"></i>模板</a>
|
||||
<a class="mr-16 cursor-pointer"><i class="el-icon-document"></i>文书</a>
|
||||
<a class="mr-16 cursor-pointer"><i class="el-icon-delete"></i>删除</a>
|
||||
<a class="mr-16 cursor-pointer"><i class="el-icon-view"></i>预览</a>
|
||||
<a class="mr-16 cursor-pointer"><i class="el-icon-download"></i>下载</a>
|
||||
<a class="mr-16 cursor-pointer" @click="handleDelete(item)"><i class="el-icon-delete"></i>删除</a>
|
||||
<a class="mr-16 cursor-pointer" @click="handlePreview(item)"><i class="el-icon-view"></i>预览</a>
|
||||
<a class="mr-16 cursor-pointer" @click="handleDownload(item)"><i class="el-icon-download"></i>下载</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<pdfPreview v-if="editPdfFlag" :visible.sync="editPdfFlag" :previewUrl="previewPath"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import caseManagement from "@/services/caseManagement";
|
||||
export default {
|
||||
components: {
|
||||
pdfPreview: () => import('@/components/pdfPreview.vue'),//查看PDF文件
|
||||
},
|
||||
name: "cassWrit",
|
||||
props: {
|
||||
caseId: {
|
||||
@ -45,7 +50,8 @@ export default {
|
||||
data() {
|
||||
return{
|
||||
tableData: [],
|
||||
total: 0,
|
||||
previewPath: '',
|
||||
editPdfFlag: false
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
@ -82,31 +88,12 @@ export default {
|
||||
// current: 1,
|
||||
id: this.caseId
|
||||
}
|
||||
caseManagement.getCaseFileList(dataJson).then(res => {
|
||||
caseManagement.getCaseGenerateList(dataJson).then(res => {
|
||||
if (!res.code) {
|
||||
this.tableData = res.records;
|
||||
this.total = res.total;
|
||||
this.tableData = res;
|
||||
}
|
||||
})
|
||||
},
|
||||
async handlePreview(item) {
|
||||
let previewUrl = `/mediate/minio/preview/${item.fullUrl}`
|
||||
if(item.fullUrl.includes('http')){previewUrl = item.fullUrl}
|
||||
let analysisType = this.$util.getFileType(item.url);
|
||||
if (analysisType === 'image'){
|
||||
this.previewPath = previewUrl
|
||||
this.editImgFlag = true;
|
||||
}else if(analysisType.toLowerCase() === 'mp4' || analysisType.toLowerCase() === 'video'){
|
||||
this.previewPath = previewUrl
|
||||
this.editMp4Flag = true;
|
||||
}else if(analysisType.toLowerCase() === 'pdf'){
|
||||
this.previewPath = previewUrl
|
||||
this.editPdfFlag = true;
|
||||
}else {
|
||||
// let res = await commonFun.viewFile2({url: item.url})
|
||||
// window.open(`${res}`, '_target')
|
||||
}
|
||||
},
|
||||
handleDelete(item) {
|
||||
this.$confirm("请确定是否删除?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
@ -115,12 +102,18 @@ export default {
|
||||
}).then(() => {
|
||||
if(!this.$clickThrottle()) { return }//防止重复点击
|
||||
let data = {id: item.id}
|
||||
caseManagement.deleteCaseFileById(data).then((res) => {
|
||||
caseManagement.traceGenerateDelete(data).then((res) => {
|
||||
this.$message.success("成功");
|
||||
this.getFileCaseList()
|
||||
this.getWritCaseList()
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
async handlePreview(item) {
|
||||
let previewUrl = `/mediate/minio/preview/${item.fullUrl}`
|
||||
if(item.fullUrl.includes('http')){previewUrl = item.fullUrl}
|
||||
this.previewPath = previewUrl
|
||||
this.editPdfFlag = true;
|
||||
},
|
||||
handleDownload(item) {
|
||||
const downloadTask = this.$TrydoFiles.download(item.fullUrl, item.name)
|
||||
.build()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user