From 40d7bef3575efe2f047e60bf61aba576d45d75c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=87=AA=E5=B8=A6=E5=A4=A7=E4=BD=AC=E6=B0=94=E5=9C=BA?= <188633308@qq.com> Date: Thu, 1 Jul 2021 11:02:18 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=A2=9E=E5=8A=A0=E4=BA=86=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=88=86=E6=9E=90=E8=AF=A6=E6=83=85=E9=A1=B5=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HouseQuery/Dto/HouseQueryInput.cs | 7 +++ .../HouseQuery/HouseQueryService.cs | 29 +++++++++++ .../DbContexts/DefaultDbContext.cs | 2 + .../PublishProfiles/FolderProfile.pubxml | 16 ++++++ web-react/.env.development | 1 + web-react/.env.production | 1 + web-react/public/favicon.ico | Bin 3870 -> 4286 bytes web-react/public/index.html | 2 +- web-react/src/common/api/index.js | 2 +- .../business/houseSafety/houseQuery.js | 1 + .../src/components/authority-view/index.jsx | 36 +++++++------- .../src/pages/business/house/query/detail.jsx | 35 +++++++++++++ .../src/pages/business/house/query/index.jsx | 47 +++++++++++++++--- .../src/pages/business/house/task/index.jsx | 17 ++----- 14 files changed, 156 insertions(+), 40 deletions(-) create mode 100644 Api/Ewide.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml create mode 100644 web-react/.env.development create mode 100644 web-react/.env.production create mode 100644 web-react/src/pages/business/house/query/detail.jsx diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseQuery/Dto/HouseQueryInput.cs b/Api/Ewide.Application/Service/HouseSafety/HouseQuery/Dto/HouseQueryInput.cs index 7a97453..096f601 100644 --- a/Api/Ewide.Application/Service/HouseSafety/HouseQuery/Dto/HouseQueryInput.cs +++ b/Api/Ewide.Application/Service/HouseSafety/HouseQuery/Dto/HouseQueryInput.cs @@ -1,6 +1,7 @@ using Ewide.Core; using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -11,4 +12,10 @@ namespace Ewide.Application { } + + public class HouseQueryDetailInput + { + [Required(ErrorMessage = "Id不能为空")] + public string Id { get; set; } + } } diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseQuery/HouseQueryService.cs b/Api/Ewide.Application/Service/HouseSafety/HouseQuery/HouseQueryService.cs index 453fd84..5800149 100644 --- a/Api/Ewide.Application/Service/HouseSafety/HouseQuery/HouseQueryService.cs +++ b/Api/Ewide.Application/Service/HouseSafety/HouseQuery/HouseQueryService.cs @@ -3,7 +3,9 @@ using Ewide.Core.Extension; using Furion.DatabaseAccessor; using Furion.DependencyInjection; using Furion.DynamicApiController; +using Mapster; using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; @@ -77,5 +79,32 @@ WHERE 1=1"; "TotalFloor" }); } + + [HttpGet("/houseQuery/detail")] + public async Task Detail([FromQuery] HouseQueryDetailInput input) + { + var houseCodeOutputAsync = await _dapperRepository.QueryAsync( + @"SELECT HC.Id,HC.Address,HC.ProjectId,HC.ZoneId,HC.Type,AA.Name AreaName,RA.Name RoadName,CA.Name CommName,O.Name ZoneName,Proj.Note ProjectNote,CONCAT(Proj.Name,'(',Proj.Note,')') ProjectFullName,HC.HouseCode,HC.Lng,HC.Lat,HC.No FROM bs_house_code HC +LEFT JOIN bs_house_projectinfo Proj ON Proj.Id=HC.ProjectId +LEFT JOIN sys_org O ON HC.ZoneId = O.Id +LEFT JOIN sys_area_code CA ON CA.Code = Proj.AreaCode +LEFT JOIN sys_area_code RA ON RA.AdCode = SUBSTR(CA.AdCode,1,9) +LEFT JOIN sys_area_code AA ON AA.AdCode = SUBSTR(CA.AdCode,1,6) +WHERE HC.Id=@Id", new { input.Id } + ); + + var houseCodeOutput = houseCodeOutputAsync.SingleOrDefault(); + + + var houseInfoOutputForDetailPage = new HouseInfoOutputForDetailPage + { + HouseCode = houseCodeOutput + }; + + var houseInfoOutput = (await _houseInfoRep.DetachedEntities.FirstOrDefaultAsync(p => p.HouseCodeId == houseCodeOutput.Id)).Adapt(); + houseInfoOutputForDetailPage.HouseInfo = houseInfoOutput; + + return houseInfoOutputForDetailPage; + } } } diff --git a/Api/Ewide.EntityFramework.Core/DbContexts/DefaultDbContext.cs b/Api/Ewide.EntityFramework.Core/DbContexts/DefaultDbContext.cs index 6bdaca5..8dac982 100644 --- a/Api/Ewide.EntityFramework.Core/DbContexts/DefaultDbContext.cs +++ b/Api/Ewide.EntityFramework.Core/DbContexts/DefaultDbContext.cs @@ -168,6 +168,7 @@ namespace Ewide.EntityFramework.Core base.OnModelCreating(modelBuilder); if (App.HostEnvironment.EnvironmentName == "Testing") return; //集成测试下面代码会报错 +#if DEBUG XmlSerializerUtil xmlHandler = new XmlSerializerUtil(); Dictionary dic = xmlHandler.ReaderALL(); foreach (KeyValuePair item in dic) @@ -183,6 +184,7 @@ namespace Ewide.EntityFramework.Core } modelBuilder.Entity(item.Key).HasData(data); } +#endif } } } \ No newline at end of file diff --git a/Api/Ewide.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml b/Api/Ewide.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 0000000..040b013 --- /dev/null +++ b/Api/Ewide.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,16 @@ + + + + + False + False + True + Release + Any CPU + FileSystem + bin\Release\net5.0\publish\ + FileSystem + + \ No newline at end of file diff --git a/web-react/.env.development b/web-react/.env.development new file mode 100644 index 0000000..b8402ce --- /dev/null +++ b/web-react/.env.development @@ -0,0 +1 @@ +REACT_APP_BASE_URL=http://localhost:5566/ \ No newline at end of file diff --git a/web-react/.env.production b/web-react/.env.production new file mode 100644 index 0000000..a7692b7 --- /dev/null +++ b/web-react/.env.production @@ -0,0 +1 @@ +REACT_APP_BASE_URL=http://118.178.224.202:90/ \ No newline at end of file diff --git a/web-react/public/favicon.ico b/web-react/public/favicon.ico index a11777cc471a4344702741ab1c8a588998b1311a..ae7c79700385d9f694836df691822a40fa75f0e8 100644 GIT binary patch literal 4286 zcmbuD2~-qU7KU%rB1U6C6g6rxXreJ{j7BqVF`}a;F=~uUTyR%JP;kYKMG#PwML_l~ zZioUd5Ej{+s(Mw$)<6R-?nL95nK)TB(I~w6yIp3^WG2a+6sMX#-JH7b-T%Mey$>P{ ze(deZ^hzgfh`JNeK-~C<9B`XHH(&V9w$tPL@dv;CdPLer;mpf2Sn}z;SMqydi@Zqd!lx-y<0ZO2ddY|p>2+G#GQ}jL#dP0m}4W>#-&;8Y9H5Cq`#?lYTP&$js z1?TxiqU*Og;s%~BZRUq1kJeamS7n&wvouihv)v}|qfKl-ZN$Aq4sSnOjar}zkWbW5_&?XsRA5gHrPI6A365hGarLP( z!TC|XxSpRDH$6<1JhGCc9V22?FHNwtn|4b99k#K3udSC4%v&yp1}Z5%!;e{ja9_yw?%m5}PEtr2b+ZO+{n6HIz&Zt=BEMQZ20bNfe!U zp}4L!TilSFE^Z!_f;xznJUfLjpNal#&wlt&g%7`4Er&i@D2MYIawMOq#PGM2IBu^d za@&eed8evWuC2-7RGalJ8FE#`cf%&_%xf@~KU>4~&xo1|hYx8i9^Ygr`J z&EW$*axgNxd@~)9JO;!`JNF-yyszzLzHQ!e0N=ubeqJkwv@DSiRzQQCsY-OlXeBNa zJ}kDYOsRXJ>e%P)Yfjy#+B2N$KjYL;@I7KjlCiuOHS5grubv}n%p$sQzU!#QqT!bs zN~iJKaz|bvto%|G)+{U#-7L?D8>gmXLL#~iGxPr5^cRA_Jw9(Y8J#Xpcy=ZZCGO$)esmb90% zY3#*(ZMw10{-?&$NxWV+ueC;4epnWqxuvnBV&Q)VCT;IWeDoiOIJBY^FBk?3P` zk%I|!K#uZ3nk7e)1M1)Zz&JnVJN1{43|E z_mwOvxR^_=7xKICrsC1uP&V^+UHO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E3Y$Jao_Q90R-gl~5 z_xAb2J%eArrC1CN4G$}-zVvCqF1;H;abAu6G*+PDHSYFx@Tdbfox*uEd3}BUyYY-l zTfEsOqsi#f9^FoLO;ChK<554qkri&Av~SIM*{fEYRE?vH7pTAOmu2pz3X?Wn*!ROX ztd54huAk&mFBemMooL33RV-*1f0Q3_(7hl$<#*|WF9P!;r;4_+X~k~uKEqdzZ$5Al zV63XN@)j$FN#cCD;ek1R#l zv%pGrhB~KWgoCj%GT?%{@@o(AJGt*PG#l3i>lhmb_twKH^EYvacVY-6bsCl5*^~L0 zonm@lk2UvvTKr2RS%}T>^~EYqdL1q4nD%0n&Xqr^cK^`J5W;lRRB^R-O8b&HENO||mo0xaD+S=I8RTlIfVgqN@SXDr2&-)we--K7w= zJVU8?Z+7k9dy;s;^gDkQa`0nz6N{T?(A&Iz)2!DEecLyRa&FI!id#5Z7B*O2=PsR0 zEvc|8{NS^)!d)MDX(97Xw}m&kEO@5jqRaDZ!+%`wYOI<23q|&js`&o4xvjP7D_xv@ z5hEwpsp{HezI9!~6O{~)lLR@oF7?J7i>1|5a~UuoN=q&6N}EJPV_GD`&M*v8Y`^2j zKII*d_@Fi$+i*YEW+Hbzn{iQk~yP z>7N{S4)r*!NwQ`(qcN#8SRQsNK6>{)X12nbF`*7#ecO7I)Q$uZsV+xS4E7aUn+U(K baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ diff --git a/web-react/public/index.html b/web-react/public/index.html index b92c542..fb47694 100644 --- a/web-react/public/index.html +++ b/web-react/public/index.html @@ -24,7 +24,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - React App + 宽易科技 diff --git a/web-react/src/common/api/index.js b/web-react/src/common/api/index.js index c0c329a..e9d7915 100644 --- a/web-react/src/common/api/index.js +++ b/web-react/src/common/api/index.js @@ -17,7 +17,7 @@ import { message as Message, notification } from 'antd' const STATUS = status -axios.defaults.baseURL = '/api' +axios.defaults.baseURL = process.env.NODE_ENV === 'development' ? '/api' : process.env.REACT_APP_BASE_URL const initInstance = (options) => { const instance = axios diff --git a/web-react/src/common/api/requests/business/houseSafety/houseQuery.js b/web-react/src/common/api/requests/business/houseSafety/houseQuery.js index 6357a36..4749d9d 100644 --- a/web-react/src/common/api/requests/business/houseSafety/houseQuery.js +++ b/web-react/src/common/api/requests/business/houseSafety/houseQuery.js @@ -1,5 +1,6 @@ const urls = { houseQueryPage: ['/houseQuery/page', 'post'], + houseQueryDetail: ['/houseQuery/detail', 'get'], } export default urls \ No newline at end of file diff --git a/web-react/src/components/authority-view/index.jsx b/web-react/src/components/authority-view/index.jsx index 58cf93d..0bac500 100644 --- a/web-react/src/components/authority-view/index.jsx +++ b/web-react/src/components/authority-view/index.jsx @@ -78,28 +78,26 @@ function renderItem(data) { } function renderCheckbox(data) { - return ( + const grid = ( ) + return data.remark ? ( + + {grid} + + ) : ( + grid + ) } export default class AuthorityView extends Component { diff --git a/web-react/src/pages/business/house/query/detail.jsx b/web-react/src/pages/business/house/query/detail.jsx new file mode 100644 index 0000000..60c4d18 --- /dev/null +++ b/web-react/src/pages/business/house/query/detail.jsx @@ -0,0 +1,35 @@ +import React, { Component } from 'react' +import { Card } from 'antd' +import Container from 'components/container' +import { api } from 'common/api' +import ReactJson from 'react-json-view' + +export default class detail extends Component { + state = { + loading: false, + record: null, + } + + componentDidMount() { + // 获取详细数据 + const { id } = this.props.param + if (id) { + api.houseQueryDetail({ id }).then(({ data }) => { + this.setState({ + record: data, + loading: false, + }) + }) + } + } + + render() { + return ( + + + + + + ) + } +} diff --git a/web-react/src/pages/business/house/query/index.jsx b/web-react/src/pages/business/house/query/index.jsx index 0c03ce9..937dc5b 100644 --- a/web-react/src/pages/business/house/query/index.jsx +++ b/web-react/src/pages/business/house/query/index.jsx @@ -12,7 +12,14 @@ import { Row, Tag, } from 'antd' -import { AntIcon, Auth, Container, InputNumberRange, QueryTable } from 'components' +import { + AntIcon, + Auth, + Container, + InputNumberRange, + QueryTable, + QueryTableActions, +} from 'components' import { api } from 'common/api' import auth from 'components/authorized/handler' import { first, isEqual, last } from 'lodash' @@ -46,6 +53,9 @@ const authName = 'houseQuery' export default class index extends Component { state = { codes: { + houseStatus: [], + houseType: [], + houseIndustry: [], houseUsedStatus: [], housePropertyRights: [], landAttribute: [], @@ -95,10 +105,11 @@ export default class index extends Component { sorter: true, }, { - title: '任务截止时间', - dataIndex: 'endTime', + title: '建档状态', + dataIndex: 'state', sorter: true, - width: 150, + width: 100, + render: text => this.bindCodeValue(text, 'house_status'), }, ] @@ -109,7 +120,22 @@ export default class index extends Component { constructor(props) { super(props) - const flag = auth({ [authName]: [['edit'], ['delete']] }) + const flag = auth({ [authName]: 'detail' }) + + if (flag) { + this.columns.push({ + title: '操作', + width: 150, + dataIndex: 'actions', + render: (text, record) => ( + + + this.onOpen(record.id)}>查看 + + + ), + }) + } } /** @@ -132,6 +158,9 @@ export default class index extends Component { const { onLoading, onLoadData } = this.table.current onLoading() getDictData( + 'house_status', + 'house_type', + 'house_industry', 'house_used_status', 'house_property_rights', 'land_attribute', @@ -198,8 +227,12 @@ export default class index extends Component { * @param {*} modal * @param {*} id */ - onOpen(modal, id) { - modal.current.open({ id }) + onOpen(id) { + window.openContentWindow({ + title: '房屋详情', + path: 'business/house/query/detail', + param: { id }, + }) } /** diff --git a/web-react/src/pages/business/house/task/index.jsx b/web-react/src/pages/business/house/task/index.jsx index 635eded..ff9fcb6 100644 --- a/web-react/src/pages/business/house/task/index.jsx +++ b/web-react/src/pages/business/house/task/index.jsx @@ -28,14 +28,7 @@ const authName = 'houseTask' export default class index extends Component { state = { codes: { - status: [ - { code: -1, value: '审核退回' }, - { code: 0, value: '待处理' }, - { code: 1, value: '暂存' }, - { code: 2, value: '待提交' }, - { code: 3, value: '审核中' }, - { code: 6, value: '审核通过' }, - ], + houseStatus: [], houseType: [], houseIndustry: [], }, @@ -92,7 +85,7 @@ export default class index extends Component { dataIndex: 'state', sorter: true, width: 100, - render: text => this.bindCodeValue(text, 'status'), + render: text => this.bindCodeValue(text, 'house_status'), }, ] @@ -146,7 +139,7 @@ export default class index extends Component { componentDidMount() { const { onLoading, onLoadData } = this.table.current onLoading() - getDictData('house_type', 'house_industry').then(codes => { + getDictData('house_status', 'house_type', 'house_industry').then(codes => { this.setState({ codes: { ...this.state.codes, ...codes } }, () => { onLoadData() }) @@ -295,8 +288,8 @@ export default class index extends Component {