12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226 |
- <template>
- <div class="ZTGlobal rootele">
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="拆迁补偿预估" name="first">
- <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="8rem" class="demo-ruleForm">
- <el-form-item label="项目范围:" prop="">
- <input @change="handleUpload" type="file" style="display:none" id="fileInput" accept=".zip"></input>
- <el-button type="primary" @click="inputGeometry">导入</el-button>
- <el-button type="primary" @click="drawPolygon()">绘制</el-button>
- <el-button type="primary" @click="clear()">清除</el-button>
- <!-- </div> -->
- </el-form-item>
- <div class="el-upload__tip" style="height: 1rem; color: #f5f761f1; text-align: center">
- 只能上传shape压缩文件(zip),且不超过500kb
- </div>
- <el-form-item label="项目名称:" prop="projectName">
- <!-- <el-col :span="7">项目名称:</el-col> -->
- <el-col :span="16">
- <el-input size="mini" placeholder="输入项目名称" v-model="ruleForm.projectName"></el-input>
- </el-col>
- </el-form-item>
- <el-form-item label="征地补偿标准:" prop="zdValue">
- <!-- <el-col :span="7">征地补偿标准:</el-col> -->
- <el-col :span="13">
- <el-select size="mini" v-model="ruleForm.zdValue" placeholder="请选择">
- <el-option v-for="item in zdList" :key="item.id" :label="item.name" :value="item.id">
- </el-option>
- </el-select>
- </el-col>
- <el-col :span="7" class="buttongroup">
- <el-button size="mini" type="primary" id="zdShow" @click="zdShow()" plain>查看</el-button>
- <el-button size="mini" type="primary" id="zdSet" @click="zdSet()" plain>配置</el-button>
- </el-col>
- </el-form-item>
- <el-form-item label="青苗补偿标准:" prop="qmValue">
- <!-- <el-col :span="7">青苗补偿标准:</el-col> -->
- <el-col :span="13">
- <el-select size="mini" v-model="ruleForm.qmValue" placeholder="请选择">
- <el-option v-for="item in qmList" :key="item.id" :label="item.name" :value="item.id">
- </el-option>
- </el-select>
- </el-col>
- <el-col :span="7" class="buttongroup">
- <el-button size="mini" type="primary" id="qmShow" @click="qmShow()" plain>查看</el-button>
- <el-button size="mini" type="primary" id="qmSet" @click="qmSet()" plain>配置</el-button>
- </el-col>
- </el-form-item>
- <el-form-item label="拆迁补偿标准:" prop="cqValue">
- <!-- <el-col :span="7">拆迁补偿标准:</el-col> -->
- <el-col :span="13">
- <el-select size="mini" v-model="ruleForm.cqValue" placeholder="请选择">
- <el-option v-for="item in cqList" :key="item.id" :label="item.name" :value="item.id">
- </el-option>
- </el-select>
- </el-col>
- <el-col :span="7" class="buttongroup">
- <el-button size="mini" type="primary" id="cqShow" @click="cqShow()" plain>查看</el-button>
- <el-button size="mini" type="primary" id="cqSet" @click="cqSet()" plain>配置</el-button>
- </el-col>
- </el-form-item>
- <el-row style="text-align: center">
- <el-button type="primary" plain @click="submitForm('ruleForm')">确定</el-button>
- <el-button type="primary" plain @click="dialogClose()">取消</el-button>
- </el-row>
- </el-form>
- <!-- <canvas id="CVS" style="height: 100%;width: 100%; z-index: 10000;"></canvas> -->
- <!-- <el-card v-loading="loading" element-loading-text="正在数据分析......" element-loading-spinner="el-icon-loading"
- element-loading-background="rgba(63 113 165, 0.8)"
- style="height:10rem;border: 0px;color:#ffffff "></el-card> -->
- <!-- element-loading-background="rgba(0, 0, 0, 0.8) -->
- </el-tab-pane>
- <el-tab-pane label="分析记录" name="second">
- <el-row>
- <el-col :span="10">
- <el-input size="mini" placeholder="请输入项目名称" v-model="searchName">
- <!-- <i slot="suffix" class="el-input__icon el-icon-search"></i> -->
- </el-input>
- </el-col>
- <el-col :span="10">
- <el-date-picker size="mini" v-model="dateVal" type="daterange" range-separator="至" start-placeholder="开始日期"
- end-placeholder="结束日期">
- </el-date-picker>
- </el-col>
- <el-col :span="2">
- <el-button type="primary" size="mini" @click="queryProject">查询</el-button>
- </el-col>
- </el-row>
- <div>
- <el-card class="box-card" v-for="projectInfo in projectList" :key="projectInfo.id">
- <el-row>
- <el-col :span="14">
- <span>{{ projectInfo.projectName }}</span></el-col>
- <el-col :span="10">
- <span>{{ formatDateTime(new Date(projectInfo.dateTime)) }}</span>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="10">
- <el-button style="float: right; padding: 3px 0" type="success">完成</el-button>
- </el-col>
- <el-col :span="10" justify="center">
- <!-- <el-button type="primary" style="float: right; padding: 3px 0">日志</el-button> -->
- <el-button type="primary" style="float: right; padding: 3px 0"
- @click="showResult(projectInfo)">分析结果</el-button>
- <el-button type="primary" style="float: right; padding: 3px 0"
- @click="exportWord(projectInfo)">报告</el-button>
- </el-col>
- <el-col :span="4">
- <el-button type="warning" style="float: right; padding: 3px 0"
- @click="deletProject(projectInfo)">删除</el-button>
- </el-col>
- </el-row>
- </el-card>
- <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="rowsCount"
- :current-page="currentPage" @current-change="onCurrentChange">
- </el-pagination>
- </div>
- </el-tab-pane>
- <el-tab-pane label="分析结果" name="third">
- <el-row class="box-card" v-model="curProjectInfo">
- <el-col :span="18">
- <span style="font-size: 1rem">{{
- curProjectInfo.name
- }}</span></el-col>
- <el-col :span="6">
- <el-button type="primary" size="mini" @click="exportWord(curProjectInfo)">导出报告</el-button>
- </el-col>
- </el-row>
- <el-tabs v-model="activePage1" @tab-click="pageClick" style="height: auto;">
- <el-tab-pane label="国有评估" name="GY">
- <div class="divrow">
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff">国有用地(亩)</span>
- </div>
- <div>
- <span color="#2d8cf0">{{ formatterArea(zdResult.gyMJ) }}</span>
- </div>
- </div>
- </div>
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff">国有建筑面积(平方米)</span>
- </div>
- <div>
- <span color="#2d8cf0">{{ formatterArea(cqResult.gyJZMJ) }}</span>
- </div>
- </div>
- </div>
- </div>
- <el-tabs v-model="activePage2" @tab-click="gyPpageClick" style="height: auto;">
- <el-tab-pane label="国有权属" name="GYQS">
- <div id="GYQSChart" style="height: 15rem; width: 25rem;"></div>
- <div id="GYDLChart" style="height: 15rem; width: 25rem;"></div>
- </el-tab-pane>
- <el-tab-pane label="国有房产" name="GYFC">
- <ul style="width: 25rem;height: 25rem;overflow-y: auto;">
- <!-- item = { id: smid, cqr: cqrVal, jg: fwjgVal, fwdj: fwdjVal, floor: floorVal, jzmj: jzmjVal, zdmj: zdmjVal, address: addressVal, pay: pay, single: BZ } -->
- <li v-for="(cqItem, index) in cqResult.gyList" :key="index"
- style="margin-bottom: 0.5rem; font-size: 0.8rem">
- <el-row>
- <el-col :span="20">
- <span style="color: #06c4f3; font-weight: 600">{{ index + 1 }}. {{ cqItem.cqr }}</span>
- </el-col>
- <el-col :span="4">
- <el-image src="../../../../static/images/location1.png" style="height: 1.5rem; width: 1.5rem"
- @click="cqLocation(true, cqItem.smid, cqItem.cqr)"></el-image>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12"> 结构:{{ cqItem.jg }} </el-col>
- <el-col :span="12"> 层数:{{ cqItem.floor }} </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- 建筑面积:{{ formatterArea(cqItem.jzmj) }}平方米
- </el-col>
- <!-- <el-col :span="12"> 拆迁补偿:{{ cqItem.pay }}万元 </el-col> -->
- </el-row>
- <!-- <el-row>
- <el-col :span="24">
- <el-image src="../../../../static/images/location1.png" style="height: 1.2rem; width: 1.2rem"
- @click="cqLocation(true, cqItem.smid, cqItem.cqr)"></el-image>
- 地址:{{ cqItem.address }}
- </el-col>
- </el-row> -->
- </li>
- </ul>
- </el-tab-pane>
- </el-tabs>
- </el-tab-pane>
- <el-tab-pane label="集体评估" name="JT">
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff">集体用地(亩)</span>
- </div>
- <div>
- <span color="#2d8cf0">{{ formatterArea(zdResult.jtMJ) }}</span>
- </div>
- </div>
- </div>
- <el-tabs v-model="activePage3" @tab-click="jtPageClick">
- <!-- <el-tab-pane label="集体权属" name="JTQS">
- <div id="GYQSChart" style="height: 12rem; width: 25rem;"></div>
- </el-tab-pane> -->
- <el-tab-pane label="征地补偿评估" name="ZDPG">
- <div class="divrow">
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 集体征地补偿费(万元)</span>
- </div>
- <div>
- <span color="#2d8cf0">{{ formatterArea(zdResult.totalPay) }}</span>
- </div>
- </div>
- </div>
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 集体土地补偿费(万元)</span>
- </div>
- <div>
- <span color="#2d8cf0">{{ formatterArea(zdResult.totalZDPay) }}</span>
- </div>
- </div>
- </div>
- </div>
- <!-- 第三行 -->
- <div class="divrow">
- <!-- 123 -->
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 集体安置补偿费(万元)</span>
- </div>
- <div>
- <span color="#2d8cf0">{{ formatterArea(zdResult.totalAZPay) }}</span>
- </div>
- </div>
- </div>
- </div>
- <div id="JTOWNERChart" style="height:12rem; width: 25rem;"></div>
- <div id="JTUSEChart" style="height: 12rem; width: 25rem;"></div>
- <div id="JTDLChart" style="height: 12rem; width: 25rem;"></div>
- </el-tab-pane>
- <el-tab-pane label="青苗补偿评估" name="QMPG">
- <!-- 第一行 -->
- <div class="divrow">
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 补偿面积(亩)</span>
- </div>
- <div>
- <span color="#2d8cf0">{{ formatterArea(qmResult.totalMJ) }}</span>
- </div>
- </div>
- </div>
- <!-- 123 -->
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 青苗补偿(万元)</span>
- </div>
- <div>
- <span color="#2d8cf0"> {{ formatterArea(qmResult.totalPay) }}</span>
- </div>
- </div>
- </div>
- </div>
- <!-- 第2行 -->
- <div class="divrow">
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 农作物补偿面积(亩)</span>
- </div>
- <div>
- <span color="#2d8cf0">{{ formatterArea(qmResult.nzwMJ) }}</span>
- </div>
- </div>
- </div>
- <!-- 123 -->
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 农作物补偿费用(万元)</span>
- </div>
- <div>
- <span color="#2d8cf0"> {{ formatterArea(qmResult.nzwPay) }}</span>
- </div>
- </div>
- </div>
- </div>
- <!-- 第3行 -->
- <div class="divrow">
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 经济作物补偿面积(亩)</span>
- </div>
- <div>
- <span color="#2d8cf0">{{ formatterArea(qmResult.jjzwMJ) }}</span>
- </div>
- </div>
- </div>
- <!-- 123 -->
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 经济作物补偿费(万元)</span>
- </div>
- <div>
- <span color="#2d8cf0"> {{ formatterArea(qmResult.jjzwPay) }}</span>
- </div>
- </div>
- </div>
- </div>
- <!-- 第4行 -->
- <div class="divrow">
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 树木补偿面积(亩)</span>
- </div>
- <div>
- <span color="#2d8cf0">{{ formatterArea(qmResult.smMJ) }}</span>
- </div>
- </div>
- </div>
- <!-- 123 -->
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 树木补偿费用(万元)</span>
- </div>
- <div>
- <span color="#2d8cf0"> {{ formatterArea(qmResult.smPay) }}</span>
- </div>
- </div>
- </div>
- </div>
- <div id="QMMJChart" style="height: 10rem; width: 25rem"></div>
- <div id="QMFYChart" style="height: 10rem; width: 25rem"></div>
- </el-tab-pane>
- <el-tab-pane label="房屋拆迁补偿评估" name="FWCQ">
- <!-- 第1行 -->
- <div class="divrow">
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 房屋数量(个)</span>
- </div>
- <div>
- <span color="#2d8cf0">{{ cqResult.jtCount }}</span>
- </div>
- </div>
- </div>
- <!-- 123 -->
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 房屋建筑面积(平方米)</span>
- </div>
- <div>
- <span color="#2d8cf0"> {{ formatterArea(cqResult.jtJZMJ) }}</span>
- </div>
- </div>
- </div>
- </div>
- <!-- 第2行 -->
- <div class="divrow">
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 预计补偿(万元)</span>
- </div>
- <div>
- <span color="#2d8cf0">{{ formatterArea(cqResult.totalPay) }}</span>
- </div>
- </div>
- </div>
- <!-- 123 -->
- <div class="divCol">
- <div class="divImg">
- <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
- </div>
- <div class="divText">
- <div>
- <span style="color: #fff"> 平均补偿费(元/平方米)</span>
- </div>
- <div>
- <span color="#2d8cf0"> {{ formatterArea(cqResult.average) }}</span>
- </div>
- </div>
- </div>
- </div>
- <ul style="width: 25rem;height: 25rem;overflow-y: auto;">
- <!-- item = { id: smid, cqr: cqrVal, jg: fwjgVal, fwdj: fwdjVal, floor: floorVal, jzmj: jzmjVal, zdmj: zdmjVal, address: addressVal, pay: pay, single: BZ } -->
- <li v-for="(cqItem, index) in cqResult.jtList" :key="index"
- style="margin-bottom: 0.5rem; font-size: 0.8rem">
- <el-row>
- <el-col :span="20">
- <span style="color: #06c4f3; font-weight: 600">{{ index + 1 }}. {{ cqItem.cqr }}</span>
- </el-col>
- <el-col :span="4">
- <el-image src="../../../../static/images/location1.png" style="height: 1.5rem; width: 1.5rem"
- @click="cqLocation(false, cqItem.smid, cqItem.cqr)"></el-image>
- <!-- <img src="imgs.zd1" /> -->
- <!-- <i class="el-icon-s-operation"></i> -->
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12"> 结构:{{ cqItem.jg }} </el-col>
- <el-col :span="12"> 层数:{{ cqItem.floor }} </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- 建筑面积:{{ formatterArea(cqItem.jzmj) }}平方米
- </el-col>
- <el-col :span="12"> 拆迁补偿:{{ formatterArea(cqItem.pay) }}万元 </el-col>
- </el-row>
- <!-- <el-row>
- <el-col :span="24">
-
- 地址:{{ cqItem.address }}
- </el-col>
- </el-row> -->
- </li>
- </ul>
- </el-tab-pane>
- </el-tabs>
- </el-tab-pane>
- </el-tabs>
- </el-tab-pane></el-tabs>
- </div>
- </template>
- <script>
- import {
- polygon,
- area,
- booleanContains,
- intersect,
- } from "@turf/turf";
- import proj4 from "proj4";
- // import shpjs from "shpjs";
- import CQSetInfo from "./CQSetInfo.vue";
- import CQShowInfo from "./CQShowInfo.vue";
- import QMSetInfo from "./QMSetInfo.vue";
- import QMShowInfo from "./QMShowInfo.vue";
- import ZDSetInfo from "./ZDSetInfo.vue";
- import ZDShowInfo from "./ZDShowInfo.vue";
- import Property from "./Property.vue";
- import {
- getCqBcbzList, getZdBcbzList, getQmbcbzList,
- getZdProjectList, getZdProjectById, addZdProject, delZdProject,
- addQmResult, addCqResult, addZdResult, expotZDBCWord
- } from "@/api/zt/ztApi.js";
- import zdAnalyse from './zdAnalyse.js'
- import Popup from "../Popup.js";
- var handlerPolygon;
- var handleInput;
- var polygonEntity = null;
- var popupBox=null;
- export default {
- props: ["layerid"],
- name: "DemolitionList",
- data() {
- return {
-
- searchName: "",
- FileList: [],
- localLoading: null,
- tableData: [],
- imageData: '',
- /**
- *
- */
- imgs: {
- loc: require("@/assets/images/loc.png"),
- /**
- * 征地版面图片
- */
- zd1: require("@/assets/homeimg/1.png"),
- zd2: require("@/assets/homeimg/1.png"),
- zd3: require("@/assets/homeimg/1.png"),
- zd4: require("@/assets/homeimg/1.png"),
- /**
- * 拆迁版面图片
- */
- cq1: require("@/assets/homeimg/1.png"),
- cq2: require("@/assets/homeimg/1.png"),
- cq3: require("@/assets/homeimg/1.png"),
- cq4: require("@/assets/homeimg/1.png"),
- /**
- * 青苗版面图片
- */
- qm1: require("@/assets/homeimg/1.png"),
- qm2: require("@/assets/homeimg/1.png"),
- qm3: require("@/assets/homeimg/1.png"),
- qm4: require("@/assets/homeimg/1.png"),
- },
- /**
- * tabs 标签
- */
- activeName: 'first',
- activePage1: "GY",
- activePage2: 'GYQS',
- activePage3: "ZDPG",
- /**土地权属 */
- activateQS: 'gytd',
- /**
- * 弹窗保证弹出唯一
- */
- sublayerid: null,
- ruleForm: {
- projectName: "",
- /**
- * 征地标准值
- */
- zdValue: "",
- /* 青苗标准值
- */
- qmValue: "",
- /**
- * 拆迁标准值
- */
- cqValue: "",
- },
- rules: {
- projectName: [
- { required: true, message: "请输入项目名称", trigger: "blur" },
- ],
- zdValue: [
- { required: true, message: "请选择征地补偿标准", trigger: "blur" },
- ],
- qmValue: [
- { required: true, message: "请选择青苗补偿标准", trigger: "blur" },
- ],
- cqValue: [
- { required: true, message: "请选择拆迁补偿标准", trigger: "blur" },
- ],
- },
- /**
- /**
- /**
- * 征地标准列表
- */
- zdList: [
- // {
- // label: "征地标准01",
- // value: '征地标准01',
- // rules: {
- // /**
- // * 土地统一年产值
- // */
- // TDCZ: 1000,
- // /**
- // * 土地补偿倍数
- // */
- // TDBCBS: 10,
- // /**
- // * 土地补偿费
- // */
- // TDBCF: 1000,
- // /**
- // * 安置补偿倍数
- // */
- // AZBCBS: 10,
- // /**
- // * 安置补偿费
- // */
- // ZBBCF: 111,
- // // /**
- // // * 土地补偿费
- // // */
- // // BCHJ:1000,
- // }
- // },
- // {
- // label: "征地标准02",
- // value: '征地标准02',
- // rules: {
- // /**
- // * 土地统一年产值
- // */
- // TDCZ: 1000,
- // /**
- // * 土地补偿倍数
- // */
- // TDBCBS: 10,
- // /**
- // * 土地补偿费
- // */
- // TDBCF: 1000,
- // /**
- // * 安置补偿倍数
- // */
- // AZBCBS: 10,
- // /**
- // * 安置补偿费
- // */
- // ZBBCF: 111,
- // // /**
- // // * 土地补偿费
- // // */
- // // BCHJ:1000,
- // }
- // },
- // {
- // label: "征地标准03",
- // value: '征地标准03',
- // rules: {
- // /**
- // * 土地统一年产值
- // */
- // TDCZ: 1000,
- // /**
- // * 土地补偿倍数
- // */
- // TDBCBS: 10,
- // /**
- // * 土地补偿费
- // */
- // TDBCF: 1000,
- // /**
- // * 安置补偿倍数
- // */
- // AZBCBS: 10,
- // /**
- // * 安置补偿费
- // */
- // ZBBCF: 111,
- // // /**
- // // * 土地补偿费
- // // */
- // // BCHJ:1000,
- // }
- // },
- ],
- /**
- * 青苗标准值
- */
- qmList: [
- // {
- // label: "青苗标准01",
- // value: '01',
- // rules: {
- // /**
- // * 土地统一年产值
- // */
- // TDCZ: 1000,
- // /**
- // * 土地补偿倍数
- // */
- // TDBCBS: 10,
- // /**
- // * 土地补偿费
- // */
- // TDBCF: 1000,
- // /**
- // * 安置补偿倍数
- // */
- // AZBCBS: 10,
- // /**
- // * 安置补偿费
- // */
- // ZBBCF: 111,
- // // /**
- // // * 土地补偿费
- // // */
- // // BCHJ:1000,
- // }
- // },
- // {
- // label: "青苗标准02",
- // value: '02',
- // rules: {
- // /**
- // * 土地统一年产值
- // */
- // TDCZ: 1000,
- // /**
- // * 土地补偿倍数
- // */
- // TDBCBS: 10,
- // /**
- // * 土地补偿费
- // */
- // TDBCF: 1000,
- // /**
- // * 安置补偿倍数
- // */
- // AZBCBS: 10,
- // /**
- // * 安置补偿费
- // */
- // ZBBCF: 111,
- // // /**
- // // * 土地补偿费
- // // */
- // // BCHJ:1000,
- // }
- // },
- // {
- // label: "青苗标准03",
- // value: '03',
- // rules: {
- // /**
- // * 土地统一年产值
- // */
- // TDCZ: 1000,
- // /**
- // * 土地补偿倍数
- // */
- // TDBCBS: 10,
- // /**
- // * 土地补偿费
- // */
- // TDBCF: 1000,
- // /**
- // * 安置补偿倍数
- // */
- // AZBCBS: 10,
- // /**
- // * 安置补偿费
- // */
- // ZBBCF: 111,
- // // /**
- // // * 土地补偿费
- // // */
- // // BCHJ:1000,
- // }
- // },
- ],
- /**
- * 拆迁标准值
- */
- cqList: [
- // {
- // label: "拆迁标准01",
- // value: '01',
- // rules: {
- // /**
- // * 土地统一年产值
- // */
- // TDCZ: 1000,
- // /**
- // * 土地补偿倍数
- // */
- // TDBCBS: 10,
- // /**
- // * 土地补偿费
- // */
- // TDBCF: 1000,
- // /**
- // * 安置补偿倍数
- // */
- // AZBCBS: 10,
- // /**
- // * 安置补偿费
- // */
- // ZBBCF: 111,
- // // /**
- // // * 土地补偿费
- // // */
- // // BCHJ:1000,
- // }
- // },
- // {
- // label: "拆迁标准02",
- // value: '02',
- // rules: {
- // /**
- // * 土地统一年产值
- // */
- // TDCZ: 1000,
- // /**
- // * 土地补偿倍数
- // */
- // TDBCBS: 10,
- // /**
- // * 土地补偿费
- // */
- // TDBCF: 1000,
- // /**
- // * 安置补偿倍数
- // */
- // AZBCBS: 10,
- // /**
- // * 安置补偿费
- // */
- // ZBBCF: 111,
- // // /**
- // // * 土地补偿费
- // // */
- // // BCHJ:1000,
- // }
- // },
- // {
- // label: "拆迁标准03",
- // value: '03', rules: {
- // /**
- // * 土地统一年产值
- // */
- // TDCZ: 1000,
- // /**
- // * 土地补偿倍数
- // */
- // TDBCBS: 10,
- // /**
- // * 土地补偿费
- // */
- // TDBCF: 1000,
- // /**
- // * 安置补偿倍数
- // */
- // AZBCBS: 10,
- // /**
- // * 安置补偿费
- // */
- // ZBBCF: 111,
- // // /**
- // // * 土地补偿费
- // // */
- // // BCHJ:1000,
- // }
- // },
- ],
- /***
- * tab2
- */
- dateVal: "",
- projectList: [
- // {
- // id: '',
- // name: '',
- // date: '',
- // /* 征地标准值
- // */
- // zdValue: '',
- // /* 青苗标准值
- // */
- // qmValue: '',
- // /**
- // * 拆迁标准值
- // */
- // cqValue: '',
- // /**
- // * 分析范围
- // */
- // geometry: {},
- // /**
- // * 拆迁分析结果
- // */
- // cqResult: {},
- // /**
- // * 青苗分析结果
- // */
- // qmResult: {},
- // /**
- // * 征地分析结果
- // */
- // zdResult: {}
- // }
- ],
- rowsCount: 10,
- pageSize: 10,
- currentPage: 1,
- curProjectInfo: {
- id: "",
- projectName: "",
- imageData: "",
- totalZDMJ: 0.0,
- gyMJ: 0.0,
- jtMJ: 0.0,
- dateTime: "",
- /* 征地标准值
- */
- zdValue: "",
- /* 青苗标准值
- */
- qmValue: "",
- /**
- * 拆迁标准值
- */
- cqValue: "",
- /**
- * 分析范围
- */
- regions: {},
- /**
- * 拆迁分析结果
- */
- cqResult: {
- },
- /**
- * 青苗分析结果
- */
- qmResult: {},
- /**
- * 征地分析结果
- */
- zdResult: {},
- /**
- * 权属信息
- */
- qsResult: {}
- },
- /**
- * 拆迁结果
- */
- cqResult: {
- count: 0,
- totalJZMJ: 0,
- totalPay: 0,
- average: 0,
- gyJZMJ: 0,
- jtJZMJ: 0,
- gyCount: 0,
- jtCount: 0,
- gyList: [],
- jtList: [],
- gyfeatures: [],
- jtfeatures: [],
- fieldInfos: []
- },
- // {
- // id: 3,
- // name: '朱长贵明',
- // jg: '砖木结构',
- // area: 123.98,
- // floor: 1,
- // address: '朱楼村111号',
- // pay: 730021,
- // single: 5862,
- // },
- /**
- * 青苗结果
- */
- qmResult: {
- totalPay: 0.0,
- totalMJ: 0.0,
- nzwMJ: 0.0,
- nzwPay: 0.0,
- jjzwMJ: 0.0,
- jjzwPay: 0.0,
- smMJ: 0.0,
- smPay: 0.0,
- fieldInfos: [],
- features: [],
- },
- /**
- * 征地结果
- */
- zdResult: {
- //国有面积
- gyMJ: 0,
- //集体面积
- jtMJ: 0,
- //征地面积
- totalZDMJ: 0,
- //总补偿
- totalPay: 0,
- //征地补偿
- totalZDPay: 0,
- //安置补偿
- totalAZPay: 0,
- //国有地类及面积
- gydlList: [],
- //地类及面积
- jtdlList: [],
- gyfeatures: [],
- jtfeatures: [],
- fieldInfos: [],
- },
- /**
- * 权属信息
- */
- qsResult: {
- stateUsedMJ: 0,
- stateUsedFeatures: [],
- stateUsedList: [],
- stateUsedFieldInfos: [],
- collectiveOwnerMJ: 0,
- collectiveOwnerFeatures: [],
- collectiveOwnerList: [],
- collectiveOwnerFieldInfos: [],
- collectiveUsedMJ: 0,
- collectiveUsedList: [],
- collectiveUsedFeatures: [],
- collectiveUsedFieldInfos: []
- },
- /**
- * 绘制多边形
- */
- // handlerPolygon: null,
- positions: [],
- regions: [],
- /**
- * 临时图元信息
- */
- entities: [
- // {type:'zdbc',id:'',entity:null}
- ],
- qsEntities: [],
- // handlerPolygon: null
- // clipMode: Cesium.ModifyRegionMode.CLIP_OUTSIDE;
- gyqsChartdatas: [],
- jtqsChartDatas: []
- };
- },
- created() {
- if (viewer.shadows == false) {
- viewer.shadows = true; //开启场景阴影
- viewer.terrainShadows = true; //地形阴影
- }
- let scene = viewer.scene;
- let layers = scene.layers.layerQueue;
- //图层模型设置阴影
- for (let i = 0; i < layers.length; i++) {
- if (layers[i].shadowType !== 2) {
- layers[i].shadowType = 2;
- // layers[i].refresh();
- }
- }
- this.initSetting();
- },
- methods: {
- formatterArea(area) {
- if (area) {
- return area.toFixed(2);
- }
- return 0.0;
- },
- formatterPay(number) {
- return (number / 10000).toFixed(2);
- },
- /**
- * tas切换
- * @param {String} tab
- * @param {Object} event
- */
- handleClick(tab, event) {
- if (this.activeName == "third") {
- this.pageClick();
- }
- },
- /**
- * 初始化
- */
- initSetting() {
- var that = this;
- var date = new Date()
- that.ruleForm.projectName = "拆迁补偿项目_" + that.formatDateTimeToLong(date)
- if (window.isUseDB) {
- getCqBcbzList().then((res) => {
- if (res) {
- that.cqList = res.rows;
- that.ruleForm.cqValue = that.cqList[0].id
- }
- }).catch((err) => {
- console.log(err)
- })
- getQmbcbzList().then((res) => {
- that.qmList = res.rows;
- that.ruleForm.qmValue = that.qmList[0].id
- }).catch((err) => {
- console.log(err)
- })
- getZdBcbzList().then((res) => {
- that.zdList = res.rows;
- that.ruleForm.zdValue = that.zdList[0].id
- }).catch((err) => {
- console.log(err)
- })
- // getZdProjectList().then((res) => {
- // that.projectList = res.rows;
- // }).catch((err) => {
- // console.log(err)
- // })
- that.queryProject();
- }
- else {
- that.zdList = window.ZSBC.ZDBCList;
- that.cqList = window.ZSBC.CQBCList;
- that.qmList = window.ZSBC.QMBCList;
- that.ruleForm.qmValue = that.qmList[0].id
- that.ruleForm.cqValue = that.cqList[0].id
- that.ruleForm.zdValue = that.zdList[0].id
- var list = JSON.stringify(window.ZSBC.projectList)
- if (list)
- that.projectList = JSON.parse(list)
- }
- },
- /**
- * 查询项目
- */
- queryProject() {
- var startDate;
- var endDate;
- var that = this
- if (this.dateVal == null || this.dateVal == "") {
- // var interval = that.dateVal[1] - that.dateVal[0]
- startDate = "";
- endDate = ""
- }
- else {
- startDate = that.formatDateTime(that.dateVal[0])
- endDate = that.formatDateTime(that.dateVal[1])
- }
- if (window.isUseDB) {
- var queryParams = {
- "pageNum": that.currentPage,
- "pageSize": that.pageSize,
- // "orderByColumn": "zt_zd_project_list.dateTime",
- // "isAsc": "DESC",
- "projectName": that.searchName,
- "params": {
- "beginDateTime": startDate,
- "endDateTime": endDate,
- }
- }
- debugger
- getZdProjectList(queryParams).then((res) => {
- that.projectList = res.rows;
- that.rowsCount = res.total;
- }).catch((err) => {
- console.log(err)
- })
- }
- else {
- var list
- if (that.dateVal != null) {
- if (that.searchName.length > 0)
- list = window.ZSBC.projectList.find(t => t.projectName.indexOf(that.searchName) > -1 && t.dateTime >= startDate &&
- t.dateTime < endDate)
- else
- list = window.ZSBC.projectList.find(t => t.dateTime >= startDate &&
- t.dateTime < endDate).se
- }
- else {
- if (that.searchName.length > 0)
- list = window.ZSBC.projectList.find(t => t.projectName.indexOf(that.searchName) > -1)
- else {
- list = window.ZSBC.projectList
- }
- }
- that.rowsCount = list.length;
- list = list.slice((that.currentPage - 1) * that.pageSize, that.pageSize)
- }
- },
- onCurrentChange() {
- this.queryProject()
- },
- formatDateTimeToLong(date) {
- if (date == undefined || date == null)
- return '';
- var y = date.getFullYear();
- var m = date.getMonth() + 1;
- m = m < 10 ? ('0' + m) : m;
- var d = date.getDate();
- d = d < 10 ? ('0' + d) : d;
- var h = date.getHours();
- h = h < 10 ? ('0' + h) : h;
- var minute = date.getMinutes();
- minute = minute < 10 ? ('0' + minute) : minute;
- var second = date.getSeconds();
- second = second < 10 ? ('0' + second) : second;
- return y.toString() + m.toString() + d.toString() + h.toString() + minute.toString() + second.toString();
- },
- formatDateTime(date) {
- if (date == undefined)
- return '';
- var y = date.getFullYear();
- var m = date.getMonth() + 1;
- m = m < 10 ? ('0' + m) : m;
- var d = date.getDate();
- d = d < 10 ? ('0' + d) : d;
- var h = date.getHours();
- h = h < 10 ? ('0' + h) : h;
- var minute = date.getMinutes();
- minute = minute < 10 ? ('0' + minute) : minute;
- var second = date.getSeconds();
- second = second < 10 ? ('0' + second) : second;
- return y.toString() + '-' + m.toString() + '-' + d.toString() + ' ' + h.toString() + ':' + minute.toString() + ':' + second.toString();
- },
- //关闭窗体
- dialogClose() {
- viewer.entities.removeAll();
- if (handlerPolygon) {
- handlerPolygon.deactivate();
- handlerPolygon.clear();
- }
- this.positions = [];
- this.regions = [];
- if (this.layerid) this.$layer.close(this.layerid);
- },
- /**
- * 导出报告
- * @param item 报告信息
- */
- async handleGetBG(item) {
- debugger;
- if (item) {
- await getZDBCWord(item);
- }
- },
- /**
- *拆迁标准查看
- */
- cqShow() {
- var that = this;
- if (that.sublayerid) that.$layer.close(that.sublayerid);
- var width = 400;
- var top = 500;
- var left = 680; //Math.floor(document.body.clientWidth - width / 2);
- var height = 350;
- that.sublayerid = that.$layer.iframe({
- content: {
- content: CQShowInfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: { cqValue: that.ruleForm.cqValue }, //props
- },
- // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
- area: ["35rem", "40rem"],
- title: "拆迁补偿标准详情",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- },
- /**
- * 拆迁标准设置
- */
- cqSet() {
- var that = this;
- if (that.sublayerid) that.$layer.close(that.sublayerid);
- var width = 400;
- var top = 500;
- var left = Math.floor(document.body.clientWidth - width / 2);
- var height = 350;
- that.sublayerid = that.$layer.iframe({
- content: {
- content: CQSetInfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: { cqValue: that.ruleForm.cqValue }, //props
- },
- // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
- area: ["50rem", "48rem"],
- title: "拆迁补偿标准配置",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- },
- /**
- *青苗标准查看
- */
- qmShow() {
- var that = this;
- if (that.sublayerid) that.$layer.close(that.sublayerid);
- var width = 400;
- var top = 500;
- var left = Math.floor(document.body.clientWidth - width / 2);
- var height = 350;
- that.sublayerid = that.$layer.iframe({
- content: {
- content: QMShowInfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: { qmValue: that.ruleForm.qmValue }, //props
- },
- // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
- area: ["30rem", "18rem"],
- title: "青苗补偿标准详情",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- },
- /**
- * 青苗标准设置
- */
- qmSet() {
- var that = this;
- if (that.sublayerid) that.$layer.close(that.sublayerid);
- var width = 400;
- var top = 500;
- var left = Math.floor(document.body.clientWidth - width / 2);
- var height = 350;
- that.sublayerid = that.$layer.iframe({
- content: {
- content: QMSetInfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: { qmValue: that.ruleForm.qmValue }, //props
- },
- // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
- area: ["35rem", "22rem"],
- title: "青苗补偿标准配置",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- },
- /**
- *征地标准查看
- */
- zdShow() {
- var that = this;
- if (that.sublayerid) that.$layer.close(that.sublayerid);
- var width = 400;
- var top = 500;
- var left = Math.floor(document.body.clientWidth - width / 2);
- var height = 350;
- that.sublayerid = that.$layer.iframe({
- content: {
- content: ZDShowInfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: { zdValue: that.ruleForm.zdValue }, //props
- },
- // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
- area: ["35rem", "32rem"],
- title: "征地补偿标准详情",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- },
- /**
- * 征地标准设置
- */
- zdSet() {
- var that = this;
- if (that.sublayerid) that.$layer.close(that.sublayerid);
- var width = 400;
- var top = 500;
- var left = Math.floor(document.body.clientWidth - width / 2);
- var height = 350;
- that.sublayerid = that.$layer.iframe({
- content: {
- content: ZDSetInfo, //传递的组件对象
- parent: this, //当前的vue对象
- data: { zdValue: that.ruleForm.zdValue }, //props
- },
- // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
- area: ["35rem", "39rem"],
- title: "征地补偿标准配置",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- },
- /**
- * 查看姓名结果
- * @param {object} projectInfo
- */
- showResult(projectInfo) {
- var that = this
- that.activeName = "third";
- debugger
- that.curProjectInfo = projectInfo;
- that.regions = JSON.parse(that.curProjectInfo.regions)
- var nPositions = [];
- that.regions.forEach((item) => {
- nPositions.push(item.x)
- nPositions.push(item.y)
- })
- viewer.entities.removeById('polygon');
- polygonEntity = new Cesium.Entity({
- id: 'polygon',
- polygon: {
- hierarchy: new Cesium.PolygonHierarchy(
- new Cesium.Cartesian3.fromDegreesArray(nPositions)
- ),
- material: Cesium.Color.WHITE.withAlpha(0.3),
- outline: true,
- outlineColor: Cesium.Color.RED,
- outlineWidth: 2.0,
- },
- });
- viewer.entities.add(polygonEntity)
- viewer.flyTo(polygonEntity)
- if (window.isUseDB) {
- getZdProjectById(projectInfo.id).then((res) => {
- projectInfo = res.data
- that.setSeletedReslut(projectInfo);
- }).catch((err) => {
- console.log(err)
- })
- }
- else {
- that.setSeletedReslut(projectInfo);
- }
- },
- /**
- * 根据页面切换加载地图数据 主入口
- */
- loadInitData() {
- var that = this;
- that.entities.forEach((item) => {
- viewer.entities.removeById(item.id);
- });
- that.entities = [];
- that.qsEntities.forEach((item) => {
- viewer.entities.removeById(item.id);
- })
- that.qsEntities = [];
- if (that.activePage1 == "GY") {
- if (that.activePage2 == "GYQS") {
- that.GYQSChart();
- that.GYDLChart();
- }
- // else if (that.activePage2 == "GYFC") {
- // // that.cqLocation(true, null)
- // }
- }
- else {
- if (that.activePage3 == "ZDPG") {
- that.JTDLChart();
- that.JTOwnerChart();
- that.JTUseChart();
- }
- else if (that.activePage3 == "QMPG") {
- that.QMBCChart();
- }
- }
- },
- //显示项目信息
- setSeletedReslut(projectInfo) {
- this.qmResult = {
- totalPay: projectInfo.qmResult.totalPay,
- totalMJ: projectInfo.qmResult.totalMJ,
- nzwMJ: projectInfo.qmResult.nzwMJ,
- nzwPay: projectInfo.qmResult.nzwPay,
- jjzwMJ: projectInfo.qmResult.jjzwMJ,
- jjzwPay: projectInfo.qmResult.jjzwPay,
- smMJ: projectInfo.qmResult.smMJ,
- smPay: projectInfo.qmResult.smPay,
- fieldInfos: JSON.parse(projectInfo.qmResult.fieldInfos),
- features: JSON.parse(projectInfo.qmResult.features),
- }
- this.cqResult = {
- count: projectInfo.cqResult.count,
- totalJZMJ: projectInfo.cqResult.totalJZMJ,
- totalPay: projectInfo.cqResult.totalPay,
- average: projectInfo.cqResult.average,
- gyJZMJ: projectInfo.cqResult.gyJZMJ,
- jtJZMJ: projectInfo.cqResult.jtJZMJ,
- gyCount: projectInfo.cqResult.gyCount,
- jtCount: projectInfo.cqResult.jtCount,
- gyList: JSON.parse(projectInfo.cqResult.gyList),
- jtList: JSON.parse(projectInfo.cqResult.jtList),
- gyfeatures: JSON.parse(projectInfo.cqResult.gyfeatures),
- jtfeatures: JSON.parse(projectInfo.cqResult.jtfeatures),
- fieldInfos: JSON.parse(projectInfo.cqResult.fieldInfos)
- }
- this.zdResult = {
- //国有面积
- gyMJ: projectInfo.zdResult.gyMJ,
- //集体面积
- jtMJ: projectInfo.zdResult.jtMJ,
- //征地面积
- totalZDMJ: projectInfo.zdResult.totalZDMJ,
- //总补偿
- totalPay: projectInfo.zdResult.totalPay,
- //征地补偿
- totalZDPay: projectInfo.zdResult.totalZDPay,
- //安置补偿
- totalAZPay: projectInfo.zdResult.totalAZPay,
- //国有地类及面积
- gydlList: JSON.parse(projectInfo.zdResult.gydlList),
- //地类及面积
- jtdlList: JSON.parse(projectInfo.zdResult.jtdlList),
- gyfeatures: JSON.parse(projectInfo.zdResult.gyfeatures),
- jtfeatures: JSON.parse(projectInfo.zdResult.jtfeatures),
- fieldInfos: JSON.parse(projectInfo.zdResult.fieldInfos),
- }
- this.qsResult = {
- stateUsedMJ: projectInfo.qsResult.stateUsedMJ,
- stateUsedFeatures: JSON.parse(projectInfo.qsResult.stateUsedFeatures),
- stateUsedList: JSON.parse(projectInfo.qsResult.stateUsedList),
- stateUsedFieldInfos: JSON.parse(projectInfo.qsResult.stateUsedFieldInfos),
- collectiveOwnerMJ: projectInfo.qsResult.collectiveOwnerMJ,
- collectiveOwnerFeatures: JSON.parse(projectInfo.qsResult.collectiveOwnerFeatures),
- collectiveOwnerList: JSON.parse(projectInfo.qsResult.collectiveOwnerList),
- collectiveOwnerFieldInfos: JSON.parse(projectInfo.qsResult.collectiveOwnerFieldInfos),
- collectiveUsedMJ: projectInfo.qsResult.collectiveUsedMJ,
- collectiveUsedList: JSON.parse(projectInfo.qsResult.collectiveUsedList),
- collectiveUsedFeatures: JSON.parse(projectInfo.qsResult.collectiveUsedFeatures),
- collectiveUsedFieldInfos: JSON.parse(projectInfo.qsResult.collectiveUsedFieldInfos)
- }
- this.loadInitData()
- // this.JTDLChart();
- // this.GYDLChart();
- // this.QMBCChart();
- // this.GYQSChart();
- // this.JTOwnerChart();
- // this.JTUseChart();
- },
- //删除项目
- deletProject(projectInfo) {
- var that = this
- var id = that.$layer.confirm("确定要删除吗?", {}, function () {
- delZdProject([projectInfo.id]).then((res) => {
- if (res)
- debugger
- that.$layer.close(id)
- that.$message("数据已删除!");
- that.queryProject();
- }).catch((err) => {
- console.log(err)
- })
- }, function () {
- return
- });
- },
- /**
- * 页面切换
- */
- pageClick(tab, event) {
- // var name = tab.name
- this.loadInitData();
- },
- gyPpageClick(tab, event) {
- this.loadInitData();
- },
- jtPageClick(tab, event) {
- this.loadInitData();
- },
- /**
- * 征地权属切换
- */
- qsClick(tab, event) {
- // viewer.entities.removeAll()
- this.entities.forEach((item) => {
- viewer.entities.removeById(item.id)
- })
- this.entities = []
- },
- handlePreview(file) { },
- handleRemove(file, fileList) { },
- beforeRemove(file, fileList) { },
- handleOnChange(file, fileList) { },
- /**
- * 点击导入范围
- */
- inputGeometry() {
- var element = document.getElementById('fileInput')
- // debugger
- // document.getElementsByClassName("el-upload__input")= ""
- if (element)
- element.click();
- },
- handleUpload(event) {
- var element = document.getElementById('fileInput')
- // element.files=[];
- debugger
- if (polygonEntity) {
- viewer.entities.remove(polygonEntity)
- }
- // let fileName = document.getElementsByClassName("el-upload__input")[0].value
- let fileName = event.target.files[0];
- var size = fileName.size
- if (size > 512 * 1024) {
- {
- this.$message("文件大小超限,请重新输入!");
- event.target.value = ''
- return
- }
- }
- let reader = new FileReader();
- var geojson;
- var that = this
- reader.readAsArrayBuffer(fileName);
- reader.onload = function (e) {
- debugger;
- let res = e.target.result; //ArrayBuffer
- shp(res)
- .then(function (res) {
- // self.addGeometry(res)
- geojson = res;
- console.log(geojson);
- that.addGeometry(geojson)
- })
- .catch(function (e) {
- console.log(e);
- });
- event.target.value = ''
- };
- // this.parsingZip();
- },
- /**
- * 导入范围添加图形
- */
- addGeometry(geojson) {
- var that = this;
- proj4.defs("EPSG:4490", "+proj=longlat +ellps=GRS80 +no_defs +type=crs");
- debugger
- var coordinates = geojson.features[0].geometry.coordinates;
- var box = geojson.features[0].geometry.bbox;
- var centerX = (box[0] + box[2]) / 2;
- var centerY = (box[1] + box[3]) / 2;
- var positions = [];
- that.regions = [];
- for (var i = 0; i < coordinates.length; i++) {
- var coor = coordinates[i];
- var nCoor;
- if (coor && coor.length > 0) {
- for (var j = 0; j < coor.length; j++) {
- nCoor = proj4(proj4("EPSG:4326"), proj4("EPSG:4490"), coor[j]);
- that.regions.push({ x: nCoor[0], y: nCoor[1] })
- positions.push(nCoor[0])
- positions.push(nCoor[1])
- }
- }
- }
- viewer.entities.removeById('polygon');
- polygonEntity = new Cesium.Entity({
- id: 'polygon',
- position: Cesium.Cartesian3.fromDegreesArray([
- centerX,
- centerY,
- ]),
- // classificationType: ClassificationType.TERRAIN,
- polygon: {
- hierarchy: new Cesium.PolygonHierarchy(
- new Cesium.Cartesian3.fromDegreesArray(positions)
- ),
- // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
- material: Cesium.Color.WHITE.withAlpha(0.3),
- outline: true,
- outlineColor: Cesium.Color.RED,
- outlineWidth: 2.0,
- },
- });
- that.curProjectInfo.regions = that.regions
- viewer.entities.add(polygonEntity);
- viewer.flyTo(polygonEntity)
- },
- handleExceed(files, fileList) { },
- handleChange(response, file, fileList) {
- console.log(file);
- },
- onchange() {
- console.log("上传失败");
- },
- /**
- * 上传失败
- */
- uploadError(response, file, fileList) {
- this.$message("导入失败,选择其它文件!");
- },
- /**
- * 上传成功
- */
- uploadSuccess(response, file, fileList) {
- debugger;
- console.log("上传成功");
- },
- /**
- * 读取shape zip
- */
- getShapeGeometry(response, file, fileList) {
- const geojson = shpjs("files/pandr.zip");
- },
- /**
- * 拾取实体并查询属性
- */
- pickEntity(prefix) {
- {
- var that = this
- var id = '';
- var pick
- that.tableData = [];
- if (this.sublayerid)
- that.$layer.close(that.sublayerid)
- if (handlerPolygon) {
- handlerPolygon.deactivate()
- handlerPolygon.clear();
- }
- handleInput = new Cesium.ScreenSpaceEventHandler(scene.canvas);
- handleInput.setInputAction(function (movement) {
- pick = viewer.scene.pick(movement.position);
- if (pick != null) {
- that.tableData = [];
- var fieldNames = [];
- var fieldValues = []
- id = pick.id._id
- if (id&&id.indexOf && id.indexOf(prefix) > -1) {
- fieldNames = pick.id.attributes.fieldNames;
- fieldValues = pick.id.attributes.fieldValues;
- for (var i = 0; i < fieldNames.length; i++) {
- if (
- fieldNames[i].name.toUpperCase() == "SMID" ||
- fieldNames[i].name.toUpperCase() == "SMUSERID" ||
- fieldNames[i].name.toUpperCase() == "SMAREA" ||
- fieldNames[i].name.toUpperCase() == "SMPERIMETER" ||
- fieldNames[i].name.toUpperCase() == "SMGEOMETRY" ||
- fieldNames[i].name.toUpperCase() == "OBJECTID" ||
- fieldNames[i].name.toUpperCase() == "SHAPE_LENGTH" ||
- fieldNames[i].name.toUpperCase() == "SHAPE_AREA" ||
- fieldNames[i].name.toUpperCase() == "SHAPE_LENG"
- )
- continue;
- that.tableData.push({
- name: fieldNames[i].caption,
- value: fieldValues[i],
- });
- }
- that.sublayerid = that.$layer.iframe({
- id: 'ss',
- content: {
- content: Property, //传递的组件对象
- parent: that, //当前的vue对象
- data: { tableData: that.tableData }, //props
- },
- // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
- area: ["20rem", "30rem"],
- title: "属性信息",
- maxmin: false,
- shade: false, //是否显示遮罩
- shadeClose: false, //点击遮罩是否关闭
- cancel: () => {
- //关闭事件
- // alert("关闭iframe");
- },
- });
- }
- }
- }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
- }
- },
- /**
- * 获取用地用海分类统一颜色
- */
- getLandColor(name) {
- var color = "rgb(172,255,207)";
- window.colorList.forEach((element) => {
- if (element.name.indexOf(name) > -1)
- color = element.color;
- });
- return color;
- },
- /**
- *征地补偿chart
- */
- JTDLChart() {
- var that = this;
- var chartDom = document.getElementById("JTDLChart");
- var myChart = window.echarts.init(chartDom);
- // this.zdResult.list.push({ 'dlbm': dlbmVal, 'dlmc': dlmcVal, 'mj': insertArea });
- var datas = [];
- var nameLength = 0;
- var colors = [];
- var color;
- that.zdResult.jtdlList.forEach(item => {
- datas.push({ name: item.dlmc, value: item.mj })
- color = that.getLandColor(item.dlmc)
- if (color != null)
- colors.push(color);
- })
- var option = {
- title: {
- text: '现状情况',
- subtext: '',
- top: 'top',
- left: 'center',
- textStyle: {
- color: "#FFFFFF"
- }
- },
- tooltip: {
- trigger: "item",
- },
- legend: {
- type: "scroll",
- orient: "vertical",
- right: 0,
- top: '20%',
- bottom: 20,
- radius: "55%",
- // bottom: 20,
- textStyle: {
- // fontSize: '12px',
- color: "#FFFF",
- },
- pageIconColor: "#ffffff",
- pageTextStyle: {
- color: "#ffffff"
- },
- data: datas.map((t) => t.name),
- formatter: function (name) {
- var val = datas.find((t) => t.name == name).value;
- var lastSpace = (10 - name.length) * 3;
- return name + new Array(lastSpace).join(" ") + val + "亩";
- },
- },
- color: colors, // ['#0a915d', '#bb88dd', '#6699ff', '#d5b158', '#ff6347', 'indigo', 'purple'],
- series: [
- {
- name: "征地补偿分析",
- type: "pie",
- center: ["25%", "50%"],
- radius: ["25%", "45%"],
- avoidLabelOverlap: false,
- // itemStyle: {
- // borderRadius: 10,
- // borderColor: "#fff",
- // borderWidth: 2,
- // },
- label: {
- show: false,
- position: "center",
- },
- emphasis: {
- label: {
- show: true,
- fontSize: 12,
- fontWeight: "bold",
- },
- },
- labelLine: {
- show: false,
- },
- data: datas,
- },
- ],
- };
- myChart.clear()
- myChart.setOption(option);
- var showOrHide = false;
- that.JTDLLoad(null, showOrHide);
- myChart.on("legendselectchanged", function (parmas) {
- that.pickEntity('ZDJTYD');
- var name = parmas.name
- showOrHide = parmas.selected[name]
- that.JTDLLoad(name, showOrHide);
- });
- },
- /**
- * 集体地类展示
- * @param {*} name
- */
- JTDLLoad(name, showOrHide) {
- var that = this;
- var fieldValues = [];
- var dlmcIndex = -1;
- var geometry;
- var dlmcFld = window.ZSBC.ZDBCJS.DLTB.dlmc.field;
- dlmcIndex = that.getfldIndex(that.zdResult.fieldInfos, dlmcFld);
- var dlmc = "";
- var features = that.zdResult.jtfeatures;
- var attributes = {};
- var color = "";
- var colorArr = [3];
- for (var i = 0; i < features.length; i++) {
- fieldValues = features[i].fieldValues;
- if (dlmcIndex > -1) {
- dlmc = fieldValues[dlmcIndex];
- }
- if (name != null && dlmc != name)
- continue;
- var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
- var smid = features[i].fieldValues[simIndex];
- var ff = that.entities.find(t => t.id == "ZDJTYD_" + smid)
- var entity;
- if (ff != null) {
- entity = viewer.entities.getById("ZDJTYD_" + smid)
- if (entity != undefined)
- entity.show = showOrHide;
- }
- else {
- var dlColor = that.getLandColor(dlmc);
- var color = dlColor.replace("rgb", "")
- .replace("(", "")
- .replace(")", "");
- var colorArr = color.split(",");
- attributes = {
- fieldNames: that.zdResult.fieldInfos,
- fieldValues: features[i].fieldValues,
- };
- geometry = features[i].geometry;
- var positions = [];
- for (var j = 0; j < geometry.points.length; j++) {
- positions.push(geometry.points[j].x);
- positions.push(geometry.points[j].y);
- }
- var entity = new Cesium.Entity({
- id: "ZDJTYD_" + smid,
- position: Cesium.Cartesian3.fromDegreesArray([
- geometry.center.x,
- geometry.center.y,
- ]),
- show: true,
- polygon: {
- hierarchy: new Cesium.PolygonHierarchy(
- new Cesium.Cartesian3.fromDegreesArray(positions)
- ),
- material: new Cesium.Color(
- parseInt(colorArr[0]) / 255,
- parseInt(colorArr[1]) / 255,
- parseInt(colorArr[2]) / 255,
- 1
- ),
- outline: true,
- outlineColor: Cesium.Color.BLACK,
- outlineWidth: 1.5,
- },
- });
- entity.show = showOrHide;
- entity.attributes = attributes;
- that.entities.push({ type: "ZDJTYD", id: "ZDJTYD_" + smid });
- viewer.entities.add(entity);
- }
- }
- },
- /**
- *国有chart
- */
- GYDLChart() {
- var that = this;
- var chartDom = document.getElementById("GYDLChart");
- var myChart = window.echarts.init(chartDom);
- var datas = [];
- var nameLength = 0;
- var colors = []
- for (var i = 0; i < that.zdResult.gydlList.length; i++) {
- datas.push({
- value: parseFloat((that.zdResult.gydlList[i].mj).toFixed(2)),
- name: that.zdResult.gydlList[i].dlmc,
- });
- var color = that.getLandColor(that.zdResult.gydlList[i].dlmc);
- colors.push(color);
- }
- var option = {
- title: {
- text: '现状情况', //国有所有权信息
- subtext: '',
- top: 'top',
- left: 'center',
- textStyle: {
- color: "#FFFFFF"
- }
- },
- tooltip: {
- trigger: "item",
- },
- legend: {
- type: "scroll",
- orient: "vertical",
- right: 0,
- top: '20%',
- bottom: 20,
- radius: "55%",
- // bottom: 20,
- textStyle: {
- // fontSize: '12px',
- color: "#FFFF",
- },
- pageIconColor: "#ffffff",
- pageTextStyle: {
- color: "#ffffff"
- },
- data: datas.map((t) => t.name),
- formatter: function (name) {
- var val = datas.find((t) => t.name == name).value;
- var spname = '';
- if (name.length > 13)
- spname = name.substring(0, 12) + val + '亩\n' + name.substring(13, name.length)
- else {
- spname = name
- var lastSpace = (13 - spname.length) * 3;
- if (lastSpace < 0)
- lastSpace = 0
- spname += new Array(lastSpace).join(" ") + val + "亩";
- }
- return spname
- },
- },
- color: colors,
- series: [
- {
- name: "国有征地权属分析",
- type: "pie",
- center: ["25%", "50%"],
- radius: ["25%", "45%"],
- avoidLabelOverlap: false,
- // itemStyle: {
- // borderRadius: 1,
- // borderColor: "#fff",
- // borderWidth: 2,
- // },
- label: {
- show: false,
- position: "center",
- },
- emphasis: {
- label: {
- show: true,
- fontSize: 12,
- fontWeight: "bold",
- },
- },
- labelLine: {
- show: false,
- },
- data: datas,
- },
- ],
- };
- myChart.setOption(option);
- var shaowOrHide = false;
- that.GYDLLoad(null, shaowOrHide);
- myChart.on("legendselectchanged", function (parmas) {
- that.pickEntity('ZDGYDL');
- var name = parmas.name
- shaowOrHide = parmas.selected[name]
- that.GYDLLoad(name, shaowOrHide);
- });
- },
- /**
- * 国有地类展示
- * @param {*} datas
- * @param {*} name
- * @param {*} shaowOrHide
- */
- GYDLLoad(name, shaowOrHide) {
- var that = this;
- var color = "";
- // var colors = window.colorList;
- var fieldValues = [];
- var dlmcIndex = -1;
- var dlmcFld = window.ZSBC.ZDBCJS.DLTB.dlmc.field;
- dlmcIndex = that.getfldIndex(that.zdResult.fieldInfos, dlmcFld);
- var dlmc = "";
- var geometry;
- var entity;
- var features = that.zdResult.gyfeatures;
- var attributes = {};
- for (var i = 0; i < features.length; i++) {
- fieldValues = features[i].fieldValues;
- if (dlmcIndex > -1) {
- dlmc = fieldValues[dlmcIndex];
- }
- if (name != null && dlmc != name)
- continue;
- var dlColor = that.getLandColor(dlmc);
- var color = dlColor.replace("rgb", "")
- .replace("(", "")
- .replace(")", "");
- var colorArr = color.split(",");
- var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
- var smid = features[i].fieldValues[simIndex]
- var ff = that.entities.find(t => t.id == "ZDGYDL_" + smid)
- if (ff != null) {
- entity = viewer.entities.getById("ZDGYDL_" + smid)
- if (entity != undefined)
- entity.show = shaowOrHide;
- }
- else {
- attributes = {
- fieldNames: that.zdResult.fieldInfos,
- fieldValues: features[i].fieldValues,
- };
- geometry = features[i].geometry;
- fieldValues = features[i].fieldValues;
- // if (qsdwIndex > -1) {
- // qsdw = fieldValues[qsdwIndex];
- // }
- var positions = [];
- for (var j = 0; j < geometry.points.length; j++) {
- positions.push(geometry.points[j].x);
- positions.push(geometry.points[j].y);
- }
- entity = new Cesium.Entity({
- id: "ZDGYDL_" + smid,
- position: Cesium.Cartesian3.fromDegreesArray([
- geometry.center.x,
- geometry.center.y,
- ]),
- show: true,
- // classificationType: ClassificationType.TERRAIN,
- polygon: {
- hierarchy: new Cesium.PolygonHierarchy(
- new Cesium.Cartesian3.fromDegreesArray(positions)
- ),
- // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
- material: new Cesium.Color(
- parseInt(colorArr[0]) / 255,
- parseInt(colorArr[1]) / 255,
- parseInt(colorArr[2]) / 255,
- 1
- ),
- outline: true,
- outlineColor: Cesium.Color.BLACK,
- outlineWidth: 1.5,
- },
- });
- entity.show = shaowOrHide;
- entity.attributes = attributes;
- that.entities.push({ type: name, id: "ZDGYDL_" + smid });
- viewer.entities.add(entity);
- }
- }
- },
- /**
- * 青苗补偿chart
- */
- QMBCChart() {
- var that = this;
- var chartDom1 = document.getElementById("QMMJChart");
- var myChart1 = window.echarts.init(chartDom1);
- var smfl = window.ZSBC.ZDBCJS.DLTB.smfl.fl;
- var nzwfl = window.ZSBC.ZDBCJS.DLTB.nzwfl.fl;
- var jjzwfl = window.ZSBC.ZDBCJS.DLTB.jjzwfl.fl;
- var color3 = window.ZSBC.ZDBCJS.DLTB.smfl.color;
- var color2 = window.ZSBC.ZDBCJS.DLTB.jjzwfl.color;
- var color1 = window.ZSBC.ZDBCJS.DLTB.nzwfl.color;
- var colors = [color1, color2, color3];
- var datas1 = [];
- debugger
- if (that.qmResult) {
- datas1 = [
- { value: this.qmResult.nzwMJ, name: nzwfl },
- { value: this.qmResult.jjzwMJ, name: jjzwfl },
- { value: this.qmResult.smMJ, name: smfl },
- ];
- } else {
- datas1 = [
- { value: 0.0, name: nzwfl },
- { value: 0.0, name: jjzwfl },
- { value: 0.0, name: smfl },
- ];
- }
- var option1 = {
- title: {
- text: "农作物补偿面积",
- // subtext: '',
- left: "center",
- textStyle: {
- fontSize: "16",
- color: "#FFFF",
- },
- },
- tooltip: {
- trigger: "item",
- },
- legend: {
- orient: "vertical",
- right: 0,
- top: "20%",
- radius: "55%",
- // bottom: 20,
- textStyle: {
- // fontSize: '1rem',
- color: "#FFFF",
- }, pageIconColor: "#ffffff",
- pageTextStyle: {
- color: "#ffffff"
- },
- data: datas1.map((t) => t.name),
- formatter: function (name) {
- var val = datas1.find((t) => t.name == name).value;
- return (
- name + new Array(20 - name.length * 3).join(" ") + val + "亩"
- );
- },
- },
- color: colors,
- series: [
- {
- name: "征地补偿分析",
- type: "pie",
- center: ["25%", "45%"],
- radius: ["50%", "70%"],
- avoidLabelOverlap: false,
- // itemStyle: {
- // borderRadius: 1,
- // borderColor: "#fff",
- // borderWidth: 2,
- // },
- label: {
- show: false,
- position: "center",
- },
- emphasis: {
- label: {
- show: true,
- fontSize: 12,
- fontWeight: "bold",
- },
- },
- labelLine: {
- show: false,
- },
- data: datas1,
- },
- ],
- };
- myChart1.setOption(option1);
- var showOrHide = false;
- that.QMBCLoad(null, showOrHide)
- myChart1.on("legendselectchanged", function (parmas) {
- that.pickEntity('ZDQMBC');
- var name = parmas.name
- showOrHide = parmas.selected[name]
- that.QMBCLoad(name, showOrHide)
- });
- var chartDom2 = document.getElementById("QMFYChart");
- var myChart2 = window.echarts.init(chartDom2);
- var datas2 = [];
- debugger
- if (that.qmResult) {
- datas2 = [
- { value: that.qmResult.nzwPay, name: nzwfl },
- { value: that.qmResult.jjzwPay, name: jjzwfl },
- { value: that.qmResult.smPay, name: smfl },
- ];
- } else {
- datas2 = [
- { value: 0.0, name: nzwfl },
- { value: 0.0, name: jjzwfl },
- { value: 0.0, name: smfl },
- ];
- }
- var option2 = {
- title: {
- text: "农作物补偿费用",
- subtext: "",
- left: "center",
- textStyle: {
- fontSize: "16",
- color: "#FFFF",
- },
- },
- tooltip: {
- trigger: "item",
- },
- legend: {
- orient: "vertical",
- right: 0,
- top: "20%",
- radius: "55%",
- // bottom: 20,
- textStyle: {
- // fontSize: '12px',
- color: "#FFFF",
- },
- pageIconColor: "#ffffff",
- pageTextStyle: {
- color: "#ffffff"
- },
- data: datas2.map((t) => t.name),
- formatter: function (name) {
- var val = datas2.find((t) => t.name == name).value;
- return (
- name + new Array(20 - name.length * 3).join(" ") + val + "万元"
- );
- },
- },
- color: colors,
- series: [
- {
- name: "征地补偿分析",
- type: "pie",
- center: ["25%", "45%"],
- radius: ["50%", "70%"],
- avoidLabelOverlap: false,
- // itemStyle: {
- // borderRadius: 1,
- // borderColor: "#fff",
- // borderWidth: 2,
- // },
- label: {
- show: false,
- position: "center",
- },
- emphasis: {
- label: {
- show: true,
- fontSize: 12,
- fontWeight: "bold",
- },
- },
- labelLine: {
- show: false,
- },
- data: datas2,
- },
- ],
- };
- myChart2.setOption(option2);
- },
- QMBCLoad(name, showOrHide) {
- var that = this;
- var dlmcIndex = -1;
- debugger;
- var dlmcFld = window.ZSBC.ZDBCJS.DLTB.dlmc.field;
- dlmcIndex = that.getfldIndex(that.qmResult.fieldInfos, dlmcFld);
- // var smfl = window.ZSBC.ZDBCJS.DLTB.smfl.dlmc;
- // var nzwfl = window.ZSBC.ZDBCJS.DLTB.nzwfl.dlmc;
- // var jjzwfl = window.ZSBC.ZDBCJS.DLTB.jjzwfl.dlmc;
- var dlmc = "";
- var geometry;
- var color3 = window.ZSBC.ZDBCJS.DLTB.smfl.color;
- var color2 = window.ZSBC.ZDBCJS.DLTB.jjzwfl.color;
- var color1 = window.ZSBC.ZDBCJS.DLTB.nzwfl.color;
- var curDLMC;
- var attributes;
- var fieldValues;
- var color;
- var features = that.qmResult.features;
- for (var i = 0; i < features.length; i++) {
- geometry = features[i].geometry;
- fieldValues = features[i].fieldValues;
- if (dlmcIndex > -1) {
- dlmc = fieldValues[dlmcIndex];
- }
- if (name != null) {
- if (name == window.ZSBC.ZDBCJS.DLTB.smfl.fl) {
- curDLMC = window.ZSBC.ZDBCJS.DLTB.smfl.dlmc
- }
- else if (name == window.ZSBC.ZDBCJS.DLTB.nzwfl.fl) {
- curDLMC = window.ZSBC.ZDBCJS.DLTB.nzwfl.dlmc
- }
- else if (name == window.ZSBC.ZDBCJS.DLTB.jjzwfl.fl) {
- curDLMC = window.ZSBC.ZDBCJS.DLTB.jjzwfl.dlmc
- }
- if (curDLMC.indexOf(dlmc) == -1)
- continue;
- }
- if (window.ZSBC.ZDBCJS.DLTB.nzwfl.dlmc.indexOf(dlmc) > -1)
- color = color1
- else if (window.ZSBC.ZDBCJS.DLTB.jjzwfl.dlmc.indexOf(dlmc) > -1)
- color = color2
- else if (window.ZSBC.ZDBCJS.DLTB.smfl.dlmc.indexOf(dlmc) > -1)
- color = color3
- color = color.replace("rgb", "")
- .replace("(", "")
- .replace(")", "");
- var colorArr = color.split(",");
- var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
- var smid = features[i].fieldValues[simIndex]
- var ff = that.entities.find(t => t.id == "ZDQMBC_" + smid)
- if (ff != null) {
- var entity = viewer.entities.getById("ZDQMBC_" + smid)
- if (entity != undefined)
- entity.show = showOrHide;
- }
- else {
- var positions = [];
- for (var j = 0; j < geometry.points.length; j++) {
- positions.push(geometry.points[j].x);
- positions.push(geometry.points[j].y);
- }
- var entity = new Cesium.Entity({
- id: "ZDQMBC_" + smid,
- position: Cesium.Cartesian3.fromDegreesArray([
- geometry.center.x,
- geometry.center.y,
- ]),
- // classificationType: ClassificationType.TERRAIN,
- polygon: {
- hierarchy: new Cesium.PolygonHierarchy(
- new Cesium.Cartesian3.fromDegreesArray(positions)
- ),
- // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
- material: new Cesium.Color(
- parseInt(colorArr[0]) / 255,
- parseInt(colorArr[1]) / 255,
- parseInt(colorArr[2]) / 255,
- 1
- ),
- outline: true,
- outlineColor: Cesium.Color.BLACK,
- outlineWidth: 1.5,
- },
- });
- attributes = {
- fieldNames: that.qmResult.fieldInfos,
- fieldValues: features[i].fieldValues,
- };
- entity.show = showOrHide;
- entity.attributes = attributes;
- that.entities.push({ type: "QM", id: "ZDQMBC_" + smid });
- viewer.entities.add(entity);
- }
- }
- },
- /**
- * 拆迁补偿chart
- */
- CQBCChart() {
- // var chartDom = document.getElementById('CQBCChart');
- // var myChart = window.echarts.init(chartDom);
- var item = {
- id: smid,
- smid: smid,
- cqr: cqrVal,
- jg: fwjgVal,
- fwdj: fwdjVal,
- floor: floorVal,
- jzmj: jzmjVal,
- zdmj: zdmjVal,
- address: addressVal,
- pay: pay,
- single: BZ,
- };
- that.cqResult.list.push(item);
- that.cqResult.totalJZMJ += jzmjVal;
- that.cqResult.totalPay += pay;
- },
- /**
- * 国有权属
- */
- GYQSChart() {
- var that = this;
- var chartDom = document.getElementById("GYQSChart");
- var myChart = window.echarts.init(chartDom);
- that.gyqsChartdatas = [];
- var nameLength = 0;
- var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
- // ["rgb(245,248,220)", "rgb(191,233,170)", "rgb(104,177,103)", "rgb(205,245,122)",
- // "rgb(101,205,170)",
- // "rgb(216,215,159)",
- // "rgb(255,255,45)",
- // "rgb(255,211,128)"];
- var color = "";
- var qsList = [];
- for (var i = 0; i < that.qsResult.stateUsedList.length; i++) {
- that.gyqsChartdatas.push({
- value: Number(that.qsResult.stateUsedList[i].mj.toFixed(2)),
- name: that.qsResult.stateUsedList[i].qsdwmc,
- });
- }
- var option = {
- title: {
- text: '权属信息', //国有所有权信息
- subtext: '',
- top: 'top',
- left: 'center',
- textStyle: {
- color: "#FFFFFF"
- }
- },
- tooltip: {
- trigger: "item",
- },
- legend: {
- type: "scroll",
- orient: "vertical",
- right: 0,
- top: '20%',
- bottom: 20,
- radius: "55%",
- // bottom: 20,
- textStyle: {
- // fontSize: '12px',
- color: "#FFFF",
- },
- pageIconColor: "#ffffff",
- pageTextStyle: {
- color: "#ffffff"
- },
- data: that.gyqsChartdatas.map((t) => t.name),
- formatter: function (name) {
- var val = that.gyqsChartdatas.find((t) => t.name == name).value;
- var spname = '';
- if (name.length > 13) {
- spname = name.substring(0, 12) + val + '亩\n' + name.substring(13, name.length)
- }
- else {
- spname = name
- var lastSpace = (13 - spname.length) * 3;
- if (lastSpace < 0)
- lastSpace = 0
- spname += new Array(lastSpace).join(" ") + val + '亩';
- }
- return spname
- },
- // itemStyle: {
- // borderType: 'solid',
- // borderWidth: 1,
- // borderColor: '#ff00ff' //'rgb(255,0,255)'
- // },
- // pageIconColor:"#ffffff"
- },
- color: colors,
- series: [
- {
- name: "",
- type: "pie",
- center: ["25%", "50%"],
- radius: ["35%", "50%"],
- avoidLabelOverlap: false,
- itemStyle: {
- borderRadius: 0,
- borderColor: "#ff00ff",
- borderWidth: 1,
- borderType: 'solid',
- },
- label: {
- show: false,
- position: "center",
- },
- emphasis: {
- label: {
- show: true,
- fontSize: 12,
- fontWeight: "bold",
- },
- },
- labelLine: {
- show: false,
- },
- data: that.gyqsChartdatas,
- },
- ],
- };
- myChart.clear();
- myChart.setOption(option);
- that.GYQSLoad(that.gyqsChartdatas, null, false);
- myChart.on("legendselectchanged", function (parmas) {
- that.pickEntity('ZDGYQS');
- var name = parmas.name
- var showOrHide = parmas.selected[name]
- // var index = Object.keys(parmas.selected).findIndex(t => t == name)
- that.GYQSLoad(that.gyqsChartdatas, name, showOrHide);
- });
- },
- GYQSLoad(datas, name, showOrHide) {
- var that = this;
- //国有信息
- var stateUsedfldVal = "";
- var stateUsedfld = window.ZSBC.ZDBCJS.StateUsed.ownerfld;
- var stateUsedIndex = that.getfldIndex(that.qsResult.stateUsedFieldInfos, stateUsedfld);
- var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
- var fieldValues = [];
- var entity;
- var geometry;
- var features = that.qsResult.stateUsedFeatures;
- var attributes = {};
- for (var i = 0; i < features.length; i++) {
- fieldValues = features[i].fieldValues;
- if (stateUsedIndex > -1) {
- stateUsedfldVal = fieldValues[stateUsedIndex];
- }
- if (name != null && stateUsedfldVal != name)
- continue;
- var index = datas.findIndex(t => t.name == stateUsedfldVal);
- var mod = index % colors.length;
- var color = colors[mod].replace("rgb", "")
- .replace("(", "")
- .replace(")", "");
- var colorArr = color.split(",");
- var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
- var smid = features[i].fieldValues[simIndex]
- var ff = that.qsEntities.find(t => t.id == "ZDGYQS_" + smid)
- if (ff != null) {
- entity = viewer.entities.getById("ZDGYQS_" + smid)
- if (entity != undefined)
- entity.show = showOrHide;
- }
- else {
- attributes = {
- fieldNames: that.zdResult.fieldInfos,
- fieldValues: features[i].fieldValues,
- };
- geometry = features[i].geometry;
- fieldValues = features[i].fieldValues;
- let point3ds = [];
- let pointholes = [];
- let startindex = 0;
- for (
- let index = 0;
- index < geometry.parts.length;
- index++
- ) {
- let thisps = [];
- const endindex = startindex + geometry.parts[index];
- let geometryPoints = geometry.points.slice(
- startindex,
- endindex
- );
- for (
- let pointindex = 0;
- pointindex < geometryPoints.length;
- pointindex++
- ) {
- const point = geometryPoints[pointindex];
- thisps.push(point.x);
- thisps.push(point.y);
- }
- if (geometry.partTopo[index] === 1) {
- point3ds.push(Cesium.Cartesian3.fromDegreesArray(thisps));
- } else {
- pointholes.push(Cesium.Cartesian3.fromDegreesArray(thisps));
- }
- startindex = endindex;
- }
- if (point3ds.length > 0 && pointholes.length > 0) {
- let holes = [];
- pointholes.forEach((hole) => {
- holes.push({ positions: hole });
- });
- entity = new Cesium.Entity({
- id: "ZDGYQS_" + smid,
- polygon: {
- hierarchy: {
- // Cesium.PolygonHierarchy
- positions: point3ds[0],
- holes: holes, // Cesium.PolygonHierarchy 数组
- },
- material: new Cesium.Color(
- parseInt(colorArr[0]) / 255,
- parseInt(colorArr[1]) / 255,
- parseInt(colorArr[2]) / 255,
- 0.2
- ),
- outline: true,
- outlineColor: Cesium.Color.DEEPPINK,
- outlineWidth: 1.5,
- },
- });
- } else if (point3ds.length > 0) {
- entity = new Cesium.Entity({
- id: "ZDGYQS_" + smid,
- polygon: {
- hierarchy: point3ds[0],
- material: new Cesium.Color(
- parseInt(colorArr[0]) / 255,
- parseInt(colorArr[1]) / 255,
- parseInt(colorArr[2]) / 255,
- 0.2
- ),
- outline: true,
- outlineColor: Cesium.Color.DEEPPINK,
- outlineWidth: 1.5,
- },
- });
- }
- entity.show = showOrHide;
- entity.attributes = attributes;
- that.qsEntities.push({ type: name, id: "ZDGYQS_" + smid });
- viewer.entities.add(entity);
- }
- }
- },
- /**
- * 集体使用权
- */
- JTUseChart() {
- var that = this;
- var chartDom = document.getElementById("JTUSEChart");
- var myChart = window.echarts.init(chartDom);
- var datas = [];
- var nameLength = 0;
- var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
- for (var i = 0; i < that.qsResult.collectiveUsedList.length; i++) {
- datas.push({
- value: parseFloat(that.qsResult.collectiveUsedList[i].mj.toFixed(2)),
- name: that.qsResult.collectiveUsedList[i].qsdwmc,
- });
- }
- var option = {
- title: {
- text: '集体使用权信息',
- subtext: '',
- top: 'top',
- left: 'center',
- textStyle: {
- color: "#FFFFFF"
- }
- },
- tooltip: {
- trigger: "item",
- },
- legend: {
- type: "scroll",
- orient: "vertical",
- right: 0,
- top: '20%',
- bottom: 20,
- radius: "55%",
- itemStyle: {
- // color: colors[0],
- borderColor: 'rgb(,0,255)',
- borderWidth: 1
- },
- pageIconColor: "#ffffff",
- pageTextStyle: {
- color: "#ffffff"
- },
- // bottom: 20,
- textStyle: {
- // fontSize: '12px',
- color: "#FFFF",
- },
- data: datas.map((t) => t.name),
- formatter: function (name) {
- var val = datas.find((t) => t.name == name).value;
- var spname = '';
- // nameLength = Math.ceil(nameLength / 2)
- if (name.length > 13)
- spname = name.substring(0, 12) + val + "亩" + '\n' + name.substring(13, name.length)
- else {
- spname = name
- var lastSpace = (13 - spname.length) * 3;
- if (lastSpace < 0)
- lastSpace = 0
- spname += new Array(lastSpace).join(" ") + val + "亩" + '\n';
- }
- return spname
- },
- },
- color: colors,
- series: [
- {
- name: "集体使用权信息",
- type: "pie",
- center: ["25%", "50%"],
- radius: ["25%", "45%"],
- avoidLabelOverlap: false,
- // itemStyle: {
- // borderRadius: 10,
- // borderWidth: 1,
- // },
- label: {
- show: false,
- position: "center",
- },
- emphasis: {
- label: {
- show: true,
- fontSize: 12,
- fontWeight: "bold",
- },
- },
- labelLine: {
- show: false,
- },
- data: datas,
- },
- ],
- };
- myChart.clear();
- myChart.setOption(option);
- var shaowOrHide = false;
- that.JTUseLoad(datas, null, shaowOrHide)
- myChart.on("legendselectchanged", function (parmas) {
- that.pickEntity('ZDJTUSE');
- var name = parmas.name
- shaowOrHide = parmas.selected[name]
- that.JTUseLoad(datas, name, shaowOrHide)
- });
- },
- JTUseLoad(datas, name, shaowOrHide) {
- var that = this;
- // //集体使用信息
- var collectiveUsedfldVal = "";
- var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
- var collectiveUsedfld = window.ZSBC.ZDBCJS.CollectiveUsed.ownerfld;
- var collectiveUsedIndex = that.getfldIndex(that.qsResult.collectiveUsedFieldInfos, collectiveUsedfld);
- var color = "";
- var fieldValues = [];
- var geometry;
- var entity;
- var features = that.qsResult.collectiveUsedFeatures;
- var attributes = {};
- for (var i = 0; i < features.length; i++) {
- fieldValues = features[i].fieldValues;
- if (collectiveUsedIndex > -1) {
- collectiveUsedfldVal = fieldValues[collectiveUsedIndex];
- }
- if (name != null && collectiveUsedfldVal != name)
- continue;
- var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
- var smid = features[i].fieldValues[simIndex]
- var ff = that.qsEntities.find(t => t.id == "ZDJTUSE_" + smid)
- if (ff != null) {
- entity = viewer.entities.getById("ZDJTUSE_" + smid)
- if (entity != undefined)
- entity.show = shaowOrHide;
- }
- else {
- var index = datas.findIndex(t => t.name == collectiveUsedfldVal)
- var mod = index % colors.length
- var color = colors[mod]
- if (color == null)
- continue;
- color = color.replace("rgb", "")
- .replace("(", "")
- .replace(")", "");
- var colorArr = color.split(",");
- if (colorArr == null || colorArr.length == 0)
- continue;
- attributes = {
- fieldNames: that.zdResult.fieldInfos,
- fieldValues: features[i].fieldValues,
- };
- geometry = features[i].geometry;
- fieldValues = features[i].fieldValues;
- let point3ds = [];
- let pointholes = [];
- let startindex = 0;
- for (
- let index = 0;
- index < geometry.parts.length;
- index++
- ) {
- let thisps = [];
- const endindex = startindex + geometry.parts[index];
- let geometryPoints = geometry.points.slice(
- startindex,
- endindex
- );
- for (
- let pointindex = 0;
- pointindex < geometryPoints.length;
- pointindex++
- ) {
- const point = geometryPoints[pointindex];
- thisps.push(point.x);
- thisps.push(point.y);
- }
- if (geometry.partTopo[index] === 1) {
- point3ds.push(Cesium.Cartesian3.fromDegreesArray(thisps));
- } else {
- pointholes.push(Cesium.Cartesian3.fromDegreesArray(thisps));
- }
- startindex = endindex;
- }
- if (point3ds.length > 0 && pointholes.length > 0) {
- let holes = [];
- pointholes.forEach((hole) => {
- holes.push({ positions: hole });
- });
- entity = new Cesium.Entity({
- id: "ZDJTUSE_" + smid,
- polygon: {
- hierarchy: {
- // Cesium.PolygonHierarchy
- positions: point3ds[0],
- holes: holes, // Cesium.PolygonHierarchy 数组
- },
- material: new Cesium.Color(
- parseInt(colorArr[0]) / 255,
- parseInt(colorArr[1]) / 255,
- parseInt(colorArr[2]) / 255,
- 0.3
- ),
- outline: true,
- outlineColor: Cesium.Color.FUCHSIA,
- outlineWidth: 1.5,
- },
- });
- } else if (point3ds.length > 0) {
- entity = new Cesium.Entity({
- id: "ZDJTUSE_" + smid,
- polygon: {
- hierarchy: point3ds[0],
- material: new Cesium.Color(
- parseInt(colorArr[0]) / 255,
- parseInt(colorArr[1]) / 255,
- parseInt(colorArr[2]) / 255,
- 0.3
- ),
- outline: true,
- outlineColor: Cesium.Color.FUCHSIA,
- outlineWidth: 1.5,
- },
- });
- }
- entity.show = shaowOrHide;
- entity.attributes = attributes;
- that.qsEntities.push({ type: name, id: "ZDJTUSE_" + smid });
- viewer.entities.add(entity);
- }
- }
- },
- /**
- * 集体所有权
- */
- JTOwnerChart() {
- var that = this;
- var chartDom = document.getElementById("JTOWNERChart");
- var myChart = window.echarts.init(chartDom);
- var datas = [];
- var nameLength = 0;
- var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
- var qsList = [];
- for (var i = 0; i < that.qsResult.collectiveOwnerList.length; i++) {
- // var name = that.qsResult.collectiveUsedList[i].qsdwmc;
- datas.push({
- value: parseFloat(that.qsResult.collectiveOwnerList[i].mj.toFixed(2)),
- name: that.qsResult.collectiveOwnerList[i].qsdwmc,
- });
- }
- var option = {
- title: {
- text: '集体所有权信息',
- subtext: '',
- top: 'top',
- left: 'center',
- textStyle: {
- color: "#FFFFFF"
- }
- },
- tooltip: {
- trigger: "item",
- },
- legend: {
- type: "scroll",
- orient: "vertical",
- right: 0,
- top: '20%',
- bottom: 20,
- radius: "55%",
- // bottom: 20,
- textStyle: {
- // fontSize: '12px',
- color: "#FFFF",
- },
- pageIconColor: "#ffffff",
- pageTextStyle: {
- color: "#ffffff"
- },
- data: datas.map((t) => t.name),
- formatter: function (name) {
- var val = datas.find((t) => t.name == name).value;
- var spname = '';
- // nameLength = Math.ceil(nameLength / 2)
- if (name.length > 13)
- spname = name.substring(0, 12) + val + '亩\n' + name.substring(13, name.length) //+ val + "个"
- else {
- spname = name
- var lastSpace = (13 - spname.length) * 3;
- if (lastSpace < 0)
- lastSpace = 0
- spname += new Array(lastSpace).join(" ") + val + '亩';
- }
- return spname
- },
- itemStyle: {
- borderWidth: 1,
- borderColor: 'rgb(0,0,255)'
- },
- },
- color: colors,
- series: [
- {
- name: "集体所有权属分析",
- type: "pie",
- center: ["25%", "50%"],
- radius: ["25%", "45%"],
- avoidLabelOverlap: false,
- // itemStyle: {
- // borderRadius: 10,
- // borderColor: "#fff",
- // borderWidth: 2,
- // },
- label: {
- show: false,
- position: "center",
- },
- emphasis: {
- label: {
- show: true,
- fontSize: 12,
- fontWeight: "bold",
- },
- },
- labelLine: {
- show: false,
- },
- data: datas,
- },
- ],
- };
- var showOrHide = false;
- that.JTOwnerLoad(datas, null, showOrHide);
- myChart.clear();
- myChart.setOption(option);
- myChart.on("legendselectchanged", function (parmas) {
- that.pickEntity('ZDJTOWNER');
- var name = parmas.name
- showOrHide = parmas.selected[name]
- that.JTOwnerLoad(datas, name, showOrHide);
- });
- },
- JTOwnerLoad(datas, name, showOrHide) {
- var that = this;
- var color = "";
- var fieldValues = [];
- var geometry;
- var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
- var entity;
- var features = that.qsResult.collectiveOwnerFeatures;
- var attributes = {};
- // //集体使用信息
- var collectiveUsedownerfldVal = "";
- var collectiveUsedownerfld = window.ZSBC.ZDBCJS.CollectiveOwner.ownerfld;
- var collectiveUsedownerIndex = that.getfldIndex(that.qsResult.collectiveOwnerFieldInfos, collectiveUsedownerfld);
- for (var i = 0; i < features.length; i++) {
- fieldValues = features[i].fieldValues;
- if (collectiveUsedownerIndex > -1) {
- collectiveUsedownerfldVal = fieldValues[collectiveUsedownerIndex];
- }
- if (name != null && collectiveUsedownerfldVal != name)
- continue;
- var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
- var smid = features[i].fieldValues[simIndex]
- var ff = that.qsEntities.find(t => t.id == "ZDJTOWNER_" + smid)
- if (ff != null) {
- entity = viewer.entities.getById("ZDJTOWNER_" + smid)
- if (entity != undefined)
- entity.show = showOrHide;
- }
- else {
- attributes = {
- fieldNames: that.zdResult.fieldInfos,
- fieldValues: features[i].fieldValues,
- };
- geometry = features[i].geometry;
- fieldValues = features[i].fieldValues;
- var index = datas.findIndex(t => t.name == collectiveUsedownerfldVal)
- var mod = index % colors.length
- var color = colors[mod]
- if (color == null)
- continue;
- color = color.replace("rgb", "")
- .replace("(", "")
- .replace(")", "");
- var colorArr = color.split(",");
- if (colorArr == null || colorArr.length == 0)
- continue;
- let point3ds = [];
- let pointholes = [];
- let startindex = 0;
- for (
- let index = 0; index < geometry.parts.length; index++) {
- let thisps = [];
- const endindex = startindex + geometry.parts[index];
- let geometryPoints = geometry.points.slice(
- startindex,
- endindex
- );
- for (
- let pointindex = 0;
- pointindex < geometryPoints.length;
- pointindex++
- ) {
- const point = geometryPoints[pointindex];
- thisps.push(point.x);
- thisps.push(point.y);
- }
- if (geometry.partTopo[index] === 1) {
- point3ds.push(Cesium.Cartesian3.fromDegreesArray(thisps));
- } else {
- pointholes.push(Cesium.Cartesian3.fromDegreesArray(thisps));
- }
- startindex = endindex;
- }
- if (point3ds.length > 0 && pointholes.length > 0) {
- let holes = [];
- pointholes.forEach((hole) => {
- holes.push({ positions: hole });
- });
- entity = new Cesium.Entity({
- id: "ZDJTOWNER_" + smid,
- polygon: {
- hierarchy: {
- // Cesium.PolygonHierarchy
- positions: point3ds[0],
- holes: holes, // Cesium.PolygonHierarchy 数组
- },
- material: new Cesium.Color(
- parseInt(colorArr[0]) / 255,
- parseInt(colorArr[1]) / 255,
- parseInt(colorArr[2]) / 255,
- 0.3
- ),
- outline: true,
- outlineColor: Cesium.Color.FUCHSIA,
- outlineWidth: 1.5,
- },
- });
- } else if (point3ds.length > 0) {
- entity = new Cesium.Entity({
- id: "ZDJTOWNER_" + smid,
- polygon: {
- hierarchy: point3ds[0],
- material: new Cesium.Color(
- parseInt(colorArr[0]) / 255,
- parseInt(colorArr[1]) / 255,
- parseInt(colorArr[2]) / 255,
- 0.3
- ),
- outline: true,
- outlineColor: Cesium.Color.FUCHSIA,
- outlineWidth: 1.5,
- },
- });
- }
- entity.show = showOrHide
- entity.attributes = attributes;
- that.qsEntities.push({ type: name, id: "ZDJTOWNER_" + smid });
- viewer.entities.add(entity);
- }
- }
- },
- /**
- * 绘制多边形
- */
- startPolygon() {
- var that = this;
- debugger
- if (handleInput) {
- handleInput.destroy();
- }
- handlerPolygon = new Cesium.DrawHandler(
- viewer,
- Cesium.DrawMode.Polygon,
- 0
- );
- handlerPolygon.activate()
- handlerPolygon.activeEvt.addEventListener(function (isActive) {
- if (isActive == true) {
- viewer.enableCursorStyle = false;
- viewer._element.style.cursor = "";
- // var nodes = document.getElementsByTagName('body')
- // if (nodes.length > 0)
- // nodes[0].className.replace('drawCur','drawCur')
- } else {
- viewer.enableCursorStyle = true;
- // var nodes = document.getElementsByTagName('body')
- // if (nodes.length > 0) {
- // nodes[0].className.replace('drawCur','')
- // }
- }
- });
- handlerPolygon.movingEvt.addEventListener(function (windowPosition) {
- // if (this.handlerPolygon.isDrawing) {
- // window.createTooltip.showAt(windowPosition, '点击确定多边形顶点,右键单击结束绘制,');
- // } else {
- // window.createTooltip.showAt(windowPosition, '点击绘制第一个点,');
- // }
- });
- handlerPolygon.drawEvt.addEventListener(function (result) {
- // handlerPolygon.polygon.show = false;
- // handlerPolygon.polyline.show = false;
- var nPositions = [];
- that.regions = [];
- for (var pt of result.object.positions) {
- var cartographic = Cesium.Cartographic.fromCartesian(pt);
- var longitude = Cesium.Math.toDegrees(cartographic.longitude);
- var latitude = Cesium.Math.toDegrees(cartographic.latitude);
- var height = cartographic.height;
- that.regions.push({ x: longitude, y: latitude });
- nPositions.push(longitude)
- nPositions.push(latitude)
- }
- that.regions.push(that.regions[0]);
- viewer.entities.removeAll();
- polygonEntity = new Cesium.Entity({
- id: 'polygon',
- // position: Cesium.Cartesian3.fromDegreesArray([
- // centerX,
- // centerY,
- // ]),
- // classificationType: ClassificationType.TERRAIN,
- polygon: {
- hierarchy: new Cesium.PolygonHierarchy(
- new Cesium.Cartesian3.fromDegreesArray(nPositions)
- ),
- // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
- material: Cesium.Color.WHITE.withAlpha(0.3),
- outline: true,
- outlineColor: Cesium.Color.RED,
- outlineWidth: 2.0,
- },
- });
- viewer.entities.add(polygonEntity)
- that.curProjectInfo.regions = that.regions;
- // that.regions = [];
- // that.regions.push(that.positions);
- viewer.flyTo(polygonEntity)
- handlerPolygon.clear()
- handlerPolygon.deactivate();
- });
- },
- clipImage() {
- var that = this;
- var promise = scene.outputSceneToFile();
- Cesium.when(promise, function (base64data) {
- that.imageData = base64data
- })
- },
- /**
- * 点击绘制多边形
- */
- drawPolygon() {
- viewer.entities.removeAll();
- if (polygonEntity) {
- viewer.entities.remove(polygonEntity)
- }
- this.startPolygon();
- // else {
- // handlerPolygon=;
- // this.positions = [];
- // this.regions = [];
- // }
- // handlerPolygon.activate();
- },
- /**
- * 拆迁定位
- * @param {string} smid 图斑id
- * @param {string} cqr //产权人
- */
- cqLocation(isGYFC, smid, cqr) {
- var features;
- var that = this;
- if (isGYFC == true)
- features = that.cqResult.gyfeatures;
- else
- features = that.cqResult.jtfeatures;
- var fieldNames = [];
- var smidIndex = -1;
- var fieldValues = [];
- var geometry = null;
- if (features == null) return;
- var attributes;
- //产权人
- var entity;
- // var index = that.entities.findIndex(t => t.id == "ZDBDC_" + smid)
- // if (index > -1) {
- // entity = viewer.entities.getById("ZDBDC_" + smid);
- // entity.show = true;
- // viewer.entities.removeById('aad')
- // var point = new Cesium.Entity({
- // id: "aad",
- // position: entity.position,
- // point: {
- // // 点的大小(像素)
- // pixelSize: 10,
- // // 点位颜色,fromCssColorString 可以直接使用CSS颜色
- // color: Cesium.Color.RED.withAlpha(0),
- // // 边框颜色
- // outlineColor: Cesium.Color.fromCssColorString("#fff").withAlpha(0),
- // // 边框宽度(像素)
- // outlineWidth: 2,
- // // 显示在距相机的距离处的属性,多少区间内是可以显示的
- // // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
- // // 0,
- // // 1500
- // // ),
- // // 是否显示
- // show: true,
- // }
- // })
- // viewer.entities.add(point);
- // viewer.flyTo(point)
- // setTimeout(function () {
- // viewer.entities.removeById('aad')
- // }, 3000)
- // }
- // else {
- // var curID;
- // for (var i = 0; i < features.length; i++) {
- // fieldNames = features[i].fieldNames;
- // fieldValues = features[i].fieldValues;
- // smidIndex = fieldNames.findIndex(t => t.toUpperCase() == "SMID")
- // attributes = {
- // fieldNames: fieldNames,
- // fieldValues: fieldValues,
- // };
- // curID = fieldValues[smidIndex];
- // if (curID != smid)
- // continue;
- // geometry = features[i].geometry;
- // var positions = [];
- // for (var i = 0; i < geometry.points.length; i++) {
- // positions.push(geometry.points[i].x);
- // positions.push(geometry.points[i].y);
- // }
- // entity = new Cesium.Entity({
- // id: "ZDBDC_" + smid,
- // // label: {
- // // text: cqr,
- // // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
- // // font: "14px sans-serif",
- // // fillColor: new Cesium.Color(1, 0, 0, 1),
- // // showBackground: true,
- // // backgroundColor: new Cesium.Color(0, 0.8, 0, 0.8)
- // // },
- // position: Cesium.Cartesian3.fromDegrees(
- // geometry.center.x,
- // geometry.center.y,
- // 50
- // ),
- // show: true,
- // polygon: {
- // hierarchy: new Cesium.PolygonHierarchy(
- // new Cesium.Cartesian3.fromDegreesArray(positions)
- // ),
- // // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
- // material: new Cesium.Color(255 / 255, 211 / 255, 128 / 255, 1),
- // outline: true,
- // outlineColor: Cesium.Color.BLACK,
- // outlineWidth: 1.5,
- // },
- // });
- // entity.attributes = attributes;
- // viewer.entities.add(entity);
- // that.entities.push({ type: "ZDBDC", id: "ZDBDC_" + smid })
- // viewer.entities.removeById('aad')
- // var point = new Cesium.Entity({
- // id: 'aad',
- // position: entity.position,
- // point: {
- // // 点的大小(像素)
- // pixelSize: 10,
- // // 点位颜色,fromCssColorString 可以直接使用CSS颜色
- // color: Cesium.Color.RED.withAlpha(0),
- // // 边框颜色
- // outlineColor: Cesium.Color.fromCssColorString("#fff").withAlpha(0),
- // // 边框宽度(像素)
- // outlineWidth: 2,
- // // 显示在距相机的距离处的属性,多少区间内是可以显示的
- // // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
- // // 0,
- // // 1500
- // // ),
- // // 是否显示
- // show: true,
- // }
- // })
- // viewer.entities.add(point);
- // viewer.flyTo(point)
- // setTimeout(function () {
- // viewer.entities.removeById('aad')
- // }, 3000)
- // }
- // }
- var index = that.entities.findIndex(t => t.id == "ZDBDC_FC")
- if (index == -1) {
- that.entities.push({ type: "ZDBDC", id: "ZDBDC_FC" });
- }
- viewer.entities.removeById('ZDBDC_FC');
- viewer.entities.removeById('aad')
- if(popupBox){
- popupBox.destroy();
- popupBox=null;
- }
-
- var curID;
- for (var i = 0; i < features.length; i++) {
- fieldNames = features[i].fieldNames;
- fieldValues = features[i].fieldValues;
- smidIndex = fieldNames.findIndex(t => t.toUpperCase() == "SMID")
- attributes = {
- fieldNames: fieldNames,
- fieldValues: fieldValues,
- };
- curID = fieldValues[smidIndex];
- if (curID != smid)
- continue;
- geometry = features[i].geometry;
- var positions = [];
- for (var i = 0; i < geometry.points.length; i++) {
- positions.push(geometry.points[i].x);
- positions.push(geometry.points[i].y);
- }
- let dom = document.createElement("div");
- dom.id = "ZDBDC_FCtext";
- dom.style.position = "absolute";
- dom.style.width = "0";
- dom.style.height = "0";
- // dom.style.color = "rgba(2, 23, 44, 0.8)";
- // dom.style.backgroundColor = "rgba(2, 23, 44, 0.8)";
- dom.style.fontSize = "1rem";
- let domContent = document.createElement("div");
- domContent.style.position = "absolute";
- domContent.style.borderRadius = "5px";
- domContent.style.border = "1px solid rgba(7, 131, 250, 0.3)";
- domContent.style.backgroundColor = "rgba(2, 23, 44, 0.7)";
- domContent.style.bottom = "0px";
- domContent.style.left = "0px";
- domContent.style.whiteSpace = "nowrap";
- domContent.style.color = "white";
- // domContent.style.padding = "8px 12px";
- domContent.style.transform = "translate(-50%, 0%)";
- domContent.innerHTML = cqr;
- dom.appendChild(domContent);
- popupBox = new Popup({
- viewer: viewer,
- element: dom,
- pixelOffset: new Cesium.Cartesian2(0, 0),
- translucencyByDistance: new Cesium.NearFarScalar(
- 0,
- 1,
- 50000,
- 1
- ),
- distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
- 0,
- 51000
- ),
- position: Cesium.Cartesian3.fromDegrees(geometry.center.x,geometry.center.y,20),
- });
- popupBox.show();
- entity = new Cesium.Entity({
- id: "ZDBDC_FC",
- // label: {
- // text: cqr,
- // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
- // font: "14px sans-serif",
- // fillColor: new Cesium.Color(1, 0, 0, 1),
- // showBackground: true,
- // backgroundColor: new Cesium.Color(0, 0.8, 0, 0.8)
- // },
- position: Cesium.Cartesian3.fromDegrees(
- geometry.center.x,
- geometry.center.y,
- 50
- ),
- show: true,
- polygon: {
- hierarchy: new Cesium.PolygonHierarchy(
- new Cesium.Cartesian3.fromDegreesArray(positions)
- ),
- material: new Cesium.Color(255 / 255, 211 / 255, 128 / 255, 1),
- outline: true,
- outlineColor: Cesium.Color.BLACK,
- outlineWidth: 1.5,
- },
- });
- entity.attributes = attributes;
- viewer.entities.add(entity);
- }
- var point = new Cesium.Entity({
- id: "aad",
- position: entity.position,
- point: {
- // 点的大小(像素)
- pixelSize: 10,
- // 点位颜色,fromCssColorString 可以直接使用CSS颜色
- color: Cesium.Color.RED.withAlpha(0),
- // 边框颜色
- outlineColor: Cesium.Color.fromCssColorString("#fff").withAlpha(0),
- // 边框宽度(像素)
- outlineWidth: 2,
- // 显示在距相机的距离处的属性,多少区间内是可以显示的
- // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
- // 0,
- // 1500
- // ),
- // 是否显示
- show: true,
- }
- })
- viewer.entities.add(point);
- viewer.flyTo(point);
- setTimeout(function () {
- viewer.entities.removeById('aad');
- }, 3000)
- },
- /**
- * 点击确定开始计算
- */
- submitForm(formName) {
- var that = this;
- if (that.regions.length == 0) {
- that.$alert("请导入或绘制项目范围", "警告");
- // alert('请导入或绘制项目范围')
- return false;
- }
- console.log(JSON.stringify(that.regions));
- debugger
- var area = that.getRegionArea() / 666.66;
- if (area > 3000) {
- that.$alert("项目范围不要超过3000亩,请重新输入项目范围", "警告");
- viewer.entities.removeAll();
- return false;
- }
- that.loading = that.$loading({
- lock: true,
- text: '正在数据分析,请稍后...',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- });
- that.clipImage();
- that.$refs[formName].validate(async (valid) => {
- if (valid) {
- //alert('submit!');
- // that.doQuery();
- //脚本函数
- var param = {
- geometry: that.regions,
- zdValue: that.ruleForm.zdValue,
- cqValue: that.ruleForm.cqValue,
- qmValue: that.ruleForm.qmValue
- }
- var jdResult = await zdAnalyse.doQuery(param);
- if (jdResult) {
- that.zdResult = jdResult.zdResult;
- that.cqResult = jdResult.cqResult;
- that.qmResult = jdResult.qmResult;
- that.qsResult = jdResult.qsResult;
- }
- that.loading.close();
- that.$message({
- message: "征地分析计算完成",
- type: "success",
- });
- var date = new Date();
- debugger
- var projectName = that.ruleForm.projectName;
- var item = {
- "id": that.projectList.length + 1,
- "projectName": projectName,
- "imageData": that.imageData,
- // 分析范围
- "regions": JSON.stringify(that.regions),
- "gyMJ": parseFloat(that.zdResult.gyMJ.toFixed(2)),
- //集体面积
- "jtMJ": parseFloat(that.zdResult.jtMJ.toFixed(2)),
- //征地面积
- "totalZDMJ": parseFloat(that.zdResult.totalZDMJ.toFixed(2)),
- "dateTime": that.dateFormat(date),
- /* 征地标准值
- // */
- "zdValue": that.ruleForm.zdValue,
- // // zdZBData: window.ZSBC.ZDBCList.find(c => c.value == that.ruleForm.zdValue),
- // /* 青苗标准值
- // */
- "qmValue": that.ruleForm.qmValue,
- // // qmZBData: window.ZSBC.QMBCList.find(c => c.value == that.ruleForm.qmValue),
- // /**
- // * 拆迁标准值
- // */
- "cqValue": that.ruleForm.cqValue,
- // // cqZBData: window.ZSBC.CQBCList.find(c => c.value == that.ruleForm.cqValue),
- /**
- * 拆迁分析结果
- */
- "cqResult": {
- "id": null,
- "projectId": null,
- "count": that.cqResult.count,
- "totalJZMJ": parseFloat(that.cqResult.totalJZMJ.toFixed(2)),
- "totalPay": parseFloat(that.cqResult.totalPay.toFixed(2)),
- "average": parseFloat(that.cqResult.average.toFixed(2)),
- "gyJZMJ": parseFloat(that.cqResult.gyJZMJ.toFixed(2)),
- "jtJZMJ": parseFloat(that.cqResult.jtJZMJ.toFixed(2)),
- "gyCount": that.cqResult.gyCount,
- "jtCount": that.cqResult.jtCount,
- "gyList": JSON.stringify(that.cqResult.gyList),
- "jtList": JSON.stringify(that.cqResult.jtList),
- "gyfeatures": JSON.stringify(that.cqResult.gyfeatures),
- "jtfeatures": JSON.stringify(that.cqResult.jtfeatures),
- "fieldInfos": JSON.stringify(that.cqResult.fieldInfos)
- },
- /**
- * 青苗分析结果
- */
- "qmResult": {
- "id": null,
- "projectId": null,
- "totalPay": parseFloat(that.qmResult.totalPay.toFixed(2)),
- "totalMJ": parseFloat(that.qmResult.totalMJ.toFixed(2)),
- "nzwMJ": parseFloat(that.qmResult.nzwMJ.toFixed(2)),
- "nzwPay": parseFloat(that.qmResult.nzwPay.toFixed(2)),
- "jjzwMJ": parseFloat(that.qmResult.jjzwMJ.toFixed(2)),
- "jjzwPay": parseFloat(that.qmResult.jjzwPay.toFixed(2)),
- "smMJ": parseFloat(that.qmResult.smMJ.toFixed(2)),
- "smPay": parseFloat(that.qmResult.smPay.toFixed(2)),
- "fieldInfos": JSON.stringify(that.qmResult.fieldInfos),
- "features": JSON.stringify(that.qmResult.features),
- },
- /**
- * 征地分析结果
- */
- "zdResult": {
- "id": null,
- "projectId": null,
- //国有面积
- "gyMJ": parseFloat(that.zdResult.gyMJ.toFixed(2)),
- //集体面积
- "jtMJ": parseFloat(that.zdResult.jtMJ.toFixed(2)),
- //征地面积
- "totalZDMJ": parseFloat(that.zdResult.totalZDMJ.toFixed(2)),
- //总补偿
- "totalPay": parseFloat(that.zdResult.totalPay.toFixed(2)),
- //征地补偿
- "totalZDPay": parseFloat(that.zdResult.totalZDPay.toFixed(2)),
- //安置补偿
- "totalAZPay": parseFloat(that.zdResult.totalAZPay.toFixed(2)),
- //国有地类及面积
- "gydlList": JSON.stringify(that.zdResult.gydlList),
- //地类及面积
- "jtdlList": JSON.stringify(that.zdResult.jtdlList),
- "gyfeatures": JSON.stringify(that.zdResult.gyfeatures),
- "jtfeatures": JSON.stringify(that.zdResult.jtfeatures),
- "fieldInfos": JSON.stringify(that.zdResult.fieldInfos),
- },
- /**
- * 权属结果
- */
- "qsResult": {
- "id": null,
- "projectId": null,
- "stateUsedMJ": parseFloat(that.qsResult.stateUsedMJ.toFixed(2)),
- "stateUsedFeatures": JSON.stringify(that.qsResult.stateUsedFeatures),
- "stateUsedList": JSON.stringify(that.qsResult.stateUsedList),
- "stateUsedFieldInfos": JSON.stringify(that.qsResult.stateUsedFieldInfos),
- "collectiveOwnerMJ": parseFloat(that.qsResult.collectiveOwnerMJ.toFixed(2)),
- "collectiveOwnerFeatures": JSON.stringify(that.qsResult.collectiveOwnerFeatures),
- "collectiveOwnerList": JSON.stringify(that.qsResult.collectiveOwnerList),
- "collectiveOwnerFieldInfos": JSON.stringify(that.qsResult.collectiveOwnerFieldInfos),
- "collectiveUsedMJ": parseFloat(that.qsResult.collectiveUsedMJ.toFixed(2)),
- "collectiveUsedList": JSON.stringify(that.qsResult.collectiveUsedList),
- "collectiveUsedFeatures": JSON.stringify(that.qsResult.collectiveUsedFeatures),
- "collectiveUsedFieldInfos": JSON.stringify(that.qsResult.collectiveUsedFieldInfos)
- }
- };
- // 保存项目
- if (window.isUseDB)
- that.saveAnalysResult(item);
- else {
- var dd = JSON.stringify(item);
- var sd = JSON.parse(dd);
- that.curProjectInfo = sd;
- that.projectList.push(sd);
- var list = JSON.stringify(that.projectList.reverse())
- window.ZSBC.projectList = JSON.parse(list)
- }
- var date = new Date()
- debugger
- that.ruleForm.projectName = "拆迁补偿项目_" + that.formatDateTimeToLong(date);
- that.activeName = "second"
- } else {
- console.log("error submit!!");
- return false;
- }
- });
- },
- /**
- * 保存分析结果
- */
- saveAnalysResult(projectInfo) {
- var that = this
- // var projectInfo = {
- // "id": that.curProjectInfo.id,
- // "projectName": that.curProjectInfo.name,
- // "dateTime": that.curProjectInfo.dateTime,
- // "regions": JSON.stringify(that.curProjectInfo.regions),
- // "cqValue": that.curProjectInfo.cqValue,
- // "qmValue": that.curProjectInfo.qmValue,
- // "zdValue": that.curProjectInfo.zdValue,
- // /**
- // * 拆迁分析结果
- // */
- // "cqResult": {
- // "id": null,
- // "projectId": null,
- // "count": that.curProjectInfo.cqResult.count,
- // "totalJZMJ": that.curProjectInfo.cqResult.totalJZMJ,
- // "totalPay": that.curProjectInfo.cqResult.totalPay,
- // "average": that.curProjectInfo.cqResult.average,
- // "gyJZMJ": that.curProjectInfo.cqResult.gyJZMJ,
- // "jtJZMJ": that.curProjectInfo.cqResult.jtJZMJ,
- // "gyCount": that.curProjectInfo.cqResult.gyCount,
- // "jtCount": that.curProjectInfo.cqResult.jtCount,
- // "gyList": JSON.stringify(that.curProjectInfo.cqResult.gyList),
- // "jtList": JSON.stringify(that.curProjectInfo.cqResult.jtList),
- // "gyfeatures": JSON.stringify(that.curProjectInfo.cqResult.gyfeatures),
- // "jtfeatures": JSON.stringify(that.curProjectInfo.cqResult.jtfeatures),
- // "fieldInfos": JSON.stringify(that.curProjectInfo.cqResult.fieldInfos)
- // },
- // /**
- // * 青苗分析结果
- // */
- // "qmResult": {
- // "id": null,
- // "projectId": null,
- // "totalPay": that.curProjectInfo.qmResult.totalPay,
- // "totalMJ": that.curProjectInfo.qmResult.totalMJ,
- // "nzwMJ": that.curProjectInfo.qmResult.nzwMJ,
- // "nzwPay": that.curProjectInfo.qmResult.nzwPay,
- // "jjzwMJ": that.curProjectInfo.qmResult.jjzwMJ,
- // "jjzwPay": that.curProjectInfo.qmResult.jjzwPay,
- // "smMJ": that.curProjectInfo.qmResult.smMJ,
- // "smPay": that.curProjectInfo.qmResult.smPay,
- // "fieldInfos": JSON.stringify(that.curProjectInfo.qmResult.fieldInfos),
- // "features": JSON.stringify(that.curProjectInfo.qmResult.features),
- // },
- // /**
- // * 征地分析结果
- // */
- // "zdResult": {
- // "id": null,
- // "projectId": null,
- // //国有面积
- // "gyMJ": that.curProjectInfo.zdResult.gyMJ,
- // //集体面积
- // "jtMJ": that.curProjectInfo.zdResult.jtMJ,
- // //征地面积
- // "totalZDMJ": that.curProjectInfo.zdResult.totalZDMJ,
- // //总补偿
- // "totalPay": that.curProjectInfo.zdResult.totalPay,
- // //征地补偿
- // "totalZDPay": that.curProjectInfo.zdResult.totalZDPay,
- // //安置补偿
- // "totalAZPay": that.curProjectInfo.zdResult.totalAZPay,
- // //国有地类及面积
- // "gydlList": JSON.stringify(that.curProjectInfo.zdResult.gydlList),
- // //地类及面积
- // "jtdlList": JSON.stringify(that.curProjectInfo.zdResult.jtdlList),
- // "gyfeatures": JSON.stringify(that.curProjectInfo.zdResult.gyfeatures),
- // "jtfeatures": JSON.stringify(that.curProjectInfo.zdResult.jtfeatures),
- // "fieldInfos": JSON.stringify(that.curProjectInfo.zdResult.fieldInfos),
- // },
- // /**
- // * 权属结果
- // */
- // "qsResult": {
- // "id": null,
- // "projectId": null,
- // "stateUsedMJ": that.curProjectInfo.qsResult.stateUsedMJ,
- // "stateUsedFeatures": JSON.stringify(that.curProjectInfo.qsResult.stateUsedFeatures),
- // "stateUsedList": JSON.stringify(that.curProjectInfo.qsResult.stateUsedList),
- // "stateUsedFieldInfos": JSON.stringify(that.curProjectInfo.qsResult.stateUsedFieldInfos),
- // "collectiveOwnerMJ": that.curProjectInfo.qsResult.collectiveOwnerMJ,
- // "collectiveOwnerFeatures": JSON.stringify(that.curProjectInfo.qsResult.collectiveOwnerFeatures),
- // "collectiveOwnerList": JSON.stringify(that.curProjectInfo.qsResult.collectiveOwnerList),
- // "collectiveOwnerFieldInfos": JSON.stringify(that.curProjectInfo.qsResult.collectiveOwnerFieldInfos),
- // "collectiveUsedMJ": that.curProjectInfo.qsResult.collectiveUsedMJ,
- // "collectiveUsedList": JSON.stringify(that.curProjectInfo.qsResult.collectiveUsedList),
- // "collectiveUsedFeatures": JSON.stringify(that.curProjectInfo.qsResult.collectiveUsedFeatures),
- // "collectiveUsedFieldInfos": JSON.stringify(that.curProjectInfo.qsResult.collectiveUsedFieldInfos)
- // }
- // }
- addZdProject(projectInfo).then((res) => {
- if (res)
- console.log('项目保存完成')
- that.queryProject();
- }).catch((err) => {
- console.log('项目保存失败')
- })
- },
- //范围面积
- getRegionArea() {
- debugger
- var points1 = this.regions;
- var parts1 = [];
- var poly1;
- for (var i = 0; i < points1.length; i++) {
- parts1.push([points1[i].x, points1[i].y]);
- }
- poly1 = polygon([parts1]);
- var textarea = area(poly1) * window.earthRadius;
- return textarea;
- },
- /***
- * pararm {object} @arr
- */
- creaturfPolygon(arr) {
- var points = [];
- var parts = [];
- var polygon = [];
- if (arr && arr.length > 0)
- for (var i = 0; i < arr.length; i++) {
- points.push([arr[i].x, arr[i].y]);
- }
- parts.push(points);
- polygon.push(parts);
- return polygon(polygon);
- },
- getfldIndex(fieldInfos, fldName) {
- var fldIndex = -1;
- fieldInfos.forEach((fld, index) => {
- if (fld.name.toUpperCase() == fldName.toUpperCase()) {
- fldIndex = index;
- }
- });
- return fldIndex;
- },
- /**
- * point1(裁剪),points2(被裁剪) [{x:1,y:2}]
- */
- computerInsertArea(points1, points2) {
- var area = 0;
- if (
- points1 == null ||
- points2 == null ||
- points2.length == 0 ||
- points1.length == 0
- ) {
- console.log("征地补偿图斑计算传入参数错误");
- area = 0;
- }
- var parts1 = [];
- var poly1 = [];
- var parts2 = [];
- var poly2 = [];
- // parts1.push()
- for (var i = 0; i < points1.length; i++) {
- parts1.push([points1[i].x, points1[i].y]);
- }
- poly1 = polygon([parts1]);
- var textarea = area(poly1) * window.earthRadius;
- for (var i = 0; i < points2.length; i++) {
- parts2.push([points2[i].x, points2[i].y]);
- }
- poly2 = polygon([parts2]);
- var isContain = booleanContains(poly1, poly2);
- if (isContain) {
- area = area(poly2) * window.earthRadius;
- }
- else {
- var intersection = intersect(poly1, poly2);
- area = area(intersection) * window.earthRadius;
- }
- return area;
- },
- areaFrom4326To4525(region) {
- var fromProj = proj4.defs();
- var toProj = proj4.defs(window.localWkid4525);
- proj4.defs("EPSG:4525", "+proj=longlat +ellps=GRS80 +no_defs +type=crs");
- var point;
- proj4.transform(fromProj, toProj, point)
- },
- /**
- * 时间格式化2022-02-10 12:00:00
- * @param {date} date
- */
- dateFormat(date) {
- // console.log(showTime(date.getHours()));
- var year = date.getFullYear(); // 年
- var month = this.showTime(date.getMonth() + 1); // 月
- // var week = this.showTime(date.getDay()); // 星期
- var day = this.showTime(date.getDate()); // 日
- var hours = this.showTime(date.getHours()); // 小时
- var minutes = this.showTime(date.getMinutes()); // 分钟
- var second = this.showTime(date.getSeconds()); // 秒
- var str = "";
- str =
- year +
- "-" +
- month +
- "-" +
- day +
- " " +
- hours +
- ":" +
- minutes +
- ":" +
- second;
- return str;
- },
- // 封装一个不够两位数就补零的函数
- showTime(t) {
- var time;
- time = t >= 10 ? t : "0" + t;
- return time;
- },
- clear() {
- this.positions = [];
- this.regions = [];
- this.entities.forEach((item) => {
- viewer.entities.removeById(item.id);
- })
- this.qsEntities.forEach((item) => {
- viewer.entities.removeById(item.id);
- })
- this.entities = []
- this.qsEntities = [];
- if (polygonEntity) {
- viewer.entities.remove(polygonEntity)
- }
- if (handlerPolygon) {
- handlerPolygon.deactivate();
- handlerPolygon.clear();
- }
- },
- exportWord(projectInfo) {
- if (projectInfo)
- var promise = scene.outputSceneToFile();
- Cesium.when(promise, function (base64data) {
- projectInfo.isUseDB = window.isUseDB;
- expotZDBCWord(projectInfo)
- })
- // .then((response) => {
- // debugger;
- // var fileName = projectInfo.projectName;
- // debugger;
- // const contentDisposition = response.headers["content-disposition"];
- // if (contentDisposition) {
- // fileName = window.decodeURI(
- // response.headers["content-disposition"].split("=")[1],
- // "UTF-8"
- // );
- // }
- // const isBlob = blobValidate(response.data);
- // debugger;
- // if (isBlob) {
- // const blob = new Blob([response.data]);
- // saveAs(blob, fileName);
- // } else {
- // const resText = response.text();
- // const rspObj = JSON.parse(resText);
- // const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode["default"];
- // that.$message.error(errMsg);
- // }
- // }).catch((err) => {
- // console.log(err)
- // })
- }
- },
- /**
- * 清楚临时图元
- */
- beforeDestroy() {
- if (polygonEntity) {
- viewer.entities.remove(polygonEntity)
- }
- if (handlerPolygon) {
- handlerPolygon.deactivate();
- handlerPolygon.clear();
- }
- if (handleInput)
- handleInput.destroy()
- this.positions = [];
- this.regions = [];
- this.entities = []
- this.qsEntities = [];
- viewer.entities.removeAll();
- if(popupBox){
- popupBox.destroy();
- popupBox=null;
- }
-
- },
- destroyed() { }
- };
- </script>
- <style lang="scss">
- @import "@/../../zt.scss";
- </style>
- <style scoped>
- .fileInput {
- display: none;
- }
- .file-upload-button {
- background-color: #0f7ac8 !important
- }
- .divrow {
- margin: 0;
- padding: 0;
- display: flex;
- height: 2.5rem;
- }
- .divImg {
- width: 20%;
- }
- img {
- height: 2rem;
- width: 2rem;
- }
- .divCol {
- width: 49.5%;
- display: flex;
- white-space: nowrap;
- }
- .divText {
- width: 79%;
- padding-left: 0.5rem;
- }
- input.el-range-input {
- background-color: transparent;
- }
- .el-range-editor.el-input__inner {
- background-color: transparent;
- }
- .el-row {
- /* padding: 0.5rem 0 0.5rem 0; */
- /* display: inline-flex; */
- align-items: center;
- margin-bottom: 0.5rem;
- }
- .el-col {
- display: inline-flex;
- }
- .buttongroup {
- display: inline-flex;
- margin-top: 0.45rem;
- }
- .rootele {
- padding: 0.5rem;
- color: white;
- overflow-y: none;
- }
- .el-col {
- color: white;
- }
- .el-tab-pane {
- color: white;
- }
- .el-input {
- background: transparent;
- }
- /* ul {
- height: 100;
- width: 100%;
- overflow-y: auto;
- font-size: 1rem;
- padding: 1rem;
- list-style-type: none;
- } */
- .el-pagination {
- color: #ffffff;
- }
- </style>
|