processing.vue 62 KB

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