Files
Mediation-Frontend/src/views/caseManagement/components/mediation.vue
T

342 lines
12 KiB
Vue
Raw Normal View History

2024-01-19 18:02:16 +08:00
<template>
2024-01-20 17:20:15 +08:00
<div>
2024-01-30 17:20:29 +08:00
<el-dialog :title="title" :visible="mediationVisable" @close="cancel" center :distroy-on-close="true" width="1000px">
2024-01-20 17:20:15 +08:00
<el-form ref="form" :model="formData" label-width="180px">
<div class="caseInfo">案件信息:</div>
<el-divider></el-divider>
<el-row>
<el-col :span="12">
<el-form-item label="案件编号:" prop="caseNum">
<el-input v-model="formData.caseNum" placeholder="请输入案件编号" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
2024-01-30 17:20:29 +08:00
<el-form-item label="申请人:" prop="affiliate.applicationName">
<el-input v-model="formData.affiliate.applicationName" :disabled="true" />
2024-01-20 17:20:15 +08:00
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人:" prop="respondentName">
<el-input v-model="mediationData.respondentName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="案件标的:" prop="caseSubjectAmount">
2024-01-30 17:20:29 +08:00
<el-input v-model="formData.caseSubjectAmount" placeholder="请输入案件标的" :disabled="true" />
2024-01-20 17:20:15 +08:00
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="调解费用:" prop="feePayable">
<el-input v-model="formData.feePayable" placeholder="请输入仲裁费用" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="调解员:" prop="mediatorName">
<el-input v-model="formData.mediatorName" placeholder="请输入" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-col :span="24">
<el-form-item label="申请人案件证据:">
<div v-if="applicateArr.length == 0">申请人暂未提供证据!</div>
2024-02-22 10:47:24 +08:00
<div v-for="(item, index) in applicateArr" :key="index" v-if="item.annexType == 2">
2024-01-20 17:20:15 +08:00
<a href="#" @click="toFile(item, index)" style="color: blue">{{ item.annexName }}</a>
2024-01-19 18:02:16 +08:00
</div>
2024-01-20 17:20:15 +08:00
</el-form-item>
</el-col>
2024-02-02 09:19:51 +08:00
<el-col :span="24" v-if="mediationType">
<el-form-item label="调解结果:">
2024-02-22 10:47:24 +08:00
<el-radio-group v-model="mediaResult" :disabled="!isSecretaryRole" @change="resultsMediation">
<el-radio :label="1">达成调解</el-radio>
<el-radio :label="2">未达成调解</el-radio>
<el-radio :label="3">未达成调解但不在争议</el-radio>
<el-radio :label="4">未达成调解但同意引入仲裁</el-radio>
<el-radio :label="5">达成和解</el-radio>
2024-01-31 16:04:35 +08:00
</el-radio-group>
</el-form-item>
</el-col>
2024-02-19 14:19:18 +08:00
<!-- <el-col :span="24">
2024-02-02 09:19:51 +08:00
<el-form-item label="是否和解" v-if="mediaResult==1">
<el-radio-group v-model="isReconci">
<el-radio :label="1">是</el-radio>
<el-radio :label="0">否</el-radio>
2024-01-31 16:04:35 +08:00
</el-radio-group>
</el-form-item>
2024-02-19 14:19:18 +08:00
</el-col> -->
2024-01-25 15:10:11 +08:00
<!-- <el-col :span="24">
2024-01-20 17:20:15 +08:00
<el-form-item label="被申请人案件证据:">
<div v-if="quiltArr.length == 0">被申请人暂未提供证据!</div>
<div v-for="(item, index) in quiltArr" :key="index">
<a href="#" @click="toFile1(item, index)" style="color: blue">{{ item.annexName }}</a>
</div>
</el-form-item>
2024-01-25 15:10:11 +08:00
</el-col> -->
2024-01-20 17:20:15 +08:00
<el-col :span="24" v-if="recordArr.length > 0">
<el-form-item label="庭审笔录:">
<div v-for="(item, index) in recordArr" :key="index" style="color: blue">
<a href="#" @click="toFile2(item.annexPath)">{{ item.annexName }}</a>
</div>
</el-form-item>
</el-col>
2024-02-21 18:38:13 +08:00
<el-col :span="24">
<el-form-item label="调解书:" v-if="recordArrMediate.length > 0">
<div v-for="(item, index) in recordArrMediate" :key="index" style="color: blue">
<a href="#" @click="toFileMediate(item.annexPath)">{{ item.annexName }}</a>
</div>
</el-form-item>
</el-col>
2024-01-20 17:20:15 +08:00
<el-col :span="24" v-if="mediationType">
<el-form-item label="预约会议房间号:">
<div>{{ formData.roomId }}</div>
</el-form-item>
</el-col>
<el-col :span="24" v-if="mediationType">
2024-02-19 14:19:18 +08:00
<el-form-item label="调解时间:">
2024-01-20 17:20:15 +08:00
<div>{{ formData.hearDate }}</div>
</el-form-item>
</el-col>
2024-02-21 18:38:13 +08:00
<!-- v-if="!mediationType" -->
<el-col :span="24">
2024-01-30 17:20:29 +08:00
<el-form-item label="上传调解书">
2024-02-22 10:47:24 +08:00
<el-upload class="upload-demo" accept=".png,.jpg,.doc,.docx,.txt,.pdf" ref="upload" :action="UploadUrl()"
:headers="headers" :data="filedata" :on-preview="handlePreview" :on-remove="handleRemove" :limit="1"
:on-change="beforeUpload" :on-success="handlSuccess" :file-list="fileList">
<el-button slot="trigger" size="small" :disabled="!isSecretaryRole" type="primary">选取文件</el-button>
2024-01-30 17:20:29 +08:00
<!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> -->
2024-02-21 18:38:13 +08:00
<div slot="tip" class="el-upload__tip">只能上传.jpg,png,.doc,docx,.txt,.pdf文件</div>
2024-01-30 17:20:29 +08:00
</el-upload>
</el-form-item>
</el-col>
2024-01-20 17:20:15 +08:00
<!-- </el-form> -->
</el-form>
2024-02-22 10:47:24 +08:00
<el-button @click="openmeeting" type="primary" v-if="mediationType">{{ isSecretaryRole ? '发起会议' :
'进入会议' }}</el-button>
2024-02-21 18:38:13 +08:00
<!-- v-if="this.recordArr.length <= 0 && mediationData.mediationMethod == '1'" -->
2024-01-30 17:20:29 +08:00
<el-button @click="openArbitrationresults" type="primary"
2024-02-23 15:16:40 +08:00
v-if="this.recordArrMediate.length <= 0 && mediationData.mediationMethod == '1' && isSecretaryRole">确认会议结果</el-button>
2024-01-20 17:20:15 +08:00
<div slot="footer" class="dialog-footer">
2024-01-26 16:41:35 +08:00
<el-button @click="cancel" class="endbutton1" round>
2024-01-20 17:20:15 +08:00
<span>取 消</span>
</el-button>
2024-02-27 18:04:27 +08:00
<el-button v-if="isSecretaryRole" :loading="loadingSubmit" @click="submitMediation"
:disabled="this.recordArrMediate.length <= 0 && mediationData.mediationMethod == '1'" class="endbutton1"
type="primary" round>
提 交
2024-01-20 17:20:15 +08:00
</el-button>
</div>
</el-dialog>
</div>
2024-01-19 18:02:16 +08:00
</template>
<!-- hearDate -->
<script>
2024-02-26 15:44:48 +08:00
import _ from 'lodash'
2024-01-20 17:20:15 +08:00
import {
caseApplicationSelectById,
2024-02-21 18:38:13 +08:00
mediation,
2024-02-22 10:47:24 +08:00
confirmMeetingResult,
secretaryRoleByUserId
2024-01-20 17:20:15 +08:00
} from "@/api/caseManagement/caseManagement.js";
import { getUserProfile } from "@/api/system/user";
import { reserveConferenceList } from "@/api/metting/metting.js";
2024-01-30 17:20:29 +08:00
import { getToken } from "@/utils/auth";
2024-01-19 18:02:16 +08:00
export default {
2024-01-20 17:20:15 +08:00
props: ["mediationVisable", "mediationData", "queryParams"],
data() {
return {
loanStartDate: "",
2024-02-22 10:47:24 +08:00
codes: null,
2024-02-21 11:29:00 +08:00
title: "线上调解",
2024-01-20 17:20:15 +08:00
applicateArr: [],
quiltArr: [],
recordArr: [],
2024-02-22 10:47:24 +08:00
recordArrMediate: [],
2024-01-20 17:20:15 +08:00
roomId: null,
startTime: null,
2024-02-22 10:47:24 +08:00
mediaResult: 1,
2024-02-19 14:19:18 +08:00
// isReconci:0,
2024-01-20 17:20:15 +08:00
formData: {
affiliate: {}
},
user: "",
userId: null,
flieList: [],
2024-01-30 17:20:29 +08:00
mediationType: true,
headers: {
Authorization: "Bearer " + getToken(),
},
filedata: {
annexType: 7,
},
2024-02-22 10:47:24 +08:00
fileList: [],
attachList: [],
isSecretaryRole: true,
2024-02-27 18:04:27 +08:00
loadingSubmit: false
2024-01-20 17:20:15 +08:00
};
},
watch: {
mediationVisable(val) {
this.recordArr = [];
2024-02-21 18:38:13 +08:00
this.recordArrMediate = [];
2024-01-20 17:20:15 +08:00
if (this.mediationData.mediationMethod == "1") {
2024-02-21 11:29:00 +08:00
this.title = "线上调解";
2024-01-20 17:20:15 +08:00
this.mediationType = true;
} else if (this.mediationData.mediationMethod == "2") {
2024-01-30 17:20:29 +08:00
this.title = "线下调解";
2024-01-20 17:20:15 +08:00
this.mediationType = false;
}
if (val) {
this.caseApplicationSelectByIdFn({
id: this.mediationData.id
});
2024-02-28 18:02:53 +08:00
this.getUser();
2024-01-20 17:20:15 +08:00
}
}
},
2024-01-30 17:20:29 +08:00
created() { },
2024-01-20 17:20:15 +08:00
methods: {
2024-02-22 10:47:24 +08:00
// 根据用户id查询是否为调解员
secretaryRoleByUserIdFn() {
secretaryRoleByUserId({
userId: this.userId
}).then(res => {
2024-02-28 18:02:53 +08:00
this.isSecretaryRole = res.data.isSecretaryRole;
if(this.recordArrMediate){
this.isSecretaryRole = false
}
2024-02-22 10:47:24 +08:00
})
},
2024-01-30 17:20:29 +08:00
/**上传地址*/
UploadUrl() {
return window.location.origin + "/API/common/upload";
},
handlePreview(file) {
},
handleRemove(file, fileList) {
2024-02-22 10:47:24 +08:00
2024-01-30 17:20:29 +08:00
},
beforeUpload(flie, fileList) {
this.fileList = fileList;
},
handlSuccess(res, file) {
2024-02-21 18:38:13 +08:00
this.codes = res.code
2024-02-22 10:47:24 +08:00
this.attachList = [{ annexId: res.annexId }];
2024-01-30 17:20:29 +08:00
// this.$set(this.mediationData, "attachList", {annexId:res.annexId});
},
2024-01-20 17:20:15 +08:00
/** 获取案件详情信息 */
caseApplicationSelectByIdFn(data) {
caseApplicationSelectById(data).then(res => {
this.formData = res.data;
2024-01-25 15:10:11 +08:00
this.applicateArr = res.data.caseAttachList;
2024-01-20 17:20:15 +08:00
res.data.caseAttachList.forEach(item => {
if (item.annexType == 6) {
this.recordArr.push(item);
2024-02-22 10:47:24 +08:00
} else if (item.annexType == 7) {
2024-02-21 18:38:13 +08:00
this.recordArrMediate.push(item);
2024-01-20 17:20:15 +08:00
}
});
});
2024-01-19 18:02:16 +08:00
},
2024-01-20 17:20:15 +08:00
/** 获取用户信息 */
getUser() {
getUserProfile().then(response => {
this.user = response.data.userName;
this.userId = response.data.userId;
2024-02-22 10:47:24 +08:00
this.secretaryRoleByUserIdFn();
2024-01-20 17:20:15 +08:00
});
2024-01-19 18:02:16 +08:00
},
2024-01-20 17:20:15 +08:00
/** 发起会议 */
openmeeting() {
window.open(
2024-01-23 14:12:44 +08:00
// `http://localhost:8080/#/home?name=${this.user}&id=${this.formData.id}&userId=${this.userId}&roomId=${this.formData.roomId}&type=tiaojie`
`https://txroom.xayunmei.com/#/home?name=${this.user}&id=${this.formData.id}&userId=${this.userId}&roomId=${this.formData.roomId}&type=tiaojie`
2024-01-20 17:20:15 +08:00
);
2024-01-19 18:02:16 +08:00
},
2024-01-20 17:20:15 +08:00
/**提交仲裁结果 */
openArbitrationresults() {
2024-02-23 15:16:40 +08:00
this.recordArr = [];
2024-01-20 17:20:15 +08:00
caseApplicationSelectById({
id: this.mediationData.id
}).then(res => {
2024-02-21 18:38:13 +08:00
console.log(res)
2024-01-20 17:20:15 +08:00
res.data.caseAttachList.forEach(item => {
if (item.annexType == 6) {
this.recordArr.push(item);
}
});
});
2024-02-21 18:38:13 +08:00
confirmMeetingResult({
id: this.mediationData.id,
caseFlowId: this.mediationData.caseFlowId,
batchNumber: "",
2024-02-22 10:47:24 +08:00
mediaResult: this.mediaResult,
}).then(res => {
2024-02-21 18:38:13 +08:00
caseApplicationSelectById({
2024-02-22 10:47:24 +08:00
id: this.mediationData.id
2024-02-21 18:38:13 +08:00
}).then(res => {
res.data.caseAttachList.forEach(item => {
if (item.annexType == 7) {
this.recordArrMediate.push(item);
}
});
});
})
2024-02-26 15:44:48 +08:00
this.isSecretaryRole = false
2024-01-19 18:02:16 +08:00
},
2024-01-20 17:20:15 +08:00
/** 庭审笔录附件 */
toFile2(annexPath) {
window.open(window.location.origin + "/API" + annexPath, "_black");
},
2024-02-21 18:38:13 +08:00
toFileMediate(annexPath) {
window.open(window.location.origin + "/API" + annexPath, "_black");
},
2024-01-20 17:20:15 +08:00
/** 生成调解书 */
mediationFn(data) {
mediation(data).then(res => {
this.$modal.msgSuccess("成功");
this.$emit("cancelMediation");
this.$emit("getList", this.queryParams);
2024-02-27 18:04:27 +08:00
this.loadingSubmit = false;
2024-01-20 17:20:15 +08:00
});
},
cancel() {
this.$emit("cancelMediation");
},
2024-02-27 18:04:27 +08:00
submitMediation() {
2024-02-21 18:38:13 +08:00
if (this.fileList.length < 1 && !this.mediationType && this.mediationData.mediationMethod == "2") {
2024-01-30 17:20:29 +08:00
this.$modal.msgError("请上传调解书");
return
2024-02-27 18:04:27 +08:00
} else {
this.loadingSubmit = true;
2024-01-30 17:20:29 +08:00
}
2024-02-22 10:47:24 +08:00
let mediationVal = {}
if (this.codes == 200) {
2024-02-21 18:38:13 +08:00
mediationVal = {
2024-02-22 10:47:24 +08:00
id: this.mediationData.id,
caseFlowId: this.mediationData.caseFlowId,
attachList: this.attachList,
// isReconci:this.isReconci,
mediaResult: this.mediaResult,
2024-02-21 18:38:13 +08:00
}
2024-02-22 10:47:24 +08:00
} else {
2024-02-21 18:38:13 +08:00
mediationVal = {
2024-02-22 10:47:24 +08:00
id: this.mediationData.id,
caseFlowId: this.mediationData.caseFlowId,
mediaResult: this.mediaResult,
2024-02-21 18:38:13 +08:00
}
}
this.mediationFn(mediationVal);
2024-02-27 18:04:27 +08:00
},
2024-02-22 10:47:24 +08:00
resultsMediation() {
2024-01-20 17:20:15 +08:00
}
}
2024-01-19 18:02:16 +08:00
};
</script>
<style lang="scss" scoped>
.steps {
2024-01-20 17:20:15 +08:00
display: flex;
flex-wrap: wrap;
}
</style>