solved.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754
  1. <template>
  2. <div class="solved">
  3. <div class="conentBox">
  4. <div class="header">处理方案</div>
  5. <div v-if="model.incident" class="conent">
  6. <div class="navBar">
  7. <div class="fl">
  8. <a
  9. :class="{ active: actives == 'info' }"
  10. href="javascript:;"
  11. @click="toInfo('info')"
  12. >事件信息</a
  13. >
  14. </div>
  15. <div class="fl">
  16. <a
  17. :class="{ active: actives == 'handlerInfo' }"
  18. href="javascript:;"
  19. @click="toInfo('handlerInfo')"
  20. >处理信息</a
  21. >
  22. </div>
  23. <!-- <div class="fl">
  24. <a
  25. :class="{ active: actives == 'handlerLog' }"
  26. href="javascript:;"
  27. @click="toInfo('handlerLog')"
  28. >沟通记录</a
  29. >
  30. </div> -->
  31. <div class="fl">
  32. <a
  33. :class="{ active: actives == 'progress' }"
  34. href="javascript:;"
  35. @click="toInfo('progress')"
  36. >处理进度</a
  37. >
  38. </div>
  39. </div>
  40. <div class="label headtop" id="info">事件信息</div>
  41. <div class="info">
  42. <EventInformation :model="modelData" :id="id"></EventInformation>
  43. <p class="info_hide">
  44. <span class="fl hide" @click="hides()" v-if="!item_hides"
  45. >展开详情 >></span
  46. >
  47. <span class="fl hide" @click="hides()" v-if="item_hides"
  48. >隐藏详情<<</span
  49. >
  50. </p>
  51. <div class="imgs-container" v-if="imgs.length">
  52. <div class="imgs-cont" @click="showImgs(imgs)">
  53. <img
  54. v-if="
  55. img.suffix == 'jpeg' ||
  56. img.suffix == 'jpg' ||
  57. img.suffix == 'gif' ||
  58. img.suffix == 'png' ||
  59. img.suffix == 'svg' ||
  60. img.suffix == 'pdf'
  61. "
  62. :src="img.previewUrl"
  63. v-for="(img, index) in imgs"
  64. class="imgs"
  65. />
  66. <p v-else>
  67. <a :href="[img.previewUrl]">{{ img.name }}</a>
  68. </p>
  69. </div>
  70. </div>
  71. <div class="label" id="handlerInfo">处理信息</div>
  72. <p>
  73. <span class="fl">处理人</span>
  74. <span class="fr">{{
  75. model.incident.acceptUser ? model.incident.acceptUser.name : ""
  76. }}</span>
  77. </p>
  78. <p>
  79. <span class="fl">联系电话</span>
  80. <span class="fr" v-if="!model.incident.contactsInformation"></span>
  81. <span class="fr" v-if="model.incident.contactsInformation"
  82. ><a :href="'tel:' + model.incident.contactsInformation"
  83. ><i class="iconfont dsit-shouji"></i
  84. >{{ model.incident.contactsInformation }}</a
  85. ></span
  86. >
  87. </p>
  88. <p>
  89. <span class="fl">处理方式</span>
  90. <span class="fr showwrap">{{
  91. model.incident.handleCategory
  92. ? model.incident.handleCategory.name
  93. : ""
  94. }}</span>
  95. </p>
  96. <p>
  97. <span class="fl">关闭代码</span>
  98. <span class="fr">{{
  99. model.incident.closecode ? model.incident.closecode.name : ""
  100. }}</span>
  101. </p>
  102. <p class="desc">
  103. <span class="fl">处理方案</span>
  104. <span
  105. class="fr grayFont"
  106. v-html="model.incident.handleDescription"
  107. ></span>
  108. </p>
  109. <!-- <p>
  110. <span class="fl" v-if="model.incident.synergeticReason">协同对象</span>
  111. <span class="fl" v-else-if="model.isupreason">升级对象</span>
  112. <span class="fl" v-else-if="model.transferReason">转派对象</span>
  113. <span class="fr">{{model.incident.handlerUser?model.incident.handlerUser.name:''}}</span>
  114. </p>
  115. <p v-if="model.incident.synergeticReason">
  116. <span class="fl" >协同原因</span>
  117. <span class="fr">{{model.incident.synergeticReason}}</span>
  118. </p>
  119. <p v-if="model.isupreason">
  120. <span class="fl">升级原因</span>
  121. <span class="fr">{{model.isupreason}}</span>
  122. </p>
  123. <p v-if="model.transferReason">
  124. <span class="fl">转派原因</span>
  125. <span class="fr" >{{model.transferReason}}</span>
  126. </p> -->
  127. <!-- <HandlerLog :data="model.incident.handlerLogs" id="handlerLog"></HandlerLog> -->
  128. <div class="label" id="progress">处理进度</div>
  129. <div
  130. :class="{ progress: true, progressHide: !pro_hides }"
  131. id="progressBox"
  132. >
  133. <div class="progress_info" v-for="item in progressInfo">
  134. <div class="progress_info_L">{{ item.activityName }}</div>
  135. <div class="progress_info_R">
  136. <div class="time">
  137. <i
  138. :class="{
  139. iconfont: true,
  140. 'dsit-icon_weizuo': item.endTime != '',
  141. 'dsit-icon_zhengzaijinx': item.endTime == '',
  142. }"
  143. ></i>
  144. <span class="text1">
  145. {{ item.startTime | timeFormat("MM-dd HH:mm:ss") }}
  146. <template v-if="item.userName">
  147. ,{{ item.userName }}
  148. </template>
  149. </span>
  150. </div>
  151. <div :class="{ cont: true, blue: item.endTime != '' }">
  152. <p class="text2" v-if="item.desc" v-html="item.desc"></p>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. <p class="info_hide">
  158. <span class="fl hide" @click="proHides()">{{
  159. pro_hides ? "隐藏详情 <<" : "展开详情 >>"
  160. }}</span>
  161. </p>
  162. <!-- <div
  163. class="form"
  164. v-if="model.incident.handlerUser.id == loginUser.id"
  165. >
  166. <div class="txtLabel">
  167. <div class="txt fl handler">
  168. <span style="color:red;">*</span>是否已解决:
  169. </div>
  170. <cube-select
  171. class="selectGroup fl"
  172. v-model="isclose"
  173. :options="iscloseArr"
  174. ></cube-select>
  175. </div>
  176. <div class="txtLabel">
  177. <div class="txt fl">
  178. <span style="color:red;">*</span> 结果类型:
  179. </div>
  180. <cube-select
  181. class="selectGroup fl"
  182. v-model="handleResult"
  183. :options="handleResultArr"
  184. ></cube-select>
  185. </div>
  186. <div class="txtLabel">
  187. <div class="txt fl">满意度评价:</div>
  188. <cube-select
  189. class="selectGroup fl"
  190. v-model="degree"
  191. :options="degreeArr"
  192. ></cube-select>
  193. </div>
  194. <div class="txtLabel">
  195. <div class="txt fl">回访备注:</div>
  196. <cube-input v-model="model.incident.visitRemarks"></cube-input>
  197. </div>
  198. <cube-form-group class="sub">
  199. <cube-button type="submit" @click="subVali()">提交</cube-button>
  200. </cube-form-group>
  201. </div> -->
  202. </div>
  203. </div>
  204. <load-ing v-if="!model.incident"></load-ing>
  205. </div>
  206. </div>
  207. </template>
  208. <script>
  209. import LoadIng from "./../views/loading.vue";
  210. import EventInformation from './../components/EventInformation/index.vue'
  211. // import HandlerLog from "./../views/handlerLog.vue";
  212. export default {
  213. data() {
  214. return {
  215. id: "",
  216. loginUser: JSON.parse(localStorage.getItem("loginUser")),
  217. selected: 1,
  218. isclose: "close", //是否已解决
  219. iscloseArr: [
  220. {
  221. text: "已解决",
  222. value: "close",
  223. },
  224. {
  225. text: "未解决",
  226. value: "notsolved",
  227. },
  228. ],
  229. handleResult: "", //结果类型
  230. handleResultArr: [], //结果类型
  231. degree: "",
  232. degreeArr: [],
  233. visitRemarks: "", //回访备注
  234. item_hides: false,
  235. item_hides1: false,
  236. pro_hides: false, //展开/收起处理进度
  237. actives: "info",
  238. processInstanceId: "",
  239. progressInfo: [], //处理进度
  240. imgs: [], //图片
  241. model: {}, //提交数据
  242. };
  243. },
  244. components: {
  245. LoadIng,
  246. EventInformation,
  247. // HandlerLog
  248. },
  249. methods: {
  250. // 获取事件数据
  251. getParamsData() {
  252. var that = this;
  253. that.$http
  254. .get(
  255. "/service/form/renderForm/closeform/" +
  256. that.processInstanceId +
  257. "/" +
  258. that.loginUser.id +
  259. "/" +
  260. that.id,
  261. {}
  262. )
  263. .then(function (res) {
  264. console.log(res.data);
  265. that.model = res.data.model;
  266. that.model.msgflag = "已解决";
  267. //seimin
  268. localStorage.setItem("modelData", JSON.stringify(that.model));
  269. that.getProgressInfo();
  270. });
  271. },
  272. //展示图片
  273. showImgs(imgs){
  274. this.$createImagePreview({
  275. imgs:imgs.map(v=>v.previewUrl)
  276. }).show()
  277. },
  278. // 获取图片
  279. getImgs() {
  280. var that = this;
  281. that.$http
  282. .get(
  283. "/service/common/common/listAttachment/incident/" +
  284. that.processInstanceId,
  285. {}
  286. )
  287. .then(function (res) {
  288. console.log(res.data);
  289. that.imgs = res.data.data.splice(0, 3);
  290. console.log(that.imgs);
  291. });
  292. },
  293. // 获取处理进度
  294. getProgressInfo() {
  295. var that = this;
  296. that.$http
  297. .post(
  298. "/service/bpm/bpm/flowTracingCustom/" + that.processInstanceId,
  299. {}
  300. )
  301. .then(function (res) {
  302. console.log(res.data);
  303. that.progressInfo = res.data.data;
  304. //沟通记录startcaca
  305. if (that.model.incident.handlerLogs) {
  306. //添加日志
  307. that.model.incident.handlerLogs.forEach((v) => {
  308. that.progressInfo.push({
  309. startTime: v.opTime,
  310. endTime: 1,
  311. desc: v.opValue,
  312. userName: v.userName,
  313. activityName: "事件处理",
  314. });
  315. });
  316. }
  317. //处理数据
  318. that.progressInfo.forEach((v) => {
  319. if (!v.endTime) {
  320. v.endTime = 1;
  321. }
  322. v.startTime = new Date(v.startTime).getTime();
  323. });
  324. var kaishi = that.progressInfo.shift();
  325. var jiedan = that.progressInfo.shift();
  326. that.progressInfo.sort(function (o, c) {
  327. return c.startTime - o.startTime;
  328. });
  329. that.progressInfo.length && (that.progressInfo[0].endTime = "");
  330. that.progressInfo.push(jiedan);
  331. that.progressInfo.push(kaishi);
  332. console.log(that.progressInfo);
  333. //沟通记录end
  334. });
  335. },
  336. // 获取结果类型
  337. getHandlerRes() {
  338. var that = this;
  339. that.$http
  340. .post("/service/common/common/getDictionary", {
  341. type: "list",
  342. key: "incident_handleresult",
  343. })
  344. .then(function (res) {
  345. console.log(res.data);
  346. // that.handleResultArr = res.data;
  347. res.data.forEach(function (v, i) {
  348. that.handleResultArr.push({
  349. text: v.name,
  350. value: v.id,
  351. });
  352. });
  353. });
  354. },
  355. // 获取满意度评价
  356. getDegree() {
  357. var that = this;
  358. that.$http
  359. .post("/service/common/common/getDictionary", {
  360. type: "list",
  361. key: "incident_degree",
  362. })
  363. .then(function (res) {
  364. console.log(res.data);
  365. // that.degreeArr = res.data;
  366. res.data.forEach(function (v, i) {
  367. that.degreeArr.push({
  368. text: v.name,
  369. value: v.id,
  370. });
  371. });
  372. });
  373. },
  374. //隐藏显示详情
  375. hides() {
  376. this.item_hides = !this.item_hides;
  377. $("#shows").slideToggle();
  378. },
  379. //隐藏显示详情
  380. hides1() {
  381. this.item_hides1 = !this.item_hides1;
  382. $("#shows1").slideToggle();
  383. },
  384. // 处理进度隐藏/展开
  385. proHides() {
  386. if (!this.pro_hides) {
  387. $("#progressBox").animate({
  388. height: $("#progressBox")[0].scrollHeight,
  389. });
  390. } else {
  391. $("#progressBox").animate({ height: "1.7rem" });
  392. }
  393. this.pro_hides = !this.pro_hides;
  394. },
  395. // 快速定位
  396. toInfo(id) {
  397. this.actives = id;
  398. $("body,html").animate(
  399. {
  400. scrollTop:
  401. $("#" + id).offset().top -
  402. $(".header")[0].offsetHeight -
  403. $(".navBar")[0].offsetHeight,
  404. },
  405. 260
  406. );
  407. },
  408. // 提交
  409. subVali() {
  410. var that = this;
  411. delete that.model.handlerCode;
  412. that.model.handler_code = "resolve";
  413. that.model.isclose = that.isclose;
  414. if (that.model.isclose == "close") {
  415. delete that.model.receive_code;
  416. }
  417. that.model.incident.handleResult = { id: that.handleResult };
  418. that.model.loginUser = that.loginUser;
  419. if (that.degree) {
  420. that.model.incident.degree = { id: that.degree };
  421. }
  422. console.log(that.model);
  423. if (!that.model.incident.handleResult) {
  424. $("#fade").fadeIn();
  425. that.promptingConent = "提交失败,请填写必填信息!";
  426. that.promptingStatus = false;
  427. setTimeout(function () {
  428. $("#fade").fadeOut();
  429. }, 2000);
  430. }
  431. that.$http
  432. .post(
  433. "/service/bpm/bpm/completeTask/" +
  434. that.model.incident.taskId +
  435. "/" +
  436. that.loginUser.id,
  437. that.model
  438. )
  439. .then(function (res) {
  440. if (res.data.status == 200) {
  441. $("#fade").fadeIn();
  442. that.promptingConent = "恭喜您,提交成功!";
  443. that.promptingStatus = true;
  444. that.dialog = that
  445. .$createDialog({
  446. type: "alert",
  447. title: "提交成功",
  448. content: "点击返回首页",
  449. icon: "cubeic-right",
  450. onConfirm: (e, promptValue) => {
  451. that.$router.push({ path: "/main" });
  452. },
  453. })
  454. .show();
  455. setTimeout(function () {
  456. $("#fade").fadeOut();
  457. }, 2000);
  458. }
  459. });
  460. },
  461. },
  462. created() {
  463. // seimin
  464. this.processInstanceId = this.$route.params.data
  465. ? this.$route.params.data.processInstanceId
  466. : JSON.parse(localStorage.getItem("modelData")).incident
  467. .processInstanceId;
  468. this.id = this.$route.params.data
  469. ? this.$route.params.data.id
  470. : JSON.parse(localStorage.getItem("modelData")).incident.id;
  471. this.getParamsData();
  472. this.getImgs();
  473. this.getHandlerRes();
  474. this.getDegree();
  475. },
  476. };
  477. </script>
  478. <style lang="less" scoped>
  479. i.iconfont {
  480. &.blue {
  481. color: #005395;
  482. // &::after {
  483. // content: "";
  484. // width: 0.01rem;
  485. // height: 0.4rem;
  486. // background: #005395;
  487. // position: relative;
  488. // display: block;
  489. // left: 0.14rem;
  490. // }
  491. }
  492. &.blue1 {
  493. color: #005395;
  494. }
  495. }
  496. .solved {
  497. .header {
  498. width: 100%;
  499. height: 0.88rem;
  500. line-height: 0.88rem;
  501. text-align: center;
  502. color: #fff;
  503. font-size: 0.37rem;
  504. background: linear-gradient(#2e2f32, #414246);
  505. position: fixed;
  506. top: 0;
  507. z-index: 6;
  508. }
  509. .navBar {
  510. width: 100%;
  511. height: 0.96rem;
  512. line-height: 0.96rem;
  513. background-color: #fafafa;
  514. font-size: 0.28rem;
  515. position: fixed;
  516. top: 0.88rem;
  517. div {
  518. width: 33.33%;
  519. text-align: center;
  520. &.p50 {
  521. width: 49.99%;
  522. }
  523. a {
  524. display: inline-block;
  525. height: 0.9rem;
  526. width: 1.7rem;
  527. padding: 0 0.1rem;
  528. &.active {
  529. color: #005395;
  530. border-bottom: 0.06rem solid #005395;
  531. }
  532. }
  533. }
  534. }
  535. .headtop {
  536. margin-top: 1.84rem;
  537. }
  538. .label {
  539. background-color: #eeeeee;
  540. height: 0.6rem;
  541. line-height: 0.58rem;
  542. padding-left: 0.2rem;
  543. font-size: 0.24rem;
  544. color: #666666;
  545. span {
  546. font-size: 0.2rem;
  547. display: inline-block;
  548. margin-left: 0.08rem;
  549. color: #999999;
  550. }
  551. &.formLabel {
  552. background-color: #fff;
  553. }
  554. }
  555. .txtLabel {
  556. width: 100%;
  557. overflow: hidden;
  558. padding: 0.32rem 0.24rem 0.32rem 0.32rem;
  559. .txt {
  560. width: 25%;
  561. color: #666;
  562. &.handler {
  563. width: 40%;
  564. }
  565. }
  566. .selectGroup {
  567. width: 62%;
  568. }
  569. .cube-input {
  570. width: 62%;
  571. }
  572. }
  573. .conentBox {
  574. width: 100%;
  575. .conent {
  576. font-size: 0.32rem;
  577. font-weight: 400;
  578. line-height: 0.45rem;
  579. // border-bottom: 0.16rem solid #e5e5e5;
  580. .shows {
  581. display: none;
  582. }
  583. .shows1 {
  584. display: none;
  585. }
  586. .boeder_B {
  587. border-bottom: 0.01rem solid #ccc;
  588. }
  589. p {
  590. &.desc {
  591. overflow: hidden;
  592. }
  593. .grayFont {
  594. width: 75%;
  595. text-align: right;
  596. overflow-x: scroll;
  597. }
  598. }
  599. .bottom {
  600. overflow: hidden;
  601. line-height: 0.86rem;
  602. border-bottom: 0.01rem solid #e6e6e6;
  603. font-size: 0.24rem;
  604. color: #999;
  605. padding: 0 0.24rem 0 0.48rem;
  606. }
  607. .info {
  608. color: #999;
  609. font-size: 0.28rem;
  610. overflow: hidden;
  611. .head {
  612. border-bottom: 0.01rem solid #e6e6e6;
  613. p {
  614. padding: 0.24rem 0.3rem;
  615. i {
  616. color: #00559d;
  617. }
  618. }
  619. }
  620. p {
  621. line-height: 0.4rem;
  622. padding: 0.1rem 0.24rem;
  623. overflow: hidden;
  624. .overflowEllipsis2 {
  625. margin-left: 1.96rem;
  626. }
  627. }
  628. .info_hide {
  629. padding: 0.2rem 0.24rem;
  630. border-bottom: 0.01rem solid #e6e6e6;
  631. .hide {
  632. color: #00559d;
  633. }
  634. }
  635. .imgs-container {
  636. a {
  637. color: #03c !important;
  638. &:visited {
  639. color: #551a8b !important;
  640. }
  641. }
  642. img {
  643. width: 1.5rem;
  644. height: 1.5rem;
  645. margin-right: 0.7rem;
  646. &:nth-child(1) {
  647. margin-left: 0.75rem;
  648. }
  649. }
  650. }
  651. .progress {
  652. padding: 0.2rem 0.2rem;
  653. overflow: hidden;
  654. transition-duration: 0.2s;
  655. transition-timing-function: linear;
  656. &.progressHide {
  657. height: 1.7rem;
  658. }
  659. .progress_info {
  660. overflow: hidden;
  661. margin-bottom: 0.1rem;
  662. &:nth-last-child(1) {
  663. .cont {
  664. border: none !important;
  665. }
  666. }
  667. .progress_info_L {
  668. float: left;
  669. color: #333;
  670. max-width: 18%;
  671. }
  672. .progress_info_R {
  673. float: right;
  674. margin-left: 0.09rem;
  675. width: 80%;
  676. font-size: 0.25rem;
  677. .time {
  678. i {
  679. margin-left: -0.15rem;
  680. &.dsit-icon_weizuo {
  681. color: #005495;
  682. }
  683. &.dsit-icon_zhengzaijinx {
  684. color: #48a843;
  685. font-size: 0.37rem;
  686. }
  687. }
  688. span {
  689. margin-left: 0.15rem;
  690. }
  691. }
  692. .cont {
  693. border-left: 1px solid #999;
  694. padding-left: 0.4rem;
  695. min-height: 0.4rem;
  696. &.blue {
  697. border-left: 1px solid #005395;
  698. }
  699. }
  700. .text1 {
  701. font-size: 0.15rem;
  702. }
  703. .text2 {
  704. color: #666;
  705. word-break: break-all;
  706. }
  707. p {
  708. padding: 0;
  709. }
  710. }
  711. }
  712. }
  713. }
  714. .txtLabel {
  715. width: 100%;
  716. overflow: hidden;
  717. padding: 0.32rem 0.24rem 0.32rem 0.32rem;
  718. .txt {
  719. width: 30%;
  720. color: #666;
  721. }
  722. .cube-textarea-wrapper {
  723. width: 62%;
  724. }
  725. }
  726. .sub {
  727. background: #ececec;
  728. .cube-btn {
  729. background-color: #005395 !important;
  730. width: 90%;
  731. margin: 0.2rem auto;
  732. border-radius: 8px;
  733. }
  734. }
  735. }
  736. }
  737. .showwrap {
  738. width: 75%;
  739. text-align: right;
  740. }
  741. }
  742. </style>