extend.vue 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811
  1. <template>
  2. <div class="app-container">
  3. <div class="org-extend">
  4. <div class="extend_mod">
  5. <div class="info-box">
  6. <el-descriptions class="margin-top" :column="3" size="medium" border>
  7. <template #title>
  8. <h3 class="title">
  9. <i class="el-icon-collection-tag"></i>
  10. 基础信息
  11. </h3>
  12. </template>
  13. <el-descriptions-item
  14. v-for="v in dataInfo"
  15. :label="v.label"
  16. :key="v.key"
  17. labelClassName="gx_info_label"
  18. >{{ v.value }}
  19. </el-descriptions-item
  20. >
  21. <el-descriptions-item labelClassName="gx_info_label" label="机构组织类型" v-if="false">{{
  22. getLabel(dict.type.reality_org_type, orgType)
  23. }}
  24. </el-descriptions-item>
  25. <el-descriptions-item labelClassName="gx_info_label" label="是否停用">{{
  26. isLock == 1 ? "是" : "否"
  27. }}
  28. </el-descriptions-item>
  29. <el-descriptions-item labelClassName="gx_info_label" label="机构类型">{{
  30. getLabel(dict.type.sys_org_type, type)
  31. }}
  32. </el-descriptions-item>
  33. </el-descriptions>
  34. </div>
  35. </div>
  36. <div class="extend_mod" v-if="canShowGA38()">
  37. <div class="info-box">
  38. <h3 class="title">
  39. <i class="el-icon-collection-tag"></i>
  40. 安全防范设施建设达标信息
  41. <el-button style="float: right;" @click="handleOrgAdd" type="primary" icon="el-icon-plus" size="small">
  42. 新增
  43. </el-button>
  44. </h3>
  45. <el-table
  46. border
  47. size="small"
  48. style="width: 98%;margin-top: 20px"
  49. v-loading="orgloading"
  50. :data="constructionList"
  51. @selection-change="handleOrgSelectionChange"
  52. >
  53. <el-table-column
  54. type="selection"
  55. width=""
  56. align="center"
  57. v-if="false"
  58. />
  59. <el-table-column type="index" width="70" label="序号" align="center"/>
  60. <el-table-column label="机构类型" align="center" prop="type">
  61. <template v-slot="scope">
  62. <dict-tag
  63. :options="dict.type.org_extend_type"
  64. :value="scope.row.type"
  65. />
  66. </template>
  67. </el-table-column>
  68. <el-table-column label="GA38标准" align="center" prop="standard">
  69. <template slot-scope="r"
  70. >{{ getLabel(dict.type.org_extend_standard, `${r.row.standard}`) }}
  71. </template>
  72. </el-table-column>
  73. <el-table-column
  74. label="达标日期/计划达标日期"
  75. align="center"
  76. prop="dateOfCompliance"
  77. width="220"
  78. >
  79. <template slot-scope="scope">
  80. <span> {{
  81. scope.row.standard === '3' ? formatTime(scope.row.dateOfComplete, "YYYY-MM-DD") : formatTime(scope.row.dateOfCompliance, "YYYY-MM-DD")
  82. }}</span>
  83. </template>
  84. </el-table-column>
  85. <el-table-column v-if="false"
  86. label="备注"
  87. align="center"
  88. prop="reason"
  89. width="280"
  90. >
  91. </el-table-column>
  92. <el-table-column
  93. v-if="false"
  94. label="机构id"
  95. align="center"
  96. prop="orgId"
  97. />
  98. <el-table-column
  99. label="操作"
  100. align="center"
  101. class-name="small-padding fixed-width"
  102. >
  103. <template slot-scope="scope">
  104. <el-button
  105. v-if="scope.row.certificate"
  106. size="mini"
  107. type="text"
  108. icon="el-icon-search"
  109. @click="downBusiness(scope.row.certificate)"
  110. >查看证书
  111. </el-button
  112. >
  113. <el-button
  114. size="mini"
  115. type="text"
  116. icon="el-icon-edit-outline"
  117. @click="handleOrgUpdate(scope.row)"
  118. >编辑
  119. </el-button
  120. >
  121. <el-button
  122. size="mini"
  123. type="text"
  124. icon="el-icon-delete"
  125. @click="handleOrgDelete(scope.row)"
  126. >删除
  127. </el-button
  128. >
  129. </template>
  130. </el-table-column>
  131. </el-table>
  132. </div>
  133. </div>
  134. <!--补充信息-->
  135. <div class="extend_mod ">
  136. <div class="info-box">
  137. <h3 class="title">
  138. <i class="el-icon-collection-tag"></i>
  139. 补充信息
  140. </h3>
  141. </div>
  142. <!--监控中心的补充信息-->
  143. <div class="info-box">
  144. <el-descriptions class="margin-top" :column="3" size="medium" border>
  145. <el-descriptions-item labelClassName="info_label_required" :contentStyle='contentStyle' :labelStyle='labelStyle' label="气象行政区域">
  146. <el-cascader
  147. clearable
  148. v-model="weatherAreaCode"
  149. :options="areaList"
  150. @change="selectArea"
  151. placeholder="请选择气象行政区域"
  152. ></el-cascader>
  153. </el-descriptions-item>
  154. <el-descriptions-item v-if="type === org_type.yewd" labelClassName="info_label_required" label="产权类型" :contentStyle='contentStyle' :labelStyle='labelStyle'>
  155. <el-select
  156. clearable
  157. v-model="ownership"
  158. placeholder="请选择产权类型"
  159. >
  160. <el-option
  161. v-for="dict in dict.type.property_situation"
  162. :key="dict.value"
  163. :label="dict.label"
  164. :value="dict.value"
  165. ></el-option>
  166. </el-select>
  167. </el-descriptions-item>
  168. <el-descriptions-item v-if="type === org_type.yewd" labelClassName="info_label_required" label="所在位置" >
  169. <el-select
  170. clearable
  171. v-model="outsideArea"
  172. placeholder="请选择所在位置"
  173. >
  174. <el-option
  175. v-for="dict in dict.type.org_extend_is"
  176. :key="dict.value"
  177. :label="dict.label"
  178. :value="dict.value"
  179. ></el-option>
  180. </el-select>
  181. </el-descriptions-item>
  182. <el-descriptions-item v-if="type === org_type.yewd" labelClassName="info_label_required" label="夜间值守方式" :contentStyle='contentStyle' :labelStyle='labelStyle'>
  183. <el-select
  184. clearable
  185. v-model="dutyMode"
  186. placeholder="请选择夜间值守方式"
  187. >
  188. <el-option
  189. v-for="dict in dict.type.duty_options"
  190. :key="dict.value"
  191. :label="dict.label"
  192. :value="dict.value"
  193. ></el-option>
  194. </el-select>
  195. </el-descriptions-item>
  196. <el-descriptions-item v-if="type === org_type.yewd" labelClassName="info_label_required" label="是否设立保管箱库" :contentStyle='contentStyle' :labelStyle='labelStyle'>
  197. <el-radio-group v-model="safeBox">
  198. <el-radio :label="1">是</el-radio>
  199. <el-radio :label="0">否</el-radio>
  200. </el-radio-group>
  201. </el-descriptions-item>
  202. </el-descriptions>
  203. <el-descriptions v-if="type === org_type.yewd" class="margin-top" :column="3" size="medium" border>
  204. <el-descriptions-item label="是否设立在行式自助银行" :contentStyle='contentStyle' :labelStyle='labelStyle' labelClassName="info_label_required">
  205. <el-radio-group v-model="selfServiceBank">
  206. <el-radio :label="1">是</el-radio>
  207. <el-radio :label="0">否</el-radio>
  208. </el-radio-group>
  209. </el-descriptions-item>
  210. </el-descriptions>
  211. <el-descriptions v-if="type === org_type.yewd || type === org_type.lhzz" class="margin-top" :column="3" size="medium" border>
  212. <el-descriptions-item label="穿墙式设备" labelClassName="info_label_required" :contentStyle='contentStyle' :labelStyle='labelStyle'>
  213. <el-input-number
  214. v-model="wallPenetratingEquipment"
  215. controls-position="right"
  216. @change="handleChange"
  217. :min="0"
  218. :max="999"
  219. ></el-input-number>
  220. </el-descriptions-item>
  221. <el-descriptions-item label="大堂式设备"
  222. labelClassName="info_label_required" :contentStyle='contentStyle' :labelStyle='labelStyle'>
  223. <el-input-number
  224. v-model="lobbyEquipment"
  225. controls-position="right"
  226. @change="handleChange"
  227. :min="0"
  228. :max="999"
  229. ></el-input-number>
  230. </el-descriptions-item>
  231. </el-descriptions>
  232. <!-- <el-descriptions v-if="type === org_type.lhzz" class="margin-top" :column="3" size="medium" border>
  233. <el-descriptions-item label="穿墙式设备" labelClassName="info_label_required" :contentStyle='contentStyle' :labelStyle='labelStyle'>
  234. <el-input-number
  235. v-model="wallPenetratingEquipment"
  236. controls-position="right"
  237. @change="handleChange"
  238. :min="0"
  239. :max="999"
  240. ></el-input-number>
  241. </el-descriptions-item>
  242. <el-descriptions-item label="大堂式设备" labelClassName="info_label_required" :contentStyle='contentStyle' :labelStyle='labelStyle'>
  243. <el-input-number
  244. v-model="lobbyEquipment"
  245. controls-position="right"
  246. @change="handleChange"
  247. :min="0"
  248. :max="999"
  249. ></el-input-number>
  250. </el-descriptions-item>
  251. </el-descriptions> -->
  252. <el-descriptions class="margin-top" :column="3" v-if="type === org_type.yewd" size="medium" border>
  253. <el-descriptions-item label="是否设立网点业务库" :contentStyle='contentStyle' :labelStyle='labelStyle' labelClassName="info_label_required">
  254. <el-radio-group v-model="businessLibrary">
  255. <el-radio :label="1">是</el-radio>
  256. <el-radio :label="0">否</el-radio>
  257. </el-radio-group>
  258. </el-descriptions-item>
  259. </el-descriptions>
  260. <el-descriptions class="margin-top" v-if="this.businessLibrary==1" :column="3" size="medium" border>
  261. <el-descriptions-item label="业务库类型" :contentStyle='contentStyle' :labelStyle='labelStyle' labelClassName="info_label_required">
  262. <el-select clearable v-model="businessLibraryType" placeholder="请选择业务库类型" >
  263. <el-option
  264. v-for="dict in dict.type.business_library_type"
  265. :key="dict.value"
  266. :label="dict.label"
  267. :value="dict.value"
  268. ></el-option>
  269. </el-select>
  270. </el-descriptions-item>
  271. </el-descriptions>
  272. <el-descriptions class="margin-top" :column="3" v-if="type === org_type.yewd" size="medium" border>
  273. <el-descriptions-item label="是否配备保安人员" :contentStyle='contentStyle' :labelStyle='labelStyle' labelClassName="info_label_required" >
  274. <el-radio-group v-model="askari">
  275. <el-radio :label="1">是</el-radio>
  276. <el-radio :label="0">否</el-radio>
  277. </el-radio-group>
  278. </el-descriptions-item>
  279. </el-descriptions>
  280. <el-descriptions class="margin-top" :column="3" v-if="this.askari==1" size="medium" border>
  281. <el-descriptions-item labelClassName="info_label_required" label="内部保安人数" :contentStyle='contentStyle' :labelStyle='labelStyle'>
  282. <el-input-number
  283. v-model="innerCount"
  284. controls-position="right"
  285. @change="handleChange"
  286. :min="0"
  287. :max="999"
  288. ></el-input-number>
  289. </el-descriptions-item>
  290. <el-descriptions-item labelClassName="info_label_required" label="外聘保安人数" :contentStyle='contentStyle' :labelStyle='labelStyle'>
  291. <el-input-number
  292. v-model="outsideCount"
  293. controls-position="right"
  294. @change="handleChange"
  295. :min="0"
  296. :max="999"
  297. ></el-input-number>
  298. </el-descriptions-item>
  299. <el-descriptions-item labelClassName="info_label_required" label="是否取得保安证书">
  300. <el-radio-group v-model="isAskariCertificate">
  301. <el-radio :label="1">是</el-radio>
  302. <el-radio :label="0">否</el-radio>
  303. </el-radio-group>
  304. </el-descriptions-item>
  305. <el-descriptions-item v-if="isAskariCertificate==1" labelClassName="info_label_required" label="上传保安证" :contentStyle='contentStyle' :labelStyle='labelStyle'>
  306. <image-upload
  307. v-model="askariCertificate"
  308. :limit="5"
  309. :value="askariCertificate"
  310. @input="getImgUrl"
  311. ></image-upload>
  312. </el-descriptions-item>
  313. </el-descriptions>
  314. <el-descriptions class="margin-top" :column="3" size="medium" border>
  315. <el-descriptions-item v-if="type === org_type.jkzx" labelClassName="info_label_required" label="建设时间">
  316. <el-date-picker
  317. clearable
  318. v-model="constructionTime"
  319. type="date"
  320. value-format="yyyy-MM-dd HH:mm:ss"
  321. placeholder="请选择建设时间"
  322. >
  323. </el-date-picker>
  324. </el-descriptions-item>
  325. <el-descriptions-item v-if="type === org_type.jkzx" labelClassName="info_label_required" label="最近一次改造时间">
  326. <el-date-picker
  327. clearable
  328. v-model="lastUpdateTime"
  329. type="date"
  330. value-format="yyyy-MM-dd HH:mm:ss"
  331. placeholder="请选择最近一次改造时间"
  332. >
  333. </el-date-picker>
  334. </el-descriptions-item>
  335. <el-descriptions-item v-if="type === org_type.jkzx" labelClassName="info_label_required" label="系统平台品牌">
  336. <el-select
  337. clearable
  338. v-model="platformBrand"
  339. placeholder="请选择系统平台品牌"
  340. >
  341. <el-option
  342. v-for="dict in dict.type.org_platform_brand"
  343. :key="dict.value"
  344. :label="dict.label"
  345. :value="dict.value"
  346. ></el-option>
  347. </el-select>
  348. </el-descriptions-item>
  349. <el-descriptions-item v-if="type === org_type.jkzx" :contentStyle='contentStyle' :labelStyle='labelStyle'
  350. labelClassName="info_label_required" label="离行式加钞间出入口数量">
  351. <el-input-number
  352. v-model="cashAddingRoom"
  353. controls-position="right"
  354. @change="handleChange"
  355. :min="0"
  356. :max="999"
  357. ></el-input-number>
  358. </el-descriptions-item>
  359. <el-descriptions-item v-if="type === org_type.jkzx" labelClassName="info_label_required" label="全辖摄像头总路数">
  360. <el-input-number
  361. v-model="totalCameraCount"
  362. controls-position="right"
  363. @change="handleChange"
  364. :min="0"
  365. :max="999999"
  366. ></el-input-number>
  367. </el-descriptions-item>
  368. <el-descriptions-item v-if="type === org_type.jkzx" labelClassName="info_label_required" label="全辖高清摄像头路数">
  369. <el-input-number
  370. v-model="hdCameraCount"
  371. controls-position="right"
  372. @change="handleChange"
  373. :min="0"
  374. :max="999999"
  375. ></el-input-number>
  376. </el-descriptions-item>
  377. <el-descriptions-item label="出入口远程控制与授权" v-if="(type === org_type.jkzx)" labelClassName="info_label_required" >
  378. <el-radio-group v-model="remoteControl">
  379. <el-radio :label="1">是</el-radio>
  380. <el-radio :label="0">否</el-radio>
  381. </el-radio-group>
  382. </el-descriptions-item>
  383. <el-descriptions-item label="业务库防控隔离门出入口数量" v-if="type === org_type.jkzx" labelClassName="info_label_required" >
  384. <el-input-number
  385. v-model="remoteCount"
  386. controls-position="right"
  387. @change="handleChange"
  388. :min="0"
  389. :max="999"
  390. ></el-input-number>
  391. </el-descriptions-item>
  392. </el-descriptions>
  393. </div>
  394. </div>
  395. <div style="
  396. line-height: 50px;
  397. width: 100%;
  398. height: 55px;
  399. text-align: center;
  400. background: #ffffff;
  401. z-index: 9999;">
  402. <el-button type="primary" @click="saveExtend"
  403. >提交
  404. </el-button
  405. >
  406. <el-button type="primary" @click="nosaveExtend"
  407. >取消
  408. </el-button
  409. >
  410. </div>
  411. </div>
  412. <DialogCom
  413. :title="orgtitle"
  414. :visible.sync="orgopen"
  415. @Close="closePictrue"
  416. width="500px"
  417. append-to-body
  418. >
  419. <el-form
  420. ref="orgform"
  421. :model="orgform"
  422. label-width="130px"
  423. @close="orgcancel"
  424. :rules="rules"
  425. >
  426. <el-form-item label="机构类型" prop="type">
  427. <el-select
  428. prop="type"
  429. label="机构类型"
  430. v-model="orgform.type"
  431. placeholder="请选择机构类型"
  432. clearable
  433. >
  434. <el-option
  435. v-for="dict in getGA38TypeByOrgType"
  436. :key="dict.value"
  437. :label="dict.label"
  438. :value="dict.value"
  439. />
  440. </el-select>
  441. <!-- v-for="dict in dict.type.org_extend_type" -->
  442. </el-form-item>
  443. <el-form-item label="GA38标准" prop="standard">
  444. <el-select
  445. prop="planType"
  446. label="标准"
  447. v-model="orgform.standard"
  448. placeholder="请选择标准"
  449. clearable
  450. >
  451. <el-option
  452. v-for="dict in dict.type.org_extend_standard"
  453. :key="dict.value"
  454. :label="dict.label"
  455. :value="dict.value"
  456. />
  457. </el-select>
  458. </el-form-item>
  459. <el-form-item v-show="orgform.standard === '2' || orgform.standard === '1'" label="达标日期"
  460. prop="dateOfCompliance">
  461. <el-date-picker
  462. clearable
  463. v-model="orgform.dateOfCompliance"
  464. type="date"
  465. value-format="yyyy-MM-dd HH:mm:ss"
  466. placeholder="请选择达标日期"
  467. >
  468. </el-date-picker>
  469. </el-form-item>
  470. <el-form-item v-show="orgform.standard === '3'" label="计划达标日期">
  471. <el-date-picker
  472. clearable
  473. v-model="orgform.dateOfComplete"
  474. type="date"
  475. value-format="yyyy-MM-dd"
  476. placeholder="请选择计划达标日期"
  477. >
  478. </el-date-picker>
  479. </el-form-item>
  480. <el-form-item v-show="orgform.standard === '3'" label="未达标原因">
  481. <el-input type="textarea" rows="5" v-model="orgform.reason" placeholder="请输入未达标原因"/>
  482. </el-form-item>
  483. <el-form-item label="上传证书" v-show="orgform.standard !== '3'" prop="certificate">
  484. <div class="image-container" style="margin-left: 20px">
  485. <p style="font-size: 12px; color: #999">上传安全防范设施合格证</p>
  486. <!-- <image-upload
  487. :limit="5"
  488. :fileSize="5"
  489. :value="orgform.certificate"
  490. @input="uploadorgSuccess"
  491. ></image-upload> -->
  492. <imgs-upload :limit="5" v-model="orgform.certificate" :fileSize="5"></imgs-upload>
  493. </div>
  494. </el-form-item>
  495. <el-form-item v-if="false" label="机构id" prop="orgId">
  496. <el-input v-model="orgform.orgId" placeholder="请输入机构id"/>
  497. </el-form-item>
  498. </el-form>
  499. <div slot="footer" class="dialog-footer">
  500. <el-button type="primary" @click="submitOrgForm">确 定</el-button>
  501. <el-button @click="orgcancel">取 消</el-button>
  502. </div>
  503. </DialogCom>
  504. <div slot="footer" class="dialog-footer" style="height: 50px"></div>
  505. <el-image-viewer
  506. v-if="imageViewer"
  507. :on-close="closeImgViewer"
  508. :url-list="srcList"
  509. />
  510. </div>
  511. </template>
  512. <script>
  513. import ImgsUpload from "@/components/ImgsUpload";
  514. import uploadpng from "@/assets/images/upload.png";
  515. import uplpng from "@/assets/images/upl.png";
  516. import request from "@/utils/request";
  517. import {statusOptions, getLabel} from "./../../commonOption";
  518. import {
  519. listExtend,
  520. getExtend,
  521. addExtend,
  522. updateExtend,
  523. delExtend,
  524. getExtendByOrgId,
  525. uploadFile,
  526. } from "@/api/system/extend";
  527. import {
  528. listDept,
  529. getDept,
  530. delDept,
  531. addDept,
  532. updateDept,
  533. listDeptExcludeChild,
  534. } from "@/api/system/dept";
  535. import {
  536. listOrgPhysicalDefenseConstruction,
  537. getOrgPhysicalDefenseConstruction,
  538. addOrgPhysicalDefenseConstruction,
  539. updateOrgPhysicalDefenseConstruction,
  540. delOrgPhysicalDefenseConstruction,
  541. } from "@/api/system/OrgPhysicalDefenseConstruction";
  542. import {selectCityInfoVoList} from "@/api/core/weather";
  543. import TreeNodeDialogVue from "../../tool/build/TreeNodeDialog.vue";
  544. export default {
  545. dicts: [
  546. "duty_options",
  547. "sys_org_type",
  548. "org_platform_brand",
  549. "org_platform_supplier_brand",
  550. "org_extend_type",
  551. "business_library_type",
  552. "reality_org_type",
  553. "org_extend_standard",
  554. "org_extend_business_library_standard",
  555. "org_extend_self_service_bank_standard",
  556. "org_extend_detached_standard",
  557. "org_extend_is",
  558. "property_situation",
  559. ],
  560. fillter: {},
  561. components: {
  562. ImgsUpload,
  563. "el-image-viewer": () =>
  564. import("element-ui/packages/image/src/image-viewer"),
  565. },
  566. props: [],
  567. data() {
  568. let formatRule = function (rule, value, callback) {
  569. console.log(value, "value");
  570. if (!value.length) {
  571. callback(new Error("证书为必填项"));
  572. } else {
  573. callback();
  574. }
  575. };
  576. return {
  577. //内容样式
  578. contentStyle: {
  579. 'text-align': 'left',
  580. 'width': '300px'
  581. },
  582. //label样式
  583. labelStyle: { 'width': '200px' }
  584. ,
  585. org_type: {
  586. jkzx: '10',
  587. yewd: '4',
  588. lhzz: '5',
  589. zxywk: '6',
  590. },
  591. reqmsg: false,
  592. imageViewer: false,
  593. //表单验证
  594. rules: {
  595. type: [{required: true, message: "请选择机构类型", trigger: "change"}],
  596. standard: [{required: true, message: "请选择标准", trigger: "change"}],
  597. //certificate: [{required: true, message: "请选择上传证书", trigger: "change"}],
  598. },
  599. remoteCountoptions: [
  600. {label: "0", value: 0},
  601. {label: "1", value: 1},
  602. {label: "2", value: 2},
  603. {label: "3", value: 3},
  604. ],
  605. cashAddingRoomoptions: [
  606. {label: "0", value: 0},
  607. {label: "1", value: 1},
  608. {label: "2", value: 2},
  609. {label: "3", value: 3},
  610. ],
  611. //基础信息key
  612. infoKeys: [
  613. {label: "机构名称", key: "name"},
  614. {label: "机构简称", key: "shortName"},
  615. {label: "机构地址", key: "address"},
  616. {label: "排序号", key: "sort"},
  617. {label: "更新时间", key: "updateTime"},
  618. {label: "同步时间", key: "createTime"},
  619. ],
  620. innerCount: 0,
  621. outsideCount: 0,
  622. safeBox: null,
  623. remoteCount: 0,
  624. cashAddingRoom: 0,
  625. type: null,
  626. isLock: null,
  627. dataInfo: [],
  628. //机构补充信息
  629. extendId: null,
  630. orgType: null,
  631. weatherAreaCode: null,
  632. premisesArea: null,
  633. ownership: null,
  634. outsideArea: null,
  635. askari: null,
  636. businessLibrary: null,
  637. businessLibraryType: null,
  638. dutyMode: null,
  639. remoteControl: null,
  640. selfServiceBank: null,
  641. lobbyEquipment: 0,
  642. wallPenetratingEquipment: 0,
  643. platformBrand: null,
  644. platformSupplierBrand: null,
  645. constructionTime: null,
  646. lastUpdateTime: null,
  647. detachedLobbyEquipment: null,
  648. detachedWallPenetratingEquipment: null,
  649. cashAddingRoomRemoteControl: null,
  650. source: null,
  651. //是否取得保安证书
  652. isAskariCertificate: null,
  653. askariCertificate: null,
  654. hdCameraCount: 0,
  655. totalCameraCount: 0,
  656. certificate: null,
  657. //机构建设数据
  658. // 遮罩层
  659. orgloading: true,
  660. businessloading: true,
  661. // 选中数组
  662. orgids: [],
  663. // 选中数组
  664. Bankids: [],
  665. Businessids: [],
  666. // 非单个停用
  667. single: true,
  668. // 非多个停用
  669. multiple: true,
  670. // 显示搜索条件
  671. showSearch: true,
  672. // 总条数
  673. total: 0,
  674. // 机构物防建设表格数据
  675. constructionList: [],
  676. // 银行物防建设表格数据
  677. BankPhysicalDefenseConstructionList: [],
  678. detachedPhysicalDefenseConstructionList: [],
  679. BusinessPhysicalDefenseConstructionList: [],
  680. // 弹出层标题
  681. orgtitle: "",
  682. Businesstitle: "",
  683. // 弹出层标题
  684. Banktitle: "",
  685. detachedtitle: "",
  686. detachedloading: false,
  687. // 是否显示弹出层
  688. Bankopen: false,
  689. detachedopen: false,
  690. //图片预览
  691. openUrl: null,
  692. srcList: [],
  693. openTitle: null,
  694. openVisible: false,
  695. // 表单参数
  696. Bankform: {},
  697. detachedform: {},
  698. Businessform: {},
  699. // 是否显示弹出层
  700. Businessopen: false,
  701. orgopen: false,
  702. // 表单参数
  703. orgform: {},
  704. //2个图片信息
  705. uploadp: uploadpng,
  706. uplp: uplpng,
  707. //下拉框生成信息
  708. orgTypes: [
  709. {label: "营业网点", value: 0},
  710. {label: "在行式自助银行", value: 1},
  711. {label: "离行式自助银行", value: 2},
  712. {label: "中心业务库", value: 3},
  713. {label: "网点业务库", value: 4},
  714. {label: "保管箱库", value: 5},
  715. {label: "监控中心", value: 6},
  716. ],
  717. businessLibraryTypes: {
  718. businessLibraryTyp1: {label: "1类业务库", value: 1},
  719. businessLibraryTyp2: {label: "2类业务库", value: 2},
  720. businessLibraryTyp3: {label: "3类业务库", value: 3},
  721. },
  722. platformBrands: {
  723. platformBrand1: {label: "品牌1", value: 0},
  724. platformBrand2: {label: "品牌2", value: 1},
  725. },
  726. platformSupplierBrands: {
  727. platformSupplierBrand1: {label: "品牌1", value: 0},
  728. platformSupplierBrand2: {label: "品牌2", value: 1},
  729. },
  730. prop: "",
  731. propItem: "",
  732. row: "",
  733. areaList: [],
  734. imgs: [],
  735. Businessimgs: [],
  736. Bankimgs: [],
  737. orgimgs: [],
  738. detachedimgs: [],
  739. };
  740. },
  741. computed: {
  742. getLabels() {
  743. return function (value) {
  744. const option = this.orgTypes.filter((item) => item.value == value);
  745. // console.log(option[0].label,"option")
  746. return option ? option[0].label : "";
  747. };
  748. },
  749. getGA38TypeByOrgType() {
  750. let tempArry = [];
  751. // 上传GA38的机构的机构类型是 营业网点
  752. if(this.type=="4")
  753. {
  754. this.dict.type.org_extend_type.forEach(x=>{
  755. if (x.value == 1 || x.value == 2 || x.value == 5 || x.value == 6) {
  756. tempArry.push(x);
  757. }
  758. });
  759. }
  760. // 上传GA38的机构的机构类型是 离行自助银行
  761. else if(this.type=="5")
  762. {
  763. this.dict.type.org_extend_type.forEach(x=>{
  764. if (x.value == 3) {
  765. tempArry.push(x);
  766. }
  767. });
  768. }
  769. // 上传GA38的机构的机构类型是 中心业务库
  770. else if(this.type=="6")
  771. {
  772. this.dict.type.org_extend_type.forEach(x=>{
  773. if (x.value == 4) {
  774. tempArry.push(x);
  775. }
  776. });
  777. }
  778. // 上传GA38的机构的机构类型是 监控中心
  779. else if(this.type=="10")
  780. {
  781. this.dict.type.org_extend_type.forEach(x=>{
  782. if (x.value == 7) {
  783. tempArry.push(x);
  784. }
  785. });
  786. }
  787. else{
  788. tempArry=this.dict.type.org_extend_type;
  789. }
  790. // console.log("computed getUserOrgType",tempArry);
  791. return tempArry;
  792. },
  793. switchModel: {
  794. get() {
  795. return this.switchValue === 1; // 将0转换为false,1转换为true
  796. },
  797. set(value) {
  798. this.switchValue = value ? 1 : 0; // 将false转换为0,true转换为1
  799. },
  800. },
  801. },
  802. watch: {
  803. "detachedform.certificateEvidence"(newValue) {
  804. if (
  805. newValue === 1 &&
  806. this.detachedform.certificate == null &&
  807. this.detachedimgs.length == 0
  808. ) {
  809. this.reqmsg = true;
  810. }
  811. if (newValue === 0) {
  812. this.reqmsg = false;
  813. }
  814. },
  815. "Bankform.certificateEvidence"(newValue) {
  816. // console.log(this.Bankimgs.length,"this.imgs")
  817. // console.log(this.Bankform.certificate,"Bankform.certificate")
  818. if (
  819. newValue === 1 &&
  820. this.Bankform.certificate == null &&
  821. this.Bankimgs.length == 0
  822. ) {
  823. this.reqmsg = true;
  824. }
  825. if (newValue === 0) {
  826. this.reqmsg = false;
  827. }
  828. },
  829. "Businessform.certificateEvidence"(newValue) {
  830. if (
  831. newValue === 1 &&
  832. this.Businessform.certificate == null &&
  833. this.Businessimgs.length === 0
  834. ) {
  835. this.reqmsg = true;
  836. }
  837. if (newValue === 0) {
  838. this.reqmsg = false;
  839. }
  840. },
  841. "orgform.certificateEvidence"(newValue) {
  842. if (
  843. newValue === 1 &&
  844. this.orgform.certificate == null &&
  845. this.orgimgs.length === 0
  846. ) {
  847. this.reqmsg = true;
  848. }
  849. if (newValue === 0) {
  850. this.reqmsg = false;
  851. }
  852. },
  853. // selfServiceBank(newValue){
  854. // if (newValue==0){
  855. // this.wallPenetratingEquipment=null;
  856. // this.lobbyEquipment=null;
  857. // }
  858. // },
  859. businessLibrary(newValue){
  860. if (newValue==0){
  861. this.businessLibraryType=null;
  862. }
  863. },
  864. askari(newValue){
  865. console.log("askari1",newValue)
  866. if (newValue==0){
  867. console.log("askari2",newValue)
  868. this.innerCount=null;
  869. this.outsideCount=null;
  870. this.isAskariCertificate=null;
  871. this.askariCertificate=null;
  872. }
  873. },
  874. isAskariCertificate(newValue)
  875. {
  876. if(!newValue){
  877. this.askariCertificate=null;
  878. }
  879. }
  880. },
  881. created() {
  882. this.getOrgInfo();
  883. this.getExtendInfo();
  884. this.getOrgPhysicalDefenseConstructionInfo();
  885. this.getBankPhysicalDefenseConstructionInfo();
  886. this.getBusinessPhysicalDefenseConstructionInfo();
  887. this.getdetachedPhysicalDefenseConstructionInfo();
  888. this.getAreaList();
  889. },
  890. mounted() {
  891. },
  892. methods: {
  893. closePictrue() {
  894. this.orgform.certificate = null;
  895. },
  896. closeImgViewer() {
  897. this.imageViewer = false;
  898. this.srcList = [];
  899. },
  900. isreq(rule, value, callback) {
  901. if (this.reqmsg) {
  902. callback(new Error("证书为必填项"));
  903. } else {
  904. callback();
  905. }
  906. },
  907. getImgUrl(img) {
  908. this.imgs.push(img);
  909. console.log(this.imgs, "imgs");
  910. },
  911. getAreaList() {
  912. selectCityInfoVoList({}).then((response) => {
  913. this.areaList = response.data;
  914. });
  915. },
  916. selectArea(value) {
  917. this.weatherAreaCode = value[1];
  918. },
  919. downBusiness(file) {
  920. let array = file.split(",");
  921. this.openTitle = "证书";
  922. this.openUrl = array[0];
  923. this.srcList = array;
  924. this.openVisible = true;
  925. this.imageViewer = true;
  926. // for (let i = 0; i < array.length; i++) {
  927. // window.open(array[i]);
  928. // }
  929. },
  930. //证书上传
  931. uploadBusinessSuccess(img) {
  932. this.Businessimgs.push(img);
  933. this.reqmsg = false;
  934. },
  935. uploadBankSuccess(img) {
  936. this.Bankimgs.push(img);
  937. this.reqmsg = false;
  938. },
  939. uploadorgSuccess(img) {
  940. this.orgimgs.push(img);
  941. this.reqmsg = false;
  942. },
  943. uploaddetachedSuccess(img) {
  944. this.detachedimgs.push(img);
  945. this.reqmsg = false;
  946. },
  947. handleInput() {
  948. // 使用正则表达式过滤输入,只保留数字和小数点
  949. // this.premisesArea = this.premisesArea.replace(/[^0-9.]/g, "");
  950. // 限制只能输入1到999999之间的数字
  951. let value = parseInt(this.premisesArea, 10); // 将输入的值转为整数
  952. if (isNaN(value) || value < 1 || value > 999999) {
  953. // 判断是否在范围内
  954. this.premisesArea = ""; // 不在范围内则清空输入的值
  955. } else {
  956. this.premisesArea = value.toString(); // 在范围内则保留输入的值
  957. }
  958. },
  959. handleInput2() {
  960. // 使用正则表达式过滤输入,只保留数字和小数点
  961. this.weatherAreaCode = this.weatherAreaCode.replace(/[^a-zA-Z0-9]/g, "");
  962. },
  963. request() {
  964. },
  965. handleChange(value) {
  966. },
  967. getOrgInfo() {
  968. getDept(this.$route.params.id).then((data) => {
  969. // console.log(data.data);
  970. if (!data.data) return;
  971. let res = data.data;
  972. this.dataInfo = this.infoKeys.map((v, i) => {
  973. // console.log(v, res[v.key], "vvvvv");
  974. v.value = res[v.key];
  975. return v;
  976. });
  977. this.type = data.data.type;
  978. this.isLock = data.data.isLock;
  979. this.source = data.data.source;
  980. // console.log(this.dataInfo, "info");
  981. });
  982. },
  983. getExtendInfo() {
  984. getExtendByOrgId(this.$route.params.id).then((data) => {
  985. console.log(data.data);
  986. if (data.data != null) {
  987. this.safeBox = data.data.safeBox;
  988. this.innerCount = data.data.innerCount;
  989. this.outsideCount = data.data.outsideCount;
  990. this.cashAddingRoom = data.data.cashAddingRoom;
  991. this.remoteCount = data.data.remoteCount;
  992. this.orgType = data.data.orgType;
  993. this.weatherAreaCode = data.data.weatherAreaCode;
  994. this.premisesArea = data.data.premisesArea;
  995. this.ownership = data.data.ownership;
  996. this.outsideArea = data.data.outsideArea;
  997. this.askari = data.data.askari;
  998. this.remoteControl = data.data.remoteControl;
  999. this.selfServiceBank = data.data.selfServiceBank;
  1000. this.businessLibrary = data.data.businessLibrary;
  1001. this.lobbyEquipment = data.data.lobbyEquipment;
  1002. this.wallPenetratingEquipment = data.data.wallPenetratingEquipment;
  1003. this.askariCertificate = data.data.askariCertificate;
  1004. if (this.askariCertificate){
  1005. this.isAskariCertificate=1;
  1006. }else {
  1007. this.isAskariCertificate=0;
  1008. }
  1009. this.extendId = data.data.id;
  1010. this.constructionTime = data.data.constructionTime;
  1011. this.lastUpdateTime = data.data.lastUpdateTime;
  1012. this.platformBrand = data.data.platformBrand;
  1013. this.platformSupplierBrand = data.data.platformSupplierBrand;
  1014. this.businessLibraryType = data.data.businessLibraryType;
  1015. this.dutyMode = data.data.dutyMode;
  1016. this.detachedLobbyEquipment = data.data.detachedLobbyEquipment;
  1017. this.detachedWallPenetratingEquipment =
  1018. data.data.detachedWallPenetratingEquipment;
  1019. this.cashAddingRoomRemoteControl =
  1020. data.data.cashAddingRoomRemoteControl;
  1021. this.hdCameraCount = data.data.hdCameraCount ? data.data.hdCameraCount : 0;
  1022. this.totalCameraCount = data.data.totalCameraCount ? data.data.totalCameraCount : 0;
  1023. // if (
  1024. // this.askariCertificate &&
  1025. // this.askariCertificate.trim() &&
  1026. // this.askariCertificate.includes(",")
  1027. // ) {
  1028. // this.imgs = this.askariCertificate.split(",");
  1029. // } else if (
  1030. // this.askariCertificate &&
  1031. // this.askariCertificate.trim() &&
  1032. // this.askariCertificate.includes(".")
  1033. // ) {
  1034. // this.imgs.push(this.askariCertificate);
  1035. // }
  1036. // console.log(this.extendId);
  1037. }
  1038. });
  1039. },
  1040. getLabel(options, value) {
  1041. return getLabel(options, value);
  1042. },
  1043. getOrgPhysicalDefenseConstructionInfo() {
  1044. this.orgloading = true;
  1045. let dat = {orgId: this.$route.params.id};
  1046. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  1047. console.log("机构信息获取成功");
  1048. this.constructionList = data.rows;
  1049. this.orgloading = false;
  1050. });
  1051. },
  1052. getBankPhysicalDefenseConstructionInfo() {
  1053. this.bankloading = true;
  1054. let dat = {orgId: this.$route.params.id, type: 3};
  1055. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  1056. // console.log(data);
  1057. this.BankPhysicalDefenseConstructionList = data.rows;
  1058. this.bankloading = false;
  1059. });
  1060. },
  1061. getdetachedPhysicalDefenseConstructionInfo() {
  1062. this.detachedloading = true;
  1063. let dat = {orgId: this.$route.params.id, type: 4};
  1064. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  1065. // console.log(data);
  1066. this.detachedPhysicalDefenseConstructionList = data.rows;
  1067. this.detachedloading = false;
  1068. });
  1069. },
  1070. getBusinessPhysicalDefenseConstructionInfo() {
  1071. this.businessloading = true;
  1072. let dat = {orgId: this.$route.params.id, type: 2};
  1073. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  1074. // console.log(data);
  1075. this.BusinessPhysicalDefenseConstructionList = data.rows;
  1076. this.businessloading = false;
  1077. });
  1078. },
  1079. // 取消按钮
  1080. Businesscancel() {
  1081. this.Businessopen = false;
  1082. this.Businessreset();
  1083. },
  1084. // 表单重置
  1085. Businessreset() {
  1086. this.Businessform = {
  1087. id: null,
  1088. standard: null,
  1089. dateOfCompliance: null,
  1090. certificateEvidence: null,
  1091. certificate: null,
  1092. evidence: null,
  1093. createTime: null,
  1094. updateTime: null,
  1095. createBy: null,
  1096. updateBy: null,
  1097. orgId: null,
  1098. };
  1099. this.reqmsg = false;
  1100. this.resetForm("Businessform");
  1101. },
  1102. // 多选框选中数据
  1103. handleBusinessSelectionChange(selection) {
  1104. this.Businessids = selection.map((item) => item.id);
  1105. this.single = selection.length !== 1;
  1106. this.multiple = !selection.length;
  1107. },
  1108. /** 新增按钮操作 */
  1109. handleBusinessAdd() {
  1110. this.Businessreset();
  1111. this.Businessopen = true;
  1112. this.Businesstitle = "新增安全防范设施建设达标信息";
  1113. },
  1114. /** 编辑按钮操作 */
  1115. handleBusinessUpdate(row) {
  1116. this.Businessreset();
  1117. const id = row.id || this.Businessids;
  1118. getOrgPhysicalDefenseConstruction(id).then((response) => {
  1119. // console.log(response.data,"response.data")
  1120. this.Businessform = response.data;
  1121. // this.Businessform.certificateEvidence=parseInt(response.data.certificateEvidence);
  1122. this.Businessopen = true;
  1123. this.Businesstitle = "编辑安全防范设施建设达标信息";
  1124. });
  1125. },
  1126. /** 提交按钮 */
  1127. submitBusinessForm() {
  1128. if (this.Businessimgs.length > 0) {
  1129. this.Businessform.certificate =
  1130. this.Businessimgs[this.Businessimgs.length - 1].toString(",");
  1131. }
  1132. this.$refs.Businessform.validate((valid) => {
  1133. if (valid) {
  1134. // 表单验证通过,提交数据或执行其他操作
  1135. this.Businessform.orgId = this.$route.params.id;
  1136. this.Businessform.type = 2;
  1137. if (this.Businessform.id != null) {
  1138. // console.log(this.Businessform,"this.Businessform")
  1139. updateOrgPhysicalDefenseConstruction(this.Businessform).then(
  1140. (response) => {
  1141. this.$modal.msgSuccess("编辑成功");
  1142. this.Businessopen = false;
  1143. this.getBusinessPhysicalDefenseConstructionInfo();
  1144. }
  1145. );
  1146. } else {
  1147. addOrgPhysicalDefenseConstruction(this.Businessform).then(
  1148. (response) => {
  1149. this.$modal.msgSuccess("新增成功");
  1150. this.Businessopen = false;
  1151. this.getBusinessPhysicalDefenseConstructionInfo();
  1152. }
  1153. );
  1154. }
  1155. this.Businessimgs = [];
  1156. } else {
  1157. // 表单验证未通过,显示错误信息
  1158. }
  1159. });
  1160. // this.$refs["Businessform"].validate((valid) => {
  1161. // if (valid) {
  1162. // }
  1163. // });
  1164. },
  1165. /** 删除按钮操作 */
  1166. handleBusinessDelete(row) {
  1167. const Businessids = row.id || this.Businessids;
  1168. this.$modal
  1169. .confirm("确认删除?")
  1170. .then(function () {
  1171. return delOrgPhysicalDefenseConstruction(Businessids);
  1172. })
  1173. .then(() => {
  1174. this.getBusinessPhysicalDefenseConstructionInfo();
  1175. this.$modal.msgSuccess("删除成功");
  1176. })
  1177. .catch(() => {
  1178. });
  1179. },
  1180. // resetimg(certificate){
  1181. // this.Bankform.certificate=0;
  1182. // },
  1183. // 取消按钮
  1184. Bankcancel() {
  1185. this.Bankopen = false;
  1186. this.Bankreset();
  1187. },
  1188. // 表单重置
  1189. Bankreset() {
  1190. this.Bankform = {
  1191. id: null,
  1192. standard: null,
  1193. dateOfCompliance: null,
  1194. certificateEvidence: null,
  1195. certificate: null,
  1196. evidence: null,
  1197. createTime: null,
  1198. updateTime: null,
  1199. createBy: null,
  1200. updateBy: null,
  1201. orgId: null,
  1202. };
  1203. this.reqmsg = false;
  1204. this.resetForm("Bankform");
  1205. },
  1206. // 多选框选中数据
  1207. handleBankSelectionChange(selection) {
  1208. this.Bankids = selection.map((item) => item.id);
  1209. this.single = selection.length !== 1;
  1210. this.multiple = !selection.length;
  1211. },
  1212. /** 新增按钮操作 */
  1213. handleBankAdd() {
  1214. this.Bankreset();
  1215. this.Bankopen = true;
  1216. this.Banktitle = "新增安全防范设施建设达标信息";
  1217. },
  1218. /** 编辑按钮操作 */
  1219. handleBankUpdate(row) {
  1220. this.Bankreset();
  1221. const id = row.id || this.Bankids;
  1222. getOrgPhysicalDefenseConstruction(id).then((response) => {
  1223. this.Bankform = response.data;
  1224. // this.Bankform.certificateEvidence=parseInt(response.data.certificateEvidence);
  1225. this.Bankopen = true;
  1226. this.Banktitle = "编辑安全防范设施建设达标信息";
  1227. });
  1228. },
  1229. /** 提交按钮 */
  1230. submitBankForm() {
  1231. if (this.Bankimgs.length > 0) {
  1232. this.Bankform.certificate =
  1233. this.Bankimgs[this.Bankimgs.length - 1].toString(",");
  1234. }
  1235. this.$refs.Bankform.validate((valid) => {
  1236. if (valid) {
  1237. // 表单验证通过,提交数据或执行其他操作
  1238. this.Bankform.orgId = this.$route.params.id;
  1239. this.Bankform.type = 3;
  1240. if (this.Bankform.id != null) {
  1241. updateOrgPhysicalDefenseConstruction(this.Bankform).then(
  1242. (response) => {
  1243. this.$modal.msgSuccess("编辑成功");
  1244. this.Bankopen = false;
  1245. this.getBankPhysicalDefenseConstructionInfo();
  1246. }
  1247. );
  1248. } else {
  1249. addOrgPhysicalDefenseConstruction(this.Bankform).then(
  1250. (response) => {
  1251. this.$modal.msgSuccess("新增成功");
  1252. this.Bankopen = false;
  1253. this.getBankPhysicalDefenseConstructionInfo();
  1254. }
  1255. );
  1256. }
  1257. this.Bankimgs = [];
  1258. } else {
  1259. // 表单验证未通过,显示错误信息
  1260. }
  1261. });
  1262. // this.$refs["Bankform"].validate((valid) => {
  1263. // if (valid) {
  1264. // }
  1265. // });
  1266. },
  1267. /** 删除按钮操作 */
  1268. handleBankDelete(row) {
  1269. const Bankids = row.id || this.Bankids;
  1270. this.$modal
  1271. .confirm("确认删除?")
  1272. .then(function () {
  1273. return delOrgPhysicalDefenseConstruction(Bankids);
  1274. })
  1275. .then(() => {
  1276. this.getBankPhysicalDefenseConstructionInfo();
  1277. this.$modal.msgSuccess("删除成功");
  1278. })
  1279. .catch(() => {
  1280. });
  1281. },
  1282. // 取消按钮
  1283. detachedcancel() {
  1284. this.detachedopen = false;
  1285. this.detachedreset();
  1286. },
  1287. // 表单重置
  1288. detachedreset() {
  1289. this.detachedform = {
  1290. id: null,
  1291. standard: null,
  1292. dateOfCompliance: null,
  1293. certificateEvidence: null,
  1294. certificate: null,
  1295. evidence: null,
  1296. createTime: null,
  1297. updateTime: null,
  1298. createBy: null,
  1299. updateBy: null,
  1300. orgId: null,
  1301. };
  1302. this.reqmsg = false;
  1303. this.resetForm("detachedform");
  1304. },
  1305. // 多选框选中数据
  1306. handledetachedSelectionChange(selection) {
  1307. this.detachedids = selection.map((item) => item.id);
  1308. this.single = selection.length !== 1;
  1309. this.multiple = !selection.length;
  1310. },
  1311. /** 新增按钮操作 */
  1312. handledetachedAdd() {
  1313. this.detachedreset();
  1314. this.detachedopen = true;
  1315. this.detachedtitle = "新增安全防范设施建设达标信息";
  1316. },
  1317. /** 编辑按钮操作 */
  1318. handledetachedUpdate(row) {
  1319. this.detachedreset();
  1320. const id = row.id || this.detachedids;
  1321. getOrgPhysicalDefenseConstruction(id).then((response) => {
  1322. this.detachedform = response.data;
  1323. // this.detachedform.certificateEvidence=parseInt(response.data.certificateEvidence);
  1324. this.detachedopen = true;
  1325. this.detachedtitle = "编辑安全防范设施建设达标信息";
  1326. });
  1327. },
  1328. canShowGA38() {
  1329. // console.log("canShowGA38",this.type ,this.type == '4' || this.type == '10' || this.type == '5')
  1330. // 4: 网点,5:离行 6 中心业务库 10 监控中心
  1331. if (this.type == '4' || this.type == '5'|| this.type=='6' || this.type == '10' ) {
  1332. return true;
  1333. }
  1334. return false;
  1335. },
  1336. /** 提交按钮 */
  1337. submitdetachedForm() {
  1338. if (this.detachedimgs.length > 0) {
  1339. this.detachedform.certificate =
  1340. this.detachedimgs[this.detachedimgs.length - 1].toString(",");
  1341. }
  1342. this.$refs.detachedform.validate((valid) => {
  1343. if (valid) {
  1344. // 表单验证通过,提交数据或执行其他操作
  1345. this.detachedform.orgId = this.$route.params.id;
  1346. this.detachedform.type = 4;
  1347. if (this.detachedform.id != null) {
  1348. updateOrgPhysicalDefenseConstruction(this.detachedform).then(
  1349. (response) => {
  1350. this.$modal.msgSuccess("编辑成功");
  1351. this.detachedopen = false;
  1352. this.getdetachedPhysicalDefenseConstructionInfo();
  1353. }
  1354. );
  1355. } else {
  1356. addOrgPhysicalDefenseConstruction(this.detachedform).then(
  1357. (response) => {
  1358. this.$modal.msgSuccess("新增成功");
  1359. this.detachedopen = false;
  1360. this.getdetachedPhysicalDefenseConstructionInfo();
  1361. }
  1362. );
  1363. }
  1364. this.detachedimgs = [];
  1365. } else {
  1366. // 表单验证未通过,显示错误信息
  1367. }
  1368. });
  1369. // this.$refs["detachedform"].validate((valid) => {
  1370. // if (valid) {
  1371. // }
  1372. // });
  1373. },
  1374. /** 删除按钮操作 */
  1375. handledetachedDelete(row) {
  1376. const detachedids = row.id || this.detachedids;
  1377. this.$modal
  1378. .confirm("确认删除?")
  1379. .then(function () {
  1380. return delOrgPhysicalDefenseConstruction(detachedids);
  1381. })
  1382. .then(() => {
  1383. this.getdetachedPhysicalDefenseConstructionInfo();
  1384. this.$modal.msgSuccess("删除成功");
  1385. })
  1386. .catch(() => {
  1387. });
  1388. },
  1389. // 表单重置
  1390. orgreset() {
  1391. this.orgform = {
  1392. id: null,
  1393. standard: null,
  1394. dateOfCompliance: null,
  1395. dateOfComplete: null,
  1396. certificateEvidence: 0,
  1397. certificate: null,
  1398. evidence: null,
  1399. createTime: null,
  1400. updateTime: null,
  1401. createBy: null,
  1402. updateBy: null,
  1403. orgId: null,
  1404. };
  1405. this.reqmsg = false;
  1406. this.resetForm("orgform");
  1407. },
  1408. // 取消按钮
  1409. orgcancel() {
  1410. console.log(this.orgform.certificate, 123123);
  1411. console.log(this.orgimgs, '123123');
  1412. this.orgopen = false;
  1413. this.orgform.certificate = null;
  1414. this.orgimgs = null;
  1415. this.orgreset();
  1416. },
  1417. // 多选框选中数据
  1418. handleOrgSelectionChange(selection) {
  1419. this.orgids = selection.map((item) => item.id);
  1420. this.single = selection.length !== 1;
  1421. this.multiple = !selection.length;
  1422. },
  1423. /** 新增按钮操作 */
  1424. handleOrgAdd() {
  1425. this.orgreset();
  1426. this.orgopen = true;
  1427. this.orgtitle = "新增安全防范设施建设达标信息";
  1428. },
  1429. /** 编辑按钮操作 */
  1430. handleOrgUpdate(row) {
  1431. this.orgreset();
  1432. const id = row.id || this.orgids;
  1433. getOrgPhysicalDefenseConstruction(id).then((response) => {
  1434. this.orgform = response.data;
  1435. this.orgopen = true;
  1436. this.orgtitle = "编辑安全防范设施建设达标信息";
  1437. });
  1438. },
  1439. /** 提交按钮 */
  1440. submitOrgForm() {
  1441. console.log(this.orgform.certificate, 'this.orgform.certificate')
  1442. if (this.orgform.certificate > 0) {
  1443. //this.orgform.certificate = this.orgimgs[this.orgimgs.length - 1].toString(",");
  1444. }
  1445. // if(!this.orgform.certificate && this.orgform.standard !== '3'){
  1446. // this.$modal.alertError("请上传证书");
  1447. // return;
  1448. // }
  1449. //certificate
  1450. this.$refs.orgform.validate((valid) => {
  1451. if (valid) {
  1452. if (this.orgform.standard !== '3' && (this.orgform.certificate == null || this.orgform.certificate == 0)) {
  1453. this.$modal.alertError("请上传证书");
  1454. return;
  1455. }
  1456. // 表单验证通过,提交数据或执行其他操作
  1457. this.orgform.orgId = this.$route.params.id;
  1458. // this.orgform.type = 1;
  1459. if (this.orgform.id != null) {
  1460. updateOrgPhysicalDefenseConstruction(this.orgform).then(
  1461. (response) => {
  1462. this.$modal.msgSuccess("编辑成功");
  1463. this.orgopen = false;
  1464. this.getOrgPhysicalDefenseConstructionInfo();
  1465. }
  1466. );
  1467. } else {
  1468. addOrgPhysicalDefenseConstruction(this.orgform).then((response) => {
  1469. this.$modal.msgSuccess("新增成功");
  1470. this.orgopen = false;
  1471. this.getOrgPhysicalDefenseConstructionInfo();
  1472. });
  1473. }
  1474. this.orgimgs = [];
  1475. } else {
  1476. // 表单验证未通过,显示错误信息
  1477. }
  1478. });
  1479. },
  1480. /** 删除按钮操作 */
  1481. handleOrgDelete(row) {
  1482. const orgids = row.id || this.orgids;
  1483. this.$modal
  1484. .confirm("确认删除?")
  1485. .then(function () {
  1486. return delOrgPhysicalDefenseConstruction(orgids);
  1487. })
  1488. .then(() => {
  1489. this.getOrgPhysicalDefenseConstructionInfo();
  1490. this.$modal.msgSuccess("删除成功");
  1491. })
  1492. .catch(() => {
  1493. });
  1494. },
  1495. saveExtend() {
  1496. if (!this.validBeforeSaveExtend()) {
  1497. return;
  1498. }
  1499. let dat = {
  1500. safeBox: this.safeBox ? 1 : 0,
  1501. innerCount: this.innerCount,
  1502. outsideCount: this.outsideCount,
  1503. cashAddingRoom: this.cashAddingRoom,
  1504. orgType: this.orgType,
  1505. remoteCount: this.remoteCount,
  1506. weatherAreaCode: this.weatherAreaCode,
  1507. askariCertificate:this.askariCertificate,
  1508. // this.imgs.length > 0
  1509. // ? this.imgs[this.imgs.length - 1].toString(",")
  1510. // : null,
  1511. premisesArea: this.premisesArea,
  1512. ownership: this.ownership,
  1513. outsideArea: this.outsideArea,
  1514. askari: this.askari ? 1 : 0,
  1515. businessLibraryType: this.businessLibraryType,
  1516. dutyMode: this.dutyMode,
  1517. remoteControl: this.remoteControl ? 1 : 0,
  1518. selfServiceBank: this.selfServiceBank ? 1 : 0,
  1519. businessLibrary: this.businessLibrary ? 1 : 0,
  1520. lobbyEquipment: this.lobbyEquipment,
  1521. wallPenetratingEquipment: this.wallPenetratingEquipment,
  1522. platformBrand: this.platformBrand,
  1523. platformSupplierBrand: this.platformSupplierBrand,
  1524. constructionTime: this.constructionTime,
  1525. lastUpdateTime: this.lastUpdateTime,
  1526. orgId: this.$route.params.id,
  1527. id: this.extendId,
  1528. detachedLobbyEquipment: this.detachedLobbyEquipment,
  1529. detachedWallPenetratingEquipment: this.detachedWallPenetratingEquipment,
  1530. cashAddingRoomRemoteControl: this.cashAddingRoomRemoteControl,
  1531. hdCameraCount: this.hdCameraCount,
  1532. totalCameraCount: this.totalCameraCount,
  1533. };
  1534. // console.log(dat);
  1535. if (this.extendId) {
  1536. updateExtend(dat).then((res) => {
  1537. this.$modal.msgSuccess("保存成功");
  1538. // this.$router.go(-1);
  1539. this.$tab.closePageAndPushPrev();
  1540. });
  1541. } else {
  1542. addExtend(dat).then((res) => {
  1543. this.$modal.msgSuccess("保存成功");
  1544. // this.$router.go(-1);
  1545. this.$tab.closePageAndPushPrev();
  1546. });
  1547. }
  1548. },
  1549. validBeforeSaveExtend() {
  1550. if (this.weatherAreaCode == null) {
  1551. this.$modal.msgError("气象行政区域不能为空,请选择气象行政区域");
  1552. return false;
  1553. }
  1554. if (this.type === this.org_type.yewd && this.ownership == null) {
  1555. this.$modal.msgError("产权类型不能为空,请选择产权类型");
  1556. return false;
  1557. }
  1558. if (this.type === this.org_type.yewd && this.outsideArea == null) {
  1559. this.$modal.msgError("所在位置不能为空,请选择所在位置");
  1560. return false;
  1561. }
  1562. if (this.type === this.org_type.yewd && this.dutyMode == null) {
  1563. this.$modal.msgError("夜间值守不能为空,请选择夜间值守方式");
  1564. return false;
  1565. }
  1566. if (this.type === this.org_type.yewd && this.safeBox == null) {
  1567. this.$modal.msgError("是否设立保管箱库不能为空,请选择是否设立保管箱库");
  1568. return false;
  1569. }
  1570. if (this.type === this.org_type.yewd && this.selfServiceBank == null) {
  1571. this.$modal.msgError("是否设立在行式自助银行不能为空,请选择是否设立在行式自助银行");
  1572. return false;
  1573. }
  1574. if (this.type === this.org_type.yewd && this.wallPenetratingEquipment==null) {
  1575. this.$modal.msgError("穿墙式设备数量不能为空,请输入穿墙式设备数量");
  1576. return false;
  1577. }
  1578. if (this.type === this.org_type.yewd && this.lobbyEquipment==null) {
  1579. this.$modal.msgError("大堂设备数量不能为空,请输入大堂设备数量");
  1580. return false;
  1581. }
  1582. if (this.type === this.org_type.yewd &&this.businessLibrary==null) {
  1583. this.$modal.msgError("是否设立网点业务库不能为空,请设置是否设立网点业务库");
  1584. return false;
  1585. }
  1586. if (this.type === this.org_type.yewd && this.businessLibrary===1&&this.businessLibraryType==null) {
  1587. this.$modal.msgError("业务库类型不能为空,请选择业务库类型");
  1588. return false;
  1589. }
  1590. if ((this.type === this.org_type.jkzx)&&this.businessLibrary===1&&this.remoteControl==null) {
  1591. this.$modal.msgError("出入口远程控制与授权不能为空,请选择出入口远程控制与授权");
  1592. return false;
  1593. }
  1594. if ((this.type === this.org_type.jkzx)&&this.cashAddingRoom==null) {
  1595. this.$modal.msgError("离行式加钞间出入口数量不能为空,请输入离行式加钞间出入口数量");
  1596. return false;
  1597. }
  1598. if ((this.type === this.org_type.jkzx || this.type === this.org_type.yewd || this.type === this.org_type.zxywk)&&this.businessLibrary==1&&this.remoteCount==null) {
  1599. this.$modal.msgError("业务库防控隔离门出入口数量不能为空,请输入业务库防控隔离门出入口数量");
  1600. return false;
  1601. }
  1602. if ((this.type === this.org_type.yewd)&&this.askari==null) {
  1603. this.$modal.msgError("是否配备保安人员不能为空,请选择是否配备保安人员");
  1604. return false;
  1605. }
  1606. if ((this.type === this.org_type.yewd)&&this.askari==1&& !this.innerCount && !this.outsideCount) {
  1607. this.$modal.msgError("网点配备保安人员为“是”,内部保安人数与外聘保安人数不可均为0,请修改");
  1608. return false;
  1609. }
  1610. // if ((this.type === this.org_type.yewd)&&this.askari==1&&this.innerCount==null) {
  1611. // this.$modal.msgError("内部保安人数不能为空,请输入内部保安人数");
  1612. // return false;
  1613. // }
  1614. // if ((this.type === this.org_type.yewd)&&this.askari==1&&this.outsideCount==null) {
  1615. // this.$modal.msgError("外聘保安人数不能为空,请输入外聘保安人数");
  1616. // return false;
  1617. // }
  1618. if ((this.type === this.org_type.yewd)&&this.askari==1&& this.isAskariCertificate==null) {
  1619. this.$modal.msgError("是否取得保安证书不能为空,请选择是否取得保安证书");
  1620. return false;
  1621. }
  1622. if ((this.type === this.org_type.yewd)&&this.askari==1&&this.isAskariCertificate==1&&this.askariCertificate==null) {
  1623. this.$modal.msgError("保安人员证书不能为空,请上传保安人员证书");
  1624. return false;
  1625. }
  1626. return true;
  1627. },
  1628. nosaveExtend() {
  1629. // this.$router.go(-1);
  1630. this.$tab.closePageAndPushPrev();
  1631. },
  1632. triggerFileInput() {
  1633. this.$refs.fileInput.click();
  1634. },
  1635. async handleFileChange(event) {
  1636. const file = event.target.files[0];
  1637. if (!file) return;
  1638. // // 发送文件到您的文件上传 API
  1639. try {
  1640. uploadFile(file, "org").then((res) => {
  1641. console.log(res);
  1642. // this.orgform.certificateEvidence = res.data;
  1643. });
  1644. // 处理上传成功的逻辑
  1645. console.log("上传成功");
  1646. } catch (error) {
  1647. // 处理上传失败的逻辑
  1648. console.log("上传失败");
  1649. }
  1650. event.target.value = "";
  1651. },
  1652. }
  1653. };
  1654. </script>
  1655. <style scoped lang="scss">
  1656. /*.org-extend{
  1657. background-color: #fff;
  1658. padding: 10px;
  1659. }*/
  1660. .title {
  1661. font-size: 18px;
  1662. text-align: left;
  1663. color: #008cd6;
  1664. height: 36px;
  1665. line-height: 36px;
  1666. padding-left: 8px;
  1667. margin: 0;
  1668. }
  1669. .info-box {
  1670. margin: 20px;
  1671. }
  1672. .demo-form-inline {
  1673. }
  1674. .dialog-footer {
  1675. }
  1676. .container {
  1677. }
  1678. .zoom-image {
  1679. transition: transform 0.3s ease;
  1680. }
  1681. .zoom-image:hover {
  1682. transform: scale(1.02);
  1683. }
  1684. .border-color-change {
  1685. border: 1px solid #ccc;
  1686. transition: border-color 0.3s ease;
  1687. }
  1688. .border-color-change:hover {
  1689. border-color: #1ea8e9;
  1690. /* 您可以将此颜色更改为所需的颜色 */
  1691. }
  1692. .extend_mod {
  1693. background-color: #fff;
  1694. padding: 1px 15px 1px 15px;
  1695. margin-bottom: 2px;
  1696. -webkit-box-shadow: 0 2px 8px #ccc;
  1697. box-shadow: 0 2px 8px #ccc;
  1698. }
  1699. .el-table thead > tr > th {
  1700. background-color: #fafafa !important;
  1701. }
  1702. .el-row {
  1703. margin-bottom: 20px;
  1704. &:last-child {
  1705. margin-bottom: 0;
  1706. }
  1707. }
  1708. .el-col {
  1709. border-radius: 4px;
  1710. }
  1711. .bg-purple-dark {
  1712. background: #99a9bf;
  1713. }
  1714. .bg-purple {
  1715. background: #d3dce6;
  1716. }
  1717. .bg-purple-light {
  1718. background: #e5e9f2;
  1719. }
  1720. .grid-content {
  1721. border-radius: 4px;
  1722. min-height: 36px;
  1723. }
  1724. .row-bg {
  1725. padding: 10px 0;
  1726. background-color: #f9fafc;
  1727. }
  1728. </style>