选择调解员多选调整 #27

Merged
hanchaobo merged 1 commits from hcb into dev 2024-01-30 01:29:58 +00:00
4 changed files with 180 additions and 218 deletions
@@ -2,19 +2,13 @@
<div> <div>
<el-dialog title="秘书确认调解员" :visible="confirmVisable" v-if="confirmVisable" @close="cancel" center <el-dialog title="秘书确认调解员" :visible="confirmVisable" v-if="confirmVisable" @close="cancel" center
:distroy-on-close="true"> :distroy-on-close="true">
<div style="margin-bottom: 20px;">
<el-radio-group v-model="confirmFlag">
<el-radio :label="1">同意</el-radio>
<el-radio :label="2">拒绝</el-radio>
</el-radio-group>
</div>
<div> <div>
<div> <div v-if="tableDataFlag">
<div style="margin-bottom: 20px;">调解员</div> <div style="margin-bottom: 20px;">选择调解员</div>
</div> </div>
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" <el-table v-if="tableDataFlag" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" v-if="!confirmShow"> <el-table-column type="selection" width="55">
</el-table-column> </el-table-column>
<el-table-column prop="mediatorName" label="调解员名称"> <el-table-column prop="mediatorName" label="调解员名称">
</el-table-column> </el-table-column>
@@ -25,24 +19,45 @@
<el-table-column prop="completeAmount" label="已办数量"> <el-table-column prop="completeAmount" label="已办数量">
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <div> <div>
<div style="margin-top: 20px;margin-bottom: 20px;">时间</div> <div style="margin-bottom: 20px;margin-top: 20px;">当前调解员</div>
<el-form label-position="right" label-width="80px" :model="formLabelAlign" :disabled="confirmShow"> </div>
<el-form-item label="时间"> <el-table ref="multipleTable" :data="tableDataNow" tooltip-effect="dark" style="width: 100%">
<el-date-picker v-model="formLabelAlign.time[0]" type="datetime" placeholder="选择日期时间"> <el-table-column prop="mediatorName" label="调解员名称">
</el-date-picker> </el-table-column>
</el-form-item> --> <!-- <el-table-column prop="specialty" label="专业">
<!-- 后期需要三个时间 --> </el-table-column>
<!-- <el-form-item label="时间2"> <el-table-column prop="todoAmount" label="待办数量">
<el-date-picker v-model="formLabelAlign.time[1]" type="datetime" placeholder="选择日期时间"> </el-table-column>
</el-date-picker> <el-table-column prop="completeAmount" label="已办数量">
</el-form-item> </el-table-column> -->
<el-form-item label="时间3"> </el-table>
<el-date-picker v-model="formLabelAlign.time[2]" type="datetime" placeholder="选择日期时间"> <div>
</el-date-picker> <div style="margin-bottom: 20px;margin-top: 20px;">申请人调解员</div>
</el-form-item> --> </div>
<!-- </el-form> <el-table ref="multipleTable" :data="applicantTable" tooltip-effect="dark" style="width: 100%">
</div> --> <el-table-column prop="mediatorName" label="调解员名称">
</el-table-column>
<!-- <el-table-column prop="specialty" label="专业">
</el-table-column>
<el-table-column prop="todoAmount" label="待办数量">
</el-table-column>
<el-table-column prop="completeAmount" label="已办数量">
</el-table-column> -->
</el-table>
<div>
<div style="margin-bottom: 20px;margin-top: 20px;">被申请人调解员</div>
</div>
<el-table ref="multipleTable" :data="respondentTable" tooltip-effect="dark" style="width: 100%">
<el-table-column prop="mediatorName" label="调解员名称">
</el-table-column>
<!-- <el-table-column prop="specialty" label="专业">
</el-table-column>
<el-table-column prop="todoAmount" label="待办数量">
</el-table-column>
<el-table-column prop="completeAmount" label="已办数量">
</el-table-column> -->
</el-table>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1"><span>取 消</span></el-button> <el-button @click="cancel" class="endbutton1"><span>取 消</span></el-button>
@@ -61,37 +76,27 @@ export default {
data() { data() {
return { return {
tableData: [], tableData: [],
tableDataNow: [],
applicantTable: [],
respondentTable: [],
multipleSelection: [], multipleSelection: [],
tableDataFlag: false,
formLabelAlign: { formLabelAlign: {
time: [] time: []
}, },
formTimeArr: [],
mediatorArr: [], mediatorArr: [],
confirmFlag: 1,
confirmShow: true,
}; };
}, },
watch: { watch: {
confirmVisable(val) { confirmVisable(val) {
if (val) { if (val) {
this.confirmFlag = 1;
this.mediatorArr = []; this.mediatorArr = [];
this.formTimeArr = [];
this.selectReservationFn({ id: this.confirmData.id }) this.selectReservationFn({ id: this.confirmData.id })
}
},
confirmFlag(val) {
if (val == 1) {
this.confirmShow = true;
console.log(this.confirmData.id);
this.selectReservationFn({ id: this.confirmData.id })
} else {
this.confirmShow = false;
listMediator().then(res => { listMediator().then(res => {
this.tableData = res.data; this.tableData = res.data;
}) })
} }
} },
}, },
methods: { methods: {
cancel() { cancel() {
@@ -99,8 +104,14 @@ export default {
}, },
selectReservationFn(data) { selectReservationFn(data) {
selectReservation(data).then(res => { selectReservation(data).then(res => {
this.tableData = res.data.mediatorList; this.applicantTable = res.data.mediatorList;
this.formLabelAlign.time[0] = res.data.herDates[0]; this.respondentTable = res.data.resMediatorList;
this.tableDataNow = [{ mediatorId: res.data.mediatorId, mediatorName: res.data.mediatorName }];
if (this.tableDataNow.length > 0) {
this.tableDataFlag = false;
} else {
this.tableDataFlag = true;
}
}) })
}, },
/**核实调解员 */ /**核实调解员 */
@@ -113,54 +124,62 @@ export default {
}, },
/**提交选择结果*/ /**提交选择结果*/
async submitMediator() { async submitMediator() {
if (this.confirmFlag == 1) { if (this.multipleSelection.length == 0 && this.tableDataNow.length > 0) {
let userArr = [];
this.tableData.forEach(item => {
userArr.push({
userId: item.mediatorId,
userName: item.mediatorName
})
})
this.verifyMediatorFn({ this.verifyMediatorFn({
id: this.confirmData.id, id: this.confirmData.id,
caseFlowId: this.confirmData.caseFlowId, caseFlowId: this.confirmData.caseFlowId,
userList: userArr, mediatorId: this.tableDataNow[0].mediatorId,
// herDates: this.formLabelAlign.time mediatorName: this.tableDataNow[0].mediatorName,
})
} else {
if (this.multipleSelection.length > 1) {
Message.error('最多选择一名调解员');
return
} else if (this.multipleSelection.length < 1) {
Message.error('至少选择一名调解员');
return
}
if (this.formLabelAlign.time.length < 1) {
Message.error('至少选择一个时间');
return
}
this.formLabelAlign.time.forEach(item => {
item = moment(
item
).format("YYYY-MM-DD HH:mm:ss");
this.formTimeArr.push(item)
})
this.multipleSelection.forEach(item => {
this.mediatorArr.push({
userId: item.mediatorId,
userName: item.mediatorName
})
}) })
} else if (this.multipleSelection.length > 0 && this.tableDataNow.length == 0) {
this.verifyMediatorFn({ this.verifyMediatorFn({
id: this.confirmData.id, id: this.confirmData.id,
caseFlowId: this.confirmData.caseFlowId, caseFlowId: this.confirmData.caseFlowId,
userList: this.mediatorArr, mediatorId: this.multipleSelection[0].mediatorId,
// herDates: this.formLabelAlign.time mediatorName: this.multipleSelection[0].mediatorName,
}) })
} else if (this.multipleSelection.length > 1 && this.tableDataNow.length == 0) {
Message.error('最多选择一名调解员');
return
} }
// if (this.confirmFlag == 1) {
// let userArr = [];
// this.tableData.forEach(item => {
// userArr.push({
// userId: item.mediatorId,
// userName: item.mediatorName
// })
// })
// this.verifyMediatorFn({
// id: this.confirmData.id,
// caseFlowId: this.confirmData.caseFlowId,
// userList: userArr,
// // herDates: this.formLabelAlign.time
// })
// } else {
// if (this.multipleSelection.length > 1) {
// Message.error('最多选择一名调解员');
// return
// } else if (this.multipleSelection.length < 1) {
// Message.error('至少选择一名调解员');
// return
// }
// this.multipleSelection.forEach(item => {
// this.mediatorArr.push({
// userId: item.mediatorId,
// userName: item.mediatorName
// })
// })
// this.verifyMediatorFn({
// id: this.confirmData.id,
// caseFlowId: this.confirmData.caseFlowId,
// userList: this.mediatorArr,
// })
// }
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
console.log(val, "PPPPPPPPPPPPPPPPPPPP");
} }
}, },
}; };
@@ -2,19 +2,13 @@
<div> <div>
<el-dialog title="部门长确认调解员" :visible="departmentVisable" v-if="departmentVisable" @close="cancel" center <el-dialog title="部门长确认调解员" :visible="departmentVisable" v-if="departmentVisable" @close="cancel" center
:distroy-on-close="true"> :distroy-on-close="true">
<div style="margin-bottom: 20px;">
<el-radio-group v-model="confirmFlag">
<el-radio :label="1">同意</el-radio>
<el-radio :label="2">拒绝</el-radio>
</el-radio-group>
</div>
<div> <div>
<div> <div v-if="tableDataFlag">
<div style="margin-bottom: 20px;">调解员</div> <div style="margin-bottom: 20px;">选择调解员</div>
</div> </div>
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" <el-table v-if="tableDataFlag" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" v-if="!confirmShow"> <el-table-column type="selection" width="55">
</el-table-column> </el-table-column>
<el-table-column prop="mediatorName" label="调解员名称"> <el-table-column prop="mediatorName" label="调解员名称">
</el-table-column> </el-table-column>
@@ -25,28 +19,49 @@
<el-table-column prop="completeAmount" label="已办数量"> <el-table-column prop="completeAmount" label="已办数量">
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <div> <div>
<div style="margin-top: 20px;margin-bottom: 20px;">时间</div> <div style="margin-bottom: 20px;margin-top: 20px;">当前调解员</div>
<el-form label-position="right" label-width="80px" :model="formLabelAlign" :disabled="confirmShow"> </div>
<el-form-item label="时间"> <el-table ref="multipleTable" :data="tableDataNow" tooltip-effect="dark" style="width: 100%">
<el-date-picker v-model="formLabelAlign.time[0]" type="datetime" placeholder="选择日期时间"> <el-table-column prop="mediatorName" label="调解员名称">
</el-date-picker> </el-table-column>
</el-form-item> --> <!-- <el-table-column prop="specialty" label="专业">
<!-- 后期需要三个时间 --> </el-table-column>
<!-- <el-form-item label="时间2"> <el-table-column prop="todoAmount" label="待办数量">
<el-date-picker v-model="formLabelAlign.time[1]" type="datetime" placeholder="选择日期时间"> </el-table-column>
</el-date-picker> <el-table-column prop="completeAmount" label="已办数量">
</el-form-item> </el-table-column> -->
<el-form-item label="时间3"> </el-table>
<el-date-picker v-model="formLabelAlign.time[2]" type="datetime" placeholder="选择日期时间"> <div>
</el-date-picker> <div style="margin-bottom: 20px;margin-top: 20px;">申请人调解员</div>
</el-form-item> --> </div>
<!-- </el-form> <el-table ref="multipleTable" :data="applicantTable" tooltip-effect="dark" style="width: 100%">
</div> --> <el-table-column prop="mediatorName" label="调解员名称">
</el-table-column>
<!-- <el-table-column prop="specialty" label="专业">
</el-table-column>
<el-table-column prop="todoAmount" label="待办数量">
</el-table-column>
<el-table-column prop="completeAmount" label="已办数量">
</el-table-column> -->
</el-table>
<div>
<div style="margin-bottom: 20px;margin-top: 20px;">被申请人调解员</div>
</div>
<el-table ref="multipleTable" :data="respondentTable" tooltip-effect="dark" style="width: 100%">
<el-table-column prop="mediatorName" label="调解员名称">
</el-table-column>
<!-- <el-table-column prop="specialty" label="专业">
</el-table-column>
<el-table-column prop="todoAmount" label="待办数量">
</el-table-column>
<el-table-column prop="completeAmount" label="已办数量">
</el-table-column> -->
</el-table>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1" round><span>取 消</span></el-button> <el-button @click="cancel" class="endbutton1"><span>取 消</span></el-button>
<el-button @click="submitMediator" class="endbutton1" type="primary" round><span>确 认</span></el-button> <el-button @click="submitMediator" class="endbutton1"><span>确 认</span></el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@@ -54,44 +69,34 @@
<script> <script>
import { Message } from 'element-ui' import { Message } from 'element-ui'
import { listMediator, selectReservation, verifyMediator } from '@/api/caseManagement/caseManagement.js' import { listMediator, updateBooking, selectReservation, verifyMediator } from '@/api/caseManagement/caseManagement.js'
import moment from "moment"; import moment from "moment";
export default { export default {
props: ["departmentVisable", "departmentData", "queryParams"], props: ["departmentVisable", "departmentData", "queryParams"],
data() { data() {
return { return {
tableData: [], tableData: [],
tableDataNow: [],
applicantTable: [],
respondentTable: [],
multipleSelection: [], multipleSelection: [],
tableDataFlag: false,
formLabelAlign: { formLabelAlign: {
time: [] time: []
}, },
formTimeArr: [],
mediatorArr: [], mediatorArr: [],
confirmFlag: 1,
confirmShow: true,
}; };
}, },
watch: { watch: {
departmentVisable(val) { departmentVisable(val) {
if (val) { if (val) {
this.confirmFlag = 1;
this.mediatorArr = []; this.mediatorArr = [];
this.formTimeArr = [];
this.selectReservationFn({ id: this.departmentData.id }) this.selectReservationFn({ id: this.departmentData.id })
}
},
confirmFlag(val) {
if (val == 1) {
this.confirmShow = true;
console.log(this.departmentData.id);
this.selectReservationFn({ id: this.departmentData.id })
} else {
this.confirmShow = false;
listMediator().then(res => { listMediator().then(res => {
this.tableData = res.data; this.tableData = res.data;
}) })
} }
} },
}, },
methods: { methods: {
cancel() { cancel() {
@@ -99,8 +104,14 @@ export default {
}, },
selectReservationFn(data) { selectReservationFn(data) {
selectReservation(data).then(res => { selectReservation(data).then(res => {
this.tableData = res.data.mediatorList; this.applicantTable = res.data.mediatorList;
this.formLabelAlign.time[0] = res.data.herDates[0]; this.respondentTable = res.data.resMediatorList;
this.tableDataNow = [{ mediatorId: res.data.mediatorId, mediatorName: res.data.mediatorName }];
if (this.tableDataNow.length > 0) {
this.tableDataFlag = false;
} else {
this.tableDataFlag = true;
}
}) })
}, },
/**核实调解员 */ /**核实调解员 */
@@ -113,54 +124,28 @@ export default {
}, },
/**提交选择结果*/ /**提交选择结果*/
async submitMediator() { async submitMediator() {
if (this.confirmFlag == 1) { if (this.multipleSelection.length == 0 && this.tableDataNow.length > 0) {
let userArr = [];
this.tableData.forEach(item => {
userArr.push({
userId: item.mediatorId,
userName: item.mediatorName
})
})
this.verifyMediatorFn({ this.verifyMediatorFn({
id: this.departmentData.id, id: this.departmentData.id,
caseFlowId: this.departmentData.caseFlowId, caseFlowId: this.departmentData.caseFlowId,
userList: userArr, mediatorId: this.tableDataNow[0].mediatorId,
// herDates: this.formLabelAlign.time mediatorName: this.tableDataNow[0].mediatorName,
})
} else {
if (this.multipleSelection.length > 1) {
Message.error('最多选择一名调解员');
return
} else if (this.multipleSelection.length < 1) {
Message.error('至少选择一名调解员');
return
}
if (this.formLabelAlign.time.length < 1) {
Message.error('至少选择一个时间');
return
}
this.formLabelAlign.time.forEach(item => {
item = moment(
item
).format("YYYY-MM-DD HH:mm:ss");
this.formTimeArr.push(item)
})
this.multipleSelection.forEach(item => {
this.mediatorArr.push({
userId: item.mediatorId,
userName: item.mediatorName
})
}) })
} else if (this.multipleSelection.length > 0 && this.tableDataNow.length == 0) {
this.verifyMediatorFn({ this.verifyMediatorFn({
id: this.departmentData.id, id: this.departmentData.id,
caseFlowId: this.departmentData.caseFlowId, caseFlowId: this.departmentData.caseFlowId,
userList: this.mediatorArr, mediatorId: this.multipleSelection[0].mediatorId,
// herDates: this.formLabelAlign.time mediatorName: this.multipleSelection[0].mediatorName,
}) })
} else if (this.multipleSelection.length > 1 && this.tableDataNow.length == 0) {
Message.error('最多选择一名调解员');
return
} }
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
console.log(val, "PPPPPPPPPPPPPPPPPPPP");
} }
}, },
}; };
@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-dialog title="预约时间/调解员" :visible="mediatorVisable" v-if="mediatorVisable" @close="cancel" center :distroy-on-close="true"> <el-dialog title="预约调解员" :visible="mediatorVisable" v-if="mediatorVisable" @close="cancel" center :distroy-on-close="true">
<div> <div>
<div> <div>
<div style="margin-bottom: 20px;">预约调解员</div> <div style="margin-bottom: 20px;">预约调解员</div>
@@ -18,24 +18,6 @@
<el-table-column prop="completeAmount" label="已办数量"> <el-table-column prop="completeAmount" label="已办数量">
</el-table-column> </el-table-column>
</el-table> </el-table>
<div>
<div style="margin-top: 20px;margin-bottom: 20px;">预约时间</div>
<el-form label-position="right" label-width="80px" :model="formLabelAlign">
<el-form-item label="时间1">
<el-date-picker v-model="formLabelAlign.time[0]" type="datetime" placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<!-- 后期需要三个时间 -->
<!-- <el-form-item label="时间2">
<el-date-picker v-model="formLabelAlign.time[1]" type="datetime" placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="时间3">
<el-date-picker v-model="formLabelAlign.time[2]" type="datetime" placeholder="选择日期时间">
</el-date-picker>
</el-form-item> -->
</el-form>
</div>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1" round><span>取 消</span></el-button> <el-button @click="cancel" class="endbutton1" round><span>取 消</span></el-button>
@@ -59,17 +41,12 @@ export default {
formLabelAlign: { formLabelAlign: {
time:[] time:[]
}, },
formTimeArr:[],
mediatorArr:[] mediatorArr:[]
}; };
}, },
watch: { watch: {
mediatorVisable(val) { mediatorVisable(val) {
if (val) { if (val) {
// this.this.multipleSelection = [];
// this.formLabelAlign.time = [];
this.mediatorArr = [];
this.formTimeArr = [];
listMediator().then(res=>{ listMediator().then(res=>{
this.tableData = res.data; this.tableData = res.data;
}) })
@@ -82,37 +59,24 @@ export default {
}, },
/**提交选择结果*/ /**提交选择结果*/
async submitMediator() { async submitMediator() {
if (this.multipleSelection.length > 1) { if (this.multipleSelection.length > 3) {
Message.error('最多选择一名调解员'); Message.error('最多选择三名调解员');
return return
}else if(this.multipleSelection.length < 1){ }else if(this.multipleSelection.length < 1){
Message.error('至少选择一名调解员'); Message.error('请选择调解员');
return return
} }
if(this.formLabelAlign.time.length < 1){ this.mediatorArr = [];
Message.error('至少选择一个时间');
return
}
this.formLabelAlign.time.forEach(item=>{
item = moment(
item
).format("YYYY-MM-DD HH:mm:ss");
this.formTimeArr.push(item)
})
this.multipleSelection.forEach(item=>{ this.multipleSelection.forEach(item=>{
this.mediatorArr.push({ this.mediatorArr.push({
userId:item.mediatorId, mediatorId:item.mediatorId,
userName:item.mediatorName mediatorName:item.mediatorName
}) })
}) })
// await this.createRoomIdFn({
// caseId:this.mediatorData.id
// })
await this.updateBookingFn({ await this.updateBookingFn({
id:this.mediatorData.id, id:this.mediatorData.id,
caseFlowId:this.mediatorData.caseFlowId, caseFlowId:this.mediatorData.caseFlowId,
userList:this.mediatorArr, mediatorList:this.mediatorArr,
herDates:this.formTimeArr
}) })
}, },
async updateBookingFn(data){ async updateBookingFn(data){
@@ -122,12 +86,6 @@ export default {
this.$emit('getList', this.queryParams); this.$emit('getList', this.queryParams);
}) })
}, },
// 生成会议房间号
async createRoomIdFn(data){
await createRoomId(data).then(res=>{
console.log(res,"房间号");
})
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
// console.log(this.multipleSelection,"LLLLLLLLLLLLLLLLL"); // console.log(this.multipleSelection,"LLLLLLLLLLLLLLLLL");
+3 -3
View File
@@ -12,10 +12,10 @@ const name = process.env.VUE_APP_TITLE || '调解系统' // 网页标题
const port = process.env.port || process.env.npm_config_port || 80 // 端口 const port = process.env.port || process.env.npm_config_port || 80 // 端口
// const API = 'http://121.40.189.20:9001' //生产 // const API = 'http://121.40.189.20:9001' //生产
const API = 'http://121.40.189.20:6001' //测试 // const API = 'http://121.40.189.20:6001' //测试
// const API = 'http://192.168.3.18:6001' //B // const API = 'http://192.168.3.18:6001' //B
// const API = 'http://192.168.3.77:9001' //Q // const API = 'http://192.168.3.77:6001' //Q
// const API = 'http://172.16.1.14:6001' //w const API = 'http://172.16.1.17:6001' //w
// vue.config.js 配置说明 // vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions