批量生成文书

This commit is contained in:
tdg930622 2025-01-03 16:55:11 +08:00
parent 216a00f28c
commit 30b0a0a131
2 changed files with 137 additions and 119 deletions

View File

@ -16,8 +16,9 @@
</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"
:key="index">{{item.label}}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
@ -37,10 +38,10 @@
</div> </div>
</template> </template>
<script> <script>
import api from "@/services/caseManagement"; import caseManagement from "@/services/caseManagement";
export default { export default {
components: { components: {},
},
props: { props: {
eventTraDialog: { eventTraDialog: {
type: Object, type: Object,
@ -51,33 +52,49 @@ import api from "@/services/caseManagement";
}, },
data() { data() {
return { return {
officeOptions:[{label:'调解告知书',value:'1'},{label:'调解申请书',value:'2'}, officeOptions: [
{label:'送达地址确认书',value:'3'},{label:'调解笔录',value:'4'},{label:'调解协议',value:'5'}], {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: { ObjectInfo: {
methodIds:['调解告知书','调解申请书','送达地址确认书'], documentTypes: [],
users:'',
content:''
}, },
tableData:[],
total:0,
}; };
}, },
mounted() { mounted() {
}, },
methods: { methods: {
smsChange(){ // smsChange() {
let jsonData = this.smsOptions.find(item=>{ // let jsonData = this.smsOptions.find(item => {
return this.ObjectInfo.methodId == item.value // return this.ObjectInfo.methodId == item.value
}) // })
this.ObjectInfo.users = jsonData.users // this.ObjectInfo.users = jsonData.users
this.ObjectInfo.content = jsonData.content // this.ObjectInfo.content = jsonData.content
}, // },
handleClose() { handleClose() {
this.$emit('update:eventTraDialog', null) 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>
@ -86,20 +103,28 @@ import api from "@/services/caseManagement";
.dialog-office-batch { .dialog-office-batch {
padding: 16px 30px; padding: 16px 30px;
max-height: 500px; max-height: 500px;
.tabs__search-criteria-title { .tabs__search-criteria-title {
width: 100%; width: 100%;
} }
.case-batch-num { .case-batch-num {
background-color: rgba(236, 238, 241, 0.8196078431); background-color: rgba(236, 238, 241, 0.8196078431);
padding: 15px 20px; padding: 15px 20px;
border-radius: 4px; border-radius: 4px;
a{font-size: 16px;font-weight: 500;color: #C66A5B;}
a {
font-size: 16px;
font-weight: 500;
color: #C66A5B;
} }
}
.officelist { .officelist {
background-color: rgba(236, 238, 241, 0.8196078431); background-color: rgba(236, 238, 241, 0.8196078431);
padding: 20px 20px; padding: 20px 20px;
.el-checkbox
{ .el-checkbox {
width: 230px; width: 230px;
margin: 10px; margin: 10px;
} }

View File

@ -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()