Files
Arbitrate-Frontend/src/views/caseManagement/components/formateCourtDialog.vue
T

248 lines
6.3 KiB
Vue
Raw Normal View History

2023-09-18 21:55:43 +08:00
<template>
<div>
<!-- 组庭界面 -->
<el-dialog
2024-05-16 16:10:49 +08:00
title="组庭审核"
2023-09-18 21:55:43 +08:00
:visible="showformateCourt"
2023-10-27 15:18:15 +08:00
v-if="showformateCourt"
2023-09-18 21:55:43 +08:00
@close="cancel"
2023-10-27 15:18:15 +08:00
destroy-on-close
2023-09-21 16:06:45 +08:00
center
2023-09-18 21:55:43 +08:00
>
2023-11-13 21:50:06 +08:00
<el-form
ref="formateCourtform"
:model="formateCourtform"
label-width="110px"
label-position="left"
>
2024-05-16 16:10:49 +08:00
<!-- <el-form-item label="是否同意组庭:">
<el-radio-group v-model="isAgreePendTral" @change="radioValue">
2023-09-18 21:55:43 +08:00
<el-radio :label="1">是</el-radio>
<el-radio :label="0">否</el-radio>
</el-radio-group>
2024-05-16 16:10:49 +08:00
</el-form-item> -->
<!-- <el-tag type="warning" v-if="noArbitrator"
2023-11-13 21:50:06 +08:00
>当前案件未指定仲裁员,请先指定仲裁员!</el-tag
2024-05-16 16:10:49 +08:00
> -->
<!-- <p></p> -->
2023-11-13 21:50:06 +08:00
<!-- <el-form ref="form"> -->
<!-- v-if="isAgreePendTral == 0 || noArbitrator" -->
<div style="display: inline-flex; margin-bottom: 8px">
<div v-if="isAgreePendTral !== 1">请选择仲裁员</div>
<div v-if="isAgreePendTral == 1 && formateCourtData.arbitratorName">
当前案件仲裁员
</div>
</div>
<div
v-if="isAgreePendTral == 1 && formateCourtData.arbitratorName"
class="nowarbitrator"
>
<el-tag size="medium">
{{ formateCourtData.arbitratorName }}
</el-tag>
</div>
<el-form-item
label="仲裁员:"
prop="Arbitor"
v-if="noArbitrator || isAgreePendTral == 0"
:rules="[
{
required: true,
message: '仲裁员不能为空',
},
]"
>
<el-select
placeholder="请选择仲裁员"
@change="changeArbitor"
v-model="formateCourtform.Arbitor"
clearable
>
<el-option
v-for="item in dataList"
:key="item.value"
2023-12-26 17:57:09 +08:00
:label="item.nickNameAndNum"
2023-11-13 21:50:06 +08:00
:value="item.userId"
></el-option>
</el-select>
</el-form-item>
2023-09-18 21:55:43 +08:00
</el-form>
<div slot="footer" class="dialog-footer">
2024-05-08 17:07:11 +08:00
<el-button type="primary" @click="submitForm" class="endbutton" :loading="loadingSubmit"
2023-09-21 16:06:45 +08:00
><span>确 定</span></el-button
>
<el-button @click="cancel" class="endbutton1"
><span>取 消</span></el-button
2023-09-18 21:55:43 +08:00
>
</div>
</el-dialog>
</div>
</template>
<script>
import { arbitrAtor, pendTralCheck } from "@/api/formationCourt/formationCourt";
export default {
2023-09-21 09:40:04 +08:00
props: ["showformateCourt", "formateCourtData", "queryParams"],
2023-09-18 21:55:43 +08:00
data() {
return {
dataList: [],
2024-05-08 17:07:11 +08:00
loadingSubmit: false,
2023-09-21 09:40:04 +08:00
queryParams1: {
2023-09-18 21:55:43 +08:00
pageNum: 1,
pageSize: 10,
},
2023-11-13 21:50:06 +08:00
formateCourtform: {},
2023-09-18 21:55:43 +08:00
arbitrators: [],
isAgreePendTral: 1,
paramsdata: {},
noArbitrator: false,
2023-11-13 21:50:06 +08:00
Arbitor: "",
2023-09-18 21:55:43 +08:00
};
},
created() {
2024-05-08 17:07:11 +08:00
// this.getarbitrAtor();
2023-09-18 21:55:43 +08:00
},
watch: {
2023-11-13 19:34:18 +08:00
showformateCourt(val){
2023-12-29 17:26:45 +08:00
console.log(this.formateCourtData)
2023-11-16 10:34:15 +08:00
this.Arbitor = ""
2023-11-13 19:34:18 +08:00
if(val){
2023-10-27 15:18:15 +08:00
this.isAgreePendTral = 1;
2024-05-08 17:07:11 +08:00
this.getarbitrAtor({caseId:this.formateCourtData.id});
2023-10-27 15:18:15 +08:00
}
},
formateCourtData: {
handler(val) {
if (val.arbitratorName == null) {
2023-10-12 15:54:30 +08:00
this.noArbitrator = true;
} else {
2023-10-12 15:54:30 +08:00
this.noArbitrator = false;
}
},
},
},
2023-09-18 21:55:43 +08:00
methods: {
// 获取仲裁员信息
2024-05-08 17:07:11 +08:00
getarbitrAtor(val) {
console.log(val,"ppppppppppppppppppp")
arbitrAtor(val).then((res) => {
2024-05-10 17:45:48 +08:00
this.dataList = res.data;
2023-09-18 21:55:43 +08:00
});
},
changeArbitor(val) {
2023-09-18 21:55:43 +08:00
this.arbitrators = [];
this.dataList.forEach((item) => {
if (item.userId == val) {
this.arbitrators.push({
id: item.userId,
arbitratorName: item.nickName,
});
}
2023-11-13 21:50:06 +08:00
});
2023-09-18 21:55:43 +08:00
},
// 确认
submitForm() {
2023-10-12 15:54:30 +08:00
if (this.noArbitrator) {
2023-09-18 21:55:43 +08:00
this.paramsdata = {
id: this.formateCourtData.id,
arbitrators: this.arbitrators,
2024-05-08 17:07:11 +08:00
arbitratorId:this.formateCourtData.arbitratorId,
arbitratorName:this.formateCourtData.arbitratorName
2023-09-18 21:55:43 +08:00
};
} else {
2023-10-12 15:54:30 +08:00
if (this.isAgreePendTral == 0) {
this.paramsdata = {
isAgreePendTral: 0,
id: this.formateCourtData.id,
arbitrators: this.arbitrators,
2024-05-08 17:07:11 +08:00
arbitratorId:this.formateCourtData.arbitratorId,
arbitratorName:this.formateCourtData.arbitratorName
2023-10-12 15:54:30 +08:00
};
} else {
this.paramsdata = {
isAgreePendTral: 1,
id: this.formateCourtData.id,
2024-05-08 17:07:11 +08:00
arbitratorId:this.formateCourtData.arbitratorId,
arbitratorName:this.formateCourtData.arbitratorName
2023-10-12 15:54:30 +08:00
};
}
2023-09-18 21:55:43 +08:00
}
2024-05-08 17:07:11 +08:00
console.log(this.paramsdata)
2023-11-13 21:50:06 +08:00
this.$refs["formateCourtform"].validate((valid) => {
if (valid) {
2024-05-08 17:07:11 +08:00
this.loadingSubmit = true;
2023-11-13 21:50:06 +08:00
pendTralCheck(this.paramsdata).then((res) => {
2023-11-13 21:50:06 +08:00
this.cancel();
this.$modal.msgSuccess("组庭成功");
this.$emit("getcaseApply", this.queryParams);
2024-05-08 17:07:11 +08:00
this.loadingSubmit = false;
// 初始化页面
this.formateCourtform={}
2024-05-08 17:07:11 +08:00
}).catch((err) => {
this.loadingSubmit = false;
});;
2023-11-13 21:50:06 +08:00
}
2023-09-18 21:55:43 +08:00
});
},
// 取消
cancel() {
this.$emit("cancelcourtDialog");
this.arbitrators = [];
},
radioValue(val){
if(val==1){
this.formateCourtform={}
}else if(val==0){
this.formateCourtform={}
}
}
2023-09-18 21:55:43 +08:00
},
};
</script>
<style lang="scss" scoped>
2023-09-21 16:06:45 +08:00
::v-deep .el-dialog {
background: #ffffff;
border-radius: 20px;
}
.endbutton {
width: 124px;
height: 37px;
background: #0072ff;
border-radius: 19px;
span {
width: 32px;
height: 15px;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}
}
.endbutton1 {
width: 124px;
height: 37px;
background: #ffffff;
border: 1px solid #d0d0d0;
border-radius: 19px;
span {
width: 31px;
height: 13px;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #959595;
}
}
2023-10-08 13:47:19 +08:00
.infoIcon {
width: 4px;
// height: 17px;
background-color: #0072ff;
margin-right: 5px;
}
2023-10-14 11:32:17 +08:00
.nowarbitrator {
margin-left: 4%;
}
2023-09-18 21:55:43 +08:00
</style>