DemolitionList.vue 138 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226
  1. <template>
  2. <div class="ZTGlobal rootele">
  3. <el-tabs v-model="activeName" @tab-click="handleClick">
  4. <el-tab-pane label="拆迁补偿预估" name="first">
  5. <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="8rem" class="demo-ruleForm">
  6. <el-form-item label="项目范围:" prop="">
  7. <input @change="handleUpload" type="file" style="display:none" id="fileInput" accept=".zip"></input>
  8. <el-button type="primary" @click="inputGeometry">导入</el-button>
  9. <el-button type="primary" @click="drawPolygon()">绘制</el-button>
  10. <el-button type="primary" @click="clear()">清除</el-button>
  11. <!-- </div> -->
  12. </el-form-item>
  13. <div class="el-upload__tip" style="height: 1rem; color: #f5f761f1; text-align: center">
  14. 只能上传shape压缩文件(zip),且不超过500kb
  15. </div>
  16. <el-form-item label="项目名称:" prop="projectName">
  17. <!-- <el-col :span="7">项目名称:</el-col> -->
  18. <el-col :span="16">
  19. <el-input size="mini" placeholder="输入项目名称" v-model="ruleForm.projectName"></el-input>
  20. </el-col>
  21. </el-form-item>
  22. <el-form-item label="征地补偿标准:" prop="zdValue">
  23. <!-- <el-col :span="7">征地补偿标准:</el-col> -->
  24. <el-col :span="13">
  25. <el-select size="mini" v-model="ruleForm.zdValue" placeholder="请选择">
  26. <el-option v-for="item in zdList" :key="item.id" :label="item.name" :value="item.id">
  27. </el-option>
  28. </el-select>
  29. </el-col>
  30. <el-col :span="7" class="buttongroup">
  31. <el-button size="mini" type="primary" id="zdShow" @click="zdShow()" plain>查看</el-button>
  32. <el-button size="mini" type="primary" id="zdSet" @click="zdSet()" plain>配置</el-button>
  33. </el-col>
  34. </el-form-item>
  35. <el-form-item label="青苗补偿标准:" prop="qmValue">
  36. <!-- <el-col :span="7">青苗补偿标准:</el-col> -->
  37. <el-col :span="13">
  38. <el-select size="mini" v-model="ruleForm.qmValue" placeholder="请选择">
  39. <el-option v-for="item in qmList" :key="item.id" :label="item.name" :value="item.id">
  40. </el-option>
  41. </el-select>
  42. </el-col>
  43. <el-col :span="7" class="buttongroup">
  44. <el-button size="mini" type="primary" id="qmShow" @click="qmShow()" plain>查看</el-button>
  45. <el-button size="mini" type="primary" id="qmSet" @click="qmSet()" plain>配置</el-button>
  46. </el-col>
  47. </el-form-item>
  48. <el-form-item label="拆迁补偿标准:" prop="cqValue">
  49. <!-- <el-col :span="7">拆迁补偿标准:</el-col> -->
  50. <el-col :span="13">
  51. <el-select size="mini" v-model="ruleForm.cqValue" placeholder="请选择">
  52. <el-option v-for="item in cqList" :key="item.id" :label="item.name" :value="item.id">
  53. </el-option>
  54. </el-select>
  55. </el-col>
  56. <el-col :span="7" class="buttongroup">
  57. <el-button size="mini" type="primary" id="cqShow" @click="cqShow()" plain>查看</el-button>
  58. <el-button size="mini" type="primary" id="cqSet" @click="cqSet()" plain>配置</el-button>
  59. </el-col>
  60. </el-form-item>
  61. <el-row style="text-align: center">
  62. <el-button type="primary" plain @click="submitForm('ruleForm')">确定</el-button>
  63. <el-button type="primary" plain @click="dialogClose()">取消</el-button>
  64. </el-row>
  65. </el-form>
  66. <!-- <canvas id="CVS" style="height: 100%;width: 100%; z-index: 10000;"></canvas> -->
  67. <!-- <el-card v-loading="loading" element-loading-text="正在数据分析......" element-loading-spinner="el-icon-loading"
  68. element-loading-background="rgba(63 113 165, 0.8)"
  69. style="height:10rem;border: 0px;color:#ffffff "></el-card> -->
  70. <!-- element-loading-background="rgba(0, 0, 0, 0.8) -->
  71. </el-tab-pane>
  72. <el-tab-pane label="分析记录" name="second">
  73. <el-row>
  74. <el-col :span="10">
  75. <el-input size="mini" placeholder="请输入项目名称" v-model="searchName">
  76. <!-- <i slot="suffix" class="el-input__icon el-icon-search"></i> -->
  77. </el-input>
  78. </el-col>
  79. <el-col :span="10">
  80. <el-date-picker size="mini" v-model="dateVal" type="daterange" range-separator="至" start-placeholder="开始日期"
  81. end-placeholder="结束日期">
  82. </el-date-picker>
  83. </el-col>
  84. <el-col :span="2">
  85. <el-button type="primary" size="mini" @click="queryProject">查询</el-button>
  86. </el-col>
  87. </el-row>
  88. <div>
  89. <el-card class="box-card" v-for="projectInfo in projectList" :key="projectInfo.id">
  90. <el-row>
  91. <el-col :span="14">
  92. <span>{{ projectInfo.projectName }}</span></el-col>
  93. <el-col :span="10">
  94. <span>{{ formatDateTime(new Date(projectInfo.dateTime)) }}</span>
  95. </el-col>
  96. </el-row>
  97. <el-row>
  98. <el-col :span="10">
  99. <el-button style="float: right; padding: 3px 0" type="success">完成</el-button>
  100. </el-col>
  101. <el-col :span="10" justify="center">
  102. <!-- <el-button type="primary" style="float: right; padding: 3px 0">日志</el-button> -->
  103. <el-button type="primary" style="float: right; padding: 3px 0"
  104. @click="showResult(projectInfo)">分析结果</el-button>
  105. <el-button type="primary" style="float: right; padding: 3px 0"
  106. @click="exportWord(projectInfo)">报告</el-button>
  107. </el-col>
  108. <el-col :span="4">
  109. <el-button type="warning" style="float: right; padding: 3px 0"
  110. @click="deletProject(projectInfo)">删除</el-button>
  111. </el-col>
  112. </el-row>
  113. </el-card>
  114. <el-pagination background layout="prev, pager, next" :page-size="pageSize" :total="rowsCount"
  115. :current-page="currentPage" @current-change="onCurrentChange">
  116. </el-pagination>
  117. </div>
  118. </el-tab-pane>
  119. <el-tab-pane label="分析结果" name="third">
  120. <el-row class="box-card" v-model="curProjectInfo">
  121. <el-col :span="18">
  122. <span style="font-size: 1rem">{{
  123. curProjectInfo.name
  124. }}</span></el-col>
  125. <el-col :span="6">
  126. <el-button type="primary" size="mini" @click="exportWord(curProjectInfo)">导出报告</el-button>
  127. </el-col>
  128. </el-row>
  129. <el-tabs v-model="activePage1" @tab-click="pageClick" style="height: auto;">
  130. <el-tab-pane label="国有评估" name="GY">
  131. <div class="divrow">
  132. <div class="divCol">
  133. <div class="divImg">
  134. <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
  135. </div>
  136. <div class="divText">
  137. <div>
  138. <span style="color: #fff">国有用地(亩)</span>
  139. </div>
  140. <div>
  141. <span color="#2d8cf0">{{ formatterArea(zdResult.gyMJ) }}</span>
  142. </div>
  143. </div>
  144. </div>
  145. <div class="divCol">
  146. <div class="divImg">
  147. <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
  148. </div>
  149. <div class="divText">
  150. <div>
  151. <span style="color: #fff">国有建筑面积(平方米)</span>
  152. </div>
  153. <div>
  154. <span color="#2d8cf0">{{ formatterArea(cqResult.gyJZMJ) }}</span>
  155. </div>
  156. </div>
  157. </div>
  158. </div>
  159. <el-tabs v-model="activePage2" @tab-click="gyPpageClick" style="height: auto;">
  160. <el-tab-pane label="国有权属" name="GYQS">
  161. <div id="GYQSChart" style="height: 15rem; width: 25rem;"></div>
  162. <div id="GYDLChart" style="height: 15rem; width: 25rem;"></div>
  163. </el-tab-pane>
  164. <el-tab-pane label="国有房产" name="GYFC">
  165. <ul style="width: 25rem;height: 25rem;overflow-y: auto;">
  166. <!-- item = { id: smid, cqr: cqrVal, jg: fwjgVal, fwdj: fwdjVal, floor: floorVal, jzmj: jzmjVal, zdmj: zdmjVal, address: addressVal, pay: pay, single: BZ } -->
  167. <li v-for="(cqItem, index) in cqResult.gyList" :key="index"
  168. style="margin-bottom: 0.5rem; font-size: 0.8rem">
  169. <el-row>
  170. <el-col :span="20">
  171. <span style="color: #06c4f3; font-weight: 600">{{ index + 1 }}.&nbsp{{ cqItem.cqr }}</span>
  172. </el-col>
  173. <el-col :span="4">
  174. <el-image src="../../../../static/images/location1.png" style="height: 1.5rem; width: 1.5rem"
  175. @click="cqLocation(true, cqItem.smid, cqItem.cqr)"></el-image>
  176. </el-col>
  177. </el-row>
  178. <el-row>
  179. <el-col :span="12"> 结构:{{ cqItem.jg }} </el-col>
  180. <el-col :span="12"> 层数:{{ cqItem.floor }} </el-col>
  181. </el-row>
  182. <el-row>
  183. <el-col :span="12">
  184. 建筑面积:{{ formatterArea(cqItem.jzmj) }}平方米
  185. </el-col>
  186. <!-- <el-col :span="12"> 拆迁补偿:{{ cqItem.pay }}万元 </el-col> -->
  187. </el-row>
  188. <!-- <el-row>
  189. <el-col :span="24">
  190. <el-image src="../../../../static/images/location1.png" style="height: 1.2rem; width: 1.2rem"
  191. @click="cqLocation(true, cqItem.smid, cqItem.cqr)"></el-image>
  192. 地址:{{ cqItem.address }}
  193. </el-col>
  194. </el-row> -->
  195. </li>
  196. </ul>
  197. </el-tab-pane>
  198. </el-tabs>
  199. </el-tab-pane>
  200. <el-tab-pane label="集体评估" name="JT">
  201. <div class="divCol">
  202. <div class="divImg">
  203. <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
  204. </div>
  205. <div class="divText">
  206. <div>
  207. <span style="color: #fff">集体用地(亩)</span>
  208. </div>
  209. <div>
  210. <span color="#2d8cf0">{{ formatterArea(zdResult.jtMJ) }}</span>
  211. </div>
  212. </div>
  213. </div>
  214. <el-tabs v-model="activePage3" @tab-click="jtPageClick">
  215. <!-- <el-tab-pane label="集体权属" name="JTQS">
  216. <div id="GYQSChart" style="height: 12rem; width: 25rem;"></div>
  217. </el-tab-pane> -->
  218. <el-tab-pane label="征地补偿评估" name="ZDPG">
  219. <div class="divrow">
  220. <div class="divCol">
  221. <div class="divImg">
  222. <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
  223. </div>
  224. <div class="divText">
  225. <div>
  226. <span style="color: #fff"> 集体征地补偿费(万元)</span>
  227. </div>
  228. <div>
  229. <span color="#2d8cf0">{{ formatterArea(zdResult.totalPay) }}</span>
  230. </div>
  231. </div>
  232. </div>
  233. <div class="divCol">
  234. <div class="divImg">
  235. <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
  236. </div>
  237. <div class="divText">
  238. <div>
  239. <span style="color: #fff"> 集体土地补偿费(万元)</span>
  240. </div>
  241. <div>
  242. <span color="#2d8cf0">{{ formatterArea(zdResult.totalZDPay) }}</span>
  243. </div>
  244. </div>
  245. </div>
  246. </div>
  247. <!-- 第三行 -->
  248. <div class="divrow">
  249. <!-- 123 -->
  250. <div class="divCol">
  251. <div class="divImg">
  252. <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
  253. </div>
  254. <div class="divText">
  255. <div>
  256. <span style="color: #fff"> 集体安置补偿费(万元)</span>
  257. </div>
  258. <div>
  259. <span color="#2d8cf0">{{ formatterArea(zdResult.totalAZPay) }}</span>
  260. </div>
  261. </div>
  262. </div>
  263. </div>
  264. <div id="JTOWNERChart" style="height:12rem; width: 25rem;"></div>
  265. <div id="JTUSEChart" style="height: 12rem; width: 25rem;"></div>
  266. <div id="JTDLChart" style="height: 12rem; width: 25rem;"></div>
  267. </el-tab-pane>
  268. <el-tab-pane label="青苗补偿评估" name="QMPG">
  269. <!-- 第一行 -->
  270. <div class="divrow">
  271. <div class="divCol">
  272. <div class="divImg">
  273. <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
  274. </div>
  275. <div class="divText">
  276. <div>
  277. <span style="color: #fff"> 补偿面积(亩)</span>
  278. </div>
  279. <div>
  280. <span color="#2d8cf0">{{ formatterArea(qmResult.totalMJ) }}</span>
  281. </div>
  282. </div>
  283. </div>
  284. <!-- 123 -->
  285. <div class="divCol">
  286. <div class="divImg">
  287. <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
  288. </div>
  289. <div class="divText">
  290. <div>
  291. <span style="color: #fff"> 青苗补偿(万元)</span>
  292. </div>
  293. <div>
  294. <span color="#2d8cf0"> {{ formatterArea(qmResult.totalPay) }}</span>
  295. </div>
  296. </div>
  297. </div>
  298. </div>
  299. <!-- 第2行 -->
  300. <div class="divrow">
  301. <div class="divCol">
  302. <div class="divImg">
  303. <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
  304. </div>
  305. <div class="divText">
  306. <div>
  307. <span style="color: #fff"> 农作物补偿面积(亩)</span>
  308. </div>
  309. <div>
  310. <span color="#2d8cf0">{{ formatterArea(qmResult.nzwMJ) }}</span>
  311. </div>
  312. </div>
  313. </div>
  314. <!-- 123 -->
  315. <div class="divCol">
  316. <div class="divImg">
  317. <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
  318. </div>
  319. <div class="divText">
  320. <div>
  321. <span style="color: #fff"> 农作物补偿费用(万元)</span>
  322. </div>
  323. <div>
  324. <span color="#2d8cf0"> {{ formatterArea(qmResult.nzwPay) }}</span>
  325. </div>
  326. </div>
  327. </div>
  328. </div>
  329. <!-- 第3行 -->
  330. <div class="divrow">
  331. <div class="divCol">
  332. <div class="divImg">
  333. <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
  334. </div>
  335. <div class="divText">
  336. <div>
  337. <span style="color: #fff"> 经济作物补偿面积(亩)</span>
  338. </div>
  339. <div>
  340. <span color="#2d8cf0">{{ formatterArea(qmResult.jjzwMJ) }}</span>
  341. </div>
  342. </div>
  343. </div>
  344. <!-- 123 -->
  345. <div class="divCol">
  346. <div class="divImg">
  347. <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
  348. </div>
  349. <div class="divText">
  350. <div>
  351. <span style="color: #fff"> 经济作物补偿费(万元)</span>
  352. </div>
  353. <div>
  354. <span color="#2d8cf0"> {{ formatterArea(qmResult.jjzwPay) }}</span>
  355. </div>
  356. </div>
  357. </div>
  358. </div>
  359. <!-- 第4行 -->
  360. <div class="divrow">
  361. <div class="divCol">
  362. <div class="divImg">
  363. <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
  364. </div>
  365. <div class="divText">
  366. <div>
  367. <span style="color: #fff"> 树木补偿面积(亩)</span>
  368. </div>
  369. <div>
  370. <span color="#2d8cf0">{{ formatterArea(qmResult.smMJ) }}</span>
  371. </div>
  372. </div>
  373. </div>
  374. <!-- 123 -->
  375. <div class="divCol">
  376. <div class="divImg">
  377. <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
  378. </div>
  379. <div class="divText">
  380. <div>
  381. <span style="color: #fff"> 树木补偿费用(万元)</span>
  382. </div>
  383. <div>
  384. <span color="#2d8cf0"> {{ formatterArea(qmResult.smPay) }}</span>
  385. </div>
  386. </div>
  387. </div>
  388. </div>
  389. <div id="QMMJChart" style="height: 10rem; width: 25rem"></div>
  390. <div id="QMFYChart" style="height: 10rem; width: 25rem"></div>
  391. </el-tab-pane>
  392. <el-tab-pane label="房屋拆迁补偿评估" name="FWCQ">
  393. <!-- 第1行 -->
  394. <div class="divrow">
  395. <div class="divCol">
  396. <div class="divImg">
  397. <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
  398. </div>
  399. <div class="divText">
  400. <div>
  401. <span style="color: #fff"> 房屋数量(个)</span>
  402. </div>
  403. <div>
  404. <span color="#2d8cf0">{{ cqResult.jtCount }}</span>
  405. </div>
  406. </div>
  407. </div>
  408. <!-- 123 -->
  409. <div class="divCol">
  410. <div class="divImg">
  411. <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
  412. </div>
  413. <div class="divText">
  414. <div>
  415. <span style="color: #fff"> 房屋建筑面积(平方米)</span>
  416. </div>
  417. <div>
  418. <span color="#2d8cf0"> {{ formatterArea(cqResult.jtJZMJ) }}</span>
  419. </div>
  420. </div>
  421. </div>
  422. </div>
  423. <!-- 第2行 -->
  424. <div class="divrow">
  425. <div class="divCol">
  426. <div class="divImg">
  427. <img :src="imgs.zd1" style="height: 2.5rem; width: 2.5rem" />
  428. </div>
  429. <div class="divText">
  430. <div>
  431. <span style="color: #fff"> 预计补偿(万元)</span>
  432. </div>
  433. <div>
  434. <span color="#2d8cf0">{{ formatterArea(cqResult.totalPay) }}</span>
  435. </div>
  436. </div>
  437. </div>
  438. <!-- 123 -->
  439. <div class="divCol">
  440. <div class="divImg">
  441. <img :src="imgs.zd2" style="height: 2.5rem; width: 2.5rem" />
  442. </div>
  443. <div class="divText">
  444. <div>
  445. <span style="color: #fff"> 平均补偿费(元/平方米)</span>
  446. </div>
  447. <div>
  448. <span color="#2d8cf0"> {{ formatterArea(cqResult.average) }}</span>
  449. </div>
  450. </div>
  451. </div>
  452. </div>
  453. <ul style="width: 25rem;height: 25rem;overflow-y: auto;">
  454. <!-- item = { id: smid, cqr: cqrVal, jg: fwjgVal, fwdj: fwdjVal, floor: floorVal, jzmj: jzmjVal, zdmj: zdmjVal, address: addressVal, pay: pay, single: BZ } -->
  455. <li v-for="(cqItem, index) in cqResult.jtList" :key="index"
  456. style="margin-bottom: 0.5rem; font-size: 0.8rem">
  457. <el-row>
  458. <el-col :span="20">
  459. <span style="color: #06c4f3; font-weight: 600">{{ index + 1 }}.&nbsp{{ cqItem.cqr }}</span>
  460. </el-col>
  461. <el-col :span="4">
  462. <el-image src="../../../../static/images/location1.png" style="height: 1.5rem; width: 1.5rem"
  463. @click="cqLocation(false, cqItem.smid, cqItem.cqr)"></el-image>
  464. <!-- <img src="imgs.zd1" /> -->
  465. <!-- <i class="el-icon-s-operation"></i> -->
  466. </el-col>
  467. </el-row>
  468. <el-row>
  469. <el-col :span="12"> 结构:{{ cqItem.jg }} </el-col>
  470. <el-col :span="12"> 层数:{{ cqItem.floor }} </el-col>
  471. </el-row>
  472. <el-row>
  473. <el-col :span="12">
  474. 建筑面积:{{ formatterArea(cqItem.jzmj) }}平方米
  475. </el-col>
  476. <el-col :span="12"> 拆迁补偿:{{ formatterArea(cqItem.pay) }}万元 </el-col>
  477. </el-row>
  478. <!-- <el-row>
  479. <el-col :span="24">
  480. 地址:{{ cqItem.address }}
  481. </el-col>
  482. </el-row> -->
  483. </li>
  484. </ul>
  485. </el-tab-pane>
  486. </el-tabs>
  487. </el-tab-pane>
  488. </el-tabs>
  489. </el-tab-pane></el-tabs>
  490. </div>
  491. </template>
  492. <script>
  493. import {
  494. polygon,
  495. area,
  496. booleanContains,
  497. intersect,
  498. } from "@turf/turf";
  499. import proj4 from "proj4";
  500. // import shpjs from "shpjs";
  501. import CQSetInfo from "./CQSetInfo.vue";
  502. import CQShowInfo from "./CQShowInfo.vue";
  503. import QMSetInfo from "./QMSetInfo.vue";
  504. import QMShowInfo from "./QMShowInfo.vue";
  505. import ZDSetInfo from "./ZDSetInfo.vue";
  506. import ZDShowInfo from "./ZDShowInfo.vue";
  507. import Property from "./Property.vue";
  508. import {
  509. getCqBcbzList, getZdBcbzList, getQmbcbzList,
  510. getZdProjectList, getZdProjectById, addZdProject, delZdProject,
  511. addQmResult, addCqResult, addZdResult, expotZDBCWord
  512. } from "@/api/zt/ztApi.js";
  513. import zdAnalyse from './zdAnalyse.js'
  514. import Popup from "../Popup.js";
  515. var handlerPolygon;
  516. var handleInput;
  517. var polygonEntity = null;
  518. var popupBox=null;
  519. export default {
  520. props: ["layerid"],
  521. name: "DemolitionList",
  522. data() {
  523. return {
  524. searchName: "",
  525. FileList: [],
  526. localLoading: null,
  527. tableData: [],
  528. imageData: '',
  529. /**
  530. *
  531. */
  532. imgs: {
  533. loc: require("@/assets/images/loc.png"),
  534. /**
  535. * 征地版面图片
  536. */
  537. zd1: require("@/assets/homeimg/1.png"),
  538. zd2: require("@/assets/homeimg/1.png"),
  539. zd3: require("@/assets/homeimg/1.png"),
  540. zd4: require("@/assets/homeimg/1.png"),
  541. /**
  542. * 拆迁版面图片
  543. */
  544. cq1: require("@/assets/homeimg/1.png"),
  545. cq2: require("@/assets/homeimg/1.png"),
  546. cq3: require("@/assets/homeimg/1.png"),
  547. cq4: require("@/assets/homeimg/1.png"),
  548. /**
  549. * 青苗版面图片
  550. */
  551. qm1: require("@/assets/homeimg/1.png"),
  552. qm2: require("@/assets/homeimg/1.png"),
  553. qm3: require("@/assets/homeimg/1.png"),
  554. qm4: require("@/assets/homeimg/1.png"),
  555. },
  556. /**
  557. * tabs 标签
  558. */
  559. activeName: 'first',
  560. activePage1: "GY",
  561. activePage2: 'GYQS',
  562. activePage3: "ZDPG",
  563. /**土地权属 */
  564. activateQS: 'gytd',
  565. /**
  566. * 弹窗保证弹出唯一
  567. */
  568. sublayerid: null,
  569. ruleForm: {
  570. projectName: "",
  571. /**
  572. * 征地标准值
  573. */
  574. zdValue: "",
  575. /* 青苗标准值
  576. */
  577. qmValue: "",
  578. /**
  579. * 拆迁标准值
  580. */
  581. cqValue: "",
  582. },
  583. rules: {
  584. projectName: [
  585. { required: true, message: "请输入项目名称", trigger: "blur" },
  586. ],
  587. zdValue: [
  588. { required: true, message: "请选择征地补偿标准", trigger: "blur" },
  589. ],
  590. qmValue: [
  591. { required: true, message: "请选择青苗补偿标准", trigger: "blur" },
  592. ],
  593. cqValue: [
  594. { required: true, message: "请选择拆迁补偿标准", trigger: "blur" },
  595. ],
  596. },
  597. /**
  598. /**
  599. /**
  600. * 征地标准列表
  601. */
  602. zdList: [
  603. // {
  604. // label: "征地标准01",
  605. // value: '征地标准01',
  606. // rules: {
  607. // /**
  608. // * 土地统一年产值
  609. // */
  610. // TDCZ: 1000,
  611. // /**
  612. // * 土地补偿倍数
  613. // */
  614. // TDBCBS: 10,
  615. // /**
  616. // * 土地补偿费
  617. // */
  618. // TDBCF: 1000,
  619. // /**
  620. // * 安置补偿倍数
  621. // */
  622. // AZBCBS: 10,
  623. // /**
  624. // * 安置补偿费
  625. // */
  626. // ZBBCF: 111,
  627. // // /**
  628. // // * 土地补偿费
  629. // // */
  630. // // BCHJ:1000,
  631. // }
  632. // },
  633. // {
  634. // label: "征地标准02",
  635. // value: '征地标准02',
  636. // rules: {
  637. // /**
  638. // * 土地统一年产值
  639. // */
  640. // TDCZ: 1000,
  641. // /**
  642. // * 土地补偿倍数
  643. // */
  644. // TDBCBS: 10,
  645. // /**
  646. // * 土地补偿费
  647. // */
  648. // TDBCF: 1000,
  649. // /**
  650. // * 安置补偿倍数
  651. // */
  652. // AZBCBS: 10,
  653. // /**
  654. // * 安置补偿费
  655. // */
  656. // ZBBCF: 111,
  657. // // /**
  658. // // * 土地补偿费
  659. // // */
  660. // // BCHJ:1000,
  661. // }
  662. // },
  663. // {
  664. // label: "征地标准03",
  665. // value: '征地标准03',
  666. // rules: {
  667. // /**
  668. // * 土地统一年产值
  669. // */
  670. // TDCZ: 1000,
  671. // /**
  672. // * 土地补偿倍数
  673. // */
  674. // TDBCBS: 10,
  675. // /**
  676. // * 土地补偿费
  677. // */
  678. // TDBCF: 1000,
  679. // /**
  680. // * 安置补偿倍数
  681. // */
  682. // AZBCBS: 10,
  683. // /**
  684. // * 安置补偿费
  685. // */
  686. // ZBBCF: 111,
  687. // // /**
  688. // // * 土地补偿费
  689. // // */
  690. // // BCHJ:1000,
  691. // }
  692. // },
  693. ],
  694. /**
  695. * 青苗标准值
  696. */
  697. qmList: [
  698. // {
  699. // label: "青苗标准01",
  700. // value: '01',
  701. // rules: {
  702. // /**
  703. // * 土地统一年产值
  704. // */
  705. // TDCZ: 1000,
  706. // /**
  707. // * 土地补偿倍数
  708. // */
  709. // TDBCBS: 10,
  710. // /**
  711. // * 土地补偿费
  712. // */
  713. // TDBCF: 1000,
  714. // /**
  715. // * 安置补偿倍数
  716. // */
  717. // AZBCBS: 10,
  718. // /**
  719. // * 安置补偿费
  720. // */
  721. // ZBBCF: 111,
  722. // // /**
  723. // // * 土地补偿费
  724. // // */
  725. // // BCHJ:1000,
  726. // }
  727. // },
  728. // {
  729. // label: "青苗标准02",
  730. // value: '02',
  731. // rules: {
  732. // /**
  733. // * 土地统一年产值
  734. // */
  735. // TDCZ: 1000,
  736. // /**
  737. // * 土地补偿倍数
  738. // */
  739. // TDBCBS: 10,
  740. // /**
  741. // * 土地补偿费
  742. // */
  743. // TDBCF: 1000,
  744. // /**
  745. // * 安置补偿倍数
  746. // */
  747. // AZBCBS: 10,
  748. // /**
  749. // * 安置补偿费
  750. // */
  751. // ZBBCF: 111,
  752. // // /**
  753. // // * 土地补偿费
  754. // // */
  755. // // BCHJ:1000,
  756. // }
  757. // },
  758. // {
  759. // label: "青苗标准03",
  760. // value: '03',
  761. // rules: {
  762. // /**
  763. // * 土地统一年产值
  764. // */
  765. // TDCZ: 1000,
  766. // /**
  767. // * 土地补偿倍数
  768. // */
  769. // TDBCBS: 10,
  770. // /**
  771. // * 土地补偿费
  772. // */
  773. // TDBCF: 1000,
  774. // /**
  775. // * 安置补偿倍数
  776. // */
  777. // AZBCBS: 10,
  778. // /**
  779. // * 安置补偿费
  780. // */
  781. // ZBBCF: 111,
  782. // // /**
  783. // // * 土地补偿费
  784. // // */
  785. // // BCHJ:1000,
  786. // }
  787. // },
  788. ],
  789. /**
  790. * 拆迁标准值
  791. */
  792. cqList: [
  793. // {
  794. // label: "拆迁标准01",
  795. // value: '01',
  796. // rules: {
  797. // /**
  798. // * 土地统一年产值
  799. // */
  800. // TDCZ: 1000,
  801. // /**
  802. // * 土地补偿倍数
  803. // */
  804. // TDBCBS: 10,
  805. // /**
  806. // * 土地补偿费
  807. // */
  808. // TDBCF: 1000,
  809. // /**
  810. // * 安置补偿倍数
  811. // */
  812. // AZBCBS: 10,
  813. // /**
  814. // * 安置补偿费
  815. // */
  816. // ZBBCF: 111,
  817. // // /**
  818. // // * 土地补偿费
  819. // // */
  820. // // BCHJ:1000,
  821. // }
  822. // },
  823. // {
  824. // label: "拆迁标准02",
  825. // value: '02',
  826. // rules: {
  827. // /**
  828. // * 土地统一年产值
  829. // */
  830. // TDCZ: 1000,
  831. // /**
  832. // * 土地补偿倍数
  833. // */
  834. // TDBCBS: 10,
  835. // /**
  836. // * 土地补偿费
  837. // */
  838. // TDBCF: 1000,
  839. // /**
  840. // * 安置补偿倍数
  841. // */
  842. // AZBCBS: 10,
  843. // /**
  844. // * 安置补偿费
  845. // */
  846. // ZBBCF: 111,
  847. // // /**
  848. // // * 土地补偿费
  849. // // */
  850. // // BCHJ:1000,
  851. // }
  852. // },
  853. // {
  854. // label: "拆迁标准03",
  855. // value: '03', rules: {
  856. // /**
  857. // * 土地统一年产值
  858. // */
  859. // TDCZ: 1000,
  860. // /**
  861. // * 土地补偿倍数
  862. // */
  863. // TDBCBS: 10,
  864. // /**
  865. // * 土地补偿费
  866. // */
  867. // TDBCF: 1000,
  868. // /**
  869. // * 安置补偿倍数
  870. // */
  871. // AZBCBS: 10,
  872. // /**
  873. // * 安置补偿费
  874. // */
  875. // ZBBCF: 111,
  876. // // /**
  877. // // * 土地补偿费
  878. // // */
  879. // // BCHJ:1000,
  880. // }
  881. // },
  882. ],
  883. /***
  884. * tab2
  885. */
  886. dateVal: "",
  887. projectList: [
  888. // {
  889. // id: '',
  890. // name: '',
  891. // date: '',
  892. // /* 征地标准值
  893. // */
  894. // zdValue: '',
  895. // /* 青苗标准值
  896. // */
  897. // qmValue: '',
  898. // /**
  899. // * 拆迁标准值
  900. // */
  901. // cqValue: '',
  902. // /**
  903. // * 分析范围
  904. // */
  905. // geometry: {},
  906. // /**
  907. // * 拆迁分析结果
  908. // */
  909. // cqResult: {},
  910. // /**
  911. // * 青苗分析结果
  912. // */
  913. // qmResult: {},
  914. // /**
  915. // * 征地分析结果
  916. // */
  917. // zdResult: {}
  918. // }
  919. ],
  920. rowsCount: 10,
  921. pageSize: 10,
  922. currentPage: 1,
  923. curProjectInfo: {
  924. id: "",
  925. projectName: "",
  926. imageData: "",
  927. totalZDMJ: 0.0,
  928. gyMJ: 0.0,
  929. jtMJ: 0.0,
  930. dateTime: "",
  931. /* 征地标准值
  932. */
  933. zdValue: "",
  934. /* 青苗标准值
  935. */
  936. qmValue: "",
  937. /**
  938. * 拆迁标准值
  939. */
  940. cqValue: "",
  941. /**
  942. * 分析范围
  943. */
  944. regions: {},
  945. /**
  946. * 拆迁分析结果
  947. */
  948. cqResult: {
  949. },
  950. /**
  951. * 青苗分析结果
  952. */
  953. qmResult: {},
  954. /**
  955. * 征地分析结果
  956. */
  957. zdResult: {},
  958. /**
  959. * 权属信息
  960. */
  961. qsResult: {}
  962. },
  963. /**
  964. * 拆迁结果
  965. */
  966. cqResult: {
  967. count: 0,
  968. totalJZMJ: 0,
  969. totalPay: 0,
  970. average: 0,
  971. gyJZMJ: 0,
  972. jtJZMJ: 0,
  973. gyCount: 0,
  974. jtCount: 0,
  975. gyList: [],
  976. jtList: [],
  977. gyfeatures: [],
  978. jtfeatures: [],
  979. fieldInfos: []
  980. },
  981. // {
  982. // id: 3,
  983. // name: '朱长贵明',
  984. // jg: '砖木结构',
  985. // area: 123.98,
  986. // floor: 1,
  987. // address: '朱楼村111号',
  988. // pay: 730021,
  989. // single: 5862,
  990. // },
  991. /**
  992. * 青苗结果
  993. */
  994. qmResult: {
  995. totalPay: 0.0,
  996. totalMJ: 0.0,
  997. nzwMJ: 0.0,
  998. nzwPay: 0.0,
  999. jjzwMJ: 0.0,
  1000. jjzwPay: 0.0,
  1001. smMJ: 0.0,
  1002. smPay: 0.0,
  1003. fieldInfos: [],
  1004. features: [],
  1005. },
  1006. /**
  1007. * 征地结果
  1008. */
  1009. zdResult: {
  1010. //国有面积
  1011. gyMJ: 0,
  1012. //集体面积
  1013. jtMJ: 0,
  1014. //征地面积
  1015. totalZDMJ: 0,
  1016. //总补偿
  1017. totalPay: 0,
  1018. //征地补偿
  1019. totalZDPay: 0,
  1020. //安置补偿
  1021. totalAZPay: 0,
  1022. //国有地类及面积
  1023. gydlList: [],
  1024. //地类及面积
  1025. jtdlList: [],
  1026. gyfeatures: [],
  1027. jtfeatures: [],
  1028. fieldInfos: [],
  1029. },
  1030. /**
  1031. * 权属信息
  1032. */
  1033. qsResult: {
  1034. stateUsedMJ: 0,
  1035. stateUsedFeatures: [],
  1036. stateUsedList: [],
  1037. stateUsedFieldInfos: [],
  1038. collectiveOwnerMJ: 0,
  1039. collectiveOwnerFeatures: [],
  1040. collectiveOwnerList: [],
  1041. collectiveOwnerFieldInfos: [],
  1042. collectiveUsedMJ: 0,
  1043. collectiveUsedList: [],
  1044. collectiveUsedFeatures: [],
  1045. collectiveUsedFieldInfos: []
  1046. },
  1047. /**
  1048. * 绘制多边形
  1049. */
  1050. // handlerPolygon: null,
  1051. positions: [],
  1052. regions: [],
  1053. /**
  1054. * 临时图元信息
  1055. */
  1056. entities: [
  1057. // {type:'zdbc',id:'',entity:null}
  1058. ],
  1059. qsEntities: [],
  1060. // handlerPolygon: null
  1061. // clipMode: Cesium.ModifyRegionMode.CLIP_OUTSIDE;
  1062. gyqsChartdatas: [],
  1063. jtqsChartDatas: []
  1064. };
  1065. },
  1066. created() {
  1067. if (viewer.shadows == false) {
  1068. viewer.shadows = true; //开启场景阴影
  1069. viewer.terrainShadows = true; //地形阴影
  1070. }
  1071. let scene = viewer.scene;
  1072. let layers = scene.layers.layerQueue;
  1073. //图层模型设置阴影
  1074. for (let i = 0; i < layers.length; i++) {
  1075. if (layers[i].shadowType !== 2) {
  1076. layers[i].shadowType = 2;
  1077. // layers[i].refresh();
  1078. }
  1079. }
  1080. this.initSetting();
  1081. },
  1082. methods: {
  1083. formatterArea(area) {
  1084. if (area) {
  1085. return area.toFixed(2);
  1086. }
  1087. return 0.0;
  1088. },
  1089. formatterPay(number) {
  1090. return (number / 10000).toFixed(2);
  1091. },
  1092. /**
  1093. * tas切换
  1094. * @param {String} tab
  1095. * @param {Object} event
  1096. */
  1097. handleClick(tab, event) {
  1098. if (this.activeName == "third") {
  1099. this.pageClick();
  1100. }
  1101. },
  1102. /**
  1103. * 初始化
  1104. */
  1105. initSetting() {
  1106. var that = this;
  1107. var date = new Date()
  1108. that.ruleForm.projectName = "拆迁补偿项目_" + that.formatDateTimeToLong(date)
  1109. if (window.isUseDB) {
  1110. getCqBcbzList().then((res) => {
  1111. if (res) {
  1112. that.cqList = res.rows;
  1113. that.ruleForm.cqValue = that.cqList[0].id
  1114. }
  1115. }).catch((err) => {
  1116. console.log(err)
  1117. })
  1118. getQmbcbzList().then((res) => {
  1119. that.qmList = res.rows;
  1120. that.ruleForm.qmValue = that.qmList[0].id
  1121. }).catch((err) => {
  1122. console.log(err)
  1123. })
  1124. getZdBcbzList().then((res) => {
  1125. that.zdList = res.rows;
  1126. that.ruleForm.zdValue = that.zdList[0].id
  1127. }).catch((err) => {
  1128. console.log(err)
  1129. })
  1130. // getZdProjectList().then((res) => {
  1131. // that.projectList = res.rows;
  1132. // }).catch((err) => {
  1133. // console.log(err)
  1134. // })
  1135. that.queryProject();
  1136. }
  1137. else {
  1138. that.zdList = window.ZSBC.ZDBCList;
  1139. that.cqList = window.ZSBC.CQBCList;
  1140. that.qmList = window.ZSBC.QMBCList;
  1141. that.ruleForm.qmValue = that.qmList[0].id
  1142. that.ruleForm.cqValue = that.cqList[0].id
  1143. that.ruleForm.zdValue = that.zdList[0].id
  1144. var list = JSON.stringify(window.ZSBC.projectList)
  1145. if (list)
  1146. that.projectList = JSON.parse(list)
  1147. }
  1148. },
  1149. /**
  1150. * 查询项目
  1151. */
  1152. queryProject() {
  1153. var startDate;
  1154. var endDate;
  1155. var that = this
  1156. if (this.dateVal == null || this.dateVal == "") {
  1157. // var interval = that.dateVal[1] - that.dateVal[0]
  1158. startDate = "";
  1159. endDate = ""
  1160. }
  1161. else {
  1162. startDate = that.formatDateTime(that.dateVal[0])
  1163. endDate = that.formatDateTime(that.dateVal[1])
  1164. }
  1165. if (window.isUseDB) {
  1166. var queryParams = {
  1167. "pageNum": that.currentPage,
  1168. "pageSize": that.pageSize,
  1169. // "orderByColumn": "zt_zd_project_list.dateTime",
  1170. // "isAsc": "DESC",
  1171. "projectName": that.searchName,
  1172. "params": {
  1173. "beginDateTime": startDate,
  1174. "endDateTime": endDate,
  1175. }
  1176. }
  1177. debugger
  1178. getZdProjectList(queryParams).then((res) => {
  1179. that.projectList = res.rows;
  1180. that.rowsCount = res.total;
  1181. }).catch((err) => {
  1182. console.log(err)
  1183. })
  1184. }
  1185. else {
  1186. var list
  1187. if (that.dateVal != null) {
  1188. if (that.searchName.length > 0)
  1189. list = window.ZSBC.projectList.find(t => t.projectName.indexOf(that.searchName) > -1 && t.dateTime >= startDate &&
  1190. t.dateTime < endDate)
  1191. else
  1192. list = window.ZSBC.projectList.find(t => t.dateTime >= startDate &&
  1193. t.dateTime < endDate).se
  1194. }
  1195. else {
  1196. if (that.searchName.length > 0)
  1197. list = window.ZSBC.projectList.find(t => t.projectName.indexOf(that.searchName) > -1)
  1198. else {
  1199. list = window.ZSBC.projectList
  1200. }
  1201. }
  1202. that.rowsCount = list.length;
  1203. list = list.slice((that.currentPage - 1) * that.pageSize, that.pageSize)
  1204. }
  1205. },
  1206. onCurrentChange() {
  1207. this.queryProject()
  1208. },
  1209. formatDateTimeToLong(date) {
  1210. if (date == undefined || date == null)
  1211. return '';
  1212. var y = date.getFullYear();
  1213. var m = date.getMonth() + 1;
  1214. m = m < 10 ? ('0' + m) : m;
  1215. var d = date.getDate();
  1216. d = d < 10 ? ('0' + d) : d;
  1217. var h = date.getHours();
  1218. h = h < 10 ? ('0' + h) : h;
  1219. var minute = date.getMinutes();
  1220. minute = minute < 10 ? ('0' + minute) : minute;
  1221. var second = date.getSeconds();
  1222. second = second < 10 ? ('0' + second) : second;
  1223. return y.toString() + m.toString() + d.toString() + h.toString() + minute.toString() + second.toString();
  1224. },
  1225. formatDateTime(date) {
  1226. if (date == undefined)
  1227. return '';
  1228. var y = date.getFullYear();
  1229. var m = date.getMonth() + 1;
  1230. m = m < 10 ? ('0' + m) : m;
  1231. var d = date.getDate();
  1232. d = d < 10 ? ('0' + d) : d;
  1233. var h = date.getHours();
  1234. h = h < 10 ? ('0' + h) : h;
  1235. var minute = date.getMinutes();
  1236. minute = minute < 10 ? ('0' + minute) : minute;
  1237. var second = date.getSeconds();
  1238. second = second < 10 ? ('0' + second) : second;
  1239. return y.toString() + '-' + m.toString() + '-' + d.toString() + ' ' + h.toString() + ':' + minute.toString() + ':' + second.toString();
  1240. },
  1241. //关闭窗体
  1242. dialogClose() {
  1243. viewer.entities.removeAll();
  1244. if (handlerPolygon) {
  1245. handlerPolygon.deactivate();
  1246. handlerPolygon.clear();
  1247. }
  1248. this.positions = [];
  1249. this.regions = [];
  1250. if (this.layerid) this.$layer.close(this.layerid);
  1251. },
  1252. /**
  1253. * 导出报告
  1254. * @param item 报告信息
  1255. */
  1256. async handleGetBG(item) {
  1257. debugger;
  1258. if (item) {
  1259. await getZDBCWord(item);
  1260. }
  1261. },
  1262. /**
  1263. *拆迁标准查看
  1264. */
  1265. cqShow() {
  1266. var that = this;
  1267. if (that.sublayerid) that.$layer.close(that.sublayerid);
  1268. var width = 400;
  1269. var top = 500;
  1270. var left = 680; //Math.floor(document.body.clientWidth - width / 2);
  1271. var height = 350;
  1272. that.sublayerid = that.$layer.iframe({
  1273. content: {
  1274. content: CQShowInfo, //传递的组件对象
  1275. parent: this, //当前的vue对象
  1276. data: { cqValue: that.ruleForm.cqValue }, //props
  1277. },
  1278. // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
  1279. area: ["35rem", "40rem"],
  1280. title: "拆迁补偿标准详情",
  1281. maxmin: false,
  1282. shade: false, //是否显示遮罩
  1283. shadeClose: false, //点击遮罩是否关闭
  1284. cancel: () => {
  1285. //关闭事件
  1286. // alert("关闭iframe");
  1287. },
  1288. });
  1289. },
  1290. /**
  1291. * 拆迁标准设置
  1292. */
  1293. cqSet() {
  1294. var that = this;
  1295. if (that.sublayerid) that.$layer.close(that.sublayerid);
  1296. var width = 400;
  1297. var top = 500;
  1298. var left = Math.floor(document.body.clientWidth - width / 2);
  1299. var height = 350;
  1300. that.sublayerid = that.$layer.iframe({
  1301. content: {
  1302. content: CQSetInfo, //传递的组件对象
  1303. parent: this, //当前的vue对象
  1304. data: { cqValue: that.ruleForm.cqValue }, //props
  1305. },
  1306. // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
  1307. area: ["50rem", "48rem"],
  1308. title: "拆迁补偿标准配置",
  1309. maxmin: false,
  1310. shade: false, //是否显示遮罩
  1311. shadeClose: false, //点击遮罩是否关闭
  1312. cancel: () => {
  1313. //关闭事件
  1314. // alert("关闭iframe");
  1315. },
  1316. });
  1317. },
  1318. /**
  1319. *青苗标准查看
  1320. */
  1321. qmShow() {
  1322. var that = this;
  1323. if (that.sublayerid) that.$layer.close(that.sublayerid);
  1324. var width = 400;
  1325. var top = 500;
  1326. var left = Math.floor(document.body.clientWidth - width / 2);
  1327. var height = 350;
  1328. that.sublayerid = that.$layer.iframe({
  1329. content: {
  1330. content: QMShowInfo, //传递的组件对象
  1331. parent: this, //当前的vue对象
  1332. data: { qmValue: that.ruleForm.qmValue }, //props
  1333. },
  1334. // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
  1335. area: ["30rem", "18rem"],
  1336. title: "青苗补偿标准详情",
  1337. maxmin: false,
  1338. shade: false, //是否显示遮罩
  1339. shadeClose: false, //点击遮罩是否关闭
  1340. cancel: () => {
  1341. //关闭事件
  1342. // alert("关闭iframe");
  1343. },
  1344. });
  1345. },
  1346. /**
  1347. * 青苗标准设置
  1348. */
  1349. qmSet() {
  1350. var that = this;
  1351. if (that.sublayerid) that.$layer.close(that.sublayerid);
  1352. var width = 400;
  1353. var top = 500;
  1354. var left = Math.floor(document.body.clientWidth - width / 2);
  1355. var height = 350;
  1356. that.sublayerid = that.$layer.iframe({
  1357. content: {
  1358. content: QMSetInfo, //传递的组件对象
  1359. parent: this, //当前的vue对象
  1360. data: { qmValue: that.ruleForm.qmValue }, //props
  1361. },
  1362. // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
  1363. area: ["35rem", "22rem"],
  1364. title: "青苗补偿标准配置",
  1365. maxmin: false,
  1366. shade: false, //是否显示遮罩
  1367. shadeClose: false, //点击遮罩是否关闭
  1368. cancel: () => {
  1369. //关闭事件
  1370. // alert("关闭iframe");
  1371. },
  1372. });
  1373. },
  1374. /**
  1375. *征地标准查看
  1376. */
  1377. zdShow() {
  1378. var that = this;
  1379. if (that.sublayerid) that.$layer.close(that.sublayerid);
  1380. var width = 400;
  1381. var top = 500;
  1382. var left = Math.floor(document.body.clientWidth - width / 2);
  1383. var height = 350;
  1384. that.sublayerid = that.$layer.iframe({
  1385. content: {
  1386. content: ZDShowInfo, //传递的组件对象
  1387. parent: this, //当前的vue对象
  1388. data: { zdValue: that.ruleForm.zdValue }, //props
  1389. },
  1390. // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
  1391. area: ["35rem", "32rem"],
  1392. title: "征地补偿标准详情",
  1393. maxmin: false,
  1394. shade: false, //是否显示遮罩
  1395. shadeClose: false, //点击遮罩是否关闭
  1396. cancel: () => {
  1397. //关闭事件
  1398. // alert("关闭iframe");
  1399. },
  1400. });
  1401. },
  1402. /**
  1403. * 征地标准设置
  1404. */
  1405. zdSet() {
  1406. var that = this;
  1407. if (that.sublayerid) that.$layer.close(that.sublayerid);
  1408. var width = 400;
  1409. var top = 500;
  1410. var left = Math.floor(document.body.clientWidth - width / 2);
  1411. var height = 350;
  1412. that.sublayerid = that.$layer.iframe({
  1413. content: {
  1414. content: ZDSetInfo, //传递的组件对象
  1415. parent: this, //当前的vue对象
  1416. data: { zdValue: that.ruleForm.zdValue }, //props
  1417. },
  1418. // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
  1419. area: ["35rem", "39rem"],
  1420. title: "征地补偿标准配置",
  1421. maxmin: false,
  1422. shade: false, //是否显示遮罩
  1423. shadeClose: false, //点击遮罩是否关闭
  1424. cancel: () => {
  1425. //关闭事件
  1426. // alert("关闭iframe");
  1427. },
  1428. });
  1429. },
  1430. /**
  1431. * 查看姓名结果
  1432. * @param {object} projectInfo
  1433. */
  1434. showResult(projectInfo) {
  1435. var that = this
  1436. that.activeName = "third";
  1437. debugger
  1438. that.curProjectInfo = projectInfo;
  1439. that.regions = JSON.parse(that.curProjectInfo.regions)
  1440. var nPositions = [];
  1441. that.regions.forEach((item) => {
  1442. nPositions.push(item.x)
  1443. nPositions.push(item.y)
  1444. })
  1445. viewer.entities.removeById('polygon');
  1446. polygonEntity = new Cesium.Entity({
  1447. id: 'polygon',
  1448. polygon: {
  1449. hierarchy: new Cesium.PolygonHierarchy(
  1450. new Cesium.Cartesian3.fromDegreesArray(nPositions)
  1451. ),
  1452. material: Cesium.Color.WHITE.withAlpha(0.3),
  1453. outline: true,
  1454. outlineColor: Cesium.Color.RED,
  1455. outlineWidth: 2.0,
  1456. },
  1457. });
  1458. viewer.entities.add(polygonEntity)
  1459. viewer.flyTo(polygonEntity)
  1460. if (window.isUseDB) {
  1461. getZdProjectById(projectInfo.id).then((res) => {
  1462. projectInfo = res.data
  1463. that.setSeletedReslut(projectInfo);
  1464. }).catch((err) => {
  1465. console.log(err)
  1466. })
  1467. }
  1468. else {
  1469. that.setSeletedReslut(projectInfo);
  1470. }
  1471. },
  1472. /**
  1473. * 根据页面切换加载地图数据 主入口
  1474. */
  1475. loadInitData() {
  1476. var that = this;
  1477. that.entities.forEach((item) => {
  1478. viewer.entities.removeById(item.id);
  1479. });
  1480. that.entities = [];
  1481. that.qsEntities.forEach((item) => {
  1482. viewer.entities.removeById(item.id);
  1483. })
  1484. that.qsEntities = [];
  1485. if (that.activePage1 == "GY") {
  1486. if (that.activePage2 == "GYQS") {
  1487. that.GYQSChart();
  1488. that.GYDLChart();
  1489. }
  1490. // else if (that.activePage2 == "GYFC") {
  1491. // // that.cqLocation(true, null)
  1492. // }
  1493. }
  1494. else {
  1495. if (that.activePage3 == "ZDPG") {
  1496. that.JTDLChart();
  1497. that.JTOwnerChart();
  1498. that.JTUseChart();
  1499. }
  1500. else if (that.activePage3 == "QMPG") {
  1501. that.QMBCChart();
  1502. }
  1503. }
  1504. },
  1505. //显示项目信息
  1506. setSeletedReslut(projectInfo) {
  1507. this.qmResult = {
  1508. totalPay: projectInfo.qmResult.totalPay,
  1509. totalMJ: projectInfo.qmResult.totalMJ,
  1510. nzwMJ: projectInfo.qmResult.nzwMJ,
  1511. nzwPay: projectInfo.qmResult.nzwPay,
  1512. jjzwMJ: projectInfo.qmResult.jjzwMJ,
  1513. jjzwPay: projectInfo.qmResult.jjzwPay,
  1514. smMJ: projectInfo.qmResult.smMJ,
  1515. smPay: projectInfo.qmResult.smPay,
  1516. fieldInfos: JSON.parse(projectInfo.qmResult.fieldInfos),
  1517. features: JSON.parse(projectInfo.qmResult.features),
  1518. }
  1519. this.cqResult = {
  1520. count: projectInfo.cqResult.count,
  1521. totalJZMJ: projectInfo.cqResult.totalJZMJ,
  1522. totalPay: projectInfo.cqResult.totalPay,
  1523. average: projectInfo.cqResult.average,
  1524. gyJZMJ: projectInfo.cqResult.gyJZMJ,
  1525. jtJZMJ: projectInfo.cqResult.jtJZMJ,
  1526. gyCount: projectInfo.cqResult.gyCount,
  1527. jtCount: projectInfo.cqResult.jtCount,
  1528. gyList: JSON.parse(projectInfo.cqResult.gyList),
  1529. jtList: JSON.parse(projectInfo.cqResult.jtList),
  1530. gyfeatures: JSON.parse(projectInfo.cqResult.gyfeatures),
  1531. jtfeatures: JSON.parse(projectInfo.cqResult.jtfeatures),
  1532. fieldInfos: JSON.parse(projectInfo.cqResult.fieldInfos)
  1533. }
  1534. this.zdResult = {
  1535. //国有面积
  1536. gyMJ: projectInfo.zdResult.gyMJ,
  1537. //集体面积
  1538. jtMJ: projectInfo.zdResult.jtMJ,
  1539. //征地面积
  1540. totalZDMJ: projectInfo.zdResult.totalZDMJ,
  1541. //总补偿
  1542. totalPay: projectInfo.zdResult.totalPay,
  1543. //征地补偿
  1544. totalZDPay: projectInfo.zdResult.totalZDPay,
  1545. //安置补偿
  1546. totalAZPay: projectInfo.zdResult.totalAZPay,
  1547. //国有地类及面积
  1548. gydlList: JSON.parse(projectInfo.zdResult.gydlList),
  1549. //地类及面积
  1550. jtdlList: JSON.parse(projectInfo.zdResult.jtdlList),
  1551. gyfeatures: JSON.parse(projectInfo.zdResult.gyfeatures),
  1552. jtfeatures: JSON.parse(projectInfo.zdResult.jtfeatures),
  1553. fieldInfos: JSON.parse(projectInfo.zdResult.fieldInfos),
  1554. }
  1555. this.qsResult = {
  1556. stateUsedMJ: projectInfo.qsResult.stateUsedMJ,
  1557. stateUsedFeatures: JSON.parse(projectInfo.qsResult.stateUsedFeatures),
  1558. stateUsedList: JSON.parse(projectInfo.qsResult.stateUsedList),
  1559. stateUsedFieldInfos: JSON.parse(projectInfo.qsResult.stateUsedFieldInfos),
  1560. collectiveOwnerMJ: projectInfo.qsResult.collectiveOwnerMJ,
  1561. collectiveOwnerFeatures: JSON.parse(projectInfo.qsResult.collectiveOwnerFeatures),
  1562. collectiveOwnerList: JSON.parse(projectInfo.qsResult.collectiveOwnerList),
  1563. collectiveOwnerFieldInfos: JSON.parse(projectInfo.qsResult.collectiveOwnerFieldInfos),
  1564. collectiveUsedMJ: projectInfo.qsResult.collectiveUsedMJ,
  1565. collectiveUsedList: JSON.parse(projectInfo.qsResult.collectiveUsedList),
  1566. collectiveUsedFeatures: JSON.parse(projectInfo.qsResult.collectiveUsedFeatures),
  1567. collectiveUsedFieldInfos: JSON.parse(projectInfo.qsResult.collectiveUsedFieldInfos)
  1568. }
  1569. this.loadInitData()
  1570. // this.JTDLChart();
  1571. // this.GYDLChart();
  1572. // this.QMBCChart();
  1573. // this.GYQSChart();
  1574. // this.JTOwnerChart();
  1575. // this.JTUseChart();
  1576. },
  1577. //删除项目
  1578. deletProject(projectInfo) {
  1579. var that = this
  1580. var id = that.$layer.confirm("确定要删除吗?", {}, function () {
  1581. delZdProject([projectInfo.id]).then((res) => {
  1582. if (res)
  1583. debugger
  1584. that.$layer.close(id)
  1585. that.$message("数据已删除!");
  1586. that.queryProject();
  1587. }).catch((err) => {
  1588. console.log(err)
  1589. })
  1590. }, function () {
  1591. return
  1592. });
  1593. },
  1594. /**
  1595. * 页面切换
  1596. */
  1597. pageClick(tab, event) {
  1598. // var name = tab.name
  1599. this.loadInitData();
  1600. },
  1601. gyPpageClick(tab, event) {
  1602. this.loadInitData();
  1603. },
  1604. jtPageClick(tab, event) {
  1605. this.loadInitData();
  1606. },
  1607. /**
  1608. * 征地权属切换
  1609. */
  1610. qsClick(tab, event) {
  1611. // viewer.entities.removeAll()
  1612. this.entities.forEach((item) => {
  1613. viewer.entities.removeById(item.id)
  1614. })
  1615. this.entities = []
  1616. },
  1617. handlePreview(file) { },
  1618. handleRemove(file, fileList) { },
  1619. beforeRemove(file, fileList) { },
  1620. handleOnChange(file, fileList) { },
  1621. /**
  1622. * 点击导入范围
  1623. */
  1624. inputGeometry() {
  1625. var element = document.getElementById('fileInput')
  1626. // debugger
  1627. // document.getElementsByClassName("el-upload__input")= ""
  1628. if (element)
  1629. element.click();
  1630. },
  1631. handleUpload(event) {
  1632. var element = document.getElementById('fileInput')
  1633. // element.files=[];
  1634. debugger
  1635. if (polygonEntity) {
  1636. viewer.entities.remove(polygonEntity)
  1637. }
  1638. // let fileName = document.getElementsByClassName("el-upload__input")[0].value
  1639. let fileName = event.target.files[0];
  1640. var size = fileName.size
  1641. if (size > 512 * 1024) {
  1642. {
  1643. this.$message("文件大小超限,请重新输入!");
  1644. event.target.value = ''
  1645. return
  1646. }
  1647. }
  1648. let reader = new FileReader();
  1649. var geojson;
  1650. var that = this
  1651. reader.readAsArrayBuffer(fileName);
  1652. reader.onload = function (e) {
  1653. debugger;
  1654. let res = e.target.result; //ArrayBuffer
  1655. shp(res)
  1656. .then(function (res) {
  1657. // self.addGeometry(res)
  1658. geojson = res;
  1659. console.log(geojson);
  1660. that.addGeometry(geojson)
  1661. })
  1662. .catch(function (e) {
  1663. console.log(e);
  1664. });
  1665. event.target.value = ''
  1666. };
  1667. // this.parsingZip();
  1668. },
  1669. /**
  1670. * 导入范围添加图形
  1671. */
  1672. addGeometry(geojson) {
  1673. var that = this;
  1674. proj4.defs("EPSG:4490", "+proj=longlat +ellps=GRS80 +no_defs +type=crs");
  1675. debugger
  1676. var coordinates = geojson.features[0].geometry.coordinates;
  1677. var box = geojson.features[0].geometry.bbox;
  1678. var centerX = (box[0] + box[2]) / 2;
  1679. var centerY = (box[1] + box[3]) / 2;
  1680. var positions = [];
  1681. that.regions = [];
  1682. for (var i = 0; i < coordinates.length; i++) {
  1683. var coor = coordinates[i];
  1684. var nCoor;
  1685. if (coor && coor.length > 0) {
  1686. for (var j = 0; j < coor.length; j++) {
  1687. nCoor = proj4(proj4("EPSG:4326"), proj4("EPSG:4490"), coor[j]);
  1688. that.regions.push({ x: nCoor[0], y: nCoor[1] })
  1689. positions.push(nCoor[0])
  1690. positions.push(nCoor[1])
  1691. }
  1692. }
  1693. }
  1694. viewer.entities.removeById('polygon');
  1695. polygonEntity = new Cesium.Entity({
  1696. id: 'polygon',
  1697. position: Cesium.Cartesian3.fromDegreesArray([
  1698. centerX,
  1699. centerY,
  1700. ]),
  1701. // classificationType: ClassificationType.TERRAIN,
  1702. polygon: {
  1703. hierarchy: new Cesium.PolygonHierarchy(
  1704. new Cesium.Cartesian3.fromDegreesArray(positions)
  1705. ),
  1706. // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
  1707. material: Cesium.Color.WHITE.withAlpha(0.3),
  1708. outline: true,
  1709. outlineColor: Cesium.Color.RED,
  1710. outlineWidth: 2.0,
  1711. },
  1712. });
  1713. that.curProjectInfo.regions = that.regions
  1714. viewer.entities.add(polygonEntity);
  1715. viewer.flyTo(polygonEntity)
  1716. },
  1717. handleExceed(files, fileList) { },
  1718. handleChange(response, file, fileList) {
  1719. console.log(file);
  1720. },
  1721. onchange() {
  1722. console.log("上传失败");
  1723. },
  1724. /**
  1725. * 上传失败
  1726. */
  1727. uploadError(response, file, fileList) {
  1728. this.$message("导入失败,选择其它文件!");
  1729. },
  1730. /**
  1731. * 上传成功
  1732. */
  1733. uploadSuccess(response, file, fileList) {
  1734. debugger;
  1735. console.log("上传成功");
  1736. },
  1737. /**
  1738. * 读取shape zip
  1739. */
  1740. getShapeGeometry(response, file, fileList) {
  1741. const geojson = shpjs("files/pandr.zip");
  1742. },
  1743. /**
  1744. * 拾取实体并查询属性
  1745. */
  1746. pickEntity(prefix) {
  1747. {
  1748. var that = this
  1749. var id = '';
  1750. var pick
  1751. that.tableData = [];
  1752. if (this.sublayerid)
  1753. that.$layer.close(that.sublayerid)
  1754. if (handlerPolygon) {
  1755. handlerPolygon.deactivate()
  1756. handlerPolygon.clear();
  1757. }
  1758. handleInput = new Cesium.ScreenSpaceEventHandler(scene.canvas);
  1759. handleInput.setInputAction(function (movement) {
  1760. pick = viewer.scene.pick(movement.position);
  1761. if (pick != null) {
  1762. that.tableData = [];
  1763. var fieldNames = [];
  1764. var fieldValues = []
  1765. id = pick.id._id
  1766. if (id&&id.indexOf && id.indexOf(prefix) > -1) {
  1767. fieldNames = pick.id.attributes.fieldNames;
  1768. fieldValues = pick.id.attributes.fieldValues;
  1769. for (var i = 0; i < fieldNames.length; i++) {
  1770. if (
  1771. fieldNames[i].name.toUpperCase() == "SMID" ||
  1772. fieldNames[i].name.toUpperCase() == "SMUSERID" ||
  1773. fieldNames[i].name.toUpperCase() == "SMAREA" ||
  1774. fieldNames[i].name.toUpperCase() == "SMPERIMETER" ||
  1775. fieldNames[i].name.toUpperCase() == "SMGEOMETRY" ||
  1776. fieldNames[i].name.toUpperCase() == "OBJECTID" ||
  1777. fieldNames[i].name.toUpperCase() == "SHAPE_LENGTH" ||
  1778. fieldNames[i].name.toUpperCase() == "SHAPE_AREA" ||
  1779. fieldNames[i].name.toUpperCase() == "SHAPE_LENG"
  1780. )
  1781. continue;
  1782. that.tableData.push({
  1783. name: fieldNames[i].caption,
  1784. value: fieldValues[i],
  1785. });
  1786. }
  1787. that.sublayerid = that.$layer.iframe({
  1788. id: 'ss',
  1789. content: {
  1790. content: Property, //传递的组件对象
  1791. parent: that, //当前的vue对象
  1792. data: { tableData: that.tableData }, //props
  1793. },
  1794. // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
  1795. area: ["20rem", "30rem"],
  1796. title: "属性信息",
  1797. maxmin: false,
  1798. shade: false, //是否显示遮罩
  1799. shadeClose: false, //点击遮罩是否关闭
  1800. cancel: () => {
  1801. //关闭事件
  1802. // alert("关闭iframe");
  1803. },
  1804. });
  1805. }
  1806. }
  1807. }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
  1808. }
  1809. },
  1810. /**
  1811. * 获取用地用海分类统一颜色
  1812. */
  1813. getLandColor(name) {
  1814. var color = "rgb(172,255,207)";
  1815. window.colorList.forEach((element) => {
  1816. if (element.name.indexOf(name) > -1)
  1817. color = element.color;
  1818. });
  1819. return color;
  1820. },
  1821. /**
  1822. *征地补偿chart
  1823. */
  1824. JTDLChart() {
  1825. var that = this;
  1826. var chartDom = document.getElementById("JTDLChart");
  1827. var myChart = window.echarts.init(chartDom);
  1828. // this.zdResult.list.push({ 'dlbm': dlbmVal, 'dlmc': dlmcVal, 'mj': insertArea });
  1829. var datas = [];
  1830. var nameLength = 0;
  1831. var colors = [];
  1832. var color;
  1833. that.zdResult.jtdlList.forEach(item => {
  1834. datas.push({ name: item.dlmc, value: item.mj })
  1835. color = that.getLandColor(item.dlmc)
  1836. if (color != null)
  1837. colors.push(color);
  1838. })
  1839. var option = {
  1840. title: {
  1841. text: '现状情况',
  1842. subtext: '',
  1843. top: 'top',
  1844. left: 'center',
  1845. textStyle: {
  1846. color: "#FFFFFF"
  1847. }
  1848. },
  1849. tooltip: {
  1850. trigger: "item",
  1851. },
  1852. legend: {
  1853. type: "scroll",
  1854. orient: "vertical",
  1855. right: 0,
  1856. top: '20%',
  1857. bottom: 20,
  1858. radius: "55%",
  1859. // bottom: 20,
  1860. textStyle: {
  1861. // fontSize: '12px',
  1862. color: "#FFFF",
  1863. },
  1864. pageIconColor: "#ffffff",
  1865. pageTextStyle: {
  1866. color: "#ffffff"
  1867. },
  1868. data: datas.map((t) => t.name),
  1869. formatter: function (name) {
  1870. var val = datas.find((t) => t.name == name).value;
  1871. var lastSpace = (10 - name.length) * 3;
  1872. return name + new Array(lastSpace).join(" ") + val + "亩";
  1873. },
  1874. },
  1875. color: colors, // ['#0a915d', '#bb88dd', '#6699ff', '#d5b158', '#ff6347', 'indigo', 'purple'],
  1876. series: [
  1877. {
  1878. name: "征地补偿分析",
  1879. type: "pie",
  1880. center: ["25%", "50%"],
  1881. radius: ["25%", "45%"],
  1882. avoidLabelOverlap: false,
  1883. // itemStyle: {
  1884. // borderRadius: 10,
  1885. // borderColor: "#fff",
  1886. // borderWidth: 2,
  1887. // },
  1888. label: {
  1889. show: false,
  1890. position: "center",
  1891. },
  1892. emphasis: {
  1893. label: {
  1894. show: true,
  1895. fontSize: 12,
  1896. fontWeight: "bold",
  1897. },
  1898. },
  1899. labelLine: {
  1900. show: false,
  1901. },
  1902. data: datas,
  1903. },
  1904. ],
  1905. };
  1906. myChart.clear()
  1907. myChart.setOption(option);
  1908. var showOrHide = false;
  1909. that.JTDLLoad(null, showOrHide);
  1910. myChart.on("legendselectchanged", function (parmas) {
  1911. that.pickEntity('ZDJTYD');
  1912. var name = parmas.name
  1913. showOrHide = parmas.selected[name]
  1914. that.JTDLLoad(name, showOrHide);
  1915. });
  1916. },
  1917. /**
  1918. * 集体地类展示
  1919. * @param {*} name
  1920. */
  1921. JTDLLoad(name, showOrHide) {
  1922. var that = this;
  1923. var fieldValues = [];
  1924. var dlmcIndex = -1;
  1925. var geometry;
  1926. var dlmcFld = window.ZSBC.ZDBCJS.DLTB.dlmc.field;
  1927. dlmcIndex = that.getfldIndex(that.zdResult.fieldInfos, dlmcFld);
  1928. var dlmc = "";
  1929. var features = that.zdResult.jtfeatures;
  1930. var attributes = {};
  1931. var color = "";
  1932. var colorArr = [3];
  1933. for (var i = 0; i < features.length; i++) {
  1934. fieldValues = features[i].fieldValues;
  1935. if (dlmcIndex > -1) {
  1936. dlmc = fieldValues[dlmcIndex];
  1937. }
  1938. if (name != null && dlmc != name)
  1939. continue;
  1940. var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  1941. var smid = features[i].fieldValues[simIndex];
  1942. var ff = that.entities.find(t => t.id == "ZDJTYD_" + smid)
  1943. var entity;
  1944. if (ff != null) {
  1945. entity = viewer.entities.getById("ZDJTYD_" + smid)
  1946. if (entity != undefined)
  1947. entity.show = showOrHide;
  1948. }
  1949. else {
  1950. var dlColor = that.getLandColor(dlmc);
  1951. var color = dlColor.replace("rgb", "")
  1952. .replace("(", "")
  1953. .replace(")", "");
  1954. var colorArr = color.split(",");
  1955. attributes = {
  1956. fieldNames: that.zdResult.fieldInfos,
  1957. fieldValues: features[i].fieldValues,
  1958. };
  1959. geometry = features[i].geometry;
  1960. var positions = [];
  1961. for (var j = 0; j < geometry.points.length; j++) {
  1962. positions.push(geometry.points[j].x);
  1963. positions.push(geometry.points[j].y);
  1964. }
  1965. var entity = new Cesium.Entity({
  1966. id: "ZDJTYD_" + smid,
  1967. position: Cesium.Cartesian3.fromDegreesArray([
  1968. geometry.center.x,
  1969. geometry.center.y,
  1970. ]),
  1971. show: true,
  1972. polygon: {
  1973. hierarchy: new Cesium.PolygonHierarchy(
  1974. new Cesium.Cartesian3.fromDegreesArray(positions)
  1975. ),
  1976. material: new Cesium.Color(
  1977. parseInt(colorArr[0]) / 255,
  1978. parseInt(colorArr[1]) / 255,
  1979. parseInt(colorArr[2]) / 255,
  1980. 1
  1981. ),
  1982. outline: true,
  1983. outlineColor: Cesium.Color.BLACK,
  1984. outlineWidth: 1.5,
  1985. },
  1986. });
  1987. entity.show = showOrHide;
  1988. entity.attributes = attributes;
  1989. that.entities.push({ type: "ZDJTYD", id: "ZDJTYD_" + smid });
  1990. viewer.entities.add(entity);
  1991. }
  1992. }
  1993. },
  1994. /**
  1995. *国有chart
  1996. */
  1997. GYDLChart() {
  1998. var that = this;
  1999. var chartDom = document.getElementById("GYDLChart");
  2000. var myChart = window.echarts.init(chartDom);
  2001. var datas = [];
  2002. var nameLength = 0;
  2003. var colors = []
  2004. for (var i = 0; i < that.zdResult.gydlList.length; i++) {
  2005. datas.push({
  2006. value: parseFloat((that.zdResult.gydlList[i].mj).toFixed(2)),
  2007. name: that.zdResult.gydlList[i].dlmc,
  2008. });
  2009. var color = that.getLandColor(that.zdResult.gydlList[i].dlmc);
  2010. colors.push(color);
  2011. }
  2012. var option = {
  2013. title: {
  2014. text: '现状情况', //国有所有权信息
  2015. subtext: '',
  2016. top: 'top',
  2017. left: 'center',
  2018. textStyle: {
  2019. color: "#FFFFFF"
  2020. }
  2021. },
  2022. tooltip: {
  2023. trigger: "item",
  2024. },
  2025. legend: {
  2026. type: "scroll",
  2027. orient: "vertical",
  2028. right: 0,
  2029. top: '20%',
  2030. bottom: 20,
  2031. radius: "55%",
  2032. // bottom: 20,
  2033. textStyle: {
  2034. // fontSize: '12px',
  2035. color: "#FFFF",
  2036. },
  2037. pageIconColor: "#ffffff",
  2038. pageTextStyle: {
  2039. color: "#ffffff"
  2040. },
  2041. data: datas.map((t) => t.name),
  2042. formatter: function (name) {
  2043. var val = datas.find((t) => t.name == name).value;
  2044. var spname = '';
  2045. if (name.length > 13)
  2046. spname = name.substring(0, 12) + val + '亩\n' + name.substring(13, name.length)
  2047. else {
  2048. spname = name
  2049. var lastSpace = (13 - spname.length) * 3;
  2050. if (lastSpace < 0)
  2051. lastSpace = 0
  2052. spname += new Array(lastSpace).join(" ") + val + "亩";
  2053. }
  2054. return spname
  2055. },
  2056. },
  2057. color: colors,
  2058. series: [
  2059. {
  2060. name: "国有征地权属分析",
  2061. type: "pie",
  2062. center: ["25%", "50%"],
  2063. radius: ["25%", "45%"],
  2064. avoidLabelOverlap: false,
  2065. // itemStyle: {
  2066. // borderRadius: 1,
  2067. // borderColor: "#fff",
  2068. // borderWidth: 2,
  2069. // },
  2070. label: {
  2071. show: false,
  2072. position: "center",
  2073. },
  2074. emphasis: {
  2075. label: {
  2076. show: true,
  2077. fontSize: 12,
  2078. fontWeight: "bold",
  2079. },
  2080. },
  2081. labelLine: {
  2082. show: false,
  2083. },
  2084. data: datas,
  2085. },
  2086. ],
  2087. };
  2088. myChart.setOption(option);
  2089. var shaowOrHide = false;
  2090. that.GYDLLoad(null, shaowOrHide);
  2091. myChart.on("legendselectchanged", function (parmas) {
  2092. that.pickEntity('ZDGYDL');
  2093. var name = parmas.name
  2094. shaowOrHide = parmas.selected[name]
  2095. that.GYDLLoad(name, shaowOrHide);
  2096. });
  2097. },
  2098. /**
  2099. * 国有地类展示
  2100. * @param {*} datas
  2101. * @param {*} name
  2102. * @param {*} shaowOrHide
  2103. */
  2104. GYDLLoad(name, shaowOrHide) {
  2105. var that = this;
  2106. var color = "";
  2107. // var colors = window.colorList;
  2108. var fieldValues = [];
  2109. var dlmcIndex = -1;
  2110. var dlmcFld = window.ZSBC.ZDBCJS.DLTB.dlmc.field;
  2111. dlmcIndex = that.getfldIndex(that.zdResult.fieldInfos, dlmcFld);
  2112. var dlmc = "";
  2113. var geometry;
  2114. var entity;
  2115. var features = that.zdResult.gyfeatures;
  2116. var attributes = {};
  2117. for (var i = 0; i < features.length; i++) {
  2118. fieldValues = features[i].fieldValues;
  2119. if (dlmcIndex > -1) {
  2120. dlmc = fieldValues[dlmcIndex];
  2121. }
  2122. if (name != null && dlmc != name)
  2123. continue;
  2124. var dlColor = that.getLandColor(dlmc);
  2125. var color = dlColor.replace("rgb", "")
  2126. .replace("(", "")
  2127. .replace(")", "");
  2128. var colorArr = color.split(",");
  2129. var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  2130. var smid = features[i].fieldValues[simIndex]
  2131. var ff = that.entities.find(t => t.id == "ZDGYDL_" + smid)
  2132. if (ff != null) {
  2133. entity = viewer.entities.getById("ZDGYDL_" + smid)
  2134. if (entity != undefined)
  2135. entity.show = shaowOrHide;
  2136. }
  2137. else {
  2138. attributes = {
  2139. fieldNames: that.zdResult.fieldInfos,
  2140. fieldValues: features[i].fieldValues,
  2141. };
  2142. geometry = features[i].geometry;
  2143. fieldValues = features[i].fieldValues;
  2144. // if (qsdwIndex > -1) {
  2145. // qsdw = fieldValues[qsdwIndex];
  2146. // }
  2147. var positions = [];
  2148. for (var j = 0; j < geometry.points.length; j++) {
  2149. positions.push(geometry.points[j].x);
  2150. positions.push(geometry.points[j].y);
  2151. }
  2152. entity = new Cesium.Entity({
  2153. id: "ZDGYDL_" + smid,
  2154. position: Cesium.Cartesian3.fromDegreesArray([
  2155. geometry.center.x,
  2156. geometry.center.y,
  2157. ]),
  2158. show: true,
  2159. // classificationType: ClassificationType.TERRAIN,
  2160. polygon: {
  2161. hierarchy: new Cesium.PolygonHierarchy(
  2162. new Cesium.Cartesian3.fromDegreesArray(positions)
  2163. ),
  2164. // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
  2165. material: new Cesium.Color(
  2166. parseInt(colorArr[0]) / 255,
  2167. parseInt(colorArr[1]) / 255,
  2168. parseInt(colorArr[2]) / 255,
  2169. 1
  2170. ),
  2171. outline: true,
  2172. outlineColor: Cesium.Color.BLACK,
  2173. outlineWidth: 1.5,
  2174. },
  2175. });
  2176. entity.show = shaowOrHide;
  2177. entity.attributes = attributes;
  2178. that.entities.push({ type: name, id: "ZDGYDL_" + smid });
  2179. viewer.entities.add(entity);
  2180. }
  2181. }
  2182. },
  2183. /**
  2184. * 青苗补偿chart
  2185. */
  2186. QMBCChart() {
  2187. var that = this;
  2188. var chartDom1 = document.getElementById("QMMJChart");
  2189. var myChart1 = window.echarts.init(chartDom1);
  2190. var smfl = window.ZSBC.ZDBCJS.DLTB.smfl.fl;
  2191. var nzwfl = window.ZSBC.ZDBCJS.DLTB.nzwfl.fl;
  2192. var jjzwfl = window.ZSBC.ZDBCJS.DLTB.jjzwfl.fl;
  2193. var color3 = window.ZSBC.ZDBCJS.DLTB.smfl.color;
  2194. var color2 = window.ZSBC.ZDBCJS.DLTB.jjzwfl.color;
  2195. var color1 = window.ZSBC.ZDBCJS.DLTB.nzwfl.color;
  2196. var colors = [color1, color2, color3];
  2197. var datas1 = [];
  2198. debugger
  2199. if (that.qmResult) {
  2200. datas1 = [
  2201. { value: this.qmResult.nzwMJ, name: nzwfl },
  2202. { value: this.qmResult.jjzwMJ, name: jjzwfl },
  2203. { value: this.qmResult.smMJ, name: smfl },
  2204. ];
  2205. } else {
  2206. datas1 = [
  2207. { value: 0.0, name: nzwfl },
  2208. { value: 0.0, name: jjzwfl },
  2209. { value: 0.0, name: smfl },
  2210. ];
  2211. }
  2212. var option1 = {
  2213. title: {
  2214. text: "农作物补偿面积",
  2215. // subtext: '',
  2216. left: "center",
  2217. textStyle: {
  2218. fontSize: "16",
  2219. color: "#FFFF",
  2220. },
  2221. },
  2222. tooltip: {
  2223. trigger: "item",
  2224. },
  2225. legend: {
  2226. orient: "vertical",
  2227. right: 0,
  2228. top: "20%",
  2229. radius: "55%",
  2230. // bottom: 20,
  2231. textStyle: {
  2232. // fontSize: '1rem',
  2233. color: "#FFFF",
  2234. }, pageIconColor: "#ffffff",
  2235. pageTextStyle: {
  2236. color: "#ffffff"
  2237. },
  2238. data: datas1.map((t) => t.name),
  2239. formatter: function (name) {
  2240. var val = datas1.find((t) => t.name == name).value;
  2241. return (
  2242. name + new Array(20 - name.length * 3).join(" ") + val + "亩"
  2243. );
  2244. },
  2245. },
  2246. color: colors,
  2247. series: [
  2248. {
  2249. name: "征地补偿分析",
  2250. type: "pie",
  2251. center: ["25%", "45%"],
  2252. radius: ["50%", "70%"],
  2253. avoidLabelOverlap: false,
  2254. // itemStyle: {
  2255. // borderRadius: 1,
  2256. // borderColor: "#fff",
  2257. // borderWidth: 2,
  2258. // },
  2259. label: {
  2260. show: false,
  2261. position: "center",
  2262. },
  2263. emphasis: {
  2264. label: {
  2265. show: true,
  2266. fontSize: 12,
  2267. fontWeight: "bold",
  2268. },
  2269. },
  2270. labelLine: {
  2271. show: false,
  2272. },
  2273. data: datas1,
  2274. },
  2275. ],
  2276. };
  2277. myChart1.setOption(option1);
  2278. var showOrHide = false;
  2279. that.QMBCLoad(null, showOrHide)
  2280. myChart1.on("legendselectchanged", function (parmas) {
  2281. that.pickEntity('ZDQMBC');
  2282. var name = parmas.name
  2283. showOrHide = parmas.selected[name]
  2284. that.QMBCLoad(name, showOrHide)
  2285. });
  2286. var chartDom2 = document.getElementById("QMFYChart");
  2287. var myChart2 = window.echarts.init(chartDom2);
  2288. var datas2 = [];
  2289. debugger
  2290. if (that.qmResult) {
  2291. datas2 = [
  2292. { value: that.qmResult.nzwPay, name: nzwfl },
  2293. { value: that.qmResult.jjzwPay, name: jjzwfl },
  2294. { value: that.qmResult.smPay, name: smfl },
  2295. ];
  2296. } else {
  2297. datas2 = [
  2298. { value: 0.0, name: nzwfl },
  2299. { value: 0.0, name: jjzwfl },
  2300. { value: 0.0, name: smfl },
  2301. ];
  2302. }
  2303. var option2 = {
  2304. title: {
  2305. text: "农作物补偿费用",
  2306. subtext: "",
  2307. left: "center",
  2308. textStyle: {
  2309. fontSize: "16",
  2310. color: "#FFFF",
  2311. },
  2312. },
  2313. tooltip: {
  2314. trigger: "item",
  2315. },
  2316. legend: {
  2317. orient: "vertical",
  2318. right: 0,
  2319. top: "20%",
  2320. radius: "55%",
  2321. // bottom: 20,
  2322. textStyle: {
  2323. // fontSize: '12px',
  2324. color: "#FFFF",
  2325. },
  2326. pageIconColor: "#ffffff",
  2327. pageTextStyle: {
  2328. color: "#ffffff"
  2329. },
  2330. data: datas2.map((t) => t.name),
  2331. formatter: function (name) {
  2332. var val = datas2.find((t) => t.name == name).value;
  2333. return (
  2334. name + new Array(20 - name.length * 3).join(" ") + val + "万元"
  2335. );
  2336. },
  2337. },
  2338. color: colors,
  2339. series: [
  2340. {
  2341. name: "征地补偿分析",
  2342. type: "pie",
  2343. center: ["25%", "45%"],
  2344. radius: ["50%", "70%"],
  2345. avoidLabelOverlap: false,
  2346. // itemStyle: {
  2347. // borderRadius: 1,
  2348. // borderColor: "#fff",
  2349. // borderWidth: 2,
  2350. // },
  2351. label: {
  2352. show: false,
  2353. position: "center",
  2354. },
  2355. emphasis: {
  2356. label: {
  2357. show: true,
  2358. fontSize: 12,
  2359. fontWeight: "bold",
  2360. },
  2361. },
  2362. labelLine: {
  2363. show: false,
  2364. },
  2365. data: datas2,
  2366. },
  2367. ],
  2368. };
  2369. myChart2.setOption(option2);
  2370. },
  2371. QMBCLoad(name, showOrHide) {
  2372. var that = this;
  2373. var dlmcIndex = -1;
  2374. debugger;
  2375. var dlmcFld = window.ZSBC.ZDBCJS.DLTB.dlmc.field;
  2376. dlmcIndex = that.getfldIndex(that.qmResult.fieldInfos, dlmcFld);
  2377. // var smfl = window.ZSBC.ZDBCJS.DLTB.smfl.dlmc;
  2378. // var nzwfl = window.ZSBC.ZDBCJS.DLTB.nzwfl.dlmc;
  2379. // var jjzwfl = window.ZSBC.ZDBCJS.DLTB.jjzwfl.dlmc;
  2380. var dlmc = "";
  2381. var geometry;
  2382. var color3 = window.ZSBC.ZDBCJS.DLTB.smfl.color;
  2383. var color2 = window.ZSBC.ZDBCJS.DLTB.jjzwfl.color;
  2384. var color1 = window.ZSBC.ZDBCJS.DLTB.nzwfl.color;
  2385. var curDLMC;
  2386. var attributes;
  2387. var fieldValues;
  2388. var color;
  2389. var features = that.qmResult.features;
  2390. for (var i = 0; i < features.length; i++) {
  2391. geometry = features[i].geometry;
  2392. fieldValues = features[i].fieldValues;
  2393. if (dlmcIndex > -1) {
  2394. dlmc = fieldValues[dlmcIndex];
  2395. }
  2396. if (name != null) {
  2397. if (name == window.ZSBC.ZDBCJS.DLTB.smfl.fl) {
  2398. curDLMC = window.ZSBC.ZDBCJS.DLTB.smfl.dlmc
  2399. }
  2400. else if (name == window.ZSBC.ZDBCJS.DLTB.nzwfl.fl) {
  2401. curDLMC = window.ZSBC.ZDBCJS.DLTB.nzwfl.dlmc
  2402. }
  2403. else if (name == window.ZSBC.ZDBCJS.DLTB.jjzwfl.fl) {
  2404. curDLMC = window.ZSBC.ZDBCJS.DLTB.jjzwfl.dlmc
  2405. }
  2406. if (curDLMC.indexOf(dlmc) == -1)
  2407. continue;
  2408. }
  2409. if (window.ZSBC.ZDBCJS.DLTB.nzwfl.dlmc.indexOf(dlmc) > -1)
  2410. color = color1
  2411. else if (window.ZSBC.ZDBCJS.DLTB.jjzwfl.dlmc.indexOf(dlmc) > -1)
  2412. color = color2
  2413. else if (window.ZSBC.ZDBCJS.DLTB.smfl.dlmc.indexOf(dlmc) > -1)
  2414. color = color3
  2415. color = color.replace("rgb", "")
  2416. .replace("(", "")
  2417. .replace(")", "");
  2418. var colorArr = color.split(",");
  2419. var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  2420. var smid = features[i].fieldValues[simIndex]
  2421. var ff = that.entities.find(t => t.id == "ZDQMBC_" + smid)
  2422. if (ff != null) {
  2423. var entity = viewer.entities.getById("ZDQMBC_" + smid)
  2424. if (entity != undefined)
  2425. entity.show = showOrHide;
  2426. }
  2427. else {
  2428. var positions = [];
  2429. for (var j = 0; j < geometry.points.length; j++) {
  2430. positions.push(geometry.points[j].x);
  2431. positions.push(geometry.points[j].y);
  2432. }
  2433. var entity = new Cesium.Entity({
  2434. id: "ZDQMBC_" + smid,
  2435. position: Cesium.Cartesian3.fromDegreesArray([
  2436. geometry.center.x,
  2437. geometry.center.y,
  2438. ]),
  2439. // classificationType: ClassificationType.TERRAIN,
  2440. polygon: {
  2441. hierarchy: new Cesium.PolygonHierarchy(
  2442. new Cesium.Cartesian3.fromDegreesArray(positions)
  2443. ),
  2444. // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
  2445. material: new Cesium.Color(
  2446. parseInt(colorArr[0]) / 255,
  2447. parseInt(colorArr[1]) / 255,
  2448. parseInt(colorArr[2]) / 255,
  2449. 1
  2450. ),
  2451. outline: true,
  2452. outlineColor: Cesium.Color.BLACK,
  2453. outlineWidth: 1.5,
  2454. },
  2455. });
  2456. attributes = {
  2457. fieldNames: that.qmResult.fieldInfos,
  2458. fieldValues: features[i].fieldValues,
  2459. };
  2460. entity.show = showOrHide;
  2461. entity.attributes = attributes;
  2462. that.entities.push({ type: "QM", id: "ZDQMBC_" + smid });
  2463. viewer.entities.add(entity);
  2464. }
  2465. }
  2466. },
  2467. /**
  2468. * 拆迁补偿chart
  2469. */
  2470. CQBCChart() {
  2471. // var chartDom = document.getElementById('CQBCChart');
  2472. // var myChart = window.echarts.init(chartDom);
  2473. var item = {
  2474. id: smid,
  2475. smid: smid,
  2476. cqr: cqrVal,
  2477. jg: fwjgVal,
  2478. fwdj: fwdjVal,
  2479. floor: floorVal,
  2480. jzmj: jzmjVal,
  2481. zdmj: zdmjVal,
  2482. address: addressVal,
  2483. pay: pay,
  2484. single: BZ,
  2485. };
  2486. that.cqResult.list.push(item);
  2487. that.cqResult.totalJZMJ += jzmjVal;
  2488. that.cqResult.totalPay += pay;
  2489. },
  2490. /**
  2491. * 国有权属
  2492. */
  2493. GYQSChart() {
  2494. var that = this;
  2495. var chartDom = document.getElementById("GYQSChart");
  2496. var myChart = window.echarts.init(chartDom);
  2497. that.gyqsChartdatas = [];
  2498. var nameLength = 0;
  2499. var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
  2500. // ["rgb(245,248,220)", "rgb(191,233,170)", "rgb(104,177,103)", "rgb(205,245,122)",
  2501. // "rgb(101,205,170)",
  2502. // "rgb(216,215,159)",
  2503. // "rgb(255,255,45)",
  2504. // "rgb(255,211,128)"];
  2505. var color = "";
  2506. var qsList = [];
  2507. for (var i = 0; i < that.qsResult.stateUsedList.length; i++) {
  2508. that.gyqsChartdatas.push({
  2509. value: Number(that.qsResult.stateUsedList[i].mj.toFixed(2)),
  2510. name: that.qsResult.stateUsedList[i].qsdwmc,
  2511. });
  2512. }
  2513. var option = {
  2514. title: {
  2515. text: '权属信息', //国有所有权信息
  2516. subtext: '',
  2517. top: 'top',
  2518. left: 'center',
  2519. textStyle: {
  2520. color: "#FFFFFF"
  2521. }
  2522. },
  2523. tooltip: {
  2524. trigger: "item",
  2525. },
  2526. legend: {
  2527. type: "scroll",
  2528. orient: "vertical",
  2529. right: 0,
  2530. top: '20%',
  2531. bottom: 20,
  2532. radius: "55%",
  2533. // bottom: 20,
  2534. textStyle: {
  2535. // fontSize: '12px',
  2536. color: "#FFFF",
  2537. },
  2538. pageIconColor: "#ffffff",
  2539. pageTextStyle: {
  2540. color: "#ffffff"
  2541. },
  2542. data: that.gyqsChartdatas.map((t) => t.name),
  2543. formatter: function (name) {
  2544. var val = that.gyqsChartdatas.find((t) => t.name == name).value;
  2545. var spname = '';
  2546. if (name.length > 13) {
  2547. spname = name.substring(0, 12) + val + '亩\n' + name.substring(13, name.length)
  2548. }
  2549. else {
  2550. spname = name
  2551. var lastSpace = (13 - spname.length) * 3;
  2552. if (lastSpace < 0)
  2553. lastSpace = 0
  2554. spname += new Array(lastSpace).join(" ") + val + '亩';
  2555. }
  2556. return spname
  2557. },
  2558. // itemStyle: {
  2559. // borderType: 'solid',
  2560. // borderWidth: 1,
  2561. // borderColor: '#ff00ff' //'rgb(255,0,255)'
  2562. // },
  2563. // pageIconColor:"#ffffff"
  2564. },
  2565. color: colors,
  2566. series: [
  2567. {
  2568. name: "",
  2569. type: "pie",
  2570. center: ["25%", "50%"],
  2571. radius: ["35%", "50%"],
  2572. avoidLabelOverlap: false,
  2573. itemStyle: {
  2574. borderRadius: 0,
  2575. borderColor: "#ff00ff",
  2576. borderWidth: 1,
  2577. borderType: 'solid',
  2578. },
  2579. label: {
  2580. show: false,
  2581. position: "center",
  2582. },
  2583. emphasis: {
  2584. label: {
  2585. show: true,
  2586. fontSize: 12,
  2587. fontWeight: "bold",
  2588. },
  2589. },
  2590. labelLine: {
  2591. show: false,
  2592. },
  2593. data: that.gyqsChartdatas,
  2594. },
  2595. ],
  2596. };
  2597. myChart.clear();
  2598. myChart.setOption(option);
  2599. that.GYQSLoad(that.gyqsChartdatas, null, false);
  2600. myChart.on("legendselectchanged", function (parmas) {
  2601. that.pickEntity('ZDGYQS');
  2602. var name = parmas.name
  2603. var showOrHide = parmas.selected[name]
  2604. // var index = Object.keys(parmas.selected).findIndex(t => t == name)
  2605. that.GYQSLoad(that.gyqsChartdatas, name, showOrHide);
  2606. });
  2607. },
  2608. GYQSLoad(datas, name, showOrHide) {
  2609. var that = this;
  2610. //国有信息
  2611. var stateUsedfldVal = "";
  2612. var stateUsedfld = window.ZSBC.ZDBCJS.StateUsed.ownerfld;
  2613. var stateUsedIndex = that.getfldIndex(that.qsResult.stateUsedFieldInfos, stateUsedfld);
  2614. var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
  2615. var fieldValues = [];
  2616. var entity;
  2617. var geometry;
  2618. var features = that.qsResult.stateUsedFeatures;
  2619. var attributes = {};
  2620. for (var i = 0; i < features.length; i++) {
  2621. fieldValues = features[i].fieldValues;
  2622. if (stateUsedIndex > -1) {
  2623. stateUsedfldVal = fieldValues[stateUsedIndex];
  2624. }
  2625. if (name != null && stateUsedfldVal != name)
  2626. continue;
  2627. var index = datas.findIndex(t => t.name == stateUsedfldVal);
  2628. var mod = index % colors.length;
  2629. var color = colors[mod].replace("rgb", "")
  2630. .replace("(", "")
  2631. .replace(")", "");
  2632. var colorArr = color.split(",");
  2633. var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  2634. var smid = features[i].fieldValues[simIndex]
  2635. var ff = that.qsEntities.find(t => t.id == "ZDGYQS_" + smid)
  2636. if (ff != null) {
  2637. entity = viewer.entities.getById("ZDGYQS_" + smid)
  2638. if (entity != undefined)
  2639. entity.show = showOrHide;
  2640. }
  2641. else {
  2642. attributes = {
  2643. fieldNames: that.zdResult.fieldInfos,
  2644. fieldValues: features[i].fieldValues,
  2645. };
  2646. geometry = features[i].geometry;
  2647. fieldValues = features[i].fieldValues;
  2648. let point3ds = [];
  2649. let pointholes = [];
  2650. let startindex = 0;
  2651. for (
  2652. let index = 0;
  2653. index < geometry.parts.length;
  2654. index++
  2655. ) {
  2656. let thisps = [];
  2657. const endindex = startindex + geometry.parts[index];
  2658. let geometryPoints = geometry.points.slice(
  2659. startindex,
  2660. endindex
  2661. );
  2662. for (
  2663. let pointindex = 0;
  2664. pointindex < geometryPoints.length;
  2665. pointindex++
  2666. ) {
  2667. const point = geometryPoints[pointindex];
  2668. thisps.push(point.x);
  2669. thisps.push(point.y);
  2670. }
  2671. if (geometry.partTopo[index] === 1) {
  2672. point3ds.push(Cesium.Cartesian3.fromDegreesArray(thisps));
  2673. } else {
  2674. pointholes.push(Cesium.Cartesian3.fromDegreesArray(thisps));
  2675. }
  2676. startindex = endindex;
  2677. }
  2678. if (point3ds.length > 0 && pointholes.length > 0) {
  2679. let holes = [];
  2680. pointholes.forEach((hole) => {
  2681. holes.push({ positions: hole });
  2682. });
  2683. entity = new Cesium.Entity({
  2684. id: "ZDGYQS_" + smid,
  2685. polygon: {
  2686. hierarchy: {
  2687. // Cesium.PolygonHierarchy
  2688. positions: point3ds[0],
  2689. holes: holes, // Cesium.PolygonHierarchy 数组
  2690. },
  2691. material: new Cesium.Color(
  2692. parseInt(colorArr[0]) / 255,
  2693. parseInt(colorArr[1]) / 255,
  2694. parseInt(colorArr[2]) / 255,
  2695. 0.2
  2696. ),
  2697. outline: true,
  2698. outlineColor: Cesium.Color.DEEPPINK,
  2699. outlineWidth: 1.5,
  2700. },
  2701. });
  2702. } else if (point3ds.length > 0) {
  2703. entity = new Cesium.Entity({
  2704. id: "ZDGYQS_" + smid,
  2705. polygon: {
  2706. hierarchy: point3ds[0],
  2707. material: new Cesium.Color(
  2708. parseInt(colorArr[0]) / 255,
  2709. parseInt(colorArr[1]) / 255,
  2710. parseInt(colorArr[2]) / 255,
  2711. 0.2
  2712. ),
  2713. outline: true,
  2714. outlineColor: Cesium.Color.DEEPPINK,
  2715. outlineWidth: 1.5,
  2716. },
  2717. });
  2718. }
  2719. entity.show = showOrHide;
  2720. entity.attributes = attributes;
  2721. that.qsEntities.push({ type: name, id: "ZDGYQS_" + smid });
  2722. viewer.entities.add(entity);
  2723. }
  2724. }
  2725. },
  2726. /**
  2727. * 集体使用权
  2728. */
  2729. JTUseChart() {
  2730. var that = this;
  2731. var chartDom = document.getElementById("JTUSEChart");
  2732. var myChart = window.echarts.init(chartDom);
  2733. var datas = [];
  2734. var nameLength = 0;
  2735. var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
  2736. for (var i = 0; i < that.qsResult.collectiveUsedList.length; i++) {
  2737. datas.push({
  2738. value: parseFloat(that.qsResult.collectiveUsedList[i].mj.toFixed(2)),
  2739. name: that.qsResult.collectiveUsedList[i].qsdwmc,
  2740. });
  2741. }
  2742. var option = {
  2743. title: {
  2744. text: '集体使用权信息',
  2745. subtext: '',
  2746. top: 'top',
  2747. left: 'center',
  2748. textStyle: {
  2749. color: "#FFFFFF"
  2750. }
  2751. },
  2752. tooltip: {
  2753. trigger: "item",
  2754. },
  2755. legend: {
  2756. type: "scroll",
  2757. orient: "vertical",
  2758. right: 0,
  2759. top: '20%',
  2760. bottom: 20,
  2761. radius: "55%",
  2762. itemStyle: {
  2763. // color: colors[0],
  2764. borderColor: 'rgb(,0,255)',
  2765. borderWidth: 1
  2766. },
  2767. pageIconColor: "#ffffff",
  2768. pageTextStyle: {
  2769. color: "#ffffff"
  2770. },
  2771. // bottom: 20,
  2772. textStyle: {
  2773. // fontSize: '12px',
  2774. color: "#FFFF",
  2775. },
  2776. data: datas.map((t) => t.name),
  2777. formatter: function (name) {
  2778. var val = datas.find((t) => t.name == name).value;
  2779. var spname = '';
  2780. // nameLength = Math.ceil(nameLength / 2)
  2781. if (name.length > 13)
  2782. spname = name.substring(0, 12) + val + "亩" + '\n' + name.substring(13, name.length)
  2783. else {
  2784. spname = name
  2785. var lastSpace = (13 - spname.length) * 3;
  2786. if (lastSpace < 0)
  2787. lastSpace = 0
  2788. spname += new Array(lastSpace).join(" ") + val + "亩" + '\n';
  2789. }
  2790. return spname
  2791. },
  2792. },
  2793. color: colors,
  2794. series: [
  2795. {
  2796. name: "集体使用权信息",
  2797. type: "pie",
  2798. center: ["25%", "50%"],
  2799. radius: ["25%", "45%"],
  2800. avoidLabelOverlap: false,
  2801. // itemStyle: {
  2802. // borderRadius: 10,
  2803. // borderWidth: 1,
  2804. // },
  2805. label: {
  2806. show: false,
  2807. position: "center",
  2808. },
  2809. emphasis: {
  2810. label: {
  2811. show: true,
  2812. fontSize: 12,
  2813. fontWeight: "bold",
  2814. },
  2815. },
  2816. labelLine: {
  2817. show: false,
  2818. },
  2819. data: datas,
  2820. },
  2821. ],
  2822. };
  2823. myChart.clear();
  2824. myChart.setOption(option);
  2825. var shaowOrHide = false;
  2826. that.JTUseLoad(datas, null, shaowOrHide)
  2827. myChart.on("legendselectchanged", function (parmas) {
  2828. that.pickEntity('ZDJTUSE');
  2829. var name = parmas.name
  2830. shaowOrHide = parmas.selected[name]
  2831. that.JTUseLoad(datas, name, shaowOrHide)
  2832. });
  2833. },
  2834. JTUseLoad(datas, name, shaowOrHide) {
  2835. var that = this;
  2836. // //集体使用信息
  2837. var collectiveUsedfldVal = "";
  2838. var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
  2839. var collectiveUsedfld = window.ZSBC.ZDBCJS.CollectiveUsed.ownerfld;
  2840. var collectiveUsedIndex = that.getfldIndex(that.qsResult.collectiveUsedFieldInfos, collectiveUsedfld);
  2841. var color = "";
  2842. var fieldValues = [];
  2843. var geometry;
  2844. var entity;
  2845. var features = that.qsResult.collectiveUsedFeatures;
  2846. var attributes = {};
  2847. for (var i = 0; i < features.length; i++) {
  2848. fieldValues = features[i].fieldValues;
  2849. if (collectiveUsedIndex > -1) {
  2850. collectiveUsedfldVal = fieldValues[collectiveUsedIndex];
  2851. }
  2852. if (name != null && collectiveUsedfldVal != name)
  2853. continue;
  2854. var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  2855. var smid = features[i].fieldValues[simIndex]
  2856. var ff = that.qsEntities.find(t => t.id == "ZDJTUSE_" + smid)
  2857. if (ff != null) {
  2858. entity = viewer.entities.getById("ZDJTUSE_" + smid)
  2859. if (entity != undefined)
  2860. entity.show = shaowOrHide;
  2861. }
  2862. else {
  2863. var index = datas.findIndex(t => t.name == collectiveUsedfldVal)
  2864. var mod = index % colors.length
  2865. var color = colors[mod]
  2866. if (color == null)
  2867. continue;
  2868. color = color.replace("rgb", "")
  2869. .replace("(", "")
  2870. .replace(")", "");
  2871. var colorArr = color.split(",");
  2872. if (colorArr == null || colorArr.length == 0)
  2873. continue;
  2874. attributes = {
  2875. fieldNames: that.zdResult.fieldInfos,
  2876. fieldValues: features[i].fieldValues,
  2877. };
  2878. geometry = features[i].geometry;
  2879. fieldValues = features[i].fieldValues;
  2880. let point3ds = [];
  2881. let pointholes = [];
  2882. let startindex = 0;
  2883. for (
  2884. let index = 0;
  2885. index < geometry.parts.length;
  2886. index++
  2887. ) {
  2888. let thisps = [];
  2889. const endindex = startindex + geometry.parts[index];
  2890. let geometryPoints = geometry.points.slice(
  2891. startindex,
  2892. endindex
  2893. );
  2894. for (
  2895. let pointindex = 0;
  2896. pointindex < geometryPoints.length;
  2897. pointindex++
  2898. ) {
  2899. const point = geometryPoints[pointindex];
  2900. thisps.push(point.x);
  2901. thisps.push(point.y);
  2902. }
  2903. if (geometry.partTopo[index] === 1) {
  2904. point3ds.push(Cesium.Cartesian3.fromDegreesArray(thisps));
  2905. } else {
  2906. pointholes.push(Cesium.Cartesian3.fromDegreesArray(thisps));
  2907. }
  2908. startindex = endindex;
  2909. }
  2910. if (point3ds.length > 0 && pointholes.length > 0) {
  2911. let holes = [];
  2912. pointholes.forEach((hole) => {
  2913. holes.push({ positions: hole });
  2914. });
  2915. entity = new Cesium.Entity({
  2916. id: "ZDJTUSE_" + smid,
  2917. polygon: {
  2918. hierarchy: {
  2919. // Cesium.PolygonHierarchy
  2920. positions: point3ds[0],
  2921. holes: holes, // Cesium.PolygonHierarchy 数组
  2922. },
  2923. material: new Cesium.Color(
  2924. parseInt(colorArr[0]) / 255,
  2925. parseInt(colorArr[1]) / 255,
  2926. parseInt(colorArr[2]) / 255,
  2927. 0.3
  2928. ),
  2929. outline: true,
  2930. outlineColor: Cesium.Color.FUCHSIA,
  2931. outlineWidth: 1.5,
  2932. },
  2933. });
  2934. } else if (point3ds.length > 0) {
  2935. entity = new Cesium.Entity({
  2936. id: "ZDJTUSE_" + smid,
  2937. polygon: {
  2938. hierarchy: point3ds[0],
  2939. material: new Cesium.Color(
  2940. parseInt(colorArr[0]) / 255,
  2941. parseInt(colorArr[1]) / 255,
  2942. parseInt(colorArr[2]) / 255,
  2943. 0.3
  2944. ),
  2945. outline: true,
  2946. outlineColor: Cesium.Color.FUCHSIA,
  2947. outlineWidth: 1.5,
  2948. },
  2949. });
  2950. }
  2951. entity.show = shaowOrHide;
  2952. entity.attributes = attributes;
  2953. that.qsEntities.push({ type: name, id: "ZDJTUSE_" + smid });
  2954. viewer.entities.add(entity);
  2955. }
  2956. }
  2957. },
  2958. /**
  2959. * 集体所有权
  2960. */
  2961. JTOwnerChart() {
  2962. var that = this;
  2963. var chartDom = document.getElementById("JTOWNERChart");
  2964. var myChart = window.echarts.init(chartDom);
  2965. var datas = [];
  2966. var nameLength = 0;
  2967. var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
  2968. var qsList = [];
  2969. for (var i = 0; i < that.qsResult.collectiveOwnerList.length; i++) {
  2970. // var name = that.qsResult.collectiveUsedList[i].qsdwmc;
  2971. datas.push({
  2972. value: parseFloat(that.qsResult.collectiveOwnerList[i].mj.toFixed(2)),
  2973. name: that.qsResult.collectiveOwnerList[i].qsdwmc,
  2974. });
  2975. }
  2976. var option = {
  2977. title: {
  2978. text: '集体所有权信息',
  2979. subtext: '',
  2980. top: 'top',
  2981. left: 'center',
  2982. textStyle: {
  2983. color: "#FFFFFF"
  2984. }
  2985. },
  2986. tooltip: {
  2987. trigger: "item",
  2988. },
  2989. legend: {
  2990. type: "scroll",
  2991. orient: "vertical",
  2992. right: 0,
  2993. top: '20%',
  2994. bottom: 20,
  2995. radius: "55%",
  2996. // bottom: 20,
  2997. textStyle: {
  2998. // fontSize: '12px',
  2999. color: "#FFFF",
  3000. },
  3001. pageIconColor: "#ffffff",
  3002. pageTextStyle: {
  3003. color: "#ffffff"
  3004. },
  3005. data: datas.map((t) => t.name),
  3006. formatter: function (name) {
  3007. var val = datas.find((t) => t.name == name).value;
  3008. var spname = '';
  3009. // nameLength = Math.ceil(nameLength / 2)
  3010. if (name.length > 13)
  3011. spname = name.substring(0, 12) + val + '亩\n' + name.substring(13, name.length) //+ val + "个"
  3012. else {
  3013. spname = name
  3014. var lastSpace = (13 - spname.length) * 3;
  3015. if (lastSpace < 0)
  3016. lastSpace = 0
  3017. spname += new Array(lastSpace).join(" ") + val + '亩';
  3018. }
  3019. return spname
  3020. },
  3021. itemStyle: {
  3022. borderWidth: 1,
  3023. borderColor: 'rgb(0,0,255)'
  3024. },
  3025. },
  3026. color: colors,
  3027. series: [
  3028. {
  3029. name: "集体所有权属分析",
  3030. type: "pie",
  3031. center: ["25%", "50%"],
  3032. radius: ["25%", "45%"],
  3033. avoidLabelOverlap: false,
  3034. // itemStyle: {
  3035. // borderRadius: 10,
  3036. // borderColor: "#fff",
  3037. // borderWidth: 2,
  3038. // },
  3039. label: {
  3040. show: false,
  3041. position: "center",
  3042. },
  3043. emphasis: {
  3044. label: {
  3045. show: true,
  3046. fontSize: 12,
  3047. fontWeight: "bold",
  3048. },
  3049. },
  3050. labelLine: {
  3051. show: false,
  3052. },
  3053. data: datas,
  3054. },
  3055. ],
  3056. };
  3057. var showOrHide = false;
  3058. that.JTOwnerLoad(datas, null, showOrHide);
  3059. myChart.clear();
  3060. myChart.setOption(option);
  3061. myChart.on("legendselectchanged", function (parmas) {
  3062. that.pickEntity('ZDJTOWNER');
  3063. var name = parmas.name
  3064. showOrHide = parmas.selected[name]
  3065. that.JTOwnerLoad(datas, name, showOrHide);
  3066. });
  3067. },
  3068. JTOwnerLoad(datas, name, showOrHide) {
  3069. var that = this;
  3070. var color = "";
  3071. var fieldValues = [];
  3072. var geometry;
  3073. var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
  3074. var entity;
  3075. var features = that.qsResult.collectiveOwnerFeatures;
  3076. var attributes = {};
  3077. // //集体使用信息
  3078. var collectiveUsedownerfldVal = "";
  3079. var collectiveUsedownerfld = window.ZSBC.ZDBCJS.CollectiveOwner.ownerfld;
  3080. var collectiveUsedownerIndex = that.getfldIndex(that.qsResult.collectiveOwnerFieldInfos, collectiveUsedownerfld);
  3081. for (var i = 0; i < features.length; i++) {
  3082. fieldValues = features[i].fieldValues;
  3083. if (collectiveUsedownerIndex > -1) {
  3084. collectiveUsedownerfldVal = fieldValues[collectiveUsedownerIndex];
  3085. }
  3086. if (name != null && collectiveUsedownerfldVal != name)
  3087. continue;
  3088. var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  3089. var smid = features[i].fieldValues[simIndex]
  3090. var ff = that.qsEntities.find(t => t.id == "ZDJTOWNER_" + smid)
  3091. if (ff != null) {
  3092. entity = viewer.entities.getById("ZDJTOWNER_" + smid)
  3093. if (entity != undefined)
  3094. entity.show = showOrHide;
  3095. }
  3096. else {
  3097. attributes = {
  3098. fieldNames: that.zdResult.fieldInfos,
  3099. fieldValues: features[i].fieldValues,
  3100. };
  3101. geometry = features[i].geometry;
  3102. fieldValues = features[i].fieldValues;
  3103. var index = datas.findIndex(t => t.name == collectiveUsedownerfldVal)
  3104. var mod = index % colors.length
  3105. var color = colors[mod]
  3106. if (color == null)
  3107. continue;
  3108. color = color.replace("rgb", "")
  3109. .replace("(", "")
  3110. .replace(")", "");
  3111. var colorArr = color.split(",");
  3112. if (colorArr == null || colorArr.length == 0)
  3113. continue;
  3114. let point3ds = [];
  3115. let pointholes = [];
  3116. let startindex = 0;
  3117. for (
  3118. let index = 0; index < geometry.parts.length; index++) {
  3119. let thisps = [];
  3120. const endindex = startindex + geometry.parts[index];
  3121. let geometryPoints = geometry.points.slice(
  3122. startindex,
  3123. endindex
  3124. );
  3125. for (
  3126. let pointindex = 0;
  3127. pointindex < geometryPoints.length;
  3128. pointindex++
  3129. ) {
  3130. const point = geometryPoints[pointindex];
  3131. thisps.push(point.x);
  3132. thisps.push(point.y);
  3133. }
  3134. if (geometry.partTopo[index] === 1) {
  3135. point3ds.push(Cesium.Cartesian3.fromDegreesArray(thisps));
  3136. } else {
  3137. pointholes.push(Cesium.Cartesian3.fromDegreesArray(thisps));
  3138. }
  3139. startindex = endindex;
  3140. }
  3141. if (point3ds.length > 0 && pointholes.length > 0) {
  3142. let holes = [];
  3143. pointholes.forEach((hole) => {
  3144. holes.push({ positions: hole });
  3145. });
  3146. entity = new Cesium.Entity({
  3147. id: "ZDJTOWNER_" + smid,
  3148. polygon: {
  3149. hierarchy: {
  3150. // Cesium.PolygonHierarchy
  3151. positions: point3ds[0],
  3152. holes: holes, // Cesium.PolygonHierarchy 数组
  3153. },
  3154. material: new Cesium.Color(
  3155. parseInt(colorArr[0]) / 255,
  3156. parseInt(colorArr[1]) / 255,
  3157. parseInt(colorArr[2]) / 255,
  3158. 0.3
  3159. ),
  3160. outline: true,
  3161. outlineColor: Cesium.Color.FUCHSIA,
  3162. outlineWidth: 1.5,
  3163. },
  3164. });
  3165. } else if (point3ds.length > 0) {
  3166. entity = new Cesium.Entity({
  3167. id: "ZDJTOWNER_" + smid,
  3168. polygon: {
  3169. hierarchy: point3ds[0],
  3170. material: new Cesium.Color(
  3171. parseInt(colorArr[0]) / 255,
  3172. parseInt(colorArr[1]) / 255,
  3173. parseInt(colorArr[2]) / 255,
  3174. 0.3
  3175. ),
  3176. outline: true,
  3177. outlineColor: Cesium.Color.FUCHSIA,
  3178. outlineWidth: 1.5,
  3179. },
  3180. });
  3181. }
  3182. entity.show = showOrHide
  3183. entity.attributes = attributes;
  3184. that.qsEntities.push({ type: name, id: "ZDJTOWNER_" + smid });
  3185. viewer.entities.add(entity);
  3186. }
  3187. }
  3188. },
  3189. /**
  3190. * 绘制多边形
  3191. */
  3192. startPolygon() {
  3193. var that = this;
  3194. debugger
  3195. if (handleInput) {
  3196. handleInput.destroy();
  3197. }
  3198. handlerPolygon = new Cesium.DrawHandler(
  3199. viewer,
  3200. Cesium.DrawMode.Polygon,
  3201. 0
  3202. );
  3203. handlerPolygon.activate()
  3204. handlerPolygon.activeEvt.addEventListener(function (isActive) {
  3205. if (isActive == true) {
  3206. viewer.enableCursorStyle = false;
  3207. viewer._element.style.cursor = "";
  3208. // var nodes = document.getElementsByTagName('body')
  3209. // if (nodes.length > 0)
  3210. // nodes[0].className.replace('drawCur','drawCur')
  3211. } else {
  3212. viewer.enableCursorStyle = true;
  3213. // var nodes = document.getElementsByTagName('body')
  3214. // if (nodes.length > 0) {
  3215. // nodes[0].className.replace('drawCur','')
  3216. // }
  3217. }
  3218. });
  3219. handlerPolygon.movingEvt.addEventListener(function (windowPosition) {
  3220. // if (this.handlerPolygon.isDrawing) {
  3221. // window.createTooltip.showAt(windowPosition, '点击确定多边形顶点,右键单击结束绘制,');
  3222. // } else {
  3223. // window.createTooltip.showAt(windowPosition, '点击绘制第一个点,');
  3224. // }
  3225. });
  3226. handlerPolygon.drawEvt.addEventListener(function (result) {
  3227. // handlerPolygon.polygon.show = false;
  3228. // handlerPolygon.polyline.show = false;
  3229. var nPositions = [];
  3230. that.regions = [];
  3231. for (var pt of result.object.positions) {
  3232. var cartographic = Cesium.Cartographic.fromCartesian(pt);
  3233. var longitude = Cesium.Math.toDegrees(cartographic.longitude);
  3234. var latitude = Cesium.Math.toDegrees(cartographic.latitude);
  3235. var height = cartographic.height;
  3236. that.regions.push({ x: longitude, y: latitude });
  3237. nPositions.push(longitude)
  3238. nPositions.push(latitude)
  3239. }
  3240. that.regions.push(that.regions[0]);
  3241. viewer.entities.removeAll();
  3242. polygonEntity = new Cesium.Entity({
  3243. id: 'polygon',
  3244. // position: Cesium.Cartesian3.fromDegreesArray([
  3245. // centerX,
  3246. // centerY,
  3247. // ]),
  3248. // classificationType: ClassificationType.TERRAIN,
  3249. polygon: {
  3250. hierarchy: new Cesium.PolygonHierarchy(
  3251. new Cesium.Cartesian3.fromDegreesArray(nPositions)
  3252. ),
  3253. // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
  3254. material: Cesium.Color.WHITE.withAlpha(0.3),
  3255. outline: true,
  3256. outlineColor: Cesium.Color.RED,
  3257. outlineWidth: 2.0,
  3258. },
  3259. });
  3260. viewer.entities.add(polygonEntity)
  3261. that.curProjectInfo.regions = that.regions;
  3262. // that.regions = [];
  3263. // that.regions.push(that.positions);
  3264. viewer.flyTo(polygonEntity)
  3265. handlerPolygon.clear()
  3266. handlerPolygon.deactivate();
  3267. });
  3268. },
  3269. clipImage() {
  3270. var that = this;
  3271. var promise = scene.outputSceneToFile();
  3272. Cesium.when(promise, function (base64data) {
  3273. that.imageData = base64data
  3274. })
  3275. },
  3276. /**
  3277. * 点击绘制多边形
  3278. */
  3279. drawPolygon() {
  3280. viewer.entities.removeAll();
  3281. if (polygonEntity) {
  3282. viewer.entities.remove(polygonEntity)
  3283. }
  3284. this.startPolygon();
  3285. // else {
  3286. // handlerPolygon=;
  3287. // this.positions = [];
  3288. // this.regions = [];
  3289. // }
  3290. // handlerPolygon.activate();
  3291. },
  3292. /**
  3293. * 拆迁定位
  3294. * @param {string} smid 图斑id
  3295. * @param {string} cqr //产权人
  3296. */
  3297. cqLocation(isGYFC, smid, cqr) {
  3298. var features;
  3299. var that = this;
  3300. if (isGYFC == true)
  3301. features = that.cqResult.gyfeatures;
  3302. else
  3303. features = that.cqResult.jtfeatures;
  3304. var fieldNames = [];
  3305. var smidIndex = -1;
  3306. var fieldValues = [];
  3307. var geometry = null;
  3308. if (features == null) return;
  3309. var attributes;
  3310. //产权人
  3311. var entity;
  3312. // var index = that.entities.findIndex(t => t.id == "ZDBDC_" + smid)
  3313. // if (index > -1) {
  3314. // entity = viewer.entities.getById("ZDBDC_" + smid);
  3315. // entity.show = true;
  3316. // viewer.entities.removeById('aad')
  3317. // var point = new Cesium.Entity({
  3318. // id: "aad",
  3319. // position: entity.position,
  3320. // point: {
  3321. // // 点的大小(像素)
  3322. // pixelSize: 10,
  3323. // // 点位颜色,fromCssColorString 可以直接使用CSS颜色
  3324. // color: Cesium.Color.RED.withAlpha(0),
  3325. // // 边框颜色
  3326. // outlineColor: Cesium.Color.fromCssColorString("#fff").withAlpha(0),
  3327. // // 边框宽度(像素)
  3328. // outlineWidth: 2,
  3329. // // 显示在距相机的距离处的属性,多少区间内是可以显示的
  3330. // // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
  3331. // // 0,
  3332. // // 1500
  3333. // // ),
  3334. // // 是否显示
  3335. // show: true,
  3336. // }
  3337. // })
  3338. // viewer.entities.add(point);
  3339. // viewer.flyTo(point)
  3340. // setTimeout(function () {
  3341. // viewer.entities.removeById('aad')
  3342. // }, 3000)
  3343. // }
  3344. // else {
  3345. // var curID;
  3346. // for (var i = 0; i < features.length; i++) {
  3347. // fieldNames = features[i].fieldNames;
  3348. // fieldValues = features[i].fieldValues;
  3349. // smidIndex = fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  3350. // attributes = {
  3351. // fieldNames: fieldNames,
  3352. // fieldValues: fieldValues,
  3353. // };
  3354. // curID = fieldValues[smidIndex];
  3355. // if (curID != smid)
  3356. // continue;
  3357. // geometry = features[i].geometry;
  3358. // var positions = [];
  3359. // for (var i = 0; i < geometry.points.length; i++) {
  3360. // positions.push(geometry.points[i].x);
  3361. // positions.push(geometry.points[i].y);
  3362. // }
  3363. // entity = new Cesium.Entity({
  3364. // id: "ZDBDC_" + smid,
  3365. // // label: {
  3366. // // text: cqr,
  3367. // // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
  3368. // // font: "14px sans-serif",
  3369. // // fillColor: new Cesium.Color(1, 0, 0, 1),
  3370. // // showBackground: true,
  3371. // // backgroundColor: new Cesium.Color(0, 0.8, 0, 0.8)
  3372. // // },
  3373. // position: Cesium.Cartesian3.fromDegrees(
  3374. // geometry.center.x,
  3375. // geometry.center.y,
  3376. // 50
  3377. // ),
  3378. // show: true,
  3379. // polygon: {
  3380. // hierarchy: new Cesium.PolygonHierarchy(
  3381. // new Cesium.Cartesian3.fromDegreesArray(positions)
  3382. // ),
  3383. // // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
  3384. // material: new Cesium.Color(255 / 255, 211 / 255, 128 / 255, 1),
  3385. // outline: true,
  3386. // outlineColor: Cesium.Color.BLACK,
  3387. // outlineWidth: 1.5,
  3388. // },
  3389. // });
  3390. // entity.attributes = attributes;
  3391. // viewer.entities.add(entity);
  3392. // that.entities.push({ type: "ZDBDC", id: "ZDBDC_" + smid })
  3393. // viewer.entities.removeById('aad')
  3394. // var point = new Cesium.Entity({
  3395. // id: 'aad',
  3396. // position: entity.position,
  3397. // point: {
  3398. // // 点的大小(像素)
  3399. // pixelSize: 10,
  3400. // // 点位颜色,fromCssColorString 可以直接使用CSS颜色
  3401. // color: Cesium.Color.RED.withAlpha(0),
  3402. // // 边框颜色
  3403. // outlineColor: Cesium.Color.fromCssColorString("#fff").withAlpha(0),
  3404. // // 边框宽度(像素)
  3405. // outlineWidth: 2,
  3406. // // 显示在距相机的距离处的属性,多少区间内是可以显示的
  3407. // // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
  3408. // // 0,
  3409. // // 1500
  3410. // // ),
  3411. // // 是否显示
  3412. // show: true,
  3413. // }
  3414. // })
  3415. // viewer.entities.add(point);
  3416. // viewer.flyTo(point)
  3417. // setTimeout(function () {
  3418. // viewer.entities.removeById('aad')
  3419. // }, 3000)
  3420. // }
  3421. // }
  3422. var index = that.entities.findIndex(t => t.id == "ZDBDC_FC")
  3423. if (index == -1) {
  3424. that.entities.push({ type: "ZDBDC", id: "ZDBDC_FC" });
  3425. }
  3426. viewer.entities.removeById('ZDBDC_FC');
  3427. viewer.entities.removeById('aad')
  3428. if(popupBox){
  3429. popupBox.destroy();
  3430. popupBox=null;
  3431. }
  3432. var curID;
  3433. for (var i = 0; i < features.length; i++) {
  3434. fieldNames = features[i].fieldNames;
  3435. fieldValues = features[i].fieldValues;
  3436. smidIndex = fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  3437. attributes = {
  3438. fieldNames: fieldNames,
  3439. fieldValues: fieldValues,
  3440. };
  3441. curID = fieldValues[smidIndex];
  3442. if (curID != smid)
  3443. continue;
  3444. geometry = features[i].geometry;
  3445. var positions = [];
  3446. for (var i = 0; i < geometry.points.length; i++) {
  3447. positions.push(geometry.points[i].x);
  3448. positions.push(geometry.points[i].y);
  3449. }
  3450. let dom = document.createElement("div");
  3451. dom.id = "ZDBDC_FCtext";
  3452. dom.style.position = "absolute";
  3453. dom.style.width = "0";
  3454. dom.style.height = "0";
  3455. // dom.style.color = "rgba(2, 23, 44, 0.8)";
  3456. // dom.style.backgroundColor = "rgba(2, 23, 44, 0.8)";
  3457. dom.style.fontSize = "1rem";
  3458. let domContent = document.createElement("div");
  3459. domContent.style.position = "absolute";
  3460. domContent.style.borderRadius = "5px";
  3461. domContent.style.border = "1px solid rgba(7, 131, 250, 0.3)";
  3462. domContent.style.backgroundColor = "rgba(2, 23, 44, 0.7)";
  3463. domContent.style.bottom = "0px";
  3464. domContent.style.left = "0px";
  3465. domContent.style.whiteSpace = "nowrap";
  3466. domContent.style.color = "white";
  3467. // domContent.style.padding = "8px 12px";
  3468. domContent.style.transform = "translate(-50%, 0%)";
  3469. domContent.innerHTML = cqr;
  3470. dom.appendChild(domContent);
  3471. popupBox = new Popup({
  3472. viewer: viewer,
  3473. element: dom,
  3474. pixelOffset: new Cesium.Cartesian2(0, 0),
  3475. translucencyByDistance: new Cesium.NearFarScalar(
  3476. 0,
  3477. 1,
  3478. 50000,
  3479. 1
  3480. ),
  3481. distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
  3482. 0,
  3483. 51000
  3484. ),
  3485. position: Cesium.Cartesian3.fromDegrees(geometry.center.x,geometry.center.y,20),
  3486. });
  3487. popupBox.show();
  3488. entity = new Cesium.Entity({
  3489. id: "ZDBDC_FC",
  3490. // label: {
  3491. // text: cqr,
  3492. // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
  3493. // font: "14px sans-serif",
  3494. // fillColor: new Cesium.Color(1, 0, 0, 1),
  3495. // showBackground: true,
  3496. // backgroundColor: new Cesium.Color(0, 0.8, 0, 0.8)
  3497. // },
  3498. position: Cesium.Cartesian3.fromDegrees(
  3499. geometry.center.x,
  3500. geometry.center.y,
  3501. 50
  3502. ),
  3503. show: true,
  3504. polygon: {
  3505. hierarchy: new Cesium.PolygonHierarchy(
  3506. new Cesium.Cartesian3.fromDegreesArray(positions)
  3507. ),
  3508. material: new Cesium.Color(255 / 255, 211 / 255, 128 / 255, 1),
  3509. outline: true,
  3510. outlineColor: Cesium.Color.BLACK,
  3511. outlineWidth: 1.5,
  3512. },
  3513. });
  3514. entity.attributes = attributes;
  3515. viewer.entities.add(entity);
  3516. }
  3517. var point = new Cesium.Entity({
  3518. id: "aad",
  3519. position: entity.position,
  3520. point: {
  3521. // 点的大小(像素)
  3522. pixelSize: 10,
  3523. // 点位颜色,fromCssColorString 可以直接使用CSS颜色
  3524. color: Cesium.Color.RED.withAlpha(0),
  3525. // 边框颜色
  3526. outlineColor: Cesium.Color.fromCssColorString("#fff").withAlpha(0),
  3527. // 边框宽度(像素)
  3528. outlineWidth: 2,
  3529. // 显示在距相机的距离处的属性,多少区间内是可以显示的
  3530. // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
  3531. // 0,
  3532. // 1500
  3533. // ),
  3534. // 是否显示
  3535. show: true,
  3536. }
  3537. })
  3538. viewer.entities.add(point);
  3539. viewer.flyTo(point);
  3540. setTimeout(function () {
  3541. viewer.entities.removeById('aad');
  3542. }, 3000)
  3543. },
  3544. /**
  3545. * 点击确定开始计算
  3546. */
  3547. submitForm(formName) {
  3548. var that = this;
  3549. if (that.regions.length == 0) {
  3550. that.$alert("请导入或绘制项目范围", "警告");
  3551. // alert('请导入或绘制项目范围')
  3552. return false;
  3553. }
  3554. console.log(JSON.stringify(that.regions));
  3555. debugger
  3556. var area = that.getRegionArea() / 666.66;
  3557. if (area > 3000) {
  3558. that.$alert("项目范围不要超过3000亩,请重新输入项目范围", "警告");
  3559. viewer.entities.removeAll();
  3560. return false;
  3561. }
  3562. that.loading = that.$loading({
  3563. lock: true,
  3564. text: '正在数据分析,请稍后...',
  3565. spinner: 'el-icon-loading',
  3566. background: 'rgba(0, 0, 0, 0.7)'
  3567. });
  3568. that.clipImage();
  3569. that.$refs[formName].validate(async (valid) => {
  3570. if (valid) {
  3571. //alert('submit!');
  3572. // that.doQuery();
  3573. //脚本函数
  3574. var param = {
  3575. geometry: that.regions,
  3576. zdValue: that.ruleForm.zdValue,
  3577. cqValue: that.ruleForm.cqValue,
  3578. qmValue: that.ruleForm.qmValue
  3579. }
  3580. var jdResult = await zdAnalyse.doQuery(param);
  3581. if (jdResult) {
  3582. that.zdResult = jdResult.zdResult;
  3583. that.cqResult = jdResult.cqResult;
  3584. that.qmResult = jdResult.qmResult;
  3585. that.qsResult = jdResult.qsResult;
  3586. }
  3587. that.loading.close();
  3588. that.$message({
  3589. message: "征地分析计算完成",
  3590. type: "success",
  3591. });
  3592. var date = new Date();
  3593. debugger
  3594. var projectName = that.ruleForm.projectName;
  3595. var item = {
  3596. "id": that.projectList.length + 1,
  3597. "projectName": projectName,
  3598. "imageData": that.imageData,
  3599. // 分析范围
  3600. "regions": JSON.stringify(that.regions),
  3601. "gyMJ": parseFloat(that.zdResult.gyMJ.toFixed(2)),
  3602. //集体面积
  3603. "jtMJ": parseFloat(that.zdResult.jtMJ.toFixed(2)),
  3604. //征地面积
  3605. "totalZDMJ": parseFloat(that.zdResult.totalZDMJ.toFixed(2)),
  3606. "dateTime": that.dateFormat(date),
  3607. /* 征地标准值
  3608. // */
  3609. "zdValue": that.ruleForm.zdValue,
  3610. // // zdZBData: window.ZSBC.ZDBCList.find(c => c.value == that.ruleForm.zdValue),
  3611. // /* 青苗标准值
  3612. // */
  3613. "qmValue": that.ruleForm.qmValue,
  3614. // // qmZBData: window.ZSBC.QMBCList.find(c => c.value == that.ruleForm.qmValue),
  3615. // /**
  3616. // * 拆迁标准值
  3617. // */
  3618. "cqValue": that.ruleForm.cqValue,
  3619. // // cqZBData: window.ZSBC.CQBCList.find(c => c.value == that.ruleForm.cqValue),
  3620. /**
  3621. * 拆迁分析结果
  3622. */
  3623. "cqResult": {
  3624. "id": null,
  3625. "projectId": null,
  3626. "count": that.cqResult.count,
  3627. "totalJZMJ": parseFloat(that.cqResult.totalJZMJ.toFixed(2)),
  3628. "totalPay": parseFloat(that.cqResult.totalPay.toFixed(2)),
  3629. "average": parseFloat(that.cqResult.average.toFixed(2)),
  3630. "gyJZMJ": parseFloat(that.cqResult.gyJZMJ.toFixed(2)),
  3631. "jtJZMJ": parseFloat(that.cqResult.jtJZMJ.toFixed(2)),
  3632. "gyCount": that.cqResult.gyCount,
  3633. "jtCount": that.cqResult.jtCount,
  3634. "gyList": JSON.stringify(that.cqResult.gyList),
  3635. "jtList": JSON.stringify(that.cqResult.jtList),
  3636. "gyfeatures": JSON.stringify(that.cqResult.gyfeatures),
  3637. "jtfeatures": JSON.stringify(that.cqResult.jtfeatures),
  3638. "fieldInfos": JSON.stringify(that.cqResult.fieldInfos)
  3639. },
  3640. /**
  3641. * 青苗分析结果
  3642. */
  3643. "qmResult": {
  3644. "id": null,
  3645. "projectId": null,
  3646. "totalPay": parseFloat(that.qmResult.totalPay.toFixed(2)),
  3647. "totalMJ": parseFloat(that.qmResult.totalMJ.toFixed(2)),
  3648. "nzwMJ": parseFloat(that.qmResult.nzwMJ.toFixed(2)),
  3649. "nzwPay": parseFloat(that.qmResult.nzwPay.toFixed(2)),
  3650. "jjzwMJ": parseFloat(that.qmResult.jjzwMJ.toFixed(2)),
  3651. "jjzwPay": parseFloat(that.qmResult.jjzwPay.toFixed(2)),
  3652. "smMJ": parseFloat(that.qmResult.smMJ.toFixed(2)),
  3653. "smPay": parseFloat(that.qmResult.smPay.toFixed(2)),
  3654. "fieldInfos": JSON.stringify(that.qmResult.fieldInfos),
  3655. "features": JSON.stringify(that.qmResult.features),
  3656. },
  3657. /**
  3658. * 征地分析结果
  3659. */
  3660. "zdResult": {
  3661. "id": null,
  3662. "projectId": null,
  3663. //国有面积
  3664. "gyMJ": parseFloat(that.zdResult.gyMJ.toFixed(2)),
  3665. //集体面积
  3666. "jtMJ": parseFloat(that.zdResult.jtMJ.toFixed(2)),
  3667. //征地面积
  3668. "totalZDMJ": parseFloat(that.zdResult.totalZDMJ.toFixed(2)),
  3669. //总补偿
  3670. "totalPay": parseFloat(that.zdResult.totalPay.toFixed(2)),
  3671. //征地补偿
  3672. "totalZDPay": parseFloat(that.zdResult.totalZDPay.toFixed(2)),
  3673. //安置补偿
  3674. "totalAZPay": parseFloat(that.zdResult.totalAZPay.toFixed(2)),
  3675. //国有地类及面积
  3676. "gydlList": JSON.stringify(that.zdResult.gydlList),
  3677. //地类及面积
  3678. "jtdlList": JSON.stringify(that.zdResult.jtdlList),
  3679. "gyfeatures": JSON.stringify(that.zdResult.gyfeatures),
  3680. "jtfeatures": JSON.stringify(that.zdResult.jtfeatures),
  3681. "fieldInfos": JSON.stringify(that.zdResult.fieldInfos),
  3682. },
  3683. /**
  3684. * 权属结果
  3685. */
  3686. "qsResult": {
  3687. "id": null,
  3688. "projectId": null,
  3689. "stateUsedMJ": parseFloat(that.qsResult.stateUsedMJ.toFixed(2)),
  3690. "stateUsedFeatures": JSON.stringify(that.qsResult.stateUsedFeatures),
  3691. "stateUsedList": JSON.stringify(that.qsResult.stateUsedList),
  3692. "stateUsedFieldInfos": JSON.stringify(that.qsResult.stateUsedFieldInfos),
  3693. "collectiveOwnerMJ": parseFloat(that.qsResult.collectiveOwnerMJ.toFixed(2)),
  3694. "collectiveOwnerFeatures": JSON.stringify(that.qsResult.collectiveOwnerFeatures),
  3695. "collectiveOwnerList": JSON.stringify(that.qsResult.collectiveOwnerList),
  3696. "collectiveOwnerFieldInfos": JSON.stringify(that.qsResult.collectiveOwnerFieldInfos),
  3697. "collectiveUsedMJ": parseFloat(that.qsResult.collectiveUsedMJ.toFixed(2)),
  3698. "collectiveUsedList": JSON.stringify(that.qsResult.collectiveUsedList),
  3699. "collectiveUsedFeatures": JSON.stringify(that.qsResult.collectiveUsedFeatures),
  3700. "collectiveUsedFieldInfos": JSON.stringify(that.qsResult.collectiveUsedFieldInfos)
  3701. }
  3702. };
  3703. // 保存项目
  3704. if (window.isUseDB)
  3705. that.saveAnalysResult(item);
  3706. else {
  3707. var dd = JSON.stringify(item);
  3708. var sd = JSON.parse(dd);
  3709. that.curProjectInfo = sd;
  3710. that.projectList.push(sd);
  3711. var list = JSON.stringify(that.projectList.reverse())
  3712. window.ZSBC.projectList = JSON.parse(list)
  3713. }
  3714. var date = new Date()
  3715. debugger
  3716. that.ruleForm.projectName = "拆迁补偿项目_" + that.formatDateTimeToLong(date);
  3717. that.activeName = "second"
  3718. } else {
  3719. console.log("error submit!!");
  3720. return false;
  3721. }
  3722. });
  3723. },
  3724. /**
  3725. * 保存分析结果
  3726. */
  3727. saveAnalysResult(projectInfo) {
  3728. var that = this
  3729. // var projectInfo = {
  3730. // "id": that.curProjectInfo.id,
  3731. // "projectName": that.curProjectInfo.name,
  3732. // "dateTime": that.curProjectInfo.dateTime,
  3733. // "regions": JSON.stringify(that.curProjectInfo.regions),
  3734. // "cqValue": that.curProjectInfo.cqValue,
  3735. // "qmValue": that.curProjectInfo.qmValue,
  3736. // "zdValue": that.curProjectInfo.zdValue,
  3737. // /**
  3738. // * 拆迁分析结果
  3739. // */
  3740. // "cqResult": {
  3741. // "id": null,
  3742. // "projectId": null,
  3743. // "count": that.curProjectInfo.cqResult.count,
  3744. // "totalJZMJ": that.curProjectInfo.cqResult.totalJZMJ,
  3745. // "totalPay": that.curProjectInfo.cqResult.totalPay,
  3746. // "average": that.curProjectInfo.cqResult.average,
  3747. // "gyJZMJ": that.curProjectInfo.cqResult.gyJZMJ,
  3748. // "jtJZMJ": that.curProjectInfo.cqResult.jtJZMJ,
  3749. // "gyCount": that.curProjectInfo.cqResult.gyCount,
  3750. // "jtCount": that.curProjectInfo.cqResult.jtCount,
  3751. // "gyList": JSON.stringify(that.curProjectInfo.cqResult.gyList),
  3752. // "jtList": JSON.stringify(that.curProjectInfo.cqResult.jtList),
  3753. // "gyfeatures": JSON.stringify(that.curProjectInfo.cqResult.gyfeatures),
  3754. // "jtfeatures": JSON.stringify(that.curProjectInfo.cqResult.jtfeatures),
  3755. // "fieldInfos": JSON.stringify(that.curProjectInfo.cqResult.fieldInfos)
  3756. // },
  3757. // /**
  3758. // * 青苗分析结果
  3759. // */
  3760. // "qmResult": {
  3761. // "id": null,
  3762. // "projectId": null,
  3763. // "totalPay": that.curProjectInfo.qmResult.totalPay,
  3764. // "totalMJ": that.curProjectInfo.qmResult.totalMJ,
  3765. // "nzwMJ": that.curProjectInfo.qmResult.nzwMJ,
  3766. // "nzwPay": that.curProjectInfo.qmResult.nzwPay,
  3767. // "jjzwMJ": that.curProjectInfo.qmResult.jjzwMJ,
  3768. // "jjzwPay": that.curProjectInfo.qmResult.jjzwPay,
  3769. // "smMJ": that.curProjectInfo.qmResult.smMJ,
  3770. // "smPay": that.curProjectInfo.qmResult.smPay,
  3771. // "fieldInfos": JSON.stringify(that.curProjectInfo.qmResult.fieldInfos),
  3772. // "features": JSON.stringify(that.curProjectInfo.qmResult.features),
  3773. // },
  3774. // /**
  3775. // * 征地分析结果
  3776. // */
  3777. // "zdResult": {
  3778. // "id": null,
  3779. // "projectId": null,
  3780. // //国有面积
  3781. // "gyMJ": that.curProjectInfo.zdResult.gyMJ,
  3782. // //集体面积
  3783. // "jtMJ": that.curProjectInfo.zdResult.jtMJ,
  3784. // //征地面积
  3785. // "totalZDMJ": that.curProjectInfo.zdResult.totalZDMJ,
  3786. // //总补偿
  3787. // "totalPay": that.curProjectInfo.zdResult.totalPay,
  3788. // //征地补偿
  3789. // "totalZDPay": that.curProjectInfo.zdResult.totalZDPay,
  3790. // //安置补偿
  3791. // "totalAZPay": that.curProjectInfo.zdResult.totalAZPay,
  3792. // //国有地类及面积
  3793. // "gydlList": JSON.stringify(that.curProjectInfo.zdResult.gydlList),
  3794. // //地类及面积
  3795. // "jtdlList": JSON.stringify(that.curProjectInfo.zdResult.jtdlList),
  3796. // "gyfeatures": JSON.stringify(that.curProjectInfo.zdResult.gyfeatures),
  3797. // "jtfeatures": JSON.stringify(that.curProjectInfo.zdResult.jtfeatures),
  3798. // "fieldInfos": JSON.stringify(that.curProjectInfo.zdResult.fieldInfos),
  3799. // },
  3800. // /**
  3801. // * 权属结果
  3802. // */
  3803. // "qsResult": {
  3804. // "id": null,
  3805. // "projectId": null,
  3806. // "stateUsedMJ": that.curProjectInfo.qsResult.stateUsedMJ,
  3807. // "stateUsedFeatures": JSON.stringify(that.curProjectInfo.qsResult.stateUsedFeatures),
  3808. // "stateUsedList": JSON.stringify(that.curProjectInfo.qsResult.stateUsedList),
  3809. // "stateUsedFieldInfos": JSON.stringify(that.curProjectInfo.qsResult.stateUsedFieldInfos),
  3810. // "collectiveOwnerMJ": that.curProjectInfo.qsResult.collectiveOwnerMJ,
  3811. // "collectiveOwnerFeatures": JSON.stringify(that.curProjectInfo.qsResult.collectiveOwnerFeatures),
  3812. // "collectiveOwnerList": JSON.stringify(that.curProjectInfo.qsResult.collectiveOwnerList),
  3813. // "collectiveOwnerFieldInfos": JSON.stringify(that.curProjectInfo.qsResult.collectiveOwnerFieldInfos),
  3814. // "collectiveUsedMJ": that.curProjectInfo.qsResult.collectiveUsedMJ,
  3815. // "collectiveUsedList": JSON.stringify(that.curProjectInfo.qsResult.collectiveUsedList),
  3816. // "collectiveUsedFeatures": JSON.stringify(that.curProjectInfo.qsResult.collectiveUsedFeatures),
  3817. // "collectiveUsedFieldInfos": JSON.stringify(that.curProjectInfo.qsResult.collectiveUsedFieldInfos)
  3818. // }
  3819. // }
  3820. addZdProject(projectInfo).then((res) => {
  3821. if (res)
  3822. console.log('项目保存完成')
  3823. that.queryProject();
  3824. }).catch((err) => {
  3825. console.log('项目保存失败')
  3826. })
  3827. },
  3828. //范围面积
  3829. getRegionArea() {
  3830. debugger
  3831. var points1 = this.regions;
  3832. var parts1 = [];
  3833. var poly1;
  3834. for (var i = 0; i < points1.length; i++) {
  3835. parts1.push([points1[i].x, points1[i].y]);
  3836. }
  3837. poly1 = polygon([parts1]);
  3838. var textarea = area(poly1) * window.earthRadius;
  3839. return textarea;
  3840. },
  3841. /***
  3842. * pararm {object} @arr
  3843. */
  3844. creaturfPolygon(arr) {
  3845. var points = [];
  3846. var parts = [];
  3847. var polygon = [];
  3848. if (arr && arr.length > 0)
  3849. for (var i = 0; i < arr.length; i++) {
  3850. points.push([arr[i].x, arr[i].y]);
  3851. }
  3852. parts.push(points);
  3853. polygon.push(parts);
  3854. return polygon(polygon);
  3855. },
  3856. getfldIndex(fieldInfos, fldName) {
  3857. var fldIndex = -1;
  3858. fieldInfos.forEach((fld, index) => {
  3859. if (fld.name.toUpperCase() == fldName.toUpperCase()) {
  3860. fldIndex = index;
  3861. }
  3862. });
  3863. return fldIndex;
  3864. },
  3865. /**
  3866. * point1(裁剪),points2(被裁剪) [{x:1,y:2}]
  3867. */
  3868. computerInsertArea(points1, points2) {
  3869. var area = 0;
  3870. if (
  3871. points1 == null ||
  3872. points2 == null ||
  3873. points2.length == 0 ||
  3874. points1.length == 0
  3875. ) {
  3876. console.log("征地补偿图斑计算传入参数错误");
  3877. area = 0;
  3878. }
  3879. var parts1 = [];
  3880. var poly1 = [];
  3881. var parts2 = [];
  3882. var poly2 = [];
  3883. // parts1.push()
  3884. for (var i = 0; i < points1.length; i++) {
  3885. parts1.push([points1[i].x, points1[i].y]);
  3886. }
  3887. poly1 = polygon([parts1]);
  3888. var textarea = area(poly1) * window.earthRadius;
  3889. for (var i = 0; i < points2.length; i++) {
  3890. parts2.push([points2[i].x, points2[i].y]);
  3891. }
  3892. poly2 = polygon([parts2]);
  3893. var isContain = booleanContains(poly1, poly2);
  3894. if (isContain) {
  3895. area = area(poly2) * window.earthRadius;
  3896. }
  3897. else {
  3898. var intersection = intersect(poly1, poly2);
  3899. area = area(intersection) * window.earthRadius;
  3900. }
  3901. return area;
  3902. },
  3903. areaFrom4326To4525(region) {
  3904. var fromProj = proj4.defs();
  3905. var toProj = proj4.defs(window.localWkid4525);
  3906. proj4.defs("EPSG:4525", "+proj=longlat +ellps=GRS80 +no_defs +type=crs");
  3907. var point;
  3908. proj4.transform(fromProj, toProj, point)
  3909. },
  3910. /**
  3911. * 时间格式化2022-02-10 12:00:00
  3912. * @param {date} date
  3913. */
  3914. dateFormat(date) {
  3915. // console.log(showTime(date.getHours()));
  3916. var year = date.getFullYear(); // 年
  3917. var month = this.showTime(date.getMonth() + 1); // 月
  3918. // var week = this.showTime(date.getDay()); // 星期
  3919. var day = this.showTime(date.getDate()); // 日
  3920. var hours = this.showTime(date.getHours()); // 小时
  3921. var minutes = this.showTime(date.getMinutes()); // 分钟
  3922. var second = this.showTime(date.getSeconds()); // 秒
  3923. var str = "";
  3924. str =
  3925. year +
  3926. "-" +
  3927. month +
  3928. "-" +
  3929. day +
  3930. " " +
  3931. hours +
  3932. ":" +
  3933. minutes +
  3934. ":" +
  3935. second;
  3936. return str;
  3937. },
  3938. // 封装一个不够两位数就补零的函数
  3939. showTime(t) {
  3940. var time;
  3941. time = t >= 10 ? t : "0" + t;
  3942. return time;
  3943. },
  3944. clear() {
  3945. this.positions = [];
  3946. this.regions = [];
  3947. this.entities.forEach((item) => {
  3948. viewer.entities.removeById(item.id);
  3949. })
  3950. this.qsEntities.forEach((item) => {
  3951. viewer.entities.removeById(item.id);
  3952. })
  3953. this.entities = []
  3954. this.qsEntities = [];
  3955. if (polygonEntity) {
  3956. viewer.entities.remove(polygonEntity)
  3957. }
  3958. if (handlerPolygon) {
  3959. handlerPolygon.deactivate();
  3960. handlerPolygon.clear();
  3961. }
  3962. },
  3963. exportWord(projectInfo) {
  3964. if (projectInfo)
  3965. var promise = scene.outputSceneToFile();
  3966. Cesium.when(promise, function (base64data) {
  3967. projectInfo.isUseDB = window.isUseDB;
  3968. expotZDBCWord(projectInfo)
  3969. })
  3970. // .then((response) => {
  3971. // debugger;
  3972. // var fileName = projectInfo.projectName;
  3973. // debugger;
  3974. // const contentDisposition = response.headers["content-disposition"];
  3975. // if (contentDisposition) {
  3976. // fileName = window.decodeURI(
  3977. // response.headers["content-disposition"].split("=")[1],
  3978. // "UTF-8"
  3979. // );
  3980. // }
  3981. // const isBlob = blobValidate(response.data);
  3982. // debugger;
  3983. // if (isBlob) {
  3984. // const blob = new Blob([response.data]);
  3985. // saveAs(blob, fileName);
  3986. // } else {
  3987. // const resText = response.text();
  3988. // const rspObj = JSON.parse(resText);
  3989. // const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode["default"];
  3990. // that.$message.error(errMsg);
  3991. // }
  3992. // }).catch((err) => {
  3993. // console.log(err)
  3994. // })
  3995. }
  3996. },
  3997. /**
  3998. * 清楚临时图元
  3999. */
  4000. beforeDestroy() {
  4001. if (polygonEntity) {
  4002. viewer.entities.remove(polygonEntity)
  4003. }
  4004. if (handlerPolygon) {
  4005. handlerPolygon.deactivate();
  4006. handlerPolygon.clear();
  4007. }
  4008. if (handleInput)
  4009. handleInput.destroy()
  4010. this.positions = [];
  4011. this.regions = [];
  4012. this.entities = []
  4013. this.qsEntities = [];
  4014. viewer.entities.removeAll();
  4015. if(popupBox){
  4016. popupBox.destroy();
  4017. popupBox=null;
  4018. }
  4019. },
  4020. destroyed() { }
  4021. };
  4022. </script>
  4023. <style lang="scss">
  4024. @import "@/../../zt.scss";
  4025. </style>
  4026. <style scoped>
  4027. .fileInput {
  4028. display: none;
  4029. }
  4030. .file-upload-button {
  4031. background-color: #0f7ac8 !important
  4032. }
  4033. .divrow {
  4034. margin: 0;
  4035. padding: 0;
  4036. display: flex;
  4037. height: 2.5rem;
  4038. }
  4039. .divImg {
  4040. width: 20%;
  4041. }
  4042. img {
  4043. height: 2rem;
  4044. width: 2rem;
  4045. }
  4046. .divCol {
  4047. width: 49.5%;
  4048. display: flex;
  4049. white-space: nowrap;
  4050. }
  4051. .divText {
  4052. width: 79%;
  4053. padding-left: 0.5rem;
  4054. }
  4055. input.el-range-input {
  4056. background-color: transparent;
  4057. }
  4058. .el-range-editor.el-input__inner {
  4059. background-color: transparent;
  4060. }
  4061. .el-row {
  4062. /* padding: 0.5rem 0 0.5rem 0; */
  4063. /* display: inline-flex; */
  4064. align-items: center;
  4065. margin-bottom: 0.5rem;
  4066. }
  4067. .el-col {
  4068. display: inline-flex;
  4069. }
  4070. .buttongroup {
  4071. display: inline-flex;
  4072. margin-top: 0.45rem;
  4073. }
  4074. .rootele {
  4075. padding: 0.5rem;
  4076. color: white;
  4077. overflow-y: none;
  4078. }
  4079. .el-col {
  4080. color: white;
  4081. }
  4082. .el-tab-pane {
  4083. color: white;
  4084. }
  4085. .el-input {
  4086. background: transparent;
  4087. }
  4088. /* ul {
  4089. height: 100;
  4090. width: 100%;
  4091. overflow-y: auto;
  4092. font-size: 1rem;
  4093. padding: 1rem;
  4094. list-style-type: none;
  4095. } */
  4096. .el-pagination {
  4097. color: #ffffff;
  4098. }
  4099. </style>