closed.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  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"></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 in progressInfo">
  127. <div class="progress_info_L">{{ item.activityName }}</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.userName">
  140. ,{{ item.userName }}
  141. </template>
  142. </span>
  143. </div>
  144. <div :class="{ cont: true, blue: item.endTime != '' }">
  145. <p class="text2" v-if="item.desc" v-html="item.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. export default {
  169. data() {
  170. return {
  171. id: "",
  172. loginUser: JSON.parse(localStorage.getItem("loginUser")),
  173. selected: 1,
  174. options: [
  175. {
  176. label: "接单",
  177. value: 1,
  178. },
  179. {
  180. label: "关单信息",
  181. value: 2,
  182. },
  183. ],
  184. resignComment: "", //重新指派原因
  185. item_hides: false,
  186. item_hides1: false,
  187. actives: "info",
  188. processInstanceId: "",
  189. progressInfo: [], //处理进度
  190. model: {}, //提交数据
  191. pro_hides: false, //展开/收起处理进度
  192. };
  193. },
  194. components: {
  195. LoadIng,
  196. EventInformation,
  197. ShowPicture,
  198. },
  199. methods: {
  200. // 查看汇总单
  201. goToSummary(){
  202. if(this.model.incident.duty && this.model.incident.duty.addSummary == 1 && this.model.incident.state.value == "resolved"){
  203. // 责任科室【是否需要填写汇总单】开启,并且工单状态是已解决
  204. this.$router.push({
  205. path: `/summaryOrderDetail/${this.model.incident.id}`
  206. });
  207. }else if(this.model.incident.duty && this.model.incident.duty.addSummary == 1 && this.model.incident.state.value == "close"){
  208. // 责任科室【是否需要填写汇总单】开启,并且工单状态是已关闭
  209. this.$router.push({
  210. path: `/summaryOrderDetail/${this.model.incident.id}`
  211. });
  212. }
  213. },
  214. // 获取事件数据
  215. getParamsData() {
  216. var that = this;
  217. that.$http
  218. .get(
  219. "/service/form/renderForm/receiveform/" +
  220. that.processInstanceId +
  221. "/" +
  222. that.loginUser.id +
  223. "/" +
  224. that.id,
  225. {}
  226. )
  227. .then(function (res) {
  228. console.log(res.data);
  229. that.model = res.data.model;
  230. //seimin
  231. localStorage.setItem("modelData", JSON.stringify(that.model));
  232. that.getProgressInfo();
  233. });
  234. },
  235. // 获取处理进度
  236. getProgressInfo() {
  237. var that = this;
  238. that.$http
  239. .post(
  240. "/service/bpm/bpm/flowTracingCustom/" + that.processInstanceId,
  241. {}
  242. )
  243. .then(function (res) {
  244. console.log(res.data);
  245. that.progressInfo = res.data.data;
  246. //维修记录startcaca
  247. if (that.model.incident.handlerLogs) {
  248. //添加日志
  249. that.model.incident.handlerLogs.forEach((v) => {
  250. that.progressInfo.push({
  251. startTime: v.opTime,
  252. endTime: 1,
  253. desc: v.opValue,
  254. userName: v.userName,
  255. activityName: "事件处理",
  256. });
  257. });
  258. }
  259. //处理数据
  260. that.progressInfo.forEach((v) => {
  261. if (!v.endTime) {
  262. v.endTime = 1;
  263. }
  264. v.startTime = new Date(v.startTime).getTime();
  265. });
  266. var kaishi = that.progressInfo.shift();
  267. var jiedan = that.progressInfo.shift();
  268. that.progressInfo.sort(function (o, c) {
  269. return c.startTime - o.startTime;
  270. });
  271. that.progressInfo.length && (that.progressInfo[0].endTime = "");
  272. that.progressInfo.push(jiedan);
  273. that.progressInfo.push(kaishi);
  274. console.log(that.progressInfo);
  275. //维修记录end
  276. });
  277. },
  278. //隐藏显示详情
  279. hides() {
  280. this.item_hides = !this.item_hides;
  281. $("#shows").slideToggle();
  282. },
  283. // 处理进度隐藏/展开
  284. proHides() {
  285. if (!this.pro_hides) {
  286. $("#progressBox").animate({
  287. height: $("#progressBox")[0].scrollHeight,
  288. });
  289. } else {
  290. $("#progressBox").animate({ height: "1.7rem" });
  291. }
  292. this.pro_hides = !this.pro_hides;
  293. },
  294. //隐藏显示详情
  295. hides1() {
  296. this.item_hides1 = !this.item_hides1;
  297. $("#shows1").slideToggle();
  298. },
  299. // 快速定位
  300. toInfo(id) {
  301. this.actives = id;
  302. $("body,html").animate(
  303. {
  304. scrollTop:
  305. $("#" + id).offset().top -
  306. $(".header")[0].offsetHeight -
  307. $(".navBar")[0].offsetHeight,
  308. },
  309. 260
  310. );
  311. },
  312. },
  313. created() {
  314. // seimin
  315. this.processInstanceId = this.$route.params.data
  316. ? this.$route.params.data.processInstanceId
  317. : JSON.parse(localStorage.getItem("modelData")).incident
  318. .processInstanceId;
  319. this.id = this.$route.params.data
  320. ? this.$route.params.data.id
  321. : JSON.parse(localStorage.getItem("modelData")).incident.id;
  322. this.getParamsData();
  323. },
  324. };
  325. </script>
  326. <style lang="less" scoped>
  327. i.iconfont {
  328. &.blue {
  329. color: #005395;
  330. // &::after {
  331. // content: "";
  332. // width: 0.01rem;
  333. // height: 0.4rem;
  334. // background: #005395;
  335. // position: relative;
  336. // display: block;
  337. // left: 0.14rem;
  338. // }
  339. }
  340. &.blue1 {
  341. color: #005395;
  342. }
  343. }
  344. .closed {
  345. .header {
  346. width: 100%;
  347. height: 0.88rem;
  348. line-height: 0.88rem;
  349. text-align: center;
  350. color: #fff;
  351. font-size: 0.37rem;
  352. background: linear-gradient(#2e2f32, #414246);
  353. position: fixed;
  354. top: 0;
  355. z-index: 6;
  356. }
  357. .navBar {
  358. width: 100%;
  359. height: 0.96rem;
  360. line-height: 0.96rem;
  361. background-color: #fafafa;
  362. font-size: 0.28rem;
  363. position: fixed;
  364. top: 0.88rem;
  365. div {
  366. width: 25%;
  367. text-align: center;
  368. a {
  369. display: inline-block;
  370. height: 0.9rem;
  371. width: 1.7rem;
  372. padding: 0 0.1rem;
  373. &.active {
  374. color: #005395;
  375. border-bottom: 0.06rem solid #005395;
  376. }
  377. }
  378. }
  379. }
  380. .headtop {
  381. margin-top: 1.84rem;
  382. }
  383. .label {
  384. background-color: #eeeeee;
  385. height: 0.6rem;
  386. line-height: 0.58rem;
  387. padding-left: 0.2rem;
  388. font-size: 0.24rem;
  389. color: #666666;
  390. span {
  391. font-size: 0.2rem;
  392. display: inline-block;
  393. margin-left: 0.08rem;
  394. color: #999999;
  395. }
  396. &.formLabel {
  397. background-color: #fff;
  398. }
  399. }
  400. .conentBox {
  401. width: 100%;
  402. .conent {
  403. font-size: 0.32rem;
  404. font-weight: 400;
  405. line-height: 0.45rem;
  406. // border-bottom: 0.16rem solid #e5e5e5;
  407. .shows {
  408. display: none;
  409. }
  410. .shows1 {
  411. display: none;
  412. }
  413. .boeder_B {
  414. border-bottom: 0.01rem solid #ccc;
  415. }
  416. p {
  417. &.desc {
  418. overflow: hidden;
  419. }
  420. .grayFont {
  421. width: 75%;
  422. text-align: right;
  423. overflow-x: scroll;
  424. }
  425. }
  426. .bottom {
  427. overflow: hidden;
  428. line-height: 0.86rem;
  429. border-bottom: 0.01rem solid #e6e6e6;
  430. font-size: 0.24rem;
  431. color: #999;
  432. padding: 0 0.24rem 0 0.48rem;
  433. }
  434. .info {
  435. color: #999;
  436. font-size: 0.28rem;
  437. overflow: hidden;
  438. .head {
  439. border-bottom: 0.01rem solid #e6e6e6;
  440. p {
  441. padding: 0.24rem 0.3rem;
  442. i {
  443. color: #00559d;
  444. }
  445. }
  446. }
  447. p {
  448. line-height: 0.4rem;
  449. padding: 0.1rem 0.24rem;
  450. overflow: hidden;
  451. .overflowEllipsis2 {
  452. margin-left: 1.96rem;
  453. }
  454. }
  455. .info_hide {
  456. padding: 0.2rem 0.24rem;
  457. border-bottom: 0.01rem solid #e6e6e6;
  458. .hide {
  459. color: #00559d;
  460. }
  461. }
  462. .progress {
  463. padding: 0.2rem 0.2rem;
  464. overflow: hidden;
  465. transition-duration: 0.2s;
  466. transition-timing-function: linear;
  467. &.progressHide {
  468. height: 1.7rem;
  469. }
  470. .progress_info {
  471. overflow: hidden;
  472. margin-bottom: 0.1rem;
  473. &:nth-last-child(1) {
  474. .cont {
  475. border: none !important;
  476. }
  477. }
  478. .progress_info_L {
  479. float: left;
  480. color: #333;
  481. max-width: 18%;
  482. }
  483. .progress_info_R {
  484. float: right;
  485. margin-left: 0.09rem;
  486. width: 80%;
  487. font-size: 0.25rem;
  488. .time {
  489. i {
  490. margin-left: -0.15rem;
  491. &.icon-icon_weizuo {
  492. color: #005495;
  493. }
  494. &.icon-icon_zhengzaijinx {
  495. color: #48a843;
  496. font-size: 0.37rem;
  497. }
  498. }
  499. span {
  500. margin-left: 0.15rem;
  501. }
  502. }
  503. .cont {
  504. border-left: 1px solid #999;
  505. padding-left: 0.4rem;
  506. min-height: 0.4rem;
  507. &.blue {
  508. border-left: 1px solid #005395;
  509. }
  510. }
  511. .text1 {
  512. font-size: 0.15rem;
  513. }
  514. .text2 {
  515. color: #666;
  516. word-break: break-all;
  517. }
  518. p {
  519. padding: 0;
  520. }
  521. }
  522. }
  523. }
  524. }
  525. .txtLabel {
  526. width: 100%;
  527. overflow: hidden;
  528. padding: 0.32rem 0.24rem 0.32rem 0.32rem;
  529. .txt {
  530. width: 30%;
  531. color: #666;
  532. }
  533. .cube-textarea-wrapper {
  534. width: 62%;
  535. }
  536. }
  537. .sub {
  538. background: #ececec;
  539. .cube-btn {
  540. background-color: #005395 !important;
  541. margin: 0.2rem auto;
  542. border-radius: 8px;
  543. }
  544. }
  545. }
  546. }
  547. .showwrap {
  548. width: 75%;
  549. text-align: right;
  550. }
  551. }
  552. </style>