extend.vue 49 KB

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