From c1f48b1572b04bec685e007306bf05f9a6c06f6f Mon Sep 17 00:00:00 2001 From: wuqun Date: Wed, 8 Mar 2023 17:26:33 +0800 Subject: [PATCH] =?UTF-8?q?(*)=E9=A6=96=E9=A1=B5=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=B7=A1=E6=A3=80=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/controllers/patrolManage/patrolRecord.js | 5 ++++- api/app/lib/index.js | 3 +++ web/client/assets/images/homePage/rank1.png | Bin 0 -> 2322 bytes web/client/assets/images/homePage/rank2.png | Bin 0 -> 2251 bytes 4 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 web/client/assets/images/homePage/rank1.png create mode 100644 web/client/assets/images/homePage/rank2.png diff --git a/api/app/lib/controllers/patrolManage/patrolRecord.js b/api/app/lib/controllers/patrolManage/patrolRecord.js index 185adbd..482cef0 100644 --- a/api/app/lib/controllers/patrolManage/patrolRecord.js +++ b/api/app/lib/controllers/patrolManage/patrolRecord.js @@ -45,7 +45,10 @@ async function findPatrolRecord (ctx, next) { where: { inspectionTime: { $between: [startTime, endTime] } }, - include: generalInclude + include: generalInclude.concat([{ + model: models.Point, + attributes: ['id', 'name'] + }]) }); } else { rslt = await models.PatrolRecord.findAll({ diff --git a/api/app/lib/index.js b/api/app/lib/index.js index 492d7ef..97168de 100644 --- a/api/app/lib/index.js +++ b/api/app/lib/index.js @@ -65,6 +65,9 @@ module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Seq PatrolRecordIssueHandle.belongsTo(PatrolRecord, { foreignKey: 'patrolRecordId', targetKey: 'id' }); PatrolRecord.hasMany(PatrolRecordIssueHandle, { foreignKey: 'patrolRecordId', sourceKey: 'id' }); + PatrolRecord.belongsTo(Point, { foreignKey: 'pointId', targetKey: 'id' }); + Point.hasMany(PatrolRecord, { foreignKey: 'pointId', sourceKey: 'id' }); + UserResource.belongsTo(User, { foreignKey: 'userId', targetKey: 'id' }); User.hasMany(UserResource, { foreignKey: 'userId', sourceKey: 'id' }); diff --git a/web/client/assets/images/homePage/rank1.png b/web/client/assets/images/homePage/rank1.png new file mode 100644 index 0000000000000000000000000000000000000000..6f570eaa0ba1a65c27bb843c60e2e59c345a655c GIT binary patch literal 2322 zcmV+t3GMcYP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91L7)Qw1ONa40RR918vpR9FesSV@Q;RS5f2i4b-S6+|8TDvQx~pEjs(N45tA5>ok^uT3Sg&*oh78H=qQ;8vK!yTqf_6#1b35NqmUn zxzQRCUWrFL(^Yl&Wm*<{>kBS@@rvDVO=W)ImaiQ=c*)#+c6SzYx zzyA(%?})*`Ep6&*dtFy30Hfoox$VXw*Bl$C+`nimHtyf&(ng3!9?NFe)VeOYT(D`m z_&{%5Hird`E}tWhWw*(aW=A?opZfZ_Yc3whUsP$GR#}7OSWUSAuH^z0bH-5(El|rb z!y?gwF@`S2jpMs)w(d(F%Y(7#<7=s;v0WF(wtP~|jni;tmai>*xp37s$+~yTv%1EU zfaUATrsDoYdtxZ3wtUSyNc5#rT$9TU=`O!F=w;?v~F<&x@lyG%dslG8eSpiy7) zSk`#(wl#LKmLx5R2P7Z3cuoj7IVaRtby1v6 z;;r+Sg4x=X&6k{)cLg~wVs%a#MxrBEx#QUJFh5Fe$m-<2nIhnsm4gwU@KJ}BGf=D( z8{O%RK+#@-_Iz7V9niMe0Pnjdz@-q1B~DCa#CI;(1e2{LYioDnjRzc^?6#vUY#oo1 zyFPpTqU*d6DRvQOqXr%VHKQX~1L0kv2NjPWy=bpG-KDn6xNA&~{>DYNBs`wltIdqB ztZgwjku|1oR97&`1Ad&J8;1)~jA!>RTy`c4kyllnWA8ADUID=kNk|$p=9$kuv6n+D zQ%7PBF{f`0`Oo`rP;z$!9%ht2T}#mAQ;KCP>ekJ6Ciql({E^K;p? zn@K)uI=kwV)C(|o}7;b;~N**)@s*}VlWPE zS{`9@`#zr*Wtf!Jo7X>o_~l7iyvecVPzSsz&QHVY&KwFHjGi28xH;7TqSYrLC3v^g za0406yVqqil3kP!C^K+p<75^>Vh(l6OebO!`kg@^>PR_$_vE3vbN@r7{;iFNitVNFDlpoiph(wvTsCi~5DJoC#tSmRHO2yeXOHVmTM>}E9uShwPtLs=Cr z`@GZuQ<|drw7$e)kEd-Sak|b|h&da6acT8PHLahxY475%oXe|H-wtgjK1cv)ugRRd}hVlZ==Gkcs1Ve!P;;gHQe?9=3Vjo%LPncJQT(DF%W7o{9W#W*5) z1~G1v;9QG9Wf_{zr=0hblz5VtTC}w>2f~uK1J?n$Oiq${4ht|W*cGCcFcuHerf5dFAPofy!JzG|+;L8ft$+R!w$omZ}Y z-h3E!vCOI0C=7tkbBx{o>510u-=9lstCOPo=+;+P-j}%14X@Bzz8IMni3N>fQX_ij zI@h&lf9Lu|l%fH7TQn<(AGCdc0l*5{&Pp{!_Nvan(LrmgwI^b;7WAvrDjfZ5?PxO{ z-EZDA43C2S_nJQr+~sIdNrE~nhOg&bIspTJW#VNkGC4^*CH@Rox$QjI@I~XGRqCEc z{;pvR`F&&Y924Wa?D$m2yHbfzKObE=F)hPAdtP5!bbZY8s&0-cITxa zwtJkHS0@Z#XlQtMMd^RB$}17iPlsnV-jQRINl}&` z?0K#F(AVtqJlT56+b33zKU3qU)|PQLFW7R4*zE3(NC2Ba(#_t+YEdqqoRq(Wxzp|q;h2IRxO3UC@9wapo`gLBcJ6@9 s|5AnT!v;Sf59K?;d%Ir=%bO+fH`t<807*qoM6N<$f;b*#lmGw# literal 0 HcmV?d00001 diff --git a/web/client/assets/images/homePage/rank2.png b/web/client/assets/images/homePage/rank2.png new file mode 100644 index 0000000000000000000000000000000000000000..9e242b50ca83b3537bf6a73430e458c5fb9886a1 GIT binary patch literal 2251 zcmV;+2sHPJP)Px#L}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