调解系统PC端服务

formateCourtDialog.vue 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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
  13. ref="formateCourtform"
  14. :model="formateCourtform"
  15. label-width="110px"
  16. label-position="left"
  17. >
  18. <el-form-item label="是否同意组庭:">
  19. <el-radio-group v-model="isAgreePendTral" @change="radioValue">
  20. <el-radio :label="1">是</el-radio>
  21. <el-radio :label="0">否</el-radio>
  22. </el-radio-group>
  23. </el-form-item>
  24. <el-tag type="warning" v-if="noArbitrator"
  25. >当前案件未指定仲裁员,请先指定仲裁员!</el-tag
  26. >
  27. <p></p>
  28. <!-- <el-form ref="form"> -->
  29. <!-- v-if="isAgreePendTral == 0 || noArbitrator" -->
  30. <div style="display: inline-flex; margin-bottom: 8px">
  31. <div v-if="isAgreePendTral !== 1">请选择仲裁员</div>
  32. <div v-if="isAgreePendTral == 1 && formateCourtData.arbitratorName">
  33. 当前案件仲裁员
  34. </div>
  35. </div>
  36. <div
  37. v-if="isAgreePendTral == 1 && formateCourtData.arbitratorName"
  38. class="nowarbitrator"
  39. >
  40. <el-tag size="medium">
  41. {{ formateCourtData.arbitratorName }}
  42. </el-tag>
  43. </div>
  44. <el-form-item
  45. label="仲裁员:"
  46. prop="Arbitor"
  47. v-if="noArbitrator || isAgreePendTral == 0"
  48. :rules="[
  49. {
  50. required: true,
  51. message: '仲裁员不能为空',
  52. },
  53. ]"
  54. >
  55. <el-select
  56. placeholder="请选择仲裁员"
  57. @change="changeArbitor"
  58. v-model="formateCourtform.Arbitor"
  59. clearable
  60. >
  61. <el-option
  62. v-for="item in dataList"
  63. :key="item.value"
  64. :label="item.nickNameAndNum"
  65. :value="item.userId"
  66. ></el-option>
  67. </el-select>
  68. </el-form-item>
  69. </el-form>
  70. <div slot="footer" class="dialog-footer">
  71. <el-button type="primary" @click="submitForm" 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. formateCourtform: {},
  93. arbitrators: [],
  94. isAgreePendTral: 1,
  95. paramsdata: {},
  96. noArbitrator: false,
  97. Arbitor: "",
  98. };
  99. },
  100. created() {
  101. this.getarbitrAtor();
  102. },
  103. watch: {
  104. showformateCourt(val){
  105. console.log(this.formateCourtData)
  106. this.Arbitor = ""
  107. if(val){
  108. this.isAgreePendTral = 1;
  109. }
  110. },
  111. formateCourtData: {
  112. handler(val) {
  113. if (val.arbitratorName == null) {
  114. this.noArbitrator = true;
  115. } else {
  116. this.noArbitrator = false;
  117. }
  118. },
  119. },
  120. },
  121. methods: {
  122. // 获取仲裁员信息
  123. getarbitrAtor() {
  124. arbitrAtor({}).then((res) => {
  125. this.dataList = res.rows;
  126. // console.log(this.dataList, "this.dataList");
  127. });
  128. },
  129. changeArbitor(val) {
  130. this.arbitrators = [];
  131. this.dataList.forEach((item) => {
  132. if (item.userId == val) {
  133. this.arbitrators.push({
  134. id: item.userId,
  135. arbitratorName: item.nickName,
  136. });
  137. }
  138. });
  139. },
  140. // 确认
  141. submitForm() {
  142. if (this.noArbitrator) {
  143. this.paramsdata = {
  144. id: this.formateCourtData.id,
  145. arbitrators: this.arbitrators,
  146. };
  147. } else {
  148. if (this.isAgreePendTral == 0) {
  149. this.paramsdata = {
  150. isAgreePendTral: 0,
  151. id: this.formateCourtData.id,
  152. arbitrators: this.arbitrators,
  153. };
  154. } else {
  155. this.paramsdata = {
  156. isAgreePendTral: 1,
  157. id: this.formateCourtData.id,
  158. };
  159. }
  160. }
  161. this.$refs["formateCourtform"].validate((valid) => {
  162. if (valid) {
  163. pendTralCheck(this.paramsdata).then((res) => {
  164. this.cancel();
  165. this.$modal.msgSuccess("组庭成功");
  166. this.$emit("getcaseApply", this.queryParams);
  167. // 初始化页面
  168. this.formateCourtform={}
  169. });
  170. }
  171. });
  172. },
  173. // 取消
  174. cancel() {
  175. this.$emit("cancelcourtDialog");
  176. this.arbitrators = [];
  177. },
  178. radioValue(val){
  179. if(val==1){
  180. this.formateCourtform={}
  181. }else if(val==0){
  182. this.formateCourtform={}
  183. }
  184. }
  185. },
  186. };
  187. </script>
  188. <style lang="scss" scoped>
  189. ::v-deep .el-dialog {
  190. background: #ffffff;
  191. border-radius: 20px;
  192. }
  193. .endbutton {
  194. width: 124px;
  195. height: 37px;
  196. background: #0072ff;
  197. border-radius: 19px;
  198. span {
  199. width: 32px;
  200. height: 15px;
  201. font-size: 16px;
  202. font-family: Microsoft YaHei;
  203. font-weight: 400;
  204. color: #ffffff;
  205. }
  206. }
  207. .endbutton1 {
  208. width: 124px;
  209. height: 37px;
  210. background: #ffffff;
  211. border: 1px solid #d0d0d0;
  212. border-radius: 19px;
  213. span {
  214. width: 31px;
  215. height: 13px;
  216. font-size: 16px;
  217. font-family: Microsoft YaHei;
  218. font-weight: 400;
  219. color: #959595;
  220. }
  221. }
  222. .infoIcon {
  223. width: 4px;
  224. // height: 17px;
  225. background-color: #0072ff;
  226. margin-right: 5px;
  227. }
  228. .nowarbitrator {
  229. margin-left: 4%;
  230. }
  231. </style>