extend.vue 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250
  1. <template>
  2. <div class="app-container">
  3. <h3 class="title">同步信息</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="机构类型">一级机构</el-descriptions-item> -->
  13. </el-descriptions>
  14. </div>
  15. <h3 class="title">补充基础信息</h3>
  16. <div class="info-box">
  17. <el-form
  18. inline
  19. class="demo-form-inline"
  20. label-position="left"
  21. label-width="120px"
  22. >
  23. <el-row>
  24. <el-col :span="8">
  25. <el-form-item label="机构类型">
  26. <el-select v-model="orgType" placeholder="机构类型">
  27. <el-option
  28. v-for="(orgTyp, key) in orgTypes"
  29. :key="key"
  30. :label="orgTyp.label"
  31. :value="orgTyp.value"
  32. ></el-option>
  33. </el-select>
  34. </el-form-item>
  35. </el-col>
  36. <el-col :span="8">
  37. <el-form-item v-if="!orgType" label="天气区域编码">
  38. <el-input
  39. v-model="weatherAreaCode"
  40. placeholder="天气区域编码"
  41. ></el-input>
  42. </el-form-item>
  43. </el-col>
  44. <el-col :span="8">
  45. <el-form-item v-if="!orgType" label="营业场所面积">
  46. <el-input
  47. v-model="premisesArea"
  48. placeholder="营业场所面积"
  49. ></el-input>
  50. </el-form-item>
  51. </el-col>
  52. <el-col :span="8">
  53. <el-form-item
  54. v-if="orgType"
  55. label="建设时间"
  56. prop="constructionTime"
  57. >
  58. <el-date-picker
  59. clearable
  60. v-model="constructionTime"
  61. type="date"
  62. value-format="yyyy-MM-dd HH:mm:ss"
  63. placeholder="请选择建设时间"
  64. >
  65. </el-date-picker>
  66. </el-form-item>
  67. </el-col>
  68. <el-col :span="8">
  69. <el-form-item
  70. v-if="orgType"
  71. label="最近一次更新"
  72. prop="lastUpdateTime"
  73. >
  74. <el-date-picker
  75. clearable
  76. v-model="lastUpdateTime"
  77. type="date"
  78. value-format="yyyy-MM-dd HH:mm:ss"
  79. placeholder="请选择更新日期"
  80. >
  81. </el-date-picker>
  82. </el-form-item>
  83. </el-col>
  84. <el-col :span="8">
  85. <el-form-item v-if="orgType" label="平台品牌">
  86. <el-select v-model="platformBrand" placeholder="平台品牌">
  87. <el-option
  88. v-for="(platformB, key) in platformBrands"
  89. :key="key"
  90. :label="platformB.label"
  91. :value="platformB.value"
  92. ></el-option>
  93. </el-select>
  94. </el-form-item>
  95. </el-col>
  96. <el-col :span="8">
  97. <el-form-item v-if="orgType" label="平台供应商品牌">
  98. <el-select
  99. v-model="platformSupplierBrand"
  100. placeholder="平台供应商品牌"
  101. >
  102. <el-option
  103. v-for="(platformSupplierB, key) in platformSupplierBrands"
  104. :key="key"
  105. :label="platformSupplierB.label"
  106. :value="platformSupplierB.value"
  107. ></el-option>
  108. </el-select>
  109. </el-form-item>
  110. </el-col>
  111. </el-row>
  112. </el-form>
  113. </div>
  114. <div v-if="!orgType" class="info-box">
  115. <!-- 下拉框选择 -->
  116. <div>
  117. <el-switch
  118. v-model="ownership"
  119. active-text
  120. inactive-text="是否自有产权"
  121. :active-value="1"
  122. :inactive-value="0"
  123. ></el-switch>
  124. <el-switch
  125. style="margin-left: 50px"
  126. v-model="outsideArea"
  127. active-text
  128. inactive-text="是否区域外"
  129. :active-value="1"
  130. :inactive-value="0"
  131. ></el-switch>
  132. </div>
  133. <!-- 表格 -->
  134. <div style="margin-top: 30px">
  135. <el-button
  136. style="margin-bottom: 20px"
  137. type="primary"
  138. plain
  139. icon="el-icon-plus"
  140. size="mini"
  141. @click="handleOrgAdd"
  142. v-hasPermi="['system:construction:add']"
  143. >新增</el-button
  144. >
  145. <el-table
  146. border
  147. size="small"
  148. v-loading="orgloading"
  149. :data="constructionList"
  150. @selection-change="handleOrgSelectionChange"
  151. >
  152. <el-table-column type="selection" width="55" align="center" />
  153. <el-table-column label="序号" align="center" prop="id" />
  154. <el-table-column label="标准" align="center" prop="standard" />
  155. <el-table-column
  156. label="达标日期"
  157. align="center"
  158. prop="dateOfCompliance"
  159. width="180"
  160. >
  161. <template slot-scope="scope">
  162. <span>{{ formatTime(scope.row.dateOfCompliance) }}</span>
  163. </template>
  164. </el-table-column>
  165. <!-- <el-table-column
  166. label="证书佐证"
  167. align="center"
  168. prop="certificateEvidence"
  169. >
  170. <template slot-scope="scope">
  171. <span v-if="scope.row.certificateEvidence > 0">是</span>
  172. <span v-else>否</span>
  173. </template></el-table-column
  174. > -->
  175. <!-- <el-table-column label="证书" align="center" prop="certificate" />
  176. <el-table-column label="佐证" align="center" prop="evidence" /> -->
  177. <el-table-column
  178. v-if="false"
  179. label="机构id"
  180. align="center"
  181. prop="orgId"
  182. />
  183. <el-table-column
  184. label="操作"
  185. align="center"
  186. class-name="small-padding fixed-width"
  187. >
  188. <template slot-scope="scope">
  189. <el-button
  190. size="mini"
  191. type="text"
  192. icon="el-icon-edit"
  193. @click="handleOrgUpdate(scope.row)"
  194. v-hasPermi="['system:construction:edit']"
  195. >查看证书</el-button
  196. >
  197. <el-button
  198. size="mini"
  199. type="text"
  200. icon="el-icon-edit"
  201. @click="handleOrgUpdate(scope.row)"
  202. v-hasPermi="['system:construction:edit']"
  203. >修改</el-button
  204. >
  205. <el-button
  206. size="mini"
  207. type="text"
  208. icon="el-icon-delete"
  209. @click="handleOrgDelete(scope.row)"
  210. v-hasPermi="['system:construction:remove']"
  211. >删除</el-button
  212. >
  213. </template>
  214. </el-table-column>
  215. </el-table>
  216. </div>
  217. <!-- 上传 -->
  218. <div style="margin-top: 30px">
  219. <el-switch
  220. v-model="askari"
  221. active-text
  222. inactive-text="是否有保安"
  223. :active-value="1"
  224. :inactive-value="0"
  225. ></el-switch>
  226. <div>
  227. </div>
  228. <el-row v-if="askari">
  229. <el-col :span="12" :xs="24">
  230. <p style="font-size: 12px; color: #999;">上传保安证正面</p>
  231. <image-upload :fileSize="2" :type="'alone'"></image-upload>
  232. <!-- <el-image class="zoom-image border-color-change" :src="uploadp" fit="contain" @click="triggerFileInput"></el-image>-->
  233. <!-- <input type="file"-->
  234. <!-- ref="fileInput"-->
  235. <!-- @change="handleFileChange"-->
  236. <!-- style="display: none;"/>-->
  237. </el-col>
  238. <el-col :span="12">
  239. <p style="font-size: 12px; color: #999">上传保安证反面</p>
  240. <image-upload :fileSize="2" :type="'alone'"></image-upload>
  241. <!-- <el-image class="zoom-image border-color-change" :src="uplp" fit="contain"></el-image>-->
  242. </el-col>
  243. </el-row>
  244. </div>
  245. </div>
  246. <div v-if="!orgType">
  247. <h3 class="title">业务库设置</h3>
  248. <div class="info-box">
  249. <el-form inline label-position="left" label-width="100px">
  250. <el-row>
  251. <el-col :span="7">
  252. <el-form-item label="业务库类型">
  253. <el-select v-model="businessLibraryType" placeholder="活动区域">
  254. <el-option
  255. v-for="(businessLibraryTy, key) in businessLibraryTypes"
  256. :key="key"
  257. :label="businessLibraryTy.label"
  258. :value="businessLibraryTy.value"
  259. ></el-option>
  260. </el-select>
  261. </el-form-item>
  262. </el-col>
  263. <el-col :span="7">
  264. <el-form-item label="值守方式">
  265. <el-radio-group v-model="dutyMode">
  266. <el-radio :label="0">同楼异地值守</el-radio>
  267. <el-radio :label="1">远程值守</el-radio>
  268. </el-radio-group>
  269. </el-form-item>
  270. </el-col>
  271. <el-col :span="7">
  272. <el-form-item label="业务库出入口远程控制" label-width="150">
  273. <el-switch
  274. v-model="remoteControl"
  275. active-text
  276. inactive-text
  277. :active-value="1"
  278. :inactive-value="0"
  279. ></el-switch>
  280. </el-form-item>
  281. </el-col>
  282. </el-row>
  283. </el-form>
  284. </div>
  285. <div class="info-box">
  286. <el-button
  287. style="margin-bottom: 20px"
  288. type="primary"
  289. plain
  290. icon="el-icon-plus"
  291. size="mini"
  292. @click="handleBusinessAdd"
  293. v-hasPermi="['system:BankPhysicalDefenseConstruction:add']"
  294. >新增</el-button
  295. >
  296. <el-table
  297. border
  298. size="small"
  299. v-loading="businessloading"
  300. :data="BusinessPhysicalDefenseConstructionList"
  301. @selection-change="handleBusinessSelectionChange"
  302. >
  303. <el-table-column type="selection" width="55" align="center" />
  304. <el-table-column label="序号" align="center" prop="id" />
  305. <el-table-column label="标准" align="center" prop="standard" />
  306. <el-table-column
  307. label="达标日期"
  308. align="center"
  309. prop="dateOfCompliance"
  310. width="180"
  311. >
  312. <template slot-scope="scope">
  313. <span>{{ formatTime(scope.row.dateOfCompliance) }}</span>
  314. </template>
  315. </el-table-column>
  316. <el-table-column
  317. label="证书佐证"
  318. align="center"
  319. prop="certificateEvidence"
  320. >
  321. <template slot-scope="scope">
  322. <span v-if="scope.row.certificateEvidence > 0">是</span>
  323. <span v-else>否</span>
  324. </template></el-table-column
  325. >
  326. <!-- <el-table-column label="证书" align="center" prop="certificate">
  327. </el-table-column>
  328. <el-table-column label="佐证" align="center" prop="evidence" /> -->
  329. <el-table-column
  330. v-if="false"
  331. label="机构id"
  332. align="center"
  333. prop="orgId"
  334. />
  335. <el-table-column
  336. label="操作"
  337. align="center"
  338. class-name="small-padding fixed-width"
  339. >
  340. <template slot-scope="scope">
  341. <el-button
  342. size="mini"
  343. type="text"
  344. icon="el-icon-edit"
  345. @click="handleBusinessUpdate(scope.row)"
  346. v-hasPermi="['system:construction:edit']"
  347. >查看证书</el-button
  348. >
  349. <el-button
  350. size="mini"
  351. type="text"
  352. icon="el-icon-edit"
  353. @click="handleBusinessUpdate(scope.row)"
  354. v-hasPermi="['system:BankPhysicalDefenseConstruction:edit']"
  355. >修改</el-button
  356. >
  357. <el-button
  358. size="mini"
  359. type="text"
  360. icon="el-icon-delete"
  361. @click="handleBusinessDelete(scope.row)"
  362. v-hasPermi="['system:BankPhysicalDefenseConstruction:remove']"
  363. >删除</el-button
  364. >
  365. </template>
  366. </el-table-column>
  367. </el-table>
  368. </div>
  369. <h3 class="title">在行自助银行设置</h3>
  370. <div class="info-box">
  371. <el-switch
  372. v-model="selfServiceBank"
  373. active-text
  374. inactive-text="是否有在行自助银行"
  375. :active-value="1"
  376. :inactive-value="0"
  377. ></el-switch>
  378. <span style="margin-left: 50px">在行式大堂设备</span>
  379. <div style="display: inline-block; width: 200px">
  380. <el-input-number
  381. style="margin-left: 10px"
  382. v-model="lobbyEquipment"
  383. controls-position="right"
  384. @change="handleChange"
  385. :min="1"
  386. :max="10"
  387. ></el-input-number>
  388. </div>
  389. <span style="margin-left: 50px">在行式穿墙设备</span>
  390. <div style="display: inline-block; width: 200px">
  391. <el-input-number
  392. style="margin-left: 10px"
  393. v-model="wallPenetratingEquipment"
  394. controls-position="right"
  395. @change="handleChange"
  396. :min="1"
  397. :max="10"
  398. ></el-input-number>
  399. </div>
  400. </div>
  401. <div class="info-box">
  402. <el-button
  403. style="margin-bottom: 20px"
  404. type="primary"
  405. plain
  406. icon="el-icon-plus"
  407. size="mini"
  408. @click="handleBankAdd"
  409. v-hasPermi="['system:BankPhysicalDefenseConstruction:add']"
  410. >新增</el-button
  411. >
  412. <el-table
  413. border
  414. size="small"
  415. v-loading="bankloading"
  416. :data="BankPhysicalDefenseConstructionList"
  417. @selection-change="handleBankSelectionChange"
  418. >
  419. <el-table-column type="selection" width="55" align="center" />
  420. <el-table-column label="序号" align="center" prop="id" />
  421. <el-table-column label="标准" align="center" prop="standard" />
  422. <el-table-column
  423. label="达标日期"
  424. align="center"
  425. prop="dateOfCompliance"
  426. width="180"
  427. >
  428. <template slot-scope="scope">
  429. <span>{{ formatTime(scope.row.dateOfCompliance) }}</span>
  430. </template>
  431. </el-table-column>
  432. <el-table-column
  433. label="证书佐证"
  434. align="center"
  435. prop="certificateEvidence"
  436. >
  437. <template slot-scope="scope">
  438. <span v-if="scope.row.certificateEvidence > 0">是</span>
  439. <span v-else>否</span>
  440. </template></el-table-column
  441. >
  442. <!-- <el-table-column label="证书" align="center" prop="certificate" />
  443. <el-table-column label="佐证" align="center" prop="evidence" /> -->
  444. <el-table-column
  445. v-if="false"
  446. label="机构id"
  447. align="center"
  448. prop="orgId"
  449. />
  450. <el-table-column
  451. label="操作"
  452. align="center"
  453. class-name="small-padding fixed-width"
  454. >
  455. <template slot-scope="scope">
  456. <el-button
  457. size="mini"
  458. type="text"
  459. icon="el-icon-edit"
  460. @click="handleBankUpdate(scope.row)"
  461. v-hasPermi="['system:construction:edit']"
  462. >查看证书</el-button
  463. >
  464. <el-button
  465. size="mini"
  466. type="text"
  467. icon="el-icon-edit"
  468. @click="handleBankUpdate(scope.row)"
  469. v-hasPermi="['system:BankPhysicalDefenseConstruction:edit']"
  470. >修改</el-button
  471. >
  472. <el-button
  473. size="mini"
  474. type="text"
  475. icon="el-icon-delete"
  476. @click="handleBankDelete(scope.row)"
  477. v-hasPermi="['system:BankPhysicalDefenseConstruction:remove']"
  478. >删除</el-button
  479. >
  480. </template>
  481. </el-table-column>
  482. </el-table>
  483. </div>
  484. </div>
  485. <div style="margin-top: 50px; margin-left: 42%">
  486. <el-button type="primary" @click="saveExtend" size="small"
  487. >提交</el-button
  488. >
  489. <el-button type="primary" @click="nosaveExtend" size="small"
  490. >取消</el-button
  491. >
  492. </div>
  493. <!-- 添加或修改业务库物防建设对话框 -->
  494. <el-dialog
  495. :title="Businesstitle"
  496. :visible.sync="Businessopen"
  497. width="500px"
  498. append-to-body
  499. >
  500. <el-form ref="Businessform" :model="Businessform" label-width="80px">
  501. <el-form-item label="标准" prop="standard">
  502. <el-input v-model="Businessform.standard" placeholder="请输入标准" />
  503. </el-form-item>
  504. <el-form-item label="达标日期" prop="dateOfCompliance">
  505. <el-date-picker
  506. clearable
  507. v-model="Businessform.dateOfCompliance"
  508. type="datetime"
  509. value-format="yyyy-MM-dd HH:mm:ss"
  510. placeholder="请选择达标日期"
  511. >
  512. </el-date-picker>
  513. </el-form-item>
  514. <el-form-item label="证书佐证" prop="certificateEvidence">
  515. <el-switch
  516. v-model="Businessform.certificateEvidence"
  517. active-text
  518. :active-value="1"
  519. :inactive-value="0"
  520. ></el-switch>
  521. </el-form-item>
  522. <el-form-item v-if="Businessform.certificateEvidence" label="证书" prop="certificate">
  523. <el-input
  524. v-if="false"
  525. v-model="Businessform.certificate"
  526. placeholder="请输入证书"
  527. />
  528. <div class="image-container" style="margin-left: 20px">
  529. <p style="font-size: 12px; color: #999">上传证书</p>
  530. <image-upload :limit="1" :fileSize="2"></image-upload>
  531. <!-- <el-image class="zoom-image border-color-change" :src="uploadp" fit="contain" @click="triggerFileInput"></el-image>-->
  532. <!-- <input type="file"-->
  533. <!-- ref="fileInput"-->
  534. <!-- @change="handleFileChange"-->
  535. <!-- style="display: none;"/>-->
  536. </div>
  537. </el-form-item>
  538. <el-form-item v-if="false" label="佐证" prop="evidence">
  539. <el-input v-model="Businessform.evidence" placeholder="请输入佐证" />
  540. </el-form-item>
  541. <el-form-item v-if="false" label="机构id" prop="orgId">
  542. <el-input v-model="Businessform.orgId" placeholder="请输入机构id" />
  543. </el-form-item>
  544. </el-form>
  545. <div slot="footer" class="dialog-footer">
  546. <el-button type="primary" @click="submitBusinessForm">确 定</el-button>
  547. <el-button @click="Businesscancel">取 消</el-button>
  548. </div>
  549. </el-dialog>
  550. <!-- 添加或修改银行物防建设对话框 -->
  551. <el-dialog
  552. :title="Banktitle"
  553. :visible.sync="Bankopen"
  554. width="500px"
  555. append-to-body
  556. >
  557. <el-form ref="Bankform" :model="Bankform" label-width="80px">
  558. <el-form-item label="标准" prop="standard">
  559. <el-input v-model="Bankform.standard" placeholder="请输入标准" />
  560. </el-form-item>
  561. <el-form-item label="达标日期" prop="dateOfCompliance">
  562. <el-date-picker
  563. clearable
  564. v-model="Bankform.dateOfCompliance"
  565. type="datetime"
  566. value-format="yyyy-MM-dd HH:mm:ss"
  567. placeholder="请选择达标日期"
  568. >
  569. </el-date-picker>
  570. </el-form-item>
  571. <el-form-item label="证书佐证" prop="certificateEvidence">
  572. <!-- <el-input
  573. v-model="Bankform.certificateEvidence"
  574. placeholder="请输入证书佐证"
  575. /> -->
  576. <el-switch
  577. v-model="Bankform.certificateEvidence"
  578. active-text
  579. :active-value="1"
  580. :inactive-value="0"
  581. ></el-switch>
  582. </el-form-item>
  583. <el-form-item v-if="Bankform.certificateEvidence" label="证书" prop="certificate">
  584. <el-input
  585. v-if="false"
  586. v-model="Bankform.certificate"
  587. placeholder="请输入证书"
  588. />
  589. <div class="image-container" style="margin-left: 20px">
  590. <p style="font-size: 12px; color: #999">上传证书</p>
  591. <image-upload :limit="1" :fileSize="2"></image-upload>
  592. <!-- <el-image class="zoom-image border-color-change" :src="uploadp" fit="contain" @click="triggerFileInput"></el-image>-->
  593. <!-- <input type="file"-->
  594. <!-- ref="fileInput"-->
  595. <!-- @change="handleFileChange"-->
  596. <!-- style="display: none;"/>-->
  597. </div>
  598. </el-form-item>
  599. <el-form-item v-if="false" label="佐证" prop="evidence">
  600. <el-input v-model="Bankform.evidence" placeholder="请输入佐证" />
  601. </el-form-item>
  602. <el-form-item v-if="false" label="机构id" prop="orgId">
  603. <el-input v-model="Bankform.orgId" placeholder="请输入机构id" />
  604. </el-form-item>
  605. </el-form>
  606. <div slot="footer" class="dialog-footer">
  607. <el-button type="primary" @click="submitBankForm">确 定</el-button>
  608. <el-button @click="Bankcancel">取 消</el-button>
  609. </div>
  610. </el-dialog>
  611. <el-dialog
  612. :title="orgtitle"
  613. :visible.sync="orgopen"
  614. width="500px"
  615. append-to-body
  616. >
  617. <el-form ref="orgform" :model="orgform" label-width="80px">
  618. <el-form-item label="标准" prop="standard">
  619. <el-input v-model="orgform.standard" placeholder="请输入标准" />
  620. </el-form-item>
  621. <el-form-item label="达标日期" prop="dateOfCompliance">
  622. <el-date-picker
  623. clearable
  624. v-model="orgform.dateOfCompliance"
  625. type="datetime"
  626. value-format="yyyy-MM-dd HH:mm:ss"
  627. placeholder="请选择达标日期"
  628. >
  629. </el-date-picker>
  630. </el-form-item>
  631. <el-form-item label="证书佐证" prop="certificateEvidence">
  632. <el-switch
  633. v-model="orgform.certificateEvidence"
  634. active-text
  635. :active-value="1"
  636. :inactive-value="0"
  637. ></el-switch>
  638. </el-form-item>
  639. <el-form-item v-if="orgform.certificateEvidence" label="证书" prop="certificate">
  640. <el-input v-if="false" v-model="orgform.certificate" placeholder="请输入证书" />
  641. <div class="image-container" style="margin-left: 20px">
  642. <p style="font-size: 12px; color: #999">上传证书</p>
  643. <image-upload :limit="1" :fileSize="2"></image-upload>
  644. </div>
  645. </el-form-item>
  646. <el-form-item v-if="false" label="佐证" prop="evidence">
  647. <el-input v-model="orgform.evidence" placeholder="请输入佐证" />
  648. </el-form-item>
  649. <el-form-item v-if="false" label="机构id" prop="orgId">
  650. <el-input v-model="orgform.orgId" placeholder="请输入机构id" />
  651. </el-form-item>
  652. </el-form>
  653. <div slot="footer" class="dialog-footer">
  654. <el-button type="primary" @click="submitOrgForm">确 定</el-button>
  655. <el-button @click="orgcancel">取 消</el-button>
  656. </div>
  657. </el-dialog>
  658. </div>
  659. </template>
  660. <script>
  661. import uploadpng from "@/assets/images/upload.png";
  662. import uplpng from "@/assets/images/upl.png";
  663. import request from "@/utils/request";
  664. import {
  665. listExtend,
  666. getExtend,
  667. addExtend,
  668. updateExtend,
  669. delExtend,
  670. getExtendByOrgId,
  671. uploadFile,
  672. } from "@/api/system/extend";
  673. import {
  674. listDept,
  675. getDept,
  676. delDept,
  677. addDept,
  678. updateDept,
  679. listDeptExcludeChild,
  680. } from "@/api/system/dept";
  681. import {
  682. listOrgPhysicalDefenseConstruction,
  683. getOrgPhysicalDefenseConstruction,
  684. addOrgPhysicalDefenseConstruction,
  685. updateOrgPhysicalDefenseConstruction,
  686. delOrgPhysicalDefenseConstruction,
  687. } from "@/api/system/OrgPhysicalDefenseConstruction";
  688. export default {
  689. props: [],
  690. components: {},
  691. data() {
  692. return {
  693. //基础信息key
  694. infoKeys: [
  695. { label: "机构名称", key: "name" },
  696. { label: "机构组织类型", key: "type" },
  697. { label: "部门机构电话", key: "phone" },
  698. { label: "部门机构地址", key: "address" },
  699. { label: "排序号", key: "sort" },
  700. { label: "是否可用", key: "isLock" },
  701. { label: "更新时间", key: "updateTime" },
  702. { label: "同步时间", key: "createTime" },
  703. ],
  704. dataInfo: [],
  705. //机构补充信息
  706. extendId: null,
  707. orgType: 1,
  708. weatherAreaCode: null,
  709. premisesArea: null,
  710. ownership: null,
  711. outsideArea: null,
  712. askari: 1,
  713. businessLibraryType: 1,
  714. dutyMode: 0,
  715. remoteControl: null,
  716. selfServiceBank: null,
  717. lobbyEquipment: 1,
  718. wallPenetratingEquipment: 2,
  719. platformBrand: null,
  720. platformSupplierBrand: null,
  721. constructionTime: null,
  722. lastUpdateTime: null,
  723. //机构建设数据
  724. // 遮罩层
  725. orgloading: true,
  726. businessloading: true,
  727. // 选中数组
  728. orgids: [],
  729. // 选中数组
  730. Bankids: [],
  731. Businessids: [],
  732. // 非单个禁用
  733. single: true,
  734. // 非多个禁用
  735. multiple: true,
  736. // 显示搜索条件
  737. showSearch: true,
  738. // 总条数
  739. total: 0,
  740. // 机构物防建设表格数据
  741. constructionList: [],
  742. // 银行物防建设表格数据
  743. BankPhysicalDefenseConstructionList: [],
  744. BusinessPhysicalDefenseConstructionList: [],
  745. // 弹出层标题
  746. orgtitle: "",
  747. Businesstitle: "",
  748. // 弹出层标题
  749. Banktitle: "",
  750. // 是否显示弹出层
  751. Bankopen: false,
  752. Businessopen: false,
  753. // 表单参数
  754. Bankform: {},
  755. Businessform: {},
  756. // 是否显示弹出层
  757. Businessopen: false,
  758. orgopen: false,
  759. // 表单参数
  760. orgform: {},
  761. //2个图片信息
  762. uploadp: uploadpng,
  763. uplp: uplpng,
  764. //下拉框生成信息
  765. orgTypes: {
  766. orgTyp1: { label: "营业网点", value: 0 },
  767. orgTyp2: { label: "监控中心", value: 1 },
  768. },
  769. businessLibraryTypes: {
  770. businessLibraryTyp1: { label: "1类业务库", value: 1 },
  771. businessLibraryTyp2: { label: "2类业务库", value: 2 },
  772. businessLibraryTyp3: { label: "3类业务库", value: 3 },
  773. },
  774. platformBrands: {
  775. platformBrand1: { label: "品牌1", value: 0 },
  776. platformBrand2: { label: "品牌2", value: 1 },
  777. },
  778. platformSupplierBrands: {
  779. platformSupplierBrand1: { label: "品牌1", value: 0 },
  780. platformSupplierBrand2: { label: "品牌2", value: 1 },
  781. },
  782. prop: "",
  783. propItem: "",
  784. row: "",
  785. };
  786. },
  787. watch: {},
  788. computed: {
  789. switchModel: {
  790. get() {
  791. return this.switchValue === 1; // 将0转换为false,1转换为true
  792. },
  793. set(value) {
  794. this.switchValue = value ? 1 : 0; // 将false转换为0,true转换为1
  795. },
  796. },
  797. },
  798. created() {
  799. this.getOrgInfo();
  800. this.getExtendInfo();
  801. this.getOrgPhysicalDefenseConstructionInfo();
  802. this.getBankPhysicalDefenseConstructionInfo();
  803. this.getBusinessPhysicalDefenseConstructionInfo();
  804. },
  805. mounted() {},
  806. methods: {
  807. request() {},
  808. handleChange(value) {},
  809. getOrgInfo() {
  810. getDept(this.$route.params.id).then((data) => {
  811. // console.log(data.data);
  812. if (!data.data) return;
  813. let res = data.data;
  814. this.dataInfo = this.infoKeys.map((v, i) => {
  815. console.log(v, res[v.key], "vvvvv");
  816. v.value = res[v.key];
  817. return v;
  818. });
  819. console.log(this.dataInfo, "info");
  820. });
  821. },
  822. getExtendInfo() {
  823. getExtendByOrgId(this.$route.params.id).then((data) => {
  824. console.log(data.data);
  825. if (data.data != null) {
  826. this.orgType = data.data.orgType;
  827. this.weatherAreaCode = data.data.weatherAreaCode;
  828. this.premisesArea = data.data.premisesArea;
  829. this.ownership = data.data.ownership;
  830. this.outsideArea = data.data.outsideArea;
  831. this.askari = data.data.askari;
  832. this.remoteControl = data.data.remoteControl;
  833. this.selfServiceBank = data.data.selfServiceBank;
  834. this.lobbyEquipment = data.data.lobbyEquipment;
  835. this.wallPenetratingEquipment = data.data.wallPenetratingEquipment;
  836. this.extendId = data.data.id;
  837. }
  838. });
  839. },
  840. getOrgPhysicalDefenseConstructionInfo() {
  841. this.orgloading = true;
  842. let dat = { orgId: this.$route.params.id, type: 1 };
  843. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  844. console.log("机构信息获取成功");
  845. this.constructionList = data.rows;
  846. this.orgloading = false;
  847. });
  848. },
  849. getBankPhysicalDefenseConstructionInfo() {
  850. this.bankloading = true;
  851. let dat = { orgId: this.$route.params.id, type: 3 };
  852. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  853. // console.log(data);
  854. this.BankPhysicalDefenseConstructionList = data.rows;
  855. this.bankloading = false;
  856. });
  857. },
  858. getBusinessPhysicalDefenseConstructionInfo() {
  859. this.businessloading = true;
  860. let dat = { orgId: this.$route.params.id, type: 2 };
  861. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  862. // console.log(data);
  863. this.BusinessPhysicalDefenseConstructionList = data.rows;
  864. this.businessloading = false;
  865. });
  866. },
  867. // 取消按钮
  868. Businesscancel() {
  869. this.Businessopen = false;
  870. this.Businessreset();
  871. },
  872. // 表单重置
  873. Businessreset() {
  874. this.Businessform = {
  875. id: null,
  876. standard: null,
  877. dateOfCompliance: null,
  878. certificateEvidence: null,
  879. certificate: null,
  880. evidence: null,
  881. createTime: null,
  882. updateTime: null,
  883. createBy: null,
  884. updateBy: null,
  885. orgId: null,
  886. };
  887. this.resetForm("Businessform");
  888. },
  889. // 多选框选中数据
  890. handleBusinessSelectionChange(selection) {
  891. this.Businessids = selection.map((item) => item.id);
  892. this.single = selection.length !== 1;
  893. this.multiple = !selection.length;
  894. },
  895. /** 新增按钮操作 */
  896. handleBusinessAdd() {
  897. this.Businessreset();
  898. this.Businessopen = true;
  899. this.Businesstitle = "添加业务库物防建设";
  900. },
  901. /** 修改按钮操作 */
  902. handleBusinessUpdate(row) {
  903. this.Businessreset();
  904. const id = row.id || this.Businessids;
  905. getOrgPhysicalDefenseConstruction(id).then((response) => {
  906. this.Businessform = response.data;
  907. this.Businessopen = true;
  908. this.Businesstitle = "修改业务库物防建设";
  909. });
  910. },
  911. /** 提交按钮 */
  912. submitBusinessForm() {
  913. this.Businessform.orgId = this.$route.params.id;
  914. this.$refs["Businessform"].validate((valid) => {
  915. if (valid) {
  916. this.Businessform.type = 2;
  917. if (this.Businessform.id != null) {
  918. updateOrgPhysicalDefenseConstruction(this.Businessform).then(
  919. (response) => {
  920. this.$modal.msgSuccess("修改成功");
  921. this.Businessopen = false;
  922. this.getBusinessPhysicalDefenseConstructionInfo();
  923. }
  924. );
  925. } else {
  926. addOrgPhysicalDefenseConstruction(this.Businessform).then(
  927. (response) => {
  928. this.$modal.msgSuccess("新增成功");
  929. this.Businessopen = false;
  930. this.getBusinessPhysicalDefenseConstructionInfo();
  931. }
  932. );
  933. }
  934. }
  935. });
  936. },
  937. /** 删除按钮操作 */
  938. handleBusinessDelete(row) {
  939. const Businessids = row.id || this.Businessids;
  940. this.$modal
  941. .confirm(
  942. '是否确认删除银行物防建设编号为"' + Businessids + '"的数据项?'
  943. )
  944. .then(function () {
  945. return delOrgPhysicalDefenseConstruction(Businessids);
  946. })
  947. .then(() => {
  948. this.getBusinessPhysicalDefenseConstructionInfo();
  949. this.$modal.msgSuccess("删除成功");
  950. })
  951. .catch(() => {});
  952. },
  953. // 取消按钮
  954. Bankcancel() {
  955. this.Bankopen = false;
  956. this.Bankreset();
  957. },
  958. // 表单重置
  959. Bankreset() {
  960. this.Bankform = {
  961. id: null,
  962. standard: null,
  963. dateOfCompliance: null,
  964. certificateEvidence: null,
  965. certificate: null,
  966. evidence: null,
  967. createTime: null,
  968. updateTime: null,
  969. createBy: null,
  970. updateBy: null,
  971. orgId: null,
  972. };
  973. this.resetForm("Bankform");
  974. },
  975. // 多选框选中数据
  976. handleBankSelectionChange(selection) {
  977. this.Bankids = selection.map((item) => item.id);
  978. this.single = selection.length !== 1;
  979. this.multiple = !selection.length;
  980. },
  981. /** 新增按钮操作 */
  982. handleBankAdd() {
  983. this.Bankreset();
  984. this.Bankopen = true;
  985. this.Banktitle = "添加银行物防建设";
  986. },
  987. /** 修改按钮操作 */
  988. handleBankUpdate(row) {
  989. this.Bankreset();
  990. const id = row.id || this.Bankids;
  991. getOrgPhysicalDefenseConstruction(id).then((response) => {
  992. this.Bankform = response.data;
  993. this.Bankopen = true;
  994. this.Banktitle = "修改银行物防建设";
  995. });
  996. },
  997. /** 提交按钮 */
  998. submitBankForm() {
  999. this.Bankform.orgId = this.$route.params.id;
  1000. this.$refs["Bankform"].validate((valid) => {
  1001. if (valid) {
  1002. this.Bankform.type = 3;
  1003. if (this.Bankform.id != null) {
  1004. updateOrgPhysicalDefenseConstruction(this.Bankform).then(
  1005. (response) => {
  1006. this.$modal.msgSuccess("修改成功");
  1007. this.Bankopen = false;
  1008. this.getBankPhysicalDefenseConstructionInfo();
  1009. }
  1010. );
  1011. } else {
  1012. addOrgPhysicalDefenseConstruction(this.Bankform).then(
  1013. (response) => {
  1014. this.$modal.msgSuccess("新增成功");
  1015. this.Bankopen = false;
  1016. this.getBankPhysicalDefenseConstructionInfo();
  1017. }
  1018. );
  1019. }
  1020. }
  1021. });
  1022. },
  1023. /** 删除按钮操作 */
  1024. handleBankDelete(row) {
  1025. const Bankids = row.id || this.Bankids;
  1026. this.$modal
  1027. .confirm('是否确认删除银行物防建设编号为"' + Bankids + '"的数据项?')
  1028. .then(function () {
  1029. return delOrgPhysicalDefenseConstruction(Bankids);
  1030. })
  1031. .then(() => {
  1032. this.getBankPhysicalDefenseConstructionInfo();
  1033. this.$modal.msgSuccess("删除成功");
  1034. })
  1035. .catch(() => {});
  1036. },
  1037. // 表单重置
  1038. orgreset() {
  1039. this.orgform = {
  1040. id: null,
  1041. standard: null,
  1042. dateOfCompliance: null,
  1043. certificateEvidence: null,
  1044. certificate: null,
  1045. evidence: null,
  1046. createTime: null,
  1047. updateTime: null,
  1048. createBy: null,
  1049. updateBy: null,
  1050. orgId: null,
  1051. };
  1052. this.resetForm("orgform");
  1053. },
  1054. // 取消按钮
  1055. orgcancel() {
  1056. this.orgopen = false;
  1057. this.orgreset();
  1058. },
  1059. // 多选框选中数据
  1060. handleOrgSelectionChange(selection) {
  1061. this.orgids = selection.map((item) => item.id);
  1062. this.single = selection.length !== 1;
  1063. this.multiple = !selection.length;
  1064. },
  1065. /** 新增按钮操作 */
  1066. handleOrgAdd() {
  1067. this.orgreset();
  1068. this.orgopen = true;
  1069. this.orgtitle = "添加机构物防建设";
  1070. },
  1071. /** 修改按钮操作 */
  1072. handleOrgUpdate(row) {
  1073. this.orgreset();
  1074. const id = row.id || this.orgids;
  1075. getOrgPhysicalDefenseConstruction(id).then((response) => {
  1076. // console.log(response)
  1077. this.orgform = response.data;
  1078. this.orgopen = true;
  1079. this.orgtitle = "修改机构物防建设";
  1080. });
  1081. },
  1082. /** 提交按钮 */
  1083. submitOrgForm() {
  1084. this.orgform.orgId = this.$route.params.id;
  1085. this.$refs["orgform"].validate((valid) => {
  1086. if (valid) {
  1087. this.orgform.type = 1;
  1088. if (this.orgform.id != null) {
  1089. updateOrgPhysicalDefenseConstruction(this.orgform).then(
  1090. (response) => {
  1091. this.$modal.msgSuccess("修改成功");
  1092. this.orgopen = false;
  1093. this.getOrgPhysicalDefenseConstructionInfo();
  1094. }
  1095. );
  1096. } else {
  1097. addOrgPhysicalDefenseConstruction(this.orgform).then((response) => {
  1098. this.$modal.msgSuccess("新增成功");
  1099. this.orgopen = false;
  1100. this.getOrgPhysicalDefenseConstructionInfo();
  1101. });
  1102. }
  1103. }
  1104. });
  1105. },
  1106. /** 删除按钮操作 */
  1107. handleOrgDelete(row) {
  1108. const orgids = row.id || this.orgids;
  1109. this.$modal
  1110. .confirm('是否确认删除机构物防建设编号为"' + orgids + '"的数据项?')
  1111. .then(function () {
  1112. return delOrgPhysicalDefenseConstruction(orgids);
  1113. })
  1114. .then(() => {
  1115. this.getOrgPhysicalDefenseConstructionInfo();
  1116. this.$modal.msgSuccess("删除成功");
  1117. })
  1118. .catch(() => {});
  1119. },
  1120. saveExtend() {
  1121. let dat = {
  1122. orgType: this.orgType,
  1123. weatherAreaCode: this.weatherAreaCode,
  1124. premisesArea: this.premisesArea,
  1125. ownership: this.ownership ? 1 : 0,
  1126. outsideArea: this.outsideArea ? 1 : 0,
  1127. askari: this.askari ? 1 : 0,
  1128. businessLibraryType: this.businessLibraryType,
  1129. dutyMode: this.dutyMode,
  1130. remoteControl: this.remoteControl ? 1 : 0,
  1131. selfServiceBank: this.selfServiceBank ? 1 : 0,
  1132. lobbyEquipment: this.lobbyEquipment,
  1133. wallPenetratingEquipment: this.wallPenetratingEquipment,
  1134. platformBrand: this.platformBrand,
  1135. platformSupplierBrand: this.platformSupplierBrand,
  1136. constructionTime: this.constructionTime,
  1137. lastUpdateTime: this.lastUpdateTime,
  1138. orgId: this.$route.params.id,
  1139. id: this.extendId,
  1140. };
  1141. if (this.extendId) {
  1142. updateExtend(dat).then((res) => {
  1143. this.$modal.msgSuccess("保存成功");
  1144. this.$router.go(-1);
  1145. });
  1146. } else {
  1147. addExtend(dat).then((res) => {
  1148. this.$modal.msgSuccess("保存成功");
  1149. this.$router.go(-1);
  1150. });
  1151. }
  1152. },
  1153. nosaveExtend() {
  1154. this.$router.go(-1);
  1155. },
  1156. triggerFileInput() {
  1157. this.$refs.fileInput.click();
  1158. },
  1159. async handleFileChange(event) {
  1160. const file = event.target.files[0];
  1161. if (!file) return;
  1162. // 创建 FormData 对象并添加文件
  1163. const formData = new FormData();
  1164. formData.append("file", file);
  1165. // // 发送文件到您的文件上传 API
  1166. try {
  1167. uploadFile(formData).then((res) => {
  1168. console.log(res);
  1169. // this.orgform.certificateEvidence = res.data;
  1170. });
  1171. // 处理上传成功的逻辑
  1172. console.log("上传成功");
  1173. } catch (error) {
  1174. // 处理上传失败的逻辑
  1175. console.log("上传失败");
  1176. }
  1177. // try {
  1178. // const response = await request.post('http://localhost:9527/dev-api/file/file/upload', formData, {
  1179. // headers: {
  1180. // 'Content-Type': 'multipart/form-data',
  1181. // },
  1182. // });
  1183. // // 处理上传成功的逻辑
  1184. // console.log('上传成功', response);
  1185. // } catch (error) {
  1186. // // 处理上传失败的逻辑
  1187. // console.log('上传失败', error);
  1188. // }
  1189. // 重置 input 元素,以便下次选择相同文件时仍能触发 change 事件
  1190. event.target.value = "";
  1191. },
  1192. },
  1193. fillter: {},
  1194. };
  1195. </script>
  1196. <style scoped lang="scss">
  1197. .title {
  1198. font-size: 18px;
  1199. text-align: left;
  1200. background: #008CD6bd;
  1201. color: #fff;
  1202. height: 36px;
  1203. line-height: 36px;
  1204. padding-left: 8px;
  1205. margin: 0;
  1206. }
  1207. .info-box {
  1208. margin: 30px;
  1209. }
  1210. .demo-form-inline {
  1211. }
  1212. .dialog-footer {
  1213. }
  1214. .container {
  1215. }
  1216. .zoom-image {
  1217. transition: transform 0.3s ease;
  1218. }
  1219. .zoom-image:hover {
  1220. transform: scale(1.02);
  1221. }
  1222. .border-color-change {
  1223. border: 1px solid #ccc;
  1224. transition: border-color 0.3s ease;
  1225. }
  1226. .border-color-change:hover {
  1227. border-color: #1ea8e9; /* 您可以将此颜色更改为所需的颜色 */
  1228. }
  1229. </style>