diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js index 789f50f8..9a495765 100644 --- a/src/i18n/zh-CN.js +++ b/src/i18n/zh-CN.js @@ -3,9 +3,9 @@ const t = {} t.loading = '加载中...' t.brand = {} -t.brand.lg = '数字社区工作平台' +t.brand.lg = '数字社区综合服务平台' t.brand.mini = '数字' -t.brand.work = '数字社区工作平台' +t.brand.work = '数字社区综合服务平台' t.brand.workMini = '工作端' t.add = '新增' diff --git a/src/js/dai/request.js b/src/js/dai/request.js index 8365bd3e..92fb7831 100644 --- a/src/js/dai/request.js +++ b/src/js/dai/request.js @@ -38,6 +38,14 @@ const request = curry( if (res.data.code > 8000 && res.data.code < 10000) { // Message.error(res.data.msg); } + if (res.code == 10005 || res.code == 10006 || res.code == 10007) { + // 10005 token为空 10006登陆超时 10007别处登录 + console.log("登录失效"); + Message.error(res.data.msg); + return next({ + name: "login", + }); + } reslove(retData); }; diff --git a/src/js/dai/request2.js b/src/js/dai/request2.js index 8c38025d..0d257d33 100644 --- a/src/js/dai/request2.js +++ b/src/js/dai/request2.js @@ -38,6 +38,14 @@ const request = curry( if (res.data.code > 8000 && res.data.code < 10000) { Message.error(res.data.msg); } + if (res.code == 10005 || res.code == 10006 || res.code == 10007) { + // 10005 token为空 10006登陆超时 10007别处登录 + console.log("登录失效"); + Message.error(res.data.msg); + return next({ + name: "login", + }); + } reslove(retData); }; diff --git a/src/js/store/modules/app.js b/src/js/store/modules/app.js index b9a493a9..4384a1c1 100644 --- a/src/js/store/modules/app.js +++ b/src/js/store/modules/app.js @@ -5,13 +5,15 @@ export default { clientHeight: document.documentElement.clientHeight, size: 'medium', resolution: 'medium', - env: 'dev' + env: 'dev', + iframeHeight:120 }, getters: { clientHeight: (state) => state.clientHeight, size: (state) => state.size, resolution: (state) => state.resolution, - env: (state) => state.env + env: (state) => state.env, + iframeHeight: (state) => state.iframeHeight }, mutations: { [type.client_height](state, payload) { diff --git a/src/router/index.js b/src/router/index.js index d359188d..e7888582 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -179,7 +179,7 @@ const router = new Router({ router.beforeEach((to, from, next) => { // 添加动态(菜单)路由 // 已添加或者当前路由为页面路由, 可直接访问 - if(to.name==='caiji'){ + if (to.name === "caiji") { return next(); } if ( @@ -237,6 +237,29 @@ router.beforeEach((to, from, next) => { name: "人员预警", url: "visual/warning/index", }, + { + icon: "icon-setting", + id: "2221321001", + name: "社区党建", + // url: "visual/basicinfo/basicInfoMain", + children: [ + { + url: "/visual/communityParty/party", + name: "党员信息统计", + id: "5feawfwaefwa578", + }, + { + url: "/visual/communityParty/community", + name: "区域化党建", + id: "5fwaefwaefawef588", + }, + { + url: "/visual/communityParty/elegant", + name: "党员风采榜", + id: "5fwaefwaefawef589", + }, + ], + }, { icon: "icon-setting", id: "6", @@ -244,63 +267,40 @@ router.beforeEach((to, from, next) => { children: [ { url: "visual/communityGovern/processAnalyze", - name: "项目处理分析", + name: "事件处置分析", id: "processAnalyze", }, { url: "/visual/communityGovern/typeAnalyze", - name: "项目分类分析", + name: "事件分类分析", id: "typeAnalyze", }, { url: "/visual/communityGovern/resibuzz", - name: "居民热议", + name: "居民热议分析", id: "resibuzz", }, { url: "/visual/communityGovern/distributionAnalyze", - name: "项目分布分析", + name: "事件分布分析", id: "distributionAnalyze", }, ], }, - { - icon: "icon-setting", - id: "2221321001", - name: "社区党建", - // url: "visual/basicinfo/basicInfoMain", - children: [ - { - url: "/visual/communityParty/party", - name: "党员信息统计", - id: "5feawfwaefwa578", - }, - { - url: "/visual/communityParty/community", - name: "区域化党建", - id: "5fwaefwaefawef588", - }, - { - url: "/visual/communityParty/elegant", - name: "党员风采", - id: "5fwaefwaefawef589", - }, - ], - }, { icon: "icon-setting", id: "2221321123", - name: "措施清单", + name: "社区服务", // url: "visual/basicinfo/basicInfoMain", children: [ { url: "/visual/measure/service", - name: "服务措施分析", + name: "需求服务分析", id: "5feawfwaefwa57", }, { url: "/visual/measure/volunteer", - name: "志愿者服务分析", + name: "志愿服务分析", id: "5fwaefwaefawef58", }, ], @@ -315,7 +315,7 @@ router.beforeEach((to, from, next) => { { icon: "icon-setting", id: "44rq22222q2222", - name: "AI安防", + name: "智慧安防", // url: "visual/basicinfo/basicInfoMain", children: [ { @@ -359,11 +359,13 @@ router.beforeEach((to, from, next) => { http .get("/gov/access/menu/nav") .then(({ data: res }) => { - if (res.code !== 0) { - // Vue.prototype.$message.error(res.msg) - // return next({ - // name: "login", - // }); + if (res.code == 10005 || res.code == 10006 || res.code == 10007) { + // 10005 token为空 10006登陆超时 10007别处登录 + console.log("登录失效"); + Vue.prototype.$message.error(res.msg); + return next({ + name: "login", + }); } window.SITE_CONFIG["menuList"] = res.data; fnAddDynamicMenuRoutes(window.SITE_CONFIG["menuList"]); diff --git a/src/utils/index.js b/src/utils/index.js index fe742c9a..c2232ac7 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -115,3 +115,33 @@ export function dateFormats(fmt, date) { } return fmt } +// 根据身份证计算出生日期,性别,年龄 +export function computedCard(idCard) { + let sex = null; + let birth = null; + let myDate = new Date(); + let month = myDate.getMonth() + 1; + let day = myDate.getDate(); + let age = 0; + + if(idCard.length===18){ + age = myDate.getFullYear() - idCard.substring(6, 10) - 1; + sex = idCard.substring(16,17); + birth = idCard.substring(6,10)+"-"+idCard.substring(10,12)+"-"+idCard.substring(12,14); + if (idCard.substring(10, 12) < month || idCard.substring(10, 12) === month && idCard.substring(12, 14) <= day) age++; + + } + if(idCard.length===15){ + age = myDate.getFullYear() - idCard.substring(6, 8) - 1901; + sex = idCard.substring(13,14); + birth = "19"+idCard.substring(6,8)+"-"+idCard.substring(8,10)+"-"+idCard.substring(10,12); + if (idCard.substring(8, 10) < month || idCard.substring(8, 10) === month && idCard.substring(10, 12) <= day) age++; + } + + if(sex%2 === 0) + sex = '0'; // 性别代码 1代表男,0代表女,暂时不涉及其他类型性别 + else + sex = '1'; + return {age , sex, birth} +} + diff --git a/src/views/components/editResi.vue b/src/views/components/editResi.vue index d7afc877..fba7172b 100644 --- a/src/views/components/editResi.vue +++ b/src/views/components/editResi.vue @@ -33,7 +33,7 @@ - +
diff --git a/src/views/components/resiForm.vue b/src/views/components/resiForm.vue index 506c2265..6ed432b4 100644 --- a/src/views/components/resiForm.vue +++ b/src/views/components/resiForm.vue @@ -32,7 +32,7 @@ - +
@@ -99,48 +99,7 @@
- + @@ -158,6 +117,7 @@ size="small" clearable placeholder="请输入内容" + @blur="handleValidBlur(n)" > import { isCard, isMobile } from '@/utils/validate' +import { computedCard } from '@/utils/index' export default { name: 'resiForm', @@ -525,6 +486,14 @@ export default { // } }) }, + handleValidBlur(n) { + console.log('n---', n) + if (n.columnName !== 'ID_CARD') return + if (!isCard(this.form.ID_CARD)) return + const { sex, birth } = computedCard(this.form.ID_CARD) + this.form.BIRTHDAY = birth + this.form.GENDER = sex == 1 ? '1' : '2' + }, handleOpenSearch () { this.openSearch = !this.openSearch }, diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index 1c2cd549..6cc4a41a 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -28,7 +28,7 @@
-
所属小区
+
所属房屋
@@ -189,10 +189,12 @@ export default { }; }, computed: { - maxTableHeight() { - return this.clientHeight - 360; - }, - ...mapGetters(["clientHeight"]), + ...mapGetters(['clientHeight', 'iframeHeight']), + tableHeight() { + const h = this.clientHeight - 360 + this.iframeHeigh + const _h = this.clientHeight - 360 + return this.$store.state.inIframe ? h : _h + } }, watch: { timeRange(val) { diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index f8e3dab5..342ef30f 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -235,11 +235,11 @@ export default { computed: { tableHeight () { - return (this.clientHeight - 300) + return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300 }, - ...mapGetters(['clientHeight']) + ...mapGetters(['clientHeight', 'iframeHeight']) }, methods: { //重置搜索条件 diff --git a/src/views/modules/base/community/community.vue b/src/views/modules/base/community/community.vue index 7f91ed38..ece5784a 100644 --- a/src/views/modules/base/community/community.vue +++ b/src/views/modules/base/community/community.vue @@ -98,12 +98,16 @@ export default { }, computed: { rowHeight () { - return (this.clientHeight - 120) + 'px' + + return this.$store.state.inIframe ? this.clientHeight - 120 + this.iframeHeight + 'px' : this.clientHeight - 120 + 'px' + }, treeHeight () { - return (this.clientHeight - 200) + 'px' + return this.$store.state.inIframe ? this.clientHeight - 200 + this.iframeHeight + 'px' : this.clientHeight - 200 + 'px' + }, - ...mapGetters(['clientHeight']) + + ...mapGetters(['clientHeight', 'iframeHeight']) }, methods: { async loadTree (isRefresh) { @@ -307,7 +311,7 @@ export default { .div_table { margin-left: 15px; // flex: 1; - width: calc(100vw - 550px); + width: calc(100% - 300px); background-color: #ffffff; border-radius: 5px; padding: 10px; diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index cbe00837..27660e25 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -285,13 +285,13 @@ export default { }, computed: { tableHeight () { - return (this.clientHeight - 300) + + return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300 + }, - rowHeight () { - return (this.clientHeight - 200) + 'px' - }, - ...mapGetters(['clientHeight']) + + ...mapGetters(['clientHeight', 'iframeHeight']) }, methods: { //重置搜索条件 diff --git a/src/views/modules/base/community/roomForm.vue b/src/views/modules/base/community/roomForm.vue index dfdda844..b60fe6c6 100644 --- a/src/views/modules/base/community/roomForm.vue +++ b/src/views/modules/base/community/roomForm.vue @@ -11,7 +11,7 @@ - {{ agencyObj.communityName }}—{{agencyObj.label}} + {{ agencyObj.neighborHoodName }}—{{agencyObj.label}} - + min-width="160"> + min-width="150"> + label="所属楼栋" + width="80"> - + + label="门牌号" + width="70"> + label="类型" + width="50"> + label="用途" + width="50"> + label="是否出租" + width="80"> + label="房主姓名" + width="90"> 查看 修改 @@ -214,6 +221,8 @@ export default { selection: [], showDeletBtn: false, + tableData: [], + //form相关 formShow: false, formTitle: '新增房屋', @@ -229,12 +238,11 @@ export default { }, computed: { tableHeight () { - - return (this.clientHeight - 300) + return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300 }, - ...mapGetters(['clientHeight']) + ...mapGetters(['clientHeight', 'iframeHeight']) }, methods: { //重置搜索条件 @@ -298,6 +306,8 @@ export default { this.total = data.total this.validTableDataNum = 0 data.list.forEach(item => { + item.houseNameShow = item.neighborHoodName + item.buildingName + item.unitNum + '单元' + item.doorName + item.unitNumShow = item.unitNum + '单元' if (item.agencyId === this.staffAgencyId) { item.showBtn = true this.validTableDataNum++ @@ -327,6 +337,7 @@ export default { }, handleAdd () { + this.formTitle = '新增房屋' this.formShow = true this.$nextTick(() => { diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 9e35e8d6..95b645a5 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -297,7 +297,7 @@ export default { currentPage: 1, pageSize: 20, total: null, - tableHeight: 0, + searchH: 0, conditions: [], activeName: '', tableData: [], @@ -336,6 +336,14 @@ export default { } }, + computed: { + ...mapGetters(['clientHeight', 'iframeHeight']), + tableHeight() { + const h = this.clientHeight - this.searchH - 280 + this.iframeHeigh + const _h = this.clientHeight - 280 - this.searchH + return this.$store.state.inIframe ? h : _h + } + }, async created () { if (this.$route.query) { let query = this.$route.query @@ -352,12 +360,16 @@ export default { // this.handleSearch() // this.getTableData() this.pageLoading = true + this.searchH = this.$refs.resiSearch.$el.offsetHeight console.log('storeoooo----0000', this.$store) console.log('resiSearch', this.$refs.resiSearch.$el.offsetHeight) - this.tableHeight = document.documentElement.clientHeight - this.$refs.resiSearch.$el.offsetHeight - 280 + 'px' + }, mounted () { - + + // this.$nextTick(() => { + // this.tableHeight = document.documentElement.clientHeight - this.$refs.resiSearch.$el.offsetHeight - 280 + 'px' + // }) console.log('document.documentElement.clientWidth', document.documentElement.clientHeight) }, methods: { diff --git a/src/views/modules/communityParty/elegant/index.vue b/src/views/modules/communityParty/elegant/index.vue index 1366c673..c1cce0ed 100644 --- a/src/views/modules/communityParty/elegant/index.vue +++ b/src/views/modules/communityParty/elegant/index.vue @@ -235,6 +235,7 @@