调解系统PC端服务

mediation.vue 14KB

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