extend.vue 38 KB

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