Browse Source

bug#1037更新时间查询当天,bug#1036新增居民选中群众弹框提示,居民年龄后端返回

v1.1
mk 1 year ago
parent
commit
fa3ea11f0a
  1. 6
      src/views/components/resiSearch.vue
  2. 2
      src/views/modules/portrayal/jumin/cpts/staffTag.vue
  3. 27
      src/views/modules/portrayal/jumin/index.vue

6
src/views/components/resiSearch.vue

@ -56,11 +56,11 @@
</el-select>
</el-form-item>
<el-form-item label="更新时间">
<el-date-picker v-model="form.updateTimeStart" type="date" size="small" class="u-item-width-daterange"
<el-date-picker v-model="form.updateTimeStart" type="datetime" size="small" class="u-item-width-daterange"
value-format="yyyy-MM-dd HH:mm:ss" placeholder="开始日期" :picker-options="pickerOptionsStart">
</el-date-picker>
<span class="u-data-tag"></span>
<el-date-picker v-model="form.updateTimeEnd" type="date" size="small" value-format="yyyy-MM-dd HH:mm:ss"
<el-date-picker v-model="form.updateTimeEnd" type="datetime" size="small" value-format="yyyy-MM-dd HH:mm:ss"
class="u-item-width-daterange u-data-tag" placeholder="结束日期" :picker-options="pickerOptionsEnd">
</el-date-picker>
</el-form-item>
@ -858,8 +858,6 @@ export default {
// },
handleAgeChange() {
console.log(11 > 5);
console.log(11 > 10);
if (this.form.ageStart) {
if (this.form.ageStart > this.form.ageEnd) {
this.$message.warning('结束年龄不能小于开始年龄')

2
src/views/modules/portrayal/jumin/cpts/staffTag.vue

@ -202,7 +202,7 @@ export default {
if (val === 1) {
this.$emit('showDialog', { value: val }, val === 1)
this.formData.tableData[0].value= 1
}else{
}else if(this.formType != 'add'){
this.$confirm(`确认取消党员标签`, '确认信息', {
confirmButtonText: '确认取消',
cancelButtonText: '暂不取消',

27
src/views/modules/portrayal/jumin/index.vue

@ -4,7 +4,7 @@
<div class="user">
<img src="@/assets/images/index/nan.png" alt="" />
<span v-if="resiDetailObj.baseInfoDto">
{{ resiDetailObj.baseInfoDto.name }}{{ age }}</span
{{ resiDetailObj.baseInfoDto.name }}{{ resiDetailObj.baseInfoDto.age }}</span
>
<span v-else> -- </span>
</div>
@ -669,7 +669,6 @@ export default {
active: 0,
menuList: [],
score: null,
age: null,
nationalityList: [], //
marriageArr: [], //
@ -1129,26 +1128,6 @@ export default {
console.log(error);
}
},
//
calculateAge(birthdayTimestamp) {
//
const currentDate = new Date();
//
const birthdayDate = new Date(birthdayTimestamp);
//
let age = currentDate.getFullYear() - birthdayDate.getFullYear();
//
const currentMonth = currentDate.getMonth();
const birthMonth = birthdayDate.getMonth();
if (
currentMonth < birthMonth ||
(currentMonth === birthMonth &&
currentDate.getDate() < birthdayDate.getDate())
) {
age--;
}
return age;
},
async getNationalityList() {
try {
const { data } = await this.$http.post("sys/dict/data/dictlist", {
@ -1244,10 +1223,6 @@ export default {
);
this.score = res.data.data.integrityData.score;
const birthdayTimestamp = Date.parse(
res.data.data.baseInfoDto.birthday
);
this.age = this.calculateAge(birthdayTimestamp);
} else if (res.data.code >= 8000) {
this.resiDetailObj = {};
this.$message.error(res.data.msg);

Loading…
Cancel
Save