newIncident.vue 65 KB

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