|
@@ -3,7 +3,7 @@
|
|
|
* @Author: Rockery
|
|
|
* @Date: 2021-12-10 10:39:07
|
|
|
* @LastEditors: Rockery
|
|
|
- * @LastEditTime: 2021-12-28 17:50:12
|
|
|
+ * @LastEditTime: 2022-01-05 11:58:45
|
|
|
* @FilePath: \party_construct_web\src\views\PartyBuildingMgr\FullPartyMember\FullPartyMemberIndex.vue
|
|
|
* @Copyright: Copyright (c) 2016~2021 Rockery(1113269755@qq.com)
|
|
|
-->
|
|
@@ -47,6 +47,7 @@
|
|
|
type="date"
|
|
|
size="small"
|
|
|
clearable
|
|
|
+ format="yyyy年MM月dd日"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
style="width: 100%;"
|
|
|
placeholder="请选择入党开始时间"
|
|
@@ -58,6 +59,7 @@
|
|
|
type="date"
|
|
|
size="small"
|
|
|
clearable
|
|
|
+ format="yyyy年MM月dd日"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
style="width: 100%;"
|
|
|
placeholder="请选择入党结束时间"
|
|
@@ -81,12 +83,8 @@
|
|
|
size="small"
|
|
|
style="width: 100%;"
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="sexOption in sexOptions"
|
|
|
- :key="sexOption.dictValue"
|
|
|
- :label="sexOption.dictLabel"
|
|
|
- :value="sexOption.dictValue"
|
|
|
- />
|
|
|
+ <el-option label="男" value="男"></el-option>
|
|
|
+ <el-option label="女" value="女"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
@@ -109,55 +107,44 @@
|
|
|
|
|
|
<div class="app-container-main fullpartymember-main" :class="showSearch ? 'mt15' : ''">
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- v-hasPermi="['partybuildingmgr:situationdesc:add']"
|
|
|
- type="rocpartyprimarybtn"
|
|
|
- icon="el-icon-plus"
|
|
|
- size="mini"
|
|
|
- @click="handleAddClick"
|
|
|
- >新增</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- v-hasPermi="['partybuildingmgr:situationdesc:transferin']"
|
|
|
- type="rocpartyprimaryplainbtn"
|
|
|
- icon="el-icon-circle-plus-outline"
|
|
|
- size="mini"
|
|
|
- @click="handleTransferInClick"
|
|
|
- >转入</el-button>
|
|
|
- </el-col>
|
|
|
+ <el-col :span="1.5"> </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
<el-row :gutter="10">
|
|
|
<template v-if="listActiveType === 'CARDLIST'">
|
|
|
<el-col :span="24">
|
|
|
<div class="fullpartymember-main-list">
|
|
|
- <template v-if="list.length > 0">
|
|
|
+ <template v-if="tableList.length > 0">
|
|
|
<div class="list-row">
|
|
|
- <div v-for="item in 20" :key="item" class="list-cell">
|
|
|
+ <div
|
|
|
+ v-for="item in tableList"
|
|
|
+ :key="'FULLPARTYMEMBERCARDLIST_' + item.id"
|
|
|
+ class="list-cell"
|
|
|
+ >
|
|
|
<div class="list-cell-img">
|
|
|
<img
|
|
|
- :src="require('@/assets/images/home-main-list-card-img.png')"
|
|
|
+ :src="item.personPhoto || require('@/assets/images/empty_img.png')"
|
|
|
@error="imgViewerOnerror"
|
|
|
/>
|
|
|
<div class="list-cell-shield">
|
|
|
<div class="list-cell-shield-content">
|
|
|
<div class="shield-content-label">入党时间</div>
|
|
|
- <div class="shield-content-datetime">1921年7月1日</div>
|
|
|
+ <div
|
|
|
+ class="shield-content-datetime"
|
|
|
+ >{{ parseTime(item.applyAddPartyTime, '{y}年{m}月{d}日') || ' - 年 - 月 - 日' }}</div>
|
|
|
<el-button
|
|
|
type="rocwhiteplainbtn"
|
|
|
style="width: 100%;"
|
|
|
- @click="handleViewMaterialClick"
|
|
|
+ @click="handleViewClick(item)"
|
|
|
>查看资料</el-button>
|
|
|
<div
|
|
|
class="shield-content-relation"
|
|
|
- @click="handleOrgRelationChangeClick"
|
|
|
+ @click="handleReactivateClick(item)"
|
|
|
>组织关系变更 ></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="list-cell-name">罗正峰</div>
|
|
|
+ <div class="list-cell-name">{{ item.name || '—' }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -170,7 +157,7 @@
|
|
|
<template v-else>
|
|
|
<el-col :span="24" class="mt15">
|
|
|
<el-table
|
|
|
- :data="list"
|
|
|
+ :data="tableList"
|
|
|
stripe
|
|
|
border
|
|
|
:header-cell-style="{'text-align':'center'}"
|
|
@@ -181,14 +168,48 @@
|
|
|
<el-table-column label="党员姓名" prop="name" :show-overflow-tooltip="true" />
|
|
|
<el-table-column
|
|
|
label="性别"
|
|
|
- prop="name"
|
|
|
+ prop="sex"
|
|
|
+ align="center"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.sex || '—' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="党龄" align="center" :show-overflow-tooltip="true">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ getPartyStanding(parseTime(scope.row.applyAddPartyTime, '{y}-{m}-{d}'), parseTime(scope.row.addPartyTime, '{y}-{m}-{d}')) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="入党介绍人"
|
|
|
+ prop="addPartyIntroducer"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.addPartyIntroducer || '—' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="申请入党时间"
|
|
|
+ prop="applyAddPartyTime"
|
|
|
+ align="center"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.applyAddPartyTime, '{y}-{m}-{d}') || '—' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="正式入党时间"
|
|
|
+ prop="addPartyTime"
|
|
|
align="center"
|
|
|
:show-overflow-tooltip="true"
|
|
|
- />
|
|
|
- <el-table-column label="党龄" prop="name" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="入党介绍人" prop="name" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="申请入党时间" prop="name" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="正式入党时间" prop="name" :show-overflow-tooltip="true" />
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.addPartyTime, '{y}-{m}-{d}') || '—' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
|
align="center"
|
|
@@ -223,9 +244,10 @@
|
|
|
<pagination
|
|
|
v-show="total>0"
|
|
|
:total="total"
|
|
|
+ :pageSizes="[14, 28, 42, 56, 70]"
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
- @pagination="initData"
|
|
|
+ @pagination="refreshData"
|
|
|
/>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -246,7 +268,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<update-party-develop
|
|
|
- operate-type="ADD"
|
|
|
+ :operate-type="pageType"
|
|
|
@page-submit="handleAddPageSubmitClick"
|
|
|
@page-close="handleAddPageCloseClick"
|
|
|
/>
|
|
@@ -270,32 +292,46 @@
|
|
|
ref="orgRelationChangeFormRef"
|
|
|
:model="orgRelationChangeObj.form"
|
|
|
:rules="orgRelationChangeObj.rules"
|
|
|
- label-width="90px"
|
|
|
+ label-width="100px"
|
|
|
>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="变更时间:" prop="deptName">
|
|
|
- <el-input
|
|
|
- v-model="orgRelationChangeObj.form.deptName"
|
|
|
+ <el-form-item label="变更时间:" prop="modifyTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="orgRelationChangeObj.form.modifyTime"
|
|
|
+ type="date"
|
|
|
clearable
|
|
|
- placeholder="请输入部门名称"
|
|
|
- />
|
|
|
+ format="yyyy年MM月dd日"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ style="width: 100%;"
|
|
|
+ placeholder="请选择变更时间"
|
|
|
+ ></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="姓名:" prop="deptName">
|
|
|
- <el-input v-model="orgRelationChangeObj.form.deptName" disabled />
|
|
|
+ <el-form-item label="姓名:" prop="memberName">
|
|
|
+ <el-input
|
|
|
+ v-model="orgRelationChangeObj.form.memberName"
|
|
|
+ :disabled="!(!orgRelationChangeObj.currentRow.name)"
|
|
|
+ clearable
|
|
|
+ placeholder="请输入姓名"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="身份证号:" prop="leader">
|
|
|
- <el-input v-model="orgRelationChangeObj.form.leader" disabled />
|
|
|
+ <el-form-item label="身份证号:" prop="cardNo">
|
|
|
+ <el-input
|
|
|
+ v-model="orgRelationChangeObj.form.cardNo"
|
|
|
+ :disabled="!(!orgRelationChangeObj.currentRow.cardNo)"
|
|
|
+ clearable
|
|
|
+ placeholder="请输入身份证号"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="类型:" prop="orgRelationChangeType">
|
|
|
+ <el-form-item label="类型:" prop="modifyType">
|
|
|
<el-select
|
|
|
- v-model="orgRelationChangeObj.form.orgRelationChangeType"
|
|
|
+ v-model="orgRelationChangeObj.form.modifyType"
|
|
|
placeholder="请选择类型"
|
|
|
clearable
|
|
|
size="small"
|
|
@@ -311,18 +347,18 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="相关材料:" prop="attachment">
|
|
|
+ <el-form-item label="相关材料:" prop="relatedFile">
|
|
|
<roc-pdf-file-upload
|
|
|
key="ROCPDFFILEUPLOADFULLPARTYMEMBERATTACHMENTKEY"
|
|
|
- v-model="orgRelationChangeObj.form.attachment"
|
|
|
+ v-model="orgRelationChangeObj.form.relatedFile"
|
|
|
upload-file-title="相关材料"
|
|
|
></roc-pdf-file-upload>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="说明:" prop="email">
|
|
|
+ <el-form-item label="说明:" prop="remark">
|
|
|
<el-input
|
|
|
- v-model="orgRelationChangeObj.form.email"
|
|
|
+ v-model="orgRelationChangeObj.form.remark"
|
|
|
type="textarea"
|
|
|
:autosize="{ minRows: 4}"
|
|
|
placeholder="请输入说明"
|
|
@@ -334,19 +370,19 @@
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="rocpartyprimaryplainbtn" @click="orgRelationChangeCancelClick">取 消</el-button>
|
|
|
- <el-button type="rocpartyprimarybtn" @click="orgRelationChangeSubmitForm">下一步</el-button>
|
|
|
+ <el-button
|
|
|
+ :disabled="!orgRelationChangeObj.form.modifyTime || !orgRelationChangeObj.form.memberName || !orgRelationChangeObj.form.cardNo || !orgRelationChangeObj.form.modifyType"
|
|
|
+ type="rocpartyprimarybtn"
|
|
|
+ @click="orgRelationChangeSubmitForm"
|
|
|
+ >下一步</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {
|
|
|
- listFullPartyMember,
|
|
|
- addFullPartyMember,
|
|
|
- updateFullPartyMember,
|
|
|
- viewFullPartyMember
|
|
|
-} from "@/api/PartyBuildingMgr/FullPartyMember";
|
|
|
+import { listFullPartyMember } from "@/api/PartyBuildingMgr/FullPartyMember";
|
|
|
+import { addOrgRelationship } from "@/api/PartyBuildingMgr/OrgRelationship";
|
|
|
|
|
|
export default {
|
|
|
name: "Fullpartymember",
|
|
@@ -357,30 +393,45 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
// 页面类型
|
|
|
- pageType: 'ADD',
|
|
|
+ pageType: 'LIST',
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 显示搜索条件
|
|
|
showSearch: true,
|
|
|
// 列表样式
|
|
|
listActiveType: 'CARDLIST',
|
|
|
- // 性别选项列表
|
|
|
- sexOptions: [],
|
|
|
// 查询条件
|
|
|
queryParams: {
|
|
|
- pageNum: 0,
|
|
|
- pageSize: 10
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 14
|
|
|
},
|
|
|
// 数据总条数
|
|
|
total: 10,
|
|
|
// 表格列表
|
|
|
- list: [1],
|
|
|
+ tableList: [],
|
|
|
orgRelationChangeObj: {
|
|
|
open: false,
|
|
|
form: {},
|
|
|
rules: {
|
|
|
-
|
|
|
- }
|
|
|
+ modifyTime: [
|
|
|
+ { required: true, message: "变更时间不能为空", trigger: ['change', 'blur'] }
|
|
|
+ ],
|
|
|
+ memberName: [
|
|
|
+ { required: true, message: "姓名不能为空", trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ cardNo: [
|
|
|
+ { required: true, message: "身份证号不能为空", trigger: 'blur' },
|
|
|
+ {
|
|
|
+ pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
|
|
|
+ message: "请输入正确身份证号",
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ modifyType: [
|
|
|
+ { required: true, message: "类型不能为空", trigger: ['change', 'blur'] }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ currentRow: {}
|
|
|
},
|
|
|
orgRelationChangeTypeOptions: []
|
|
|
};
|
|
@@ -391,9 +442,12 @@ export default {
|
|
|
methods: {
|
|
|
/** 初始化数据 */
|
|
|
async initData() {
|
|
|
- this.loading = true;
|
|
|
this.listActiveType = 'CARDLIST';
|
|
|
- await this.getMainOptions();
|
|
|
+ this.refreshData();
|
|
|
+ },
|
|
|
+ /** 刷新数据 */
|
|
|
+ async refreshData() {
|
|
|
+ this.loading = true;
|
|
|
this.getList();
|
|
|
},
|
|
|
/** 获取表格数据 */
|
|
@@ -401,22 +455,13 @@ export default {
|
|
|
this.loading = true;
|
|
|
listFullPartyMember(this.queryParams).then(
|
|
|
response => {
|
|
|
- this.list = response.rows || [];
|
|
|
+ this.tableList = response.rows || [];
|
|
|
this.total = response.total ?? 0;
|
|
|
this.loading = false;
|
|
|
this.pageType = 'LIST';
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
- /**
|
|
|
- * 获取主要选项列表
|
|
|
- */
|
|
|
- async getMainOptions() {
|
|
|
- // 性别选项列表
|
|
|
- await this.getDicts('sys_user_sex').then(response => {
|
|
|
- this.sexOptions = response?.data || [];
|
|
|
- });
|
|
|
- },
|
|
|
/**
|
|
|
* 获取次要选项列表
|
|
|
*/
|
|
@@ -442,63 +487,68 @@ export default {
|
|
|
* 搜索按钮事件
|
|
|
*/
|
|
|
handleQueryClick() {
|
|
|
-
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.refreshData();
|
|
|
},
|
|
|
/**
|
|
|
* 重置按钮事件
|
|
|
*/
|
|
|
resetQueryClick() {
|
|
|
-
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.handleQueryClick();
|
|
|
},
|
|
|
/**
|
|
|
- * 新增按钮事件
|
|
|
+ * 查看详情按钮事件
|
|
|
*/
|
|
|
- handleAddClick() {
|
|
|
- this.pageType = 'ADD';
|
|
|
+ handleViewClick(row) {
|
|
|
+
|
|
|
},
|
|
|
/**
|
|
|
- * 转入按钮事件
|
|
|
+ * 组织关系变更事件
|
|
|
*/
|
|
|
- async handleTransferInClick() {
|
|
|
+ async handleReactivateClick(row) {
|
|
|
+ if (!row?.name) return;
|
|
|
+
|
|
|
// 初始化数据
|
|
|
this.orgRelationChangeObj.form = {};
|
|
|
this.resetForm("orgRelationChangeFormRef");
|
|
|
-
|
|
|
await this.getSubOptions();
|
|
|
|
|
|
- // 显示对话框
|
|
|
- this.orgRelationChangeObj.open = true;
|
|
|
- },
|
|
|
- /**
|
|
|
- * 立即处理按钮事件
|
|
|
- */
|
|
|
- handleImmediateProcessingClick() {
|
|
|
-
|
|
|
- },
|
|
|
- /**
|
|
|
- * 查看资料按钮事件
|
|
|
- */
|
|
|
- handleViewMaterialClick() {
|
|
|
-
|
|
|
- },
|
|
|
- /**
|
|
|
- * 组织关系变更事件
|
|
|
- */
|
|
|
- async handleOrgRelationChangeClick() {
|
|
|
- await this.getSubOptions();
|
|
|
+ // 绑定数据
|
|
|
+ this.orgRelationChangeObj.currentRow = row;
|
|
|
+ this.orgRelationChangeObj.form = {
|
|
|
+ memberId: row?.id,
|
|
|
+ memberName: row?.name,
|
|
|
+ cardNo: row?.cardNo
|
|
|
+ };
|
|
|
this.orgRelationChangeObj.open = true;
|
|
|
},
|
|
|
/**
|
|
|
- * 组织关系变更对话框确定按钮事件
|
|
|
+ * 组织关系变更对话框下一步按钮事件
|
|
|
*/
|
|
|
orgRelationChangeSubmitForm() {
|
|
|
- console.log('orgRelationChangeSubmitForm===', this.orgRelationChangeObj.form);
|
|
|
+ this.$refs["orgRelationChangeFormRef"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.$confirm('是否确认当前【下一步】操作?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ addOrgRelationship(this.orgRelationChangeObj.form).then(
|
|
|
+ response => {
|
|
|
+ this.pageType = 'LIST';
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }).catch(() => { });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
/**
|
|
|
* 组织关系变更对话框取消按钮事件
|
|
|
*/
|
|
|
orgRelationChangeCancelClick() {
|
|
|
this.orgRelationChangeObj.open = false;
|
|
|
+ this.orgRelationChangeObj.currentRow = {};
|
|
|
this.orgRelationChangeObj.form = {};
|
|
|
this.resetForm("orgRelationChangeFormRef");
|
|
|
},
|
|
@@ -507,12 +557,70 @@ export default {
|
|
|
*/
|
|
|
handleAddPageSubmitClick(param) {
|
|
|
this.pageType = param;
|
|
|
+ this.refreshData();
|
|
|
},
|
|
|
/**
|
|
|
* 新增页面取消按钮事件
|
|
|
*/
|
|
|
handleAddPageCloseClick(param) {
|
|
|
this.pageType = param;
|
|
|
+ this.refreshData();
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 根据两个指定日期计算党龄
|
|
|
+ * @applyAddPartyDate [String] 出生日期,格式为"1990-01-01"
|
|
|
+ * @addPartyDate [String] 指定日期,格式为"1990-01-01"
|
|
|
+ */
|
|
|
+ getPartyStanding(applyAddPartyDate, addPartyDate) {
|
|
|
+ // 不存在数据
|
|
|
+ if (!applyAddPartyDate || !addPartyDate) {
|
|
|
+ return '—';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 初始化数据
|
|
|
+ const [applyAddPartyDateArr, addPartyDateArr] = [applyAddPartyDate.split("-"), addPartyDate.split("-")];
|
|
|
+
|
|
|
+ // 出生日期数据
|
|
|
+ const [birthYear, birthMonth, birthDay] = applyAddPartyDateArr;
|
|
|
+
|
|
|
+ // 指定日期数据
|
|
|
+ const [specifyYear, specifyMonth, specifyDay] = addPartyDateArr;
|
|
|
+
|
|
|
+ if (specifyYear == birthYear) {
|
|
|
+ return 0; // 同年 则为0岁
|
|
|
+ } else {
|
|
|
+ // 年之差
|
|
|
+ const ageDiff = specifyYear - birthYear;
|
|
|
+
|
|
|
+ if (ageDiff > 0) {
|
|
|
+
|
|
|
+ // 月份相等
|
|
|
+ if (specifyMonth == birthMonth) {
|
|
|
+
|
|
|
+ // 日之差
|
|
|
+ const dayDiff = specifyDay - birthDay;
|
|
|
+
|
|
|
+ // 日之差小于0
|
|
|
+ if (dayDiff < 0) {
|
|
|
+ return ageDiff - 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ return ageDiff; // 日之差大于等于0
|
|
|
+ }
|
|
|
+
|
|
|
+ // 月之差
|
|
|
+ const monthDiff = specifyMonth - birthMonth;
|
|
|
+
|
|
|
+ // 月之差小于0
|
|
|
+ if (monthDiff < 0) {
|
|
|
+ return ageDiff - 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ return ageDiff; // 月之差大于等于0
|
|
|
+ }
|
|
|
+
|
|
|
+ return '—'; // 返回-1 表示出生日期输入错误或晚于今天
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -640,6 +748,7 @@ export default {
|
|
|
img {
|
|
|
width: 203px;
|
|
|
height: 239px;
|
|
|
+ border: 1px solid #dcdfe6;
|
|
|
}
|
|
|
|
|
|
.list-cell-shield {
|