processing.vue 59 KB

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