调解系统PC端服务

timeConfirm.vue 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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.name" 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. <script>
  31. import { Message } from 'element-ui'
  32. import { listMediator, selectReservation,confirmDate } from '@/api/caseManagement/caseManagement.js'
  33. import { createRoomId } from '@/api/metting/metting.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. createRoomIdFn(data){
  94. createRoomId(data).then(res=>{
  95. console.log(res,"房间号");
  96. })
  97. },
  98. /**提交选择结果*/
  99. async submitMediator() {
  100. this.createRoomIdFn({
  101. caseId:this.timeConfirmData.id
  102. })
  103. if (this.confirmFlag == 1) {
  104. let userArr = [];
  105. this.tableData.forEach(item => {
  106. userArr.push({
  107. userId: item.mediatorId,
  108. userName: item.mediatorName
  109. })
  110. })
  111. this.verifyMediatorFn({
  112. id: this.timeConfirmData.id,
  113. caseFlowId: this.timeConfirmData.caseFlowId,
  114. // userList: userArr,
  115. herDates: [this.formLabelAlign.name]
  116. })
  117. } else {
  118. // if (this.multipleSelection.length > 1) {
  119. // Message.error('最多选择一名调解员');
  120. // return
  121. // } else if (this.multipleSelection.length < 1) {
  122. // Message.error('至少选择一名调解员');
  123. // return
  124. // }
  125. if (this.formLabelAlign.name == '') {
  126. Message.error('至少选择一个时间');
  127. return
  128. }
  129. this.formLabelAlign.time.forEach(item => {
  130. item = moment(
  131. item
  132. ).format("YYYY-MM-DD HH:mm:ss");
  133. this.formTimeArr.push(item)
  134. })
  135. this.multipleSelection.forEach(item => {
  136. this.mediatorArr.push({
  137. userId: item.mediatorId,
  138. userName: item.mediatorName
  139. })
  140. })
  141. this.verifyMediatorFn({
  142. id: this.timeConfirmData.id,
  143. caseFlowId: this.timeConfirmData.caseFlowId,
  144. herDates: [this.formLabelAlign.name]
  145. })
  146. }
  147. },
  148. handleSelectionChange(val) {
  149. this.multipleSelection = val;
  150. }
  151. },
  152. };
  153. </script>
  154. <style lang="scss" scoped>
  155. .steps {
  156. display: flex;
  157. flex-wrap: wrap;
  158. }
  159. ::v-deep .el-step {
  160. // width: 150px;
  161. flex-basis: 25% !important;
  162. margin-right: 20px;
  163. margin-bottom: 20px;
  164. }
  165. ::v-deep .el-dialog__body {
  166. height: 500px !important;
  167. overflow: auto !important;
  168. }
  169. ::v-deep .el-dialog {
  170. width: 800px;
  171. background: #ffffff;
  172. border-radius: 20px;
  173. }
  174. .timeTitle {
  175. width: 1000%;
  176. text-align: center;
  177. }
  178. </style>