Browse Source

bug#416迁入居民查询不限制时间,bug#405居民信息新增中单选框默认选中,智能导入点击分类按钮bug

feature
mk 2 years ago
parent
commit
b1d088aef4
  1. 24
      src/views/components/resiForm.vue
  2. 8
      src/views/modules/base/huji/immigration/index.vue
  3. 134
      src/views/modules/base/smartImport.vue

24
src/views/components/resiForm.vue

@ -1052,7 +1052,7 @@ export default {
name:'', // name:'', //
nation:'', // nation:'', //
remark:'', // remark:'', //
localResidenceFlag:'', // localResidenceFlag:'1', //
birthday:'', // birthday:'', //
idNum:'', // idNum:'', //
gender:'', // gender:'', //
@ -1097,10 +1097,10 @@ export default {
disabilityLevel:'',// disabilityLevel:'',//
disabilityNum:'',// disabilityNum:'',//
disabilityDesc:'',// disabilityDesc:'',//
guardianFlag:null,// guardianFlag:1,//
specialSkillFlag:null,//:1 :0 specialSkillFlag:1,//:1 :0
workCapacityFlag:null,//:1 :0 workCapacityFlag:1,//:1 :0
voluntaryEducationFlag:null,//:1 :0 voluntaryEducationFlag:1,//:1 :0
illnessCode:'',//code illnessCode:'',//code
illnessTime:'',//yyyy-MM-dd illnessTime:'',//yyyy-MM-dd
chronicDiseaseCode:'',//code chronicDiseaseCode:'',//code
@ -1134,7 +1134,7 @@ export default {
resideSituation:'',// resideSituation:'',//
marriage:'',// marriage:'',//
spouseSituation:'',// spouseSituation:'',//
elderlyFlag:null,//:1 :0 elderlyFlag:1,//:1 :0
elderlyRelation:'',// elderlyRelation:'',//
dependantMobile:'',// dependantMobile:'',//
familyInfoRemark:'',// familyInfoRemark:'',//
@ -1143,14 +1143,14 @@ export default {
joinTime:'',//yyyy-MM-dd joinTime:'',//yyyy-MM-dd
positiveTime:'',//yyyy-MM-dd positiveTime:'',//yyyy-MM-dd
partyOrgId:'',// partyOrgId:'',//
flowFlag:null,//10 flowFlag:1,//10
flowActNum:'',// flowActNum:'',//
partyJob:'',//code partyJob:'',//code
retiredFlag:null,//退10 retiredFlag:1,//退10
centerFlag:null,//10 centerFlag:1,//10
joinBranchName:'',// joinBranchName:'',//
joinCommunityTime:'',//yyyy-MM-dd joinCommunityTime:'',//yyyy-MM-dd
longHolidayFlag:null,//10 longHolidayFlag:1,//10
}, },
ensureHouseDto:{// ensureHouseDto:{//
housingNature:'',//code housingNature:'',//code
@ -1166,7 +1166,7 @@ export default {
employmentNum:'',// employmentNum:'',//
specialSkill:'',// specialSkill:'',//
unemploymentReason:'',//code unemploymentReason:'',//code
employmentHardFlag:null,//10 employmentHardFlag:1,//10
employmentWish:'',// employmentWish:'',//
}, },
veteranDto:{//退 veteranDto:{//退
@ -1179,7 +1179,7 @@ export default {
employmentSituation:'',// employmentSituation:'',//
joinWarStartTime:'',//yyyy-MM-dd joinWarStartTime:'',//yyyy-MM-dd
joinWarEndTime:'',//yyyy-MM-dd joinWarEndTime:'',//yyyy-MM-dd
pubWelfareJobFlag:null,//;10 pubWelfareJobFlag:1,//;10
}, },
unitedFrontDto:{// unitedFrontDto:{//
duty:'',// duty:'',//

8
src/views/modules/base/huji/immigration/index.vue

@ -551,10 +551,10 @@ export default {
searchH: 0, searchH: 0,
changeRecordShow: false, changeRecordShow: false,
pickerOptions: { pickerOptions: {
disabledDate: time => { // disabledDate: time => {
// // //
return time.getTime() > Date.now() - 8.64e6; // return time.getTime() > Date.now() - 8.64e6;
} // }
}, },
}; };
}, },

134
src/views/modules/base/smartImport.vue

@ -2,7 +2,25 @@
<div class="g-main"> <div class="g-main">
<div class="m-table"> <div class="m-table">
<div class="u-table-btn1"> <div class="u-table-btn1">
<el-dropdown
size="small"
type="primary"
style="margin: 0 10px; height: 30px"
trigger="hover"
>
<el-button type="primary" size="small">
表格导入<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
v-for="(item, index) in resiClass"
:key="index"
@click.native="handleImportType(item.value)"
>
{{ item.label }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-upload <el-upload
:headers="$getElUploadHeaders()" :headers="$getElUploadHeaders()"
ref="upload" ref="upload"
@ -17,24 +35,7 @@
:on-success="handleExcelSuccess" :on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload" :before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest" :http-request="uploadHttpRequest"
> ></el-upload>
<el-dropdown
size="small"
type="primary"
style="margin: 0 10px; height: 30px"
@command="(command) => handleImportType(command)"
trigger="hover"
>
<el-button type="primary">
表格导入<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown" >
<el-dropdown-item v-for="(item,index) in resiClass" :key="index" :command="item.value" >{{item.label}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-upload>
<el-button <el-button
class="diy-button--white" class="diy-button--white"
size="small" size="small"
@ -149,32 +150,31 @@ export default {
// tableHeight: 500, // tableHeight: 500,
search: "", search: "",
dataList: [ dataList: [
// { // {
// index: "key1", // index: "key1",
// srcField: "value1_from_exist", // srcField: "",
// exist: true, // exist: true,
// field: "value1_from_exist" // field: "",
// }, // },
// { // {
// index: "key2", // index: "key2",
// srcField: "value2_from_exist", // srcField: "",
// exist: true, // exist: true,
// field: "value2_from_exist" // field: "",
// }, // },
// { // {
// index: "key3", // index: "key3",
// srcField: "value3_from_notExist", // srcField: "",
// exist: false, // exist: false,
// field: "" // field: "",
// }, // },
// { // {
// index: "key4", // index: "key4",
// srcField: "value4_from_notExist", // srcField: "",
// exist: false, // exist: false,
// field: "" // field: "",
// }, // },
], ],
dataListLoading: false, dataListLoading: false,
total: 0, total: 0,
pageSize: 20, pageSize: 20,
@ -196,7 +196,7 @@ export default {
fileData: null, fileData: null,
resiClass: [], resiClass: [],
importType :'' importType: "",
}; };
}, },
@ -214,7 +214,7 @@ export default {
async mounted() { async mounted() {
// await this.loadData(); // await this.loadData();
await this.loadPersonGroup(); await this.loadPersonGroup();
this.getResident() this.getResident();
this.sHeight = this.$refs.divEditBtn.offsetHeight + 300; this.sHeight = this.$refs.divEditBtn.offsetHeight + 300;
}, },
@ -222,7 +222,9 @@ export default {
diaClose() { diaClose() {
this.formShow = false; this.formShow = false;
}, },
handleDropdownClick(event) {
event.stopPropagation();
},
async loadPersonGroup() { async loadPersonGroup() {
const url = "/oper/customize/icformitemgroup/list"; const url = "/oper/customize/icformitemgroup/list";
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/isServiceProject/service/serviceScopeTree' // const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/isServiceProject/service/serviceScopeTree'
@ -283,18 +285,14 @@ export default {
// this.$message.error(msg ) // this.$message.error(msg )
} }
}, },
handleImportType(command){ handleImportType(command) {
this.importType = command this.importType = command;
// this.$refs.upload.click(); this.$refs["upload"].$children[0].$refs.input.click();
this.$refs['upload'].$children[0].$refs.input.click() },
},
handleChangeScope(value) { handleChangeScope(value) {
// console.log('value', value)
this.orgIdArray = value; this.orgIdArray = value;
this.scopeList = []; this.scopeList = [];
let selArray = this.$refs["myCascader"].getCheckedNodes(); let selArray = this.$refs["myCascader"].getCheckedNodes();
// console.log('selArray', selArray) // console.log('selArray', selArray)
selArray.forEach((element, index) => { selArray.forEach((element, index) => {
@ -367,6 +365,8 @@ export default {
}, },
// //
handleExcelSuccess(res, file) { handleExcelSuccess(res, file) {
console.log(res, file);
if (!res) return;
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {
console.log("resss---ppp", res); console.log("resss---ppp", res);
} else { } else {
@ -379,8 +379,8 @@ export default {
beforeExcelUpload(file) { beforeExcelUpload(file) {
console.log("file", file); console.log("file", file);
console.log(this.importType); console.log(this.importType);
const isType = file.type === "application/vnd.ms-excel"; const isType = file.type === "application/vnd.ms-excel";
const isTypeComputer = const isTypeComputer =
file.type === file.type ===
@ -395,13 +395,13 @@ export default {
this.$message.error("上传文件大小不能超过 10MB!"); this.$message.error("上传文件大小不能超过 10MB!");
} }
if(!this.importType){ if (!this.importType) {
this.$message.error('请选择导入的类别') this.$message.error("请选择导入的类别");
} }
return fileType && isLt1M; return fileType && isLt1M;
}, },
async uploadHttpRequest(file) { async uploadHttpRequest(file) {
if(!this.importType) return if (!this.importType) return;
this.importLoading = true; this.importLoading = true;
this.importBtnTitle = "正在上传中..."; this.importBtnTitle = "正在上传中...";
const formData = new FormData(); //FormDataappend('key', value) const formData = new FormData(); //FormDataappend('key', value)
@ -414,7 +414,7 @@ export default {
if (res.data.code == 0 && res.data.msg == "success") { if (res.data.code == 0 && res.data.msg == "success") {
console.log(res.data.data); console.log(res.data.data);
const data = res.data.data; const data = res.data.data;
this.afterSuccess(); this.afterSuccess();
this.dataList = [ this.dataList = [
...Object.keys(data.option.exist).map((k) => { ...Object.keys(data.option.exist).map((k) => {
return { return {
@ -552,9 +552,9 @@ export default {
text-align: center; text-align: center;
color: #aaaaaa; color: #aaaaaa;
} }
::v-deep .upload-btn{ ::v-deep .upload-btn {
.el-button{ .el-button {
padding: 7px 20px; padding: 7px 20px;
} }
} }
</style> </style>

Loading…
Cancel
Save