选择调解员多选调整
This commit is contained in:
@@ -2,19 +2,13 @@
|
||||
<div>
|
||||
<el-dialog title="部门长确认调解员" :visible="departmentVisable" v-if="departmentVisable" @close="cancel" center
|
||||
: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 style="margin-bottom: 20px;">调解员</div>
|
||||
<div v-if="tableDataFlag">
|
||||
<div style="margin-bottom: 20px;">选择调解员</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">
|
||||
<el-table-column type="selection" width="55" v-if="!confirmShow">
|
||||
<el-table-column type="selection" width="55">
|
||||
</el-table-column>
|
||||
<el-table-column prop="mediatorName" label="调解员名称">
|
||||
</el-table-column>
|
||||
@@ -25,28 +19,49 @@
|
||||
<el-table-column prop="completeAmount" label="已办数量">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <div>
|
||||
<div style="margin-top: 20px;margin-bottom: 20px;">时间</div>
|
||||
<el-form label-position="right" label-width="80px" :model="formLabelAlign" :disabled="confirmShow">
|
||||
<el-form-item label="时间">
|
||||
<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 style="margin-bottom: 20px;margin-top: 20px;">当前调解员</div>
|
||||
</div>
|
||||
<el-table ref="multipleTable" :data="tableDataNow" 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 style="margin-bottom: 20px;margin-top: 20px;">申请人调解员</div>
|
||||
</div>
|
||||
<el-table ref="multipleTable" :data="applicantTable" 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 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 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>
|
||||
<el-button @click="cancel" class="endbutton1"><span>取 消</span></el-button>
|
||||
<el-button @click="submitMediator" class="endbutton1"><span>确 认</span></el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -54,44 +69,34 @@
|
||||
|
||||
<script>
|
||||
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";
|
||||
export default {
|
||||
props: ["departmentVisable", "departmentData", "queryParams"],
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
tableDataNow: [],
|
||||
applicantTable: [],
|
||||
respondentTable: [],
|
||||
multipleSelection: [],
|
||||
tableDataFlag: false,
|
||||
formLabelAlign: {
|
||||
time: []
|
||||
},
|
||||
formTimeArr: [],
|
||||
mediatorArr: [],
|
||||
confirmFlag: 1,
|
||||
confirmShow: true,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
departmentVisable(val) {
|
||||
if (val) {
|
||||
this.confirmFlag = 1;
|
||||
this.mediatorArr = [];
|
||||
this.formTimeArr = [];
|
||||
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 => {
|
||||
this.tableData = res.data;
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
@@ -99,8 +104,14 @@ export default {
|
||||
},
|
||||
selectReservationFn(data) {
|
||||
selectReservation(data).then(res => {
|
||||
this.tableData = res.data.mediatorList;
|
||||
this.formLabelAlign.time[0] = res.data.herDates[0];
|
||||
this.applicantTable = res.data.mediatorList;
|
||||
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() {
|
||||
if (this.confirmFlag == 1) {
|
||||
let userArr = [];
|
||||
this.tableData.forEach(item => {
|
||||
userArr.push({
|
||||
userId: item.mediatorId,
|
||||
userName: item.mediatorName
|
||||
})
|
||||
})
|
||||
if (this.multipleSelection.length == 0 && this.tableDataNow.length > 0) {
|
||||
this.verifyMediatorFn({
|
||||
id: this.departmentData.id,
|
||||
caseFlowId: this.departmentData.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
|
||||
}
|
||||
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
|
||||
})
|
||||
mediatorId: this.tableDataNow[0].mediatorId,
|
||||
mediatorName: this.tableDataNow[0].mediatorName,
|
||||
})
|
||||
} else if (this.multipleSelection.length > 0 && this.tableDataNow.length == 0) {
|
||||
this.verifyMediatorFn({
|
||||
id: this.departmentData.id,
|
||||
caseFlowId: this.departmentData.caseFlowId,
|
||||
userList: this.mediatorArr,
|
||||
// herDates: this.formLabelAlign.time
|
||||
mediatorId: this.multipleSelection[0].mediatorId,
|
||||
mediatorName: this.multipleSelection[0].mediatorName,
|
||||
})
|
||||
} else if (this.multipleSelection.length > 1 && this.tableDataNow.length == 0) {
|
||||
Message.error('最多选择一名调解员');
|
||||
return
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
console.log(val, "PPPPPPPPPPPPPPPPPPPP");
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user