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