extend.vue 52 KB

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