|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+<template>
|
|
|
2
|
+ <div>
|
|
|
3
|
+ <el-dialog title="秘书确认时间" :visible="timeConfirmVisable" v-if="timeConfirmVisable" @close="cancel" center
|
|
|
4
|
+ :distroy-on-close="true">
|
|
|
5
|
+ <div style="margin-bottom: 20px;">
|
|
|
6
|
+ <el-radio-group v-model="confirmFlag">
|
|
|
7
|
+ <el-radio :label="1">同意</el-radio>
|
|
|
8
|
+ <el-radio :label="2">拒绝</el-radio>
|
|
|
9
|
+ </el-radio-group>
|
|
|
10
|
+ </div>
|
|
|
11
|
+ <div>
|
|
|
12
|
+ <div>
|
|
|
13
|
+ <div style="margin-top: 20px;margin-bottom: 20px;">时间</div>
|
|
|
14
|
+ <el-form label-position="right" label-width="80px" :model="formLabelAlign" :disabled="confirmShow">
|
|
|
15
|
+ <el-form-item label="时间">
|
|
|
16
|
+ <el-date-picker v-if="!confirmShow" v-model="formLabelAlign.time[0]" type="datetime" placeholder="选择日期时间">
|
|
|
17
|
+ </el-date-picker>
|
|
|
18
|
+ <el-input v-else v-model="formLabelAlign.name"></el-input>
|
|
|
19
|
+ </el-form-item>
|
|
|
20
|
+ </el-form>
|
|
|
21
|
+ </div>
|
|
|
22
|
+ </div>
|
|
|
23
|
+ <div slot="footer" class="dialog-footer">
|
|
|
24
|
+ <el-button @click="cancel" class="endbutton1"><span>取 消</span></el-button>
|
|
|
25
|
+ <el-button @click="submitMediator" class="endbutton1"><span>确 认</span></el-button>
|
|
|
26
|
+ </div>
|
|
|
27
|
+ </el-dialog>
|
|
|
28
|
+ </div>
|
|
|
29
|
+</template>
|
|
|
30
|
+
|
|
|
31
|
+<script>
|
|
|
32
|
+import { Message } from 'element-ui'
|
|
|
33
|
+import { listMediator, selectReservation,confirmDate } from '@/api/caseManagement/caseManagement.js'
|
|
|
34
|
+import moment from "moment";
|
|
|
35
|
+export default {
|
|
|
36
|
+ props: ["timeConfirmVisable", "timeConfirmData", "queryParams"],
|
|
|
37
|
+ data() {
|
|
|
38
|
+ return {
|
|
|
39
|
+ tableData: [],
|
|
|
40
|
+ multipleSelection: [],
|
|
|
41
|
+ formLabelAlign: {
|
|
|
42
|
+ time: [],
|
|
|
43
|
+ name:""
|
|
|
44
|
+ },
|
|
|
45
|
+ formTimeArr: [],
|
|
|
46
|
+ mediatorArr: [],
|
|
|
47
|
+ confirmFlag: 1,
|
|
|
48
|
+ confirmShow: true,
|
|
|
49
|
+ };
|
|
|
50
|
+ },
|
|
|
51
|
+ watch: {
|
|
|
52
|
+ timeConfirmVisable(val) {
|
|
|
53
|
+ if (val) {
|
|
|
54
|
+ this.confirmFlag = 1;
|
|
|
55
|
+ this.mediatorArr = [];
|
|
|
56
|
+ this.formTimeArr = [];
|
|
|
57
|
+ this.selectReservationFn({ id: this.timeConfirmData.id })
|
|
|
58
|
+ }
|
|
|
59
|
+ },
|
|
|
60
|
+ confirmFlag(val) {
|
|
|
61
|
+ if (val == 1) {
|
|
|
62
|
+ this.confirmShow = true;
|
|
|
63
|
+ console.log(this.timeConfirmData.id);
|
|
|
64
|
+ this.selectReservationFn({ id: this.timeConfirmData.id })
|
|
|
65
|
+ } else {
|
|
|
66
|
+ this.confirmShow = false;
|
|
|
67
|
+ listMediator().then(res => {
|
|
|
68
|
+ this.tableData = res.data;
|
|
|
69
|
+ })
|
|
|
70
|
+ }
|
|
|
71
|
+ }
|
|
|
72
|
+ },
|
|
|
73
|
+ methods: {
|
|
|
74
|
+ cancel() {
|
|
|
75
|
+ this.$emit("cancelTimeConfirm");
|
|
|
76
|
+ },
|
|
|
77
|
+ selectReservationFn(data) {
|
|
|
78
|
+ selectReservation(data).then(res => {
|
|
|
79
|
+ this.tableData = res.data.mediatorList;
|
|
|
80
|
+ // this.formLabelAlign.time[0] = res.data.herDates[0];
|
|
|
81
|
+ this.formLabelAlign.name = res.data.herDates[0]
|
|
|
82
|
+ })
|
|
|
83
|
+ },
|
|
|
84
|
+ /**核实时间 */
|
|
|
85
|
+ verifyMediatorFn(data) {
|
|
|
86
|
+ confirmDate(data).then(res => {
|
|
|
87
|
+ this.$modal.msgSuccess("成功");
|
|
|
88
|
+ this.$emit("cancelTimeConfirm");
|
|
|
89
|
+ this.$emit('getList', this.queryParams);
|
|
|
90
|
+ })
|
|
|
91
|
+ },
|
|
|
92
|
+ /**提交选择结果*/
|
|
|
93
|
+ async submitMediator() {
|
|
|
94
|
+ if (this.confirmFlag == 1) {
|
|
|
95
|
+ let userArr = [];
|
|
|
96
|
+ this.tableData.forEach(item => {
|
|
|
97
|
+ userArr.push({
|
|
|
98
|
+ userId: item.mediatorId,
|
|
|
99
|
+ userName: item.mediatorName
|
|
|
100
|
+ })
|
|
|
101
|
+ })
|
|
|
102
|
+ this.verifyMediatorFn({
|
|
|
103
|
+ id: this.timeConfirmData.id,
|
|
|
104
|
+ caseFlowId: this.timeConfirmData.caseFlowId,
|
|
|
105
|
+ // userList: userArr,
|
|
|
106
|
+ herDates: this.formLabelAlign.time
|
|
|
107
|
+ })
|
|
|
108
|
+ } else {
|
|
|
109
|
+ if (this.multipleSelection.length > 1) {
|
|
|
110
|
+ Message.error('最多选择一名调解员');
|
|
|
111
|
+ return
|
|
|
112
|
+ } else if (this.multipleSelection.length < 1) {
|
|
|
113
|
+ Message.error('至少选择一名调解员');
|
|
|
114
|
+ return
|
|
|
115
|
+ }
|
|
|
116
|
+ if (this.formLabelAlign.time.length < 1) {
|
|
|
117
|
+ Message.error('至少选择一个时间');
|
|
|
118
|
+ return
|
|
|
119
|
+ }
|
|
|
120
|
+ this.formLabelAlign.time.forEach(item => {
|
|
|
121
|
+ item = moment(
|
|
|
122
|
+ item
|
|
|
123
|
+ ).format("YYYY-MM-DD HH:mm:ss");
|
|
|
124
|
+ this.formTimeArr.push(item)
|
|
|
125
|
+ })
|
|
|
126
|
+ this.multipleSelection.forEach(item => {
|
|
|
127
|
+ this.mediatorArr.push({
|
|
|
128
|
+ userId: item.mediatorId,
|
|
|
129
|
+ userName: item.mediatorName
|
|
|
130
|
+ })
|
|
|
131
|
+ })
|
|
|
132
|
+ this.verifyMediatorFn({
|
|
|
133
|
+ id: this.timeConfirmData.id,
|
|
|
134
|
+ caseFlowId: this.timeConfirmData.caseFlowId,
|
|
|
135
|
+ // userList: this.mediatorArr,
|
|
|
136
|
+ herDates: this.formLabelAlign.time
|
|
|
137
|
+ })
|
|
|
138
|
+ }
|
|
|
139
|
+ },
|
|
|
140
|
+ handleSelectionChange(val) {
|
|
|
141
|
+ this.multipleSelection = val;
|
|
|
142
|
+ }
|
|
|
143
|
+ },
|
|
|
144
|
+};
|
|
|
145
|
+</script>
|
|
|
146
|
+
|
|
|
147
|
+<style lang="scss" scoped>
|
|
|
148
|
+.steps {
|
|
|
149
|
+ display: flex;
|
|
|
150
|
+ flex-wrap: wrap;
|
|
|
151
|
+}
|
|
|
152
|
+
|
|
|
153
|
+::v-deep .el-step {
|
|
|
154
|
+ // width: 150px;
|
|
|
155
|
+ flex-basis: 25% !important;
|
|
|
156
|
+ margin-right: 20px;
|
|
|
157
|
+ margin-bottom: 20px;
|
|
|
158
|
+}
|
|
|
159
|
+
|
|
|
160
|
+::v-deep .el-dialog__body {
|
|
|
161
|
+ height: 500px !important;
|
|
|
162
|
+ overflow: auto !important;
|
|
|
163
|
+}
|
|
|
164
|
+
|
|
|
165
|
+::v-deep .el-dialog {
|
|
|
166
|
+ width: 800px;
|
|
|
167
|
+ background: #ffffff;
|
|
|
168
|
+ border-radius: 20px;
|
|
|
169
|
+}
|
|
|
170
|
+
|
|
|
171
|
+.timeTitle {
|
|
|
172
|
+ width: 1000%;
|
|
|
173
|
+ text-align: center;
|
|
|
174
|
+}
|
|
|
175
|
+</style>
|