extend.vue 50 KB

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