应用层PC端前端服务

formateCourtDialog.vue 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <template>
  2. <div>
  3. <!-- 组庭界面 -->
  4. <el-dialog
  5. title="组庭建议"
  6. :visible="showformateCourt"
  7. v-if="showformateCourt"
  8. @close="cancel"
  9. destroy-on-close
  10. center
  11. >
  12. <el-form label-width="150px" v-if="!noArbitrator">
  13. <el-form-item label="是否同意组庭:">
  14. <el-radio-group v-model="isAgreePendTral">
  15. <el-radio :label="1">是</el-radio>
  16. <el-radio :label="0">否</el-radio>
  17. </el-radio-group>
  18. </el-form-item>
  19. <el-tag type="warning" v-if="noArbitrator"
  20. >当前案件未指定仲裁员,请先指定仲裁员!</el-tag
  21. >
  22. <p></p>
  23. <!-- <el-form ref="form"> -->
  24. <!-- v-if="isAgreePendTral == 0 || noArbitrator" -->
  25. <div style="display: inline-flex; margin-bottom: 8px">
  26. <div v-if="isAgreePendTral == 0">请选择仲裁员</div>
  27. <div v-if="isAgreePendTral == 1 && formateCourtData.arbitratorName">
  28. 当前案件仲裁员
  29. </div>
  30. </div>
  31. <div
  32. v-if="isAgreePendTral == 1 && formateCourtData.arbitratorName"
  33. class="nowarbitrator"
  34. >
  35. <el-tag size="medium">
  36. {{ formateCourtData.arbitratorName }}
  37. </el-tag>
  38. </div>
  39. <el-form-item
  40. label="仲裁员:"
  41. v-if="noArbitrator || isAgreePendTral == 0"
  42. :rules="[
  43. {
  44. required: true,
  45. message: '仲裁员不能为空',
  46. trigger: 'blur',
  47. },
  48. ]"
  49. >
  50. <el-select
  51. placeholder="请选择仲裁员"
  52. @change="changeArbitor"
  53. v-model="Arbitor"
  54. >
  55. <el-option
  56. v-for="item in dataList"
  57. :key="item.value"
  58. :label="item.nickName"
  59. :value="item.userId"
  60. ></el-option>
  61. </el-select>
  62. </el-form-item>
  63. </el-form>
  64. <div slot="footer" class="dialog-footer">
  65. <el-button
  66. type="primary"
  67. @click="submitForm"
  68. :disabled="
  69. noArbitrator || (isAgreePendTral == 0 && arbitrators.length == 0)
  70. "
  71. class="endbutton"
  72. ><span>确 定</span></el-button
  73. >
  74. <el-button @click="cancel" class="endbutton1"
  75. ><span>取 消</span></el-button
  76. >
  77. </div>
  78. </el-dialog>
  79. </div>
  80. </template>
  81. <script>
  82. import { arbitrAtor, pendTralCheck } from "@/api/formationCourt/formationCourt";
  83. export default {
  84. props: ["showformateCourt", "formateCourtData", "queryParams"],
  85. data() {
  86. return {
  87. dataList: [],
  88. queryParams1: {
  89. pageNum: 1,
  90. pageSize: 10,
  91. },
  92. arbitrators: [],
  93. isAgreePendTral: 1,
  94. paramsdata: {},
  95. noArbitrator: false,
  96. Arbitor: "",
  97. };
  98. },
  99. created() {
  100. this.getarbitrAtor();
  101. },
  102. watch: {
  103. showformateCourt(val) {
  104. if (val) {
  105. this.isAgreePendTral = 1;
  106. }
  107. },
  108. formateCourtData: {
  109. handler(val) {
  110. if (val.arbitratorName == null) {
  111. this.noArbitrator = true;
  112. } else {
  113. this.noArbitrator = false;
  114. }
  115. },
  116. },
  117. },
  118. methods: {
  119. // 获取仲裁员信息
  120. getarbitrAtor() {
  121. arbitrAtor({}).then((res) => {
  122. this.dataList = res.rows;
  123. });
  124. },
  125. changeArbitor(val) {
  126. this.arbitrators = [];
  127. this.dataList.forEach((item) => {
  128. if (item.userId == val) {
  129. this.arbitrators.push({
  130. id: item.userId,
  131. arbitratorName: item.nickName,
  132. });
  133. }
  134. });
  135. },
  136. // 确认
  137. submitForm() {
  138. if (this.noArbitrator) {
  139. this.paramsdata = {
  140. id: this.formateCourtData.id,
  141. arbitrators: this.arbitrators,
  142. };
  143. } else {
  144. if (this.isAgreePendTral == 0) {
  145. this.paramsdata = {
  146. isAgreePendTral: 0,
  147. id: this.formateCourtData.id,
  148. arbitrators: this.arbitrators,
  149. };
  150. } else {
  151. this.paramsdata = {
  152. isAgreePendTral: 1,
  153. id: this.formateCourtData.id,
  154. };
  155. }
  156. }
  157. pendTralCheck(this.paramsdata).then((res) => {
  158. this.cancel();
  159. this.$modal.msgSuccess("组庭成功");
  160. this.$emit("getcaseApply", this.queryParams);
  161. });
  162. // }
  163. },
  164. // 取消
  165. cancel() {
  166. this.$emit("cancelcourtDialog");
  167. this.arbitrators = [];
  168. },
  169. },
  170. };
  171. </script>
  172. <style lang="scss" scoped>
  173. ::v-deep .el-dialog {
  174. background: #ffffff;
  175. border-radius: 20px;
  176. }
  177. .endbutton {
  178. width: 124px;
  179. height: 37px;
  180. background: #0072ff;
  181. border-radius: 19px;
  182. span {
  183. width: 32px;
  184. height: 15px;
  185. font-size: 16px;
  186. font-family: Microsoft YaHei;
  187. font-weight: 400;
  188. color: #ffffff;
  189. }
  190. }
  191. .endbutton1 {
  192. width: 124px;
  193. height: 37px;
  194. background: #ffffff;
  195. border: 1px solid #d0d0d0;
  196. border-radius: 19px;
  197. span {
  198. width: 31px;
  199. height: 13px;
  200. font-size: 16px;
  201. font-family: Microsoft YaHei;
  202. font-weight: 400;
  203. color: #959595;
  204. }
  205. }
  206. .infoIcon {
  207. width: 4px;
  208. // height: 17px;
  209. background-color: #0072ff;
  210. margin-right: 5px;
  211. }
  212. .nowarbitrator {
  213. margin-left: 4%;
  214. }
  215. </style>