FullPartyMemberIndex.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990
  1. <!--
  2. * @Description: 党建管理 => 正式党员管理
  3. * @Author: Rockery
  4. * @Date: 2021-12-10 10:39:07
  5. * @LastEditors: Rockery
  6. * @LastEditTime: 2022-03-03 10:01:39
  7. * @FilePath: \party_construct_web\src\views\PartyBuildingMgr\FullPartyMember\FullPartyMemberIndex.vue
  8. * @Copyright: Copyright (c) 2016~2021 Rockery(1113269755@qq.com)
  9. -->
  10. <template>
  11. <div class="app-container fullpartymember">
  12. <template v-if="pageType == 'LIST'">
  13. <div class="fullpartymember-listpage">
  14. <div class="fullpartymember-head">
  15. <div class="fullpartymember-head-title">
  16. <div>
  17. <img
  18. :src="require('@/assets/logo/home-main-title-logo.png')"
  19. @error="imgViewerOnerror"
  20. />
  21. </div>
  22. <div>正式党员管理</div>
  23. </div>
  24. <div class="fullpartymember-head-btn">
  25. <div>列表样式</div>
  26. <svg-icon
  27. icon-class="partydatacard"
  28. class="fullpartymember-head-btn-card"
  29. :class="{ 'is-active': listActiveType === 'CARDLIST' }"
  30. @click="handleCardListClick"
  31. />
  32. <svg-icon
  33. icon-class="partydatalist"
  34. class="fullpartymember-head-btn-list"
  35. :class="{ 'is-active': listActiveType === 'TABLELIST' }"
  36. @click="handleTableListClick"
  37. />
  38. </div>
  39. </div>
  40. <div class="app-container-queryform" v-show="showSearch">
  41. <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
  42. <el-form-item prop="beginTime">
  43. <el-date-picker
  44. v-model="queryParams.beginTime"
  45. type="date"
  46. size="small"
  47. clearable
  48. format="yyyy年MM月dd日"
  49. value-format="yyyy-MM-dd"
  50. style="width: 100%;"
  51. placeholder="请选择入党开始时间"
  52. ></el-date-picker>
  53. </el-form-item>
  54. <el-form-item prop="endTime">
  55. <el-date-picker
  56. v-model="queryParams.endTime"
  57. type="date"
  58. size="small"
  59. clearable
  60. format="yyyy年MM月dd日"
  61. value-format="yyyy-MM-dd"
  62. style="width: 100%;"
  63. placeholder="请选择入党结束时间"
  64. ></el-date-picker>
  65. </el-form-item>
  66. <el-form-item prop="name">
  67. <el-input
  68. v-model="queryParams.name"
  69. placeholder="请输入姓名"
  70. clearable
  71. size="small"
  72. style="width: 100%;"
  73. @keyup.enter.native="handleQuery"
  74. />
  75. </el-form-item>
  76. <el-form-item prop="sex">
  77. <el-select
  78. v-model="queryParams.sex"
  79. placeholder="请选择性别"
  80. clearable
  81. size="small"
  82. style="width: 100%;"
  83. >
  84. <el-option label="男" value="男"></el-option>
  85. <el-option label="女" value="女"></el-option>
  86. </el-select>
  87. </el-form-item>
  88. <el-form-item>
  89. <el-button
  90. v-hasPermi="['partybuildingmgr:fullpartymember:query']"
  91. type="primary"
  92. icon="el-icon-search"
  93. size="mini"
  94. @click="handleQueryClick"
  95. >搜索</el-button>
  96. <el-button
  97. v-hasPermi="['partybuildingmgr:fullpartymember:reset']"
  98. icon="el-icon-refresh"
  99. size="mini"
  100. @click="resetQueryClick"
  101. >重置</el-button>
  102. </el-form-item>
  103. </el-form>
  104. </div>
  105. <div class="app-container-main fullpartymember-main" :class="showSearch ? 'mt15' : ''">
  106. <el-row :gutter="10" class="mb8">
  107. <el-col :span="1.5">
  108. <el-button
  109. v-hasPermi="['partybuildingmgr:fullpartymember:add']"
  110. type="rocpartyprimarybtn"
  111. icon="el-icon-plus"
  112. @click="handleAddClick"
  113. >新增</el-button>
  114. </el-col>
  115. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  116. </el-row>
  117. <el-row :gutter="10">
  118. <template v-if="listActiveType === 'CARDLIST'">
  119. <el-col :span="24">
  120. <div class="fullpartymember-main-list">
  121. <template v-if="tableList.length > 0">
  122. <div class="list-row">
  123. <div
  124. v-for="item in tableList"
  125. :key="'FULLPARTYMEMBERCARDLIST_' + item.id"
  126. class="list-cell"
  127. >
  128. <div class="list-cell-img">
  129. <div v-show="item.status !== 0" class="list-cell-img-type">
  130. <div
  131. class="list-cell-img-type-content"
  132. >{{ fullPartyMemberStatusObj[item.status] }}</div>
  133. </div>
  134. <img
  135. :src="item.personPhoto ? (viewPdfFileUrlPrefix + item.personPhoto) : require('@/assets/images/tentative-img.png')"
  136. data-index="FULLPARTYMEMBER"
  137. @error="imgViewerOnerror"
  138. />
  139. <div class="list-cell-shield">
  140. <div class="list-cell-shield-content">
  141. <div class="shield-content-label">入党时间</div>
  142. <div
  143. class="shield-content-datetime"
  144. >{{ parseTime(item.addPartyTime, '{y}年{m}月{d}日') || ((item.isOld === 1) ? '待补充' : '待更新') }}</div>
  145. <el-button
  146. v-hasPermi="['partybuildingmgr:fullpartymember:view']"
  147. type="rocwhiteplainbtn"
  148. icon="el-icon-view"
  149. style="width: 100%;"
  150. @click="handleViewClick(item)"
  151. >查看资料</el-button>
  152. <el-button
  153. v-hasPermi="['partybuildingmgr:fullpartymember:edit']"
  154. type="rocwhiteplainbtn"
  155. icon="el-icon-edit"
  156. style="width: 100%;"
  157. class="shield-content-edit"
  158. @click="handleEditClick(item)"
  159. >编辑</el-button>
  160. <div
  161. v-hasPermi="['partybuildingmgr:fullpartymember:reactivate']"
  162. class="shield-content-relation"
  163. @click="handleReactivateClick(item)"
  164. >组织关系变更&nbsp;&nbsp;&gt;</div>
  165. </div>
  166. </div>
  167. </div>
  168. <div class="list-cell-name">{{ item.name || '—' }}</div>
  169. </div>
  170. </div>
  171. </template>
  172. <template v-else>
  173. <div class="fullpartymember-main-list-nodata">暂无数据</div>
  174. </template>
  175. </div>
  176. </el-col>
  177. </template>
  178. <template v-else>
  179. <el-col :span="24" class="mt15">
  180. <el-table
  181. :data="tableList"
  182. stripe
  183. border
  184. :header-cell-style="{'text-align':'center'}"
  185. header-row-class-name="develop-table_header-row"
  186. class="develop-main-table"
  187. style="width: 100%;"
  188. >
  189. <el-table-column label="党员姓名" prop="name" :show-overflow-tooltip="true" />
  190. <el-table-column
  191. label="性别"
  192. prop="sex"
  193. align="center"
  194. :show-overflow-tooltip="true"
  195. >
  196. <template slot-scope="scope">
  197. <span>{{ scope.row.sex || ((scope.row.isOld === 1) ? '待补充' : '待更新') }}</span>
  198. </template>
  199. </el-table-column>
  200. <el-table-column label="党龄" align="center" :show-overflow-tooltip="true">
  201. <template slot-scope="scope">
  202. <span>{{ getPartyStanding(parseTime(scope.row.applyAddPartyTime, '{y}-{m}-{d}'), parseTime(scope.row.addPartyTime, '{y}-{m}-{d}'), scope.row.isOld) }}</span>
  203. </template>
  204. </el-table-column>
  205. <el-table-column
  206. label="入党介绍人"
  207. prop="addPartyIntroducer"
  208. :show-overflow-tooltip="true"
  209. >
  210. <template slot-scope="scope">
  211. <span>{{ scope.row.addPartyIntroducer || ((scope.row.isOld === 1) ? '待补充' : '待更新') }}</span>
  212. </template>
  213. </el-table-column>
  214. <el-table-column
  215. label="申请入党时间"
  216. prop="applyAddPartyTime"
  217. align="center"
  218. :show-overflow-tooltip="true"
  219. >
  220. <template slot-scope="scope">
  221. <span>{{ parseTime(scope.row.applyAddPartyTime, '{y}-{m}-{d}') || ((scope.row.isOld === 1) ? '待补充' : '待更新') }}</span>
  222. </template>
  223. </el-table-column>
  224. <el-table-column
  225. label="正式入党时间"
  226. prop="addPartyTime"
  227. align="center"
  228. :show-overflow-tooltip="true"
  229. >
  230. <template slot-scope="scope">
  231. <span>{{ parseTime(scope.row.addPartyTime, '{y}-{m}-{d}') || ((scope.row.isOld === 1) ? '待补充' : '待更新') }}</span>
  232. </template>
  233. </el-table-column>
  234. <el-table-column
  235. label="操作"
  236. align="center"
  237. fixed="right"
  238. width="260"
  239. class-name="small-padding fixed-width"
  240. >
  241. <template slot-scope="scope">
  242. <el-button
  243. v-hasPermi="['partybuildingmgr:fullpartymember:view']"
  244. size="mini"
  245. type="text"
  246. icon="el-icon-view"
  247. style="color: #909399;"
  248. @click="handleViewClick(scope.row)"
  249. >详情</el-button>
  250. <el-button
  251. v-hasPermi="['partybuildingmgr:fullpartymember:edit']"
  252. size="mini"
  253. type="text"
  254. icon="el-icon-edit"
  255. style="color: #67c23a;"
  256. @click="handleEditClick(scope.row)"
  257. >编辑</el-button>
  258. <el-button
  259. v-hasPermi="['partybuildingmgr:fullpartymember:reactivate']"
  260. size="mini"
  261. type="text"
  262. style="color: #de0010;"
  263. @click="handleReactivateClick(scope.row)"
  264. >
  265. <svg-icon icon-class="relachange" />&nbsp;&nbsp;组织关系变更
  266. </el-button>
  267. </template>
  268. </el-table-column>
  269. </el-table>
  270. </el-col>
  271. </template>
  272. <el-col :span="24">
  273. <pagination
  274. v-show="total>0"
  275. :total="total"
  276. :pageSizes="[14, 28, 42, 56, 70]"
  277. :page.sync="queryParams.pageNum"
  278. :limit.sync="queryParams.pageSize"
  279. @pagination="refreshData"
  280. />
  281. </el-col>
  282. </el-row>
  283. </div>
  284. </div>
  285. </template>
  286. <template v-else-if="pageType == 'ADD'">
  287. <div class="fullpartymember-addpage">
  288. <div class="fullpartymember-addpage-head">
  289. <div class="fullpartymember-addpage-head-title">
  290. <div>
  291. <img
  292. :src="require('@/assets/logo/home-main-title-logo.png')"
  293. @error="imgViewerOnerror"
  294. />
  295. </div>
  296. <div>正式党员管理({{ updateTypeObj[updateType] }})</div>
  297. </div>
  298. </div>
  299. <update-party-develop
  300. :id="currentRow.id"
  301. :is-old="isOld"
  302. :operate-type.sync="operateType"
  303. :update-type="updateType"
  304. @page-submit="handleAddPageSubmitClick"
  305. @page-close="handleAddPageCloseClick"
  306. />
  307. </div>
  308. </template>
  309. <template v-else-if="pageType == 'VIEW'">
  310. <div class="toptitlepage">
  311. <div class="toptitlepage-head">
  312. <div class="toptitlepage-head-title">
  313. <div>
  314. <img
  315. :src="require('@/assets/logo/home-main-title-logo.png')"
  316. @error="imgViewerOnerror"
  317. />
  318. </div>
  319. <div>正式党员管理(查看资料)</div>
  320. </div>
  321. </div>
  322. <party-member-details :id="currentRow.id" @page-close="handleViewPageCloseClick" />
  323. </div>
  324. </template>
  325. <template v-else>
  326. <div>&nbsp;</div>
  327. </template>
  328. <!-- 组织关系变更对话框 -->
  329. <el-dialog
  330. title="组织关系变更"
  331. :visible.sync="orgRelationChangeObj.open"
  332. width="700px"
  333. append-to-body
  334. :destroy-on-close="true"
  335. :close-on-click-modal="false"
  336. class="orgrelationchange-dialog"
  337. >
  338. <el-form
  339. ref="orgRelationChangeFormRef"
  340. :model="orgRelationChangeObj.form"
  341. :rules="orgRelationChangeObj.rules"
  342. label-width="100px"
  343. >
  344. <el-row>
  345. <el-col :span="12">
  346. <el-form-item label="变更时间:" prop="modifyTime">
  347. <el-date-picker
  348. v-model="orgRelationChangeObj.form.modifyTime"
  349. type="date"
  350. clearable
  351. format="yyyy年MM月dd日"
  352. value-format="yyyy-MM-dd"
  353. style="width: 100%;"
  354. placeholder="请选择变更时间"
  355. ></el-date-picker>
  356. </el-form-item>
  357. </el-col>
  358. <el-col :span="12">
  359. <el-form-item label="姓名:" prop="memberName">
  360. <el-input
  361. v-model="orgRelationChangeObj.form.memberName"
  362. :disabled="!(!orgRelationChangeObj.currentRow.name)"
  363. clearable
  364. placeholder="请输入姓名"
  365. />
  366. </el-form-item>
  367. </el-col>
  368. <el-col :span="12">
  369. <el-form-item label="身份证号:" prop="cardNo">
  370. <el-input
  371. v-model="orgRelationChangeObj.form.cardNo"
  372. :disabled="!(!orgRelationChangeObj.currentRow.cardNo)"
  373. clearable
  374. placeholder="请输入身份证号"
  375. />
  376. </el-form-item>
  377. </el-col>
  378. <el-col :span="12">
  379. <el-form-item label="类型:" prop="modifyType">
  380. <el-select
  381. v-model="orgRelationChangeObj.form.modifyType"
  382. placeholder="请选择类型"
  383. clearable
  384. size="small"
  385. style="width: 100%;"
  386. >
  387. <el-option
  388. v-for="orgRelationChangeTypeOption in orgRelationChangeTypeOptions"
  389. :key="orgRelationChangeTypeOption.dictValue"
  390. :label="orgRelationChangeTypeOption.dictLabel"
  391. :value="orgRelationChangeTypeOption.dictValue"
  392. />
  393. </el-select>
  394. </el-form-item>
  395. </el-col>
  396. <el-col :span="24">
  397. <el-form-item label="相关材料:" prop="relatedFile">
  398. <roc-img-pdf-file-upload
  399. key="ROCPDFFILEUPLOADFULLPARTYMEMBERATTACHMENTKEY"
  400. v-model="orgRelationChangeObj.form.relatedFile"
  401. upload-file-title="相关材料"
  402. />
  403. </el-form-item>
  404. </el-col>
  405. <el-col :span="24">
  406. <el-form-item label="说明:" prop="remark">
  407. <el-input
  408. v-model="orgRelationChangeObj.form.remark"
  409. type="textarea"
  410. :autosize="{ minRows: 4}"
  411. placeholder="请输入说明"
  412. clearable
  413. />
  414. </el-form-item>
  415. </el-col>
  416. </el-row>
  417. </el-form>
  418. <div slot="footer" class="dialog-footer">
  419. <el-button type="rocpartyprimaryplainbtn" @click="orgRelationChangeCancelClick">取 消</el-button>
  420. <el-button
  421. :disabled="!orgRelationChangeObj.form.modifyTime || !orgRelationChangeObj.form.memberName || !orgRelationChangeObj.form.cardNo || !orgRelationChangeObj.form.modifyType"
  422. type="rocpartyprimarybtn"
  423. @click="orgRelationChangeSubmitForm"
  424. >确定</el-button>
  425. </div>
  426. </el-dialog>
  427. </div>
  428. </template>
  429. <script>
  430. import { listFullPartyMember } from "@/api/PartyBuildingMgr/FullPartyMember";
  431. import { addOrgRelationship } from "@/api/PartyBuildingMgr/OrgRelationship";
  432. export default {
  433. name: "Fullpartymember",
  434. components: {
  435. 'roc-img-pdf-file-upload': () => import('@/components/RocImgPdfFileUpload'),
  436. 'update-party-develop': () => import('@/components/UpdatePartyDevelop'),
  437. 'party-member-details': () => import('@/components/PartyMemberDetails')
  438. },
  439. data() {
  440. return {
  441. // 页面类型
  442. pageType: 'LIST',
  443. // 遮罩层
  444. loading: true,
  445. // 显示搜索条件
  446. showSearch: true,
  447. // 列表样式
  448. listActiveType: 'CARDLIST',
  449. // 查询条件
  450. queryParams: {
  451. pageNum: 1,
  452. pageSize: 14,
  453. orderByColumn: 'id',
  454. isAsc: 'desc'
  455. },
  456. // 数据总条数
  457. total: 10,
  458. // 表格列表
  459. tableList: [],
  460. orgRelationChangeObj: {
  461. open: false,
  462. form: {},
  463. rules: {
  464. modifyTime: [
  465. { required: true, message: "变更时间不能为空", trigger: ['change', 'blur'] }
  466. ],
  467. memberName: [
  468. { required: true, message: "姓名不能为空", trigger: 'blur' }
  469. ],
  470. cardNo: [
  471. { required: true, message: "身份证号不能为空", trigger: 'blur' },
  472. {
  473. pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
  474. message: "请输入正确身份证号",
  475. trigger: 'blur'
  476. }
  477. ],
  478. modifyType: [
  479. { required: true, message: "类型不能为空", trigger: ['change', 'blur'] }
  480. ]
  481. },
  482. currentRow: {}
  483. },
  484. orgRelationChangeTypeOptions: [],
  485. viewPdfFileUrlPrefix: `${window.origin}${process.env.VUE_APP_FILE_VIEW_API}`,
  486. fullPartyMemberStatusObj: {
  487. '1': '转出',
  488. '2': '退党',
  489. '3': '开除',
  490. '4': '去世',
  491. '5': '退休'
  492. },
  493. updateTypeObj: {
  494. 'ADD': '新增',
  495. 'EDIT': '编辑'
  496. },
  497. isOld: 1, // 是否是直接录入正式党员信息,0:不是,1:是
  498. currentRow: {}
  499. };
  500. },
  501. created() {
  502. this.initData();
  503. },
  504. methods: {
  505. /** 初始化数据 */
  506. async initData() {
  507. this.listActiveType = 'CARDLIST';
  508. this.refreshData();
  509. },
  510. /** 刷新数据 */
  511. async refreshData() {
  512. this.loading = true;
  513. this.getList();
  514. },
  515. /** 获取表格数据 */
  516. getList() {
  517. this.loading = true;
  518. listFullPartyMember(this.queryParams).then(
  519. response => {
  520. this.tableList = response.rows || [];
  521. this.total = response.total ?? 0;
  522. this.loading = false;
  523. this.pageType = 'LIST';
  524. }
  525. );
  526. },
  527. /**
  528. * 获取次要选项列表
  529. */
  530. async getSubOptions() {
  531. // 组织关系变更类型列表
  532. await this.getDicts('org_relation_change_type').then(response => {
  533. const orgRelationOptions = response?.data || [];
  534. this.orgRelationChangeTypeOptions = orgRelationOptions.filter((item) => {
  535. return item.dictValue !== '0';
  536. });
  537. });
  538. },
  539. /**
  540. * 卡片列表图标事件
  541. */
  542. handleCardListClick() {
  543. this.listActiveType = 'CARDLIST';
  544. },
  545. /**
  546. * 表格列表图标事件
  547. */
  548. handleTableListClick() {
  549. this.listActiveType = 'TABLELIST';
  550. },
  551. /**
  552. * 搜索按钮事件
  553. */
  554. handleQueryClick() {
  555. this.queryParams.pageNum = 1;
  556. this.refreshData();
  557. },
  558. /**
  559. * 重置按钮事件
  560. */
  561. resetQueryClick() {
  562. this.resetForm("queryForm");
  563. this.handleQueryClick();
  564. },
  565. /**
  566. * 新增按钮事件
  567. */
  568. handleAddClick() {
  569. this.currentRow = {};
  570. this.isOld = 1;
  571. this.pageType = 'ADD';
  572. this.operateType = 'ADD';
  573. this.updateType = 'ADD';
  574. },
  575. /**
  576. * 编辑按钮事件
  577. */
  578. handleEditClick(row) {
  579. if (!row.id) return;
  580. this.isOld = row.isOld;
  581. this.pageType = 'ADD';
  582. this.operateType = 'EDIT';
  583. this.updateType = 'EDIT';
  584. this.currentRow = row;
  585. },
  586. /**
  587. * 查看详情按钮事件
  588. */
  589. handleViewClick(row) {
  590. if (!row?.id) return;
  591. this.pageType = 'VIEW';
  592. this.currentRow = row;
  593. },
  594. /**
  595. * 组织关系变更事件
  596. */
  597. async handleReactivateClick(row) {
  598. if (!row?.name) return;
  599. // 初始化数据
  600. this.orgRelationChangeObj.form = {};
  601. this.resetForm("orgRelationChangeFormRef");
  602. await this.getSubOptions();
  603. // 绑定数据
  604. this.orgRelationChangeObj.currentRow = row;
  605. this.orgRelationChangeObj.form = {
  606. memberId: row?.id,
  607. memberName: row?.name,
  608. cardNo: row?.cardNo
  609. };
  610. this.orgRelationChangeObj.open = true;
  611. },
  612. /**
  613. * 组织关系变更对话框确定按钮事件
  614. */
  615. orgRelationChangeSubmitForm() {
  616. this.$refs["orgRelationChangeFormRef"].validate(valid => {
  617. if (valid) {
  618. this.$confirm('是否确认当前操作?', "警告", {
  619. confirmButtonText: "确定",
  620. cancelButtonText: "取消",
  621. type: "warning"
  622. }).then(() => {
  623. addOrgRelationship(this.orgRelationChangeObj.form).then(
  624. () => {
  625. this.msgSuccess("组织关系变更成功!");
  626. this.orgRelationChangeCancelClick();
  627. this.pageType = 'LIST';
  628. this.refreshData();
  629. }
  630. );
  631. }).catch(() => { });
  632. }
  633. });
  634. },
  635. /**
  636. * 组织关系变更对话框取消按钮事件
  637. */
  638. orgRelationChangeCancelClick() {
  639. this.orgRelationChangeObj.open = false;
  640. this.orgRelationChangeObj.currentRow = {};
  641. this.orgRelationChangeObj.form = {};
  642. this.resetForm("orgRelationChangeFormRef");
  643. },
  644. /**
  645. * 新增页面保存按钮事件
  646. */
  647. handleAddPageSubmitClick(param) {
  648. this.pageType = param;
  649. this.refreshData();
  650. },
  651. /**
  652. * 新增页面取消按钮事件
  653. */
  654. handleAddPageCloseClick(param) {
  655. this.pageType = param;
  656. this.refreshData();
  657. },
  658. /**
  659. * 详情页面关闭按钮事件
  660. */
  661. handleViewPageCloseClick(param) {
  662. this.pageType = param;
  663. this.refreshData();
  664. },
  665. /**
  666. * 根据两个指定日期计算党龄
  667. * @applyAddPartyDate [String] 出生日期,格式为"1990-01-01"
  668. * @addPartyDate [String] 指定日期,格式为"1990-01-01"
  669. */
  670. getPartyStanding(applyAddPartyDate, addPartyDate, isOld) {
  671. // 不存在数据
  672. if (!applyAddPartyDate || !addPartyDate) {
  673. return (isOld === 1) ? '待补充' : '待更新';
  674. }
  675. // 初始化数据
  676. const [applyAddPartyDateArr, addPartyDateArr] = [applyAddPartyDate.split("-"), addPartyDate.split("-")];
  677. // 出生日期数据
  678. const [birthYear, birthMonth, birthDay] = applyAddPartyDateArr;
  679. // 指定日期数据
  680. const [specifyYear, specifyMonth, specifyDay] = addPartyDateArr;
  681. if (specifyYear == birthYear) {
  682. return 0; // 同年 则为0岁
  683. } else {
  684. // 年之差
  685. const ageDiff = specifyYear - birthYear;
  686. if (ageDiff > 0) {
  687. // 月份相等
  688. if (specifyMonth == birthMonth) {
  689. // 日之差
  690. const dayDiff = specifyDay - birthDay;
  691. // 日之差小于0
  692. if (dayDiff < 0) {
  693. return ageDiff - 1;
  694. }
  695. return ageDiff; // 日之差大于等于0
  696. }
  697. // 月之差
  698. const monthDiff = specifyMonth - birthMonth;
  699. // 月之差小于0
  700. if (monthDiff < 0) {
  701. return ageDiff - 1;
  702. }
  703. return ageDiff; // 月之差大于等于0
  704. }
  705. return (isOld === 1) ? '待补充' : '待更新'; // 返回— 表示出生日期输入错误或晚于今天
  706. }
  707. }
  708. }
  709. };
  710. </script>
  711. <style scoped lang="scss">
  712. .fullpartymember {
  713. &-head {
  714. display: flex;
  715. align-items: center;
  716. justify-content: space-between;
  717. margin-bottom: 15px;
  718. width: 100%;
  719. padding: 10px 20px;
  720. background-color: #ffffff;
  721. border-radius: 10px;
  722. &-title {
  723. display: flex;
  724. align-items: center;
  725. div {
  726. &:first-child {
  727. height: 37px;
  728. line-height: 37px;
  729. }
  730. &:last-child {
  731. margin-left: 15px;
  732. height: 37px;
  733. font-size: 26px;
  734. font-weight: 400;
  735. color: #4f4f4f;
  736. line-height: 37px;
  737. letter-spacing: 1px;
  738. }
  739. img {
  740. width: 34px;
  741. height: 34px;
  742. }
  743. }
  744. }
  745. &-btn {
  746. display: flex;
  747. align-items: center;
  748. div {
  749. &:first-child {
  750. margin-right: 15px;
  751. height: 37px;
  752. font-size: 16px;
  753. font-weight: 400;
  754. color: #646464;
  755. line-height: 37px;
  756. letter-spacing: 1px;
  757. }
  758. }
  759. &-card {
  760. margin-right: 10px;
  761. font-size: 26px;
  762. cursor: pointer;
  763. color: #909090;
  764. &.is-active {
  765. color: #e53333;
  766. }
  767. }
  768. &-list {
  769. font-size: 28px;
  770. cursor: pointer;
  771. color: #909090;
  772. &.is-active {
  773. color: #e53333;
  774. }
  775. }
  776. }
  777. }
  778. &-main {
  779. padding: 20px 20px 72px;
  780. min-height: 660px;
  781. background: url("../../../assets/images/home-head-img.png"), #ffffff;
  782. background-size: 67px 67px, cover;
  783. background-position: right 20px bottom 5px, center;
  784. background-repeat: no-repeat, no-repeat;
  785. border-radius: 10px;
  786. &-list {
  787. position: relative;
  788. margin: 20px 0 10px;
  789. width: 100%;
  790. .list-row {
  791. position: relative;
  792. width: 100%;
  793. .list-cell {
  794. float: left;
  795. margin: 0 10px 20px 10px;
  796. // overflow: hidden;
  797. width: 203px;
  798. height: 283px;
  799. background: #de0010;
  800. &-name {
  801. display: flex;
  802. justify-content: center;
  803. align-items: center;
  804. margin-top: -5px;
  805. width: 100%;
  806. height: 45px;
  807. font-size: 20px;
  808. font-weight: 400;
  809. color: #ffffff;
  810. line-height: 28px;
  811. opacity: 0.8;
  812. }
  813. &-img {
  814. &-type {
  815. position: absolute;
  816. width: 70px;
  817. height: 48px;
  818. background-image: url("../../../assets/images/list-cell-img-type-bg.png");
  819. background-size: cover;
  820. background-position: center;
  821. background-repeat: no-repeat;
  822. &-content {
  823. margin: 3px 0 0 8px;
  824. transform: rotate(-35deg);
  825. -ms-transform: rotate(-35deg); /* IE 9 */
  826. -moz-transform: rotate(-35deg); /* Firefox */
  827. -webkit-transform: rotate(-35deg); /* Safari 和 Chrome */
  828. -o-transform: rotate(-35deg); /* Opera */
  829. width: 40px;
  830. height: 35px;
  831. font-size: 16px;
  832. font-weight: 400;
  833. color: #ffffff;
  834. line-height: 22px;
  835. }
  836. }
  837. img {
  838. width: 203px;
  839. height: 239px;
  840. border: 1px solid #dcdfe6;
  841. }
  842. .list-cell-shield {
  843. display: none;
  844. position: absolute;
  845. margin-top: -243px;
  846. width: 203px;
  847. height: 239px;
  848. background-image: none;
  849. background-color: rgba(0, 0, 0, 0.3);
  850. &-content {
  851. padding: 20px 30px;
  852. width: 100%;
  853. .shield-content-label {
  854. width: 100%;
  855. font-weight: 400;
  856. font-size: 20px;
  857. color: #ffffff;
  858. }
  859. .shield-content-datetime {
  860. margin: 15px 0 15px;
  861. width: 100%;
  862. font-weight: 400;
  863. font-size: 18px;
  864. color: #ffffff;
  865. }
  866. .shield-content-edit {
  867. margin: 10px 0 0;
  868. }
  869. .shield-content-relation {
  870. display: flex;
  871. justify-content: center;
  872. align-items: center;
  873. margin-top: 15px;
  874. width: 100%;
  875. font-weight: 400;
  876. font-size: 14px;
  877. color: #ffffff;
  878. cursor: pointer;
  879. }
  880. }
  881. }
  882. &:hover .list-cell-shield {
  883. display: block;
  884. }
  885. }
  886. }
  887. }
  888. &-nodata {
  889. display: flex;
  890. justify-content: center;
  891. align-items: center;
  892. width: 100%;
  893. height: 386px;
  894. border: 1px solid #b5b5b5;
  895. border-radius: 5px;
  896. color: #747474;
  897. opacity: 0.8;
  898. }
  899. }
  900. }
  901. &-addpage {
  902. &-head {
  903. margin-bottom: 20px;
  904. width: 100%;
  905. padding: 15px 20px;
  906. background: url("../../../assets/images/home-head-img.png"), #ffffff;
  907. background-size: 67px 67px, cover;
  908. background-position: right 5px bottom 0px, center;
  909. background-repeat: no-repeat, no-repeat;
  910. border-radius: 10px;
  911. &-title {
  912. display: flex;
  913. align-items: center;
  914. div {
  915. &:first-child {
  916. height: 37px;
  917. line-height: 37px;
  918. }
  919. &:last-child {
  920. margin-left: 15px;
  921. height: 37px;
  922. font-size: 26px;
  923. font-weight: 400;
  924. color: #4f4f4f;
  925. line-height: 37px;
  926. letter-spacing: 1px;
  927. }
  928. img {
  929. width: 34px;
  930. height: 34px;
  931. }
  932. }
  933. }
  934. }
  935. }
  936. }
  937. </style>