From 6ad3f145f53718191886da600081c207b7d4866a Mon Sep 17 00:00:00 2001 From: xiaohei <1494046114@qq.com> Date: Mon, 1 Jan 2024 17:02:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=AE=8C=E6=88=90=E5=85=9A=E5=91=98?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E3=80=81=E5=85=9A=E5=91=98=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E3=80=81=E5=85=9A=E7=BB=84=E7=BB=87=E6=B3=A8=E5=86=8C=E3=80=81?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E9=A3=8E=E9=87=87=E3=80=81=E5=BF=97=E6=84=BF?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8A=9F=E8=83=BD=E3=80=81=E6=88=91=E7=9A=84?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=B7=BB=E5=8A=A0=E5=85=9A=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E3=80=81=E5=85=9A=E5=91=98=E8=AE=A4=E8=AF=81=E3=80=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=B4=BB=E5=8A=A8=E9=A3=8E=E9=87=87=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/peopleApi.js | 225 +++++++-- src/images/member.png | Bin 0 -> 2699 bytes src/images/tissue.png | Bin 0 -> 2148 bytes .../people/pages/activity-mien/detail.vue | 86 ++++ .../people/pages/activity-mien/index.vue | 90 +++- .../people/pages/party-branch/create.vue | 351 +++++++++++--- .../people/pages/party-newspaper/create.vue | 440 ++++++++++++++---- .../people/pages/party-newspaper/detail.vue | 141 +++++- .../people/pages/party-newspaper/index.vue | 188 ++++++-- .../people/pages/volunteering/index.vue | 165 +++++-- src/pages.json | 5 + src/pages/my/my.vue | 60 ++- src/static/images/change.png | Bin 0 -> 745 bytes src/static/images/member.png | Bin 0 -> 2333 bytes src/static/images/tissue.png | Bin 0 -> 2148 bytes src/utils/util.js | 234 +++++----- src/utils/util.map.js | 28 +- 17 files changed, 1580 insertions(+), 433 deletions(-) create mode 100644 src/images/member.png create mode 100644 src/images/tissue.png create mode 100644 src/packages/people/pages/activity-mien/detail.vue create mode 100644 src/static/images/change.png create mode 100644 src/static/images/member.png create mode 100644 src/static/images/tissue.png diff --git a/src/api/peopleApi.js b/src/api/peopleApi.js index 5c77527..9ba367c 100644 --- a/src/api/peopleApi.js +++ b/src/api/peopleApi.js @@ -15,7 +15,7 @@ const assemblyHallPageApi = function(data) { return request({ url: '/admin-api/people/assembly-hall/page', method: 'get', - data: data + data: data, }); }; /** @@ -26,7 +26,7 @@ const mediatorPageApi = function(data) { return request({ url: '/admin-api/people/mediator/page', method: 'get', - data: data + data: data, }); }; /** @@ -37,7 +37,7 @@ const mediatorGetApi = function(data) { return request({ url: '/admin-api/people/mediator/get', method: 'get', - data: data + data: data, }); }; @@ -49,7 +49,7 @@ const seekHelpPageApi = function(data) { return request({ url: '/admin-api/people/seek-help/page', method: 'get', - data: data + data: data, }); }; /** @@ -60,7 +60,7 @@ const seekHelpCreateApi = function(data) { return request({ url: '/admin-api/people/seek-help/create', method: 'post', - data: data + data: data, }); }; @@ -72,23 +72,25 @@ const seekHelpGetApi = function(data) { return request({ url: '/admin-api/people/seek-help/get', method: 'get', - data: data + data: data, }); }; + const massesDetailUpdate = function(data) { // 点单状态变化如:接单 return request({ url: '/admin-api/people/seek-help/update', method: 'put', - data: data + data: data, }); }; + const seekHelpApi = function(data) { // 点单 进行帮助 return request({ url: `/admin-api/people/seek-help/help/${data.id}`, method: 'put', - data: data + data: data, }); }; /** @@ -99,7 +101,7 @@ const lawsRegulationPageApi = function(data) { return request({ url: '/admin-api/people/laws-regulation/page', method: 'get', - data: data + data: data, }); }; @@ -111,7 +113,7 @@ const lawsRegulationGetApi = function(data) { return request({ url: '/admin-api/people/laws-regulation/get', method: 'get', - data: data + data: data, }); }; @@ -123,7 +125,7 @@ const casesListApi = function(data) { return request({ url: '/admin-api/people/cases/page', method: 'get', - data: data + data: data, }); }; @@ -135,7 +137,7 @@ const getCasesIdApi = function(data) { return request({ url: '/admin-api/people/cases/get', method: 'get', - data: data + data: data, }); }; @@ -147,7 +149,7 @@ const createCasesApi = function(data) { return request({ url: '/admin-api/people/cases/create', method: 'post', - data: data + data: data, }); }; @@ -159,7 +161,7 @@ const newsGetApi = function(data) { return request({ url: '/admin-api/people/news/get', method: 'get', - data: data + data: data, }); }; @@ -171,7 +173,7 @@ const hospitalPageApi = function(data) { return request({ url: '/admin-api/people/hospital/page', method: 'get', - data: data + data: data, }); }; @@ -183,7 +185,7 @@ const hospitalGetApi = function(data) { return request({ url: '/admin-api/people/hospital/get', method: 'get', - data: data + data: data, }); }; /** @@ -194,7 +196,7 @@ const doctorPageApi = function(data) { return request({ url: '/admin-api/people/doctor/page', method: 'get', - data: data + data: data, }); }; @@ -206,7 +208,7 @@ const assemblyIdApi = function(data) { return request({ url: '/admin-api/people/assemblymen/create', method: 'post', - data: data + data: data, }); }; @@ -218,7 +220,7 @@ const assemblyhallIdApi = function(data) { return request({ url: '/admin-api/people/assembly-hall/get', method: 'get', - data: data + data: data, }); }; @@ -230,7 +232,7 @@ const commentPageApi = function(data) { return request({ url: '/admin-api/people/comment/page', method: 'get', - data: data + data: data, }); }; @@ -242,7 +244,7 @@ const commentCreateApi = function(data) { return request({ url: '/admin-api/people/comment/create', method: 'post', - data: data + data: data, }); }; @@ -254,7 +256,7 @@ const assemblyHallGetApi = function(data) { return request({ url: '/admin-api/people/assembly-hall/get', method: 'get', - data: data + data: data, }); }; /** @@ -265,7 +267,7 @@ const partyBranchApi = function(data) { return request({ url: '/admin-api/people/party-branch/page', method: 'get', - data: data + data: data, }); }; /** @@ -277,7 +279,7 @@ const newsPageApi = function(data) { return request({ url: '/admin-api/people/news/page', method: 'get', - data: data + data: data, }); }; @@ -289,7 +291,7 @@ const partyBranchGetApi = function(data) { return request({ url: '/admin-api/people/party-branch/get', method: 'get', - data: data + data: data, }); }; /** @@ -300,7 +302,7 @@ const excellentPartMemberPageApi = function(data) { return request({ url: '/admin-api/people/excellent-party-member/page', method: 'get', - data: data + data: data, }); }; @@ -312,7 +314,7 @@ const deptListApi = function(data) { return request({ url: '/admin-api/system/dept/list', method: 'get', - data: data + data: data, }); }; @@ -324,7 +326,7 @@ const excellentPartMemberGetApi = function(data) { return request({ url: '/admin-api/people/excellent-party-member/get', method: 'get', - data: data + data: data, }); }; @@ -336,7 +338,7 @@ const agencyPageApi = function(data) { return request({ url: '/admin-api/people/agency/page', method: 'get', - data: data + data: data, }); }; @@ -348,7 +350,7 @@ const villageAffairsPageApi = function(data) { return request({ url: '/admin-api/people/village-affairs/page', method: 'get', - data: data + data: data, }); }; @@ -360,7 +362,7 @@ const agencyContentPageApi = function(data) { return request({ url: '/admin-api/people/agency-content/page', method: 'get', - data: data + data: data, }); }; @@ -372,7 +374,7 @@ const CrateAppraiseApi = function(data) { return request({ url: '/admin-api/people/seek-help/appraise', method: 'put', - data: data + data: data, }); }; @@ -384,7 +386,7 @@ const agencyContentGetApi = function(data) { return request({ url: '/admin-api/people/agency-content/get', method: 'get', - data: data + data: data, }); }; @@ -396,7 +398,7 @@ const agencyGetApi = function(data) { return request({ url: '/admin-api/people/agency/get', method: 'get', - data: data + data: data, }); }; @@ -408,7 +410,7 @@ const agencyContentGetOrgIdApi = function(data) { return request({ url: '/admin-api/people/agency-content/getOrgId', method: 'get', - data: data + data: data, }); }; @@ -420,7 +422,7 @@ const villageAffairsGetApi = function(data) { return request({ url: '/admin-api/people/village-affairs/get', method: 'get', - data: data + data: data, }); }; @@ -432,7 +434,7 @@ const partyEventPageApi = function(data) { return request({ url: '/admin-api/people/party-event/page', method: 'get', - data: data + data: data, }); }; @@ -444,7 +446,7 @@ const partyEventGetApi = function(data) { return request({ url: '/admin-api/people/party-event/get', method: 'get', - data: data + data: data, }); }; @@ -456,7 +458,7 @@ const patientCreateApi = function(data) { return request({ url: '/admin-api/people/patient/create', method: 'post', - data: data + data: data, }); }; /** @@ -467,7 +469,7 @@ const getGridListApi = function(data) { return request({ url: '/admin-api/people/grid/page', method: 'get', - data: data + data: data, }); }; /** @@ -478,7 +480,7 @@ const getGridMemberListApi = function(data) { return request({ url: '/admin-api/people/grid-member/page', method: 'get', - data: data + data: data, }); }; @@ -487,11 +489,135 @@ const activityPageApi = function(data) { return request({ url: '/admin-api/people/activity/page', method: 'get', - data: data + data: data, }); }; +// 活动风采-详情 +const activityDetailApi = function(data) { + return request({ + url: '/admin-api/people/activity/get', + method: 'get', + data: data, + }); +}; +// 党员注册 +const partyMemberCreate = function(data) { + return request({ + url: '/admin-api/people/party-member/create', + method: 'POST', + data: data, + }); +}; + +// 党员详情 +const partyMemberInfoApi = function(data) { + return request({ + url: '/admin-api/people/party-member/info', + method: 'get', + data: data, + }); +}; + +// 党员修改 +const partyMemberUpdate = function(data) { + return request({ + url: '/admin-api/people/party-member/update', + method: 'put', + data: data, + }); +}; + +// 志愿服务 +const volunteerProjectApi = function(data) { + return request({ + url: '/admin-api/people/volunteer-project/page', + method: 'get', + data: data, + }); +}; + +// 志愿服务-详情 +const getVolunteerProjectApi = function(data) { + return request({ + url: '/admin-api/people/volunteer-project/get', + method: 'get', + data: data, + }); +}; + +// 志愿服务-发布 +const getVolunteerProjectCreateApi = function(data) { + return request({ + url: '/admin-api/people/volunteer-project/create', + method: 'post', + data: data, + }); +}; + +// 志愿服务-详情 +// const getVolunteerProjectApi = function (data) { +// return request({ +// url: '/admin-api/people/volunteer-project/get', +// method: 'get', +// data: data, +// }); +// }; + +// 党组织 +const partyOrganizationAllApi = function(data) { + return request({ + url: '/admin-api/people/party-organization/list-all', + method: 'get', + data: data, + }); +}; + +// 党组织-修改 +const partyOrganizationCreateApi = function(data) { + return request({ + url: '/admin-api/people/party-organization/create', + method: 'post', + data: data, + }); +}; + +// 党组织-修改 +const partyOrganizationUpdateApi = function(data) { + return request({ + url: '/admin-api/people/party-organization/update', + method: 'put', + data: data, + }); +}; + +// 党组织-详情 +const partyOrganizationInfoApi = function(data) { + return request({ + url: '/admin-api/people/party-organization/info', + method: 'get', + data: data, + }); +}; + +// 志愿服务申领列表 +const applyVolunteerProjecPageApi = function(data) { + return request({ + url: '/admin-api/people/apply-volunteer-project/page', + method: 'get', + data: data, + }); +}; + +// 志愿服务申领列表 +const applyVolunteerProjecCreateApi = function(data) { + return request({ + url: '/admin-api/people/apply-volunteer-project/create', + method: 'post', + data: data, + }); +}; export { assemblyHallPageApi, @@ -535,5 +661,18 @@ export { patientCreateApi, getGridListApi, getGridMemberListApi, - activityPageApi + activityPageApi, + activityDetailApi, + partyMemberCreate, + volunteerProjectApi, + getVolunteerProjectApi, + partyOrganizationAllApi, + partyOrganizationCreateApi, + partyOrganizationUpdateApi, + getVolunteerProjectCreateApi, + applyVolunteerProjecPageApi, + applyVolunteerProjecCreateApi, + partyOrganizationInfoApi, + partyMemberInfoApi, + partyMemberUpdate, }; \ No newline at end of file diff --git a/src/images/member.png b/src/images/member.png new file mode 100644 index 0000000000000000000000000000000000000000..de3caf941d7cd80b15a7d1198fdeb0c26d6fbc24 GIT binary patch literal 2699 zcmYM0c{~&TAIIk&rZz+}tT}URb3|L4E7v4Ph84-&GiF#UM@DmerN|u<${gXnc;NZj)j<92);eIef1PXzI8;ilP;lBQulNMHgF7p%)9!RItFi2!n zR1_jg9}yZJfYe2!(MXgYQcq8Zm!T7Jo=PV%bf^)^yNLfWEc_yT!pSr`Ig|?9Ws|D^9Kj6*otkN3(h4+l4dBX?^>{wbE% zHS*uKdE#H={HQ#)!g;nFu^>ZvmhwfMv^EFSjX)Ow0N_i!g&Bb{vCI|^mbTpA-!BFP zN}oS&apMcvQSyA_`ie#XfnQK-YO1!H2{(h}Y7}T}GQB@138s6gB!MB)U?EWH9nn=F z9|*3oTFDeTFJpUXwEgqXmAOaXqV<2aPT{^!;D3`j%Oj}HqT(N(?&hB;w@s0WG6{wW zdoB)|=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IT-KA0BD_!gxr@~WgcJ|p1{SbzERwDjWLbF>lB=mT=DRT%PgV!-* zm*ra0WL-UT3r(?S-dV7N0N#h7(hKkZ?&My`kL|J_SDi@L#l1{;7n|#>pEpA4!8I#r zILJ)bN+;D9`|Fzyyo6o*5FX+)PAcMFcZv6f7srQ$tQ?Dlm*fW_>oY||$T zp|JV3jOee0mY?qV7_jFy7cEhj_uGKGobzTckU|AaHgDOdPCgY${t#odxm_52OSiI9 zp|9bzidwH;D)p?o_T;FD)2WNXcatggEamYTDIlr>iI3Sld3jE;#{4mLIGq|)m*e+N zcTNqcNR>ZRYuCELZC+FQr4?9tFZW=D>G~cjXgkE-JeEj=pC+01;Z;z~?>qU$ur$%=xApGhv&kjD2(Ko&i^DA#<<1A|?CJ9kt8 z+>Kn^U%#Z8>+OY0LcPX9`@Pd-RlZBTTpY?=x%8=C6ehYi$bME~4FTkIO|95<1hhM23!XAs%H}t6-=i z+T}rPe3{!>za8fvkGMDYndXBo)LEL65;&dE-^&i^>;gIydSy>w&LofqnNArd^EFQc zT}#3_vF*czT{v z606AUth=#IjHwV2@b~ABCKl$j2SQZ4%#Yo3OCKk#2)I^HD-Uz-_n$s8ruJsi{D$_d zH1ZX=wnHKUw4{@ml0uNbdLDw+@%bPhSn(_HKa?9e{BQ0X@gvB%SWl8<>rK?}_4z7; zhT}KI)0;`H$9*lms(XF&a7QVUUDp;bXsRXW$UzLfU>#;(R|hD`PXi*Sg)irV0tY`m zOyjo;@zyC#KHdG^J;_$Mqcl4B-23*B%_u%y{-g4Z2O2N3YQAnXK>Kwix5gj#f_@7% z*SH6L-(zl>GwGGPF!Dx7Vs@QfvAJlzwr!*Vtz2QN>(-}7$`41kUA_trGhpjxakNyn Zlq`K@ONdol<-31KyrsQGow--ye*x%G#$5ma literal 0 HcmV?d00001 diff --git a/src/images/tissue.png b/src/images/tissue.png new file mode 100644 index 0000000000000000000000000000000000000000..6d628c69bccc4e074b21831205f9f40ae911b4ed GIT binary patch literal 2148 zc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Rym}ILq_!Z)NpCuy1mFu-3j-MV3u<%lF10Px?NgY@^5;FClTsgRY zmYa3>@UTu}IiovE9P*XawtJ@hd)(m}J5$s214JV_Dvky8K*N@Nb%Jp*+Q zvv@k}Y@MNl@xZb*-w##Hn(TL+MqGC61#!kt(rl%0I2fqw*aaj?VQ%^clHA|F>)x9s zS(AdlN0r8};+!kcv_6Q57bN3GeNzGPPj#1<0Z+{L3;}Wt4GoBxUc_^P>Wr3y)PDxt zcbI>6iX*c@95w;OZUg-u9L4tJ3>jTvntkfhTls4wwvZh_+|HvKp=xa{A`^yrKsLq- zFR2FbPD3L9j!6;id`8uV$8Ep>t7lD23GmddqVUSl>oSaq)j^@ooT*~){ziNMeakX> zd@k;XDgy2Vilok#r<#$QR&qJFgShEQMrL#p@=(Z@rxjEta2N4>_d9TT<6|PLF*GfV z@eCpP9b2$2BZu1l1Q{vYlOzHiQ^=^2c~D4}6}gsVj7Ah3X_*|v{56KqPU6F6lYk}? zn@A@{lAk2;+}OT89{MCf0{oEOZJ(B8V@Uqn1%weF35Xr%lw0rS~Gl4nWMs4VOnu ztQMP;wj9jWa7gaOSz61cqvca@hOFnuq2xdtyw3% znJ6TpNl3BDP|HECqe5hRj!lLZpu6)k3hu2_HkrueV7@|RXKkAdtsHa-Uos8Ou6}aR z(@epHTWFJ^*9U7UymO||wt*v&gARVR{ACT^w{0@Cv(P0BlIw%q0GkXoKySQ)Ntb7n zp#>1Bpe^q$zR0Ep~^)lwt73|_6HW_+=wROEd(=LI_SeBev8u5#3 zY&jTe)_EG+WT=-h|FJ@}`)HdCwO!2Dv+ZKz`rx6Eo%mCmOe7E;+$-goO+~~z9kpOa a6U+ZUI~t6(UB(Uo0000 + + + + + {{detailObj.activityTitle}} + + 发布人:{{detailObj.userName}} + {{getDateTime(detailObj.createTime,1)}} + + + + + + + + + + + \ No newline at end of file diff --git a/src/packages/people/pages/activity-mien/index.vue b/src/packages/people/pages/activity-mien/index.vue index f064e07..822a44f 100644 --- a/src/packages/people/pages/activity-mien/index.vue +++ b/src/packages/people/pages/activity-mien/index.vue @@ -12,36 +12,49 @@ - - + + - + NO.{{index+1}} - 惠苑路社区西南角家乐福超市对面xxxxx - 2023-11-23 周四 + {{item.activityTitle}} + {{getDateTime(item.createTime)}} - 发布者的名字 - + {{item.userName}} + - @@ -128,17 +185,11 @@ height: 180rpx; } - .activity-title { - margin-top: 16rpx; - font-size: 30rpx; - font-weight: 400; - color: #000000; - } - .activity-title { font-size: 24rpx; font-weight: 400; - color: #999999; + color: #000000; + padding: 0 16rpx; } .activity-time { @@ -146,6 +197,7 @@ font-weight: 400; margin-top: 8rpx; color: #999999; + padding: 0 16rpx; } .activity-rigth { @@ -182,7 +234,7 @@ } .activity-type0 { - background: linear-gradient(291deg, #0A992D 0%, #11D03E 100%); + background: linear-gradient(270deg, #E71E00 0%, #FF5E33 100%); } .activity-type1 { @@ -208,7 +260,7 @@ } .van-empty__image { - width: 75%; + width: 75% !important; height: 100%; } \ No newline at end of file diff --git a/src/packages/people/pages/party-branch/create.vue b/src/packages/people/pages/party-branch/create.vue index 0de851a..3bd778d 100644 --- a/src/packages/people/pages/party-branch/create.vue +++ b/src/packages/people/pages/party-branch/create.vue @@ -6,23 +6,34 @@ 单位名称 - * + * - + + + {{form.workName}} 支部名称 - * + * - - - - + + + {{ form.branchName }} + + 请选择支部名称 + + + + + {{ form.branchName }} + + @@ -30,59 +41,81 @@ 单位地址 - * + * - + + + + {{form.workAddress}} + 支部书记 - * + * - + + + + {{form.secretaryName}} + 联系方式 - * + * - + + + {{form.secretaryMobile}} + 党建联系人 - * + * - + + + {{form.partyBuildName}} + 联系方式 - * + * - + + + {{form.partyBuildMobile}} + 结对共建社区 - * + * - - - - + + + {{ form.communityName }} + + + + + {{form.communityName}} + @@ -91,13 +124,18 @@ 结对共建小区 - * + * - - - - + + + {{ form.villageName }} + + + + + {{form.villageName}} + @@ -105,64 +143,251 @@ 支部党员人数 - * + * - + + + {{form.partyMemberNum}} + - 提交 - 提交 + + + 提交 + 提交 + + + 提交 + + + + 编辑 + + + + + diff --git a/src/packages/people/pages/party-newspaper/create.vue b/src/packages/people/pages/party-newspaper/create.vue index 467bbda..5745265 100644 --- a/src/packages/people/pages/party-newspaper/create.vue +++ b/src/packages/people/pages/party-newspaper/create.vue @@ -7,100 +7,144 @@ 所属党委 - * + * - - - - + + + {{ form.partyOrganName }} + 请选择所属党委 + + + + + {{form.partyOrganName}} + - - - - 常住地社区 - * - - - - - - - + + + 常住地社区 + * + + + + + {{ form.communityName }} + + + + + {{ form.communityName }} + 常住小区 - * + * + + + + {{ form.villageName }} + + + + + {{form.villageName}} + - 楼栋(街) - * + * - + + + + + {{form.street}} + 单元(巷) - * + * - + + + {{form.lane}} + 房号 - * + * - + + + {{form.houseCode}} + 姓名 - * + * - + + + {{form.name}} + 性别 - * + * - - - - + + + + + + + + {{form.sex=== 1 ? '男' : '女'}} + 出生年月 - * + * - - - - + + + {{form.birthDate}} + 请选择出生年月 + + + + + {{getDateTime(form.birthDate)}} + @@ -109,13 +153,22 @@ 学历 - * + * - - - - + + + {{ educationList[form.education].label }} + + 请选择 + + + + + {{ educationList[form.education].label }} + + @@ -123,81 +176,308 @@ 工作单位 - * + * - + + + {{form.workAddress}} + 职务 - * + * - + + {{form.duties}} 联系方式 - * + * - + + {{form.mobile}} - 提交 - 提交 + + + 提交 + 提交 + + + 提交 + + + + 编辑 + - + + + @@ -135,7 +223,7 @@ } } - .type { + .type0 { position: absolute; top: 0; right: 0; @@ -147,6 +235,19 @@ padding: 12rpx 22rpx 12rpx 36rpx; } + + .type1 { + position: absolute; + top: 0; + right: 0; + background: linear-gradient(270deg, #5B638E 0%, #7B96BF 100%); + border-radius: 0px 8rpx 0px 1000rpx; + font-size: 24rpx; + font-weight: 400; + color: #fff; + padding: 12rpx 22rpx 12rpx 36rpx; + } + .title-name { display: inline-block; position: relative; @@ -187,16 +288,18 @@ } .user { + width: 100%; margin-top: 48rpx; display: grid; align-items: center; grid-template-columns: repeat(4, 1fr); grid-gap: 12rpx; + padding-right: 10rpx; .user-item { background: linear-gradient(90deg, #FFD9DA 0%, #FF8C8F 100%); border-radius: 232132318px; - padding: 12rpx 16rpx; + padding: 12rpx 10rpx 12rpx 16rpx; display: flex; align-items: center; diff --git a/src/packages/people/pages/party-newspaper/index.vue b/src/packages/people/pages/party-newspaper/index.vue index cee68cd..d580356 100644 --- a/src/packages/people/pages/party-newspaper/index.vue +++ b/src/packages/people/pages/party-newspaper/index.vue @@ -7,54 +7,68 @@ - - - - {{item.name}} - + + + + + {{item.name}} + + + - 志愿服务 + + 志愿服务 + + 换一换 + + + - - - + + + - - 服务中 + + {{getStatusText(statusList,item.serviceStatus)}} - + - 创造更好营商环境申报 - 北京经开区政务服务中心联合融媒体中心策划 + {{item.title}} + {{item.content}} - 申领 + 申领 + + - 活动风采 + 活动风采 - - + + - + NO.{{index+1}} - 惠苑路社区西南角家乐福超市对面xxxxx - 2023-11-23 周四 + {{item.activityTitle}} + {{getDateTime(item.createTime)}} - 发布者的名字 - + {{item.userName}} + + + @@ -65,13 +79,19 @@ export default { data() { return { + userRoles: uni.getStorageSync('userRoles'), option: {}, + statusList: [], recursionObj: {}, recursionTwoObj: [], newsPageList: [], pageNo: 1, pageSize: 12, total: 0, + volunteerProjectList: [], + volunteerProjectTotal: 0, + voluntPageNo: 1, + background: ['color1', 'color2', 'color3'], indicatorDots: true, autoplay: false, @@ -81,13 +101,57 @@ }, onLoad(option) { this.option = option + this.userRoles = uni.getStorageSync('userRoles') + this.getTypeApi('people_volunteer_project_serviceStatus', 'statusList'); this.recursionApi(); + this.volunteerProject(); this.newsPageApi(false) }, methods: { + headerUserRoles(item, key) { + if (item.remark !== '') { + return key === item.remark ? true : false; + } else { + return true; + } + }, updateQuery(url, name) { return utils.updateQuery(url, name); }, + getDateTime(time) { + return utils.getDateTime(time, 2) + }, + getStatusText(list, key) { + return utils.getStatusText(list, key) + }, + // 获取群众点单字典 + async getTypeApi(dictType, list) { + const res = await publicApi.getDictDataApi({ + dictType: dictType, + pageNo: 1, + pageSize: 100, + }); + if (res.code === 0) { + this[list] = res.data.list; + } + }, + // 志愿服务 + async volunteerProject() { + const res = await peopleApi.volunteerProjectApi({ + pageNo: this.voluntPageNo, + pageSize: 10, + }); + if (res.data) { + this.volunteerProjectList = res.data.list + this.volunteerProjectTotal = res.data.total + } + }, + // 志愿服务申领 + headerApplyFor(item) { + wx.navigateTo({ + url: `./detail?id=${item.id}`, + }); + }, async recursionApi() { const res = await publicApi.recursionApi({ bannerType: 1, @@ -134,8 +198,23 @@ }, headerDetail(item) { uni.navigateTo({ - url: './detail?id=' + item.id + url: '../activity-mien/detail?id=' + item.id }) + }, + headerChange() { + const { + volunteerProjectTotal, + voluntPageNo + } = this; + if (voluntPageNo * 10 < volunteerProjectTotal) { + this.voluntPageNo = voluntPageNo + 1, + this.volunteerProject(); + } else { + uni.showToast({ + title: '我到底了', + icon: 'none', + }); + } } }, onReachBottom() { @@ -159,13 +238,13 @@ text-align: center; align-items: center; grid-gap: 24rpx; - height: 100%; + // height: 100%; padding: 40rpx 38rpx 0 38rpx; - margin-bottom: 60rpx; + margin-bottom: 38rpx; .icon { width: 100%; - height: 100%; + height: 80rpx; } .title { @@ -183,7 +262,7 @@ font-size: 36rpx; font-weight: 500; color: #333333; - padding: 30rpx 30rpx 0 30rpx; + padding: 0rpx 30rpx 0 30rpx; z-index: 3; &::after { @@ -219,7 +298,8 @@ margin-top: 38rpx; display: grid; align-items: center; - grid-template-columns: 80% 20%; + grid-template-columns: 75% 20%; + justify-content: space-between; .item-title { font-size: 30rpx; @@ -262,17 +342,10 @@ height: 180rpx; } - .activity-title { - margin-top: 16rpx; - font-size: 30rpx; - font-weight: 400; - color: #000000; - } - .activity-title { font-size: 24rpx; font-weight: 400; - color: #999999; + color: #000000; } .activity-time { @@ -280,6 +353,7 @@ font-weight: 400; margin-top: 8rpx; color: #999999; + padding: 0 16rpx; } .activity-rigth { @@ -309,7 +383,7 @@ padding: 8rpx 26rpx; } - .type { + .type0 { position: absolute; top: 0; right: 0; @@ -321,6 +395,18 @@ padding: 12rpx 22rpx 12rpx 36rpx; } + .type1 { + position: absolute; + top: 0; + right: 0; + border-radius: 0px 8rpx 0px 1000rpx; + font-size: 24rpx; + font-weight: 400; + color: #fff; + padding: 12rpx 22rpx 12rpx 36rpx; + background: linear-gradient(270deg, #5B638E 0%, #7B96BF 100%); + } + .activity-type { position: absolute; top: 0; @@ -329,11 +415,11 @@ font-size: 24rpx; font-weight: 400; color: #fff; - padding: 12rpx 22rpx 12rpx 36rpx; + padding: 12rpx 31rpx 12rpx 15rpx; } .activity-type0 { - background: linear-gradient(291deg, #0A992D 0%, #11D03E 100%); + background: linear-gradient(270deg, #E71E00 0%, #FF5E33 100%); } .activity-type1 { @@ -347,4 +433,22 @@ .activity-type3 { background: linear-gradient(291deg, #4a507b 0%, #6882b1 100%); } + + .navigator-wrap { + width: 100%; + height: 100%; + } + + .change { + font-size: 24rpx; + font-weight: 400; + color: #999999; + padding-right: 30rpx; + display: flex; + align-items: center; + + text { + margin-left: 20rpx; + } + } \ No newline at end of file diff --git a/src/packages/people/pages/volunteering/index.vue b/src/packages/people/pages/volunteering/index.vue index 5a8a0e2..8e40894 100644 --- a/src/packages/people/pages/volunteering/index.vue +++ b/src/packages/people/pages/volunteering/index.vue @@ -10,8 +10,11 @@ * - - + + {{form.serviceTypeName }} + + 请选择点单类型 @@ -23,8 +26,8 @@ 标题 * - + @@ -49,7 +52,7 @@ 所需人数 * - @@ -58,8 +61,8 @@ 发布者 * - + @@ -67,22 +70,12 @@ 申领有效期 * - - - - - - - 申领有效期 - * - - - - - - - + + + {{form.effectDate}} + 请选择有效期 + + @@ -93,8 +86,12 @@ * - - + + + {{form.serviceStatusName }} + + 请选择点单类型 @@ -102,7 +99,7 @@ - 发布信息 + 发布信息 发布信息 @@ -110,21 +107,71 @@ diff --git a/src/pages.json b/src/pages.json index 291b6ec..1183022 100644 --- a/src/pages.json +++ b/src/pages.json @@ -257,6 +257,11 @@ "name": "people", "style": {} }, + { + "path": "pages/activity-mien/detail", + "name": "people", + "style": {} + }, { "path": "pages/volunteering/index", "name": "people", diff --git a/src/pages/my/my.vue b/src/pages/my/my.vue index 87a314c..86726b4 100644 --- a/src/pages/my/my.vue +++ b/src/pages/my/my.vue @@ -33,7 +33,8 @@ - + {{ itemName.name }} @@ -68,7 +69,8 @@ - + @@ -145,8 +147,8 @@ this.getUserInfo(); }, methods: { - updateQuery(url,item){ - return utils.updateQuery(url,item) + updateQuery(url, item) { + return utils.updateQuery(url, item) }, async getUserInfoApi() { const res = await myApi.getUserInfoApi(); @@ -192,6 +194,28 @@ } ]; const recursionList = [{ + bannerType: 4, + clickUrl: '/packages/people/pages/party-branch/create?userid=', + cssStyle: wx.getStorageSync('userRoles') === '党组织' ? '' : 'display:none', + icon: '/static/images/tissue.png', + id: 125, + name: '党组织认证', + parentId: 96, + remark: '党组织认证', + sort: 1, + }, + { + bannerType: 4, + clickUrl: '/packages/people/pages/party-newspaper/create?userid=', + cssStyle: null, + icon: '/static/images/member.png', + id: 123, + name: '党员认证', + parentId: 96, + remark: '党员认证', + sort: 1, + }, + { bannerType: 4, clickUrl: '/packages/my/pages/my-masses/my-masses?id=', cssStyle: null, @@ -295,21 +319,21 @@ */ async login() { uni.navigateTo({ - url: '/pages/phone/index' + url: '/pages/phone/index' }); - // 我的诉求 - // const res = await app.globalData.register({ - // code: this.code - // }); - // if (res) { - // uni.showToast({ - // title: '登录成功', - // icon: 'none' - // }); - // this.getInitData(); - // } else { - - // } + // 我的诉求 + // const res = await app.globalData.register({ + // code: this.code + // }); + // if (res) { + // uni.showToast({ + // title: '登录成功', + // icon: 'none' + // }); + // this.getInitData(); + // } else { + + // } }, // 获取我的信息 diff --git a/src/static/images/change.png b/src/static/images/change.png new file mode 100644 index 0000000000000000000000000000000000000000..0cfc366a7ef0dbc4514487ef934ad4bfc89b0e83 GIT binary patch literal 745 zcmVPx%qe(oSm_zY%~8daIdE~S3;T^2*oqUEm`0;x5z+?7Oo|L z@;W2hT2&CJy=6?>s0#p{ywZDIjph!%l}g3^omJH#cAh2yw_*E9Eq&VV_de)Jzug~c zOaP()%pE)o|I_2X4}jUSH?ROG`Oc{2GImt}<-`*>gyq_}J+I9JsArywcyn%!KXyh8 zz*m3$Q8rTm!N%)jp}PqXn34Xf%Sr+~W&iPgwX4kR1jNsR#=(Ky3{I4b8nU z6WUJ|_&f;2fU2;N02T*;BY?OtPzI>EfTkTMm%_(s9!R@@UIN+>9>PZ;+y{=Gba5pL zoB^~P;NI^5o1(xyz?lPV^^;y*R0sgY9-zCj=C&vh2l6)1nsw*h8$loiytjdbq9_W0 zqG|rwv;>eaP17{(gOmg^qQ~%!s<=Ur&Fw|mJhp+CCH)KXfr`dAJj?kT*-O{mNp3wHP_ b|0?hYGH~Q_-*aJI00000NkvXXu0mjfadt|d literal 0 HcmV?d00001 diff --git a/src/static/images/member.png b/src/static/images/member.png new file mode 100644 index 0000000000000000000000000000000000000000..43052619b8f7554db9124dfcbc4572d3a7a6395b GIT binary patch literal 2333 zcmV+&3F7vNP)Px-*GWV{RCwC$oC|CeMHt7&3J3@kc}qm0@(@rGd9?KIC}&gx1S{R$tEqq@K@pWG zm?-#wV)2Cpj9?^%5D^p*1q`6E3GWC23?eA+r+@`{7D_45yYc((=E(JWGyAyRJ@(p3 z{%OPQ&M?25o%vo{LhNg;Krez8fi{5-gUUdcL5Dz_K{G)Ts0pcQ!FC5|D1#FKQH{FE zKxb5Ec>O?s=zzx4FQ5mi6S&%-IVOOMR4Hh5b%56#w9#aEk($A_g`{k_@gJ}dURVp0 z5n?US8V!@j)AlpaecAv=}T`k9n$0B5O8_y{OZ5wn|@GoIh6hsjjV zgubybFmZ}AX1WsrF62z+ISa>J#u;;@69KN}Oy)5Q$1F%D&txxWGMz0Pb3A9v51a^) z=Owr;9CHF^%ny^v0~u!Fn1!4%$2t+2`CXbWKJRB<`J_&94f>mgyKfFLNPIo5*Yzn%HbpSO^KqV#L)-QNRl@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vXXu0mjf DH`!7~ literal 0 HcmV?d00001 diff --git a/src/static/images/tissue.png b/src/static/images/tissue.png new file mode 100644 index 0000000000000000000000000000000000000000..6d628c69bccc4e074b21831205f9f40ae911b4ed GIT binary patch literal 2148 zcmV-q2%GnbP)Px-9!W$&RCwC$oC$0cRTzLP;(;2CM>JkBK_u~vS_HbgEh}e0uAQ0XXba&;%h7;D ztjLvuoGM2Vf+$qE6f_jH$`L@qeF^23`$kH+3N279?EL<3r=hz$$G)9;GrMi)B`-~P z-@JMA?R)?G|Ns5}#KqY~wZI$R2YpU%jOgS`L>Ipa8nk`Rra}v^d6!2;r?4F1K|tMT z-2mL)$G{;p2dB`>=j2D?FF6wjuoP<^{{N%TAxr=#HyFQ90hgyP#KqkgGw@toZ5-#G z5O}2Crt2WS%_Gpz^E!CF_tOLG_AuVKsWj!e&3Lmr3IoupMfi)aM6jbEk#j=ah#FCX z*F_qO;ux=n?;z3J2-o|y@(T`vv+WC-?H$|)J{Lb-{Il5Yu4&P%%L_B6 z<6%3(M!N$qLO4@oH%st7g*P0C-|uG(O|2G6OP+s|IXK)HP^3)5dz6J8hlAfq1F$6I z!lM;S+xrBOXZYE5i@?dNi`#~>a{&H`b#y~Rc?*d`6MUA1*yn%r_ZR-60k}2vLh{R_ zupe&1GBsKc;|iHbU_es4mmxm=0cBt#YCsbI8iMcXbMSLfM4i=nzeQmImg_yC7v706 zaB5Y=da-;5U61tuZfKYAua8ClIAdpppWY5n<4OX{@`?bzrcy_+acN8qzI6`}xn3Z; zJ4SUJ;NXW+30Wd6V+!Dhod6cE0JwV>VDBM-oL?lMRs(eL8Faf8S_m<@j6N9!aOn#8 zi_ZtJY9olAbPEA;$#ei6p0{FF7PU_UIDQ)Lm7BLf96QY#fKI*@wXQ@gftUdHQFnl) zYd~z(t>Uv5T>*9-fS@ub*L;8pf`b|$?l|+J0<1|gh^Ygl`o$E0v*#s1IP1hVJuBL| zQ7&%Y8N^VWxxie2=pTr{HWa#A4zJHpfRY=aR>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args) { - if (flag) { - fn.apply(self, args); - flag = false; - setTimeout(() => { - flag = true; - }, interval); - } - }; + let flag = true; + const interval = t; + return function(self, ...args) { + if (flag) { + fn.apply(self, args); + flag = false; + setTimeout(() => { + flag = true; + }, interval); + } + }; }; /** @@ -36,17 +36,17 @@ const throttle = (ft, t) => { * @param t 时间 */ const debounce = (fn, t = 300) => { - let timeId = null; - const delay = t; - return function (self, ...args) { - if (timeId) { - clearTimeout(timeId); - } - timeId = setTimeout(() => { - timeId = null; - fn.apply(self, args); - }, delay); - }; + let timeId = null; + const delay = t; + return function(self, ...args) { + if (timeId) { + clearTimeout(timeId); + } + timeId = setTimeout(() => { + timeId = null; + fn.apply(self, args); + }, delay); + }; }; // 防抖示例 @@ -72,13 +72,13 @@ const debounce = (fn, t = 300) => { * @param {Object} date */ function getDateString(date = new Date()) { - return { - year: date.getFullYear(), - month: date.getMonth() + 1, - day: date.getDate(), - hour: date.getHours(), - minute: date.getMinutes() - }; + return { + year: date.getFullYear(), + month: date.getMonth() + 1, + day: date.getDate(), + hour: date.getHours(), + minute: date.getMinutes() + }; } /** @@ -90,18 +90,18 @@ function getDateString(date = new Date()) { * @description 可以选择的时候添加 selectable = true,反之, selectable = false */ function setSelectTreeLevel(tree, level) { - if (!Array.isArray(tree)) { - throw new Error('tree is not array!'); + if (!Array.isArray(tree)) { + throw new Error('tree is not array!'); + } + const list = JSON.parse(JSON.stringify(tree)); + return list.map((item) => { + const itemObj = item; + itemObj.selectable = itemObj.code === level; + if (Array.isArray(itemObj.children) && itemObj.children.length > 0) { + itemObj.children = setSelectTreeLevel(itemObj.children, level); } - const list = JSON.parse(JSON.stringify(tree)); - return list.map((item) => { - const itemObj = item; - itemObj.selectable = itemObj.code === level; - if (Array.isArray(itemObj.children) && itemObj.children.length > 0) { - itemObj.children = setSelectTreeLevel(itemObj.children, level); - } - return itemObj; - }); + return itemObj; + }); } /** @@ -111,19 +111,19 @@ function setSelectTreeLevel(tree, level) { * @returns {Array} 处理完成的树 */ function handleChildren(tree) { - if (!Array.isArray(tree)) { - throw new Error('tree is not array!'); + if (!Array.isArray(tree)) { + throw new Error('tree is not array!'); + } + const list = JSON.parse(JSON.stringify(tree)); + return list.map((item) => { + // eslint-disable-next-line no-param-reassign + if (item.children === null) { + item.children = []; + } else { + handleChildren(item.children); } - const list = JSON.parse(JSON.stringify(tree)); - return list.map((item) => { - // eslint-disable-next-line no-param-reassign - if (item.children === null) { - item.children = []; - } else { - handleChildren(item.children); - } - return item; - }); + return item; + }); } /** @@ -132,14 +132,14 @@ function handleChildren(tree) { * @returns {string} 时间格式,可选。默认yyyy-mm-dd hh:MM:ss,年为"yyyy",月为"mm",日为"dd",时为"hh",分为"MM",秒为"ss",格式可以自由搭配,如: yyyy:mm:dd yyyy-mm-dd yyyy年mm月dd日,yyyy年mm月dd日 hh时MM分ss秒,yyyy/mm/dd/,MM:ss等组合 */ function timeFormat(dateTime = null, fmt = 'yyyy-mm-dd hh:MM:ss') { - const time = new Date(dateTime); - const Y = time.getFullYear(); - const M = time.getMonth() + 1 < 10 ? "0" + (time.getMonth() + 1) : time.getMonth() + 1; - const D = time.getDate() < 10 ? "0" + time.getDate() : time.getDate(); - const h = time.getHours() < 10 ? "0" + time.getHours() : time.getHours(); - const m = time.getMinutes() < 10 ? "0" + time.getMinutes() : time.getMinutes(); - const s = time.getSeconds() < 10 ? "0" + time.getSeconds() : time.getSeconds(); - return Y + "-" + M + "-" + D + " " + h + ":" + m; + const time = new Date(dateTime); + const Y = time.getFullYear(); + const M = time.getMonth() + 1 < 10 ? "0" + (time.getMonth() + 1) : time.getMonth() + 1; + const D = time.getDate() < 10 ? "0" + time.getDate() : time.getDate(); + const h = time.getHours() < 10 ? "0" + time.getHours() : time.getHours(); + const m = time.getMinutes() < 10 ? "0" + time.getMinutes() : time.getMinutes(); + const s = time.getSeconds() < 10 ? "0" + time.getSeconds() : time.getSeconds(); + return Y + "-" + M + "-" + D + " " + h + ":" + m; } /** @@ -147,19 +147,21 @@ function timeFormat(dateTime = null, fmt = 'yyyy-mm-dd hh:MM:ss') { * @returns {string} url */ function getCurrentPageUrlWithArgs() { - const pages = getCurrentPages(); // 获取加载的页面 - const currentPage = pages[pages.length - 1]; // 获取当前页面的对象 - const url = currentPage.route; // 当前页面url - const { options } = currentPage; // 如果要获取url中所带的参数可以查看options + const pages = getCurrentPages(); // 获取加载的页面 + const currentPage = pages[pages.length - 1]; // 获取当前页面的对象 + const url = currentPage.route; // 当前页面url + const { + options + } = currentPage; // 如果要获取url中所带的参数可以查看options - //拼接url的参数 - let urlWithArgs = `${url}?`; - for (const key in options) { - const value = options[key]; - urlWithArgs += `${key}=${value}&`; - } - urlWithArgs = urlWithArgs.substring(0, urlWithArgs.length - 1); - return '/' + urlWithArgs; + //拼接url的参数 + let urlWithArgs = `${url}?`; + for (const key in options) { + const value = options[key]; + urlWithArgs += `${key}=${value}&`; + } + urlWithArgs = urlWithArgs.substring(0, urlWithArgs.length - 1); + return '/' + urlWithArgs; } /** @@ -167,35 +169,53 @@ function getCurrentPageUrlWithArgs() { * @returns {Object} res */ function setRichText(res) { - if (res.data && res.data.createTime) { - res.data.createTime = timeFormat(res.data.createTime); - if (res.data.content) { - res.data.content = res.data.content.replace(/(\ ['obj'] + */ +function filterParams(obj) { + const _newPar = {}; + for (const key in obj) { + // 如果对象属性的值不为空,就保存该属性(如果属性的值全部是空格,属于为空。) + if (obj[key] && obj[key].toString().replace(/(^\s*)|(\s*$)/g, '') !== '') { + // 保存属性 + _newPar[key] = obj[key]; + } + } + return _newPar; +} + export default { - data() { - return {}; - }, - getDateString, - isNumber, - debounce, - throttle, - // pages, - setSelectTreeLevel, - handleChildren, - timeFormat, - getCurrentPageUrlWithArgs, - setRichText -}; + data() { + return {}; + }, + getDateString, + isNumber, + debounce, + throttle, + // pages, + setSelectTreeLevel, + handleChildren, + timeFormat, + getCurrentPageUrlWithArgs, + setRichText, + filterParams +}; \ No newline at end of file diff --git a/src/utils/util.map.js b/src/utils/util.map.js index 35210f4..9e019a0 100644 --- a/src/utils/util.map.js +++ b/src/utils/util.map.js @@ -10,7 +10,7 @@ function log(obj) { * JSON字符串转JSON对象 * @param str JSON字符串 */ -var str2Json = function (str) { +var str2Json = function(str) { if (!str) return; var json = JSON.parse(str); @@ -21,7 +21,7 @@ var str2Json = function (str) { * 检查字符串是否是null或'' * @param str 字符串 */ -var isNull = function (str) { +var isNull = function(str) { return str ? str : '---'; }; @@ -43,7 +43,7 @@ function getFullUrl(fileHost, url) { * @param fileHost 静态资源基地址 * @param filesStr 文件数组(JSON字符串) */ -var getSingleFullUrl = function (fileHost, filesStr) { +var getSingleFullUrl = function(fileHost, filesStr) { if (!filesStr) return false; var files = str2Json(filesStr); @@ -60,7 +60,7 @@ var getSingleFullUrl = function (fileHost, filesStr) { * @param arr 字符串数组 * @param str 检测的字符串 */ -var isIncluded = function (arr, str) { +var isIncluded = function(arr, str) { return arr.indexOf(str) >= 0; }; @@ -70,7 +70,7 @@ var isIncluded = function (arr, str) { * @param str 展示的日期司机 默认0 * 0 (年-月-日 时:分:秒) 1 (x年-x月-x日 时:分:秒) 2 (x年-x月-x日) 3 (时:分:秒) */ -var getDateTime = function (value, type) { +var getDateTime = function(value, type) { //不能使用 new Date() var time = new Date(value); var year = time.getFullYear(); @@ -100,6 +100,7 @@ var getDateTime = function (value, type) { second, year + '年' + month + '月' + date + '日', hour + ':' + minute + ':' + second, + year + '-' + month + '-' + date + ' ', ]; if (!type) { return arr[0]; @@ -151,6 +152,20 @@ function formatStr(str) { return str.substring(0, 1) + new Array(str.length).join('*') } +function getStatusText(list, status) { + if (!list) { + return '状态列表有误'; + } + var item = null; + for (var i = 0; i < list.length; i++) { + if (list[i].value === status + '') { + item = list[i]; + break; + } + } + return item ? item.label : '未知'; +} + export default { log: log, str2Json: str2Json, @@ -161,5 +176,6 @@ export default { getDateTime: getDateTime, setMorKm: setMorKm, updateQuery: updateQuery, - formatStr: formatStr + formatStr: formatStr, + getStatusText: getStatusText }; \ No newline at end of file