调解系统PC端服务

mediation.vue 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. <template>
  2. <div>
  3. <el-dialog :title="title" :visible="mediationVisable" @close="cancel" center :distroy-on-close="true" width="1000px">
  4. <el-form ref="form" :model="formData" label-width="180px">
  5. <div class="caseInfo">案件信息:</div>
  6. <el-divider></el-divider>
  7. <el-row>
  8. <el-col :span="12">
  9. <el-form-item label="案件编号:" prop="caseNum">
  10. <el-input v-model="formData.caseNum" placeholder="请输入案件编号" :disabled="true" />
  11. </el-form-item>
  12. </el-col>
  13. <el-col :span="12">
  14. <el-form-item label="申请人:" prop="affiliate.applicationName">
  15. <el-input v-model="formData.affiliate.applicationName" :disabled="true" />
  16. </el-form-item>
  17. </el-col>
  18. <el-col :span="12">
  19. <el-form-item label="被申请人:" prop="respondentName">
  20. <el-input v-model="mediationData.respondentName" :disabled="true" />
  21. </el-form-item>
  22. </el-col>
  23. <el-col :span="12">
  24. <el-form-item label="案件标的:" prop="caseSubjectAmount">
  25. <el-input v-model="formData.caseSubjectAmount" placeholder="请输入案件标的" :disabled="true" />
  26. </el-form-item>
  27. </el-col>
  28. <el-col :span="12">
  29. <el-form-item label="调解费用:" prop="feePayable">
  30. <el-input v-model="formData.feePayable" placeholder="请输入仲裁费用" :disabled="true" />
  31. </el-form-item>
  32. </el-col>
  33. <el-col :span="12">
  34. <el-form-item label="调解员:" prop="mediatorName">
  35. <el-input v-model="formData.mediatorName" placeholder="请输入" :disabled="true" />
  36. </el-form-item>
  37. </el-col>
  38. </el-row>
  39. <el-col :span="24">
  40. <el-form-item label="申请人案件证据:">
  41. <div v-if="applicateArr.length == 0">申请人暂未提供证据!</div>
  42. <div v-for="(item, index) in applicateArr" :key="index" v-if="item.annexType == 2">
  43. <a href="#" @click="toFile(item, index)" style="color: blue">{{ item.annexName }}</a>
  44. </div>
  45. </el-form-item>
  46. </el-col>
  47. <el-col :span="24" v-if="mediationType">
  48. <el-form-item label="调解结果:">
  49. <el-radio-group v-model="mediaResult" :disabled="!isSecretaryRole" @change="resultsMediation">
  50. <el-radio :label="1">达成调解</el-radio>
  51. <el-radio :label="2">未达成调解</el-radio>
  52. <el-radio :label="3">未达成调解但不在争议</el-radio>
  53. <el-radio :label="4">未达成调解但同意引入仲裁</el-radio>
  54. <el-radio :label="5">达成和解</el-radio>
  55. </el-radio-group>
  56. </el-form-item>
  57. </el-col>
  58. <!-- <el-col :span="24">
  59. <el-form-item label="是否和解" v-if="mediaResult==1">
  60. <el-radio-group v-model="isReconci">
  61. <el-radio :label="1">是</el-radio>
  62. <el-radio :label="0">否</el-radio>
  63. </el-radio-group>
  64. </el-form-item>
  65. </el-col> -->
  66. <!-- <el-col :span="24">
  67. <el-form-item label="被申请人案件证据:">
  68. <div v-if="quiltArr.length == 0">被申请人暂未提供证据!</div>
  69. <div v-for="(item, index) in quiltArr" :key="index">
  70. <a href="#" @click="toFile1(item, index)" style="color: blue">{{ item.annexName }}</a>
  71. </div>
  72. </el-form-item>
  73. </el-col> -->
  74. <el-col :span="24" v-if="recordArr.length > 0">
  75. <el-form-item label="庭审笔录:">
  76. <div v-for="(item, index) in recordArr" :key="index" style="color: blue">
  77. <a href="#" @click="toFile2(item.annexPath)">{{ item.annexName }}</a>
  78. </div>
  79. </el-form-item>
  80. </el-col>
  81. <el-col :span="24">
  82. <el-form-item label="调解书:" v-if="recordArrMediate.length > 0">
  83. <div v-for="(item, index) in recordArrMediate" :key="index" style="color: blue">
  84. <a href="#" @click="toFileMediate(item.annexPath)">{{ item.annexName }}</a>
  85. </div>
  86. </el-form-item>
  87. </el-col>
  88. <el-col :span="24" v-if="mediationType">
  89. <el-form-item label="预约会议房间号:">
  90. <div>{{ formData.roomId }}</div>
  91. </el-form-item>
  92. </el-col>
  93. <el-col :span="24" v-if="mediationType">
  94. <el-form-item label="调解时间:">
  95. <div>{{ formData.hearDate }}</div>
  96. </el-form-item>
  97. </el-col>
  98. <!-- v-if="!mediationType" -->
  99. <el-col :span="24">
  100. <el-form-item label="上传调解书">
  101. <el-upload class="upload-demo" accept=".png,.jpg,.doc,.docx,.txt,.pdf" ref="upload" :action="UploadUrl()"
  102. :headers="headers" :data="filedata" :on-preview="handlePreview" :on-remove="handleRemove" :limit="1"
  103. :on-change="beforeUpload" :on-success="handlSuccess" :file-list="fileList">
  104. <el-button slot="trigger" size="small" :disabled="!isSecretaryRole" type="primary">选取文件</el-button>
  105. <!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> -->
  106. <div slot="tip" class="el-upload__tip">只能上传.jpg,png,.doc,docx,.txt,.pdf文件</div>
  107. </el-upload>
  108. </el-form-item>
  109. </el-col>
  110. <!-- </el-form> -->
  111. </el-form>
  112. <el-button @click="openmeeting" type="primary" v-if="mediationType">{{ isSecretaryRole ? '发起会议' :
  113. '进入会议' }}</el-button>
  114. <!-- v-if="this.recordArr.length <= 0 && mediationData.mediationMethod == '1'" -->
  115. <el-button @click="openArbitrationresults" type="primary"
  116. v-if="this.recordArrMediate.length <= 0 && mediationData.mediationMethod == '1' && isSecretaryRole">确认会议结果</el-button>
  117. <div slot="footer" class="dialog-footer">
  118. <el-button @click="cancel" class="endbutton1" round>
  119. <span>取 消</span>
  120. </el-button>
  121. <el-button v-if="isSecretaryRole" :loading="loadingSubmit" @click="submitMediation"
  122. :disabled="this.recordArrMediate.length <= 0 && mediationData.mediationMethod == '1'" class="endbutton1"
  123. type="primary" round>
  124. 提 交
  125. </el-button>
  126. </div>
  127. </el-dialog>
  128. </div>
  129. </template>
  130. <!-- hearDate -->
  131. <script>
  132. import _ from 'lodash'
  133. import {
  134. caseApplicationSelectById,
  135. mediation,
  136. confirmMeetingResult,
  137. secretaryRoleByUserId
  138. } from "@/api/caseManagement/caseManagement.js";
  139. import { getUserProfile } from "@/api/system/user";
  140. import { reserveConferenceList } from "@/api/metting/metting.js";
  141. import { getToken } from "@/utils/auth";
  142. export default {
  143. props: ["mediationVisable", "mediationData", "queryParams"],
  144. data() {
  145. return {
  146. loanStartDate: "",
  147. codes: null,
  148. title: "线上调解",
  149. applicateArr: [],
  150. quiltArr: [],
  151. recordArr: [],
  152. recordArrMediate: [],
  153. roomId: null,
  154. startTime: null,
  155. mediaResult: 1,
  156. // isReconci:0,
  157. formData: {
  158. affiliate: {}
  159. },
  160. user: "",
  161. userId: null,
  162. flieList: [],
  163. mediationType: true,
  164. headers: {
  165. Authorization: "Bearer " + getToken(),
  166. },
  167. filedata: {
  168. annexType: 7,
  169. },
  170. fileList: [],
  171. attachList: [],
  172. isSecretaryRole: true,
  173. loadingSubmit: false
  174. };
  175. },
  176. watch: {
  177. mediationVisable(val) {
  178. this.recordArr = [];
  179. this.recordArrMediate = [];
  180. if (this.mediationData.mediationMethod == "1") {
  181. this.title = "线上调解";
  182. this.mediationType = true;
  183. } else if (this.mediationData.mediationMethod == "2") {
  184. this.title = "线下调解";
  185. this.mediationType = false;
  186. }
  187. if (val) {
  188. this.caseApplicationSelectByIdFn({
  189. id: this.mediationData.id
  190. });
  191. this.getUser();
  192. }
  193. }
  194. },
  195. created() { },
  196. methods: {
  197. // 根据用户id查询是否为调解员
  198. secretaryRoleByUserIdFn() {
  199. secretaryRoleByUserId({
  200. userId: this.userId
  201. }).then(res => {
  202. this.isSecretaryRole = res.data.isSecretaryRole;
  203. if(this.recordArrMediate){
  204. this.isSecretaryRole = false
  205. }
  206. })
  207. },
  208. /**上传地址*/
  209. UploadUrl() {
  210. return window.location.origin + "/API/common/upload";
  211. },
  212. handlePreview(file) {
  213. },
  214. handleRemove(file, fileList) {
  215. },
  216. beforeUpload(flie, fileList) {
  217. this.fileList = fileList;
  218. },
  219. handlSuccess(res, file) {
  220. this.codes = res.code
  221. this.attachList = [{ annexId: res.annexId }];
  222. // this.$set(this.mediationData, "attachList", {annexId:res.annexId});
  223. },
  224. /** 获取案件详情信息 */
  225. caseApplicationSelectByIdFn(data) {
  226. caseApplicationSelectById(data).then(res => {
  227. this.formData = res.data;
  228. this.applicateArr = res.data.caseAttachList;
  229. res.data.caseAttachList.forEach(item => {
  230. if (item.annexType == 6) {
  231. this.recordArr.push(item);
  232. } else if (item.annexType == 7) {
  233. this.recordArrMediate.push(item);
  234. }
  235. });
  236. });
  237. },
  238. /** 获取用户信息 */
  239. getUser() {
  240. getUserProfile().then(response => {
  241. this.user = response.data.userName;
  242. this.userId = response.data.userId;
  243. this.secretaryRoleByUserIdFn();
  244. });
  245. },
  246. /** 发起会议 */
  247. openmeeting() {
  248. window.open(
  249. // `http://localhost:8080/#/home?name=${this.user}&id=${this.formData.id}&userId=${this.userId}&roomId=${this.formData.roomId}&type=tiaojie`
  250. `https://txroom.xayunmei.com/#/home?name=${this.user}&id=${this.formData.id}&userId=${this.userId}&roomId=${this.formData.roomId}&type=tiaojie`
  251. );
  252. },
  253. /**提交仲裁结果 */
  254. openArbitrationresults() {
  255. this.recordArr = [];
  256. caseApplicationSelectById({
  257. id: this.mediationData.id
  258. }).then(res => {
  259. console.log(res)
  260. res.data.caseAttachList.forEach(item => {
  261. if (item.annexType == 6) {
  262. this.recordArr.push(item);
  263. }
  264. });
  265. });
  266. confirmMeetingResult({
  267. id: this.mediationData.id,
  268. caseFlowId: this.mediationData.caseFlowId,
  269. batchNumber: "",
  270. mediaResult: this.mediaResult,
  271. }).then(res => {
  272. caseApplicationSelectById({
  273. id: this.mediationData.id
  274. }).then(res => {
  275. res.data.caseAttachList.forEach(item => {
  276. if (item.annexType == 7) {
  277. this.recordArrMediate.push(item);
  278. }
  279. });
  280. });
  281. })
  282. this.isSecretaryRole = false
  283. },
  284. /** 庭审笔录附件 */
  285. toFile2(annexPath) {
  286. window.open(window.location.origin + "/API" + annexPath, "_black");
  287. },
  288. toFileMediate(annexPath) {
  289. window.open(window.location.origin + "/API" + annexPath, "_black");
  290. },
  291. /** 生成调解书 */
  292. mediationFn(data) {
  293. mediation(data).then(res => {
  294. this.$modal.msgSuccess("成功");
  295. this.$emit("cancelMediation");
  296. this.$emit("getList", this.queryParams);
  297. this.loadingSubmit = false;
  298. });
  299. },
  300. cancel() {
  301. this.$emit("cancelMediation");
  302. },
  303. submitMediation() {
  304. if (this.fileList.length < 1 && !this.mediationType && this.mediationData.mediationMethod == "2") {
  305. this.$modal.msgError("请上传调解书");
  306. return
  307. } else {
  308. this.loadingSubmit = true;
  309. }
  310. let mediationVal = {}
  311. if (this.codes == 200) {
  312. mediationVal = {
  313. id: this.mediationData.id,
  314. caseFlowId: this.mediationData.caseFlowId,
  315. attachList: this.attachList,
  316. // isReconci:this.isReconci,
  317. mediaResult: this.mediaResult,
  318. }
  319. } else {
  320. mediationVal = {
  321. id: this.mediationData.id,
  322. caseFlowId: this.mediationData.caseFlowId,
  323. mediaResult: this.mediaResult,
  324. }
  325. }
  326. this.mediationFn(mediationVal);
  327. },
  328. resultsMediation() {
  329. }
  330. }
  331. };
  332. </script>
  333. <style lang="scss" scoped>
  334. .steps {
  335. display: flex;
  336. flex-wrap: wrap;
  337. }
  338. </style>