From f74cc7873bce0bccd2804456bd351224cd13539c Mon Sep 17 00:00:00 2001 From: zhaodengke Date: Thu, 5 Dec 2024 17:38:18 +0800 Subject: [PATCH] =?UTF-8?q?Task=20=E7=BB=BC=E5=90=88=E5=85=AC=E5=BC=802?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/images/icon/index_header_focus.png | Bin 0 -> 988 bytes src/components/form/FieldSelect.vue | 2 + .../otherOpen/otherOpenEdit.vue | 27 +++- .../otherOpen/otherOpenList.vue | 129 ++++++++++++++---- .../otherOpen/otherOpenVisitList.vue | 97 ++++++++++--- 5 files changed, 207 insertions(+), 48 deletions(-) create mode 100644 src/assets/images/icon/index_header_focus.png 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 0000000000000000000000000000000000000000..cbe5e7687e32fad70bb6e3a353e1e86f65f25951 GIT binary patch literal 988 zcmaJ=O>5LZ7*46QS}hbosETFC3iWF^Y_prL4Vt!WS6nm{V<1$3S<@Rb0WQy?N^cp5nN{gj222 znsH6Gh%1;eMu=RWu{myPI`U1ci7BY#RmW5KZ*Si6z_AtnM%EAwzl0mk+*W{>w&ttW zR@0Jfe)=+)iex6>VrqiOUGqXYQuwy6%+B#OZ8m z1e8UY0=fiJB1%Is4N*FYQnDz?C<{6t&%6cpid@mk9be2+_y(oE3}LI)5?X121gj89 zk_5#ROr??xkqkFIYDP&fOmr1A99n_nQ-^pURy6Bmohm$wbUy{x@5y>$r%bG1Ffx6J z1Tjvj3p9-XLtVFr4rv7+#QRU-u)67ESivD#4=mQWl|<~ymrDUQDG92CtaYon*dUaI z4dR1R37j)b%kg6Se4AhxvhIb{^en7v3eO}2$FXHGQ^=@dUeYqf6hgDbf?6(?b1KT@ z#9|udvt6!6taTTAw9B;*xN2W+JPWSRJZm^`Hn3d|hzr^|%TE7T@_qF>T)TfPg}z+K zf`M^o|LS!2ij7Zv?9DARdXtYmHtqqN>!HujFnbdVx~5j6PxYUBdwVy*!$b8UdW@gh zRmLU%M-%(7qI>H!LPfu6OWrqFJEt*8M|u! cn4GyYz@h6q?{0s;I1#@$eRf`ZQCz @@ -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;