index.vue 31 KB

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