diff --git a/housing.zip b/housing.zip new file mode 100644 index 0000000..851cafc Binary files /dev/null and b/housing.zip differ diff --git a/package-lock.json b/package-lock.json index ffab912..0e58fac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@vicons/fluent": "^0.12.0", "@vicons/utils": "^0.1.4", "axios": "^1.6.0", + "echarts": "^5.4.3", "naive-ui": "^2.35.0", "stylus": "^0.60.0", "vue": "^3.3.4", @@ -725,6 +726,15 @@ "node": ">=0.4.0" } }, + "node_modules/echarts": { + "version": "5.4.3", + "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz", + "integrity": "sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==", + "dependencies": { + "tslib": "2.3.0", + "zrender": "5.4.4" + } + }, "node_modules/esbuild": { "version": "0.18.20", "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.18.20.tgz", @@ -1059,6 +1069,11 @@ "resolved": "https://registry.npmmirror.com/treemate/-/treemate-0.3.11.tgz", "integrity": "sha512-M8RGFoKtZ8dF+iwJfAJTOH/SM4KluKOKRJpjCMhI8bG3qB74zrFoArKZ62ll0Fr3mqkMJiQOmWYkdYgDeITYQg==" }, + "node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + }, "node_modules/vdirs": { "version": "0.1.8", "resolved": "https://registry.npmmirror.com/vdirs/-/vdirs-0.1.8.tgz", @@ -1185,6 +1200,14 @@ "version": "1.0.2", "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/zrender": { + "version": "5.4.4", + "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz", + "integrity": "sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==", + "dependencies": { + "tslib": "2.3.0" + } } }, "dependencies": { @@ -1654,6 +1677,15 @@ "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" }, + "echarts": { + "version": "5.4.3", + "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz", + "integrity": "sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==", + "requires": { + "tslib": "2.3.0", + "zrender": "5.4.4" + } + }, "esbuild": { "version": "0.18.20", "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.18.20.tgz", @@ -1911,6 +1943,11 @@ "resolved": "https://registry.npmmirror.com/treemate/-/treemate-0.3.11.tgz", "integrity": "sha512-M8RGFoKtZ8dF+iwJfAJTOH/SM4KluKOKRJpjCMhI8bG3qB74zrFoArKZ62ll0Fr3mqkMJiQOmWYkdYgDeITYQg==" }, + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + }, "vdirs": { "version": "0.1.8", "resolved": "https://registry.npmmirror.com/vdirs/-/vdirs-0.1.8.tgz", @@ -1977,6 +2014,14 @@ "version": "1.0.2", "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "zrender": { + "version": "5.4.4", + "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz", + "integrity": "sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==", + "requires": { + "tslib": "2.3.0" + } } } } diff --git a/package.json b/package.json index dd70b19..ba6f5d8 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@vicons/fluent": "^0.12.0", "@vicons/utils": "^0.1.4", "axios": "^1.6.0", + "echarts": "^5.4.3", "naive-ui": "^2.35.0", "stylus": "^0.60.0", "vue": "^3.3.4", diff --git a/public/assets/images/house-population-bg.png b/public/assets/images/house-population-bg.png new file mode 100644 index 0000000..4f7f738 Binary files /dev/null and b/public/assets/images/house-population-bg.png differ diff --git a/public/assets/images/population-house-bg.png b/public/assets/images/population-house-bg.png new file mode 100644 index 0000000..8eb6d9d Binary files /dev/null and b/public/assets/images/population-house-bg.png differ diff --git a/public/assets/svgs/fa-address-card.svg b/public/assets/svgs/fa-address-card.svg new file mode 100644 index 0000000..f073db4 --- /dev/null +++ b/public/assets/svgs/fa-address-card.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/public/assets/svgs/fa-building.svg b/public/assets/svgs/fa-building.svg new file mode 100644 index 0000000..479a123 --- /dev/null +++ b/public/assets/svgs/fa-building.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/public/assets/svgs/fa-hospital.svg b/public/assets/svgs/fa-hospital.svg new file mode 100644 index 0000000..13c2bf9 --- /dev/null +++ b/public/assets/svgs/fa-hospital.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/public/assets/svgs/fa-user.svg b/public/assets/svgs/fa-user.svg new file mode 100644 index 0000000..5f7f896 --- /dev/null +++ b/public/assets/svgs/fa-user.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/public/assets/svgs/iconPark-bank-card.svg b/public/assets/svgs/iconPark-bank-card.svg new file mode 100644 index 0000000..3a68d9a --- /dev/null +++ b/public/assets/svgs/iconPark-bank-card.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/public/assets/svgs/iconPark-shopping-mall.svg b/public/assets/svgs/iconPark-shopping-mall.svg new file mode 100644 index 0000000..3e3a587 --- /dev/null +++ b/public/assets/svgs/iconPark-shopping-mall.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/public/assets/svgs/md-contacts.svg b/public/assets/svgs/md-contacts.svg new file mode 100644 index 0000000..430148e --- /dev/null +++ b/public/assets/svgs/md-contacts.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/public/assets/svgs/md-domain.svg b/public/assets/svgs/md-domain.svg new file mode 100644 index 0000000..42786a4 --- /dev/null +++ b/public/assets/svgs/md-domain.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/public/assets/svgs/md-phone_android.svg b/public/assets/svgs/md-phone_android.svg new file mode 100644 index 0000000..0493a53 --- /dev/null +++ b/public/assets/svgs/md-phone_android.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/public/assets/svgs/riLine-building-3-line.svg b/public/assets/svgs/riLine-building-3-line.svg new file mode 100644 index 0000000..7c0d08f --- /dev/null +++ b/public/assets/svgs/riLine-building-3-line.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index ffcc9c4..5149a20 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,7 +1,11 @@ - + diff --git a/src/components/Index.vue b/src/components/Index.vue new file mode 100644 index 0000000..c3466ff --- /dev/null +++ b/src/components/Index.vue @@ -0,0 +1,30 @@ + + + + + \ No newline at end of file diff --git a/src/components/info/HouseInfo.vue b/src/components/info/HouseInfo.vue index eb842c5..2b44b50 100644 --- a/src/components/info/HouseInfo.vue +++ b/src/components/info/HouseInfo.vue @@ -12,165 +12,177 @@
- - - -
{{ houseInfo.communityName }}
-
- - -
{{ houseInfo.residentialName }}
-
- - -
{{ houseInfo.buildingName }}
-
-
- - - -
{{ houseInfo.affiliationUnit }}
-
- - -
{{ houseInfo.affiliationFloors }}
-
- - -
{{ houseInfo.houseNum }}
-
-
- - - -
{{ houseInfo.typeName }}
-
- - -
{{ houseInfo.natureName }}
-
- - -
{{ houseInfo.categoryName }}
-
-
- - - -
{{ houseInfo.structureName }}
-
- - -
{{ houseInfo.roomArea }}
-
- - -
{{ houseInfo.buildingPurposeName }}
-
-
- - - -
{{ houseInfo.roomNum }}
-
- - -
{{ houseInfo.certificateNum }}
-
- - -
{{ houseInfo.roomUseName }}
-
-
- - - -
{{ houseInfo.isVacant }}
-
- - -
{{ houseInfo.isRental }}
-
- - -
{{ houseInfo.dangerName }}
-
-
- - - -
{{ houseInfo.registrationDate }}
-
- - -
{{ houseInfo.affiliatedUnit }}
-
-
-
- -
-
租住情况
-
- - - -
{{ houseInfo.lodgeTypeName }}
-
-
-
-
-
-
房主
-
- - - -
{{ houseInfo.homeowner }}
-
- - -
{{ houseInfo.documentName }}
-
- - -
{{ houseInfo.documentNum }}
-
-
- - - -
{{ houseInfo.phone }}
-
-
-
-
-
-
托管人
-
- - - -
{{ houseInfo.custodian }}
-
- - -
{{ houseInfo.custodianDocumentName }}
-
- - -
{{ houseInfo.custodianDocumentNum }}
-
-
- - - -
{{ houseInfo.custodianPhone }}
-
- - -
{{ houseInfo.relationshipHomeowner }}
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
{{ houseInfo.communityName ? houseInfo.communityName : '无' }}
+
+
{{ houseInfo.residentialName ? houseInfo.residentialName : '无' }} +
+
+
{{ houseInfo.buildingName ? houseInfo.buildingName : '无' }}
+
+
{{ houseInfo.affiliationUnit ? houseInfo.affiliationUnit : '无' }}
+
+
{{ houseInfo.affiliationFloors ? houseInfo.affiliationFloors : '无' }} +
+
+
{{ houseInfo.houseNum ? houseInfo.houseNum : '无' }}
+
+
{{ houseInfo.typeName ? houseInfo.typeName : '无' }}
+
+
{{ houseInfo.natureName ? houseInfo.natureName : '无' }} +
+
+
{{ houseInfo.categoryName ? houseInfo.categoryName : '无' }}
+
+
{{ houseInfo.structureName ? houseInfo.structureName : '无' }}
+
+
{{ houseInfo.roomArea ? houseInfo.roomArea : '无' }} +
+
+
{{ houseInfo.buildingPurposeName ? houseInfo.buildingPurposeName : '无' }}
+
+
{{ houseInfo.roomNum ? houseInfo.roomNum : '无' }}
+
+
{{ houseInfo.certificateNum ? houseInfo.certificateNum : '无' }} +
+
+
{{ houseInfo.roomUseName ? houseInfo.roomUseName : '无' }}
+
+
{{ houseInfo.isVacant ? houseInfo.isVacant : '无' }}
+
+
{{ houseInfo.isRental ? houseInfo.isRental : '无' }} +
+
+
{{ houseInfo.dangerName ? houseInfo.dangerName : '无' }}
+
+
{{ houseInfo.registrationDate ? houseInfo.registrationDate : '无' }}
+
+
{{ houseInfo.affiliatedUnit ? houseInfo.affiliatedUnit : '无' }} +
+
+
{{ houseInfo.lodgeTypeName ? houseInfo.lodgeTypeName : '无' }}
+
+
{{ houseInfo.homeowner ? houseInfo.homeowner : '无' }}
+
+
{{ houseInfo.documentName ? houseInfo.documentName : '无' }} +
+
+
{{ houseInfo.documentNum ? houseInfo.documentNum : '无' }} +
+
+
{{ houseInfo.phone ? houseInfo.phone : '无' }}
+
+
{{ houseInfo.custodian ? houseInfo.custodian : '无' }}
+
+
{{ houseInfo.custodianDocumentName ? houseInfo.custodianDocumentName : '无' }} +
+
+
{{ houseInfo.custodianDocumentNum ? houseInfo.custodianDocumentNum : '无' }} +
+
+
{{ houseInfo.custodianPhone ? houseInfo.custodianPhone : '无' }}
+
+
{{ houseInfo.relationshipHomeowner ? houseInfo.relationshipHomeowner : '无' }}
+
@@ -182,11 +194,11 @@
-
姓名:{{ item.name }}
-
年龄:{{ item.age }}
-
证件类型:{{ item.idcardType }}
-
证件号码:{{ item.idcard }}
-
联系方式:{{ item.phone }}
+
姓名:{{ item.name }}
+
年龄:{{ item.age }}
+
证件类型:{{ item.idcardType }}
+
证件号码:{{ item.idcard }}
+
联系方式:{{ item.phone }}
@@ -199,14 +211,24 @@ import { ref, reactive, inject } from 'vue'; import { useRoute, useRouter } from 'vue-router'; import { NSpace, NSpin } from 'naive-ui'; +import { useMessage } from 'naive-ui'; import { ArrowStepBack16Filled } from '@vicons/fluent'; import { Icon } from '@vicons/utils'; +const message = useMessage(); const route = useRoute(); const router = useRouter(); const query = route.query; const axios = inject('axios'); +const svgs = { + 'a': '/assets/svgs/fa-user.svg', + 'b': '/assets/svgs/md-contacts.svg', + 'c': '/assets/svgs/iconPark-shopping-mall.svg', + 'd': '/assets/svgs/fa-address-card.svg', + 'e': '/assets/svgs/md-phone_android.svg', +} + const houseInfo = reactive({}); const populationList = reactive([]); @@ -247,7 +269,10 @@ const initHouseInfo = () => { houseInfo.custodianDocumentNum = data.custodianDocumentNum; houseInfo.custodianPhone = data.custodianPhone; houseInfo.relationshipHomeowner = data.relationshipHomeowner; - }).catch(err => { console.error(err); }).finally(() => { + }).catch(res => { + console.error(res); + message.error(res.response.data) + }).finally(() => { isInfoLoading.value = false; }); } @@ -289,6 +314,7 @@ initPopulationList(); --var-parents-width 200px --var-label-width 70px --var-value-width 100px + padding-bottom 10px .top padding 10px 0 font-weight bold @@ -307,27 +333,27 @@ initPopulationList(); margin-left 10px cursor pointer .content - .row - margin-bottom 10px - .item - font-size 12px - .name + table + width 100% + border-collapse collapse + font-size 12px + td + border 1px solid rgba(255,255,255,0.25) + padding 4px + label font-weight bold - display block - width var(--var-label-width) + width 100% + display inline-block + text-align center + color rgb(147,210,243) .value - width var(--var-value-width) - height 20px - line-height 20px - font-weight 400 - padding 5px - color #B7B9BB - background-color rgba(239, 239, 239, 0.1) - overflow hidden - text-overflow ellipsis - white-space nowrap + min-width 60px + min-height 20px + text-align center .right width var(--var-right-width) + height 550px + overflow auto font-size 12px margin-top 44px .title @@ -335,13 +361,29 @@ initPopulationList(); padding 10px .list margin-top 10px + overflow auto + padding 5px 5px 180px 5px background-color rgba(239, 239, 239, 0.1) - padding 10px + background-image url(/assets/images/house-population-bg.png) + background-size 100% + background-repeat no-repeat + background-position bottom .card - background-color rgba(255, 255, 255, 0.25) padding 5px margin-bottom 5px + border-bottom 1px solid rgba(255, 255, 255, 0.5) cursor pointer + .line + display flex + align-items center + margin-bottom 5px + img + width 15px + height 15px + margin-right 2px + span + color #93D2F3 &:last-child margin-bottom 0 + border-bottom none \ No newline at end of file diff --git a/src/components/info/PopulationInfo.vue b/src/components/info/PopulationInfo.vue index 959c37b..1aa233f 100644 --- a/src/components/info/PopulationInfo.vue +++ b/src/components/info/PopulationInfo.vue @@ -10,141 +10,222 @@
- - - -
{{ populationInfo.name }}
-
- - -
{{ populationInfo.idcardType }}
-
- - -
{{ populationInfo.idcard }}
-
-
- - - -
{{ populationInfo.sex }}
-
- - -
{{ populationInfo.nation }}
-
- - -
{{ populationInfo.education }}
-
-
- - - -
{{ populationInfo.description }}
-
-
- - - -
{{ populationInfo.organization }}
-
- - -
{{ populationInfo.religion }}
-
- - -
{{ populationInfo.marriageStatus }}
-
- - -
{{ populationInfo.marriageChangeTime }}
-
-
- - - -
{{ populationInfo.marriageFirstTime }}
-
- - -
{{ populationInfo.socialSecurity }}
-
- - -
{{ populationInfo.healthStatus }}
-
-
- - - -
{{ populationInfo.departmentType }}
-
- - -
{{ populationInfo.department }}
-
- - -
{{ populationInfo.pastion }}
-
-
- - - -
{{ populationInfo.pastionTitle }}
-
- - -
{{ populationInfo.expertise }}
-
- - -
{{ populationInfo.phone }}
-
-
- - - -
{{ populationInfo.domicileAddress }}
-
-
- - - -
{{ populationInfo.flowTime }}
-
- - -
{{ populationInfo.flowReason }}
-
- - -
{{ populationInfo.flowReasontext }}
-
-
- - -
-
父亲
-
-
姓名:{{ populationInfo.fatherName }}
-
身份证:{{ populationInfo.fatherIdcard }}
-
联系电话:{{ populationInfo.fatherPhone }}
-
-
-
-
母亲
-
-
姓名:{{ populationInfo.motherName }}
-
身份证:{{ populationInfo.motherIdcard }}
-
联系电话:{{ populationInfo.motherPhone }}
-
-
-
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
{{ populationInfo.name ? populationInfo.name : '无' }}
+
+
{{ populationInfo.idcardType ? populationInfo.idcardType : '无' }} +
+
+
{{ populationInfo.idcard ? populationInfo.idcard : '无' }}
+
+
{{ populationInfo.sex ? populationInfo.sex : '无' }}
+
+
{{ populationInfo.nation ? populationInfo.nation : '无' }}
+
+
{{ populationInfo.education ? populationInfo.education : '无' }}
+
+
+ 正常 + 军人 + 党员 + 社区矫正 + 刑满释放 + 矛盾纠纷 + 社会治安 + 吸毒人员 + 涉邪人员 + 重点上访户 + 重病 + 老年人 + 未成年 +
+
+
{{ populationInfo.description ? populationInfo.description : '无' }} +
+
+
{{ populationInfo.organization ? populationInfo.organization : '无' }} +
+
+
{{ populationInfo.religion ? populationInfo.religion : '无' }}
+
+
+ {{ populationInfo.marriageStatus ? populationInfo.marriageStatus : '无' }} +
+
+
+ {{ populationInfo.marriageChangeTime ? populationInfo.marriageChangeTime : '无' }} +
+
+
+ {{ populationInfo.marriageFirstTime ? populationInfo.marriageFirstTime : '无' }} +
+
+
+ {{ populationInfo.socialSecurity ? populationInfo.socialSecurity : '无' }} +
+
+
{{ populationInfo.healthStatus ? populationInfo.healthStatus : '无' }} +
+
+
+ {{ populationInfo.departmentType ? populationInfo.departmentType : '无' }} +
+
+
{{ populationInfo.department ? populationInfo.department : '无' }} +
+
+
{{ populationInfo.pastion ? populationInfo.pastion : '无' }}
+
+
{{ populationInfo.pastionTitle ? populationInfo.pastionTitle : '无' }} +
+
+
{{ populationInfo.expertise ? populationInfo.expertise : '无' }}
+
+
{{ populationInfo.phone ? populationInfo.phone : '无' }}
+
+
+ {{ populationInfo.domicileAddress ? populationInfo.domicileAddress : '无' }} +
+
+
{{ populationInfo.flowTime ? populationInfo.flowTime : '无' }}
+
+
{{ populationInfo.flowReason ? populationInfo.flowReason : '无' }} +
+
+
+ {{ populationInfo.flowReasontext ? populationInfo.flowReasontext : '无' }} +
+
+
{{ populationInfo.fatherName ? populationInfo.fatherName : '无' }} +
+
+
+ {{ populationInfo.flowReasontext ? populationInfo.flowReasontext : '无' }} +
+
+
{{ populationInfo.fatherIdcard ? populationInfo.fatherIdcard : '无' }} +
+
+
{{ populationInfo.motherName ? populationInfo.motherName : '无' }} +
+
+
{{ populationInfo.motherPhone ? populationInfo.motherPhone : '无' }} +
+
+
{{ populationInfo.motherIdcard ? populationInfo.motherIdcard : '无' }} +
+
+
+
@@ -154,11 +235,11 @@
-
所在社区:{{ house.communityName }}
-
所在小区/组:{{ house.residentialName }}
-
楼/排名称:{{ house.buildingName }}
-
所在单元/列:{{ house.affiliationUnit }}
-
门牌号:{{ house.houseNum }}
+
所在社区:{{ house.communityName }}
+
所在小区/组:{{ house.residentialName }}
+
楼/排名称:{{ house.buildingName }}
+
所在单元/列:{{ house.affiliationUnit }}
+
门牌号:{{ house.houseNum }}
@@ -169,25 +250,62 @@ \ No newline at end of file diff --git a/src/components/list/HouseList.vue b/src/components/list/HouseList.vue index 7c212a4..7f9f324 100644 --- a/src/components/list/HouseList.vue +++ b/src/components/list/HouseList.vue @@ -95,10 +95,13 @@ import { ref, reactive, inject } from 'vue'; import { useRoute, useRouter } from 'vue-router'; import { NSpace, NInput, NGrid, NGridItem, NImage, NModal, NSpin } from 'naive-ui'; +import { useMessage } from 'naive-ui'; import { Search24Filled } from '@vicons/fluent'; import { Icon } from '@vicons/utils'; import Pager from '../pager/Pager.vue'; +const message = useMessage(); + const route = useRoute(); const router = useRouter(); const axios = inject('axios'); @@ -125,8 +128,9 @@ const init = () => { dataRows.splice(0, dataRows.length); dataRows.push(...data.rows); pagerUpdateIndex.value++; - }).catch(resp => { - console.error(resp) + }).catch(res => { + console.error(res) + message.error(res.response.data) }).finally(() => { isLoading.value = false; }); diff --git a/src/components/list/PopulationList.vue b/src/components/list/PopulationList.vue index db650eb..02ba827 100644 --- a/src/components/list/PopulationList.vue +++ b/src/components/list/PopulationList.vue @@ -21,7 +21,7 @@ {{ data.populationInfoBaseDTO.name }} {{ data.populationInfoBaseDTO.sex }} - 17 + {{ data.populationInfoBaseDTO.age }} {{ data.populationInfoBaseDTO.idcardType }} {{ data.populationInfoBaseDTO.idcard }} @@ -38,6 +38,9 @@ {{ data.populationInfoBaseDTO.education }}
+ 正常 + 军人 + 党员 社区矫正 老年人 未成年 - 正常 +
@@ -114,8 +117,11 @@ import { ref, reactive, inject } from 'vue'; import { useRoute, useRouter } from 'vue-router'; import { NSpace, NInput, NGrid, NGridItem, NImage, NSpin } from 'naive-ui'; +import { useMessage } from 'naive-ui'; import Pager from '../pager/Pager.vue' +const message = useMessage(); + const route = useRoute(); const router = useRouter(); const axios = inject('axios'); @@ -141,7 +147,7 @@ const init = () => { total.value = data.total; dataRows.splice(0, dataRows.length); data.rows.forEach(item => { - item.isNormal = ( + item.populationInfoBaseDTO.isNormal = ( item.populationInfoBaseDTO.isCorrect === '否' && item.populationInfoBaseDTO.isRelease === '否' && item.populationInfoBaseDTO.isDispute === '否' && @@ -153,7 +159,9 @@ const init = () => { dataRows.push(item); }); pagerUpdateIndex.value++; - }).catch(resp => { + }).catch(res => { + console.error(res) + message.error(res.response.data) }).finally(() => { isLoading.value = false; }); @@ -172,6 +180,10 @@ const onReseachClick = () => { } const onPopulationClick = (populationInfoId) => { + if(!populationInfoId) { + message.error('该人员信息不在人口管理中,无法查看详情') + return; + } router.push({ path: 'population-info', query: { @@ -253,6 +265,7 @@ init(); overflow hidden -webkit-line-clamp 2 span + display inline-block margin-right 3px background-color red padding 1px 10px diff --git a/src/components/pager/Pager.vue b/src/components/pager/Pager.vue index 3345210..e3b0cef 100644 --- a/src/components/pager/Pager.vue +++ b/src/components/pager/Pager.vue @@ -130,13 +130,15 @@ const onPageJumpConfirmClick = () => { \ No newline at end of file diff --git a/src/main.js b/src/main.js index 10f3d02..9de68d7 100644 --- a/src/main.js +++ b/src/main.js @@ -3,6 +3,7 @@ import {router} from './route/route' import './style.css' import App from './App.vue' import axios from 'axios'; +import * as echarts from 'echarts'; const createAxios = { install(app, options) { @@ -14,7 +15,14 @@ const createAxios = { } } +const createEcharts = { + install(app, options) { + app.provide('echarts', echarts); + } +} + const app = createApp(App); app.use(router); app.use(createAxios); +app.use(createEcharts); app.mount('#app'); diff --git a/src/route/route.js b/src/route/route.js index 5566746..3c8bd33 100644 --- a/src/route/route.js +++ b/src/route/route.js @@ -5,6 +5,7 @@ import PopulationList from '../components/list/PopulationList.vue'; import HouseList from '../components/list/HouseList.vue'; import PopulationInfo from '../components/info/PopulationInfo.vue'; import HouseInfo from '../components/info/HouseInfo.vue'; +import Index from '../components/Index.vue'; const routes = [{ name: '以人找房搜索', @@ -30,6 +31,10 @@ const routes = [{ name: '房屋详情', path: '/house-info', component: HouseInfo +}, { + name: '首页', + path: '/', + component: Index }] export const router = createRouter({