extend.vue 50 KB

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