closed.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. <template>
  2. <div class="closed">
  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 == 'closeInfo' }"
  26. href="javascript:;"
  27. @click="toInfo('closeInfo')"
  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="model" :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">{{model.isupreason?model.handlerUser.name:''}}</span>
  75. </p>
  76. <p>
  77. <span class="fl">升级原因</span>
  78. <span class="fr">{{model.isupreason?model.isupreason:''}}</span>
  79. </p> -->
  80. <p>
  81. <span class="fl">处理方式</span>
  82. <span class="fr showwrap">{{
  83. model.incident.handleCategory
  84. ? model.incident.handleCategory.name
  85. : ""
  86. }}</span>
  87. </p>
  88. <div class="shows1" id="shows1">
  89. <p>
  90. <span class="fl">确认事件分类</span>
  91. <span class="fr">{{ model.incident.category.category }}</span>
  92. </p>
  93. <p>
  94. <span class="fl">关闭代码</span>
  95. <span class="fr">{{
  96. model.incident.closecode ? model.incident.closecode.name : ""
  97. }}</span>
  98. </p>
  99. <p class="desc">
  100. <span class="fl">处理方案</span>
  101. <span
  102. class="fr grayFont"
  103. v-html="model.incident.handleDescription"
  104. ></span>
  105. </p>
  106. </div>
  107. <p class="info_hide">
  108. <span class="fl hide" @click="hides1()" v-if="!item_hides1"
  109. >展开详情 >></span
  110. >
  111. <span class="fl hide" @click="hides1()" v-if="item_hides1"
  112. >隐藏详情<<</span
  113. >
  114. </p>
  115. <div class="label" id="closeInfo">关单信息</div>
  116. <p>
  117. <span class="fl">是否已解决</span>
  118. <span class="fr">{{
  119. model.isclose == "close" ? "已解决" : "未解决"
  120. }}</span>
  121. </p>
  122. <p>
  123. <span class="fl">结果类型</span>
  124. <span class="fr">{{
  125. model.incident.handleResult
  126. ? model.incident.handleResult.name
  127. : ""
  128. }}</span>
  129. </p>
  130. <p>
  131. <span class="fl">满意度评价</span>
  132. <span class="fr">{{
  133. model.incident.degree ? model.incident.degree.name : ""
  134. }}</span>
  135. </p>
  136. <p>
  137. <span class="fl">回访备注</span>
  138. <span class="fr">{{ model.incident.visitRemarks || "" }}</span>
  139. </p>
  140. <div class="label" id="progress">处理进度</div>
  141. <div
  142. :class="{ progress: true, progressHide: !pro_hides }"
  143. id="progressBox"
  144. >
  145. <div class="progress_info" v-for="item in progressInfo">
  146. <div class="progress_info_L">{{ item.activityName }}</div>
  147. <div class="progress_info_R">
  148. <div class="time">
  149. <i
  150. :class="{
  151. iconfont: true,
  152. 'icon-icon_weizuo': item.endTime != '',
  153. 'icon-icon_zhengzaijinx': item.endTime == '',
  154. }"
  155. ></i>
  156. <span class="text1">
  157. {{ item.startTime | timeFormat("MM-dd HH:mm:ss") }}
  158. <template v-if="item.userName">
  159. ,{{ item.userName }}
  160. </template>
  161. </span>
  162. </div>
  163. <div :class="{ cont: true, blue: item.endTime != '' }">
  164. <p class="text2" v-if="item.desc" v-html="item.desc"></p>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. <p class="info_hide">
  170. <span class="fl hide" @click="proHides()">{{
  171. pro_hides ? "隐藏详情 <<" : "展开详情 >>"
  172. }}</span>
  173. </p>
  174. </div>
  175. </div>
  176. <load-ing v-if="!model.incident"></load-ing>
  177. </div>
  178. </div>
  179. </template>
  180. <script>
  181. import LoadIng from "./../views/loading.vue";
  182. import EventInformation from './../components/EventInformation/index.vue'
  183. export default {
  184. data() {
  185. return {
  186. id: "",
  187. loginUser: JSON.parse(localStorage.getItem("loginUser")),
  188. selected: 1,
  189. options: [
  190. {
  191. label: "接单",
  192. value: 1,
  193. },
  194. {
  195. label: "关单信息",
  196. value: 2,
  197. },
  198. ],
  199. resignComment: "", //重新指派原因
  200. item_hides: false,
  201. item_hides1: false,
  202. actives: "info",
  203. processInstanceId: "",
  204. progressInfo: [], //处理进度
  205. imgs: [], //图片
  206. model: {}, //提交数据
  207. pro_hides: false, //展开/收起处理进度
  208. };
  209. },
  210. components: {
  211. LoadIng,
  212. EventInformation,
  213. },
  214. methods: {
  215. // 获取事件数据
  216. getParamsData() {
  217. var that = this;
  218. that.$http
  219. .get(
  220. "/service/form/renderForm/receiveform/" +
  221. that.processInstanceId +
  222. "/" +
  223. that.loginUser.id +
  224. "/" +
  225. that.id,
  226. {}
  227. )
  228. .then(function (res) {
  229. console.log(res.data);
  230. that.model = res.data.model;
  231. //seimin
  232. localStorage.setItem("modelData", JSON.stringify(that.model));
  233. that.getProgressInfo();
  234. });
  235. },
  236. //展示图片
  237. showImgs(imgs){
  238. this.$createImagePreview({
  239. imgs:imgs.map(v=>v.previewUrl)
  240. }).show()
  241. },
  242. // 获取图片
  243. getImgs() {
  244. var that = this;
  245. that.$http
  246. .get(
  247. "service/common/common/listAttachment/incident/" +
  248. that.processInstanceId,
  249. {}
  250. )
  251. .then(function (res) {
  252. console.log(res.data);
  253. that.imgs = res.data.data.splice(0, 3);
  254. console.log(that.imgs);
  255. });
  256. },
  257. // 获取处理进度
  258. getProgressInfo() {
  259. var that = this;
  260. that.$http
  261. .post(
  262. "/service/bpm/bpm/flowTracingCustom/" + that.processInstanceId,
  263. {}
  264. )
  265. .then(function (res) {
  266. console.log(res.data);
  267. that.progressInfo = res.data.data;
  268. //未沟通记录startcaca
  269. if (that.model.incident.handlerLogs) {
  270. //添加日志
  271. that.model.incident.handlerLogs.forEach((v) => {
  272. that.progressInfo.push({
  273. startTime: v.opTime,
  274. endTime: 1,
  275. desc: v.opValue,
  276. userName: v.userName,
  277. activityName: "事件处理",
  278. });
  279. });
  280. }
  281. //处理数据
  282. that.progressInfo.forEach((v) => {
  283. if (!v.endTime) {
  284. v.endTime = 1;
  285. }
  286. v.startTime = new Date(v.startTime).getTime();
  287. });
  288. var kaishi = that.progressInfo.shift();
  289. var jiedan = that.progressInfo.shift();
  290. that.progressInfo.sort(function (o, c) {
  291. return c.startTime - o.startTime;
  292. });
  293. that.progressInfo.length && (that.progressInfo[0].endTime = "");
  294. that.progressInfo.push(jiedan);
  295. that.progressInfo.push(kaishi);
  296. console.log(that.progressInfo);
  297. //未沟通记录end
  298. });
  299. },
  300. //隐藏显示详情
  301. hides() {
  302. this.item_hides = !this.item_hides;
  303. $("#shows").slideToggle();
  304. },
  305. // 处理进度隐藏/展开
  306. proHides() {
  307. if (!this.pro_hides) {
  308. $("#progressBox").animate({
  309. height: $("#progressBox")[0].scrollHeight,
  310. });
  311. } else {
  312. $("#progressBox").animate({ height: "1.7rem" });
  313. }
  314. this.pro_hides = !this.pro_hides;
  315. },
  316. //隐藏显示详情
  317. hides1() {
  318. this.item_hides1 = !this.item_hides1;
  319. $("#shows1").slideToggle();
  320. },
  321. // 快速定位
  322. toInfo(id) {
  323. this.actives = id;
  324. $("body,html").animate(
  325. {
  326. scrollTop:
  327. $("#" + id).offset().top -
  328. $(".header")[0].offsetHeight -
  329. $(".navBar")[0].offsetHeight,
  330. },
  331. 260
  332. );
  333. },
  334. },
  335. created() {
  336. // seimin
  337. this.processInstanceId = this.$route.params.data
  338. ? this.$route.params.data.processInstanceId
  339. : JSON.parse(localStorage.getItem("modelData")).incident
  340. .processInstanceId;
  341. this.id = this.$route.params.data
  342. ? this.$route.params.data.id
  343. : JSON.parse(localStorage.getItem("modelData")).incident.id;
  344. this.getParamsData();
  345. this.getImgs();
  346. },
  347. };
  348. </script>
  349. <style lang="less" scoped>
  350. i.iconfont {
  351. &.blue {
  352. color: #005395;
  353. // &::after {
  354. // content: "";
  355. // width: 0.01rem;
  356. // height: 0.4rem;
  357. // background: #005395;
  358. // position: relative;
  359. // display: block;
  360. // left: 0.14rem;
  361. // }
  362. }
  363. &.blue1 {
  364. color: #005395;
  365. }
  366. }
  367. .closed {
  368. .header {
  369. width: 100%;
  370. height: 0.88rem;
  371. line-height: 0.88rem;
  372. text-align: center;
  373. color: #fff;
  374. font-size: 0.37rem;
  375. background: linear-gradient(#2e2f32, #414246);
  376. position: fixed;
  377. top: 0;
  378. z-index: 6;
  379. }
  380. .navBar {
  381. width: 100%;
  382. height: 0.96rem;
  383. line-height: 0.96rem;
  384. background-color: #fafafa;
  385. font-size: 0.28rem;
  386. position: fixed;
  387. top: 0.88rem;
  388. div {
  389. width: 25%;
  390. text-align: center;
  391. a {
  392. display: inline-block;
  393. height: 0.9rem;
  394. width: 1.7rem;
  395. padding: 0 0.1rem;
  396. &.active {
  397. color: #005395;
  398. border-bottom: 0.06rem solid #005395;
  399. }
  400. }
  401. }
  402. }
  403. .headtop {
  404. margin-top: 1.84rem;
  405. }
  406. .label {
  407. background-color: #eeeeee;
  408. height: 0.6rem;
  409. line-height: 0.58rem;
  410. padding-left: 0.2rem;
  411. font-size: 0.24rem;
  412. color: #666666;
  413. span {
  414. font-size: 0.2rem;
  415. display: inline-block;
  416. margin-left: 0.08rem;
  417. color: #999999;
  418. }
  419. &.formLabel {
  420. background-color: #fff;
  421. }
  422. }
  423. .conentBox {
  424. width: 100%;
  425. .conent {
  426. font-size: 0.32rem;
  427. font-weight: 400;
  428. line-height: 0.45rem;
  429. // border-bottom: 0.16rem solid #e5e5e5;
  430. .shows {
  431. display: none;
  432. }
  433. .shows1 {
  434. display: none;
  435. }
  436. .boeder_B {
  437. border-bottom: 0.01rem solid #ccc;
  438. }
  439. p {
  440. &.desc {
  441. overflow: hidden;
  442. }
  443. .grayFont {
  444. width: 75%;
  445. text-align: right;
  446. overflow-x: scroll;
  447. }
  448. }
  449. .bottom {
  450. overflow: hidden;
  451. line-height: 0.86rem;
  452. border-bottom: 0.01rem solid #e6e6e6;
  453. font-size: 0.24rem;
  454. color: #999;
  455. padding: 0 0.24rem 0 0.48rem;
  456. }
  457. .info {
  458. color: #999;
  459. font-size: 0.28rem;
  460. overflow: hidden;
  461. .head {
  462. border-bottom: 0.01rem solid #e6e6e6;
  463. p {
  464. padding: 0.24rem 0.3rem;
  465. i {
  466. color: #00559d;
  467. }
  468. }
  469. }
  470. p {
  471. line-height: 0.4rem;
  472. padding: 0.1rem 0.24rem;
  473. overflow: hidden;
  474. .overflowEllipsis2 {
  475. margin-left: 1.96rem;
  476. }
  477. }
  478. .info_hide {
  479. padding: 0.2rem 0.24rem;
  480. border-bottom: 0.01rem solid #e6e6e6;
  481. .hide {
  482. color: #00559d;
  483. }
  484. }
  485. .imgs-container {
  486. a {
  487. color: #03c !important;
  488. &:visited {
  489. color: #551a8b !important;
  490. }
  491. }
  492. img {
  493. width: 1.5rem;
  494. height: 1.5rem;
  495. margin-right: 0.7rem;
  496. &:nth-child(1) {
  497. margin-left: 0.75rem;
  498. }
  499. }
  500. }
  501. .progress {
  502. padding: 0.2rem 0.2rem;
  503. overflow: hidden;
  504. transition-duration: 0.2s;
  505. transition-timing-function: linear;
  506. &.progressHide {
  507. height: 1.7rem;
  508. }
  509. .progress_info {
  510. overflow: hidden;
  511. margin-bottom: 0.1rem;
  512. &:nth-last-child(1) {
  513. .cont {
  514. border: none !important;
  515. }
  516. }
  517. .progress_info_L {
  518. float: left;
  519. color: #333;
  520. max-width: 18%;
  521. }
  522. .progress_info_R {
  523. float: right;
  524. margin-left: 0.09rem;
  525. width: 80%;
  526. font-size: 0.25rem;
  527. .time {
  528. i {
  529. margin-left: -0.15rem;
  530. &.icon-icon_weizuo {
  531. color: #005495;
  532. }
  533. &.icon-icon_zhengzaijinx {
  534. color: #48a843;
  535. font-size: 0.37rem;
  536. }
  537. }
  538. span {
  539. margin-left: 0.15rem;
  540. }
  541. }
  542. .cont {
  543. border-left: 1px solid #999;
  544. padding-left: 0.4rem;
  545. min-height: 0.4rem;
  546. &.blue {
  547. border-left: 1px solid #005395;
  548. }
  549. }
  550. .text1 {
  551. font-size: 0.15rem;
  552. }
  553. .text2 {
  554. color: #666;
  555. word-break: break-all;
  556. }
  557. p {
  558. padding: 0;
  559. }
  560. }
  561. }
  562. }
  563. }
  564. .txtLabel {
  565. width: 100%;
  566. overflow: hidden;
  567. padding: 0.32rem 0.24rem 0.32rem 0.32rem;
  568. .txt {
  569. width: 30%;
  570. color: #666;
  571. }
  572. .cube-textarea-wrapper {
  573. width: 62%;
  574. }
  575. }
  576. .sub {
  577. background: #ececec;
  578. .cube-btn {
  579. background-color: #005395 !important;
  580. width: 90%;
  581. margin: 0.2rem auto;
  582. border-radius: 8px;
  583. }
  584. }
  585. }
  586. }
  587. .showwrap {
  588. width: 75%;
  589. text-align: right;
  590. }
  591. }
  592. </style>