diff --git a/src/assets/scss/pages/yantai-index.scss b/src/assets/scss/pages/yantai-index.scss index e3b808fd1..600eca09a 100644 --- a/src/assets/scss/pages/yantai-index.scss +++ b/src/assets/scss/pages/yantai-index.scss @@ -1,28 +1,19 @@ @import "~@/assets/scss/c/config.scss"; @import "~@/assets/scss/c/function.scss"; -.g-bd { - &::before, - &::after { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: -1; - content: ""; - } - &::before { - background-image: url(~@/assets/img/yantai/index/bg.png); - background-size: cover; - } - &::after { - // background-color: rgba(38, 50, 56, 0.1); - } +.g-cnt { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-image: url(~@/assets/img/yantai/index/bg.png); + background-size: cover; + background-position: center; } .m-top { - position: fixed; + position: absolute; top: 0; width: 1920px; left: -1000px; @@ -46,7 +37,7 @@ } .m-list { - position: fixed; + position: absolute; top: 50%; left: 0; right: 0; @@ -59,6 +50,7 @@ align-items: center; width: 100%; margin: 0 auto; + .menu { position: relative; @@ -79,6 +71,7 @@ border-radius: 60px; text-align: center; transition: all 0.2s ease; + cursor: pointer; &.z-zuo { left: 60px; @@ -98,26 +91,26 @@ } &.z-you { - right: 70px; + left: 70px; background: linear-gradient(to right, rgba(rgb(67, 67, 210), 0.3), rgba(#00a, 0)); box-shadow: 4px 4px 6px 0 inset rgba(#fff, 0.2); &:nth-child(2), &:nth-child(6) { - margin-right: 20px; + margin-left: -20px; } &:nth-child(3), &:nth-child(5) { - margin-right: 20px * 2; + margin-left: -20px * 2; } &:nth-child(4) { - margin-right: 20px * 2 + 1px; + margin-left: -20px * 2 - 1px; } } &:hover, &.z-on { - transform: scale(1.2); + transform: scale(1.15); color: rgba(#fff, 0.95); } } @@ -125,16 +118,23 @@ } .arrow { + width: 60px; margin: 0 20px; } .item { position: relative; + margin: 0 50px; width: 420px; - margin: 0 20px; - max-width: 612px; - text-align: center; - cursor: pointer; + + .item-wrap { + text-align: center; + cursor: pointer; + transition: all 0.2s ease; + &:hover { + transform: scale(1.1); + } + } &.z-on { .name { @@ -151,11 +151,11 @@ } .name { position: absolute; - top: 0; + top: 12%; left: 0; width: 100%; font-size: 36px; - line-height: 140px; + line-height: 40px; color: #fff; } } diff --git a/src/element-ui/theme-variables.scss b/src/element-ui/theme-variables.scss index 9a9bacf46..93d161a54 100644 --- a/src/element-ui/theme-variables.scss +++ b/src/element-ui/theme-variables.scss @@ -16,7 +16,8 @@ $--color-transition-base: color .2s cubic-bezier(.645,.045,.355,1) !default; /* Color -------------------------- */ /// color|1|Brand Color|0 -$--color-primary: #17B3A3 !default; +// $--color-primary: #17B3A3 !default; +$--color-primary: #3E8EF7 !default; /// color|1|Background Color|4 $--color-white: #FFFFFF !default; /// color|1|Background Color|4 diff --git a/src/views/components/fixed1920.vue b/src/views/components/fixed1920.vue new file mode 100644 index 000000000..91393b0b3 --- /dev/null +++ b/src/views/components/fixed1920.vue @@ -0,0 +1,61 @@ + + + + + + + + + + diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index 78da43f1d..82a9be501 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -1,9 +1,25 @@ - - - + + + + + 所属组织 + + + + + + + + + 所属房屋 + + + + + + + + + + + + + + + + + - - - - - - {{ n.label }} - - - - - - - - - - - - - - - - - - - - - - {{ns.label}} - - - - + + + + + + + + + + + + + + + + + {{ns.label}} + + + - - + + - - - - 查询 - 重置 - - - @@ -247,7 +243,7 @@ export default { default: false } }, - data() { + data () { let initForm = (arr, columnName) => { let _form = {} // console.log('formInfo', obj) @@ -258,7 +254,7 @@ export default { arr.forEach((item) => { if (item.itemType == 'checkbox') _form[item.columnName] = [] else if (columnName && columnName === item.columnName) _form[item.columnName] = '1' - else if (item.itemType == 'inputRange') _form[item.columnName] = { start: '', end: ''} + else if (item.itemType == 'inputRange') _form[item.columnName] = { start: '', end: '' } else _form[item.columnName] = '' }) return _form @@ -273,7 +269,7 @@ export default { }) let form = initForm(itemList, this.columnName) let tempFormList = itemList.map(item => { - + return { ...item, isChange: this.columnName && this.columnName === item.columnName ? true : false @@ -287,6 +283,14 @@ export default { UNIT_ID: '', HOME_ID: '' } + let orgOptionProps = { + multiple: false, + value: 'agencyId', + label: 'agencyName', + children: 'subAgencyList', + checkStrictly: true + } + return { pageLoading: false, openSearch: false, @@ -295,10 +299,14 @@ export default { optionsH: [], optionsD: [], optionsG: [], + orgOptions: [], + orgOptionProps, + agencyIdArray: [], value: '', itemList, fixedList: [], fixedForm: { + AGENCY_ID: '', GRID_ID: '', VILLAGE_ID: '', BUILD_ID: '', @@ -308,6 +316,7 @@ export default { constForm, form: { ...form, + AGENCY_ID: '', GRID_ID: '', VILLAGE_ID: '', BUILD_ID: '', @@ -319,7 +328,7 @@ export default { shortcuts: [ { text: '最近一周', - onClick(picker) { + onClick (picker) { const end = new Date() const start = new Date() start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) @@ -328,7 +337,7 @@ export default { }, { text: '最近一个月', - onClick(picker) { + onClick (picker) { const end = new Date() const start = new Date() start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) @@ -337,7 +346,7 @@ export default { }, { text: '最近三个月', - onClick(picker) { + onClick (picker) { const end = new Date() const start = new Date() start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) @@ -345,11 +354,15 @@ export default { } } ] + }, + + queryType: { + 'AGENCY_ID': 'like' } } }, computed: { - sliceList() { + sliceList () { return function (data, count) { if (data !== undefined) { let index = 0 @@ -365,19 +378,19 @@ export default { } } }, - changeVDisabled() { + changeVDisabled () { return !this.form.VILLAGE_ID }, - changeBDisabled() { + changeBDisabled () { return !this.form.BUILD_ID }, - changeDDisabled() { + changeDDisabled () { return !this.form.UNIT_ID }, }, watch: { form: { - handler(val, val2) { + handler (val, val2) { // console.log('valpppp----', val, val2) for (let n in val) { if (this.constForm[n] !== val[n]) { @@ -390,39 +403,39 @@ export default { deep: true } }, - created() { + created () { // this.initForm() // console.log('formcccc---', this.form) - + this.getOrgTreeList() this.getGridList() this.getValiheList() if (this.columnName) this.handleChangeForm(this.columnName) }, methods: { - initForm() { + initForm () { this.formList.forEach((item) => { this.$set(this.form, item.columnName, '') }) console.log('formcccc---', this.form) }, - computdSpan(len) { + computdSpan (len) { return len == 1 ? 24 : 6 }, - handleClearVillage() { + handleClearVillage () { this.form.BUILD_ID = '' this.form.HOME_ID = '' }, - handleClearBuild() { + handleClearBuild () { this.form.BUILD_ID = '' this.form.UNIT_ID = '' this.form.HOME_ID = '' }, - handleClearDan() { + handleClearDan () { this.form.UNIT_ID = '' this.form.HOME_ID = '' }, - resetForm(formName) { - for(const n in this.form) { + resetForm (formName) { + for (const n in this.form) { if (n == 'age') { this.form.age = { start: '', @@ -430,29 +443,30 @@ export default { } } else if (typeof this.form[n] == 'object') this.form[n] = [] else this.form[n] = '' - + } // let arr3 = [...arr1, ...arr] this.$emit('search', []) // this.handleSearch() + this.orgOptions = []; }, - handleSearch() { + handleSearch () { // console.log('formmmmm---', this.form) const itemTypes = ['daterange', 'timerange', 'checkbox'] let a = this.tempFormList.filter(item => item.itemType != 'inputRange') let arr = a.filter((n) => n.isChange).map((item) => { - return { - queryType: item.queryType, - tableName: item.tableName, - columnName: item.columnName, - // columnValue: [] - columnValue: this.form[item.columnName] && - (itemTypes.includes(item.queryType) || + return { + queryType: item.queryType, + tableName: item.tableName, + columnName: item.columnName, + // columnValue: [] + columnValue: this.form[item.columnName] && + (itemTypes.includes(item.queryType) || itemTypes.includes(item.itemType) || item.multiSelect == 1 - ? this.form[item.columnName] - : [this.form[item.columnName].toString()]) - } - }) + ? this.form[item.columnName] + : [this.form[item.columnName].toString()]) + } + }) const arr2 = arr.filter(item => item.columnValue.length > 0) let arr1 = this.fixedList .filter((n) => n.columnValue.length > 0) @@ -465,10 +479,10 @@ export default { this.$emit('search', arr3) return arr3 }, - handleOpenSearch() { + handleOpenSearch () { this.openSearch = !this.openSearch }, - handleAgeChange(val) { + handleAgeChange (val) { console.log('val----age---', val) if (val.end) { const s = this.computedBirth(val.end) @@ -476,7 +490,29 @@ export default { this.form.BIRTHDAY = [s, e] } }, - handleChangeGrid(val) { + handleChangeAgency (val) { + let obj = this.$refs["myCascader"].getCheckedNodes()[0].data + if (obj) { + if (obj.level === 'grid') { + this.form.GRID_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; + this.form.AGENCY_ID = '' + } else { + this.form.AGENCY_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; + this.form.GRID_ID = '' + } + + } else { + this.form.AGENCY_ID = '' + this.form.GRID_ID = '' + } + + this.form.VILLAGE_ID = '' + this.form.BUILD_ID = '' + this.form.UNIT_ID = '' + this.form.HOME_ID = '' + this.getValiheList() + }, + handleChangeGrid (val) { console.log('val', val) this.form.VILLAGE_ID = '' this.form.BUILD_ID = '' @@ -484,27 +520,28 @@ export default { this.form.HOME_ID = '' this.getValiheList() }, - handleChangeV(val) { + handleChangeV (val) { console.log('val', val) this.form.BUILD_ID = '' this.form.UNIT_ID = '' this.form.HOME_ID = '' this.getBuildList() }, - handleChangeB(val) { + handleChangeB (val) { console.log('val', val) this.form.UNIT_ID = '' this.form.HOME_ID = '' this.getUniList() }, - handleChangeD(val) { + handleChangeD (val) { console.log('val', val) this.form.HOME_ID = '' this.getHouseList() }, // 监听基础form - handleChangeForm(val) { + handleChangeForm (val) { for (let n in this.fixedForm) { + if (n === val) { if (this.fixedList.length > 0) { let _item = {} @@ -517,7 +554,7 @@ export default { console.log('fixedList----val', this.fixedList) } else { _item = { - queryType: 'equal', + queryType: this.queryType[val] ? this.queryType[val] : 'equal',//'equal', tableName: 'ic_resi_user', columnName: val, columnValue: [this.form[val]] @@ -529,7 +566,7 @@ export default { if (Object.keys(_item).length > 0 && !hasVal) this.fixedList.push(_item) } else { this.$set(this.fixedList, 0, { - queryType: 'equal', + queryType: this.queryType[val] ? this.queryType[val] : 'equal',//'equal', tableName: 'ic_resi_user', columnName: val, columnValue: [this.form[val]] @@ -542,7 +579,24 @@ export default { if (item.columnName === val) item.isChange = true }) }, - getGridList() { + getOrgTreeList () { + const { user } = this.$store.state + this.$http + .post('/gov/org/customeragency/agencygridtree', {}) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } else { + console.log('获取组织树成功', res.data) + this.orgOptions = [] + this.orgOptions.push(res.data) + } + }) + .catch(() => { + return this.$message.error('网络错误') + }) + }, + getGridList () { const { user } = this.$store.state this.$http .post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' }) @@ -558,12 +612,12 @@ export default { return this.$message.error('网络错误') }) }, - getValiheList() { + getValiheList () { const { user } = this.$store.state this.$http .post('/gov/org/icneighborhood/neighborhoodoption', { gridId: this.form.GRID_ID, - agencyId: '' + agencyId: this.form.AGENCY_ID, // agencyId: user.agencyId }) .then(({ data: res }) => { @@ -578,7 +632,7 @@ export default { return this.$message.error('网络错误') }) }, - getBuildList() { + getBuildList () { this.$http .post('/gov/org/icbuilding/buildingoption', { neighborHoodId: this.form.VILLAGE_ID @@ -595,7 +649,7 @@ export default { return this.$message.error('网络错误') }) }, - getUniList() { + getUniList () { this.$http .post('/gov/org/icbuildingunit/unitoption', { buildingId: this.form.BUILD_ID @@ -612,7 +666,7 @@ export default { return this.$message.error('网络错误') }) }, - getHouseList() { + getHouseList () { this.$http .post('/gov/org/ichouse/houseoption', { unitId: this.form.UNIT_ID }) .then(({ data: res }) => { @@ -627,19 +681,19 @@ export default { return this.$message.error('网络错误') }) }, - computedBirth(age) { - let now = new Date(); - let nowYear = now.getFullYear(); - let nowMonth = now.getMonth()+1; - let nowDay = now.getDate(); // 按照减法原理,先day相减,不够向month借;然后month相减,不够向year借;最后year相减。 + computedBirth (age) { + let now = new Date(); + let nowYear = now.getFullYear(); + let nowMonth = now.getMonth() + 1; + let nowDay = now.getDate(); // 按照减法原理,先day相减,不够向month借;然后month相减,不够向year借;最后year相减。 let subYear = nowYear - age - if(nowMonth < 10){ - nowMonth = '0'+ nowMonth + if (nowMonth < 10) { + nowMonth = '0' + nowMonth } - if(nowDay < 10){ + if (nowDay < 10) { nowDay = '0' + nowDay } - console.log(subYear+'-'+nowMonth+'-'+nowDay); + console.log(subYear + '-' + nowMonth + '-' + nowDay); return subYear + '-' + nowMonth + '-' + nowDay } } @@ -714,7 +768,7 @@ export default { max-width: 200px; } .resi-cell--daterange { - max-width: 240px; + max-width: 235px; } .resi-cell-select { max-width: 200px; diff --git a/src/views/main-shuju/main.vue b/src/views/main-shuju/main.vue index 4abb6808f..37581b4a4 100644 --- a/src/views/main-shuju/main.vue +++ b/src/views/main-shuju/main.vue @@ -29,6 +29,7 @@ import debounce from "lodash/debounce"; import { mapGetters } from "vuex"; import nextTick from "dai-js/tools/nextTick"; import { requestPost } from "@/js/dai/request"; +import fixed1920 from "@/views/components/fixed1920.vue"; export default { provide() { @@ -51,6 +52,7 @@ export default { components: { MainNavbar, MainContent, + fixed1920, }, watch: { @@ -145,7 +147,8 @@ export default { &::-webkit-scrollbar-corner, /* 滚动条角落 */ &::-webkit-scrollbar-thumb, - &::-webkit-scrollbar-track { /*滚动条的轨道*/ + &::-webkit-scrollbar-track { + /*滚动条的轨道*/ border-radius: 4px; } @@ -153,13 +156,13 @@ export default { &::-webkit-scrollbar-track { /* 滚动条轨道 */ - background: rgba(12, 129, 254, .24); + background: rgba(12, 129, 254, 0.24); // box-shadow: inset 0 0 1px rgba(180, 160, 120, 0.5); } &::-webkit-scrollbar-thumb { /* 滚动条手柄 */ - background: linear-gradient(270deg, #1257c9, #0095FF); + background: linear-gradient(270deg, #1257c9, #0095ff); } } diff --git a/src/views/pages/yantai-index.vue b/src/views/pages/yantai-index.vue index 0794a2f44..4131f351d 100644 --- a/src/views/pages/yantai-index.vue +++ b/src/views/pages/yantai-index.vue @@ -1,64 +1,124 @@ - - - + + + 烟台市智慧社区平台 - - + + - 基础信息 - 疫情防控 - 社区治理 - 社区党建 - 社区服务 - AI安防 - 其他 + + 基础信息 + + + 疫情防控 + + + 社区治理 + + + 社区党建 + + + 社区服务 + + AI安防 + 其他 - - - + - - - - 管理平台 + + + + 管理平台 + - - - - 数据分析平台 + + + + 数据分析平台 + - - - + - - + + - 基础信息 - 人员预警 - 需求清单 - 社区党建 - 社区治理 - 初心互助 - AI安防 + + 基础信息 + + + 人员预警 + + + 需求清单 + + + 社区党建 + + + 社区治理 + + + 初心互助 + + + AI安防 + @@ -73,17 +133,12 @@ - +