调解书上传下载

This commit is contained in:
hanchaobo
2024-04-22 17:32:07 +08:00
parent ca17f03831
commit b1c8e45570
3 changed files with 154 additions and 0 deletions
+8
View File
@@ -246,3 +246,11 @@ export function getIdType() {
method: 'get',
})
}
// 会议附件上传接口
export function meetingUpload(data) {
return request({
url: '/video/upload',
method: 'post',
data: data
})
}
+16
View File
@@ -76,6 +76,8 @@
<el-button size="mini" type="text" icon="el-icon-edit" @click="evidenceUpload(scope.row)"
v-hasPermi="['caseManagement:list:evidenceEdit']"
v-if="scope.row.caseFlowId <= 9">上传证据</el-button>
<el-button size="mini" v-if="scope.row.mediationFileFlag==1" @click="mediationApplication(scope.row)" type="text"
icon="el-icon-edit-outline">调解书</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.caseFlowId == 15 ||
scope.row.caseFlowId == 16 ||
scope.row.caseFlowId == 17
@@ -148,6 +150,8 @@
<caseFilingDetailsPage :showarchiveDetails="showarchiveDetails" :caseFilingData="caseFilingData"
@cancelDetail="cancelDetail" :detailsAwardNum="detailsAwardNum" :flagLoadingS="flagLoadingS">
</caseFilingDetailsPage>
<!-- 调解申请书 -->
<mediationApplications :mediationAppVisable="mediationAppVisable" @cancelmediationApp="cancelmediationApp" :mediationLise="mediationLise"></mediationApplications>
</div>
</template>
@@ -184,6 +188,7 @@ import timeConfirm from "./components/timeConfirm.vue";
import mediation from "./components/mediation.vue";
import confirmMediation from "./components/confirmMediation.vue";
import caseFilingDetailsPage from "./components/caseFilingDetailsPage.vue";
import mediationApplications from "./components/mediationApplications.vue"
export default {
name: "caseList",
dicts: ["case_flow_node"],
@@ -204,6 +209,7 @@ export default {
confirmMediation,
caseFilingDetailsPage,
respondentPay,
mediationApplications
},
data() {
return {
@@ -237,6 +243,8 @@ export default {
detailform: {}, //缴费详情数据
evidenceVisable: false, //证据修改弹窗
mediationVisable: false, //待调解弹窗
mediationAppVisable:false,//调解申请书
mediationLise:{},
mediationData: {},
payTitle: "", //缴费标题
resPayTitle: "", //被申请人缴费标题
@@ -794,6 +802,14 @@ export default {
cancelDetail() {
this.showarchiveDetails = false;
},
// 调解书
mediationApplication(row){
this.mediationLise = row
this.mediationAppVisable = true
},
cancelmediationApp(){
this.mediationAppVisable = false
}
},
};
</script>
@@ -0,0 +1,130 @@
<template>
<div>
<el-dialog title="调解书" :visible="mediationAppVisable" width="500px" @close="cancel" center
:distroy-on-close="true">
<div>
<div>
<span style="font-weight: bold;">下载调解书</span>
</div>
<div style="margin-top: 10px;">
<div style="color: blue; cursor: pointer" v-for="(item, index) in getFileListV"
v-if="item.annexType == 7 || item.annexType == 13" @click="downloadApplic(item.annexPath)">{{
item.annexName }}</div>
</div>
</div>
<div style="margin-top: 30px;">
<div>
<span style="font-weight: bold;">上传调解书</span>
</div>
<div style="margin-top: 10px;">
<el-upload class="upload-demo" accept=".doc,.docx,.pdf" ref="upload" :action="UploadUrl()"
:headers="headers" :data="filedata" :on-preview="handlePreview" :on-remove="handleRemove"
:auto-upload="false" :limit="1" :on-change="beforeUpload" :on-success="handlSuccess"
:file-list="fileList">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">只能上传.doc,docx,pdf文件</div>
</el-upload>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1" round><span>取 消</span></el-button>
<el-button @click="submitMediator" class="endbutton1" type="primary" round><span>确 认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getFileList, meetingUpload } from "@/api/caseManagement/caseManagement.js"
import { createRoomId } from '@/api/metting/metting.js'
import { getToken } from "@/utils/auth";
import moment from "moment";
export default {
props: ["mediationAppVisable", "mediationLise", "queryParams"],
data() {
return {
getFileListV: [],
fileURL: window.location.origin + "/API",
fileList: [],
headers: {
Authorization: "Bearer " + getToken(),
},
filedata: {
annexType: null,
caseId: null
},
};
},
watch: {
mediationAppVisable(val) {
this.fileList = []
if (val) {
let dataValue = {
caseAppliId: this.mediationLise.id,
}
console.log(dataValue)
this.getFileListFn(dataValue)
}
},
},
methods: {
/**上传地址*/
UploadUrl() {
return window.location.origin + "/API/video/upload";
},
handlePreview(file) {
},
handleRemove(file, fileList) {
},
beforeUpload(flie, fileList) {
const isLt2M = flie.size / 1024 / 1024 < 50; // 小于50MB
if (!isLt2M) {
this.$message.error('上传的文件大小不能超过 50MB!');
}
return isLt2M;
function getFileExtension(filename) {
const parts = filename.split('.');
return parts.length > 1 ? parts.pop() : '';
}
const extension = getFileExtension(flie.name);
if (extension == 'docx' || extension == 'doc') {
this.filedata.annexType = 7
} else if (extension == 'pdf') {
this.filedata.annexType = 13
}
this.filedata.caseId = this.mediationLise.id
this.fileList = fileList;
},
handlSuccess(res, file) {
if (res.code == 200) {
this.$modal.msgSuccess("上传成功");
this.$emit("cancelmediationApp");
}
},
cancel() {
this.$emit("cancelmediationApp");
},
// 获取申请书附件
async getFileListFn(vals) {
await getFileList(vals).then(res => {
this.getFileListV = res.data
})
},
// 下载申请书
downloadApplic(val) {
window.open(this.fileURL + val);
},
/**提交选择结果*/
async submitMediator() {
this.$refs.upload.submit()
},
},
};
</script>
<style lang="scss" scoped></style>