extend.vue 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523
  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. >{{ getLabels(`${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)"
  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)"
  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">
  367. <i class="el-icon-collection-tag"></i>离行自助银行信息
  368. </h3>
  369. <div class="info-box">
  370. <span>大堂设备</span>
  371. <div style="display: inline-block; width: 200px">
  372. <el-input-number
  373. style="margin-left: 10px"
  374. v-model="detachedLobbyEquipment"
  375. controls-position="right"
  376. @change="handleChange"
  377. :min="0"
  378. :max="9999"
  379. ></el-input-number>
  380. </div>
  381. <span style="margin-left: 50px">穿墙设备</span>
  382. <div style="display: inline-block; width: 200px">
  383. <el-input-number
  384. style="margin-left: 10px"
  385. v-model="detachedWallPenetratingEquipment"
  386. controls-position="right"
  387. @change="handleChange"
  388. :min="0"
  389. :max="9999"
  390. ></el-input-number>
  391. </div>
  392. </div>
  393. </div>
  394. <div style="margin-top: 50px; margin-left: 42%">
  395. <el-button type="primary" @click="saveExtend" size="small"
  396. >提交</el-button
  397. >
  398. <el-button type="primary" @click="nosaveExtend" size="small"
  399. >取消</el-button
  400. >
  401. </div>
  402. <DialogCom
  403. :title="orgtitle"
  404. :visible.sync="orgopen"
  405. width="500px"
  406. append-to-body
  407. >
  408. <el-form ref="orgform" :model="orgform" label-width="100px" :rules="rules">
  409. <el-form-item label="机构类型" prop="type">
  410. <!-- <el-input v-model="orgform.standard" placeholder="请输入标准" /> -->
  411. <el-select
  412. prop="type"
  413. label="机构类型"
  414. v-model="orgform.type"
  415. placeholder="请选择机构类型"
  416. clearable
  417. >
  418. <el-option
  419. v-for="dict in orgTypes"
  420. :key="dict.value"
  421. :label="dict.label"
  422. :value="dict.value"
  423. />
  424. </el-select>
  425. </el-form-item>
  426. <el-form-item label="GA38标准" prop="standard">
  427. <el-select
  428. prop="planType"
  429. label="标准"
  430. v-model="orgform.standard"
  431. placeholder="请选择标准"
  432. clearable
  433. >
  434. <el-option
  435. v-for="dict in dict.type.org_extend_standard"
  436. :key="dict.value"
  437. :label="dict.label"
  438. :value="dict.value"
  439. />
  440. </el-select>
  441. </el-form-item>
  442. <el-form-item label="达标日期" prop="dateOfCompliance">
  443. <el-date-picker
  444. clearable
  445. v-model="orgform.dateOfCompliance"
  446. type="date"
  447. value-format="yyyy-MM-dd HH:mm:ss"
  448. placeholder="请选择达标日期"
  449. >
  450. </el-date-picker>
  451. </el-form-item>
  452. <!-- <el-form-item label="证书佐证" prop="certificateEvidence">
  453. <el-switch
  454. v-model="orgform.certificateEvidence"
  455. active-text
  456. :active-value="1"
  457. :inactive-value="0"
  458. ></el-switch>
  459. </el-form-item> -->
  460. <el-form-item label="证书" prop="certificate">
  461. <!-- <el-input
  462. v-if="false"
  463. v-model="orgform.certificate"
  464. placeholder="请输入证书"
  465. /> -->
  466. <div class="image-container" style="margin-left: 20px">
  467. <p style="font-size: 12px; color: #999">上传安全防范设施合格证书</p>
  468. <image-upload
  469. :limit="5"
  470. :fileSize="2"
  471. :value="orgform.certificate"
  472. @input="uploadorgSuccess"
  473. ></image-upload>
  474. </div>
  475. </el-form-item>
  476. <el-form-item v-if="false" label="佐证" prop="evidence">
  477. <el-input v-model="orgform.evidence" placeholder="请输入佐证" />
  478. </el-form-item>
  479. <el-form-item v-if="false" label="机构id" prop="orgId">
  480. <el-input v-model="orgform.orgId" placeholder="请输入机构id" />
  481. </el-form-item>
  482. </el-form>
  483. <div slot="footer" class="dialog-footer">
  484. <el-button type="primary" @click="submitOrgForm">确 定</el-button>
  485. <el-button @click="orgcancel">取 消</el-button>
  486. </div>
  487. </DialogCom>
  488. <div slot="footer" class="dialog-footer" style="height: 50px"></div>
  489. <el-image-viewer
  490. v-if="imageViewer"
  491. :on-close="closeImgViewer"
  492. :url-list="srcList"
  493. />
  494. </div>
  495. </template>
  496. <script>
  497. import uploadpng from "@/assets/images/upload.png";
  498. import uplpng from "@/assets/images/upl.png";
  499. import request from "@/utils/request";
  500. import { statusOptions, getLabel } from "./../../commonOption";
  501. import {
  502. listExtend,
  503. getExtend,
  504. addExtend,
  505. updateExtend,
  506. delExtend,
  507. getExtendByOrgId,
  508. uploadFile,
  509. } from "@/api/system/extend";
  510. import {
  511. listDept,
  512. getDept,
  513. delDept,
  514. addDept,
  515. updateDept,
  516. listDeptExcludeChild,
  517. } from "@/api/system/dept";
  518. import {
  519. listOrgPhysicalDefenseConstruction,
  520. getOrgPhysicalDefenseConstruction,
  521. addOrgPhysicalDefenseConstruction,
  522. updateOrgPhysicalDefenseConstruction,
  523. delOrgPhysicalDefenseConstruction,
  524. } from "@/api/system/OrgPhysicalDefenseConstruction";
  525. import { selectCityInfoVoList } from "@/api/core/weather";
  526. import TreeNodeDialogVue from "../../tool/build/TreeNodeDialog.vue";
  527. export default {
  528. dicts: [
  529. "sys_org_type",
  530. "org_platform_brand",
  531. "org_platform_supplier_brand",
  532. "org_extend_type",
  533. "business_library_type",
  534. "reality_org_type",
  535. "org_extend_standard",
  536. "org_extend_business_library_standard",
  537. "org_extend_self_service_bank_standard",
  538. "org_extend_detached_standard",
  539. "org_extend_is",
  540. "property_situation",
  541. ],
  542. props: [],
  543. components: {
  544. "el-image-viewer": () =>
  545. import("element-ui/packages/image/src/image-viewer"),
  546. },
  547. data() {
  548. let formatRule = function (rule, value, callback) {
  549. console.log(value, "value");
  550. if (!value.length) {
  551. callback(new Error("证书为必填项"));
  552. } else {
  553. callback();
  554. }
  555. };
  556. return {
  557. reqmsg: false,
  558. imageViewer: false,
  559. //表单验证
  560. rules: {
  561. type: [{ required: true, message: "请选择机构类型", trigger: "blur" }],
  562. standard: [{ required: true, message: "请输入标准", trigger: "blur" }],
  563. dateOfCompliance: [
  564. {
  565. required: TreeNodeDialogVue,
  566. message: "请输入达标日期",
  567. trigger: "blur",
  568. },
  569. ],
  570. // certificate: [
  571. // { validator: this.isreq, message: "请选择图片", trigger: "blur" },
  572. // ],
  573. },
  574. //基础信息key
  575. infoKeys: [
  576. { label: "机构名称", key: "name" },
  577. { label: "机构简称", key: "shortName" },
  578. // { label: "机构组织类型", key: "type" },
  579. // { label: "部门机构电话", key: "phone" },
  580. { label: "机构地址", key: "address" },
  581. { label: "排序号", key: "sort" },
  582. // { label: "是否可用", key: "isLock" },
  583. { label: "更新时间", key: "updateTime" },
  584. { label: "同步时间", key: "createTime" },
  585. ],
  586. type: null,
  587. isLock: null,
  588. dataInfo: [],
  589. //机构补充信息
  590. extendId: null,
  591. orgType: 1,
  592. weatherAreaCode: null,
  593. premisesArea: null,
  594. ownership: null,
  595. outsideArea: null,
  596. askari: null,
  597. businessLibrary: 0,
  598. businessLibraryType: null,
  599. dutyMode: 0,
  600. remoteControl: null,
  601. selfServiceBank: null,
  602. lobbyEquipment: 0,
  603. wallPenetratingEquipment: 0,
  604. platformBrand: null,
  605. platformSupplierBrand: null,
  606. constructionTime: null,
  607. lastUpdateTime: null,
  608. detachedLobbyEquipment: null,
  609. detachedWallPenetratingEquipment: null,
  610. cashAddingRoomRemoteControl: null,
  611. source: null,
  612. askariCertificate: null,
  613. //机构建设数据
  614. // 遮罩层
  615. orgloading: true,
  616. businessloading: true,
  617. // 选中数组
  618. orgids: [],
  619. // 选中数组
  620. Bankids: [],
  621. Businessids: [],
  622. // 非单个禁用
  623. single: true,
  624. // 非多个禁用
  625. multiple: true,
  626. // 显示搜索条件
  627. showSearch: true,
  628. // 总条数
  629. total: 0,
  630. // 机构物防建设表格数据
  631. constructionList: [],
  632. // 银行物防建设表格数据
  633. BankPhysicalDefenseConstructionList: [],
  634. detachedPhysicalDefenseConstructionList: [],
  635. BusinessPhysicalDefenseConstructionList: [],
  636. // 弹出层标题
  637. orgtitle: "",
  638. Businesstitle: "",
  639. // 弹出层标题
  640. Banktitle: "",
  641. detachedtitle: "",
  642. detachedloading: false,
  643. // 是否显示弹出层
  644. Bankopen: false,
  645. detachedopen: false,
  646. //图片预览
  647. openUrl: null,
  648. srcList: [],
  649. openTitle: null,
  650. openVisible: false,
  651. // 表单参数
  652. Bankform: {},
  653. detachedform: {},
  654. Businessform: {},
  655. // 是否显示弹出层
  656. Businessopen: false,
  657. orgopen: false,
  658. // 表单参数
  659. orgform: {},
  660. //2个图片信息
  661. uploadp: uploadpng,
  662. uplp: uplpng,
  663. //下拉框生成信息
  664. orgTypes: [
  665. { label: "营业网点", value: 0 },
  666. { label: "网点业务库", value: 1 },
  667. { label: "在行式自助银行", value: 2 },
  668. ],
  669. businessLibraryTypes: {
  670. businessLibraryTyp1: { label: "1类业务库", value: 1 },
  671. businessLibraryTyp2: { label: "2类业务库", value: 2 },
  672. businessLibraryTyp3: { label: "3类业务库", value: 3 },
  673. },
  674. platformBrands: {
  675. platformBrand1: { label: "品牌1", value: 0 },
  676. platformBrand2: { label: "品牌2", value: 1 },
  677. },
  678. platformSupplierBrands: {
  679. platformSupplierBrand1: { label: "品牌1", value: 0 },
  680. platformSupplierBrand2: { label: "品牌2", value: 1 },
  681. },
  682. prop: "",
  683. propItem: "",
  684. row: "",
  685. areaList: [],
  686. imgs: [],
  687. Businessimgs: [],
  688. Bankimgs: [],
  689. orgimgs: [],
  690. detachedimgs: [],
  691. };
  692. },
  693. watch: {
  694. "detachedform.certificateEvidence"(newValue) {
  695. if (
  696. newValue === 1 &&
  697. this.detachedform.certificate == null &&
  698. this.detachedimgs.length == 0
  699. ) {
  700. this.reqmsg = true;
  701. }
  702. if (newValue === 0) {
  703. this.reqmsg = false;
  704. }
  705. },
  706. "Bankform.certificateEvidence"(newValue) {
  707. // console.log(this.Bankimgs.length,"this.imgs")
  708. // console.log(this.Bankform.certificate,"Bankform.certificate")
  709. if (
  710. newValue === 1 &&
  711. this.Bankform.certificate == null &&
  712. this.Bankimgs.length == 0
  713. ) {
  714. this.reqmsg = true;
  715. }
  716. if (newValue === 0) {
  717. this.reqmsg = false;
  718. }
  719. },
  720. "Businessform.certificateEvidence"(newValue) {
  721. if (
  722. newValue === 1 &&
  723. this.Businessform.certificate == null &&
  724. this.Businessimgs.length == 0
  725. ) {
  726. this.reqmsg = true;
  727. }
  728. if (newValue === 0) {
  729. this.reqmsg = false;
  730. }
  731. },
  732. "orgform.certificateEvidence"(newValue) {
  733. if (
  734. newValue === 1 &&
  735. this.orgform.certificate == null &&
  736. this.orgimgs.length == 0
  737. ) {
  738. this.reqmsg = true;
  739. }
  740. if (newValue === 0) {
  741. this.reqmsg = false;
  742. }
  743. },
  744. },
  745. computed: {
  746. getLabels() {
  747. return function(value) {
  748. const option = this.orgTypes.filter(item => item.value == value);
  749. // console.log(option[0].label,"option")
  750. return option ? option[0].label : '';
  751. }
  752. },
  753. switchModel: {
  754. get() {
  755. return this.switchValue === 1; // 将0转换为false,1转换为true
  756. },
  757. set(value) {
  758. this.switchValue = value ? 1 : 0; // 将false转换为0,true转换为1
  759. },
  760. },
  761. },
  762. created() {
  763. this.getOrgInfo();
  764. this.getExtendInfo();
  765. this.getOrgPhysicalDefenseConstructionInfo();
  766. this.getBankPhysicalDefenseConstructionInfo();
  767. this.getBusinessPhysicalDefenseConstructionInfo();
  768. this.getdetachedPhysicalDefenseConstructionInfo();
  769. this.getAreaList();
  770. },
  771. mounted() {},
  772. methods: {
  773. closeImgViewer() {
  774. this.imageViewer = false;
  775. this.srcList = [];
  776. },
  777. isreq(rule, value, callback) {
  778. if (this.reqmsg) {
  779. callback(new Error("证书为必填项"));
  780. } else {
  781. callback();
  782. }
  783. },
  784. // getImgUrl(fileList) {
  785. // let matchResult = fileList.match(/\/statics(.*)/);
  786. // if (matchResult) {
  787. // let result = matchResult[0];
  788. // this.askariCertificate = result;
  789. // } else {
  790. // }
  791. // // this.askariCertificate=img;
  792. // console.log(this.askariCertificate, "imgs");
  793. // },
  794. getImgUrl(img) {
  795. this.imgs.push(img);
  796. // console.log(this.imgs, "imgs");
  797. },
  798. getAreaList() {
  799. selectCityInfoVoList({}).then((response) => {
  800. this.areaList = response.data;
  801. });
  802. },
  803. selectArea(value) {
  804. this.weatherAreaCode = value[1];
  805. },
  806. downBusiness(file) {
  807. let array = file.split(",");
  808. this.openTitle = "证书";
  809. this.openUrl = array[0];
  810. this.srcList = array;
  811. this.openVisible = true;
  812. this.imageViewer = true;
  813. // for (let i = 0; i < array.length; i++) {
  814. // window.open(array[i]);
  815. // }
  816. },
  817. //证书上传
  818. uploadBusinessSuccess(img) {
  819. this.Businessimgs.push(img);
  820. this.reqmsg = false;
  821. },
  822. uploadBankSuccess(img) {
  823. this.Bankimgs.push(img);
  824. this.reqmsg = false;
  825. },
  826. uploadorgSuccess(img) {
  827. this.orgimgs.push(img);
  828. this.reqmsg = false;
  829. },
  830. uploaddetachedSuccess(img) {
  831. this.detachedimgs.push(img);
  832. this.reqmsg = false;
  833. },
  834. handleInput() {
  835. // 使用正则表达式过滤输入,只保留数字和小数点
  836. // this.premisesArea = this.premisesArea.replace(/[^0-9.]/g, "");
  837. // 限制只能输入1到999999之间的数字
  838. let value = parseInt(this.premisesArea, 10); // 将输入的值转为整数
  839. if (isNaN(value) || value < 1 || value > 999999) {
  840. // 判断是否在范围内
  841. this.premisesArea = ""; // 不在范围内则清空输入的值
  842. } else {
  843. this.premisesArea = value.toString(); // 在范围内则保留输入的值
  844. }
  845. },
  846. handleInput2() {
  847. // 使用正则表达式过滤输入,只保留数字和小数点
  848. this.weatherAreaCode = this.weatherAreaCode.replace(/[^a-zA-Z0-9]/g, "");
  849. },
  850. request() {},
  851. handleChange(value) {},
  852. getOrgInfo() {
  853. getDept(this.$route.params.id).then((data) => {
  854. // console.log(data.data);
  855. if (!data.data) return;
  856. let res = data.data;
  857. this.dataInfo = this.infoKeys.map((v, i) => {
  858. // console.log(v, res[v.key], "vvvvv");
  859. v.value = res[v.key];
  860. return v;
  861. });
  862. this.type = data.data.type;
  863. this.isLock = data.data.isLock;
  864. this.source = data.data.source;
  865. // console.log(this.dataInfo, "info");
  866. });
  867. },
  868. getExtendInfo() {
  869. getExtendByOrgId(this.$route.params.id).then((data) => {
  870. console.log(data.data);
  871. if (data.data != null) {
  872. this.orgType = data.data.orgType;
  873. this.weatherAreaCode = data.data.weatherAreaCode;
  874. this.premisesArea = data.data.premisesArea;
  875. this.ownership = data.data.ownership;
  876. this.outsideArea = data.data.outsideArea;
  877. this.askari = data.data.askari;
  878. this.remoteControl = data.data.remoteControl;
  879. this.selfServiceBank = data.data.selfServiceBank;
  880. this.businessLibrary = data.data.businessLibrary;
  881. this.lobbyEquipment = data.data.lobbyEquipment;
  882. this.wallPenetratingEquipment = data.data.wallPenetratingEquipment;
  883. this.askariCertificate = data.data.askariCertificate;
  884. this.extendId = data.data.id;
  885. this.constructionTime = data.data.constructionTime;
  886. this.lastUpdateTime = data.data.lastUpdateTime;
  887. this.platformBrand = data.data.platformBrand;
  888. this.platformSupplierBrand = data.data.platformSupplierBrand;
  889. this.businessLibraryType = data.data.businessLibraryType;
  890. this.dutyMode = data.data.dutyMode;
  891. this.detachedLobbyEquipment = data.data.detachedLobbyEquipment;
  892. this.detachedWallPenetratingEquipment =
  893. data.data.detachedWallPenetratingEquipment;
  894. this.cashAddingRoomRemoteControl =
  895. data.data.cashAddingRoomRemoteControl;
  896. // if (
  897. // this.askariCertificate &&
  898. // this.askariCertificate.trim() &&
  899. // this.askariCertificate.includes(",")
  900. // ) {
  901. // this.imgs = this.askariCertificate.split(",");
  902. // } else if (
  903. // this.askariCertificate &&
  904. // this.askariCertificate.trim() &&
  905. // this.askariCertificate.includes(".")
  906. // ) {
  907. // this.imgs.push(this.askariCertificate);
  908. // }
  909. // console.log(this.extendId);
  910. }
  911. });
  912. },
  913. getLabel(options, value) {
  914. return getLabel(options, value);
  915. },
  916. getOrgPhysicalDefenseConstructionInfo() {
  917. this.orgloading = true;
  918. let dat = { orgId: this.$route.params.id };
  919. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  920. console.log("机构信息获取成功");
  921. this.constructionList = data.rows;
  922. this.orgloading = false;
  923. });
  924. },
  925. getBankPhysicalDefenseConstructionInfo() {
  926. this.bankloading = true;
  927. let dat = { orgId: this.$route.params.id, type: 3 };
  928. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  929. // console.log(data);
  930. this.BankPhysicalDefenseConstructionList = data.rows;
  931. this.bankloading = false;
  932. });
  933. },
  934. getdetachedPhysicalDefenseConstructionInfo() {
  935. this.detachedloading = true;
  936. let dat = { orgId: this.$route.params.id, type: 4 };
  937. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  938. // console.log(data);
  939. this.detachedPhysicalDefenseConstructionList = data.rows;
  940. this.detachedloading = false;
  941. });
  942. },
  943. getBusinessPhysicalDefenseConstructionInfo() {
  944. this.businessloading = true;
  945. let dat = { orgId: this.$route.params.id, type: 2 };
  946. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  947. // console.log(data);
  948. this.BusinessPhysicalDefenseConstructionList = data.rows;
  949. this.businessloading = false;
  950. });
  951. },
  952. // 取消按钮
  953. Businesscancel() {
  954. this.Businessopen = false;
  955. this.Businessreset();
  956. },
  957. // 表单重置
  958. Businessreset() {
  959. this.Businessform = {
  960. id: null,
  961. standard: null,
  962. dateOfCompliance: null,
  963. certificateEvidence: null,
  964. certificate: null,
  965. evidence: null,
  966. createTime: null,
  967. updateTime: null,
  968. createBy: null,
  969. updateBy: null,
  970. orgId: null,
  971. };
  972. this.reqmsg = false;
  973. this.resetForm("Businessform");
  974. },
  975. // 多选框选中数据
  976. handleBusinessSelectionChange(selection) {
  977. this.Businessids = selection.map((item) => item.id);
  978. this.single = selection.length !== 1;
  979. this.multiple = !selection.length;
  980. },
  981. /** 新增按钮操作 */
  982. handleBusinessAdd() {
  983. this.Businessreset();
  984. this.Businessopen = true;
  985. this.Businesstitle = "新增安全防范设施建设达标信息";
  986. },
  987. /** 编辑按钮操作 */
  988. handleBusinessUpdate(row) {
  989. this.Businessreset();
  990. const id = row.id || this.Businessids;
  991. getOrgPhysicalDefenseConstruction(id).then((response) => {
  992. // console.log(response.data,"response.data")
  993. this.Businessform = response.data;
  994. // this.Businessform.certificateEvidence=parseInt(response.data.certificateEvidence);
  995. this.Businessopen = true;
  996. this.Businesstitle = "编辑安全防范设施建设达标信息";
  997. });
  998. },
  999. /** 提交按钮 */
  1000. submitBusinessForm() {
  1001. if (this.Businessimgs.length > 0) {
  1002. this.Businessform.certificate =
  1003. this.Businessimgs[this.Businessimgs.length - 1].toString(",");
  1004. }
  1005. this.$refs.Businessform.validate((valid) => {
  1006. if (valid) {
  1007. // 表单验证通过,提交数据或执行其他操作
  1008. this.Businessform.orgId = this.$route.params.id;
  1009. this.Businessform.type = 2;
  1010. if (this.Businessform.id != null) {
  1011. // console.log(this.Businessform,"this.Businessform")
  1012. updateOrgPhysicalDefenseConstruction(this.Businessform).then(
  1013. (response) => {
  1014. this.$modal.msgSuccess("编辑成功");
  1015. this.Businessopen = false;
  1016. this.getBusinessPhysicalDefenseConstructionInfo();
  1017. }
  1018. );
  1019. } else {
  1020. addOrgPhysicalDefenseConstruction(this.Businessform).then(
  1021. (response) => {
  1022. this.$modal.msgSuccess("新增成功");
  1023. this.Businessopen = false;
  1024. this.getBusinessPhysicalDefenseConstructionInfo();
  1025. }
  1026. );
  1027. }
  1028. this.Businessimgs = [];
  1029. } else {
  1030. // 表单验证未通过,显示错误信息
  1031. }
  1032. });
  1033. // this.$refs["Businessform"].validate((valid) => {
  1034. // if (valid) {
  1035. // }
  1036. // });
  1037. },
  1038. /** 删除按钮操作 */
  1039. handleBusinessDelete(row) {
  1040. const Businessids = row.id || this.Businessids;
  1041. this.$modal
  1042. .confirm("确认删除?")
  1043. .then(function () {
  1044. return delOrgPhysicalDefenseConstruction(Businessids);
  1045. })
  1046. .then(() => {
  1047. this.getBusinessPhysicalDefenseConstructionInfo();
  1048. this.$modal.msgSuccess("删除成功");
  1049. })
  1050. .catch(() => {});
  1051. },
  1052. // resetimg(certificate){
  1053. // this.Bankform.certificate=0;
  1054. // },
  1055. // 取消按钮
  1056. Bankcancel() {
  1057. this.Bankopen = false;
  1058. this.Bankreset();
  1059. },
  1060. // 表单重置
  1061. Bankreset() {
  1062. this.Bankform = {
  1063. id: null,
  1064. standard: null,
  1065. dateOfCompliance: null,
  1066. certificateEvidence: null,
  1067. certificate: null,
  1068. evidence: null,
  1069. createTime: null,
  1070. updateTime: null,
  1071. createBy: null,
  1072. updateBy: null,
  1073. orgId: null,
  1074. };
  1075. this.reqmsg = false;
  1076. this.resetForm("Bankform");
  1077. },
  1078. // 多选框选中数据
  1079. handleBankSelectionChange(selection) {
  1080. this.Bankids = selection.map((item) => item.id);
  1081. this.single = selection.length !== 1;
  1082. this.multiple = !selection.length;
  1083. },
  1084. /** 新增按钮操作 */
  1085. handleBankAdd() {
  1086. this.Bankreset();
  1087. this.Bankopen = true;
  1088. this.Banktitle = "新增安全防范设施建设达标信息";
  1089. },
  1090. /** 编辑按钮操作 */
  1091. handleBankUpdate(row) {
  1092. this.Bankreset();
  1093. const id = row.id || this.Bankids;
  1094. getOrgPhysicalDefenseConstruction(id).then((response) => {
  1095. this.Bankform = response.data;
  1096. // this.Bankform.certificateEvidence=parseInt(response.data.certificateEvidence);
  1097. this.Bankopen = true;
  1098. this.Banktitle = "编辑安全防范设施建设达标信息";
  1099. });
  1100. },
  1101. /** 提交按钮 */
  1102. submitBankForm() {
  1103. if (this.Bankimgs.length > 0) {
  1104. this.Bankform.certificate =
  1105. this.Bankimgs[this.Bankimgs.length - 1].toString(",");
  1106. }
  1107. this.$refs.Bankform.validate((valid) => {
  1108. if (valid) {
  1109. // 表单验证通过,提交数据或执行其他操作
  1110. this.Bankform.orgId = this.$route.params.id;
  1111. this.Bankform.type = 3;
  1112. if (this.Bankform.id != null) {
  1113. updateOrgPhysicalDefenseConstruction(this.Bankform).then(
  1114. (response) => {
  1115. this.$modal.msgSuccess("编辑成功");
  1116. this.Bankopen = false;
  1117. this.getBankPhysicalDefenseConstructionInfo();
  1118. }
  1119. );
  1120. } else {
  1121. addOrgPhysicalDefenseConstruction(this.Bankform).then(
  1122. (response) => {
  1123. this.$modal.msgSuccess("新增成功");
  1124. this.Bankopen = false;
  1125. this.getBankPhysicalDefenseConstructionInfo();
  1126. }
  1127. );
  1128. }
  1129. this.Bankimgs = [];
  1130. } else {
  1131. // 表单验证未通过,显示错误信息
  1132. }
  1133. });
  1134. // this.$refs["Bankform"].validate((valid) => {
  1135. // if (valid) {
  1136. // }
  1137. // });
  1138. },
  1139. /** 删除按钮操作 */
  1140. handleBankDelete(row) {
  1141. const Bankids = row.id || this.Bankids;
  1142. this.$modal
  1143. .confirm("确认删除?")
  1144. .then(function () {
  1145. return delOrgPhysicalDefenseConstruction(Bankids);
  1146. })
  1147. .then(() => {
  1148. this.getBankPhysicalDefenseConstructionInfo();
  1149. this.$modal.msgSuccess("删除成功");
  1150. })
  1151. .catch(() => {});
  1152. },
  1153. // 取消按钮
  1154. detachedcancel() {
  1155. this.detachedopen = false;
  1156. this.detachedreset();
  1157. },
  1158. // 表单重置
  1159. detachedreset() {
  1160. this.detachedform = {
  1161. id: null,
  1162. standard: null,
  1163. dateOfCompliance: null,
  1164. certificateEvidence: null,
  1165. certificate: null,
  1166. evidence: null,
  1167. createTime: null,
  1168. updateTime: null,
  1169. createBy: null,
  1170. updateBy: null,
  1171. orgId: null,
  1172. };
  1173. this.reqmsg = false;
  1174. this.resetForm("detachedform");
  1175. },
  1176. // 多选框选中数据
  1177. handledetachedSelectionChange(selection) {
  1178. this.detachedids = selection.map((item) => item.id);
  1179. this.single = selection.length !== 1;
  1180. this.multiple = !selection.length;
  1181. },
  1182. /** 新增按钮操作 */
  1183. handledetachedAdd() {
  1184. this.detachedreset();
  1185. this.detachedopen = true;
  1186. this.detachedtitle = "新增安全防范设施建设达标信息";
  1187. },
  1188. /** 编辑按钮操作 */
  1189. handledetachedUpdate(row) {
  1190. this.detachedreset();
  1191. const id = row.id || this.detachedids;
  1192. getOrgPhysicalDefenseConstruction(id).then((response) => {
  1193. this.detachedform = response.data;
  1194. // this.detachedform.certificateEvidence=parseInt(response.data.certificateEvidence);
  1195. this.detachedopen = true;
  1196. this.detachedtitle = "编辑安全防范设施建设达标信息";
  1197. });
  1198. },
  1199. /** 提交按钮 */
  1200. submitdetachedForm() {
  1201. if (this.detachedimgs.length > 0) {
  1202. this.detachedform.certificate =
  1203. this.detachedimgs[this.detachedimgs.length - 1].toString(",");
  1204. }
  1205. this.$refs.detachedform.validate((valid) => {
  1206. if (valid) {
  1207. // 表单验证通过,提交数据或执行其他操作
  1208. this.detachedform.orgId = this.$route.params.id;
  1209. this.detachedform.type = 4;
  1210. if (this.detachedform.id != null) {
  1211. updateOrgPhysicalDefenseConstruction(this.detachedform).then(
  1212. (response) => {
  1213. this.$modal.msgSuccess("编辑成功");
  1214. this.detachedopen = false;
  1215. this.getdetachedPhysicalDefenseConstructionInfo();
  1216. }
  1217. );
  1218. } else {
  1219. addOrgPhysicalDefenseConstruction(this.detachedform).then(
  1220. (response) => {
  1221. this.$modal.msgSuccess("新增成功");
  1222. this.detachedopen = false;
  1223. this.getdetachedPhysicalDefenseConstructionInfo();
  1224. }
  1225. );
  1226. }
  1227. this.detachedimgs = [];
  1228. } else {
  1229. // 表单验证未通过,显示错误信息
  1230. }
  1231. });
  1232. // this.$refs["detachedform"].validate((valid) => {
  1233. // if (valid) {
  1234. // }
  1235. // });
  1236. },
  1237. /** 删除按钮操作 */
  1238. handledetachedDelete(row) {
  1239. const detachedids = row.id || this.detachedids;
  1240. this.$modal
  1241. .confirm("确认删除?")
  1242. .then(function () {
  1243. return delOrgPhysicalDefenseConstruction(detachedids);
  1244. })
  1245. .then(() => {
  1246. this.getdetachedPhysicalDefenseConstructionInfo();
  1247. this.$modal.msgSuccess("删除成功");
  1248. })
  1249. .catch(() => {});
  1250. },
  1251. // 表单重置
  1252. orgreset() {
  1253. this.orgform = {
  1254. id: null,
  1255. standard: null,
  1256. dateOfCompliance: null,
  1257. certificateEvidence: 0,
  1258. certificate: null,
  1259. evidence: null,
  1260. createTime: null,
  1261. updateTime: null,
  1262. createBy: null,
  1263. updateBy: null,
  1264. orgId: null,
  1265. };
  1266. this.reqmsg = false;
  1267. this.resetForm("orgform");
  1268. },
  1269. // 取消按钮
  1270. orgcancel() {
  1271. this.orgopen = false;
  1272. this.orgreset();
  1273. },
  1274. // 多选框选中数据
  1275. handleOrgSelectionChange(selection) {
  1276. this.orgids = selection.map((item) => item.id);
  1277. this.single = selection.length !== 1;
  1278. this.multiple = !selection.length;
  1279. },
  1280. /** 新增按钮操作 */
  1281. handleOrgAdd() {
  1282. this.orgreset();
  1283. this.orgopen = true;
  1284. this.orgtitle = "新增安全防范设施建设达标信息";
  1285. },
  1286. /** 编辑按钮操作 */
  1287. handleOrgUpdate(row) {
  1288. this.orgreset();
  1289. const id = row.id || this.orgids;
  1290. getOrgPhysicalDefenseConstruction(id).then((response) => {
  1291. this.orgform = response.data;
  1292. this.orgopen = true;
  1293. // console.log(response.data.certificateEvidence,"response.data.certificateEvidence")
  1294. // this.orgform.certificateEvidence=parseInt(response.data.certificateEvidence);
  1295. // console.log(this.orgform,"this.orgform")
  1296. this.orgtitle = "编辑安全防范设施建设达标信息";
  1297. });
  1298. },
  1299. /** 提交按钮 */
  1300. submitOrgForm() {
  1301. // console.log(this.orgimgs,"this.orgimgs")
  1302. // console.log(this.orgform.certificate,"this.orgform.certificate")
  1303. if (this.orgimgs.length > 0) {
  1304. this.orgform.certificate =
  1305. this.orgimgs[this.orgimgs.length - 1].toString(",");
  1306. }
  1307. // console.log(this.orgimgs,"this.orgimgs1")
  1308. // console.log(this.orgform.certificate,"this.orgform.certificate1")
  1309. this.$refs.orgform.validate((valid) => {
  1310. if (valid) {
  1311. // 表单验证通过,提交数据或执行其他操作
  1312. this.orgform.orgId = this.$route.params.id;
  1313. // this.orgform.type = 1;
  1314. if (this.orgform.id != null) {
  1315. updateOrgPhysicalDefenseConstruction(this.orgform).then(
  1316. (response) => {
  1317. this.$modal.msgSuccess("编辑成功");
  1318. this.orgopen = false;
  1319. this.getOrgPhysicalDefenseConstructionInfo();
  1320. }
  1321. );
  1322. } else {
  1323. addOrgPhysicalDefenseConstruction(this.orgform).then((response) => {
  1324. this.$modal.msgSuccess("新增成功");
  1325. this.orgopen = false;
  1326. this.getOrgPhysicalDefenseConstructionInfo();
  1327. });
  1328. }
  1329. this.orgimgs = [];
  1330. } else {
  1331. // 表单验证未通过,显示错误信息
  1332. }
  1333. });
  1334. // this.$refs["orgform"].validate((valid) => {
  1335. // if (valid) {
  1336. // }
  1337. // });
  1338. },
  1339. /** 删除按钮操作 */
  1340. handleOrgDelete(row) {
  1341. const orgids = row.id || this.orgids;
  1342. this.$modal
  1343. .confirm("确认删除?")
  1344. .then(function () {
  1345. return delOrgPhysicalDefenseConstruction(orgids);
  1346. })
  1347. .then(() => {
  1348. this.getOrgPhysicalDefenseConstructionInfo();
  1349. this.$modal.msgSuccess("删除成功");
  1350. })
  1351. .catch(() => {});
  1352. },
  1353. saveExtend() {
  1354. let dat = {
  1355. orgType: this.orgType,
  1356. weatherAreaCode: this.weatherAreaCode,
  1357. askariCertificate:
  1358. this.imgs.length > 0
  1359. ? this.imgs[this.imgs.length - 1].toString(",")
  1360. : null,
  1361. premisesArea: this.premisesArea,
  1362. ownership: this.ownership,
  1363. outsideArea: this.outsideArea,
  1364. askari: this.askari ? 1 : 0,
  1365. businessLibraryType: this.businessLibraryType,
  1366. dutyMode: this.dutyMode,
  1367. remoteControl: this.remoteControl ? 1 : 0,
  1368. selfServiceBank: this.selfServiceBank ? 1 : 0,
  1369. businessLibrary: this.businessLibrary ? 1 : 0,
  1370. lobbyEquipment: this.lobbyEquipment,
  1371. wallPenetratingEquipment: this.wallPenetratingEquipment,
  1372. platformBrand: this.platformBrand,
  1373. platformSupplierBrand: this.platformSupplierBrand,
  1374. constructionTime: this.constructionTime,
  1375. lastUpdateTime: this.lastUpdateTime,
  1376. orgId: this.$route.params.id,
  1377. id: this.extendId,
  1378. detachedLobbyEquipment: this.detachedLobbyEquipment,
  1379. detachedWallPenetratingEquipment: this.detachedWallPenetratingEquipment,
  1380. cashAddingRoomRemoteControl: this.cashAddingRoomRemoteControl,
  1381. };
  1382. // console.log(dat);
  1383. if (this.extendId) {
  1384. updateExtend(dat).then((res) => {
  1385. this.$modal.msgSuccess("保存成功");
  1386. // this.$router.go(-1);
  1387. this.$tab.closePageAndPushPrev();
  1388. });
  1389. } else {
  1390. addExtend(dat).then((res) => {
  1391. this.$modal.msgSuccess("保存成功");
  1392. // this.$router.go(-1);
  1393. this.$tab.closePageAndPushPrev();
  1394. });
  1395. }
  1396. },
  1397. nosaveExtend() {
  1398. // this.$router.go(-1);
  1399. this.$tab.closePageAndPushPrev();
  1400. },
  1401. triggerFileInput() {
  1402. this.$refs.fileInput.click();
  1403. },
  1404. async handleFileChange(event) {
  1405. const file = event.target.files[0];
  1406. if (!file) return;
  1407. // // 创建 FormData 对象并添加文件
  1408. // const formData = new FormData();
  1409. // formData.append("file", file);
  1410. // // 发送文件到您的文件上传 API
  1411. try {
  1412. uploadFile(file, "org").then((res) => {
  1413. console.log(res);
  1414. // this.orgform.certificateEvidence = res.data;
  1415. });
  1416. // 处理上传成功的逻辑
  1417. console.log("上传成功");
  1418. } catch (error) {
  1419. // 处理上传失败的逻辑
  1420. console.log("上传失败");
  1421. }
  1422. // try {
  1423. // const response = await request.post('http://localhost:9527/dev-api/file/file/upload', formData, {
  1424. // headers: {
  1425. // 'Content-Type': 'multipart/form-data',
  1426. // },
  1427. // });
  1428. // // 处理上传成功的逻辑
  1429. // console.log('上传成功', response);
  1430. // } catch (error) {
  1431. // // 处理上传失败的逻辑
  1432. // console.log('上传失败', error);
  1433. // }
  1434. // 重置 input 元素,以便下次选择相同文件时仍能触发 change 事件
  1435. event.target.value = "";
  1436. },
  1437. },
  1438. fillter: {},
  1439. };
  1440. </script>
  1441. <style scoped lang="scss">
  1442. .title {
  1443. font-size: 18px;
  1444. text-align: left;
  1445. color: #008cd6;
  1446. height: 36px;
  1447. line-height: 36px;
  1448. padding-left: 8px;
  1449. margin: 0;
  1450. }
  1451. .info-box {
  1452. margin: 30px;
  1453. }
  1454. .demo-form-inline {
  1455. }
  1456. .dialog-footer {
  1457. }
  1458. .container {
  1459. }
  1460. .zoom-image {
  1461. transition: transform 0.3s ease;
  1462. }
  1463. .zoom-image:hover {
  1464. transform: scale(1.02);
  1465. }
  1466. .border-color-change {
  1467. border: 1px solid #ccc;
  1468. transition: border-color 0.3s ease;
  1469. }
  1470. .border-color-change:hover {
  1471. border-color: #1ea8e9;
  1472. /* 您可以将此颜色更改为所需的颜色 */
  1473. }
  1474. </style>