extend.vue 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742
  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" class="margin-top" :column="3" size="medium" border>
  212. <el-descriptions-item label="穿墙式设备" v-if="this.selfServiceBank==1" 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="大堂式设备" v-if="this.selfServiceBank==1"
  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 || type === org_type.lhzz" :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 dict.type.org_extend_type"
  436. :key="dict.value"
  437. :label="dict.label"
  438. :value="dict.value"
  439. />
  440. </el-select>
  441. </el-form-item>
  442. <el-form-item label="GA38标准" prop="standard">
  443. <el-select
  444. prop="planType"
  445. label="标准"
  446. v-model="orgform.standard"
  447. placeholder="请选择标准"
  448. clearable
  449. >
  450. <el-option
  451. v-for="dict in dict.type.org_extend_standard"
  452. :key="dict.value"
  453. :label="dict.label"
  454. :value="dict.value"
  455. />
  456. </el-select>
  457. </el-form-item>
  458. <el-form-item v-show="orgform.standard === '2' || orgform.standard === '1'" label="达标日期"
  459. prop="dateOfCompliance">
  460. <el-date-picker
  461. clearable
  462. v-model="orgform.dateOfCompliance"
  463. type="date"
  464. value-format="yyyy-MM-dd HH:mm:ss"
  465. placeholder="请选择达标日期"
  466. >
  467. </el-date-picker>
  468. </el-form-item>
  469. <el-form-item v-show="orgform.standard === '3'" label="计划达标日期">
  470. <el-date-picker
  471. clearable
  472. v-model="orgform.dateOfComplete"
  473. type="date"
  474. value-format="yyyy-MM-dd"
  475. placeholder="请选择计划达标日期"
  476. >
  477. </el-date-picker>
  478. </el-form-item>
  479. <el-form-item v-show="orgform.standard === '3'" label="未达标原因">
  480. <el-input type="textarea" rows="5" v-model="orgform.reason" placeholder="请输入未达标原因"/>
  481. </el-form-item>
  482. <el-form-item label="上传证书" v-show="orgform.standard !== '3'" prop="certificate">
  483. <div class="image-container" style="margin-left: 20px">
  484. <p style="font-size: 12px; color: #999">上传安全防范设施合格证</p>
  485. <!-- <image-upload
  486. :limit="5"
  487. :fileSize="5"
  488. :value="orgform.certificate"
  489. @input="uploadorgSuccess"
  490. ></image-upload> -->
  491. <imgs-upload :limit="5" v-model="orgform.certificate" :fileSize="5"></imgs-upload>
  492. </div>
  493. </el-form-item>
  494. <el-form-item v-if="false" label="机构id" prop="orgId">
  495. <el-input v-model="orgform.orgId" placeholder="请输入机构id"/>
  496. </el-form-item>
  497. </el-form>
  498. <div slot="footer" class="dialog-footer">
  499. <el-button type="primary" @click="submitOrgForm">确 定</el-button>
  500. <el-button @click="orgcancel">取 消</el-button>
  501. </div>
  502. </DialogCom>
  503. <div slot="footer" class="dialog-footer" style="height: 50px"></div>
  504. <el-image-viewer
  505. v-if="imageViewer"
  506. :on-close="closeImgViewer"
  507. :url-list="srcList"
  508. />
  509. </div>
  510. </template>
  511. <script>
  512. import ImgsUpload from "@/components/ImgsUpload";
  513. import uploadpng from "@/assets/images/upload.png";
  514. import uplpng from "@/assets/images/upl.png";
  515. import request from "@/utils/request";
  516. import {statusOptions, getLabel} from "./../../commonOption";
  517. import {
  518. listExtend,
  519. getExtend,
  520. addExtend,
  521. updateExtend,
  522. delExtend,
  523. getExtendByOrgId,
  524. uploadFile,
  525. } from "@/api/system/extend";
  526. import {
  527. listDept,
  528. getDept,
  529. delDept,
  530. addDept,
  531. updateDept,
  532. listDeptExcludeChild,
  533. } from "@/api/system/dept";
  534. import {
  535. listOrgPhysicalDefenseConstruction,
  536. getOrgPhysicalDefenseConstruction,
  537. addOrgPhysicalDefenseConstruction,
  538. updateOrgPhysicalDefenseConstruction,
  539. delOrgPhysicalDefenseConstruction,
  540. } from "@/api/system/OrgPhysicalDefenseConstruction";
  541. import {selectCityInfoVoList} from "@/api/core/weather";
  542. import TreeNodeDialogVue from "../../tool/build/TreeNodeDialog.vue";
  543. export default {
  544. dicts: [
  545. "duty_options",
  546. "sys_org_type",
  547. "org_platform_brand",
  548. "org_platform_supplier_brand",
  549. "org_extend_type",
  550. "business_library_type",
  551. "reality_org_type",
  552. "org_extend_standard",
  553. "org_extend_business_library_standard",
  554. "org_extend_self_service_bank_standard",
  555. "org_extend_detached_standard",
  556. "org_extend_is",
  557. "property_situation",
  558. ],
  559. fillter: {},
  560. components: {
  561. ImgsUpload,
  562. "el-image-viewer": () =>
  563. import("element-ui/packages/image/src/image-viewer"),
  564. },
  565. props: [],
  566. data() {
  567. let formatRule = function (rule, value, callback) {
  568. console.log(value, "value");
  569. if (!value.length) {
  570. callback(new Error("证书为必填项"));
  571. } else {
  572. callback();
  573. }
  574. };
  575. return {
  576. //内容样式
  577. contentStyle: {
  578. 'text-align': 'left',
  579. 'width': '300px'
  580. },
  581. //label样式
  582. labelStyle: { 'width': '200px' }
  583. ,
  584. org_type: {
  585. jkzx: '10',
  586. yewd: '4',
  587. lhzz: '5',
  588. zxywk: '6',
  589. },
  590. reqmsg: false,
  591. imageViewer: false,
  592. //表单验证
  593. rules: {
  594. type: [{required: true, message: "请选择机构类型", trigger: "change"}],
  595. standard: [{required: true, message: "请选择标准", trigger: "change"}],
  596. //certificate: [{required: true, message: "请选择上传证书", trigger: "change"}],
  597. },
  598. remoteCountoptions: [
  599. {label: "0", value: 0},
  600. {label: "1", value: 1},
  601. {label: "2", value: 2},
  602. {label: "3", value: 3},
  603. ],
  604. cashAddingRoomoptions: [
  605. {label: "0", value: 0},
  606. {label: "1", value: 1},
  607. {label: "2", value: 2},
  608. {label: "3", value: 3},
  609. ],
  610. //基础信息key
  611. infoKeys: [
  612. {label: "机构名称", key: "name"},
  613. {label: "机构简称", key: "shortName"},
  614. {label: "机构地址", key: "address"},
  615. {label: "排序号", key: "sort"},
  616. {label: "更新时间", key: "updateTime"},
  617. {label: "同步时间", key: "createTime"},
  618. ],
  619. innerCount: 0,
  620. outsideCount: 0,
  621. safeBox: null,
  622. remoteCount: 0,
  623. cashAddingRoom: 0,
  624. type: null,
  625. isLock: null,
  626. dataInfo: [],
  627. //机构补充信息
  628. extendId: null,
  629. orgType: null,
  630. weatherAreaCode: null,
  631. premisesArea: null,
  632. ownership: null,
  633. outsideArea: null,
  634. askari: null,
  635. businessLibrary: null,
  636. businessLibraryType: null,
  637. dutyMode: null,
  638. remoteControl: null,
  639. selfServiceBank: null,
  640. lobbyEquipment: 0,
  641. wallPenetratingEquipment: 0,
  642. platformBrand: null,
  643. platformSupplierBrand: null,
  644. constructionTime: null,
  645. lastUpdateTime: null,
  646. detachedLobbyEquipment: null,
  647. detachedWallPenetratingEquipment: null,
  648. cashAddingRoomRemoteControl: null,
  649. source: null,
  650. //是否取得保安证书
  651. isAskariCertificate: null,
  652. askariCertificate: null,
  653. hdCameraCount: 0,
  654. totalCameraCount: 0,
  655. certificate: null,
  656. //机构建设数据
  657. // 遮罩层
  658. orgloading: true,
  659. businessloading: true,
  660. // 选中数组
  661. orgids: [],
  662. // 选中数组
  663. Bankids: [],
  664. Businessids: [],
  665. // 非单个停用
  666. single: true,
  667. // 非多个停用
  668. multiple: true,
  669. // 显示搜索条件
  670. showSearch: true,
  671. // 总条数
  672. total: 0,
  673. // 机构物防建设表格数据
  674. constructionList: [],
  675. // 银行物防建设表格数据
  676. BankPhysicalDefenseConstructionList: [],
  677. detachedPhysicalDefenseConstructionList: [],
  678. BusinessPhysicalDefenseConstructionList: [],
  679. // 弹出层标题
  680. orgtitle: "",
  681. Businesstitle: "",
  682. // 弹出层标题
  683. Banktitle: "",
  684. detachedtitle: "",
  685. detachedloading: false,
  686. // 是否显示弹出层
  687. Bankopen: false,
  688. detachedopen: false,
  689. //图片预览
  690. openUrl: null,
  691. srcList: [],
  692. openTitle: null,
  693. openVisible: false,
  694. // 表单参数
  695. Bankform: {},
  696. detachedform: {},
  697. Businessform: {},
  698. // 是否显示弹出层
  699. Businessopen: false,
  700. orgopen: false,
  701. // 表单参数
  702. orgform: {},
  703. //2个图片信息
  704. uploadp: uploadpng,
  705. uplp: uplpng,
  706. //下拉框生成信息
  707. orgTypes: [
  708. {label: "营业网点", value: 0},
  709. {label: "在行式自助银行", value: 1},
  710. {label: "离行式自助银行", value: 2},
  711. {label: "中心业务库", value: 3},
  712. {label: "网点业务库", value: 4},
  713. {label: "保管箱库", value: 5},
  714. {label: "监控中心", value: 6},
  715. ],
  716. businessLibraryTypes: {
  717. businessLibraryTyp1: {label: "1类业务库", value: 1},
  718. businessLibraryTyp2: {label: "2类业务库", value: 2},
  719. businessLibraryTyp3: {label: "3类业务库", value: 3},
  720. },
  721. platformBrands: {
  722. platformBrand1: {label: "品牌1", value: 0},
  723. platformBrand2: {label: "品牌2", value: 1},
  724. },
  725. platformSupplierBrands: {
  726. platformSupplierBrand1: {label: "品牌1", value: 0},
  727. platformSupplierBrand2: {label: "品牌2", value: 1},
  728. },
  729. prop: "",
  730. propItem: "",
  731. row: "",
  732. areaList: [],
  733. imgs: [],
  734. Businessimgs: [],
  735. Bankimgs: [],
  736. orgimgs: [],
  737. detachedimgs: [],
  738. };
  739. },
  740. computed: {
  741. getLabels() {
  742. return function (value) {
  743. const option = this.orgTypes.filter((item) => item.value == value);
  744. // console.log(option[0].label,"option")
  745. return option ? option[0].label : "";
  746. };
  747. },
  748. switchModel: {
  749. get() {
  750. return this.switchValue === 1; // 将0转换为false,1转换为true
  751. },
  752. set(value) {
  753. this.switchValue = value ? 1 : 0; // 将false转换为0,true转换为1
  754. },
  755. },
  756. },
  757. watch: {
  758. "detachedform.certificateEvidence"(newValue) {
  759. if (
  760. newValue === 1 &&
  761. this.detachedform.certificate == null &&
  762. this.detachedimgs.length == 0
  763. ) {
  764. this.reqmsg = true;
  765. }
  766. if (newValue === 0) {
  767. this.reqmsg = false;
  768. }
  769. },
  770. "Bankform.certificateEvidence"(newValue) {
  771. // console.log(this.Bankimgs.length,"this.imgs")
  772. // console.log(this.Bankform.certificate,"Bankform.certificate")
  773. if (
  774. newValue === 1 &&
  775. this.Bankform.certificate == null &&
  776. this.Bankimgs.length == 0
  777. ) {
  778. this.reqmsg = true;
  779. }
  780. if (newValue === 0) {
  781. this.reqmsg = false;
  782. }
  783. },
  784. "Businessform.certificateEvidence"(newValue) {
  785. if (
  786. newValue === 1 &&
  787. this.Businessform.certificate == null &&
  788. this.Businessimgs.length === 0
  789. ) {
  790. this.reqmsg = true;
  791. }
  792. if (newValue === 0) {
  793. this.reqmsg = false;
  794. }
  795. },
  796. "orgform.certificateEvidence"(newValue) {
  797. if (
  798. newValue === 1 &&
  799. this.orgform.certificate == null &&
  800. this.orgimgs.length === 0
  801. ) {
  802. this.reqmsg = true;
  803. }
  804. if (newValue === 0) {
  805. this.reqmsg = false;
  806. }
  807. },
  808. selfServiceBank(newValue){
  809. if (newValue==0){
  810. this.wallPenetratingEquipment=null;
  811. this.lobbyEquipment=null;
  812. }
  813. },
  814. businessLibrary(newValue){
  815. if (newValue==0){
  816. this.businessLibraryType=null;
  817. }
  818. },
  819. askari(newValue){
  820. if (newValue==0){
  821. this.innerCount=null;
  822. this.outsideCount=null;
  823. this.isAskariCertificate=null;
  824. this.askariCertificate=null;
  825. }
  826. },
  827. },
  828. created() {
  829. this.getOrgInfo();
  830. this.getExtendInfo();
  831. this.getOrgPhysicalDefenseConstructionInfo();
  832. this.getBankPhysicalDefenseConstructionInfo();
  833. this.getBusinessPhysicalDefenseConstructionInfo();
  834. this.getdetachedPhysicalDefenseConstructionInfo();
  835. this.getAreaList();
  836. },
  837. mounted() {
  838. },
  839. methods: {
  840. closePictrue() {
  841. this.orgform.certificate = null;
  842. },
  843. closeImgViewer() {
  844. this.imageViewer = false;
  845. this.srcList = [];
  846. },
  847. isreq(rule, value, callback) {
  848. if (this.reqmsg) {
  849. callback(new Error("证书为必填项"));
  850. } else {
  851. callback();
  852. }
  853. },
  854. getImgUrl(img) {
  855. this.imgs.push(img);
  856. console.log(this.imgs, "imgs");
  857. },
  858. getAreaList() {
  859. selectCityInfoVoList({}).then((response) => {
  860. this.areaList = response.data;
  861. });
  862. },
  863. selectArea(value) {
  864. this.weatherAreaCode = value[1];
  865. },
  866. downBusiness(file) {
  867. let array = file.split(",");
  868. this.openTitle = "证书";
  869. this.openUrl = array[0];
  870. this.srcList = array;
  871. this.openVisible = true;
  872. this.imageViewer = true;
  873. // for (let i = 0; i < array.length; i++) {
  874. // window.open(array[i]);
  875. // }
  876. },
  877. //证书上传
  878. uploadBusinessSuccess(img) {
  879. this.Businessimgs.push(img);
  880. this.reqmsg = false;
  881. },
  882. uploadBankSuccess(img) {
  883. this.Bankimgs.push(img);
  884. this.reqmsg = false;
  885. },
  886. uploadorgSuccess(img) {
  887. this.orgimgs.push(img);
  888. this.reqmsg = false;
  889. },
  890. uploaddetachedSuccess(img) {
  891. this.detachedimgs.push(img);
  892. this.reqmsg = false;
  893. },
  894. handleInput() {
  895. // 使用正则表达式过滤输入,只保留数字和小数点
  896. // this.premisesArea = this.premisesArea.replace(/[^0-9.]/g, "");
  897. // 限制只能输入1到999999之间的数字
  898. let value = parseInt(this.premisesArea, 10); // 将输入的值转为整数
  899. if (isNaN(value) || value < 1 || value > 999999) {
  900. // 判断是否在范围内
  901. this.premisesArea = ""; // 不在范围内则清空输入的值
  902. } else {
  903. this.premisesArea = value.toString(); // 在范围内则保留输入的值
  904. }
  905. },
  906. handleInput2() {
  907. // 使用正则表达式过滤输入,只保留数字和小数点
  908. this.weatherAreaCode = this.weatherAreaCode.replace(/[^a-zA-Z0-9]/g, "");
  909. },
  910. request() {
  911. },
  912. handleChange(value) {
  913. },
  914. getOrgInfo() {
  915. getDept(this.$route.params.id).then((data) => {
  916. // console.log(data.data);
  917. if (!data.data) return;
  918. let res = data.data;
  919. this.dataInfo = this.infoKeys.map((v, i) => {
  920. // console.log(v, res[v.key], "vvvvv");
  921. v.value = res[v.key];
  922. return v;
  923. });
  924. this.type = data.data.type;
  925. this.isLock = data.data.isLock;
  926. this.source = data.data.source;
  927. // console.log(this.dataInfo, "info");
  928. });
  929. },
  930. getExtendInfo() {
  931. getExtendByOrgId(this.$route.params.id).then((data) => {
  932. console.log(data.data);
  933. if (data.data != null) {
  934. this.safeBox = data.data.safeBox;
  935. this.innerCount = data.data.innerCount;
  936. this.outsideCount = data.data.outsideCount;
  937. this.cashAddingRoom = data.data.cashAddingRoom;
  938. this.remoteCount = data.data.remoteCount;
  939. this.orgType = data.data.orgType;
  940. this.weatherAreaCode = data.data.weatherAreaCode;
  941. this.premisesArea = data.data.premisesArea;
  942. this.ownership = data.data.ownership;
  943. this.outsideArea = data.data.outsideArea;
  944. this.askari = data.data.askari;
  945. this.remoteControl = data.data.remoteControl;
  946. this.selfServiceBank = data.data.selfServiceBank;
  947. this.businessLibrary = data.data.businessLibrary;
  948. this.lobbyEquipment = data.data.lobbyEquipment;
  949. this.wallPenetratingEquipment = data.data.wallPenetratingEquipment;
  950. this.askariCertificate = data.data.askariCertificate;
  951. if (this.askariCertificate){
  952. this.isAskariCertificate=1;
  953. }else {
  954. this.isAskariCertificate=0;
  955. }
  956. this.extendId = data.data.id;
  957. this.constructionTime = data.data.constructionTime;
  958. this.lastUpdateTime = data.data.lastUpdateTime;
  959. this.platformBrand = data.data.platformBrand;
  960. this.platformSupplierBrand = data.data.platformSupplierBrand;
  961. this.businessLibraryType = data.data.businessLibraryType;
  962. this.dutyMode = data.data.dutyMode;
  963. this.detachedLobbyEquipment = data.data.detachedLobbyEquipment;
  964. this.detachedWallPenetratingEquipment =
  965. data.data.detachedWallPenetratingEquipment;
  966. this.cashAddingRoomRemoteControl =
  967. data.data.cashAddingRoomRemoteControl;
  968. this.hdCameraCount = data.data.hdCameraCount ? data.data.hdCameraCount : 0;
  969. this.totalCameraCount = data.data.totalCameraCount ? data.data.totalCameraCount : 0;
  970. // if (
  971. // this.askariCertificate &&
  972. // this.askariCertificate.trim() &&
  973. // this.askariCertificate.includes(",")
  974. // ) {
  975. // this.imgs = this.askariCertificate.split(",");
  976. // } else if (
  977. // this.askariCertificate &&
  978. // this.askariCertificate.trim() &&
  979. // this.askariCertificate.includes(".")
  980. // ) {
  981. // this.imgs.push(this.askariCertificate);
  982. // }
  983. // console.log(this.extendId);
  984. }
  985. });
  986. },
  987. getLabel(options, value) {
  988. return getLabel(options, value);
  989. },
  990. getOrgPhysicalDefenseConstructionInfo() {
  991. this.orgloading = true;
  992. let dat = {orgId: this.$route.params.id};
  993. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  994. console.log("机构信息获取成功");
  995. this.constructionList = data.rows;
  996. this.orgloading = false;
  997. });
  998. },
  999. getBankPhysicalDefenseConstructionInfo() {
  1000. this.bankloading = true;
  1001. let dat = {orgId: this.$route.params.id, type: 3};
  1002. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  1003. // console.log(data);
  1004. this.BankPhysicalDefenseConstructionList = data.rows;
  1005. this.bankloading = false;
  1006. });
  1007. },
  1008. getdetachedPhysicalDefenseConstructionInfo() {
  1009. this.detachedloading = true;
  1010. let dat = {orgId: this.$route.params.id, type: 4};
  1011. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  1012. // console.log(data);
  1013. this.detachedPhysicalDefenseConstructionList = data.rows;
  1014. this.detachedloading = false;
  1015. });
  1016. },
  1017. getBusinessPhysicalDefenseConstructionInfo() {
  1018. this.businessloading = true;
  1019. let dat = {orgId: this.$route.params.id, type: 2};
  1020. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  1021. // console.log(data);
  1022. this.BusinessPhysicalDefenseConstructionList = data.rows;
  1023. this.businessloading = false;
  1024. });
  1025. },
  1026. // 取消按钮
  1027. Businesscancel() {
  1028. this.Businessopen = false;
  1029. this.Businessreset();
  1030. },
  1031. // 表单重置
  1032. Businessreset() {
  1033. this.Businessform = {
  1034. id: null,
  1035. standard: null,
  1036. dateOfCompliance: null,
  1037. certificateEvidence: null,
  1038. certificate: null,
  1039. evidence: null,
  1040. createTime: null,
  1041. updateTime: null,
  1042. createBy: null,
  1043. updateBy: null,
  1044. orgId: null,
  1045. };
  1046. this.reqmsg = false;
  1047. this.resetForm("Businessform");
  1048. },
  1049. // 多选框选中数据
  1050. handleBusinessSelectionChange(selection) {
  1051. this.Businessids = selection.map((item) => item.id);
  1052. this.single = selection.length !== 1;
  1053. this.multiple = !selection.length;
  1054. },
  1055. /** 新增按钮操作 */
  1056. handleBusinessAdd() {
  1057. this.Businessreset();
  1058. this.Businessopen = true;
  1059. this.Businesstitle = "新增安全防范设施建设达标信息";
  1060. },
  1061. /** 编辑按钮操作 */
  1062. handleBusinessUpdate(row) {
  1063. this.Businessreset();
  1064. const id = row.id || this.Businessids;
  1065. getOrgPhysicalDefenseConstruction(id).then((response) => {
  1066. // console.log(response.data,"response.data")
  1067. this.Businessform = response.data;
  1068. // this.Businessform.certificateEvidence=parseInt(response.data.certificateEvidence);
  1069. this.Businessopen = true;
  1070. this.Businesstitle = "编辑安全防范设施建设达标信息";
  1071. });
  1072. },
  1073. /** 提交按钮 */
  1074. submitBusinessForm() {
  1075. if (this.Businessimgs.length > 0) {
  1076. this.Businessform.certificate =
  1077. this.Businessimgs[this.Businessimgs.length - 1].toString(",");
  1078. }
  1079. this.$refs.Businessform.validate((valid) => {
  1080. if (valid) {
  1081. // 表单验证通过,提交数据或执行其他操作
  1082. this.Businessform.orgId = this.$route.params.id;
  1083. this.Businessform.type = 2;
  1084. if (this.Businessform.id != null) {
  1085. // console.log(this.Businessform,"this.Businessform")
  1086. updateOrgPhysicalDefenseConstruction(this.Businessform).then(
  1087. (response) => {
  1088. this.$modal.msgSuccess("编辑成功");
  1089. this.Businessopen = false;
  1090. this.getBusinessPhysicalDefenseConstructionInfo();
  1091. }
  1092. );
  1093. } else {
  1094. addOrgPhysicalDefenseConstruction(this.Businessform).then(
  1095. (response) => {
  1096. this.$modal.msgSuccess("新增成功");
  1097. this.Businessopen = false;
  1098. this.getBusinessPhysicalDefenseConstructionInfo();
  1099. }
  1100. );
  1101. }
  1102. this.Businessimgs = [];
  1103. } else {
  1104. // 表单验证未通过,显示错误信息
  1105. }
  1106. });
  1107. // this.$refs["Businessform"].validate((valid) => {
  1108. // if (valid) {
  1109. // }
  1110. // });
  1111. },
  1112. /** 删除按钮操作 */
  1113. handleBusinessDelete(row) {
  1114. const Businessids = row.id || this.Businessids;
  1115. this.$modal
  1116. .confirm("确认删除?")
  1117. .then(function () {
  1118. return delOrgPhysicalDefenseConstruction(Businessids);
  1119. })
  1120. .then(() => {
  1121. this.getBusinessPhysicalDefenseConstructionInfo();
  1122. this.$modal.msgSuccess("删除成功");
  1123. })
  1124. .catch(() => {
  1125. });
  1126. },
  1127. // resetimg(certificate){
  1128. // this.Bankform.certificate=0;
  1129. // },
  1130. // 取消按钮
  1131. Bankcancel() {
  1132. this.Bankopen = false;
  1133. this.Bankreset();
  1134. },
  1135. // 表单重置
  1136. Bankreset() {
  1137. this.Bankform = {
  1138. id: null,
  1139. standard: null,
  1140. dateOfCompliance: null,
  1141. certificateEvidence: null,
  1142. certificate: null,
  1143. evidence: null,
  1144. createTime: null,
  1145. updateTime: null,
  1146. createBy: null,
  1147. updateBy: null,
  1148. orgId: null,
  1149. };
  1150. this.reqmsg = false;
  1151. this.resetForm("Bankform");
  1152. },
  1153. // 多选框选中数据
  1154. handleBankSelectionChange(selection) {
  1155. this.Bankids = selection.map((item) => item.id);
  1156. this.single = selection.length !== 1;
  1157. this.multiple = !selection.length;
  1158. },
  1159. /** 新增按钮操作 */
  1160. handleBankAdd() {
  1161. this.Bankreset();
  1162. this.Bankopen = true;
  1163. this.Banktitle = "新增安全防范设施建设达标信息";
  1164. },
  1165. /** 编辑按钮操作 */
  1166. handleBankUpdate(row) {
  1167. this.Bankreset();
  1168. const id = row.id || this.Bankids;
  1169. getOrgPhysicalDefenseConstruction(id).then((response) => {
  1170. this.Bankform = response.data;
  1171. // this.Bankform.certificateEvidence=parseInt(response.data.certificateEvidence);
  1172. this.Bankopen = true;
  1173. this.Banktitle = "编辑安全防范设施建设达标信息";
  1174. });
  1175. },
  1176. /** 提交按钮 */
  1177. submitBankForm() {
  1178. if (this.Bankimgs.length > 0) {
  1179. this.Bankform.certificate =
  1180. this.Bankimgs[this.Bankimgs.length - 1].toString(",");
  1181. }
  1182. this.$refs.Bankform.validate((valid) => {
  1183. if (valid) {
  1184. // 表单验证通过,提交数据或执行其他操作
  1185. this.Bankform.orgId = this.$route.params.id;
  1186. this.Bankform.type = 3;
  1187. if (this.Bankform.id != null) {
  1188. updateOrgPhysicalDefenseConstruction(this.Bankform).then(
  1189. (response) => {
  1190. this.$modal.msgSuccess("编辑成功");
  1191. this.Bankopen = false;
  1192. this.getBankPhysicalDefenseConstructionInfo();
  1193. }
  1194. );
  1195. } else {
  1196. addOrgPhysicalDefenseConstruction(this.Bankform).then(
  1197. (response) => {
  1198. this.$modal.msgSuccess("新增成功");
  1199. this.Bankopen = false;
  1200. this.getBankPhysicalDefenseConstructionInfo();
  1201. }
  1202. );
  1203. }
  1204. this.Bankimgs = [];
  1205. } else {
  1206. // 表单验证未通过,显示错误信息
  1207. }
  1208. });
  1209. // this.$refs["Bankform"].validate((valid) => {
  1210. // if (valid) {
  1211. // }
  1212. // });
  1213. },
  1214. /** 删除按钮操作 */
  1215. handleBankDelete(row) {
  1216. const Bankids = row.id || this.Bankids;
  1217. this.$modal
  1218. .confirm("确认删除?")
  1219. .then(function () {
  1220. return delOrgPhysicalDefenseConstruction(Bankids);
  1221. })
  1222. .then(() => {
  1223. this.getBankPhysicalDefenseConstructionInfo();
  1224. this.$modal.msgSuccess("删除成功");
  1225. })
  1226. .catch(() => {
  1227. });
  1228. },
  1229. // 取消按钮
  1230. detachedcancel() {
  1231. this.detachedopen = false;
  1232. this.detachedreset();
  1233. },
  1234. // 表单重置
  1235. detachedreset() {
  1236. this.detachedform = {
  1237. id: null,
  1238. standard: null,
  1239. dateOfCompliance: null,
  1240. certificateEvidence: null,
  1241. certificate: null,
  1242. evidence: null,
  1243. createTime: null,
  1244. updateTime: null,
  1245. createBy: null,
  1246. updateBy: null,
  1247. orgId: null,
  1248. };
  1249. this.reqmsg = false;
  1250. this.resetForm("detachedform");
  1251. },
  1252. // 多选框选中数据
  1253. handledetachedSelectionChange(selection) {
  1254. this.detachedids = selection.map((item) => item.id);
  1255. this.single = selection.length !== 1;
  1256. this.multiple = !selection.length;
  1257. },
  1258. /** 新增按钮操作 */
  1259. handledetachedAdd() {
  1260. this.detachedreset();
  1261. this.detachedopen = true;
  1262. this.detachedtitle = "新增安全防范设施建设达标信息";
  1263. },
  1264. /** 编辑按钮操作 */
  1265. handledetachedUpdate(row) {
  1266. this.detachedreset();
  1267. const id = row.id || this.detachedids;
  1268. getOrgPhysicalDefenseConstruction(id).then((response) => {
  1269. this.detachedform = response.data;
  1270. // this.detachedform.certificateEvidence=parseInt(response.data.certificateEvidence);
  1271. this.detachedopen = true;
  1272. this.detachedtitle = "编辑安全防范设施建设达标信息";
  1273. });
  1274. },
  1275. canShowGA38() {
  1276. // console.log("canShowGA38",this.type ,this.type == '4' || this.type == '10' || this.type == '5')
  1277. if (this.type == '4' || this.type == '10' || this.type == '5') {
  1278. return true;
  1279. }
  1280. return false;
  1281. },
  1282. /** 提交按钮 */
  1283. submitdetachedForm() {
  1284. if (this.detachedimgs.length > 0) {
  1285. this.detachedform.certificate =
  1286. this.detachedimgs[this.detachedimgs.length - 1].toString(",");
  1287. }
  1288. this.$refs.detachedform.validate((valid) => {
  1289. if (valid) {
  1290. // 表单验证通过,提交数据或执行其他操作
  1291. this.detachedform.orgId = this.$route.params.id;
  1292. this.detachedform.type = 4;
  1293. if (this.detachedform.id != null) {
  1294. updateOrgPhysicalDefenseConstruction(this.detachedform).then(
  1295. (response) => {
  1296. this.$modal.msgSuccess("编辑成功");
  1297. this.detachedopen = false;
  1298. this.getdetachedPhysicalDefenseConstructionInfo();
  1299. }
  1300. );
  1301. } else {
  1302. addOrgPhysicalDefenseConstruction(this.detachedform).then(
  1303. (response) => {
  1304. this.$modal.msgSuccess("新增成功");
  1305. this.detachedopen = false;
  1306. this.getdetachedPhysicalDefenseConstructionInfo();
  1307. }
  1308. );
  1309. }
  1310. this.detachedimgs = [];
  1311. } else {
  1312. // 表单验证未通过,显示错误信息
  1313. }
  1314. });
  1315. // this.$refs["detachedform"].validate((valid) => {
  1316. // if (valid) {
  1317. // }
  1318. // });
  1319. },
  1320. /** 删除按钮操作 */
  1321. handledetachedDelete(row) {
  1322. const detachedids = row.id || this.detachedids;
  1323. this.$modal
  1324. .confirm("确认删除?")
  1325. .then(function () {
  1326. return delOrgPhysicalDefenseConstruction(detachedids);
  1327. })
  1328. .then(() => {
  1329. this.getdetachedPhysicalDefenseConstructionInfo();
  1330. this.$modal.msgSuccess("删除成功");
  1331. })
  1332. .catch(() => {
  1333. });
  1334. },
  1335. // 表单重置
  1336. orgreset() {
  1337. this.orgform = {
  1338. id: null,
  1339. standard: null,
  1340. dateOfCompliance: null,
  1341. dateOfComplete: null,
  1342. certificateEvidence: 0,
  1343. certificate: null,
  1344. evidence: null,
  1345. createTime: null,
  1346. updateTime: null,
  1347. createBy: null,
  1348. updateBy: null,
  1349. orgId: null,
  1350. };
  1351. this.reqmsg = false;
  1352. this.resetForm("orgform");
  1353. },
  1354. // 取消按钮
  1355. orgcancel() {
  1356. console.log(this.orgform.certificate, 123123);
  1357. console.log(this.orgimgs, '123123');
  1358. this.orgopen = false;
  1359. this.orgform.certificate = null;
  1360. this.orgimgs = null;
  1361. this.orgreset();
  1362. },
  1363. // 多选框选中数据
  1364. handleOrgSelectionChange(selection) {
  1365. this.orgids = selection.map((item) => item.id);
  1366. this.single = selection.length !== 1;
  1367. this.multiple = !selection.length;
  1368. },
  1369. /** 新增按钮操作 */
  1370. handleOrgAdd() {
  1371. this.orgreset();
  1372. this.orgopen = true;
  1373. this.orgtitle = "新增安全防范设施建设达标信息";
  1374. },
  1375. /** 编辑按钮操作 */
  1376. handleOrgUpdate(row) {
  1377. this.orgreset();
  1378. const id = row.id || this.orgids;
  1379. getOrgPhysicalDefenseConstruction(id).then((response) => {
  1380. this.orgform = response.data;
  1381. this.orgopen = true;
  1382. this.orgtitle = "编辑安全防范设施建设达标信息";
  1383. });
  1384. },
  1385. /** 提交按钮 */
  1386. submitOrgForm() {
  1387. console.log(this.orgform.certificate, 'this.orgform.certificate')
  1388. if (this.orgform.certificate > 0) {
  1389. //this.orgform.certificate = this.orgimgs[this.orgimgs.length - 1].toString(",");
  1390. }
  1391. // if(!this.orgform.certificate && this.orgform.standard !== '3'){
  1392. // this.$modal.alertError("请上传证书");
  1393. // return;
  1394. // }
  1395. //certificate
  1396. this.$refs.orgform.validate((valid) => {
  1397. if (valid) {
  1398. if (this.orgform.standard !== '3' && (this.orgform.certificate == null || this.orgform.certificate == 0)) {
  1399. this.$modal.alertError("请上传证书");
  1400. return;
  1401. }
  1402. // 表单验证通过,提交数据或执行其他操作
  1403. this.orgform.orgId = this.$route.params.id;
  1404. // this.orgform.type = 1;
  1405. if (this.orgform.id != null) {
  1406. updateOrgPhysicalDefenseConstruction(this.orgform).then(
  1407. (response) => {
  1408. this.$modal.msgSuccess("编辑成功");
  1409. this.orgopen = false;
  1410. this.getOrgPhysicalDefenseConstructionInfo();
  1411. }
  1412. );
  1413. } else {
  1414. addOrgPhysicalDefenseConstruction(this.orgform).then((response) => {
  1415. this.$modal.msgSuccess("新增成功");
  1416. this.orgopen = false;
  1417. this.getOrgPhysicalDefenseConstructionInfo();
  1418. });
  1419. }
  1420. this.orgimgs = [];
  1421. } else {
  1422. // 表单验证未通过,显示错误信息
  1423. }
  1424. });
  1425. },
  1426. /** 删除按钮操作 */
  1427. handleOrgDelete(row) {
  1428. const orgids = row.id || this.orgids;
  1429. this.$modal
  1430. .confirm("确认删除?")
  1431. .then(function () {
  1432. return delOrgPhysicalDefenseConstruction(orgids);
  1433. })
  1434. .then(() => {
  1435. this.getOrgPhysicalDefenseConstructionInfo();
  1436. this.$modal.msgSuccess("删除成功");
  1437. })
  1438. .catch(() => {
  1439. });
  1440. },
  1441. saveExtend() {
  1442. if (!this.validBeforeSaveExtend()) {
  1443. return;
  1444. }
  1445. let dat = {
  1446. safeBox: this.safeBox ? 1 : 0,
  1447. innerCount: this.innerCount,
  1448. outsideCount: this.outsideCount,
  1449. cashAddingRoom: this.cashAddingRoom,
  1450. orgType: this.orgType,
  1451. remoteCount: this.remoteCount,
  1452. weatherAreaCode: this.weatherAreaCode,
  1453. askariCertificate:
  1454. this.imgs.length > 0
  1455. ? this.imgs[this.imgs.length - 1].toString(",")
  1456. : null,
  1457. premisesArea: this.premisesArea,
  1458. ownership: this.ownership,
  1459. outsideArea: this.outsideArea,
  1460. askari: this.askari ? 1 : 0,
  1461. businessLibraryType: this.businessLibraryType,
  1462. dutyMode: this.dutyMode,
  1463. remoteControl: this.remoteControl ? 1 : 0,
  1464. selfServiceBank: this.selfServiceBank ? 1 : 0,
  1465. businessLibrary: this.businessLibrary ? 1 : 0,
  1466. lobbyEquipment: this.lobbyEquipment,
  1467. wallPenetratingEquipment: this.wallPenetratingEquipment,
  1468. platformBrand: this.platformBrand,
  1469. platformSupplierBrand: this.platformSupplierBrand,
  1470. constructionTime: this.constructionTime,
  1471. lastUpdateTime: this.lastUpdateTime,
  1472. orgId: this.$route.params.id,
  1473. id: this.extendId,
  1474. detachedLobbyEquipment: this.detachedLobbyEquipment,
  1475. detachedWallPenetratingEquipment: this.detachedWallPenetratingEquipment,
  1476. cashAddingRoomRemoteControl: this.cashAddingRoomRemoteControl,
  1477. hdCameraCount: this.hdCameraCount,
  1478. totalCameraCount: this.totalCameraCount,
  1479. };
  1480. // console.log(dat);
  1481. if (this.extendId) {
  1482. updateExtend(dat).then((res) => {
  1483. this.$modal.msgSuccess("保存成功");
  1484. // this.$router.go(-1);
  1485. this.$tab.closePageAndPushPrev();
  1486. });
  1487. } else {
  1488. addExtend(dat).then((res) => {
  1489. this.$modal.msgSuccess("保存成功");
  1490. // this.$router.go(-1);
  1491. this.$tab.closePageAndPushPrev();
  1492. });
  1493. }
  1494. },
  1495. validBeforeSaveExtend() {
  1496. if (this.weatherAreaCode == null) {
  1497. this.$modal.msgError("气象行政区域不能为空,请选择气象行政区域");
  1498. return false;
  1499. }
  1500. if (this.type === this.org_type.yewd && this.ownership == null) {
  1501. this.$modal.msgError("产权类型不能为空,请选择产权类型");
  1502. return false;
  1503. }
  1504. if (this.type === this.org_type.yewd && this.outsideArea == null) {
  1505. this.$modal.msgError("所在位置不能为空,请选择所在位置");
  1506. return false;
  1507. }
  1508. if (this.type === this.org_type.yewd && this.dutyMode == null) {
  1509. this.$modal.msgError("夜间值守不能为空,请选择夜间值守方式");
  1510. return false;
  1511. }
  1512. if (this.type === this.org_type.yewd && this.safeBox == null) {
  1513. this.$modal.msgError("是否设立保管箱库不能为空,请选择是否设立保管箱库");
  1514. return false;
  1515. }
  1516. if (this.type === this.org_type.yewd && this.selfServiceBank == null) {
  1517. this.$modal.msgError("是否设立在行式自助银行不能为空,请选择是否设立在行式自助银行");
  1518. return false;
  1519. }
  1520. if (this.type === this.org_type.yewd && this.selfServiceBank == 1&&this.wallPenetratingEquipment==null) {
  1521. this.$modal.msgError("穿墙式设备数量不能为空,请输入穿墙式设备数量");
  1522. return false;
  1523. }
  1524. if (this.type === this.org_type.yewd && this.selfServiceBank == 1&&this.lobbyEquipment==null) {
  1525. this.$modal.msgError("大堂设备数量不能为空,请输入大堂设备数量");
  1526. return false;
  1527. }
  1528. if (this.type === this.org_type.yewd &&this.businessLibrary==null) {
  1529. this.$modal.msgError("是否设立网点业务库不能为空,请设置是否设立网点业务库");
  1530. return false;
  1531. }
  1532. if (this.type === this.org_type.yewd && this.businessLibrary===1&&this.businessLibraryType==null) {
  1533. this.$modal.msgError("业务库类型不能为空,请选择业务库类型");
  1534. return false;
  1535. }
  1536. if ((this.type === this.org_type.jkzx || this.type === this.org_type.yewd|| this.type === this.org_type.lhzz || this.type === this.org_type.zxywk)&&this.businessLibrary===1&&this.remoteControl==null) {
  1537. this.$modal.msgError("出入口远程控制与授权不能为空,请选择出入口远程控制与授权");
  1538. return false;
  1539. }
  1540. 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) {
  1541. this.$modal.msgError("业务库防控隔离门出入口数量不能为空,请输入业务库防控隔离门出入口数量");
  1542. return false;
  1543. }
  1544. if ((this.type === this.org_type.yewd)&&this.askari==null) {
  1545. this.$modal.msgError("是否配备保安人员不能为空,请选择是否配备保安人员");
  1546. return false;
  1547. }
  1548. if ((this.type === this.org_type.yewd)&&this.askari==1&&this.innerCount==null) {
  1549. this.$modal.msgError("内部保安人数不能为空,请输入内部保安人数");
  1550. return false;
  1551. }
  1552. if ((this.type === this.org_type.yewd)&&this.askari==1&&this.outsideCount==null) {
  1553. this.$modal.msgError("外聘保安人数不能为空,请输入外聘保安人数");
  1554. return false;
  1555. }
  1556. if ((this.type === this.org_type.yewd)&&this.askari==1&&this.isAskariCertificate==1&&this.askariCertificate==null) {
  1557. this.$modal.msgError("保安人员证书不能为空,请上传保安人员证书");
  1558. return false;
  1559. }
  1560. return true;
  1561. },
  1562. nosaveExtend() {
  1563. // this.$router.go(-1);
  1564. this.$tab.closePageAndPushPrev();
  1565. },
  1566. triggerFileInput() {
  1567. this.$refs.fileInput.click();
  1568. },
  1569. async handleFileChange(event) {
  1570. const file = event.target.files[0];
  1571. if (!file) return;
  1572. // // 发送文件到您的文件上传 API
  1573. try {
  1574. uploadFile(file, "org").then((res) => {
  1575. console.log(res);
  1576. // this.orgform.certificateEvidence = res.data;
  1577. });
  1578. // 处理上传成功的逻辑
  1579. console.log("上传成功");
  1580. } catch (error) {
  1581. // 处理上传失败的逻辑
  1582. console.log("上传失败");
  1583. }
  1584. event.target.value = "";
  1585. },
  1586. }
  1587. };
  1588. </script>
  1589. <style scoped lang="scss">
  1590. /*.org-extend{
  1591. background-color: #fff;
  1592. padding: 10px;
  1593. }*/
  1594. .title {
  1595. font-size: 18px;
  1596. text-align: left;
  1597. color: #008cd6;
  1598. height: 36px;
  1599. line-height: 36px;
  1600. padding-left: 8px;
  1601. margin: 0;
  1602. }
  1603. .info-box {
  1604. margin: 20px;
  1605. }
  1606. .demo-form-inline {
  1607. }
  1608. .dialog-footer {
  1609. }
  1610. .container {
  1611. }
  1612. .zoom-image {
  1613. transition: transform 0.3s ease;
  1614. }
  1615. .zoom-image:hover {
  1616. transform: scale(1.02);
  1617. }
  1618. .border-color-change {
  1619. border: 1px solid #ccc;
  1620. transition: border-color 0.3s ease;
  1621. }
  1622. .border-color-change:hover {
  1623. border-color: #1ea8e9;
  1624. /* 您可以将此颜色更改为所需的颜色 */
  1625. }
  1626. .extend_mod {
  1627. background-color: #fff;
  1628. padding: 1px 15px 1px 15px;
  1629. margin-bottom: 2px;
  1630. -webkit-box-shadow: 0 2px 8px #ccc;
  1631. box-shadow: 0 2px 8px #ccc;
  1632. }
  1633. .el-table thead > tr > th {
  1634. background-color: #fafafa !important;
  1635. }
  1636. .el-row {
  1637. margin-bottom: 20px;
  1638. &:last-child {
  1639. margin-bottom: 0;
  1640. }
  1641. }
  1642. .el-col {
  1643. border-radius: 4px;
  1644. }
  1645. .bg-purple-dark {
  1646. background: #99a9bf;
  1647. }
  1648. .bg-purple {
  1649. background: #d3dce6;
  1650. }
  1651. .bg-purple-light {
  1652. background: #e5e9f2;
  1653. }
  1654. .grid-content {
  1655. border-radius: 4px;
  1656. min-height: 36px;
  1657. }
  1658. .row-bg {
  1659. padding: 10px 0;
  1660. background-color: #f9fafc;
  1661. }
  1662. </style>