processing.vue 63 KB

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