processing.vue 55 KB

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