index.vue 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="100px"
  9. >
  10. <el-form-item label="单位" prop="unitId" style="margin-left:-60px" label-width="50px">
  11. <!-- <el-input
  12. v-model="queryParams.unitId"
  13. placeholder="请输入单位"
  14. clearable
  15. size="small"
  16. @keyup.enter.native="handleQuery"
  17. /> -->
  18. <treeselect
  19. v-model="queryParams.unitId"
  20. :options="users"
  21. placeholder="请选择到访单位"
  22. class="threeselects"
  23. @select="selectPeo1"
  24. />
  25. </el-form-item>
  26. <el-form-item label="人员" prop="peopleId" label-width="50px" style="margin-left:-50px">
  27. <!-- <el-input
  28. v-model="queryParams.peopleId"
  29. placeholder="请输入人员"
  30. clearable
  31. size="small"
  32. @keyup.enter.native="handleQuery"
  33. /> -->
  34. <el-select v-model="queryParams.name" ref="peoplenames" placeholder="请选择人员">
  35. <el-option
  36. v-for="item in executor"
  37. :key="item.id"
  38. :label="item.name"
  39. :value="item.name"
  40. @click.native="peopleIds1(item.id, item.name)"
  41. />
  42. </el-select>
  43. </el-form-item>
  44. <!-- <el-form-item label="部职别" prop="duty" label-width="110px">
  45. <el-input
  46. v-model="queryParams.duty"
  47. placeholder="请输入部职别"
  48. clearable
  49. size="small"
  50. @keyup.enter.native="handleQuery"
  51. />
  52. </el-form-item>
  53. <el-form-item label="住房待遇等级" prop="grade">
  54. <el-input
  55. v-model="queryParams.grade"
  56. placeholder="请输入住房待遇等级"
  57. clearable
  58. size="small"
  59. @keyup.enter.native="handleQuery"
  60. />
  61. </el-form-item> -->
  62. <el-form-item label="申请住房类别" style="margin-left:-20px" prop="type" >
  63. <!-- <el-select v-model="queryParams.type" placeholder="请选择申请住房类别" clearable size="small">
  64. <el-option label="请选择字典生成" value="" />
  65. </el-select> -->
  66. <el-select v-model="queryParams.type" placeholder="请选择申请住房类别">
  67. <!-- <el-option label="请选择字典生成" value="" /> -->
  68. <el-option
  69. v-for="(item, i) in ziDian"
  70. :key="i"
  71. :label="item.dictLabel"
  72. :value="item.dictLabel"
  73. >
  74. </el-option>
  75. </el-select>
  76. </el-form-item>
  77. <el-form-item>
  78. <el-button
  79. type="primary"
  80. icon="el-icon-search"
  81. size="btr"
  82. @click="handleQuery"
  83. >搜索</el-button
  84. >
  85. <el-button icon="el-icon-refresh" size="btr" @click="resetQuery"
  86. >重置</el-button
  87. >
  88. </el-form-item>
  89. </el-form>
  90. <el-row :gutter="10" class="mb8">
  91. <el-col :span="1.5">
  92. <el-button
  93. type="primary"
  94. plain
  95. icon="el-icon-plus"
  96. size="mini"
  97. @click="handleAdd"
  98. v-hasPermi="['barracksManagement:flats:add']"
  99. >新增</el-button
  100. >
  101. </el-col>
  102. <el-col :span="1.5">
  103. <el-button
  104. type="success"
  105. plain
  106. icon="el-icon-edit"
  107. size="mini"
  108. :disabled="single"
  109. @click="handleUpdate"
  110. v-hasPermi="['barracksManagement:flats:edit']"
  111. >修改</el-button
  112. >
  113. </el-col>
  114. <el-col :span="1.5">
  115. <el-button
  116. type="danger"
  117. plain
  118. icon="el-icon-delete"
  119. size="mini"
  120. :disabled="multiple"
  121. @click="handleDelete"
  122. v-hasPermi="['barracksManagement:flats:remove']"
  123. >删除</el-button
  124. >
  125. </el-col>
  126. <!-- <el-col :span="1.5">
  127. <el-button
  128. type="warning"
  129. plain
  130. icon="el-icon-download"
  131. size="mini"
  132. :loading="exportLoading"
  133. @click="handleExport"
  134. v-hasPermi="['barracksManagement:flats:export']"
  135. >导出</el-button>
  136. </el-col> -->
  137. <right-toolbar
  138. :showSearch.sync="showSearch"
  139. @queryTable="getList"
  140. ></right-toolbar>
  141. </el-row>
  142. <el-table
  143. v-loading="loading"
  144. :data="flatsList"
  145. @selection-change="handleSelectionChange"
  146. >
  147. <el-table-column type="selection" width="55" align="center" />
  148. <el-table-column label="序号" type="index" width="50"> </el-table-column>
  149. <el-table-column
  150. label="单位"
  151. align="center"
  152. prop="unitName"
  153. width="130"
  154. />
  155. <el-table-column
  156. label="人员"
  157. align="center"
  158. prop="peopleName"
  159. width="130"
  160. />
  161. <el-table-column label="部职别" align="center" prop="duty" width="130" />
  162. <el-table-column
  163. label="是否符合申请条件"
  164. align="center"
  165. prop="whether"
  166. width="150"
  167. />
  168. <el-table-column
  169. label="住房待遇等级"
  170. align="center"
  171. prop="grade"
  172. width="150"
  173. />
  174. <el-table-column
  175. label="申请住房户型"
  176. align="center"
  177. prop="houseType"
  178. width="150"
  179. />
  180. <el-table-column
  181. label="出生时间"
  182. align="center"
  183. prop="birthDate"
  184. width="180"
  185. >
  186. <template slot-scope="scope">
  187. <span>{{ parseTime(scope.row.birthDate, "{y}-{m}-{d}") }}</span>
  188. </template>
  189. </el-table-column>
  190. <el-table-column
  191. label="入伍年月"
  192. align="center"
  193. prop="enlistDate"
  194. width="160"
  195. >
  196. <template slot-scope="scope">
  197. <span>{{ parseTime(scope.row.enlistDate, "{y}-{m}-{d}") }}</span>
  198. </template>
  199. </el-table-column>
  200. <el-table-column
  201. label="参加工作时间"
  202. align="center"
  203. prop="jobTime"
  204. width="180"
  205. >
  206. <template slot-scope="scope">
  207. <span>{{ parseTime(scope.row.jobTime, "{y}-{m}-{d}") }}</span>
  208. </template>
  209. </el-table-column>
  210. <el-table-column
  211. label="地方普通高等学校入学时间"
  212. align="center"
  213. prop="entranceDate"
  214. width="180"
  215. >
  216. <template slot-scope="scope">
  217. <span>{{ parseTime(scope.row.entranceDate, "{y}-{m}-{d}") }}</span>
  218. </template>
  219. </el-table-column>
  220. <el-table-column
  221. label="享受相应住房待遇职级时间"
  222. align="center"
  223. prop="jobDate"
  224. width="180"
  225. >
  226. <template slot-scope="scope">
  227. <span>{{ parseTime(scope.row.jobDate, "{y}-{m}-{d}") }}</span>
  228. </template>
  229. </el-table-column>
  230. <el-table-column
  231. label="任现职级时间"
  232. align="center"
  233. prop="jobsDate"
  234. width="150"
  235. >
  236. <template slot-scope="scope">
  237. <span>{{ parseTime(scope.row.jobsDate, "{y}-{m}-{d}") }}</span>
  238. </template>
  239. </el-table-column>
  240. <el-table-column
  241. label="配偶是否军队人员"
  242. align="center"
  243. prop="whethers"
  244. width="150"
  245. />
  246. <el-table-column
  247. label="军衔"
  248. align="center"
  249. prop="rankId"
  250. :formatter="unit4Format"
  251. width="150"
  252. />
  253. <el-table-column
  254. label="军衔时间"
  255. align="center"
  256. prop="rankDate"
  257. width="150"
  258. >
  259. <template slot-scope="scope">
  260. <span>{{ parseTime(scope.row.rankDate, "{y}-{m}-{d}") }}</span>
  261. </template>
  262. </el-table-column>
  263. <el-table-column
  264. label="备注"
  265. align="center"
  266. prop="remark"
  267. show-overflow-tooltip
  268. width="150"
  269. />
  270. <!-- <el-table-column label="登记时间" align="center" prop="createtime" />
  271. <el-table-column label="登记人" align="center" prop="adminId" /> -->
  272. <el-table-column
  273. label="配偶姓名"
  274. align="center"
  275. prop="pName"
  276. width="150"
  277. />
  278. <el-table-column
  279. label="配偶单位"
  280. align="center"
  281. prop="pUnit"
  282. width="150"
  283. />
  284. <el-table-column
  285. label="配偶户口所在地"
  286. align="center"
  287. prop="pAccount"
  288. width="150"
  289. />
  290. <el-table-column label="结婚时间" align="center" prop="pTime" width="150">
  291. <template slot-scope="scope">
  292. <span>{{ parseTime(scope.row.pTime, "{y}-{m}-{d}") }}</span>
  293. </template>
  294. </el-table-column>
  295. <el-table-column
  296. label="配偶入伍或随军时间"
  297. align="center"
  298. prop="pTimeOne"
  299. width="150"
  300. >
  301. <template slot-scope="scope">
  302. <span>{{ parseTime(scope.row.pTimeOne, "{y}-{m}-{d}") }}</span>
  303. </template>
  304. </el-table-column>
  305. <el-table-column
  306. label="配偶现住房"
  307. align="center"
  308. prop="pCeace"
  309. width="150"
  310. />
  311. <el-table-column
  312. label="申请住房类别"
  313. align="center"
  314. prop="type"
  315. width="150"
  316. />
  317. <el-table-column
  318. label="操作"
  319. align="center"
  320. class-name="small-padding fixed-width"
  321. width="150px"
  322. >
  323. <template slot-scope="scope">
  324. <el-button
  325. size="btu"
  326. type="text"
  327. @click="handleUpdate(scope.row)"
  328. v-hasPermi="['barracksManagement:flats:edit']"
  329. >修改</el-button
  330. >
  331. <el-button
  332. size="btd"
  333. type="text"
  334. @click="handleDelete(scope.row)"
  335. v-hasPermi="['barracksManagement:flats:remove']"
  336. >删除</el-button
  337. >
  338. </template>
  339. </el-table-column>
  340. </el-table>
  341. <pagination
  342. v-show="total > 0"
  343. :total="total"
  344. :page.sync="queryParams.pageNum"
  345. :limit.sync="queryParams.pageSize"
  346. @pagination="getList"
  347. />
  348. <!-- 添加或修改公寓住房申请人员资格审查登记对话框 -->
  349. <el-dialog
  350. :title="title"
  351. :visible.sync="open"
  352. width="1190px"
  353. append-to-body
  354. >
  355. <el-form
  356. ref="form"
  357. :model="form"
  358. :rules="rules"
  359. label-width="110px"
  360. :inline="true"
  361. >
  362. <el-form-item label="单位" prop="unitId" style="margin-left:25px">
  363. <!-- <el-input v-model="form.unitId" placeholder="请输入单位" /> -->
  364. <treeselect
  365. v-model="form.unitId"
  366. :options="users"
  367. placeholder="请选择单位"
  368. class="threeselects"
  369. @select="selectPeo"
  370. />
  371. </el-form-item>
  372. <el-form-item label="人员" prop="peopleId" style="margin-left:-50px">
  373. <el-select
  374. v-model="form.peopleId"
  375. placeholder="请选择人员"
  376. ref="peoplenames"
  377. >
  378. <el-option
  379. v-for="item in executor"
  380. :key="item.id"
  381. :label="item.name"
  382. :value="item.id"
  383. @click.native="peopleIds(item.name,item)"
  384. />
  385. </el-select>
  386. </el-form-item>
  387. <el-form-item label="出生时间" style="margin-left:8px" prop="birthDate" placeholder="请选择出生时间">
  388. <el-date-picker
  389. clearable
  390. size="small"
  391. v-model="form.birthDate"
  392. type="date"
  393. value-format="yyyy-MM-dd"
  394. >
  395. </el-date-picker>
  396. </el-form-item>
  397. <el-form-item label="军衔" prop="rankId" style="margin-left:25px">
  398. <!-- <el-input v-model="form.rankId" class="zhufnag" :disabled="true" /> -->
  399. <!-- <el-input v-model="form.rankName" placeholder="请输入军衔" /> -->
  400. <el-select v-model="form.rankId" :disabled="true" placeholder="请选择军衔" >
  401. <!-- <el-option label="请选择字典生成" value="" /> -->
  402. <el-option
  403. v-for="(item, i) in ziDian1"
  404. :key="i"
  405. :label="item.dictLabel"
  406. :value="item.dictSort"
  407. >
  408. </el-option>
  409. </el-select>
  410. </el-form-item>
  411. <el-form-item label="军衔时间" prop="rankDate" style="margin-left:-50px">
  412. <el-date-picker
  413. clearable
  414. size="small"
  415. v-model="form.rankDate"
  416. type="date"
  417. value-format="yyyy-MM-dd"
  418. >
  419. </el-date-picker>
  420. </el-form-item>
  421. <el-form-item label="住房待遇等级" prop="grade" class="zhufnag" style="margin-left:35px">
  422. <el-input v-model="form.grade" class="zhufnag" />
  423. </el-form-item>
  424. <el-form-item label="配偶现住房" prop="pCeace" style="margin-left:25px">
  425. <el-input v-model="form.pCeace" />
  426. </el-form-item>
  427. <el-form-item label="入伍年月" prop="enlistDate" style="margin-left:-50px">
  428. <el-date-picker
  429. clearable
  430. size="small"
  431. v-model="form.enlistDate"
  432. type="date"
  433. value-format="yyyy-MM-dd"
  434. >
  435. </el-date-picker>
  436. </el-form-item>
  437. <el-form-item label="申请住房户型" prop="houseType" style="margin-left:26px">
  438. <!-- <el-select v-model="form.houseType" placeholder="请选择申请住房户型" class="zhufnag">
  439. <el-option label="请选择字典生成" value="" class="zhufnag" /> -->
  440. <el-input v-model="form.houseType" class="zhufnag" />
  441. <!-- </el-select> -->
  442. </el-form-item>
  443. <el-form-item label="部职别" prop="duty" style="margin-left:25px">
  444. <el-input v-model="form.duty" />
  445. </el-form-item>
  446. <el-form-item label="参加工作时间" prop="jobTime" style="margin-left:-50px">
  447. <el-date-picker
  448. clearable
  449. size="small"
  450. v-model="form.jobTime"
  451. type="date"
  452. value-format="yyyy-MM-dd"
  453. >
  454. </el-date-picker>
  455. </el-form-item>
  456. <el-form-item label="任现职级时间" prop="jobsDate" class="zhufnag" style="margin-left:35px">
  457. <el-date-picker
  458. clearable
  459. size="small"
  460. v-model="form.jobsDate"
  461. type="date"
  462. value-format="yyyy-MM-dd"
  463. >
  464. </el-date-picker>
  465. </el-form-item>
  466. <!-- <el-form-item label="登记人" prop="adminId">
  467. <el-input v-model="form.adminId" placeholder="请输入登记人" />
  468. </el-form-item> -->
  469. <el-form-item label="配偶姓名" prop="pName" style="margin-left:25px">
  470. <el-input v-model="form.pName" />
  471. </el-form-item>
  472. <el-form-item label="配偶单位" prop="pUnit" style="margin-left:-50px">
  473. <el-input v-model="form.pUnit" />
  474. </el-form-item>
  475. <el-form-item label="申请住房类别" prop="type" style="margin-left:10px">
  476. <el-select v-model="form.type" placeholder="请选择申请住房类别">
  477. <!-- <el-option label="请选择字典生成" value="" /> -->
  478. <el-option
  479. v-for="(item, i) in ziDian"
  480. :key="i"
  481. :label="item.dictLabel"
  482. :value="item.dictLabel"
  483. >
  484. </el-option>
  485. </el-select>
  486. </el-form-item>
  487. <el-form-item label="配偶户口所在地" prop="pAccount" label-width="130px" style="margin-left:10px">
  488. <el-input v-model="form.pAccount" />
  489. </el-form-item>
  490. <el-form-item label="结婚时间" prop="pTime" style="margin-left:-50px">
  491. <el-date-picker
  492. clearable
  493. size="small"
  494. v-model="form.pTime"
  495. type="date"
  496. value-format="yyyy-MM-dd"
  497. >
  498. </el-date-picker>
  499. </el-form-item>
  500. <el-form-item label="是否符合申请条件" prop="whether" label-width="127px" style="margin-left:4px" >
  501. <el-input v-model="form.whether" />
  502. </el-form-item>
  503. <el-form-item label="配偶是否军队人员(含职工)" class="peious" style="margin-left:-45px" label-width="180px" prop="whethers">
  504. <el-input v-model="form.whethers" />
  505. </el-form-item>
  506. <el-form-item
  507. label="配偶入伍或随军时间"
  508. prop="pTimeOne"
  509. class="peious"
  510. label-width="180px"
  511. >
  512. <el-date-picker
  513. clearable
  514. size="small"
  515. v-model="form.pTimeOne"
  516. type="date"
  517. value-format="yyyy-MM-dd"
  518. >
  519. </el-date-picker>
  520. </el-form-item>
  521. <el-form-item label="地方普通高等学校入学时间" prop="entranceDate" style="margin-left:-44px" class="peious" label-width="180px">
  522. <el-date-picker
  523. clearable
  524. size="small"
  525. v-model="form.entranceDate"
  526. type="date"
  527. value-format="yyyy-MM-dd"
  528. >
  529. </el-date-picker>
  530. </el-form-item>
  531. <el-form-item
  532. label="享受相应住房待遇职级时间"
  533. prop="jobDate"
  534. label-width="200px"
  535. class="peious"
  536. style="margin-left:130px"
  537. >
  538. <el-date-picker
  539. clearable
  540. size="small"
  541. v-model="form.jobDate"
  542. type="date"
  543. value-format="yyyy-MM-dd"
  544. >
  545. </el-date-picker>
  546. </el-form-item>
  547. <div class="jiben">备注</div>
  548. <el-form-item prop="remark">
  549. <el-input
  550. v-model="form.remark"
  551. type="textarea"
  552. placeholder="请输入内容"
  553. />
  554. </el-form-item>
  555. </el-form>
  556. <div slot="footer" class="dialog-footer">
  557. <el-button type="primary" @click="submitForm">确 定</el-button>
  558. <el-button @click="cancel">取 消</el-button>
  559. </div>
  560. </el-dialog>
  561. </div>
  562. </template>
  563. <script>
  564. import {
  565. listFlats,
  566. getFlats,
  567. delFlats,
  568. addFlats,
  569. updateFlats,
  570. exportFlats,
  571. } from "@/api/barracksManagement/flats";
  572. import { getDicts } from "@/api/system/dict/data";
  573. import Treeselect from "@riophae/vue-treeselect";
  574. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  575. import { getDept2 } from "@/api/grassrootsregistration/bdglmeeting";
  576. import { deptUser } from "@/api/doormanManage/bdglVisit";
  577. import { allUser, getDeptList } from "@/api/workingArrangements/workTask";
  578. export default {
  579. name: "Flats",
  580. components: { Treeselect },
  581. data() {
  582. return {
  583. // 执行单位列表
  584. users: [],
  585. // 遮罩层
  586. loading: true,
  587. // 导出遮罩层
  588. exportLoading: false,
  589. // 选中数组
  590. ids: [],
  591. // 非单个禁用
  592. single: true,
  593. // 非多个禁用
  594. multiple: true,
  595. // 显示搜索条件
  596. showSearch: true,
  597. // 总条数
  598. total: 0,
  599. // 公寓住房申请人员资格审查登记表格数据
  600. flatsList: [],
  601. // 弹出层标题
  602. title: "",
  603. // 是否显示弹出层
  604. open: false,
  605. // 查询参数
  606. queryParams: {
  607. pageNum: 1,
  608. pageSize: 10,
  609. unitId: null,
  610. peopleId: null,
  611. duty: null,
  612. whether: null,
  613. grade: null,
  614. houseType: null,
  615. birthDate: null,
  616. enlistDate: null,
  617. jobTime: null,
  618. entranceDate: null,
  619. jobDate: null,
  620. jobsDate: null,
  621. whethers: null,
  622. rankId: null,
  623. rankDate: null,
  624. createtime: null,
  625. updatetime: null,
  626. adminId: null,
  627. pName: null,
  628. pUnit: null,
  629. pAccount: null,
  630. pTime: null,
  631. pTimeOne: null,
  632. pCeace: null,
  633. type: null,
  634. },
  635. // 查询字典
  636. dictType: {
  637. dictType: "accommodation_type",
  638. // 军衔
  639. dictType1: "sys_user_rank",
  640. },
  641. ziDian: [],
  642. ziDian1: [],
  643. // 单位
  644. getdeptList: [],
  645. // 表单参数
  646. form: {},
  647. rylist: [],
  648. executor: [],
  649. // 表单校验
  650. rules: {
  651. enlistDate: [
  652. { required: true, message: "入伍年月不能为空", trigger: "blur" },
  653. ],
  654. // rankId: [{ required: true, message: "军衔不能为空", trigger: "blur" }],
  655. rankDate: [
  656. { required: true, message: "军衔时间不能为空", trigger: "blur" },
  657. ],
  658. },
  659. };
  660. },
  661. created() {
  662. this.getList();
  663. this.getdict();
  664. this.getdict1();
  665. allUser().then((res) => {
  666. this.rylist = res.rows;
  667. // console.log(this.rylist);
  668. });
  669. getDeptList().then((res) => {
  670. // console.log(res.data)
  671. this.getdeptList = res.data;
  672. // console.log(this.getdeptList);
  673. });
  674. // this.selectPeo1)()
  675. this.selectPeo1();
  676. // this.selectPeo()
  677. },
  678. methods: {
  679. unit4Format(row, column) {
  680. // console.log(row)
  681. var deptName = "";
  682. // console.log(this.ziDian1)
  683. // console.log(row.type)
  684. this.ziDian1.map((item) => {
  685. // console.log(item)
  686. // console.log(item.dictSort,item.dictLabel)
  687. if (item.dictSort == row.rankId) {
  688. // console.log(item.dictLabel)
  689. deptName = item.dictLabel;
  690. }
  691. });
  692. return deptName;
  693. },
  694. // 查询计划类型
  695. getdict1() {
  696. getDicts(this.dictType.dictType).then((res) => {
  697. // console.log(res);
  698. this.ziDian = res.data;
  699. // console.log(this.ziDian);
  700. });
  701. },
  702. // 查询计划类型
  703. getdict() {
  704. getDicts(this.dictType.dictType1).then((res) => {
  705. // console.log(res);
  706. this.ziDian1 = res.data;
  707. // console.log(this.ziDian1);
  708. });
  709. },
  710. // 军衔
  711. junxian(id, name) {
  712. this.form.rankId = id;
  713. this.form.rankName = name;
  714. // console.log(id)
  715. },
  716. // peopleIds(val){
  717. // this.form.peopleId=val.id;
  718. // this.form.peopleName=val.name;
  719. // console.log(val)
  720. // // console.log(item
  721. // this.form.rankId=val.rankId
  722. // // getDicts(this.dictType.dictType1).then((res) => {
  723. // // this.ziDian1 = res.data;
  724. // // this.ziDian1.map((item) => {
  725. // // if (item.dictSort == row.type) {
  726. // // this.ziDian1 = item.dictLabel;
  727. // // }
  728. // // });
  729. // // });
  730. // },
  731. peopleIds(name,item){
  732. console.log(item.rankId)
  733. this.form.rankName=""
  734. this.form.peopleName=name
  735. this.form.rankId=item.rankId
  736. console.log(this.form.rankId)
  737. this.ziDian1.forEach(item=>{
  738. if(this.form.rankId==item.dictSort)
  739. this.form.rankName=item.dictLabel
  740. // console.log(this.form.rankName)
  741. })
  742. // console.log(this.form.rankId)
  743. },
  744. peopleIds1(id, name) {
  745. this.queryParams.id = id;
  746. this.queryParams.peopleName = name;
  747. // console.log(id);
  748. },
  749. // 到访单位选中触发
  750. selectPeo1(val) {
  751. // 获取执行单位列表
  752. getDept2().then((res) => {
  753. // console.log(res,2)
  754. this.users = res.data;
  755. // console.log(this.users);
  756. });
  757. this.queryParams.unitId = val.id;
  758. this.queryParams.peopleName = "";
  759. this.queryParams.unitName = val.label;
  760. // console.log(this.queryParams);
  761. this.getZhuChi(this.queryParams.unitId);
  762. },
  763. // 获取执行人
  764. getZhuChi(id) {
  765. // console.log(id)
  766. deptUser(id).then((res) => {
  767. this.executor = res.data;
  768. // console.log(this.executor)
  769. // this.form.unitName=this.executor
  770. });
  771. },
  772. // 到访单位选中触发
  773. selectPeo(val) {
  774. // console.log(val)
  775. this.form.unitId = val.id;
  776. // console.log(val)
  777. this.form.peopleName = "";
  778. this.form.name=""
  779. this.form.rankName=""
  780. this.form.peopleId=""
  781. // this.form.name=""
  782. this.form.unitName = val.label;
  783. // console.log(this.form.unitId)
  784. this.getZhuChi(this.form.unitId);
  785. },
  786. // // 查询计划类型
  787. // getdict() {
  788. // getDicts(this.dictType.dictType).then((res) => {
  789. // this.ziDian = res.data;
  790. // });
  791. // getDicts(this.dictType.dictType1).then((res) => {
  792. // this.ziDian1 = res.data;
  793. // });
  794. // },
  795. /** 查询公寓住房申请人员资格审查登记列表 */
  796. getList() {
  797. this.loading = true;
  798. listFlats(this.queryParams).then((response) => {
  799. this.flatsList = response.rows;
  800. console.log(this.flatsList);
  801. this.total = response.total;
  802. this.loading = false;
  803. });
  804. },
  805. // 取消按钮
  806. cancel() {
  807. this.open = false;
  808. this.reset();
  809. },
  810. // 表单重置
  811. reset() {
  812. this.form = {
  813. id: null,
  814. unitId: null,
  815. peopleId: null,
  816. duty: null,
  817. whether: null,
  818. grade: null,
  819. houseType: null,
  820. birthDate: null,
  821. enlistDate: null,
  822. jobTime: null,
  823. entranceDate: null,
  824. jobDate: null,
  825. jobsDate: null,
  826. whethers: null,
  827. rankId: null,
  828. rankDate: null,
  829. remark: null,
  830. createtime: null,
  831. updatetime: null,
  832. adminId: null,
  833. pName: null,
  834. pUnit: null,
  835. pAccount: null,
  836. pTime: null,
  837. pTimeOne: null,
  838. pCeace: null,
  839. type: null,
  840. };
  841. this.resetForm("form");
  842. },
  843. /** 搜索按钮操作 */
  844. handleQuery() {
  845. // this.queryParams.name=""
  846. this.queryParams.pageNum = 1;
  847. this.getList();
  848. },
  849. /** 重置按钮操作 */
  850. resetQuery() {
  851. this.queryParams = {};
  852. this.getList();
  853. },
  854. // 多选框选中数据
  855. handleSelectionChange(selection) {
  856. this.ids = selection.map((item) => item.id);
  857. this.single = selection.length !== 1;
  858. this.multiple = !selection.length;
  859. },
  860. /** 新增按钮操作 */
  861. handleAdd() {
  862. this.reset();
  863. this.open = true;
  864. this.title = "添加公寓住房申请人员资格审查登记";
  865. // 获取执行单位列表
  866. getDept2().then((res) => {
  867. // console.log(res,2)
  868. this.users = res.data;
  869. // console.log(this.users);
  870. });
  871. },
  872. /** 修改按钮操作 */
  873. handleUpdate(row) {
  874. this.reset();
  875. const id = row.id || this.ids;
  876. getFlats(id).then((response) => {
  877. this.form = response.data;
  878. // this.form.name=this.form.peopleName
  879. // console.log(this.form)
  880. this.form.peopleId=this.form.peopleName
  881. // this.executor.forEach
  882. this.ziDian1.forEach(item=>{
  883. if(item.dictSort==this.form.rankId){
  884. this.form.rankName=item.dictLabel
  885. // console.log(this.form.rankName)
  886. }
  887. })
  888. this.open = true;
  889. this.title = "修改公寓住房申请人员资格审查登记";
  890. });
  891. },
  892. /** 提交按钮 */
  893. submitForm() {
  894. console.log(this.form);
  895. this.$refs["form"].validate((valid) => {
  896. if (valid) {
  897. if (this.form.id != null) {
  898. updateFlats(this.form).then((response) => {
  899. this.$modal.msgSuccess("修改成功");
  900. this.open = false;
  901. this.getList();
  902. });
  903. } else {
  904. addFlats(this.form).then((response) => {
  905. this.$modal.msgSuccess("新增成功");
  906. this.open = false;
  907. this.getList();
  908. });
  909. }
  910. }
  911. });
  912. },
  913. /** 删除按钮操作 */
  914. handleDelete(row) {
  915. const ids = row.id || this.ids;
  916. this.$modal
  917. .confirm("是否确认删除?")
  918. .then(function () {
  919. return delFlats(ids);
  920. })
  921. .then(() => {
  922. this.getList();
  923. this.$modal.msgSuccess("删除成功");
  924. })
  925. .catch(() => {});
  926. },
  927. /** 导出按钮操作 */
  928. handleExport() {
  929. const queryParams = this.queryParams;
  930. this.$modal
  931. .confirm("是否确认导出所有公寓住房申请人员资格审查登记数据项?")
  932. .then(() => {
  933. this.exportLoading = true;
  934. return exportFlats(queryParams);
  935. })
  936. .then((response) => {
  937. this.$download.name(response.msg);
  938. this.exportLoading = false;
  939. })
  940. .catch(() => {});
  941. },
  942. },
  943. };
  944. </script>
  945. <style scoped>
  946. ::v-deep .el-dialog {
  947. background-color: #004d86 !important;
  948. }
  949. /* 输入框 */
  950. ::v-deep .el-dialog .el-input__inner {
  951. background-color: #004d86 !important;
  952. width: 216px;
  953. color: white;
  954. margin-right: 20px;
  955. }
  956. /* 标题弹框 */
  957. ::v-deep .el-dialog__title {
  958. color: white;
  959. /* border-bottom: 1px solid white; */
  960. }
  961. /* 标题下划线 */
  962. ::v-deep .el-dialog__header {
  963. border-bottom: 1px solid white;
  964. }
  965. /* 文本域 */
  966. ::v-deep .el-textarea__inner {
  967. width: 1117px;
  968. height: 80px;
  969. margin-left: -20px;
  970. }
  971. ::v-deep .el-form-item__label {
  972. text-align: end;
  973. }
  974. ::v-deep .el-dialog__body {
  975. padding: 0px;
  976. margin-left: 20px;
  977. margin-top: 20px;
  978. }
  979. ::v-deep .el-table .el-table__header-wrapper th,
  980. .el-table .el-table__fixed-header-wrapper th {
  981. background-color: rgb(0, 60, 105);
  982. color: white;
  983. }
  984. ::v-deep .el-input__suffix {
  985. right: 20px;
  986. }
  987. ::v-deep .zhufnag .el-form-item__label {
  988. margin-left: 16px;
  989. }
  990. /* 树形样式 */
  991. ::v-deep .vue-treeselect__control {
  992. background-color: #004d86;
  993. width: 216px;
  994. margin-right: 25px;
  995. color: white;
  996. }
  997. .threeselects {
  998. width: 216px;
  999. margin-right: 22px;
  1000. }
  1001. .peiou .el-input__inner{
  1002. width: 300px;
  1003. }
  1004. ::v-deep .vue-treeselect__single-value {
  1005. color: white;
  1006. }
  1007. ::v-deep .el-date-editor .el-input__inner {
  1008. height: 36px;
  1009. }
  1010. ::v-deep .vue-treeselect__control {
  1011. background-color: transparent;
  1012. }
  1013. ::v-deep .el-table__cell .cell {
  1014. text-align: center;
  1015. }
  1016. ::v-deep .el-select .el-input__inner {
  1017. background-color: transparent;
  1018. color: white;
  1019. }
  1020. /* 文字多余部分省略 */
  1021. ::v-deep .el-table__cell .cell {
  1022. overflow: hidden;
  1023. text-overflow: ellipsis;
  1024. white-space: nowrap;
  1025. }
  1026. /* 调整输入框提示文字颜色 */
  1027. ::v-deep .vue-treeselect__placeholder {
  1028. color: #bdbdbd4f !important;
  1029. }
  1030. ::v-deep input::-webkit-input-placeholder {
  1031. color: #bdbdbd4f !important;
  1032. }
  1033. ::v-deep input:-moz-placeholder {
  1034. color: #bdbdbd4f !important;
  1035. }
  1036. ::v-deep .peiou .el-date-editor .el-input__inner{
  1037. width: 330px;
  1038. }
  1039. ::v-deep .shifou .el-input--medium .el-input__inner{
  1040. width: 330px;
  1041. }
  1042. ::v-deep .shifou1 .el-input--medium .el-input__inner{
  1043. width: 330px;
  1044. }
  1045. ::v-deep .el-form-item__label{
  1046. margin-left: 25px;
  1047. }
  1048. ::v-deep .peious .el-input__inner{
  1049. width: 351px;
  1050. }
  1051. ::v-deep .el-form{
  1052. margin-left: 30px;
  1053. }
  1054. .jiben{
  1055. margin-left: -20px;
  1056. }
  1057. </style>