handle_merge.vue 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838
  1. <template>
  2. <div id="handle_merge">
  3. <el-form
  4. ref="disposeForm"
  5. :model="disposeForm"
  6. label-position="right"
  7. label-width="100px"
  8. :rules="!disabled ? rules : {}"
  9. size="mini"
  10. >
  11. <el-collapse v-model="activeName" :class="!isLcjd ? 'NBjd' : ''">
  12. <el-collapse-item title="认证处置" name="2" class="wrap">
  13. <div v-if="bhjl[0]">
  14. <div v-for="item in bhjl" :key="item.id">
  15. <div class="Bhclass">
  16. <div style="width:75%">
  17. <el-row>
  18. <el-col>
  19. <el-form-item label="驳回说明:">
  20. <el-input v-model="item.clyj" disabled />
  21. </el-form-item>
  22. </el-col>
  23. </el-row>
  24. <el-row>
  25. <el-col :span="8">
  26. <el-form-item label="驳回人员:">
  27. <el-input v-model="item.clry" disabled />
  28. </el-form-item>
  29. </el-col>
  30. <el-col :span="8">
  31. <el-form-item label="驳回时间:">
  32. <el-input v-model="item.createTime" disabled />
  33. </el-form-item>
  34. </el-col>
  35. <el-col :span="8">
  36. <el-form-item label="驳回到:">
  37. <el-input v-model="item.bbhLcjd" disabled />
  38. </el-form-item>
  39. </el-col>
  40. </el-row>
  41. </div>
  42. <div style="width:25%;" class="Bhclass">
  43. <img src="@/assets/images/Bh.png" alt="" style="width:30%">
  44. </div>
  45. <!-- </el-row> -->
  46. </div>
  47. <hr>
  48. </div>
  49. </div>
  50. <div v-if="zpjl[0]">
  51. <div v-for="item in zpjl" :key="item.id">
  52. <div class="Bhclass">
  53. <!-- <el-row> -->
  54. <div style="width:75%">
  55. <el-row>
  56. <el-col>
  57. <el-form-item label="转派说明:">
  58. <el-input v-model="item.zpyj" disabled type="textarea" />
  59. </el-form-item>
  60. </el-col>
  61. </el-row>
  62. <el-row>
  63. <el-col :span="8">
  64. <el-form-item label="转派人员:">
  65. <el-input v-model="item.zpry" disabled />
  66. </el-form-item>
  67. </el-col>
  68. <el-col :span="8">
  69. <el-form-item label="转派时间:">
  70. <el-input v-model="item.createTime" disabled />
  71. </el-form-item>
  72. </el-col>
  73. </el-row>
  74. </div>
  75. <div style="width:25%;" class="Bhclass">
  76. <img src="@/assets/images/Zp.png" alt="" style="width:30%">
  77. </div>
  78. <!-- </el-row> -->
  79. </div>
  80. <hr>
  81. </div>
  82. </div>
  83. <el-row>
  84. <el-col :span="24">
  85. <el-row>
  86. <el-col v-if="disposeForm.lczt !== 53 && disposeForm.lczt !== 70 && data.isLeak == 1" :span="12">
  87. <el-form-item label="漏点状态:" prop="isRealLeak">
  88. <el-input v-if="disabled" v-model="disposeForm.isRealLeakName" :disabled="disabled" size="small" />
  89. <el-select v-else v-model="disposeForm.isRealLeak" size="small" clearable>
  90. <el-option key="1" label="真实漏点" value="1" />
  91. <el-option key="2" label="非漏点" value="2" />
  92. </el-select>
  93. </el-form-item>
  94. </el-col>
  95. <el-col v-if="disposeForm.lczt !== 53 && disposeForm.lczt !== 70 && data.isLeak == 1" :span="12">
  96. <el-form-item label="预估漏损水量:" prop="predictLeakWater">
  97. <el-input
  98. v-if="disabled"
  99. v-model="disposeForm.predictLeakWater"
  100. :disabled="disabled"
  101. type="number"
  102. size="small"
  103. />
  104. <el-input v-else v-model="disposeForm.predictLeakWater" type="number" size="small" />
  105. </el-form-item>
  106. </el-col>
  107. <el-col v-if="disposeForm.lczt !== 53 && disposeForm.lczt !== 70" :span="24">
  108. <el-form-item label="认证说明:" prop="rzyj">
  109. <el-input
  110. v-model="disposeForm.rzyj"
  111. :placeholder="disabled ? '未输入认证说明' : '请输入认证说明'"
  112. :disabled="disabled"
  113. type="textarea"
  114. size="small"
  115. :rows="disabled ? 1 : 3"
  116. />
  117. </el-form-item>
  118. </el-col>
  119. <el-col v-if="disposeForm.lczt === 53" :span="24">
  120. <el-form-item label="驳回原因:" prop="bhyy">
  121. <el-input
  122. v-model="disposeForm.bhyy"
  123. :placeholder="disabled ? '未输入驳回原因' : '请输入驳回原因'"
  124. :disabled="disabled"
  125. type="textarea"
  126. :rows="disabled ? 1 : 3"
  127. />
  128. </el-form-item>
  129. </el-col>
  130. <el-col v-if="disposeForm.lczt === 70" :span="24">
  131. <el-form-item label="转派原因:" prop="zpyj">
  132. <el-input
  133. v-model="disposeForm.zpyj"
  134. :placeholder="disabled ? '未输入转派原因' : '请输入转派原因'"
  135. :disabled="disabled"
  136. type="textarea"
  137. :rows="disabled ? 1 : 3"
  138. />
  139. </el-form-item>
  140. </el-col>
  141. </el-row>
  142. <el-row>
  143. <el-col v-if="!lcjdParams.stopFlag && isJgcz && disposeForm.rzslry.length > 1 && !disabled" :span="6">
  144. <el-form-item label="汇集人员:" prop="slry">
  145. <el-select v-model="clhjr" placeholder="请选择处理汇集人" filterable :disabled="disabled">
  146. <el-option
  147. v-for="item in clhjrList"
  148. :key="item.id"
  149. :label="item.personName"
  150. :value="item.personId"
  151. />
  152. </el-select>
  153. </el-form-item>
  154. </el-col>
  155. </el-row>
  156. </el-col>
  157. </el-row>
  158. <el-row>
  159. <el-col v-if="disposeForm.lczt === 51 || disposeForm.lczt === 52 || disposeForm.lczt === 54" :span="24">
  160. <el-row>
  161. <el-col v-if="download" :span="24">
  162. <el-form-item label="附件上传:">
  163. <el-upload
  164. class="upload-demo"
  165. action="https://jsonplaceholder.typicode.com/posts/"
  166. :on-preview="handlePreview"
  167. :on-remove="handleRemove"
  168. :before-remove="beforeRemove"
  169. :on-change="beforeAvatarUpload"
  170. :on-success="handleAvatarSuccess"
  171. accept=".docx,.doc,.xls,.xlsx.JPG,JPEG,PNG,GIF,.jpg,.jpeg,.png,.gif,.JPG,.JPEG,.PBG,.GIF,.amr"
  172. :file-list="fileList"
  173. :auto-upload="false"
  174. multiple
  175. :limit="3"
  176. :on-exceed="handleExceed"
  177. style="width: 90%;"
  178. size="small"
  179. >
  180. <el-button size="small" type="primary" style="margin-top: 3px; left:0px; float:left; ">点击上传
  181. </el-button>
  182. <div slot="tip" class="el-upload__tip">⚠️注意:最多上传3个文件,且大小不能超过10MB!</div>
  183. </el-upload>
  184. </el-form-item>
  185. </el-col>
  186. <el-col v-if="!download" :span="24">
  187. <el-form-item label="附件下载:">
  188. <div v-if="ImgUrlList[0] || fileListF[0]" style="display: flex;">
  189. <el-row type="flex" style="padding-right:10px; " :gutter="20">
  190. <el-image
  191. v-for="item in ImgUrlList"
  192. :key="item"
  193. :lazy="true"
  194. style="padding-left:10px;margin-right:5px; width: 100px ;"
  195. :src="item"
  196. :preview-src-list="ImgUrlList"
  197. />
  198. </el-row>
  199. <el-row type="flex" style="padding-left:30px; margin: 0;margin-left:5px">
  200. <el-upload
  201. ref="upload"
  202. disabled
  203. class="upload-demo"
  204. :limit="3"
  205. action="https://jsonplaceholder.typicode.com/posts/"
  206. :file-list="fileListF"
  207. :on-preview="handleClick"
  208. />
  209. </el-row>
  210. </div>
  211. <div v-else>
  212. <div class="colflexS">
  213. <img src="@/assets/icon/null.png" alt="" style="height:30px">
  214. <div>无上传文件</div>
  215. </div>
  216. </div>
  217. </el-form-item>
  218. </el-col>
  219. </el-row>
  220. </el-col>
  221. </el-row>
  222. <el-row type="flex">
  223. <el-col v-if="!disabled" :span="6">
  224. <el-form-item label="流程状态:" prop="lczt">
  225. <el-select v-model="disposeForm.lczt" :disabled="disabled" placeholder="请选择流程状态" @change="gddjZtChange">
  226. <el-option
  227. v-for="item in flows"
  228. :key="item.id"
  229. :disabled="disabled"
  230. :label="item.cname"
  231. :value="item.id"
  232. />
  233. </el-select>
  234. </el-form-item>
  235. </el-col>
  236. <el-col v-if="!lcjdParams.stopFlag && !disabled" :span="6">
  237. <el-form-item label="受理时限:">
  238. <el-date-picker
  239. v-model="disposeForm.shsx"
  240. disabled
  241. placeholder="自动生成配置时限"
  242. type="datetime"
  243. style="width: 100%"
  244. :picker-options="pickerOptions"
  245. value-format="yyyy-MM-dd HH:mm:ss"
  246. />
  247. </el-form-item>
  248. </el-col>
  249. <el-col v-if="!lcjdParams.stopFlag && !disabled" :span="6">
  250. <el-form-item :label="Name + '部门:'" prop="rzbm">
  251. <el-select
  252. v-model="disposeForm.rzbm"
  253. placeholder="请选择部门"
  254. :disabled="disabled"
  255. :collapse-tags="isDisable"
  256. :multiple="isJgcz"
  257. @change="Bmchange"
  258. >
  259. <el-option
  260. v-for="item in acceptanceDepartments"
  261. :key="item.departId"
  262. :label="item.departName"
  263. :value="item.departId"
  264. />
  265. </el-select>
  266. </el-form-item>
  267. </el-col>
  268. <el-col v-if="!lcjdParams.stopFlag && !disabled" :span="6">
  269. <el-form-item :label="Name + '人员:'" prop="rzslry">
  270. <el-select
  271. v-model="disposeForm.rzslry"
  272. placeholder="请选择人员"
  273. filterable
  274. :multiple="isJgcz"
  275. :collapse-tags="isDisable"
  276. :disabled="disabled"
  277. @change="slryChange"
  278. >
  279. <el-option v-for="item in receiver" :key="item.id" :label="item.personName" :value="item.personId" />
  280. </el-select>
  281. </el-form-item>
  282. </el-col>
  283. <el-col v-if="disposeForm.lczt === 70" :span="6">
  284. <el-form-item label="转派部门:" prop="slbm">
  285. <el-select
  286. v-model="disposeForm.slbm"
  287. placeholder="请选择转派部门"
  288. filterable
  289. :disabled="disabled"
  290. @change="Bmchange_zp"
  291. >
  292. <el-option
  293. v-for="item in acceptanceDepartments_zp"
  294. :key="item.departId"
  295. :label="item.departName"
  296. :value="item.departId"
  297. />
  298. </el-select>
  299. </el-form-item>
  300. </el-col>
  301. <el-col v-if="disposeForm.lczt === 70" :span="6">
  302. <el-form-item label="转派人员:" prop="slry">
  303. <el-select v-model="disposeForm.slry" placeholder="请选择转派人员" filterable :disabled="disabled">
  304. <el-option
  305. v-for="item in receiver_zp"
  306. :key="item.id"
  307. :label="item.personName"
  308. :value="item.personId"
  309. />
  310. </el-select>
  311. </el-form-item>
  312. </el-col>
  313. </el-row>
  314. <el-row v-if="disabled" type="flex">
  315. <el-col :span="8">
  316. <el-form-item label="认证部门:">
  317. <el-input v-model="disposeForm.rzbmName" disabled placeholder="未选择认证部门" />
  318. </el-form-item>
  319. </el-col>
  320. <el-col :span="8">
  321. <el-form-item label="认证人员:">
  322. <el-input v-model="disposeForm.rzryName" disabled placeholder="未选择认证人员" />
  323. </el-form-item>
  324. </el-col>
  325. <el-col :span="8">
  326. <el-form-item label="认证时间:">
  327. <!-- <el-input v-model="disposeForm.rzsj" type="text" disabled placeholder="未选择认证时间" /> -->
  328. <el-input v-model="disposeForm.rzsj" placeholder="未选择认证时间" style="width: 100%" disabled />
  329. </el-form-item>
  330. </el-col>
  331. </el-row>
  332. <!-- <el-row v-if="disabled" type="flex">
  333. <el-col :span="8">
  334. <el-form-item label="审核部门:">
  335. <el-input v-model="data.jgAuditList[0].deptName" disabled placeholder="未选择审核部门" />
  336. </el-form-item>
  337. </el-col>
  338. <el-col :span="8">
  339. <el-form-item label="审核人员:">
  340. <el-input v-model="data.jgAuditList[0].auditUserName" disabled placeholder="未选择审核人员" />
  341. </el-form-item>
  342. </el-col>
  343. </el-row> -->
  344. </el-collapse-item>
  345. </el-collapse>
  346. <QwxFlow
  347. v-if="lcjdParams.zrjrFlag"
  348. :prop-workflow-qwx="workflowQwx"
  349. :acceptance-departments="acceptanceDepartments"
  350. :receivers="receivers"
  351. :is-lcjd="isLcjd"
  352. @propSetQwxData="propSetQwxData"
  353. />
  354. </el-form>
  355. </div>
  356. </template>
  357. <script>
  358. import QwxFlow from '../../components/qwxFlow'
  359. import { parseTime } from '@/utils/index'
  360. import { IP } from '@/utils/request'
  361. import { editHandle, getPersonnel, getSelectBygdlx, getUserByDepts, getById, getRejectList, getRedeploy } from '@/api/work'
  362. import { imageByName } from '@/api/ftp'
  363. import { client, _throttle } from '@/utils/index'
  364. export default {
  365. components: { QwxFlow },
  366. props: {
  367. disabled: {
  368. type: Boolean,
  369. default: false
  370. },
  371. data: {
  372. type: Object,
  373. required: true
  374. },
  375. // 部门
  376. acceptanceDepartment: {
  377. type: Array,
  378. required: true
  379. },
  380. download: {
  381. type: Boolean,
  382. default: false
  383. },
  384. activeNames: {
  385. type: String,
  386. default: '2'
  387. }
  388. },
  389. data() {
  390. return {
  391. activeName: this.activeNames,
  392. isJgcz: false,
  393. isJgsh: false,
  394. JgshData: {},
  395. BmSplist1Sure: false,
  396. BmSplist2Sure: false,
  397. BmSplist3Sure: false,
  398. BmSplist4Sure: false,
  399. isLcjd: true,
  400. jgshCcjb: '',
  401. BmSplist1: [],
  402. RySplist1: [],
  403. BmSplist2: [],
  404. RySplist2: [],
  405. BmSplist3: [],
  406. RySplist3: [],
  407. BmSplist4: [],
  408. RySplist4: [],
  409. dialogFormVisible: false,
  410. fileListImg: [],
  411. ImgUrlList: [],
  412. srcListsrc: [],
  413. fileListF: [],
  414. rules: {
  415. rzbm: [{ required: true, message: ' ', trigger: 'change' }],
  416. slry: [{ required: true, message: ' ', trigger: 'change' }],
  417. slbm: [{ required: true, message: ' ', trigger: 'change' }],
  418. rzslry: [{ required: true, message: ' ', trigger: 'change' }],
  419. lczt: [{ required: true, message: ' ', trigger: 'change' }],
  420. bhyy: [{ required: true, message: ' ', trigger: 'blur' }],
  421. rzyj: [{ required: true, message: ' ', trigger: 'blur' }],
  422. zpyj: [{ required: true, message: ' ', trigger: 'blur' }],
  423. // predictLeakWater: [{ required: true, message: ' ', trigger: 'blur' }],
  424. // 抢维修
  425. orderSource: [
  426. { required: true, message: ' ', trigger: 'change' }
  427. ],
  428. typeId: [
  429. { required: true, message: ' ', trigger: 'change' }
  430. ],
  431. respUser: [
  432. { required: true, message: ' ', trigger: 'change' }
  433. ],
  434. qwxTime: [
  435. { required: true, message: ' ', trigger: 'change' }
  436. ]
  437. },
  438. rulesR: {
  439. czbm: [{ required: true, message: ' ', trigger: 'change' }],
  440. czbm2: [{ required: true, message: ' ', trigger: 'change' }],
  441. czbm3: [{ required: true, message: ' ', trigger: 'change' }],
  442. czbm4: [{ required: true, message: ' ', trigger: 'change' }],
  443. jgczry: [{ required: true, message: ' ', trigger: 'change' }],
  444. jgczry2: [{ required: true, message: ' ', trigger: 'change' }],
  445. jgczry3: [{ required: true, message: ' ', trigger: 'change' }],
  446. jgczry4: [{ required: true, message: ' ', trigger: 'change' }]
  447. },
  448. pickerOptions: {
  449. disabledDate(time) {
  450. const dateTime = new Date()
  451. const startDateTime = dateTime.setDate(dateTime.getDate() - 1)
  452. const endDateTime = dateTime.setDate(dateTime.getDate() + 7)
  453. return (
  454. time.getTime() < new Date(startDateTime).getTime() ||
  455. time.getTime() > new Date(endDateTime).getTime()
  456. )
  457. },
  458. selectableRange: parseTime(new Date(), '{hh}:{ii}:{ss}') + '- 23:59:00'
  459. },
  460. auditForm: {
  461. czbm: '',
  462. czbm2: '',
  463. czbm3: '',
  464. czbm4: '',
  465. jgczry: '',
  466. jgczry2: '',
  467. jgczry3: '',
  468. jgczry4: ''
  469. },
  470. disposeForm: {
  471. rzsj: '',
  472. gdlx: '',
  473. rzyj: '',
  474. rzbm: '',
  475. slry: '',
  476. lczt: '',
  477. shsx: '',
  478. bhyy: '',
  479. lcid: '',
  480. rzbmName: '',
  481. rzryName: '',
  482. rzslry: '',
  483. rzslryOld: '', // 初始的受理人员
  484. slbm: '', // 部门
  485. // 抢维修
  486. qwxTime: undefined, // 抢维修时间
  487. startTime: '', // 开始时间
  488. endTime: '', // 结束时间
  489. orderSource: '', // 工单来源 字典编码表,0计划、1自建、2热线
  490. typeId: '', // 维修类型,关联表TF_YWPN_REPAIRTYPE_D的关键值,查询维修类型
  491. respUser: '', // 维修人ID,主要负责人,查询维修人员接口
  492. // isLeak: '',
  493. /**
  494. * @isRealLeak 是否为真实漏点
  495. */
  496. isRealLeak: '', // 是否为真实漏点
  497. /**
  498. * @predictLeakWater 预估漏损水量
  499. */
  500. predictLeakWater: undefined // 预估漏损水量
  501. },
  502. acceptanceDepartments: [],
  503. acceptanceDepartments_zp: [], // 转派部门列表
  504. allLcjd: '',
  505. menuId: '',
  506. tableData: [],
  507. isDisable: true,
  508. files: [],
  509. indexNum: 0,
  510. // 人员
  511. receiver: [],
  512. receiver_zp: [], // 转派时的人员
  513. receivers_zp: [], // 转派时保存的所有人员
  514. receivers: [],
  515. flows: [
  516. {
  517. cname: '本环节',
  518. id: 51
  519. },
  520. {
  521. cname: '下一环节',
  522. id: 52
  523. },
  524. {
  525. cname: '驳回',
  526. id: 53
  527. },
  528. {
  529. cname: '转派',
  530. id: 70
  531. }
  532. ],
  533. editData: {},
  534. dialogVisible: false,
  535. rejectedList: [],
  536. sendRecordList: [],
  537. Name: '审核',
  538. bhjl: [],
  539. zpjl: [],
  540. difference: false,
  541. fileList: [],
  542. clhjr: '',
  543. clhjrList: [],
  544. lcjdParams: {
  545. stopFlag: false, // 是否为最后一个节点
  546. zrjrFlag: false, // 转出外部流程(抢维修)
  547. lastLcjd: '', // 最后一个流程节点
  548. transferOutType: '', // 抢维修类型
  549. currentFlow: '2' // 当前步骤:2
  550. },
  551. workflowQwx: {
  552. // 抢维修
  553. slbm: '', // 部门编码
  554. slbmName: '', // 部门名称
  555. qwxTime: undefined, // 抢维修时间
  556. startTime: '', // 开始时间
  557. endTime: '', // 结束时间
  558. orderSource: '1', // 工单来源 字典编码表,0计划、1自建、2热线
  559. typeId: '', // 维修类型,关联表TF_YWPN_REPAIRTYPE_D的关键值,查询维修类型
  560. respUser: '', // 维修人ID,主要负责人,查询维修人员接口
  561. phone: '' // 受理人电话
  562. }
  563. }
  564. },
  565. computed: {
  566. // getFlows() {
  567. // return this.disposeForm.lczt
  568. // }
  569. },
  570. watch: {
  571. // getFlows(val) {
  572. // if (val === 70) {
  573. // this.disposeForm.slry = ''
  574. // getPersonnel({ ids: 2002, departmentId: this.data.slbm }).then(res => {
  575. // this.receiver = res.result.filter(v => {
  576. // return v.id !== this.data.slry
  577. // })
  578. // })
  579. // } else {
  580. // // this.getReceiver()
  581. // }
  582. // }
  583. },
  584. created() {
  585. const that = this
  586. const data = JSON.parse(JSON.stringify(this.data))
  587. this.difference = JSON.stringify(this.data) !== '{}'
  588. if (this.difference) {
  589. if (this.data.lcjdName !== '认证处置' || this.disabled) {
  590. this.isLcjd = false
  591. }
  592. }
  593. const datas = {
  594. gdbh: this.data.gdbh
  595. }
  596. getRejectList(datas).then((res) => {
  597. const list = res.result.records
  598. if (list.length !== 0) {
  599. this.rejectedList = list.map((val, index) => {
  600. return { ...val, index: index + 1 }
  601. })
  602. }
  603. this.bhjl = []
  604. for (const i in this.rejectedList) {
  605. if (this.rejectedList[i].lcjd == '认证处置') {
  606. this.bhjl.push(this.rejectedList[i])
  607. }
  608. }
  609. })
  610. getRedeploy(datas).then(res => {
  611. const list = res.result.records
  612. if (list.length !== 0) {
  613. this.sendRecordList = list.map((val, index) => {
  614. return { ...val, index: index + 1 }
  615. })
  616. }
  617. this.zpjl = []
  618. for (const i in this.sendRecordList) {
  619. if (this.sendRecordList[i].lcjd == '认证处置') {
  620. this.zpjl.push(this.sendRecordList[i])
  621. }
  622. }
  623. })
  624. console.log(this.zpjl, '认证处置')
  625. console.log(data)
  626. Object.keys(this.disposeForm).forEach(key => {
  627. if (key == 'shsx') {
  628. // 受理时限 => 受节点影响自动判断
  629. const allLcjdAry = this.data['allLcjd'].split(',')
  630. if (allLcjdAry.indexOf('3') > 0) {
  631. this.disposeForm[key] = this.data['shsx']
  632. } else if (allLcjdAry.indexOf('4') > 0) {
  633. this.disposeForm[key] = this.data['zjsx']
  634. } else if (allLcjdAry.indexOf('5') > 0) {
  635. this.disposeForm[key] = this.data['czsx']
  636. }
  637. } else if (key == 'predictLeakWater' || key == 'isRealLeak' || key == 'isRealLeakName') {
  638. // 漏点处理
  639. if (key == 'predictLeakWater') {
  640. this.disposeForm[key] = data.leakInfo?.estimatedWaterLoss
  641. }
  642. if (key == 'isRealLeak') {
  643. this.disposeForm[key] = data.leakInfo?.isReal
  644. this.disposeForm['isRealLeakName'] = data.leakInfo?.isReal == '1' ? '真实漏点' : '非漏点'
  645. }
  646. } else {
  647. this.disposeForm[key] = data[key]
  648. }
  649. })
  650. if (!this.disposeForm.lczt) {
  651. this.disposeForm.lczt = 52
  652. }
  653. const _allLcjd = this.data.allLcjd
  654. this.allLcjd = _allLcjd.split(',')
  655. this.getallLcjd()
  656. getById({ id: data.lcid, node: 6 }).then(res => {
  657. console.log('123123123213213', this.allLcjd)
  658. const result = res.result
  659. // let node = ''
  660. if (this.disabled) {
  661. this.srcListsrc = []
  662. const arr = ['.png', '.jpg', '.jpeg', '.gif', '.webp', '.svg', '.tiff']
  663. var token = that.$store.state.user.token
  664. if (!this.arrayIsNull(this.data.gddjFiles)) {
  665. console.log('文件:', JSON.stringify(this.data.gddjFiles))
  666. for (const i in this.data.gddjFiles) {
  667. var fileModel = this.data.gddjFiles[i]
  668. const esuffixt = fileModel.fileFormat
  669. const es = fileModel.filePath
  670. // if(esuffixt == '.amr'){
  671. // const audioPath = `${IP}/base/file/loadAudio?remotePath=${es}&access_token=${token}`
  672. // this.audioFileList.push(audioPath)
  673. // }else
  674. // esuffixt === '.jpeg' || esuffixt === '.png' || esuffixt === '.jpg'
  675. if (arr.includes(esuffixt)) {
  676. const imagePath = `${IP}/base/file/loadImg?remotePath=${es}&access_token=${token}`
  677. this.ImgUrlList.push(imagePath)
  678. } else {
  679. this.fileListF.push({
  680. url: es,
  681. name: fileModel.fileName,
  682. urlName: fileModel.filePath,
  683. id: fileModel.id,
  684. fileFormat: fileModel.fileFormat
  685. })
  686. }
  687. }
  688. }
  689. }
  690. const deWeightThree1 = () => {
  691. const map = new Map()
  692. for (const item of result.gdpersonList) {
  693. if (!map.has(item.departId)) {
  694. map.set(item.departId, item)
  695. }
  696. }
  697. return [...map.values()]
  698. }
  699. // if (result.gdpersonList.length > 0) { // 如果该工单细分下分配了处理人员,则部门下拉列表则使用处理人员的部门,如果没有分配处理人员,则使用该工单类型所属的部门
  700. // this.acceptanceDepartments = deWeightThree1()// deWeightThree1()// result.gddepartmentList
  701. // // this.acceptanceDepartments_zp = deWeightThree1()
  702. // } else {
  703. // this.acceptanceDepartments = result.gddepartmentList// deWeightThree1()// result.gddepartmentList
  704. // // this.acceptanceDepartments_zp = result.gddepartmentList
  705. // }
  706. // this.acceptanceDepartments = result.gddepartmentList
  707. // this.acceptanceDepartments_zp = result.gddepartmentList
  708. // this.Bmchange_zp()
  709. // for (const i in this.allLcjd) {
  710. // if (this.allLcjd[i] == 2) {
  711. // if (this.allLcjd[Number(i) + 1]) {
  712. // node = this.allLcjd[Number(i) + 1]
  713. // }
  714. // }
  715. // }
  716. this.acceptanceDepartments = result.gddepartmentList
  717. if (result.gdpersonList[0]) {
  718. var arr = []
  719. for (const i in result.gdpersonList) {
  720. if (Number(result.gdpersonList[i].node) == Number(this.allLcjd)) {
  721. arr.push(result.gdpersonList[i])
  722. }
  723. }
  724. this.receivers = arr
  725. }
  726. this.isDisable = true
  727. switch (this.allLcjd) {
  728. case '2':
  729. this.Name = '处置'
  730. break
  731. case '3':
  732. this.Name = '审核'
  733. break
  734. case '4':
  735. this.Name = '质检'
  736. break
  737. case '5':
  738. this.Name = '处置'
  739. break
  740. case '6':
  741. this.Name = '审核'
  742. break
  743. default:
  744. this.Name = '处置'
  745. }
  746. if (this.allLcjd == 5) {
  747. // 下一阶段为结果处置
  748. this.isJgcz = true
  749. const departArr = []
  750. for (const i in result.gdpersonList) {
  751. if (result.gdpersonList[i].node == 5) {
  752. departArr.push({
  753. departId: result.gdpersonList[i].departId,
  754. departName: result.gdpersonList[i].departName
  755. })
  756. }
  757. }
  758. const deWeightThree = () => {
  759. const map = new Map()
  760. for (const item of departArr) {
  761. if (!map.has(item.departId)) {
  762. map.set(item.departId, item)
  763. }
  764. }
  765. return [...map.values()]
  766. }
  767. const newDepartArr = deWeightThree()
  768. // 当结果处置配置了处理人员时
  769. if (newDepartArr[0]) {
  770. this.acceptanceDepartments = newDepartArr
  771. }
  772. // else {
  773. // this.acceptanceDepartments = this.acceptanceDepartment
  774. // for (const i in this.acceptanceDepartments) {
  775. // this.acceptanceDepartments[i].departId = this.acceptanceDepartments[i].id
  776. // this.acceptanceDepartments[i].departName = this.acceptanceDepartments[i].name
  777. // }
  778. // }
  779. console.log(newDepartArr, 'newDepartArr')
  780. if (!this.arrayIsNull(this.data.resultList)) {
  781. let departmentArr = []
  782. const UsermentArr = []
  783. for (const i in this.data.resultList) {
  784. departmentArr.push(this.data.resultList[i].departId)
  785. UsermentArr.push(this.data.resultList[i].personId)
  786. }
  787. const deWeightThree = () => {
  788. const map = new Map()
  789. for (const item of departmentArr) {
  790. if (!map.has(item.departId)) {
  791. map.set(item.departId, item)
  792. }
  793. }
  794. return [...map.values()]
  795. }
  796. departmentArr = deWeightThree()
  797. this.disposeForm.rzbm = departmentArr
  798. this.Bmchange()
  799. // this.Bmchange_zp()
  800. this.disposeForm.rzslry = UsermentArr
  801. this.slryChange()
  802. this.clhjr = this.data.slryName
  803. this.isDisable = false
  804. } else {
  805. this.disposeForm.rzbm = data.rzbm ? [data.rzbm] : []
  806. this.Bmchange()
  807. // this.Bmchange_zp()
  808. this.disposeForm.rzslry = data.rzslry ? [data.rzslry] : []
  809. this.slryChange()
  810. this.clhjr = data.rzslry
  811. }
  812. } else {
  813. this.isJgcz = false
  814. // if (this.disabled) {
  815. // this.disposeForm.rzbm = data.rzbmName
  816. // this.disposeForm.rzslry = data.rzslryName
  817. // this.clhjr = data.rzslryName
  818. // } else {
  819. this.disposeForm.rzbm = data.rzbm ? data.rzbm : ''
  820. this.Bmchange()
  821. // this.Bmchange_zp()
  822. this.disposeForm.rzslry = data.rzslry ? data.rzslry : ''
  823. // }
  824. }
  825. // 下一阶段为结果审核
  826. if (this.allLcjd == 6) {
  827. this.isJgsh = true
  828. const departArr = []
  829. for (const i in result.gdpersonList) {
  830. if (result.gdpersonList[i].childNode == 1 && result.gdpersonList[i].node == 6) {
  831. departArr.push({
  832. departId: result.gdpersonList[i].departId,
  833. departName: result.gdpersonList[i].departName
  834. })
  835. }
  836. }
  837. const deWeightThree = () => {
  838. const map = new Map()
  839. for (const item of departArr) {
  840. if (!map.has(item.departId)) {
  841. map.set(item.departId, item)
  842. }
  843. }
  844. return [...map.values()]
  845. }
  846. const newDepartArr = deWeightThree()
  847. // 当结果审核配置了处理人员时
  848. if (newDepartArr[0]) {
  849. this.acceptanceDepartments = newDepartArr
  850. }
  851. // else {
  852. // this.acceptanceDepartments = this.acceptanceDepartment
  853. // for (const i in this.acceptanceDepartments) {
  854. // this.acceptanceDepartments[i].departId = this.acceptanceDepartments[i].id
  855. // this.acceptanceDepartments[i].departName = this.acceptanceDepartments[i].name
  856. // }
  857. // }
  858. // 审批等级中人员部门名单
  859. this.BmSplist1 = []
  860. this.RySplist1 = []
  861. this.BmSplist2 = []
  862. this.RySplist2 = []
  863. this.BmSplist3 = []
  864. this.RySplist3 = []
  865. this.BmSplist4 = []
  866. this.RySplist4 = []
  867. for (const i in result.gdpersonList) {
  868. if (result.gdpersonList[i].childNode == 1 && result.gdpersonList[i].node == 6) {
  869. this.BmSplist1.push({
  870. id: result.gdpersonList[i].departId,
  871. name: result.gdpersonList[i].departName
  872. })
  873. const deWeightThree = () => {
  874. const map = new Map()
  875. for (const item of this.BmSplist1) {
  876. if (!map.has(item.id)) {
  877. map.set(item.id, item)
  878. }
  879. }
  880. return [...map.values()]
  881. }
  882. this.BmSplist1 = deWeightThree()
  883. this.RySplist1.push(result.gdpersonList[i])
  884. }
  885. }
  886. for (const i in result.gdpersonList) {
  887. if (result.gdpersonList[i].childNode == 2 && result.gdpersonList[i].node == 6) {
  888. this.BmSplist2.push({
  889. id: result.gdpersonList[i].departId,
  890. name: result.gdpersonList[i].departName
  891. })
  892. const deWeightThree = () => {
  893. const map = new Map()
  894. for (const item of this.BmSplist2) {
  895. if (!map.has(item.id)) {
  896. map.set(item.id, item)
  897. }
  898. }
  899. return [...map.values()]
  900. }
  901. this.BmSplist2 = deWeightThree()
  902. this.RySplist2.push(result.gdpersonList[i])
  903. }
  904. }
  905. for (const i in result.gdpersonList) {
  906. if (result.gdpersonList[i].childNode == 3 && result.gdpersonList[i].node == 6) {
  907. this.BmSplist3.push({
  908. id: result.gdpersonList[i].departId,
  909. name: result.gdpersonList[i].departName
  910. })
  911. const deWeightThree = () => {
  912. const map = new Map()
  913. for (const item of this.BmSplist3) {
  914. if (!map.has(item.id)) {
  915. map.set(item.id, item)
  916. }
  917. }
  918. return [...map.values()]
  919. }
  920. this.BmSplist3 = deWeightThree()
  921. this.RySplist3.push(result.gdpersonList[i])
  922. }
  923. }
  924. for (const i in result.gdpersonList) {
  925. if (result.gdpersonList[i].childNode == 4 && result.gdpersonList[i].node == 6) {
  926. this.BmSplist4.push({
  927. id: result.gdpersonList[i].departId,
  928. name: result.gdpersonList[i].departName
  929. })
  930. const deWeightThree = () => {
  931. const map = new Map()
  932. for (const item of this.BmSplist4) {
  933. if (!map.has(item.id)) {
  934. map.set(item.id, item)
  935. }
  936. }
  937. return [...map.values()]
  938. }
  939. this.BmSplist4 = deWeightThree()
  940. this.RySplist4.push(result.gdpersonList[i])
  941. }
  942. }
  943. if (!this.BmSplist1[0]) {
  944. this.BmSplist1 = this.acceptanceDepartments
  945. this.BmSplist1Sure = true
  946. }
  947. if (!this.BmSplist2[0]) {
  948. this.BmSplist2 = this.acceptanceDepartments
  949. this.BmSplist2Sure = true
  950. }
  951. if (!this.BmSplist3[0]) {
  952. this.BmSplist3 = this.acceptanceDepartments
  953. this.BmSplist3Sure = true
  954. }
  955. if (!this.BmSplist4[0]) {
  956. this.BmSplist4 = this.acceptanceDepartments
  957. this.BmSplist4Sure = true
  958. }
  959. // 审批链审批等级
  960. this.jgshCcjb = res.result.jgshCcjb
  961. } else {
  962. this.isJgsh = false
  963. }
  964. })
  965. getSelectBygdlx({ id: data.gdlx, xf1id: data.gdxf1, xf2id: data.gdxf2, node: 2 }).then(res => {
  966. const result = res.result
  967. const deWeightThree1 = () => {
  968. const map = new Map()
  969. for (const item of result.gdpersonList) {
  970. if (!map.has(item.departId)) {
  971. map.set(item.departId, item)
  972. }
  973. }
  974. return [...map.values()]
  975. }
  976. if (result.gdpersonList.length > 0) { // 如果该工单细分下分配了处理人员,则部门下拉列表则使用处理人员的部门,如果没有分配处理人员,则使用该工单类型所属的部门
  977. this.acceptanceDepartments_zp = deWeightThree1()// deWeightThree1()// result.gddepartmentList
  978. } else {
  979. this.acceptanceDepartments_zp = result.gddepartmentList// deWeightThree1()// result.gddepartmentList
  980. }
  981. if (result.gdpersonList[0]) {
  982. const UserData = []
  983. for (const i in result.gdpersonList) {
  984. if (result.gdpersonList[i].node == 2) { // node ==2为认证处置
  985. // result.gdpersonList.splice(i, 1)
  986. // delete result.gdpersonList[i]
  987. UserData.push(result.gdpersonList[i])
  988. // console.log(result.gdpersonList[i])
  989. }
  990. // var arr = [1, 2, 3, 5, 6, 7]
  991. // arr.splice(0, 3)
  992. // console.log(arr)
  993. // console.log(result.gdpersonList[i].node)
  994. }
  995. console.log(result.gdpersonList, 2, 'result.gdpersonListresult.gdpersonListresult.gdpersonListresult.gdpersonListresult.gdpersonList')
  996. this.receivers_zp = UserData.filter(v => {
  997. return v.personId !== this.data.slry
  998. })
  999. this.disposeForm.slry = ''
  1000. }
  1001. this.Bmchange_zp()
  1002. })
  1003. this.disposeForm.rzslryOld = data.rzslry || ''
  1004. // }
  1005. if (this.disposeForm.lczt !== 52) {
  1006. this.disposeForm.lczt = 51
  1007. }
  1008. // this.getReceiver()
  1009. if (data.files !== null) {
  1010. this.fileList = data.files.map((v) => {
  1011. return {
  1012. id: v.id,
  1013. name: v.fileName,
  1014. url: v.filePath,
  1015. createTime: v.createTime,
  1016. createUserName: v.createUserName
  1017. }
  1018. })
  1019. this.tableData = this.fileList
  1020. }
  1021. // 获取最后的流程编码
  1022. this.lcjdParams.lastLcjd = this.removeLcjd(_allLcjd)
  1023. this.lcjdParams.transferOutType = this.data.gdflowconfig.transferOutType
  1024. this.setFlows()
  1025. this.judgeZrjrFlag()
  1026. // 赋值抢维修
  1027. this.workflowQwx.slbm = data.slbm
  1028. this.workflowQwx.slbmName = data.slbmName
  1029. console.log(this.disposeForm.rzbm, 'wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww')
  1030. },
  1031. methods: {
  1032. getReceiver() {
  1033. switch (this.allLcjd) {
  1034. case '3':
  1035. this.menuId = 2003
  1036. break
  1037. case '4':
  1038. this.menuId = 2004
  1039. break
  1040. case '5':
  1041. this.menuId = 2005
  1042. break
  1043. case '6':
  1044. this.menuId = 4097
  1045. break
  1046. default:
  1047. break
  1048. }
  1049. if (!this.strIsNull(this.menuId)) {
  1050. if (this.disposeForm.rzbm) {
  1051. getPersonnel({ ids: this.menuId, departmentId: this.disposeForm.rzbm }).then(res => {
  1052. this.receiver = res.result
  1053. })
  1054. }
  1055. }
  1056. },
  1057. Bmchange() {
  1058. if (this.isJgcz) {
  1059. if (!this.arrayIsNull(this.receivers)) {
  1060. const arr = []
  1061. for (const i in this.receivers) {
  1062. for (const j in this.disposeForm.rzbm) {
  1063. if (this.receivers[i].departId === this.disposeForm.rzbm[j]) {
  1064. arr.push(this.receivers[i])
  1065. }
  1066. }
  1067. }
  1068. this.receiver = arr
  1069. } else {
  1070. const data = this.disposeForm.rzbm.join(',')
  1071. this.getUserByDept(data)
  1072. }
  1073. } else {
  1074. if (!this.arrayIsNull(this.receivers)) {
  1075. const arr = []
  1076. for (const i in this.receivers) {
  1077. if (this.receivers[i].departId === this.disposeForm.rzbm) {
  1078. arr.push(this.receivers[i])
  1079. }
  1080. }
  1081. this.receiver = arr
  1082. } else {
  1083. this.getUserByDept(this.disposeForm.rzbm)
  1084. }
  1085. }
  1086. },
  1087. Bmchange_zp() {
  1088. this.disposeForm.slry = ''
  1089. // const data = this.disposeForm.slbm
  1090. // this.getUserByDept_zp(data)
  1091. if (this.isJgcz) {
  1092. if (!this.arrayIsNull(this.receivers_zp)) {
  1093. const arr = []
  1094. for (const i in this.receivers_zp) {
  1095. for (const j in this.disposeForm.slbm) {
  1096. if (this.receivers_zp[i].departId === this.disposeForm.slbm[j]) {
  1097. arr.push(this.receivers_zp[i])
  1098. }
  1099. }
  1100. }
  1101. this.receiver_zp = arr.filter(item => {
  1102. return item.personId != this.data.slry
  1103. })
  1104. } else {
  1105. const data = this.acceptanceDepartments_zp.map(item => {
  1106. return item.departId
  1107. }).join()
  1108. this.getUserByDept_zp(data)
  1109. }
  1110. } else {
  1111. if (!this.arrayIsNull(this.receivers_zp)) {
  1112. const arr = []
  1113. for (const i in this.receivers_zp) {
  1114. if (this.receivers_zp[i].departId === this.disposeForm.slbm) {
  1115. arr.push(this.receivers_zp[i])
  1116. }
  1117. }
  1118. this.receiver_zp = arr.filter(item => {
  1119. return item.personId != this.data.slry
  1120. })
  1121. } else {
  1122. this.disposeForm.slbm = ''
  1123. const data = this.acceptanceDepartments_zp.map(item => {
  1124. return item.departId
  1125. }).join()
  1126. this.getUserByDept_zp(data)
  1127. }
  1128. }
  1129. },
  1130. BmSplist1Change() {
  1131. if (this.BmSplist1Sure) {
  1132. this.getUserByDeptSplist(this.auditForm.czbm, '1')
  1133. // this.RySplist1 = arr
  1134. } else {
  1135. return
  1136. }
  1137. },
  1138. BmSplist2Change() {
  1139. if (this.BmSplist2Sure) {
  1140. this.getUserByDeptSplist(this.auditForm.czbm2, '2')
  1141. // this.RySplist2 = arr
  1142. } else {
  1143. return
  1144. }
  1145. },
  1146. BmSplist3Change() {
  1147. if (this.BmSplist3Sure) {
  1148. this.getUserByDeptSplist(this.auditForm.czbm3, '3')
  1149. // this.RySplist3 = arr
  1150. } else {
  1151. return
  1152. }
  1153. },
  1154. BmSplist4Change() {
  1155. if (this.BmSplist4Sure) {
  1156. this.getUserByDeptSplist(this.auditForm.czbm4, '4')
  1157. // this.RySplist4 = arr
  1158. } else {
  1159. return
  1160. }
  1161. },
  1162. getUserByDeptSplist(data, name) {
  1163. const datas = {
  1164. depts: data
  1165. }
  1166. getUserByDepts(datas).then(res => {
  1167. var arr = []
  1168. for (const i in res.result) {
  1169. const name = res.result[i].name
  1170. for (const j in res.result[i].users) {
  1171. res.result[i].users[j].personId = res.result[i].users[j].id
  1172. res.result[i].users[j].personName = res.result[i].users[j].realName
  1173. res.result[i].users[j].departId = res.result[i].users[j].departmentId
  1174. res.result[i].users[j].departName = name
  1175. }
  1176. }
  1177. for (const i in res.result) {
  1178. for (const j in res.result[i].users) {
  1179. arr.push(res.result[i].users[j])
  1180. }
  1181. }
  1182. switch (name) {
  1183. case '1':
  1184. this.RySplist1 = arr
  1185. break
  1186. case '2':
  1187. this.RySplist2 = arr
  1188. break
  1189. case '3':
  1190. this.RySplist3 = arr
  1191. break
  1192. case '4':
  1193. this.RySplist4 = arr
  1194. break
  1195. }
  1196. console.log(this.RySplist1, this.RySplist2, this.RySplist3, this.RySplist4)
  1197. // return arr
  1198. })
  1199. },
  1200. getUserByDept(datas) {
  1201. const data = {
  1202. depts: datas
  1203. }
  1204. getUserByDepts(data).then(res => {
  1205. var arr = []
  1206. for (const i in res.result) {
  1207. var name = res.result[i].name
  1208. for (const j in res.result[i].users) {
  1209. res.result[i].users[j].personId = res.result[i].users[j].id
  1210. res.result[i].users[j].personName = res.result[i].users[j].realName
  1211. res.result[i].users[j].departId = res.result[i].users[j].departmentId
  1212. res.result[i].users[j].departName = name
  1213. }
  1214. }
  1215. for (const i in res.result) {
  1216. for (const j in res.result[i].users) {
  1217. arr.push(res.result[i].users[j])
  1218. }
  1219. }
  1220. this.receiver = arr
  1221. })
  1222. },
  1223. getUserByDept_zp(datas) {
  1224. const data = {
  1225. depts: datas
  1226. }
  1227. getUserByDepts(data).then(res => {
  1228. var arr = []
  1229. for (const i in res.result) {
  1230. var name = res.result[i].name
  1231. for (const j in res.result[i].users) {
  1232. res.result[i].users[j].personId = res.result[i].users[j].id
  1233. res.result[i].users[j].personName = res.result[i].users[j].realName
  1234. res.result[i].users[j].departId = res.result[i].users[j].departmentId
  1235. res.result[i].users[j].departName = name
  1236. }
  1237. }
  1238. for (const i in res.result) {
  1239. for (const j in res.result[i].users) {
  1240. arr.push(res.result[i].users[j])
  1241. }
  1242. }
  1243. this.receiver_zp = arr.filter(v => {
  1244. return v.personId !== this.data.slry
  1245. })
  1246. this.receivers_zp = arr
  1247. })
  1248. },
  1249. slryChange() {
  1250. if (this.isJgcz) {
  1251. var arr = []
  1252. console.log(this.disposeForm.rzslry, this.receiver, '12333333333333333333333')
  1253. for (const i in this.disposeForm.rzslry) {
  1254. for (const j in this.receiver) {
  1255. if (this.receiver[j].personId === this.disposeForm.rzslry[i]) {
  1256. arr.push(this.receiver[j])
  1257. }
  1258. }
  1259. }
  1260. this.clhjrList = arr
  1261. this.clhjr = this.disposeForm.rzslry[0]
  1262. }
  1263. },
  1264. getallLcjd() {
  1265. for (let index = 0; index < this.allLcjd.length; index++) {
  1266. if (this.allLcjd[index] > 2) {
  1267. this.allLcjd = this.allLcjd[index]
  1268. return
  1269. }
  1270. }
  1271. },
  1272. handleClick(row) {
  1273. window.open(
  1274. `${IP}/base/file/downloadFile?fileName=${row.name}&remotePath=${row.urlName}&access_token=${this.$store.state.user.token}`
  1275. )
  1276. },
  1277. JgshMothed(data) {
  1278. this.JgshData = data
  1279. this.dialogFormVisible = true
  1280. this.auditForm.czbm = this.disposeForm.rzbm
  1281. this.BmSplist1Change()
  1282. },
  1283. // 提交
  1284. submitForm: _throttle(function() {
  1285. this.$refs.disposeForm.validate((valid) => {
  1286. if (valid) {
  1287. const _this = this
  1288. const rzFileid = []
  1289. let data = {}
  1290. _this.fileList.forEach((v) => {
  1291. if (!_this.strIsNull(v.id)) {
  1292. rzFileid.push(v.id)
  1293. }
  1294. })
  1295. switch (_this.disposeForm.lczt) {
  1296. // 下个环节
  1297. case 52:
  1298. data = {
  1299. id: _this.data.id,
  1300. rzyj: _this.disposeForm.rzyj,
  1301. rzbm: _this.disposeForm.rzbm,
  1302. gdlx: _this.data.gdlx,
  1303. rzslry: _this.disposeForm.rzslry || '',
  1304. lczt: _this.disposeForm.lczt,
  1305. processDeposit: _this.data.processDeposit,
  1306. lcid: _this.disposeForm.lcid,
  1307. rzFileid: rzFileid.toString()
  1308. }
  1309. if (_this.lcjdParams.zrjrFlag) {
  1310. data.startTime = _this.workflowQwx.startTime
  1311. data.endTime = _this.workflowQwx.endTime
  1312. data.orderSource = _this.workflowQwx.orderSource
  1313. data.typeId = _this.workflowQwx.typeId
  1314. data.respUser = _this.workflowQwx.respUser
  1315. data.phone = _this.workflowQwx.phone
  1316. } else {
  1317. data.startTime = ''
  1318. data.endTime = ''
  1319. data.orderSource = ''
  1320. data.typeId = ''
  1321. data.respUser = ''
  1322. data.phone = ''
  1323. }
  1324. // eslint-disable-next-line no-case-declarations
  1325. const resultdispList = []
  1326. if (this.disposeForm.lczt === 52) {
  1327. if (this.isJgcz) {
  1328. if (!this.clhjr) {
  1329. this.$message.error('请选择处置汇集人')
  1330. return
  1331. }
  1332. for (const i in this.receiver) {
  1333. for (const j in this.disposeForm.rzslry) {
  1334. if (this.receiver[i].personId === this.disposeForm.rzslry[j]) {
  1335. resultdispList.push({
  1336. departId: this.receiver[i].departId,
  1337. departName: this.receiver[i].departName,
  1338. personId: this.receiver[i].personId,
  1339. personName: this.receiver[i].personName,
  1340. isCollect: 0
  1341. })
  1342. }
  1343. }
  1344. }
  1345. for (const i in resultdispList) {
  1346. if (resultdispList[i].personId === this.clhjr) {
  1347. resultdispList[i].isCollect = 1
  1348. _this.disposeForm.rzslry = resultdispList[i].personId
  1349. // 重置审核人员
  1350. _this.disposeForm.rzbm = resultdispList[i].departId
  1351. //
  1352. }
  1353. data['resultdispList[' + i + '].departId'] = resultdispList[i].departId
  1354. data['resultdispList[' + i + '].departName'] = resultdispList[i].departName
  1355. data['resultdispList[' + i + '].personId'] = resultdispList[i].personId
  1356. data['resultdispList[' + i + '].personName'] = resultdispList[i].personName
  1357. data['resultdispList[' + i + '].isCollect'] = resultdispList[i].isCollect
  1358. // data.resultdispList = resultdispList
  1359. }
  1360. // this.checkForm.rzslry = this.checkForm.shbm = ''
  1361. }
  1362. }
  1363. switch (_this.allLcjd) {
  1364. case '4':
  1365. data.shslry = _this.disposeForm.rzslry || ''
  1366. break
  1367. case '5':
  1368. data.zjczry = _this.disposeForm.rzslry || ''
  1369. break
  1370. case '6':
  1371. data.jgczry = _this.disposeForm.rzslry || ''
  1372. break
  1373. default:
  1374. break
  1375. }
  1376. break
  1377. // 驳回
  1378. case 53:
  1379. data = {
  1380. id: _this.data.id,
  1381. gdlx: _this.data.gdlx,
  1382. gdbh: _this.data.gdbh,
  1383. bhyy: _this.disposeForm.bhyy,
  1384. lcjd: _this.data.lcjd,
  1385. lcid: _this.disposeForm.lcid,
  1386. lczt: _this.disposeForm.lczt,
  1387. processDeposit: _this.data.processDeposit
  1388. }
  1389. break
  1390. // 转派
  1391. case 70:
  1392. data = {
  1393. gdbh: _this.data.gdbh,
  1394. gdlx: _this.data.gdlx,
  1395. slry: _this.disposeForm.slry,
  1396. lcjd: _this.data.lcjd,
  1397. id: _this.data.id,
  1398. lcid: _this.disposeForm.lcid,
  1399. lczt: _this.disposeForm.lczt, // 流程状态
  1400. zpyj: _this.disposeForm.zpyj, // 转派原因
  1401. processDeposit: _this.data.processDeposit
  1402. }
  1403. break
  1404. // 51 本环节
  1405. default:
  1406. data = {
  1407. id: _this.data.id,
  1408. gdlx: _this.data.gdlx,
  1409. lcid: _this.disposeForm.lcid,
  1410. rzyj: _this.disposeForm.rzyj,
  1411. lczt: _this.disposeForm.lczt,
  1412. processDeposit: _this.data.processDeposit,
  1413. rzFileid: rzFileid.toString(),
  1414. isLeak: _this.data.isLeak
  1415. }
  1416. break
  1417. }
  1418. if (_this.disposeForm.lczt !== 53 && _this.disposeForm.lczt !== 70 && _this.data.isLeak == 1) {
  1419. const leakInfo = {
  1420. // 漏点
  1421. 'leakInfo.isReal': _this.disposeForm.isRealLeak,
  1422. 'leakInfo.estimatedWaterLoss': _this.disposeForm.predictLeakWater
  1423. }
  1424. if (_this.disposeForm.isRealLeak == '1') {
  1425. // 漏点
  1426. data.isLeak = '1'
  1427. } else if (_this.disposeForm.isRealLeak == '2') {
  1428. // 非漏点
  1429. data.isLeak = '0'
  1430. }
  1431. Object.assign(data, leakInfo)
  1432. }
  1433. if (this.isJgsh && this.disposeForm.lczt == 52) {
  1434. // this.JgshMothed(data)
  1435. data['audit.auditUser'] = _this.disposeForm.rzslry
  1436. }
  1437. const datas = new FormData()
  1438. Object.keys(data).forEach((key) => {
  1439. datas.append(key, data[key])
  1440. })
  1441. if (this.files.length > 0) {
  1442. for (let i = 0; i < this.files.length; i++) {
  1443. console.log('附件:' + i)
  1444. const _file = _this.files[i]
  1445. if (!_this.strIsNull(_file) && _this.strIsNull(_file.id)) {
  1446. datas.append('fileList', _this.files[i])
  1447. }
  1448. }
  1449. }
  1450. // console.log("认证处置:"+ JSON.stringify(_this.disposeForm))
  1451. // return false
  1452. // else {
  1453. editHandle(datas).then((res) => {
  1454. if (res.code === 1) {
  1455. _this.$message.success('处理成功')
  1456. this.dialogFormVisible = false
  1457. _this.$emit('remind', '成功')
  1458. }
  1459. })
  1460. // }
  1461. return true
  1462. } else {
  1463. return false
  1464. }
  1465. })
  1466. }, 5000),
  1467. /* --------------------- 附件上传 ----------------*/
  1468. handleRemove(file, fileList) {
  1469. console.log('文件列表移除文件时的钩子', file, fileList)
  1470. const files = fileList.map((v) => {
  1471. return v.raw
  1472. })
  1473. this.files = files
  1474. this.fileList = fileList
  1475. },
  1476. handlePreview(file) {
  1477. console.log('点击文件列表中已上传的文件时的钩子', file)
  1478. },
  1479. handleExceed(files, fileList) {
  1480. this.$message.warning(
  1481. `当前限制选择 3 个文件,本次选择了 ${files.length
  1482. } 个文件,共选择了 ${files.length + fileList.length} 个文件`
  1483. )
  1484. },
  1485. beforeRemove(file, fileList) {
  1486. return this.$confirm(`确定移除 ${file.name}?`)
  1487. },
  1488. onBeforeUpload(file) {
  1489. // const isIMAGE = file.type === 'image/jpeg' || file.type === 'image/png';
  1490. const isLt1M = file.size / 1024 / 1024 < 10
  1491. // if (!isIMAGE) {
  1492. // this.$message.error('上传文件只能是图片格式!');
  1493. // }
  1494. if (!isLt1M) {
  1495. this.$message.error('上传文件大小不能超过 10MB!')
  1496. }
  1497. // return isIMAGE && isLt1M;
  1498. return isLt1M
  1499. },
  1500. // 上传之前的钩子函数
  1501. beforeAvatarUpload(response, file, fileList) {
  1502. console.log(response, file)
  1503. var isTrue = this.onBeforeUpload(response.raw)
  1504. if (isTrue) {
  1505. this.fileMap(file)
  1506. } else {
  1507. file.pop()
  1508. }
  1509. },
  1510. fileMap(file) {
  1511. if (file.length !== 0) {
  1512. const files = file.map((v) => {
  1513. return v.raw
  1514. })
  1515. this.files = files
  1516. }
  1517. },
  1518. handleAvatarSuccess(res, file, fileList) {
  1519. console.log('文件上传成功时的钩子', res, file, fileList)
  1520. },
  1521. /**
  1522. * @description 流程状态 值 改变事件
  1523. */
  1524. gddjZtChange() {
  1525. this.judgeZrjrFlag()
  1526. },
  1527. saveAuditChain() {
  1528. this.$refs.auditForm.validate((valid) => {
  1529. if (valid) {
  1530. const data = {
  1531. auditList: [
  1532. {
  1533. auditLevel: 0,
  1534. // auditPlanId: planId,
  1535. // auditType: '12',
  1536. auditUser: this.auditForm.jgczry
  1537. },
  1538. {
  1539. auditLevel: 1,
  1540. // auditPlanId: planId,
  1541. // auditType: '12',
  1542. auditUser: this.auditForm.jgczry2
  1543. },
  1544. {
  1545. auditLevel: 2,
  1546. // auditPlanId: planId,
  1547. // auditType: '12',
  1548. auditUser: this.auditForm.jgczry3
  1549. },
  1550. {
  1551. auditLevel: 3,
  1552. // auditPlanId: planId,
  1553. // auditType: '12',
  1554. auditUser: this.auditForm.jgczry4
  1555. }
  1556. ]
  1557. }
  1558. // 判断审批人员是否相同
  1559. const auditUserAry = []
  1560. if (!this.strIsNull(this.auditForm.jgczry)) {
  1561. auditUserAry.push(this.auditForm.jgczry)
  1562. }
  1563. if (!this.strIsNull(this.auditForm.jgczry2)) {
  1564. auditUserAry.push(this.auditForm.jgczry2)
  1565. }
  1566. if (!this.strIsNull(this.auditForm.jgczry3)) {
  1567. auditUserAry.push(this.auditForm.jgczry3)
  1568. }
  1569. if (!this.strIsNull(this.auditForm.jgczry4)) {
  1570. auditUserAry.push(this.auditForm.jgczry4)
  1571. }
  1572. if (new Set(auditUserAry).size !== auditUserAry.length) {
  1573. this.$message.error('多级审核时,每级审核人员不能重复!')
  1574. return false
  1575. }
  1576. data.auditList = data.auditList.slice(0, this.jgshCcjb)
  1577. console.log('新增审批链' + JSON.stringify(data))
  1578. const auditList = data.auditList
  1579. // return false;
  1580. // this.JgshData.auditList = auditUserAry
  1581. for (const i in auditList) {
  1582. console.log(auditList[i], 'auditUserAry[i].auditLevel')
  1583. this.JgshData['auditList[' + i + '].auditLevel'] = auditList[i].auditLevel
  1584. this.JgshData['auditList[' + i + '].auditUser'] = auditList[i].auditUser
  1585. }
  1586. const formData = new FormData()
  1587. Object.keys(this.JgshData).forEach((key) => {
  1588. formData.append(key, this.JgshData[key])
  1589. })
  1590. if (this.files.length > 0) {
  1591. for (let i = 0; i < this.files.length; i++) {
  1592. console.log('附件:' + i)
  1593. const _file = this.files[i]
  1594. if (!this.strIsNull(_file) && this.strIsNull(_file.id)) {
  1595. formData.append('fileList', this.files[i])
  1596. }
  1597. }
  1598. }
  1599. editHandle(formData).then((res) => {
  1600. if (res.code === 1) {
  1601. this.$message.success('处理成功')
  1602. this.dialogFormVisible = false
  1603. this.$emit('remind', '成功')
  1604. }
  1605. })
  1606. } else {
  1607. this.$message.warning('请完善工单信息!')
  1608. return false
  1609. }
  1610. })
  1611. // if (!this.difference) {
  1612. // this.newAddUser(formData)
  1613. // } else {
  1614. // this.editSubmit(formData)
  1615. // }
  1616. },
  1617. /**
  1618. * @description 判断当前流程是否为最后一个节点,是否增加流程处置下拉
  1619. */
  1620. setFlows() {
  1621. if (this.lcjdParams.lastLcjd === this.lcjdParams.currentFlow &&
  1622. this.strIsNull(this.lcjdParams.transferOutType)
  1623. ) {
  1624. // this.flows = this.flows.filter(function(flow){
  1625. // return flow.id !== 52
  1626. // })
  1627. // this.flows.push({ cname:'终止',id:54 })
  1628. this.flows = this.flows.map(function(flow) {
  1629. if (flow.id === 52) { flow.cname = '终止' }
  1630. return flow
  1631. })
  1632. }
  1633. },
  1634. /**
  1635. * @description 是否属于终止节点
  1636. */
  1637. existStop() {
  1638. const lczt = this.disposeForm.lczt
  1639. this.lcjdParams.stopFlag = false
  1640. if (lczt === 51 || lczt === 53 || lczt === 70) {
  1641. this.lcjdParams.stopFlag = true
  1642. } else if (this.lcjdParams.zrjrFlag === true && lczt === 52) {
  1643. this.lcjdParams.stopFlag = true
  1644. } else if (this.lcjdParams.lastLcjd === this.lcjdParams.currentFlow &&
  1645. lczt === 52 &&
  1646. this.lcjdParams.zrjrFlag === false) {
  1647. this.lcjdParams.stopFlag = true
  1648. }
  1649. console.log('测试:' + this.lcjdParams.stopFlag)
  1650. },
  1651. /**
  1652. * @description 判断是否暂时外部流程(抢维修)
  1653. */
  1654. judgeZrjrFlag() {
  1655. this.lcjdParams.zrjrFlag = false
  1656. // 判断是否应该显示抢维修流程
  1657. if (this.activeNames == this.lcjdParams.lastLcjd &&
  1658. this.disabled === false &&
  1659. this.disposeForm.lczt === 52) {
  1660. if (!this.strIsNull(this.lcjdParams.transferOutType)) {
  1661. this.lcjdParams.zrjrFlag = true
  1662. }
  1663. }
  1664. this.existStop()
  1665. },
  1666. /**
  1667. * @description 获取当前流程的最后一个节点
  1668. */
  1669. removeLcjd(lcjdStr) {
  1670. let lastLcjd = '' // 最后一个流程节点
  1671. var lcjdAry = lcjdStr.split(',')
  1672. // 去除最后节点 6 和 7
  1673. var newLcjd = lcjdAry.filter(function(value, index) {
  1674. return value != '7'
  1675. })
  1676. // 返回最后一个节点
  1677. if (newLcjd.length > 0) {
  1678. lastLcjd = newLcjd.pop()
  1679. }
  1680. console.log('新数组:' + lastLcjd)
  1681. return lastLcjd
  1682. },
  1683. /**
  1684. * @description 判断数组是否为空
  1685. */
  1686. arrayIsNull(aryList) {
  1687. return (typeof (aryList) === 'undefined' || aryList == null || aryList.length == 0)
  1688. },
  1689. /**
  1690. * @description 判断字符串是否为空
  1691. */
  1692. strIsNull(strVal) {
  1693. strVal = strVal || ''
  1694. return (typeof (strVal) === 'undefined' || strVal == null || strVal == '')
  1695. },
  1696. /**
  1697. * @description 抢维修子组件赋值
  1698. */
  1699. propSetQwxData(data) {
  1700. // data就是子组件传过来的值
  1701. console.log('子组件参数变化: ', JSON.stringify(data))
  1702. this.workflowQwx = data
  1703. // 给表单赋值
  1704. this.disposeForm.qwxTime = this.workflowQwx.qwxTime
  1705. this.disposeForm.startTime = this.workflowQwx.startTime
  1706. this.disposeForm.endTime = this.workflowQwx.endTime
  1707. this.disposeForm.orderSource = this.workflowQwx.orderSource
  1708. this.disposeForm.typeId = this.workflowQwx.typeId
  1709. this.disposeForm.respUser = this.workflowQwx.respUser
  1710. },
  1711. // 折叠面板
  1712. closeTab(val) {
  1713. this.activeName = val
  1714. }
  1715. }
  1716. }
  1717. </script>
  1718. <style lang="scss" scoped>
  1719. #handle_merge {
  1720. .wrap {
  1721. border: 1px solid rgba(57, 153, 243, 0.15);
  1722. >>>.el-collapse-item__header {
  1723. background: rgba(57, 153, 243, 0.15);
  1724. font-size: 15px;
  1725. height: 40px;
  1726. line-height: 40px;
  1727. color: rgb(28, 105, 229);
  1728. padding-left: 15px;
  1729. // text-indent: 15px;
  1730. font-weight: 600;
  1731. // .el-collapse-item__arrow{
  1732. // margin:0 9px 12px auto;
  1733. // }
  1734. }
  1735. }
  1736. .NBjd {
  1737. >>>.el-collapse-item__header {
  1738. background: rgb(240, 240, 240);
  1739. color: black;
  1740. }
  1741. }
  1742. .dialog_style {
  1743. width: 100%;
  1744. overflow-y: auto;
  1745. /deep/ .el-table {
  1746. text-align: center;
  1747. vertical-align: middle;
  1748. }
  1749. }
  1750. /deep/ .el-form-item {
  1751. margin-bottom: 5px;
  1752. }
  1753. /deep/ .el-collapse-item__wrap {
  1754. margin-top: 10px;
  1755. }
  1756. }
  1757. .is-disabled>>>.el-input__inner {
  1758. background: white;
  1759. border: none;
  1760. font-size: 14px;
  1761. color: black;
  1762. cursor: default;
  1763. padding: 0;
  1764. }
  1765. .is-disabled>>>.el-textarea__inner {
  1766. background: white;
  1767. border: none;
  1768. font-size: 14px;
  1769. color: black;
  1770. cursor: default;
  1771. padding: 0;
  1772. }
  1773. /deep/ .el-upload {
  1774. justify-content: flex-start;
  1775. }
  1776. </style>
  1777. <style lang="scss">
  1778. .Bhclass {
  1779. display: flex;
  1780. justify-content: center;
  1781. align-items: center;
  1782. // img{
  1783. // height: 200%;
  1784. // }
  1785. }
  1786. .colflexS {
  1787. display: flex;
  1788. align-items: center;
  1789. // justify-content: center;
  1790. }
  1791. </style>