closed.vue 16 KB

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