diff --git a/src/assets/images/icon/index_header_focus.png b/src/assets/images/icon/index_header_focus.png new file mode 100644 index 00000000..cbe5e768 Binary files /dev/null and b/src/assets/images/icon/index_header_focus.png differ diff --git a/src/components/form/FieldSelect.vue b/src/components/form/FieldSelect.vue index ee2608c0..bebd705b 100644 --- a/src/components/form/FieldSelect.vue +++ b/src/components/form/FieldSelect.vue @@ -14,6 +14,7 @@ :rules="rules" :required="required" :label-width="labelWidth || 'auto'" + :size="size || ''" > @@ -46,6 +47,7 @@ export default { 'remoteUrl', // 远程列表加载地址 String 'onRemoteResponse', // 远程获取到结果的处理回调 String|Function 如果是函数需返回数组, 如果是字符串支持.分割 'clearable', // 点击取消时清空绑定值 + 'size', ], watch: { value: function (newVal, oldVal) { diff --git a/src/views/sunVillage_info/otherOpen/otherOpenEdit.vue b/src/views/sunVillage_info/otherOpen/otherOpenEdit.vue index 8870c9b0..3ec8a69f 100644 --- a/src/views/sunVillage_info/otherOpen/otherOpenEdit.vue +++ b/src/views/sunVillage_info/otherOpen/otherOpenEdit.vue @@ -1,13 +1,25 @@ @@ -78,21 +86,27 @@ import {getLoginBook} from "@/api/sunVillage_info/fixedAssets"; otherType: null, }, yearList: [], - title: '综合公开', reload: false, showTab: false, + otherTypeOptions: [], + showType: false, }; }, created() { - this.queryParams.otherType = this.$route.query.type; - if(this.$route.query.type) - { - this.getDicts('other_gk_type').then((resp) => { - const dict = resp.data.find((x) => x.dictValue == this.$route.query.type); - if(dict) - this.title = dict.dictLabel; + this.queryParams.otherType = this.$route.query.type || ''; + this.getDicts('other_gk_type').then((resp) => { + let arr = []; + arr.push({ + dictValue: '', + dictLabel: '综合公开', + name: '全部', }); - } + resp.data.forEach((x) => { + x.name = x.dictLabel; + arr.push(x); + }); + this.otherTypeOptions = arr; + }); getLoginBook().then((resp) => { let startYear = new Date().getFullYear(); let thisYear = startYear; @@ -115,35 +129,50 @@ import {getLoginBook} from "@/api/sunVillage_info/fixedAssets"; }); }); }, - viewItem(id){ + gotoViewItem(id) { + let parms = { + id: id, + intent: 'view', + }; + if(this.queryParams.otherType) + parms.type = this.queryParams.otherType; this.$router.push({ name: 'otherOpenDetail', - query: { - id: id, - intent: 'view', - type: this.$route.query.type, - }, + query: parms, }).catch(() => {}); }, - add() { + viewItem(id){ + this.$router.replace(`/sunVillage_info/otherOpenIndex?type=${this.queryParams.otherType || ''}`, () => this.gotoViewItem(id), () => this.gotoViewItem(id) ); + }, + gotoAdd() { + let parms = { + intent: 'add', + }; + if(this.queryParams.otherType) + parms.type = this.queryParams.otherType; this.$router.push({ name: 'otherOpenEdit', - query: { - intent: 'add', - type: this.$route.query.type, - }, + query: parms, }).catch(() => {}); }, - edit(id) { + add() { + this.$router.replace(`/sunVillage_info/otherOpenIndex?type=${this.queryParams.otherType || ''}`, () => this.gotoAdd(), () => this.gotoAdd() ); + }, + gotoEdit(id) { + let parms = { + id: id, + intent: 'edit', + }; + if(this.queryParams.otherType) + parms.type = this.queryParams.otherType; this.$router.push({ name: 'otherOpenEdit', - query: { - id: id, - intent: 'edit', - type: this.$route.query.type, - }, + query: parms, }).catch(() => {}); }, + edit(id) { + this.$router.replace(`/sunVillage_info/otherOpenIndex?type=${this.queryParams.otherType || ''}`, () => this.gotoEdit(id), () => this.gotoEdit(id) ); + }, remove(id) { Dialog.confirm({ title: '警告', @@ -164,7 +193,7 @@ import {getLoginBook} from "@/api/sunVillage_info/fixedAssets"; .catch(() => {}); }, back() { - this.$router.back(); + this.$router.replace('/sunVillage_info/otherOpenIndex', () => this.$router.back(), () => this.$router.back() ); }, tabClick(year){ this.queryParams.openYear = year; @@ -173,6 +202,24 @@ import {getLoginBook} from "@/api/sunVillage_info/fixedAssets"; tabShow(){ this.showTab = !this.showTab; }, + openTypeChooser() { + this.showType = true; + }, + changeType(action, index) { + this.queryParams.otherType = action.dictValue; + this.reload = true; + }, + }, + computed: { + title() { + if(this.queryParams.otherType) + { + const dict = this.otherTypeOptions.find((x) => x.dictValue == this.queryParams.otherType); + if(dict) + return dict.dictLabel; + } + return '综合公开'; + }, }, } @@ -213,6 +260,32 @@ import {getLoginBook} from "@/api/sunVillage_info/fixedAssets"; right: 38px; top: 36px; } + + .title { + } + .title::before { + display: inline-block; + width: 24px; + height: 24px; + content: ''; + background-image: url('../../../assets/images/icon/index_header_focus.png'); + background-repeat: no-repeat; + background-size: contain; + margin-right: 0.2rem; + transform: rotate( + 180deg + ); + } + .title::after { + width: 0.32rem; + height: 0.32rem; + display: inline-block; + content: ''; + background-image: url('../../../assets/images/icon/index_header_focus.png'); + background-repeat: no-repeat; + background-size: contain; + margin-left: 0.2rem; + } } .record_main{ padding:30px 22px; diff --git a/src/views/sunVillage_info/otherOpen/otherOpenVisitList.vue b/src/views/sunVillage_info/otherOpen/otherOpenVisitList.vue index aefffc10..ac6129ea 100644 --- a/src/views/sunVillage_info/otherOpen/otherOpenVisitList.vue +++ b/src/views/sunVillage_info/otherOpen/otherOpenVisitList.vue @@ -3,7 +3,7 @@
- {{title}} +

{{title}}

@@ -47,6 +47,14 @@
+ + @@ -74,9 +82,10 @@ import Cookies from "js-cookie"; deptId: null, }, yearList: [], - title: '综合公开', reload: false, showTab: false, + otherTypeOptions: [], + showType: false, }; }, created() { @@ -88,15 +97,20 @@ import Cookies from "js-cookie"; return; } - this.queryParams.otherType = this.$route.query.type; - if(this.$route.query.type) - { - this.getDicts('other_gk_type').then((resp) => { - const dict = resp.data.find((x) => x.dictValue == this.$route.query.type); - if(dict) - this.title = dict.dictLabel; + this.queryParams.otherType = this.$route.query.type || ''; + this.getDicts('other_gk_type').then((resp) => { + let arr = []; + arr.push({ + dictValue: '', + dictLabel: '综合公开', + name: '全部', }); - } + resp.data.forEach((x) => { + x.name = x.dictLabel; + arr.push(x); + }); + this.otherTypeOptions = arr; + }); bookInfo(this.queryParams.bookId).then((resp) => { let startYear = new Date().getFullYear(); let thisYear = startYear; @@ -119,18 +133,23 @@ import Cookies from "js-cookie"; }); }); }, - viewItem(id){ + gotoViewItem(id) { + let parms = { + id: id, + intent: 'view', + }; + if(this.queryParams.otherType) + parms.type = this.queryParams.otherType; this.$router.push({ name: 'otherOpenVisitDetail', - query: { - id: id, - intent: 'view', - type: this.$route.query.type, - }, + query: parms, }).catch(() => {}); }, + viewItem(id){ + this.$router.replace(`/sunVillage_info/otherOpenVisitIndex?type=${this.queryParams.otherType || ''}`, () => this.gotoViewItem(id), () => this.gotoViewItem(id) ); + }, back() { - this.$router.back(); + this.$router.replace('/sunVillage_info/otherOpenVisitIndex', () => this.$router.back(), () => this.$router.back() ); }, tabClick(year){ this.queryParams.openYear = year; @@ -139,6 +158,24 @@ import Cookies from "js-cookie"; tabShow(){ this.showTab = !this.showTab; }, + openTypeChooser() { + this.showType = true; + }, + changeType(action, index) { + this.queryParams.otherType = action.dictValue; + this.reload = true; + }, + }, + computed: { + title() { + if(this.queryParams.otherType) + { + const dict = this.otherTypeOptions.find((x) => x.dictValue == this.queryParams.otherType); + if(dict) + return dict.dictLabel; + } + return '综合公开'; + }, }, } @@ -179,6 +216,32 @@ import Cookies from "js-cookie"; right: 38px; top: 36px; } + + .title { + } + .title::before { + display: inline-block; + width: 24px; + height: 24px; + content: ''; + background-image: url('../../../assets/images/icon/index_header_focus.png'); + background-repeat: no-repeat; + background-size: contain; + margin-right: 0.2rem; + transform: rotate( + 180deg + ); + } + .title::after { + width: 0.32rem; + height: 0.32rem; + display: inline-block; + content: ''; + background-image: url('../../../assets/images/icon/index_header_focus.png'); + background-repeat: no-repeat; + background-size: contain; + margin-left: 0.2rem; + } } .record_main{ padding:30px 22px;