processing.vue 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957
  1. <template>
  2. <div class="againAssign">
  3. <div class="conentBox">
  4. <div class="header">处理方案</div>
  5. <div v-if="modelData.incident.id" class="conent">
  6. <div class="navBar">
  7. <div
  8. class="fl p50"
  9. :class="{ p50: modelData.incident.handlerUser.id != loginUser.id }"
  10. >
  11. <a
  12. :class="{ active: actives == 'info' }"
  13. href="javascript:;"
  14. @click="toInfo('info')"
  15. >事件信息</a
  16. >
  17. </div>
  18. <!-- <div
  19. class="fl p50"
  20. :class="{ p50: modelData.incident.handlerUser.id != loginUser.id }"
  21. >
  22. <a
  23. :class="{ active: actives == 'handlerLog' }"
  24. href="javascript:;"
  25. @click="toInfo('handlerLog')"
  26. >处理日志</a
  27. >
  28. </div> -->
  29. <div
  30. class="fl p50"
  31. :class="{ p50: modelData.incident.handlerUser.id != loginUser.id }"
  32. >
  33. <a
  34. :class="{ active: actives == 'progress' }"
  35. href="javascript:;"
  36. @click="toInfo('progress')"
  37. >处理进度</a
  38. >
  39. </div>
  40. <!-- <div
  41. class="fl"
  42. v-if="modelData.incident.handlerUser.id == loginUser.id"
  43. >
  44. <a
  45. :class="{ active: actives == 'handlerInfo' }"
  46. href="javascript:;"
  47. @click="toInfo('handlerInfo')"
  48. >处理信息</a
  49. >
  50. </div> -->
  51. </div>
  52. <div class="label headtop" id="info">事件信息</div>
  53. <div class="info">
  54. <EventInformation :model="modelData" :id="id"></EventInformation>
  55. <p class="info_hide">
  56. <span class="fl hide" @click="hides()" v-if="!item_hides"
  57. >展开详情 >></span
  58. >
  59. <span class="fl hide" @click="hides()" v-if="item_hides"
  60. >隐藏详情<<</span
  61. >
  62. </p>
  63. <div class="imgs-container" v-if="imgs.length">
  64. <div class="imgs-cont" @click="showImgs(imgs)">
  65. <img
  66. v-if="
  67. img.suffix == 'jpeg' ||
  68. img.suffix == 'jpg' ||
  69. img.suffix == 'gif' ||
  70. img.suffix == 'png' ||
  71. img.suffix == 'svg' ||
  72. img.suffix == 'pdf'
  73. "
  74. :src="img.previewUrl"
  75. v-for="(img, index) in imgs"
  76. class="imgs"
  77. />
  78. <p v-else>
  79. <a :href="[img.previewUrl]">{{ img.name }}</a>
  80. </p>
  81. </div>
  82. </div>
  83. <!-- <HandlerLog :data="modelData.incident.handlerLogs" id="handlerLog"></HandlerLog> -->
  84. <div class="label" id="progress">处理进度</div>
  85. <div
  86. :class="{ progress: true, progressHide: !pro_hides }"
  87. id="progressBox"
  88. >
  89. <div class="progress_info" v-for="item in progressInfo">
  90. <div class="progress_info_L">{{ item.activityName }}</div>
  91. <div class="progress_info_R">
  92. <div class="time">
  93. <i
  94. :class="{
  95. iconfont: true,
  96. 'dsit-icon_weizuo': item.endTime != '',
  97. 'dsit-icon_zhengzaijinx': item.endTime == '',
  98. }"
  99. ></i>
  100. <span class="text1">
  101. {{ item.startTime | timeFormat("MM-dd HH:mm:ss") }}
  102. <template v-if="item.userName">
  103. ,{{ item.userName }}
  104. </template>
  105. </span>
  106. </div>
  107. <div :class="{ cont: true, blue: item.endTime != '' }">
  108. <p class="text2" v-if="item.desc" v-html="item.desc"></p>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. <p class="info_hide">
  114. <span class="fl hide" @click="proHides()">{{
  115. pro_hides ? "隐藏详情 <<" : "展开详情 >>"
  116. }}</span>
  117. </p>
  118. <!-- <div v-if="modelData.incident.handlerUser.id == loginUser.id">
  119. <div class="label" id="handlerInfo">处理信息</div>
  120. <div class="handlerInfo">
  121. <cube-form
  122. :model="model"
  123. @validate="validateHandler"
  124. @submit="submitHandler"
  125. >
  126. <cube-form-group>
  127. <div class="handleRadio">
  128. <cube-radio-group
  129. v-model="order"
  130. :options="handleTypes"
  131. position="right"
  132. :hollow-style="true"
  133. />
  134. </div>
  135. <cube-form-item
  136. :field="fields[0]"
  137. v-if="order == 1"
  138. ></cube-form-item>
  139. <cube-form-item
  140. :field="fields[1]"
  141. class="btn_plcaeholde"
  142. v-if="order == 1"
  143. >
  144. <cube-button @click="showCategoryPicker()">{{
  145. selectedCategoryTxt
  146. ? selectedCategoryTxt
  147. : "请选择事件分类"
  148. }}</cube-button>
  149. </cube-form-item>
  150. <cube-form-item
  151. :field="fields[2]"
  152. v-if="order == 1"
  153. ></cube-form-item>
  154. <cube-form-item
  155. :field="fields[3]"
  156. class="incidentTitle"
  157. v-if="order == 1"
  158. >
  159. <div class="titleRefer">
  160. <textarea
  161. class="titleTxtArea fl"
  162. placeholder="请输入处理方案"
  163. v-model="incidentTitle"
  164. @input="inpTitle()"
  165. ></textarea>
  166. <span class="abtn fl" @click="referKnowledge()"
  167. >引入知识库</span
  168. >
  169. </div>
  170. </cube-form-item>
  171. <div class="label formLabel" v-if="order == 1">
  172. 报修图片
  173. <span>(最多可上传3张JPG或PNG,每张不能超过10M)</span>
  174. </div>
  175. <div class="uplod" v-if="order == 1">
  176. <cube-upload
  177. ref="upload"
  178. :max="3"
  179. :action="action"
  180. :simultaneous-uploads="3"
  181. @files-added="filesAdded"
  182. @file-submitted="fileSubmitted"
  183. />
  184. </div>
  185. <cube-form-item
  186. :field="fields[4]"
  187. v-if="order == 1"
  188. ></cube-form-item>
  189. <cube-form-item
  190. :field="fields[5]"
  191. class="btn_plcaeholde"
  192. v-if="order == 1 && !!model.knowledge"
  193. ></cube-form-item>
  194. <cube-form-item
  195. :field="fields[14]"
  196. v-if="order == 1"
  197. ></cube-form-item>
  198. <cube-form-item
  199. :field="fields[10]"
  200. v-if="order == 1 && !!model.isHelper"
  201. >
  202. <div class="synerBox">
  203. <cube-checkbox-group
  204. v-model="synergeticChecked"
  205. :options="synergeticList"
  206. />
  207. </div>
  208. </cube-form-item>
  209. <cube-form-item
  210. :field="fields[11]"
  211. v-if="order == 1 && !!model.isHelper"
  212. ></cube-form-item>
  213. <cube-form-item
  214. :field="fields[6]"
  215. v-if="order == 2"
  216. ></cube-form-item>
  217. <cube-form-item
  218. :field="fields[15]"
  219. v-if="order == 5"
  220. ></cube-form-item>
  221. <cube-form-item
  222. :field="fields[7]"
  223. v-if="order == 2"
  224. ></cube-form-item>
  225. <cube-form-item
  226. :field="fields[8]"
  227. v-if="order == 3"
  228. ></cube-form-item>
  229. <cube-form-item
  230. :field="fields[9]"
  231. v-if="order == 3"
  232. ></cube-form-item>
  233. </cube-form-group>
  234. <cube-form-group class="sub">
  235. <cube-button type="submit" @click="subVali()"
  236. >提交</cube-button
  237. >
  238. </cube-form-group>
  239. </cube-form>
  240. </div>
  241. </div> -->
  242. </div>
  243. </div>
  244. <load-ing v-if="!modelData.incident.id"></load-ing>
  245. <promp-ting
  246. :conents="promptingConent"
  247. :status="promptingStatus"
  248. ></promp-ting>
  249. </div>
  250. </div>
  251. </template>
  252. <script>
  253. import CubePage from "./../components/cube-page.vue";
  254. import CubeButtonGroup from "./../components/cube-button-group.vue";
  255. import DatePicker from "./../components/date-picker.vue";
  256. import CubeExtendPopup from "./../components/extend-popup.vue";
  257. import LoadIng from "./../views/loading.vue";
  258. // import HandlerLog from "./../views/handlerLog.vue";
  259. import PrompTing from "./../views/prompting.vue";
  260. import EventInformation from './../components/EventInformation/index.vue'
  261. // import host from '../request/host'
  262. // 知识库类型
  263. const solution = {
  264. props: {
  265. value: {
  266. default() {
  267. return [];
  268. },
  269. },
  270. },
  271. data() {
  272. return {
  273. selected: [],
  274. selectData: [],
  275. initVal: JSON.parse(localStorage.getItem("solution")) || [0, 0, 0],
  276. };
  277. },
  278. render(createElement) {
  279. return createElement(
  280. "cube-button",
  281. {
  282. on: {
  283. click: this.showPicker,
  284. },
  285. },
  286. this.selected.length
  287. ? this.selected[this.selected.length - 1]
  288. : "请选择知识库类型"
  289. );
  290. },
  291. created() {
  292. this.getTree();
  293. },
  294. mounted() {},
  295. methods: {
  296. showPicker() {
  297. this.picker.show();
  298. },
  299. selectHandler(selectedVal, selectedIndex, selectedTxt) {
  300. var selected = [];
  301. selectedTxt.forEach(function (v, i) {
  302. if (v != "") {
  303. selected.push(v);
  304. }
  305. });
  306. this.selected = selected;
  307. this.$emit("input", selectedVal);
  308. localStorage.setItem("solution", JSON.stringify(selectedIndex));
  309. },
  310. // 获取事件分类数据
  311. getTree() {
  312. let that = this;
  313. that.$http
  314. .post("/service/solution/fetchDataList/solutionType", {
  315. idx: 0,
  316. sum: 100,
  317. })
  318. .then(function (res) {
  319. // console.log(res);
  320. var list = res.data.list;
  321. var tree = [];
  322. list.forEach((v, i) => {
  323. if (!v.parent) {
  324. tree[i] = {
  325. value: v.id,
  326. text: v.typeName,
  327. children: [],
  328. };
  329. } else {
  330. tree.forEach((val, idx) => {
  331. if (
  332. v.parent &&
  333. !v.parent.parent &&
  334. val.text == v.parent.typeName
  335. ) {
  336. tree[idx].children.push({
  337. value: v.id,
  338. text: v.typeName,
  339. children: [],
  340. });
  341. } else if (v.parent.parent) {
  342. tree[idx].children.forEach((value, index) => {
  343. if (value.text == v.parent.typeName) {
  344. tree[idx].children[index].children.push({
  345. value: v.id,
  346. text: v.typeName,
  347. });
  348. }
  349. });
  350. }
  351. });
  352. }
  353. });
  354. that.selectData = tree;
  355. that.picker = that.$createCascadePicker({
  356. title: "知识库类型选择",
  357. data: that.selectData,
  358. selectedIndex: that.initVal,
  359. onSelect: that.selectHandler,
  360. });
  361. });
  362. },
  363. },
  364. };
  365. export default {
  366. data() {
  367. return {
  368. loginUser: JSON.parse(localStorage.getItem("loginUser")),
  369. id: "",
  370. resignComment: "", //重新指派原因
  371. item_hides: false,
  372. actives: "info",
  373. processInstanceId: "",
  374. progressInfo: [], //处理进度
  375. imgs: [], //图片
  376. model: {}, //提交数据
  377. validity: {},
  378. valid: undefined,
  379. action: {
  380. target:
  381. this.$host + "/service/common/common/uploadAttachment/incident/",
  382. data: {},
  383. },
  384. isUploading: false,
  385. loadShow: false,
  386. pro_hides: false, //展开/收起处理进度
  387. name: "",
  388. phone: "",
  389. label: "incidentInfo", //顶部快速定位
  390. modelData: {
  391. incident: {},
  392. }, //上传的model
  393. incidentTitle: "", //处理方案
  394. referenceInfo: {}, //引用信息
  395. selectedCategoryTxt: "", //事件分类选中展示
  396. selectedAreaId: "", //区域选中id--seimin
  397. selectedAreaName: "", //区域选中名称--seimin
  398. selectedPlaceId: "", //地点选中id--seimin
  399. selectedPlaceName: "", //地点选中名称--seimin
  400. model: {
  401. handleCategory: "", //处理方式
  402. closecode: "", //关闭代码
  403. category: [], //确认事件分类
  404. handleDescription: "", //处理方案
  405. knowledge: false, //是否提交知识库
  406. isHelper: false, //是否需要协同
  407. solutionType: [], //知识库类型
  408. handlerUser: "", //升级/转派对象
  409. isupreason: "", //升级原因
  410. transferReason: "", //转派原因
  411. synergeticChecked: [], //选中协同对象
  412. synergeticReason: "", //协同原因
  413. selectArea: "",
  414. selectPlace: "",
  415. },
  416. // showPrompting:false,
  417. promptingConent: "",
  418. promptingStatus: "",
  419. order: 1, //处理方式 1:直接处理,2:升级,3:转派,4:协同
  420. handleCategoryArr: [], //处理方式数组
  421. closecodeArr: [], //关闭代码数组
  422. // handlerUserArr: [], //处理人数组
  423. synergeticList: [], //协同对象列表
  424. synergeticChecked: [], //选中协同对象
  425. handleTypes: [
  426. {
  427. label: "直接处理",
  428. value: 1,
  429. },
  430. {
  431. label: "升级",
  432. value: 2,
  433. },
  434. {
  435. label: "转派",
  436. value: 3,
  437. },
  438. {
  439. label: "指派",
  440. value: 5,
  441. },
  442. // {
  443. // label: "协同",
  444. // value: 4
  445. // }
  446. ],
  447. vali: false,
  448. fields: [
  449. {
  450. type: "select",
  451. modelKey: "handleCategory",
  452. label: "处理方式:",
  453. props: {
  454. options: this.handleCategoryArr,
  455. title: "请选择处理方式",
  456. placeholder: "请选择处理方式",
  457. },
  458. rules: {
  459. required: true,
  460. },
  461. },
  462. {
  463. component: "button",
  464. modelKey: "category",
  465. label: "确认事件分类:",
  466. rules: {
  467. required: true,
  468. },
  469. },
  470. {
  471. type: "select",
  472. modelKey: "closecode",
  473. label: "关闭代码:",
  474. props: {
  475. options: this.closecodeArr,
  476. title: "请选择关闭代码",
  477. placeholder: "请选择关闭代码",
  478. },
  479. rules: {
  480. required: true,
  481. },
  482. },
  483. {
  484. type: "textarea",
  485. modelKey: "handleDescription",
  486. label: "处理方案:",
  487. props: {
  488. placeholder: "请填写处理方案",
  489. },
  490. rules: {
  491. required: true,
  492. },
  493. debounce: 100,
  494. },
  495. {
  496. type: "switch",
  497. modelKey: "knowledge",
  498. label: "是否提交知识库:",
  499. rules: {
  500. required: false,
  501. },
  502. },
  503. {
  504. component: solution,
  505. modelKey: "solutionType",
  506. label: "知识库类型:",
  507. rules: {
  508. required: true,
  509. },
  510. messages: {
  511. required: "",
  512. },
  513. },
  514. {
  515. type: "select",
  516. modelKey: "handlerUser",
  517. label: "升级对象:",
  518. props: {
  519. options: [],
  520. placeholder: "请选择升级对象",
  521. },
  522. rules: {
  523. required: true,
  524. },
  525. },
  526. {
  527. type: "input",
  528. modelKey: "isupreason",
  529. label: "升级原因:",
  530. props: {
  531. placeholder: "请输入升级原因",
  532. },
  533. rules: {
  534. required: true,
  535. },
  536. },
  537. {
  538. type: "select",
  539. modelKey: "handlerUser",
  540. label: "转派对象:",
  541. props: {
  542. options: [],
  543. placeholder: "请选择转派对象",
  544. },
  545. rules: {
  546. required: true,
  547. },
  548. },
  549. {
  550. type: "input",
  551. modelKey: "transferReason",
  552. label: "转派原因:",
  553. props: {
  554. placeholder: "请输入转派原因",
  555. },
  556. rules: {
  557. required: true,
  558. },
  559. },
  560. {
  561. type: "checkbox-group",
  562. modelKey: "synergeticChecked",
  563. label: "协同对象:",
  564. props: {
  565. options: [],
  566. placeholder: "请选择协同对象",
  567. },
  568. rules: {
  569. required: false,
  570. },
  571. },
  572. {
  573. type: "input",
  574. modelKey: "synergeticReason",
  575. label: "协同原因:",
  576. props: {
  577. placeholder: "请输入协同原因",
  578. },
  579. rules: {
  580. required: false,
  581. },
  582. },
  583. {
  584. type: "select",
  585. modelKey: "selectArea",
  586. label: "区域:",
  587. props: {
  588. options: [],
  589. title: "请选择区域:",
  590. placeholder: "请选择区域:",
  591. },
  592. events: {
  593. change: (id, index, text) => {
  594. // console.log(id,index,text,9999)
  595. this.getPlaceList(id).then((res) => {
  596. this.selectedAreaId = id;
  597. this.selectedAreaName = text;
  598. // {{modelData.incident.place?modelData.incident.place.area.area:'--'}}
  599. console.log(this.modelData, "asad");
  600. if (this.modelData.incident.place) {
  601. this.$set(this.modelData.incident.place, "area", {
  602. id,
  603. area: text,
  604. });
  605. } else {
  606. this.$set(this.modelData.incident, "place", {
  607. area: {
  608. id,
  609. area: text,
  610. },
  611. });
  612. }
  613. });
  614. },
  615. },
  616. rules: {
  617. required: true,
  618. },
  619. },
  620. {
  621. type: "select",
  622. modelKey: "selectPlace",
  623. label: "地点:",
  624. props: {
  625. options: [],
  626. title: "请选择地点:",
  627. placeholder: "请选择地点:",
  628. },
  629. events: {
  630. change: (id, index, text) => {
  631. this.selectedPlaceId = id;
  632. this.selectedPlaceName = text;
  633. this.$set(
  634. this.modelData.incident,
  635. "houseNumber",
  636. this.selectedAreaName + this.selectedPlaceName
  637. );
  638. if (this.modelData.incident.place) {
  639. this.$set(this.modelData.incident.place, "place", text);
  640. this.$set(this.modelData.incident.place, "id", id);
  641. } else {
  642. this.$set(this.modelData.incident, "place", {
  643. id,
  644. place: text,
  645. });
  646. }
  647. },
  648. },
  649. rules: {
  650. required: true,
  651. },
  652. },
  653. {
  654. type: "switch",
  655. modelKey: "isHelper",
  656. label: "是否需要协同:",
  657. rules: {
  658. required: false,
  659. },
  660. },
  661. {
  662. type: "select",
  663. modelKey: "handlerUser",
  664. label: "指派对象:",
  665. props: {
  666. options: [],
  667. placeholder: "请选择指派对象",
  668. },
  669. rules: {
  670. required: true,
  671. },
  672. },
  673. ],
  674. };
  675. },
  676. watch: {
  677. // 监听synergeticChecked变化
  678. synergeticChecked: {
  679. handler: function (n, o) {
  680. this.model.synergeticChecked = n;
  681. },
  682. },
  683. },
  684. methods: {
  685. //获取区域
  686. getAreaList() {
  687. return new Promise((resolve, reject) => {
  688. this.$http
  689. .post("/service/user/data/fetchDataList/area", { idx: 0, sum: 1000 })
  690. .then((res) => {
  691. if (res.data.status == 200) {
  692. let arr = res.data.list.map((item) => {
  693. return { value: item.id, text: item.area };
  694. });
  695. // console.log(arr,2222)
  696. // this.selectedAreaArr = arr;
  697. this.fields.forEach((item) => {
  698. if (item.modelKey === "selectArea") {
  699. item.props.options = arr;
  700. }
  701. });
  702. resolve(res);
  703. }
  704. });
  705. });
  706. },
  707. //根据区域获取地点
  708. getPlaceList(id) {
  709. return new Promise((resolve, reject) => {
  710. this.$http
  711. .post("/service/user/data/fetchDataList/place", {
  712. idx: 0,
  713. sum: 1000,
  714. place: { area: { id } },
  715. })
  716. .then((res) => {
  717. if (res.data.status == 200) {
  718. let arr = res.data.list.map((item) => {
  719. return { value: item.id, text: item.place };
  720. });
  721. // console.log(arr,2222)
  722. // this.selectedAreaArr = arr;
  723. this.fields.forEach((item) => {
  724. if (item.modelKey === "selectPlace") {
  725. item.props.options = arr;
  726. }
  727. });
  728. resolve(res);
  729. }
  730. });
  731. });
  732. },
  733. // 获取事件数据
  734. getParamsData() {
  735. var that = this;
  736. that.$http
  737. .get(
  738. "/service/form/renderForm/handlerform/" +
  739. that.processInstanceId +
  740. "/" +
  741. that.loginUser.id +
  742. "/" +
  743. that.id,
  744. {}
  745. )
  746. .then(function (res) {
  747. console.log(res.data, 666);
  748. that.modelData = res.data.model;
  749. //seimin
  750. localStorage.setItem("modelData", JSON.stringify(that.modelData));
  751. });
  752. },
  753. //展示图片
  754. showImgs(imgs){
  755. this.$createImagePreview({
  756. imgs:imgs.map(v=>v.previewUrl)
  757. }).show()
  758. },
  759. // 获取图片
  760. getImgs() {
  761. var that = this;
  762. that.$http
  763. .get(
  764. "/service/common/common/listAttachment/incident/" +
  765. that.processInstanceId,
  766. {}
  767. )
  768. .then(function (res) {
  769. that.imgs = res.data.data.splice(0, 3);
  770. });
  771. },
  772. // 事件分类回显
  773. setCategory() {
  774. let that = this;
  775. // console.log(898);
  776. // console.log(that.modelData.incident.category);
  777. // let cate = that.modelData.incident.category;
  778. if (localStorage.getItem("referenceInfo")) {
  779. that.referenceInfo = JSON.parse(localStorage.getItem("referenceInfo"));
  780. // that.incidentTitle = that.model.handleDescription =
  781. // that.referenceInfo.content;
  782. //baba
  783. var selectedVal = []; //存id,对应value
  784. var selectedIndex = []; //存索引
  785. var selectedTxt = []; //存名称
  786. if (this.referenceInfo.category) {
  787. console.log(this.selectData, "所有事件分类");
  788. console.log(this.referenceInfo.category, "返回的数据");
  789. var category = this.referenceInfo.category;
  790. selectedVal = [category.id]; //存id,对应value
  791. // selectedVal
  792. if (category.parentCategory) {
  793. //上级
  794. selectedVal.unshift(category.parentCategory.id);
  795. if (category.parentCategory.parentCategory) {
  796. //上上级
  797. selectedVal.unshift(category.parentCategory.parentCategory.id);
  798. }
  799. }
  800. // selectedIndex selectedTxt
  801. //一级
  802. if (selectedVal[0]) {
  803. this.selectData.forEach(function (v, i) {
  804. if (v.value == selectedVal[0]) {
  805. selectedIndex.push(i);
  806. selectedTxt.push(v.text);
  807. }
  808. });
  809. // 二级
  810. if (selectedVal[1]) {
  811. this.selectData[selectedIndex[0].toString()].children.forEach(
  812. function (v, i) {
  813. if (v.value == selectedVal[1]) {
  814. selectedIndex.push(i);
  815. selectedTxt.push(v.text);
  816. }
  817. }
  818. );
  819. // 三级
  820. if (selectedVal[2]) {
  821. this.selectData[selectedIndex[0].toString()].children[
  822. selectedIndex[1].toString()
  823. ].children.forEach(function (v, i) {
  824. if (v.value == selectedVal[2]) {
  825. selectedIndex.push(i);
  826. selectedTxt.push(v.text);
  827. }
  828. });
  829. }
  830. }
  831. }
  832. console.log(selectedVal, selectedIndex, selectedTxt, "获取的数据");
  833. }
  834. //回显
  835. var selected = [];
  836. selectedTxt.forEach(function (v, i) {
  837. if (v != "") {
  838. selected.push(v);
  839. }
  840. });
  841. this.selected = selected;
  842. this.selectedCategoryTxt = selected.length
  843. ? selected[selected.length - 1]
  844. : "";
  845. this.model.category = selectedVal;
  846. // localStorage.setItem("category", JSON.stringify(selectedIndex));
  847. // localStorage.setItem("categoryVal", JSON.stringify(selectedVal));
  848. // localStorage.setItem(
  849. // "selectedCategoryTxt",
  850. // JSON.stringify(this.selectedCategoryTxt)
  851. // );
  852. }
  853. },
  854. // 获取处理进度
  855. getProgressInfo() {
  856. var that = this;
  857. that.$http
  858. .post(
  859. "/service/bpm/bpm/flowTracingCustom/" + that.processInstanceId,
  860. {}
  861. )
  862. .then(function (res) {
  863. console.log(res.data);
  864. that.progressInfo = res.data.data;
  865. //处理日志startcaca
  866. if (that.modelData.incident.handlerLogs) {
  867. //添加日志
  868. that.modelData.incident.handlerLogs.forEach((v) => {
  869. that.progressInfo.push({
  870. startTime: v.opTime,
  871. endTime: 1,
  872. desc: v.opValue,
  873. userName: v.userName,
  874. activityName: "事件处理",
  875. });
  876. });
  877. }
  878. //处理数据
  879. that.progressInfo.forEach((v) => {
  880. if (!v.endTime) {
  881. v.endTime = 1;
  882. }
  883. v.startTime = new Date(v.startTime).getTime();
  884. });
  885. var kaishi = that.progressInfo.shift();
  886. var jiedan = that.progressInfo.shift();
  887. that.progressInfo.sort(function (o, c) {
  888. return c.startTime - o.startTime;
  889. });
  890. that.progressInfo.length && (that.progressInfo[0].endTime = "");
  891. that.progressInfo.push(jiedan);
  892. that.progressInfo.push(kaishi);
  893. console.log(that.progressInfo);
  894. //处理日志end
  895. });
  896. },
  897. //隐藏显示详情
  898. hides() {
  899. this.item_hides = !this.item_hides;
  900. $("#shows").slideToggle();
  901. },
  902. // 处理进度隐藏/展开
  903. proHides() {
  904. if (!this.pro_hides) {
  905. $("#progressBox").animate({
  906. height: $("#progressBox")[0].scrollHeight,
  907. });
  908. } else {
  909. $("#progressBox").animate({ height: "1.7rem" });
  910. }
  911. this.pro_hides = !this.pro_hides;
  912. },
  913. // 快速定位
  914. toInfo(id) {
  915. this.actives = id;
  916. $("body,html").animate(
  917. {
  918. scrollTop:
  919. $("#" + id).offset().top -
  920. $(".header")[0].offsetHeight -
  921. $(".navBar")[0].offsetHeight,
  922. },
  923. 260
  924. );
  925. },
  926. // 输入处理方案
  927. inpTitle() {
  928. this.model.handleDescription = this.incidentTitle;
  929. },
  930. subVali() {
  931. this.vali = true;
  932. },
  933. // 获取处理方式
  934. getHandleCategory() {
  935. var that = this;
  936. this.$http
  937. .post("/service/common/common/getDictionary", {
  938. key: "incident_handleCategory",
  939. type: "list",
  940. })
  941. .then(function (res) {
  942. res.data.forEach(function (v, i) {
  943. that.handleCategoryArr.push({
  944. text: v.name,
  945. value: v.id,
  946. });
  947. });
  948. that.fields[0].props.options = that.handleCategoryArr;
  949. });
  950. },
  951. // 获取关闭代码
  952. getClosecode() {
  953. var that = this;
  954. this.$http
  955. .post("/service/common/common/getDictionary", {
  956. key: "incident_closecode",
  957. type: "list",
  958. })
  959. .then(function (res) {
  960. res.data.forEach(function (v, i) {
  961. that.closecodeArr.push({
  962. text: v.desc,
  963. value: v.id,
  964. });
  965. });
  966. that.fields[2].props.options = that.closecodeArr;
  967. });
  968. },
  969. // 获取指派对象baba
  970. getZpUser() {
  971. var that = this;
  972. var postData = {
  973. idx: 0,
  974. sum: 1000,
  975. user: {
  976. roledata: { rolecode: "first-line support" },
  977. roledata2: { rolecode: "second-line support" },
  978. selectType: "1",
  979. },
  980. };
  981. this.$http
  982. .post("/service/user/data/fetchDataList/user", postData)
  983. .then(function (res) {
  984. var handlerUserArr = [];
  985. res.data.list.forEach(function (v, i) {
  986. handlerUserArr.push({
  987. text: v.name,
  988. value: v.id,
  989. });
  990. });
  991. that.fields[15].props.options = handlerUserArr;
  992. });
  993. },
  994. // 获取升级对象
  995. getUpUser() {
  996. var that = this;
  997. var postData = {
  998. idx: 0,
  999. sum: 1000,
  1000. user: {
  1001. roledata: { rolecode: "second-line support" },
  1002. selectType: "1",
  1003. },
  1004. };
  1005. this.$http
  1006. .post("/service/user/data/fetchDataList/user", postData)
  1007. .then(function (res) {
  1008. var handlerUserArr = [];
  1009. res.data.list.forEach(function (v, i) {
  1010. handlerUserArr.push({
  1011. text: v.name,
  1012. value: v.id,
  1013. });
  1014. });
  1015. that.fields[6].props.options = handlerUserArr;
  1016. });
  1017. },
  1018. // 获取转派对象
  1019. getRotateUser() {
  1020. var that = this;
  1021. var postData = {
  1022. idx: 0,
  1023. sum: 1000,
  1024. user: {
  1025. roledata: { rolecode: "first-line support" },
  1026. selectType: "1",
  1027. },
  1028. };
  1029. this.$http
  1030. .post("/service/user/data/fetchDataList/user", postData)
  1031. .then(function (res) {
  1032. var handlerUserArr = [];
  1033. res.data.list.forEach(function (v, i) {
  1034. handlerUserArr.push({
  1035. text: v.name,
  1036. value: v.id,
  1037. });
  1038. });
  1039. that.fields[8].props.options = handlerUserArr;
  1040. });
  1041. },
  1042. // 获取协同对象
  1043. getSynerUser() {
  1044. var that = this;
  1045. var postData = {
  1046. idx: 0,
  1047. sum: 1000,
  1048. };
  1049. this.$http
  1050. .post("/service/user/data/fetchDataList/user", postData)
  1051. .then(function (res) {
  1052. var handlerUserArr = [];
  1053. res.data.list.forEach(function (v, i) {
  1054. handlerUserArr.push({
  1055. label: v.name,
  1056. value: v.id,
  1057. });
  1058. });
  1059. that.fields[10].props.options = handlerUserArr;
  1060. that.synergeticList = handlerUserArr;
  1061. });
  1062. },
  1063. // 获取页面数据
  1064. getMessage() {
  1065. var that = this;
  1066. if (localStorage.getItem("model")) {
  1067. that.model = JSON.parse(localStorage.getItem("model"));
  1068. }
  1069. if (localStorage.getItem("modelData")) {
  1070. that.modelData = JSON.parse(localStorage.getItem("modelData"));
  1071. }
  1072. if (localStorage.getItem("referenceInfo")) {
  1073. that.referenceInfo = JSON.parse(localStorage.getItem("referenceInfo"));
  1074. that.incidentTitle = that.model.handleDescription =
  1075. that.referenceInfo.content;
  1076. }
  1077. if (localStorage.getItem("order")) {
  1078. that.order = localStorage.getItem("order") - 0;
  1079. }
  1080. // if (localStorage.getItem("selectedCategoryTxt")) {
  1081. // that.selectedCategoryTxt = JSON.parse(
  1082. // localStorage.getItem("selectedCategoryTxt")
  1083. // );
  1084. // }
  1085. that.getProgressInfo();
  1086. },
  1087. // 事件分类
  1088. showCategoryPicker() {
  1089. this.categoryPicker.show();
  1090. },
  1091. selectCategoryHandler(selectedVal, selectedIndex, selectedTxt) {
  1092. console.log(selectedVal, selectedIndex, selectedTxt);
  1093. var selected = [];
  1094. selectedTxt.forEach(function (v, i) {
  1095. if (v != "") {
  1096. selected.push(v);
  1097. }
  1098. });
  1099. this.selected = selected;
  1100. this.selectedCategoryTxt = selected.length
  1101. ? selected[selected.length - 1]
  1102. : "";
  1103. this.model.category = selectedVal;
  1104. // localStorage.setItem("category", JSON.stringify(selectedIndex));
  1105. // localStorage.setItem("categoryVal", JSON.stringify(selectedVal));
  1106. // localStorage.setItem(
  1107. // "selectedCategoryTxt",
  1108. // JSON.stringify(this.selectedCategoryTxt)
  1109. // );
  1110. },
  1111. getIncidentcategory() {
  1112. var that = this;
  1113. this.$http
  1114. .post("/service/bpm/data/fetchDataList/incidentcategory", {
  1115. idx: 0,
  1116. sum: 1000,
  1117. })
  1118. .then(function (res) {
  1119. var list = res.data.list;
  1120. var tree = [];
  1121. list.forEach((v, i) => {
  1122. if (!v.parent) {
  1123. tree[i] = {
  1124. value: v.id,
  1125. text: v.category,
  1126. children: [],
  1127. };
  1128. } else {
  1129. tree.forEach((val, idx) => {
  1130. if (
  1131. v.parent &&
  1132. !v.parent.parent &&
  1133. val.text == v.parent.category
  1134. ) {
  1135. tree[idx].children.push({
  1136. value: v.id,
  1137. text: v.category,
  1138. children: [],
  1139. });
  1140. } else if (v.parent.parent) {
  1141. tree[idx].children.forEach((value, index) => {
  1142. if (value.text == v.parent.category) {
  1143. tree[idx].children[index].children.push({
  1144. value: v.id,
  1145. text: v.category,
  1146. });
  1147. }
  1148. });
  1149. }
  1150. });
  1151. }
  1152. });
  1153. // if (!localStorage.getItem("category")) {
  1154. if (true) {
  1155. let cate = that.modelData.incident.category;
  1156. let cateGrand =
  1157. cate.parentCategory &&
  1158. cate.parentCategory.parentCategory &&
  1159. cate.parentCategory.parentCategory.id;
  1160. let cateFa = cate.parentCategory && cate.parentCategory.id;
  1161. let cateSelf = cate.id;
  1162. console.log(cate, tree);
  1163. var i1 = 0,
  1164. i2 = 0,
  1165. i3 = 0;
  1166. var selectedVal = [];
  1167. var selectedIndex = [];
  1168. var selectedTxt = [];
  1169. tree.forEach((v, i) => {
  1170. if (v.value == cateGrand) {
  1171. selectedVal.push(v.value);
  1172. selectedIndex.push(i);
  1173. selectedTxt.push(v.text);
  1174. v.children.forEach((va, ind) => {
  1175. if (va.value == cateFa) {
  1176. selectedVal.push(va.value);
  1177. selectedIndex.push(ind);
  1178. selectedTxt.push(va.text);
  1179. va.children.forEach((val, idx) => {
  1180. if (val.value == cateSelf) {
  1181. selectedVal.push(val.value);
  1182. selectedIndex.push(idx);
  1183. selectedTxt.push(val.text);
  1184. }
  1185. });
  1186. }
  1187. });
  1188. }
  1189. });
  1190. console.log(selectedVal, selectedIndex, selectedTxt);
  1191. // console.log(i1,i2,i3);
  1192. // var cateData=[i1,i2,i3]
  1193. that.selectData = tree;
  1194. // 获取事件分类并设置
  1195. that.setCategory();
  1196. that.categoryPicker = that.$createCascadePicker({
  1197. title: "事件分类选择",
  1198. data: that.selectData,
  1199. selectedIndex: selectedIndex,
  1200. onSelect: that.selectCategoryHandler,
  1201. });
  1202. setTimeout(() => {
  1203. that.selectCategoryHandler(
  1204. selectedVal,
  1205. selectedIndex,
  1206. selectedTxt
  1207. );
  1208. }, 500);
  1209. } else {
  1210. // that.selectData = tree;
  1211. // // 获取事件分类并设置
  1212. // that.setCategory();
  1213. // that.categoryPicker = that.$createCascadePicker({
  1214. // title: "事件分类选择",
  1215. // data: that.selectData,
  1216. // selectedIndex: JSON.parse(localStorage.getItem("category")) || [
  1217. // 0, 0, 0,
  1218. // ],
  1219. // onSelect: that.selectCategoryHandler,
  1220. // });
  1221. // that.model.category = JSON.parse(
  1222. // localStorage.getItem("categoryVal")
  1223. // );
  1224. }
  1225. });
  1226. },
  1227. // 暂时存值
  1228. setLocalStroageData() {
  1229. var that = this;
  1230. var a1 = [],
  1231. a2 = [],
  1232. a3 = [],
  1233. category = [],
  1234. solutionType = [],
  1235. synergeticChecked = [];
  1236. that.model.category.forEach(function (v, i) {
  1237. if (v) {
  1238. a1.push(v);
  1239. }
  1240. });
  1241. category = a1;
  1242. that.model.solutionType.forEach(function (v, i) {
  1243. if (v) {
  1244. a2.push(v);
  1245. }
  1246. });
  1247. solutionType = a2;
  1248. that.synergeticChecked.forEach(function (v, i) {
  1249. a3.push({ id: v });
  1250. });
  1251. synergeticChecked = a3;
  1252. that.modelData.incident.category = {
  1253. id: category[category.length - 1],
  1254. };
  1255. that.modelData.loginUser = that.loginUser;
  1256. if (that.order == 1) {
  1257. // 直接处理
  1258. that.modelData.handler_code = "resolve";
  1259. that.modelData.msgflag = "申请关闭";
  1260. that.modelData.submit = "申请关闭";
  1261. that.modelData.incident.handleDescription =
  1262. that.model.handleDescription;
  1263. that.modelData.incident.handleCategory = {
  1264. id: that.model.handleCategory,
  1265. };
  1266. that.modelData.incident.closecode = { id: that.model.closecode };
  1267. that.modelData.isSolution = that.model.knowledge;
  1268. that.modelData.bpm_activiti = {
  1269. solutionType: {
  1270. id: solutionType[solutionType.length - 1],
  1271. },
  1272. };
  1273. // 协同
  1274. that.modelData.incident.synergeticReason = that.model.synergeticReason;
  1275. delete that.modelData.isupreason;
  1276. delete that.modelData.examine;
  1277. delete that.modelData.assignee;
  1278. delete that.modelData.transferReason;
  1279. that.modelData.incident.synergetic = synergeticChecked;
  1280. } else if (that.order == 2) {
  1281. // 升级
  1282. that.modelData.handler_code = "function";
  1283. that.modelData.msgflag = "升级";
  1284. that.modelData.submit = "升级";
  1285. that.modelData.isupreason = that.model.isupreason;
  1286. that.modelData.assignee = that.model.handlerUser;
  1287. that.modelData.examine = {
  1288. upgradeAuditor: { id: that.modelData.assignee },
  1289. };
  1290. delete that.modelData.transferReason;
  1291. delete that.modelData.incident.synergetic;
  1292. delete that.modelData.incident.synergeticReason;
  1293. if (that.modelData.isSolution) {
  1294. delete that.modelData.isSolution;
  1295. }
  1296. } else if (that.order == 3) {
  1297. // 转派
  1298. that.modelData.handler_code = "forward";
  1299. that.modelData.msgflag = "转派";
  1300. that.modelData.submit = "转派";
  1301. that.modelData.transferReason = that.model.transferReason;
  1302. that.modelData.assignee = that.model.handlerUser;
  1303. delete that.modelData.isupreason;
  1304. delete that.modelData.examine;
  1305. delete that.modelData.incident.synergetic;
  1306. delete that.modelData.incident.synergeticReason;
  1307. if (that.modelData.isSolution) {
  1308. delete that.modelData.isSolution;
  1309. }
  1310. }
  1311. that.model.fileUrl = "url";
  1312. that.loadShow = true;
  1313. },
  1314. // 处理方案引入知识库
  1315. referKnowledge() {
  1316. var that = this;
  1317. if (!that.model.handleDescription) {
  1318. alert("请输入处理方案");
  1319. return;
  1320. }
  1321. that.setLocalStroageData();
  1322. localStorage.setItem("modelData", JSON.stringify(that.modelData));
  1323. localStorage.setItem("model", JSON.stringify(that.model));
  1324. localStorage.setItem("order", that.order);
  1325. this.$router.push({
  1326. name: "ReferenceList",
  1327. params: { data: that.model.handleDescription },
  1328. });
  1329. },
  1330. // 提交
  1331. submitHandler() {
  1332. var that = this;
  1333. that.setLocalStroageData();
  1334. // that.modelData.incident.place = {
  1335. // area:{
  1336. // id:this.selectedAreaId,
  1337. // area:this.selectedAreaName
  1338. // },
  1339. // id:this.selectedPlaceId,
  1340. // place:this.selectedPlaceName
  1341. // };//增加区域地点
  1342. console.log(that.model, 11111);
  1343. // console.log(this.selectedPlaceId,this.selectedAreaId,8888);//2020年4月25日16:12:55
  1344. that.model.fileUrl = "url";
  1345. that.loadShow = true;
  1346. if (this.order == 5) {
  1347. that.$http
  1348. .post(
  1349. "/service/bpm/bpm/delegateTask/" + that.modelData.incident.taskId,
  1350. { assginee: that.model.handlerUser }
  1351. )
  1352. .then(function (res) {
  1353. if (res.data) {
  1354. $("#fade").fadeIn();
  1355. that.promptingConent = "恭喜您,提交成功!";
  1356. that.promptingStatus = true;
  1357. that.dialog = that
  1358. .$createDialog({
  1359. type: "alert",
  1360. title: "提交成功",
  1361. content: "点击返回首页",
  1362. icon: "cubeic-right",
  1363. onConfirm: (e, promptValue) => {
  1364. that.$router.push({ path: "/main" });
  1365. },
  1366. })
  1367. .show();
  1368. // localStorage.removeItem("category");
  1369. localStorage.removeItem("model");
  1370. localStorage.removeItem("modelData");
  1371. localStorage.removeItem("referenceInfo");
  1372. localStorage.removeItem("solution");
  1373. localStorage.removeItem("order");
  1374. setTimeout(function () {
  1375. $("#fade").fadeOut();
  1376. }, 2000);
  1377. } else {
  1378. $("#fade").fadeIn();
  1379. that.promptingConent = "系统错误,请稍后再试!";
  1380. that.promptingStatus = false;
  1381. that.loadShow = false;
  1382. that.dialog = that
  1383. .$createDialog({
  1384. type: "alert",
  1385. title: "系统错误,请稍后再试!",
  1386. content: "点击返回首页",
  1387. icon: "cubeic-wrong",
  1388. onConfirm: (e, promptValue) => {
  1389. that.$router.push({ path: "/main" });
  1390. },
  1391. })
  1392. .show();
  1393. setTimeout(function () {
  1394. $("#fade").fadeOut();
  1395. }, 2000);
  1396. }
  1397. });
  1398. } else {
  1399. that.$http
  1400. .post(
  1401. "/service/bpm/bpm/completeTask/" +
  1402. that.modelData.incident.taskId +
  1403. "/" +
  1404. that.loginUser.id,
  1405. that.modelData
  1406. )
  1407. .then(function (res) {
  1408. if (res.data) {
  1409. setTimeout(function () {
  1410. that.$refs.upload.start();
  1411. }, 100);
  1412. $("#fade").fadeIn();
  1413. that.promptingConent = "恭喜您,提交成功!";
  1414. that.promptingStatus = true;
  1415. that.dialog = that
  1416. .$createDialog({
  1417. type: "alert",
  1418. title: "提交成功",
  1419. content: "点击返回首页",
  1420. icon: "cubeic-right",
  1421. onConfirm: (e, promptValue) => {
  1422. that.$router.push({ path: "/main" });
  1423. },
  1424. })
  1425. .show();
  1426. // localStorage.removeItem("category");
  1427. localStorage.removeItem("model");
  1428. localStorage.removeItem("modelData");
  1429. localStorage.removeItem("referenceInfo");
  1430. localStorage.removeItem("solution");
  1431. localStorage.removeItem("order");
  1432. setTimeout(function () {
  1433. $("#fade").fadeOut();
  1434. }, 2000);
  1435. } else {
  1436. $("#fade").fadeIn();
  1437. that.promptingConent = "系统错误,请稍后再试!";
  1438. that.promptingStatus = false;
  1439. that.loadShow = false;
  1440. that.dialog = that
  1441. .$createDialog({
  1442. type: "alert",
  1443. title: "系统错误,请稍后再试!",
  1444. content: "点击返回首页",
  1445. icon: "cubeic-wrong",
  1446. onConfirm: (e, promptValue) => {
  1447. that.$router.push({ path: "/main" });
  1448. },
  1449. })
  1450. .show();
  1451. setTimeout(function () {
  1452. $("#fade").fadeOut();
  1453. }, 2000);
  1454. }
  1455. });
  1456. }
  1457. event.preventDefault();
  1458. },
  1459. validateHandler(result) {
  1460. // console.log(result);
  1461. this.validity = result.validity;
  1462. this.valid = result.valid;
  1463. // if (this.vali == true) {
  1464. // $("#fade").fadeIn();
  1465. // this.promptingConent = "提交失败,请填写必填信息!";
  1466. // this.promptingStatus = false;
  1467. // setTimeout(function() {
  1468. // $("#fade").fadeOut();
  1469. // }, 2000);
  1470. // }
  1471. // this.vali = false;
  1472. },
  1473. dateSelectHandler(selectedVal) {
  1474. this.model.dateValue = new Date(
  1475. selectedVal[0],
  1476. selectedVal[1] - 1,
  1477. selectedVal[2]
  1478. ).toDateString();
  1479. },
  1480. filesAdded(files) {
  1481. let hasIgnore = false;
  1482. const maxSize = 1000 * 1024 * 1024; // 1M
  1483. for (let k in files) {
  1484. const file = files[k];
  1485. if (file.size > maxSize) {
  1486. file.ignore = true;
  1487. hasIgnore = true;
  1488. }
  1489. }
  1490. hasIgnore &&
  1491. this.$createToast({
  1492. type: "warn",
  1493. time: 1000,
  1494. txt: "不能上传超过100M的文件",
  1495. }).show();
  1496. // 暂停上传
  1497. this.$refs.upload.pause();
  1498. },
  1499. fileSubmitted(files) {
  1500. this.action.data = { fileName: files.name };
  1501. },
  1502. },
  1503. created() {
  1504. this.processInstanceId = this.$route.params.data
  1505. ? this.$route.params.data.processInstanceId
  1506. : JSON.parse(localStorage.getItem("modelData")).incident
  1507. .processInstanceId;
  1508. this.id = this.$route.params.data
  1509. ? this.$route.params.data.id
  1510. : JSON.parse(localStorage.getItem("modelData")).incident.id;
  1511. this.action.target += this.processInstanceId;
  1512. this.getParamsData();
  1513. this.getImgs();
  1514. // 处理方式
  1515. this.getHandleCategory();
  1516. // 关闭代码
  1517. this.getClosecode();
  1518. // 升级对象
  1519. this.getUpUser();
  1520. // 指派对象
  1521. this.getZpUser();
  1522. // 转派对象
  1523. this.getRotateUser();
  1524. // 协同对象
  1525. this.getSynerUser();
  1526. // 获取页面数据
  1527. this.getMessage();
  1528. // 事件分类
  1529. this.getIncidentcategory();
  1530. },
  1531. mounted() {
  1532. console.log(this.modelData, this.model, 999);
  1533. // 获取区域列表
  1534. // this.getAreaList().then(res=>{
  1535. // if(this.modelData.incident.place){
  1536. // // 获取地点列表
  1537. // this.getPlaceList(this.modelData.incident.place.area.id)
  1538. // .then(res1=>{
  1539. // this.selectedAreaId = this.modelData.incident.place.area.id;
  1540. // this.selectedAreaName = this.modelData.incident.place.area.area;
  1541. // this.model.selectArea = this.modelData.incident.place.area.id;
  1542. // this.selectedPlaceId = this.modelData.incident.place.id;
  1543. // this.selectedPlaceName = this.modelData.incident.place.place;
  1544. // this.model.selectPlace = this.modelData.incident.place.id;
  1545. // });
  1546. // }
  1547. // })
  1548. },
  1549. components: {
  1550. CubePage,
  1551. CubeButtonGroup,
  1552. DatePicker,
  1553. // JsonView
  1554. CubeExtendPopup,
  1555. LoadIng,
  1556. EventInformation,
  1557. // HandlerLog,
  1558. PrompTing,
  1559. },
  1560. };
  1561. </script>
  1562. <style>
  1563. .newIncident .cube-form-group {
  1564. border-bottom: 0.02rem solid rgb(245, 245, 245);
  1565. }
  1566. .newIncident .sub .cube-btn {
  1567. margin-top: 1.1rem;
  1568. }
  1569. .btn_plcaeholde .cube-btn {
  1570. padding-left: 0;
  1571. padding-right: 0;
  1572. text-align: left;
  1573. color: inherit;
  1574. background: none;
  1575. border: none;
  1576. }
  1577. .btn_plcaeholde .cube-btn:active {
  1578. background-color: #fff;
  1579. }
  1580. .btn_plcaeholde .cube-btn::after {
  1581. content: ">";
  1582. float: right;
  1583. margin-right: 0.15rem;
  1584. }
  1585. .cube-form_standard .cube-upload-def .cube-upload-btn,
  1586. .cube-form_standard .cube-upload-def .cube-upload-file {
  1587. margin-left: 3% !important;
  1588. }
  1589. .sub .cube-btn {
  1590. background-color: #005395 !important;
  1591. width: 90%;
  1592. margin: 0 auto;
  1593. border-radius: 8px;
  1594. }
  1595. .cube-picker-wheel-item {
  1596. text-overflow: ellipsis;
  1597. }
  1598. </style>
  1599. <style lang="less" scoped>
  1600. .header {
  1601. width: 100%;
  1602. height: 0.88rem;
  1603. line-height: 0.88rem;
  1604. text-align: center;
  1605. color: #fff;
  1606. font-size: 0.37rem;
  1607. background: linear-gradient(#2e2f32, #414246);
  1608. position: fixed;
  1609. top: 0;
  1610. z-index: 6;
  1611. }
  1612. .incidentTitle {
  1613. .titleRefer {
  1614. display: flex;
  1615. align-items: center;
  1616. justify-content: space-between;
  1617. .titleTxtArea {
  1618. font-size: 0.3rem;
  1619. color: #333;
  1620. height: 2rem;
  1621. width: 62%;
  1622. &:focus {
  1623. outline: none;
  1624. }
  1625. }
  1626. .abtn {
  1627. display: inline-block;
  1628. width: 37%;
  1629. text-align: center;
  1630. height: 0.48rem;
  1631. color: #005395;
  1632. font-size: 0.28rem;
  1633. }
  1634. }
  1635. }
  1636. .form-custom {
  1637. .cube-form-item {
  1638. .cube-btn {
  1639. padding-left: 0;
  1640. padding-right: 0;
  1641. text-align: left;
  1642. color: inherit;
  1643. background: none;
  1644. border: none;
  1645. }
  1646. }
  1647. }
  1648. .label {
  1649. background-color: rgb(238, 238, 238);
  1650. height: 0.6rem;
  1651. line-height: 0.6rem;
  1652. padding-left: 0.2rem;
  1653. font-size: 0.24rem;
  1654. color: #666666;
  1655. span {
  1656. font-size: 0.2rem;
  1657. display: inline-block;
  1658. margin-left: 0.08rem;
  1659. color: #999999;
  1660. }
  1661. &.formLabel {
  1662. background-color: #fff;
  1663. }
  1664. }
  1665. .zhidu {
  1666. display: flex;
  1667. height: 0.7rem;
  1668. line-height: 0.7rem;
  1669. border-bottom: 0.02rem solid rgb(245, 245, 245);
  1670. div:nth-child(1) {
  1671. width: 27.5%;
  1672. padding-left: 6%;
  1673. }
  1674. }
  1675. .bgColor {
  1676. background-color: white;
  1677. &.newIncident {
  1678. padding-top: 1.84rem;
  1679. }
  1680. }
  1681. .uplod {
  1682. padding: 0 0.24rem;
  1683. border-bottom: 0.02rem solid rgb(245, 245, 245);
  1684. }
  1685. .handleRadio {
  1686. border-bottom: 0.02rem solid rgb(245, 245, 245);
  1687. }
  1688. .synerBox {
  1689. height: 3rem;
  1690. overflow: scroll;
  1691. }
  1692. i.iconfont.blue {
  1693. color: #005395;
  1694. // &::after {
  1695. // content: "";
  1696. // width: 0.01rem;
  1697. // height: 0.4rem;
  1698. // background: #005395;
  1699. // position: relative;
  1700. // display: block;
  1701. // left: 0.14rem;
  1702. // }
  1703. }
  1704. .againAssign {
  1705. .header {
  1706. width: 100%;
  1707. height: 0.88rem;
  1708. line-height: 0.88rem;
  1709. text-align: center;
  1710. color: #fff;
  1711. font-size: 0.37rem;
  1712. background: linear-gradient(#2e2f32, #414246);
  1713. position: fixed;
  1714. top: 0;
  1715. z-index: 6;
  1716. }
  1717. .navBar {
  1718. width: 100%;
  1719. height: 0.96rem;
  1720. line-height: 0.96rem;
  1721. background-color: #fafafa;
  1722. font-size: 0.28rem;
  1723. position: fixed;
  1724. top: 0.88rem;
  1725. z-index: 9;
  1726. div {
  1727. width: 33.33%;
  1728. text-align: center;
  1729. &.p50 {
  1730. width: 49.99%;
  1731. }
  1732. a {
  1733. display: inline-block;
  1734. height: 0.9rem;
  1735. width: 1.7rem;
  1736. padding: 0 0.1rem;
  1737. &.active {
  1738. color: #005395;
  1739. border-bottom: 0.06rem solid #005395;
  1740. }
  1741. }
  1742. }
  1743. }
  1744. .headtop {
  1745. margin-top: 1.84rem;
  1746. }
  1747. .label {
  1748. background-color: #eeeeee;
  1749. height: 0.6rem;
  1750. line-height: 0.58rem;
  1751. padding-left: 0.2rem;
  1752. font-size: 0.24rem;
  1753. color: #666666;
  1754. span {
  1755. font-size: 0.2rem;
  1756. display: inline-block;
  1757. margin-left: 0.08rem;
  1758. color: #999999;
  1759. }
  1760. &.formLabel {
  1761. background-color: #fff;
  1762. }
  1763. }
  1764. .conentBox {
  1765. width: 100%;
  1766. .conent {
  1767. font-size: 0.32rem;
  1768. font-weight: 400;
  1769. line-height: 0.45rem;
  1770. // border-bottom: 0.16rem solid #e5e5e5;
  1771. .shows {
  1772. display: none;
  1773. }
  1774. .boeder_B {
  1775. border-bottom: 0.01rem solid #ccc;
  1776. }
  1777. p {
  1778. &.desc {
  1779. overflow: hidden;
  1780. }
  1781. .grayFont {
  1782. width: 75%;
  1783. text-align: right;
  1784. overflow-x: scroll;
  1785. }
  1786. }
  1787. .bottom {
  1788. overflow: hidden;
  1789. line-height: 0.86rem;
  1790. border-bottom: 0.01rem solid #e6e6e6;
  1791. font-size: 0.24rem;
  1792. color: #999;
  1793. padding: 0 0.24rem 0 0.48rem;
  1794. }
  1795. .info {
  1796. color: #999;
  1797. font-size: 0.28rem;
  1798. overflow: hidden;
  1799. .head {
  1800. border-bottom: 0.01rem solid #e6e6e6;
  1801. p {
  1802. padding: 0.24rem 0.3rem;
  1803. i {
  1804. color: #00559d;
  1805. }
  1806. }
  1807. }
  1808. p {
  1809. line-height: 0.4rem;
  1810. padding: 0.1rem 0.24rem;
  1811. overflow: hidden;
  1812. .overflowEllipsis2 {
  1813. margin-left: 1.96rem;
  1814. }
  1815. }
  1816. .info_hide {
  1817. padding: 0.2rem 0.24rem;
  1818. border-bottom: 0.01rem solid #e6e6e6;
  1819. .hide {
  1820. color: #00559d;
  1821. }
  1822. }
  1823. .imgs-container {
  1824. a {
  1825. color: #03c !important;
  1826. &:visited {
  1827. color: #551a8b !important;
  1828. }
  1829. }
  1830. img {
  1831. width: 1.5rem;
  1832. height: 1.5rem;
  1833. margin-right: 0.7rem;
  1834. &:nth-child(1) {
  1835. margin-left: 0.75rem;
  1836. }
  1837. }
  1838. }
  1839. .progress {
  1840. padding: 0.2rem 0.2rem;
  1841. overflow: hidden;
  1842. transition-duration: 0.2s;
  1843. transition-timing-function: linear;
  1844. &.progressHide {
  1845. height: 1.7rem;
  1846. }
  1847. .progress_info {
  1848. overflow: hidden;
  1849. margin-bottom: 0.1rem;
  1850. &:nth-last-child(1) {
  1851. .cont {
  1852. border: none !important;
  1853. }
  1854. }
  1855. .progress_info_L {
  1856. float: left;
  1857. color: #333;
  1858. max-width: 18%;
  1859. }
  1860. .progress_info_R {
  1861. float: right;
  1862. margin-left: 0.09rem;
  1863. width: 80%;
  1864. font-size: 0.25rem;
  1865. .time {
  1866. i {
  1867. margin-left: -0.15rem;
  1868. &.dsit-icon_weizuo {
  1869. color: #005495;
  1870. }
  1871. &.dsit-icon_zhengzaijinx {
  1872. color: #48a843;
  1873. font-size: 0.37rem;
  1874. }
  1875. }
  1876. span {
  1877. margin-left: 0.15rem;
  1878. }
  1879. }
  1880. .cont {
  1881. border-left: 1px solid #999;
  1882. padding-left: 0.4rem;
  1883. min-height: 0.4rem;
  1884. &.blue {
  1885. border-left: 1px solid #005395;
  1886. }
  1887. }
  1888. .text1 {
  1889. font-size: 0.15rem;
  1890. }
  1891. .text2 {
  1892. color: #666;
  1893. word-break: break-all;
  1894. }
  1895. p {
  1896. padding: 0;
  1897. }
  1898. }
  1899. }
  1900. }
  1901. }
  1902. .txtLabel {
  1903. width: 100%;
  1904. overflow: hidden;
  1905. padding: 0.32rem 0.24rem 0.32rem 0.32rem;
  1906. .txt {
  1907. width: 30%;
  1908. color: #666;
  1909. }
  1910. .cube-textarea-wrapper {
  1911. width: 62%;
  1912. }
  1913. }
  1914. .sub {
  1915. background: #ececec;
  1916. .cube-btn {
  1917. background-color: #005395 !important;
  1918. width: 90%;
  1919. margin: 0.2rem auto;
  1920. border-radius: 8px;
  1921. }
  1922. }
  1923. }
  1924. }
  1925. .showwrap {
  1926. width: 75%;
  1927. text-align: right;
  1928. }
  1929. }
  1930. </style>