DemolitionList.vue 138 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242
  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. if(popupBox){
  1478. popupBox.destroy();
  1479. popupBox=null;
  1480. }
  1481. that.entities.forEach((item) => {
  1482. viewer.entities.removeById(item.id);
  1483. });
  1484. that.entities = [];
  1485. that.qsEntities.forEach((item) => {
  1486. viewer.entities.removeById(item.id);
  1487. })
  1488. that.qsEntities = [];
  1489. if (that.activePage1 == "GY") {
  1490. if (that.activePage2 == "GYQS") {
  1491. that.GYQSChart();
  1492. that.GYDLChart();
  1493. }
  1494. // else if (that.activePage2 == "GYFC") {
  1495. // // that.cqLocation(true, null)
  1496. // }
  1497. }
  1498. else {
  1499. if (that.activePage3 == "ZDPG") {
  1500. that.JTDLChart();
  1501. that.JTOwnerChart();
  1502. that.JTUseChart();
  1503. }
  1504. else if (that.activePage3 == "QMPG") {
  1505. that.QMBCChart();
  1506. }
  1507. }
  1508. },
  1509. //显示项目信息
  1510. setSeletedReslut(projectInfo) {
  1511. this.qmResult = {
  1512. totalPay: projectInfo.qmResult.totalPay,
  1513. totalMJ: projectInfo.qmResult.totalMJ,
  1514. nzwMJ: projectInfo.qmResult.nzwMJ,
  1515. nzwPay: projectInfo.qmResult.nzwPay,
  1516. jjzwMJ: projectInfo.qmResult.jjzwMJ,
  1517. jjzwPay: projectInfo.qmResult.jjzwPay,
  1518. smMJ: projectInfo.qmResult.smMJ,
  1519. smPay: projectInfo.qmResult.smPay,
  1520. fieldInfos: JSON.parse(projectInfo.qmResult.fieldInfos),
  1521. features: JSON.parse(projectInfo.qmResult.features),
  1522. }
  1523. this.cqResult = {
  1524. count: projectInfo.cqResult.count,
  1525. totalJZMJ: projectInfo.cqResult.totalJZMJ,
  1526. totalPay: projectInfo.cqResult.totalPay,
  1527. average: projectInfo.cqResult.average,
  1528. gyJZMJ: projectInfo.cqResult.gyJZMJ,
  1529. jtJZMJ: projectInfo.cqResult.jtJZMJ,
  1530. gyCount: projectInfo.cqResult.gyCount,
  1531. jtCount: projectInfo.cqResult.jtCount,
  1532. gyList: JSON.parse(projectInfo.cqResult.gyList),
  1533. jtList: JSON.parse(projectInfo.cqResult.jtList),
  1534. gyfeatures: JSON.parse(projectInfo.cqResult.gyfeatures),
  1535. jtfeatures: JSON.parse(projectInfo.cqResult.jtfeatures),
  1536. fieldInfos: JSON.parse(projectInfo.cqResult.fieldInfos)
  1537. }
  1538. this.zdResult = {
  1539. //国有面积
  1540. gyMJ: projectInfo.zdResult.gyMJ,
  1541. //集体面积
  1542. jtMJ: projectInfo.zdResult.jtMJ,
  1543. //征地面积
  1544. totalZDMJ: projectInfo.zdResult.totalZDMJ,
  1545. //总补偿
  1546. totalPay: projectInfo.zdResult.totalPay,
  1547. //征地补偿
  1548. totalZDPay: projectInfo.zdResult.totalZDPay,
  1549. //安置补偿
  1550. totalAZPay: projectInfo.zdResult.totalAZPay,
  1551. //国有地类及面积
  1552. gydlList: JSON.parse(projectInfo.zdResult.gydlList),
  1553. //地类及面积
  1554. jtdlList: JSON.parse(projectInfo.zdResult.jtdlList),
  1555. gyfeatures: JSON.parse(projectInfo.zdResult.gyfeatures),
  1556. jtfeatures: JSON.parse(projectInfo.zdResult.jtfeatures),
  1557. fieldInfos: JSON.parse(projectInfo.zdResult.fieldInfos),
  1558. }
  1559. this.qsResult = {
  1560. stateUsedMJ: projectInfo.qsResult.stateUsedMJ,
  1561. stateUsedFeatures: JSON.parse(projectInfo.qsResult.stateUsedFeatures),
  1562. stateUsedList: JSON.parse(projectInfo.qsResult.stateUsedList),
  1563. stateUsedFieldInfos: JSON.parse(projectInfo.qsResult.stateUsedFieldInfos),
  1564. collectiveOwnerMJ: projectInfo.qsResult.collectiveOwnerMJ,
  1565. collectiveOwnerFeatures: JSON.parse(projectInfo.qsResult.collectiveOwnerFeatures),
  1566. collectiveOwnerList: JSON.parse(projectInfo.qsResult.collectiveOwnerList),
  1567. collectiveOwnerFieldInfos: JSON.parse(projectInfo.qsResult.collectiveOwnerFieldInfos),
  1568. collectiveUsedMJ: projectInfo.qsResult.collectiveUsedMJ,
  1569. collectiveUsedList: JSON.parse(projectInfo.qsResult.collectiveUsedList),
  1570. collectiveUsedFeatures: JSON.parse(projectInfo.qsResult.collectiveUsedFeatures),
  1571. collectiveUsedFieldInfos: JSON.parse(projectInfo.qsResult.collectiveUsedFieldInfos)
  1572. }
  1573. this.loadInitData()
  1574. // this.JTDLChart();
  1575. // this.GYDLChart();
  1576. // this.QMBCChart();
  1577. // this.GYQSChart();
  1578. // this.JTOwnerChart();
  1579. // this.JTUseChart();
  1580. },
  1581. //删除项目
  1582. deletProject(projectInfo) {
  1583. var that = this
  1584. var id = that.$layer.confirm("确定要删除吗?", {}, function () {
  1585. delZdProject([projectInfo.id]).then((res) => {
  1586. if (res)
  1587. debugger
  1588. that.$layer.close(id)
  1589. that.$message("数据已删除!");
  1590. that.queryProject();
  1591. }).catch((err) => {
  1592. console.log(err)
  1593. })
  1594. }, function () {
  1595. return
  1596. });
  1597. },
  1598. /**
  1599. * 页面切换
  1600. */
  1601. pageClick(tab, event) {
  1602. // var name = tab.name
  1603. this.loadInitData();
  1604. },
  1605. gyPpageClick(tab, event) {
  1606. this.loadInitData();
  1607. },
  1608. jtPageClick(tab, event) {
  1609. this.loadInitData();
  1610. },
  1611. /**
  1612. * 征地权属切换
  1613. */
  1614. qsClick(tab, event) {
  1615. // viewer.entities.removeAll()
  1616. this.entities.forEach((item) => {
  1617. viewer.entities.removeById(item.id)
  1618. })
  1619. this.entities = []
  1620. },
  1621. handlePreview(file) { },
  1622. handleRemove(file, fileList) { },
  1623. beforeRemove(file, fileList) { },
  1624. handleOnChange(file, fileList) { },
  1625. /**
  1626. * 点击导入范围
  1627. */
  1628. inputGeometry() {
  1629. var element = document.getElementById('fileInput')
  1630. // debugger
  1631. // document.getElementsByClassName("el-upload__input")= ""
  1632. if (element)
  1633. element.click();
  1634. },
  1635. handleUpload(event) {
  1636. var element = document.getElementById('fileInput')
  1637. // element.files=[];
  1638. debugger
  1639. if (polygonEntity) {
  1640. viewer.entities.remove(polygonEntity)
  1641. }
  1642. // let fileName = document.getElementsByClassName("el-upload__input")[0].value
  1643. let fileName = event.target.files[0];
  1644. var size = fileName.size
  1645. if (size > 512 * 1024) {
  1646. {
  1647. this.$message("文件大小超限,请重新输入!");
  1648. event.target.value = ''
  1649. return
  1650. }
  1651. }
  1652. let reader = new FileReader();
  1653. var geojson;
  1654. var that = this
  1655. reader.readAsArrayBuffer(fileName);
  1656. reader.onload = function (e) {
  1657. debugger;
  1658. let res = e.target.result; //ArrayBuffer
  1659. shp(res)
  1660. .then(function (res) {
  1661. // self.addGeometry(res)
  1662. geojson = res;
  1663. console.log(geojson);
  1664. that.addGeometry(geojson)
  1665. })
  1666. .catch(function (e) {
  1667. console.log(e);
  1668. });
  1669. event.target.value = ''
  1670. };
  1671. // this.parsingZip();
  1672. },
  1673. /**
  1674. * 导入范围添加图形
  1675. */
  1676. addGeometry(geojson) {
  1677. var that = this;
  1678. proj4.defs("EPSG:4490", "+proj=longlat +ellps=GRS80 +no_defs +type=crs");
  1679. debugger
  1680. var coordinates = geojson.features[0].geometry.coordinates;
  1681. var box = geojson.features[0].geometry.bbox;
  1682. var centerX = (box[0] + box[2]) / 2;
  1683. var centerY = (box[1] + box[3]) / 2;
  1684. var positions = [];
  1685. that.regions = [];
  1686. for (var i = 0; i < coordinates.length; i++) {
  1687. var coor = coordinates[i];
  1688. var nCoor;
  1689. if (coor && coor.length > 0) {
  1690. for (var j = 0; j < coor.length; j++) {
  1691. nCoor = proj4(proj4("EPSG:4326"), proj4("EPSG:4490"), coor[j]);
  1692. that.regions.push({ x: nCoor[0], y: nCoor[1] })
  1693. positions.push(nCoor[0])
  1694. positions.push(nCoor[1])
  1695. }
  1696. }
  1697. }
  1698. viewer.entities.removeById('polygon');
  1699. polygonEntity = new Cesium.Entity({
  1700. id: 'polygon',
  1701. position: Cesium.Cartesian3.fromDegreesArray([
  1702. centerX,
  1703. centerY,
  1704. ]),
  1705. // classificationType: ClassificationType.TERRAIN,
  1706. polygon: {
  1707. hierarchy: new Cesium.PolygonHierarchy(
  1708. new Cesium.Cartesian3.fromDegreesArray(positions)
  1709. ),
  1710. // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
  1711. material: Cesium.Color.WHITE.withAlpha(0.3),
  1712. outline: true,
  1713. outlineColor: Cesium.Color.RED,
  1714. outlineWidth: 2.0,
  1715. },
  1716. });
  1717. that.curProjectInfo.regions = that.regions
  1718. viewer.entities.add(polygonEntity);
  1719. viewer.flyTo(polygonEntity)
  1720. },
  1721. handleExceed(files, fileList) { },
  1722. handleChange(response, file, fileList) {
  1723. console.log(file);
  1724. },
  1725. onchange() {
  1726. console.log("上传失败");
  1727. },
  1728. /**
  1729. * 上传失败
  1730. */
  1731. uploadError(response, file, fileList) {
  1732. this.$message("导入失败,选择其它文件!");
  1733. },
  1734. /**
  1735. * 上传成功
  1736. */
  1737. uploadSuccess(response, file, fileList) {
  1738. debugger;
  1739. console.log("上传成功");
  1740. },
  1741. /**
  1742. * 读取shape zip
  1743. */
  1744. getShapeGeometry(response, file, fileList) {
  1745. const geojson = shpjs("files/pandr.zip");
  1746. },
  1747. /**
  1748. * 拾取实体并查询属性
  1749. */
  1750. pickEntity(prefix) {
  1751. {
  1752. var that = this
  1753. var id = '';
  1754. var pick
  1755. that.tableData = [];
  1756. if (this.sublayerid)
  1757. that.$layer.close(that.sublayerid)
  1758. if (handlerPolygon) {
  1759. handlerPolygon.deactivate()
  1760. handlerPolygon.clear();
  1761. }
  1762. handleInput = new Cesium.ScreenSpaceEventHandler(scene.canvas);
  1763. handleInput.setInputAction(function (movement) {
  1764. pick = viewer.scene.pick(movement.position);
  1765. if (pick != null) {
  1766. that.tableData = [];
  1767. var fieldNames = [];
  1768. var fieldValues = []
  1769. id = pick.id._id
  1770. if (id&&id.indexOf && id.indexOf(prefix) > -1) {
  1771. fieldNames = pick.id.attributes.fieldNames;
  1772. fieldValues = pick.id.attributes.fieldValues;
  1773. for (var i = 0; i < fieldNames.length; i++) {
  1774. if (
  1775. fieldNames[i].name.toUpperCase() == "SMID" ||
  1776. fieldNames[i].name.toUpperCase() == "SMUSERID" ||
  1777. fieldNames[i].name.toUpperCase() == "SMAREA" ||
  1778. fieldNames[i].name.toUpperCase() == "SMPERIMETER" ||
  1779. fieldNames[i].name.toUpperCase() == "SMGEOMETRY" ||
  1780. fieldNames[i].name.toUpperCase() == "OBJECTID" ||
  1781. fieldNames[i].name.toUpperCase() == "SHAPE_LENGTH" ||
  1782. fieldNames[i].name.toUpperCase() == "SHAPE_AREA" ||
  1783. fieldNames[i].name.toUpperCase() == "SHAPE_LENG"
  1784. )
  1785. continue;
  1786. that.tableData.push({
  1787. name: fieldNames[i].caption,
  1788. value: fieldValues[i],
  1789. });
  1790. }
  1791. that.sublayerid = that.$layer.iframe({
  1792. id: 'ss',
  1793. content: {
  1794. content: Property, //传递的组件对象
  1795. parent: that, //当前的vue对象
  1796. data: { tableData: that.tableData }, //props
  1797. },
  1798. // offset: [left.toString(), top.toString()], //left top 左上角(left=430px/2;top=(800px+header高)/2)
  1799. area: ["20rem", "30rem"],
  1800. title: "属性信息",
  1801. maxmin: false,
  1802. shade: false, //是否显示遮罩
  1803. shadeClose: false, //点击遮罩是否关闭
  1804. cancel: () => {
  1805. //关闭事件
  1806. // alert("关闭iframe");
  1807. },
  1808. });
  1809. }
  1810. }
  1811. }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
  1812. }
  1813. },
  1814. /**
  1815. * 获取用地用海分类统一颜色
  1816. */
  1817. getLandColor(name) {
  1818. var color = "rgb(172,255,207)";
  1819. window.colorList.forEach((element) => {
  1820. if (element.name.indexOf(name) > -1)
  1821. color = element.color;
  1822. });
  1823. return color;
  1824. },
  1825. /**
  1826. *征地补偿chart
  1827. */
  1828. JTDLChart() {
  1829. var that = this;
  1830. var chartDom = document.getElementById("JTDLChart");
  1831. var myChart = window.echarts.init(chartDom);
  1832. // this.zdResult.list.push({ 'dlbm': dlbmVal, 'dlmc': dlmcVal, 'mj': insertArea });
  1833. var datas = [];
  1834. var nameLength = 0;
  1835. var colors = [];
  1836. var color;
  1837. that.zdResult.jtdlList.forEach(item => {
  1838. datas.push({ name: item.dlmc, value: item.mj })
  1839. color = that.getLandColor(item.dlmc)
  1840. if (color != null)
  1841. colors.push(color);
  1842. })
  1843. var option = {
  1844. title: {
  1845. text: '现状情况',
  1846. subtext: '',
  1847. top: 'top',
  1848. left: 'center',
  1849. textStyle: {
  1850. color: "#FFFFFF"
  1851. }
  1852. },
  1853. tooltip: {
  1854. trigger: "item",
  1855. },
  1856. legend: {
  1857. type: "scroll",
  1858. orient: "vertical",
  1859. right: 0,
  1860. top: '20%',
  1861. bottom: 20,
  1862. radius: "55%",
  1863. // bottom: 20,
  1864. textStyle: {
  1865. // fontSize: '12px',
  1866. color: "#FFFF",
  1867. },
  1868. pageIconColor: "#ffffff",
  1869. pageTextStyle: {
  1870. color: "#ffffff"
  1871. },
  1872. data: datas.map((t) => t.name),
  1873. formatter: function (name) {
  1874. var val = datas.find((t) => t.name == name).value;
  1875. var lastSpace = (10 - name.length) * 3;
  1876. return name + new Array(lastSpace).join(" ") + val + "亩";
  1877. },
  1878. },
  1879. color: colors, // ['#0a915d', '#bb88dd', '#6699ff', '#d5b158', '#ff6347', 'indigo', 'purple'],
  1880. series: [
  1881. {
  1882. name: "征地补偿分析",
  1883. type: "pie",
  1884. center: ["25%", "50%"],
  1885. radius: ["25%", "45%"],
  1886. avoidLabelOverlap: false,
  1887. // itemStyle: {
  1888. // borderRadius: 10,
  1889. // borderColor: "#fff",
  1890. // borderWidth: 2,
  1891. // },
  1892. label: {
  1893. show: false,
  1894. position: "center",
  1895. },
  1896. emphasis: {
  1897. label: {
  1898. show: true,
  1899. fontSize: 12,
  1900. fontWeight: "bold",
  1901. },
  1902. },
  1903. labelLine: {
  1904. show: false,
  1905. },
  1906. data: datas,
  1907. },
  1908. ],
  1909. };
  1910. myChart.clear()
  1911. myChart.setOption(option);
  1912. var showOrHide = false;
  1913. that.JTDLLoad(null, showOrHide);
  1914. myChart.on("legendselectchanged", function (parmas) {
  1915. that.pickEntity('ZDJTYD');
  1916. var name = parmas.name
  1917. showOrHide = parmas.selected[name]
  1918. that.JTDLLoad(name, showOrHide);
  1919. });
  1920. },
  1921. /**
  1922. * 集体地类展示
  1923. * @param {*} name
  1924. */
  1925. JTDLLoad(name, showOrHide) {
  1926. var that = this;
  1927. var fieldValues = [];
  1928. var dlmcIndex = -1;
  1929. var geometry;
  1930. var dlmcFld = window.ZSBC.ZDBCJS.DLTB.dlmc.field;
  1931. dlmcIndex = that.getfldIndex(that.zdResult.fieldInfos, dlmcFld);
  1932. var dlmc = "";
  1933. var features = that.zdResult.jtfeatures;
  1934. var attributes = {};
  1935. var color = "";
  1936. var colorArr = [3];
  1937. for (var i = 0; i < features.length; i++) {
  1938. fieldValues = features[i].fieldValues;
  1939. if (dlmcIndex > -1) {
  1940. dlmc = fieldValues[dlmcIndex];
  1941. }
  1942. if (name != null && dlmc != name)
  1943. continue;
  1944. var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  1945. var smid = features[i].fieldValues[simIndex];
  1946. var ff = that.entities.find(t => t.id == "ZDJTYD_" + smid)
  1947. var entity;
  1948. if (ff != null) {
  1949. entity = viewer.entities.getById("ZDJTYD_" + smid)
  1950. if (entity != undefined)
  1951. entity.show = showOrHide;
  1952. }
  1953. else {
  1954. var dlColor = that.getLandColor(dlmc);
  1955. var color = dlColor.replace("rgb", "")
  1956. .replace("(", "")
  1957. .replace(")", "");
  1958. var colorArr = color.split(",");
  1959. attributes = {
  1960. fieldNames: that.zdResult.fieldInfos,
  1961. fieldValues: features[i].fieldValues,
  1962. };
  1963. geometry = features[i].geometry;
  1964. var positions = [];
  1965. for (var j = 0; j < geometry.points.length; j++) {
  1966. positions.push(geometry.points[j].x);
  1967. positions.push(geometry.points[j].y);
  1968. }
  1969. var entity = new Cesium.Entity({
  1970. id: "ZDJTYD_" + smid,
  1971. position: Cesium.Cartesian3.fromDegreesArray([
  1972. geometry.center.x,
  1973. geometry.center.y,
  1974. ]),
  1975. show: true,
  1976. polygon: {
  1977. hierarchy: new Cesium.PolygonHierarchy(
  1978. new Cesium.Cartesian3.fromDegreesArray(positions)
  1979. ),
  1980. material: new Cesium.Color(
  1981. parseInt(colorArr[0]) / 255,
  1982. parseInt(colorArr[1]) / 255,
  1983. parseInt(colorArr[2]) / 255,
  1984. 1
  1985. ),
  1986. outline: true,
  1987. outlineColor: Cesium.Color.BLACK,
  1988. outlineWidth: 1.5,
  1989. },
  1990. });
  1991. entity.show = showOrHide;
  1992. entity.attributes = attributes;
  1993. that.entities.push({ type: "ZDJTYD", id: "ZDJTYD_" + smid });
  1994. viewer.entities.add(entity);
  1995. }
  1996. }
  1997. },
  1998. /**
  1999. *国有chart
  2000. */
  2001. GYDLChart() {
  2002. var that = this;
  2003. var chartDom = document.getElementById("GYDLChart");
  2004. var myChart = window.echarts.init(chartDom);
  2005. var datas = [];
  2006. var nameLength = 0;
  2007. var colors = []
  2008. for (var i = 0; i < that.zdResult.gydlList.length; i++) {
  2009. datas.push({
  2010. value: parseFloat((that.zdResult.gydlList[i].mj).toFixed(2)),
  2011. name: that.zdResult.gydlList[i].dlmc,
  2012. });
  2013. var color = that.getLandColor(that.zdResult.gydlList[i].dlmc);
  2014. colors.push(color);
  2015. }
  2016. var option = {
  2017. title: {
  2018. text: '现状情况', //国有所有权信息
  2019. subtext: '',
  2020. top: 'top',
  2021. left: 'center',
  2022. textStyle: {
  2023. color: "#FFFFFF"
  2024. }
  2025. },
  2026. tooltip: {
  2027. trigger: "item",
  2028. },
  2029. legend: {
  2030. type: "scroll",
  2031. orient: "vertical",
  2032. right: 0,
  2033. top: '20%',
  2034. bottom: 20,
  2035. radius: "55%",
  2036. // bottom: 20,
  2037. textStyle: {
  2038. // fontSize: '12px',
  2039. color: "#FFFF",
  2040. },
  2041. pageIconColor: "#ffffff",
  2042. pageTextStyle: {
  2043. color: "#ffffff"
  2044. },
  2045. data: datas.map((t) => t.name),
  2046. formatter: function (name) {
  2047. var val = datas.find((t) => t.name == name).value;
  2048. var spname = '';
  2049. if (name.length > 13)
  2050. spname = name.substring(0, 12) + val + '亩\n' + name.substring(13, name.length)
  2051. else {
  2052. spname = name
  2053. var lastSpace = (13 - spname.length) * 3;
  2054. if (lastSpace < 0)
  2055. lastSpace = 0
  2056. spname += new Array(lastSpace).join(" ") + val + "亩";
  2057. }
  2058. return spname
  2059. },
  2060. },
  2061. color: colors,
  2062. series: [
  2063. {
  2064. name: "国有征地权属分析",
  2065. type: "pie",
  2066. center: ["25%", "50%"],
  2067. radius: ["25%", "45%"],
  2068. avoidLabelOverlap: false,
  2069. // itemStyle: {
  2070. // borderRadius: 1,
  2071. // borderColor: "#fff",
  2072. // borderWidth: 2,
  2073. // },
  2074. label: {
  2075. show: false,
  2076. position: "center",
  2077. },
  2078. emphasis: {
  2079. label: {
  2080. show: true,
  2081. fontSize: 12,
  2082. fontWeight: "bold",
  2083. },
  2084. },
  2085. labelLine: {
  2086. show: false,
  2087. },
  2088. data: datas,
  2089. },
  2090. ],
  2091. };
  2092. myChart.setOption(option);
  2093. var shaowOrHide = false;
  2094. that.GYDLLoad(null, shaowOrHide);
  2095. myChart.on("legendselectchanged", function (parmas) {
  2096. that.pickEntity('ZDGYDL');
  2097. var name = parmas.name
  2098. shaowOrHide = parmas.selected[name]
  2099. that.GYDLLoad(name, shaowOrHide);
  2100. });
  2101. },
  2102. /**
  2103. * 国有地类展示
  2104. * @param {*} datas
  2105. * @param {*} name
  2106. * @param {*} shaowOrHide
  2107. */
  2108. GYDLLoad(name, shaowOrHide) {
  2109. var that = this;
  2110. var color = "";
  2111. // var colors = window.colorList;
  2112. var fieldValues = [];
  2113. var dlmcIndex = -1;
  2114. var dlmcFld = window.ZSBC.ZDBCJS.DLTB.dlmc.field;
  2115. dlmcIndex = that.getfldIndex(that.zdResult.fieldInfos, dlmcFld);
  2116. var dlmc = "";
  2117. var geometry;
  2118. var entity;
  2119. var features = that.zdResult.gyfeatures;
  2120. var attributes = {};
  2121. for (var i = 0; i < features.length; i++) {
  2122. fieldValues = features[i].fieldValues;
  2123. if (dlmcIndex > -1) {
  2124. dlmc = fieldValues[dlmcIndex];
  2125. }
  2126. if (name != null && dlmc != name)
  2127. continue;
  2128. var dlColor = that.getLandColor(dlmc);
  2129. var color = dlColor.replace("rgb", "")
  2130. .replace("(", "")
  2131. .replace(")", "");
  2132. var colorArr = color.split(",");
  2133. var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  2134. var smid = features[i].fieldValues[simIndex]
  2135. var ff = that.entities.find(t => t.id == "ZDGYDL_" + smid)
  2136. if (ff != null) {
  2137. entity = viewer.entities.getById("ZDGYDL_" + smid)
  2138. if (entity != undefined)
  2139. entity.show = shaowOrHide;
  2140. }
  2141. else {
  2142. attributes = {
  2143. fieldNames: that.zdResult.fieldInfos,
  2144. fieldValues: features[i].fieldValues,
  2145. };
  2146. geometry = features[i].geometry;
  2147. fieldValues = features[i].fieldValues;
  2148. // if (qsdwIndex > -1) {
  2149. // qsdw = fieldValues[qsdwIndex];
  2150. // }
  2151. var positions = [];
  2152. for (var j = 0; j < geometry.points.length; j++) {
  2153. positions.push(geometry.points[j].x);
  2154. positions.push(geometry.points[j].y);
  2155. }
  2156. entity = new Cesium.Entity({
  2157. id: "ZDGYDL_" + smid,
  2158. position: Cesium.Cartesian3.fromDegreesArray([
  2159. geometry.center.x,
  2160. geometry.center.y,
  2161. ]),
  2162. show: true,
  2163. // classificationType: ClassificationType.TERRAIN,
  2164. polygon: {
  2165. hierarchy: new Cesium.PolygonHierarchy(
  2166. new Cesium.Cartesian3.fromDegreesArray(positions)
  2167. ),
  2168. // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
  2169. material: new Cesium.Color(
  2170. parseInt(colorArr[0]) / 255,
  2171. parseInt(colorArr[1]) / 255,
  2172. parseInt(colorArr[2]) / 255,
  2173. 1
  2174. ),
  2175. outline: true,
  2176. outlineColor: Cesium.Color.BLACK,
  2177. outlineWidth: 1.5,
  2178. },
  2179. });
  2180. entity.show = shaowOrHide;
  2181. entity.attributes = attributes;
  2182. that.entities.push({ type: name, id: "ZDGYDL_" + smid });
  2183. viewer.entities.add(entity);
  2184. }
  2185. }
  2186. },
  2187. /**
  2188. * 青苗补偿chart
  2189. */
  2190. QMBCChart() {
  2191. var that = this;
  2192. var chartDom1 = document.getElementById("QMMJChart");
  2193. var myChart1 = window.echarts.init(chartDom1);
  2194. var smfl = window.ZSBC.ZDBCJS.DLTB.smfl.fl;
  2195. var nzwfl = window.ZSBC.ZDBCJS.DLTB.nzwfl.fl;
  2196. var jjzwfl = window.ZSBC.ZDBCJS.DLTB.jjzwfl.fl;
  2197. var color3 = window.ZSBC.ZDBCJS.DLTB.smfl.color;
  2198. var color2 = window.ZSBC.ZDBCJS.DLTB.jjzwfl.color;
  2199. var color1 = window.ZSBC.ZDBCJS.DLTB.nzwfl.color;
  2200. var colors = [color1, color2, color3];
  2201. var datas1 = [];
  2202. debugger
  2203. if (that.qmResult) {
  2204. datas1 = [
  2205. { value: this.qmResult.nzwMJ, name: nzwfl },
  2206. { value: this.qmResult.jjzwMJ, name: jjzwfl },
  2207. { value: this.qmResult.smMJ, name: smfl },
  2208. ];
  2209. } else {
  2210. datas1 = [
  2211. { value: 0.0, name: nzwfl },
  2212. { value: 0.0, name: jjzwfl },
  2213. { value: 0.0, name: smfl },
  2214. ];
  2215. }
  2216. var option1 = {
  2217. title: {
  2218. text: "农作物补偿面积",
  2219. // subtext: '',
  2220. left: "center",
  2221. textStyle: {
  2222. fontSize: "16",
  2223. color: "#FFFF",
  2224. },
  2225. },
  2226. tooltip: {
  2227. trigger: "item",
  2228. },
  2229. legend: {
  2230. orient: "vertical",
  2231. right: 0,
  2232. top: "20%",
  2233. radius: "55%",
  2234. // bottom: 20,
  2235. textStyle: {
  2236. // fontSize: '1rem',
  2237. color: "#FFFF",
  2238. }, pageIconColor: "#ffffff",
  2239. pageTextStyle: {
  2240. color: "#ffffff"
  2241. },
  2242. data: datas1.map((t) => t.name),
  2243. formatter: function (name) {
  2244. var val = datas1.find((t) => t.name == name).value;
  2245. return (
  2246. name + new Array(20 - name.length * 3).join(" ") + val + "亩"
  2247. );
  2248. },
  2249. },
  2250. color: colors,
  2251. series: [
  2252. {
  2253. name: "征地补偿分析",
  2254. type: "pie",
  2255. center: ["25%", "45%"],
  2256. radius: ["50%", "70%"],
  2257. avoidLabelOverlap: false,
  2258. // itemStyle: {
  2259. // borderRadius: 1,
  2260. // borderColor: "#fff",
  2261. // borderWidth: 2,
  2262. // },
  2263. label: {
  2264. show: false,
  2265. position: "center",
  2266. },
  2267. emphasis: {
  2268. label: {
  2269. show: true,
  2270. fontSize: 12,
  2271. fontWeight: "bold",
  2272. },
  2273. },
  2274. labelLine: {
  2275. show: false,
  2276. },
  2277. data: datas1,
  2278. },
  2279. ],
  2280. };
  2281. myChart1.setOption(option1);
  2282. var showOrHide = false;
  2283. that.QMBCLoad(null, showOrHide)
  2284. myChart1.on("legendselectchanged", function (parmas) {
  2285. that.pickEntity('ZDQMBC');
  2286. var name = parmas.name
  2287. showOrHide = parmas.selected[name]
  2288. that.QMBCLoad(name, showOrHide)
  2289. });
  2290. var chartDom2 = document.getElementById("QMFYChart");
  2291. var myChart2 = window.echarts.init(chartDom2);
  2292. var datas2 = [];
  2293. debugger
  2294. if (that.qmResult) {
  2295. datas2 = [
  2296. { value: that.qmResult.nzwPay, name: nzwfl },
  2297. { value: that.qmResult.jjzwPay, name: jjzwfl },
  2298. { value: that.qmResult.smPay, name: smfl },
  2299. ];
  2300. } else {
  2301. datas2 = [
  2302. { value: 0.0, name: nzwfl },
  2303. { value: 0.0, name: jjzwfl },
  2304. { value: 0.0, name: smfl },
  2305. ];
  2306. }
  2307. var option2 = {
  2308. title: {
  2309. text: "农作物补偿费用",
  2310. subtext: "",
  2311. left: "center",
  2312. textStyle: {
  2313. fontSize: "16",
  2314. color: "#FFFF",
  2315. },
  2316. },
  2317. tooltip: {
  2318. trigger: "item",
  2319. },
  2320. legend: {
  2321. orient: "vertical",
  2322. right: 0,
  2323. top: "20%",
  2324. radius: "55%",
  2325. // bottom: 20,
  2326. textStyle: {
  2327. // fontSize: '12px',
  2328. color: "#FFFF",
  2329. },
  2330. pageIconColor: "#ffffff",
  2331. pageTextStyle: {
  2332. color: "#ffffff"
  2333. },
  2334. data: datas2.map((t) => t.name),
  2335. formatter: function (name) {
  2336. var val = datas2.find((t) => t.name == name).value;
  2337. return (
  2338. name + new Array(20 - name.length * 3).join(" ") + val + "万元"
  2339. );
  2340. },
  2341. },
  2342. color: colors,
  2343. series: [
  2344. {
  2345. name: "征地补偿分析",
  2346. type: "pie",
  2347. center: ["25%", "45%"],
  2348. radius: ["50%", "70%"],
  2349. avoidLabelOverlap: false,
  2350. // itemStyle: {
  2351. // borderRadius: 1,
  2352. // borderColor: "#fff",
  2353. // borderWidth: 2,
  2354. // },
  2355. label: {
  2356. show: false,
  2357. position: "center",
  2358. },
  2359. emphasis: {
  2360. label: {
  2361. show: true,
  2362. fontSize: 12,
  2363. fontWeight: "bold",
  2364. },
  2365. },
  2366. labelLine: {
  2367. show: false,
  2368. },
  2369. data: datas2,
  2370. },
  2371. ],
  2372. };
  2373. myChart2.setOption(option2);
  2374. },
  2375. QMBCLoad(name, showOrHide) {
  2376. var that = this;
  2377. var dlmcIndex = -1;
  2378. debugger;
  2379. var dlmcFld = window.ZSBC.ZDBCJS.DLTB.dlmc.field;
  2380. dlmcIndex = that.getfldIndex(that.qmResult.fieldInfos, dlmcFld);
  2381. // var smfl = window.ZSBC.ZDBCJS.DLTB.smfl.dlmc;
  2382. // var nzwfl = window.ZSBC.ZDBCJS.DLTB.nzwfl.dlmc;
  2383. // var jjzwfl = window.ZSBC.ZDBCJS.DLTB.jjzwfl.dlmc;
  2384. var dlmc = "";
  2385. var geometry;
  2386. var color3 = window.ZSBC.ZDBCJS.DLTB.smfl.color;
  2387. var color2 = window.ZSBC.ZDBCJS.DLTB.jjzwfl.color;
  2388. var color1 = window.ZSBC.ZDBCJS.DLTB.nzwfl.color;
  2389. var curDLMC;
  2390. var attributes;
  2391. var fieldValues;
  2392. var color;
  2393. var features = that.qmResult.features;
  2394. for (var i = 0; i < features.length; i++) {
  2395. geometry = features[i].geometry;
  2396. fieldValues = features[i].fieldValues;
  2397. if (dlmcIndex > -1) {
  2398. dlmc = fieldValues[dlmcIndex];
  2399. }
  2400. if (name != null) {
  2401. if (name == window.ZSBC.ZDBCJS.DLTB.smfl.fl) {
  2402. curDLMC = window.ZSBC.ZDBCJS.DLTB.smfl.dlmc
  2403. }
  2404. else if (name == window.ZSBC.ZDBCJS.DLTB.nzwfl.fl) {
  2405. curDLMC = window.ZSBC.ZDBCJS.DLTB.nzwfl.dlmc
  2406. }
  2407. else if (name == window.ZSBC.ZDBCJS.DLTB.jjzwfl.fl) {
  2408. curDLMC = window.ZSBC.ZDBCJS.DLTB.jjzwfl.dlmc
  2409. }
  2410. if (curDLMC.indexOf(dlmc) == -1)
  2411. continue;
  2412. }
  2413. if (window.ZSBC.ZDBCJS.DLTB.nzwfl.dlmc.indexOf(dlmc) > -1)
  2414. color = color1
  2415. else if (window.ZSBC.ZDBCJS.DLTB.jjzwfl.dlmc.indexOf(dlmc) > -1)
  2416. color = color2
  2417. else if (window.ZSBC.ZDBCJS.DLTB.smfl.dlmc.indexOf(dlmc) > -1)
  2418. color = color3
  2419. color = color.replace("rgb", "")
  2420. .replace("(", "")
  2421. .replace(")", "");
  2422. var colorArr = color.split(",");
  2423. var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  2424. var smid = features[i].fieldValues[simIndex]
  2425. var ff = that.entities.find(t => t.id == "ZDQMBC_" + smid)
  2426. if (ff != null) {
  2427. var entity = viewer.entities.getById("ZDQMBC_" + smid)
  2428. if (entity != undefined)
  2429. entity.show = showOrHide;
  2430. }
  2431. else {
  2432. var positions = [];
  2433. for (var j = 0; j < geometry.points.length; j++) {
  2434. positions.push(geometry.points[j].x);
  2435. positions.push(geometry.points[j].y);
  2436. }
  2437. var entity = new Cesium.Entity({
  2438. id: "ZDQMBC_" + smid,
  2439. position: Cesium.Cartesian3.fromDegreesArray([
  2440. geometry.center.x,
  2441. geometry.center.y,
  2442. ]),
  2443. // classificationType: ClassificationType.TERRAIN,
  2444. polygon: {
  2445. hierarchy: new Cesium.PolygonHierarchy(
  2446. new Cesium.Cartesian3.fromDegreesArray(positions)
  2447. ),
  2448. // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
  2449. material: new Cesium.Color(
  2450. parseInt(colorArr[0]) / 255,
  2451. parseInt(colorArr[1]) / 255,
  2452. parseInt(colorArr[2]) / 255,
  2453. 1
  2454. ),
  2455. outline: true,
  2456. outlineColor: Cesium.Color.BLACK,
  2457. outlineWidth: 1.5,
  2458. },
  2459. });
  2460. attributes = {
  2461. fieldNames: that.qmResult.fieldInfos,
  2462. fieldValues: features[i].fieldValues,
  2463. };
  2464. entity.show = showOrHide;
  2465. entity.attributes = attributes;
  2466. that.entities.push({ type: "QM", id: "ZDQMBC_" + smid });
  2467. viewer.entities.add(entity);
  2468. }
  2469. }
  2470. },
  2471. /**
  2472. * 拆迁补偿chart
  2473. */
  2474. CQBCChart() {
  2475. // var chartDom = document.getElementById('CQBCChart');
  2476. // var myChart = window.echarts.init(chartDom);
  2477. var item = {
  2478. id: smid,
  2479. smid: smid,
  2480. cqr: cqrVal,
  2481. jg: fwjgVal,
  2482. fwdj: fwdjVal,
  2483. floor: floorVal,
  2484. jzmj: jzmjVal,
  2485. zdmj: zdmjVal,
  2486. address: addressVal,
  2487. pay: pay,
  2488. single: BZ,
  2489. };
  2490. that.cqResult.list.push(item);
  2491. that.cqResult.totalJZMJ += jzmjVal;
  2492. that.cqResult.totalPay += pay;
  2493. },
  2494. /**
  2495. * 国有权属
  2496. */
  2497. GYQSChart() {
  2498. var that = this;
  2499. var chartDom = document.getElementById("GYQSChart");
  2500. var myChart = window.echarts.init(chartDom);
  2501. that.gyqsChartdatas = [];
  2502. var nameLength = 0;
  2503. var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
  2504. // ["rgb(245,248,220)", "rgb(191,233,170)", "rgb(104,177,103)", "rgb(205,245,122)",
  2505. // "rgb(101,205,170)",
  2506. // "rgb(216,215,159)",
  2507. // "rgb(255,255,45)",
  2508. // "rgb(255,211,128)"];
  2509. var color = "";
  2510. var qsList = [];
  2511. for (var i = 0; i < that.qsResult.stateUsedList.length; i++) {
  2512. that.gyqsChartdatas.push({
  2513. value: Number(that.qsResult.stateUsedList[i].mj.toFixed(2)),
  2514. name: that.qsResult.stateUsedList[i].qsdwmc,
  2515. });
  2516. }
  2517. var option = {
  2518. title: {
  2519. text: '权属信息', //国有所有权信息
  2520. subtext: '',
  2521. top: 'top',
  2522. left: 'center',
  2523. textStyle: {
  2524. color: "#FFFFFF"
  2525. }
  2526. },
  2527. tooltip: {
  2528. trigger: "item",
  2529. },
  2530. legend: {
  2531. type: "scroll",
  2532. orient: "vertical",
  2533. right: 0,
  2534. top: '20%',
  2535. bottom: 20,
  2536. radius: "55%",
  2537. // bottom: 20,
  2538. textStyle: {
  2539. // fontSize: '12px',
  2540. color: "#FFFF",
  2541. },
  2542. pageIconColor: "#ffffff",
  2543. pageTextStyle: {
  2544. color: "#ffffff"
  2545. },
  2546. data: that.gyqsChartdatas.map((t) => t.name),
  2547. formatter: function (name) {
  2548. var val = that.gyqsChartdatas.find((t) => t.name == name).value;
  2549. var spname = '';
  2550. if (name.length > 13) {
  2551. spname = name.substring(0, 12) + val + '亩\n' + name.substring(13, name.length)
  2552. }
  2553. else {
  2554. spname = name
  2555. var lastSpace = (13 - spname.length) * 3;
  2556. if (lastSpace < 0)
  2557. lastSpace = 0
  2558. spname += new Array(lastSpace).join(" ") + val + '亩';
  2559. }
  2560. return spname
  2561. },
  2562. // itemStyle: {
  2563. // borderType: 'solid',
  2564. // borderWidth: 1,
  2565. // borderColor: '#ff00ff' //'rgb(255,0,255)'
  2566. // },
  2567. // pageIconColor:"#ffffff"
  2568. },
  2569. color: colors,
  2570. series: [
  2571. {
  2572. name: "",
  2573. type: "pie",
  2574. center: ["25%", "50%"],
  2575. radius: ["35%", "50%"],
  2576. avoidLabelOverlap: false,
  2577. itemStyle: {
  2578. borderRadius: 0,
  2579. borderColor: "#ff00ff",
  2580. borderWidth: 1,
  2581. borderType: 'solid',
  2582. },
  2583. label: {
  2584. show: false,
  2585. position: "center",
  2586. },
  2587. emphasis: {
  2588. label: {
  2589. show: true,
  2590. fontSize: 12,
  2591. fontWeight: "bold",
  2592. },
  2593. },
  2594. labelLine: {
  2595. show: false,
  2596. },
  2597. data: that.gyqsChartdatas,
  2598. },
  2599. ],
  2600. };
  2601. myChart.clear();
  2602. myChart.setOption(option);
  2603. that.GYQSLoad(that.gyqsChartdatas, null, false);
  2604. myChart.on("legendselectchanged", function (parmas) {
  2605. that.pickEntity('ZDGYQS');
  2606. var name = parmas.name
  2607. var showOrHide = parmas.selected[name]
  2608. // var index = Object.keys(parmas.selected).findIndex(t => t == name)
  2609. that.GYQSLoad(that.gyqsChartdatas, name, showOrHide);
  2610. });
  2611. },
  2612. GYQSLoad(datas, name, showOrHide) {
  2613. var that = this;
  2614. //国有信息
  2615. var stateUsedfldVal = "";
  2616. var stateUsedfld = window.ZSBC.ZDBCJS.StateUsed.ownerfld;
  2617. var stateUsedIndex = that.getfldIndex(that.qsResult.stateUsedFieldInfos, stateUsedfld);
  2618. var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
  2619. var fieldValues = [];
  2620. var entity;
  2621. var geometry;
  2622. var features = that.qsResult.stateUsedFeatures;
  2623. var attributes = {};
  2624. for (var i = 0; i < features.length; i++) {
  2625. fieldValues = features[i].fieldValues;
  2626. if (stateUsedIndex > -1) {
  2627. stateUsedfldVal = fieldValues[stateUsedIndex];
  2628. }
  2629. if (name != null && stateUsedfldVal != name)
  2630. continue;
  2631. var index = datas.findIndex(t => t.name == stateUsedfldVal);
  2632. var mod = index % colors.length;
  2633. var color = colors[mod].replace("rgb", "")
  2634. .replace("(", "")
  2635. .replace(")", "");
  2636. var colorArr = color.split(",");
  2637. var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  2638. var smid = features[i].fieldValues[simIndex]
  2639. var ff = that.qsEntities.find(t => t.id == "ZDGYQS_" + smid)
  2640. if (ff != null) {
  2641. entity = viewer.entities.getById("ZDGYQS_" + smid)
  2642. if (entity != undefined)
  2643. entity.show = showOrHide;
  2644. }
  2645. else {
  2646. attributes = {
  2647. fieldNames: that.zdResult.fieldInfos,
  2648. fieldValues: features[i].fieldValues,
  2649. };
  2650. geometry = features[i].geometry;
  2651. fieldValues = features[i].fieldValues;
  2652. let point3ds = [];
  2653. let pointholes = [];
  2654. let startindex = 0;
  2655. for (
  2656. let index = 0;
  2657. index < geometry.parts.length;
  2658. index++
  2659. ) {
  2660. let thisps = [];
  2661. const endindex = startindex + geometry.parts[index];
  2662. let geometryPoints = geometry.points.slice(
  2663. startindex,
  2664. endindex
  2665. );
  2666. for (
  2667. let pointindex = 0;
  2668. pointindex < geometryPoints.length;
  2669. pointindex++
  2670. ) {
  2671. const point = geometryPoints[pointindex];
  2672. thisps.push(point.x);
  2673. thisps.push(point.y);
  2674. }
  2675. if (geometry.partTopo[index] === 1) {
  2676. point3ds.push(Cesium.Cartesian3.fromDegreesArray(thisps));
  2677. } else {
  2678. pointholes.push(Cesium.Cartesian3.fromDegreesArray(thisps));
  2679. }
  2680. startindex = endindex;
  2681. }
  2682. if (point3ds.length > 0 && pointholes.length > 0) {
  2683. let holes = [];
  2684. pointholes.forEach((hole) => {
  2685. holes.push({ positions: hole });
  2686. });
  2687. entity = new Cesium.Entity({
  2688. id: "ZDGYQS_" + smid,
  2689. polygon: {
  2690. hierarchy: {
  2691. // Cesium.PolygonHierarchy
  2692. positions: point3ds[0],
  2693. holes: holes, // Cesium.PolygonHierarchy 数组
  2694. },
  2695. material: new Cesium.Color(
  2696. parseInt(colorArr[0]) / 255,
  2697. parseInt(colorArr[1]) / 255,
  2698. parseInt(colorArr[2]) / 255,
  2699. 0.2
  2700. ),
  2701. outline: true,
  2702. outlineColor: Cesium.Color.DEEPPINK,
  2703. outlineWidth: 1.5,
  2704. },
  2705. });
  2706. } else if (point3ds.length > 0) {
  2707. entity = new Cesium.Entity({
  2708. id: "ZDGYQS_" + smid,
  2709. polygon: {
  2710. hierarchy: point3ds[0],
  2711. material: new Cesium.Color(
  2712. parseInt(colorArr[0]) / 255,
  2713. parseInt(colorArr[1]) / 255,
  2714. parseInt(colorArr[2]) / 255,
  2715. 0.2
  2716. ),
  2717. outline: true,
  2718. outlineColor: Cesium.Color.DEEPPINK,
  2719. outlineWidth: 1.5,
  2720. },
  2721. });
  2722. }
  2723. entity.show = showOrHide;
  2724. entity.attributes = attributes;
  2725. that.qsEntities.push({ type: name, id: "ZDGYQS_" + smid });
  2726. viewer.entities.add(entity);
  2727. }
  2728. }
  2729. },
  2730. /**
  2731. * 集体使用权
  2732. */
  2733. JTUseChart() {
  2734. var that = this;
  2735. var chartDom = document.getElementById("JTUSEChart");
  2736. var myChart = window.echarts.init(chartDom);
  2737. var datas = [];
  2738. var nameLength = 0;
  2739. var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
  2740. for (var i = 0; i < that.qsResult.collectiveUsedList.length; i++) {
  2741. datas.push({
  2742. value: parseFloat(that.qsResult.collectiveUsedList[i].mj.toFixed(2)),
  2743. name: that.qsResult.collectiveUsedList[i].qsdwmc,
  2744. });
  2745. }
  2746. var option = {
  2747. title: {
  2748. text: '集体使用权信息',
  2749. subtext: '',
  2750. top: 'top',
  2751. left: 'center',
  2752. textStyle: {
  2753. color: "#FFFFFF"
  2754. }
  2755. },
  2756. tooltip: {
  2757. trigger: "item",
  2758. },
  2759. legend: {
  2760. type: "scroll",
  2761. orient: "vertical",
  2762. right: 0,
  2763. top: '20%',
  2764. bottom: 20,
  2765. radius: "55%",
  2766. itemStyle: {
  2767. // color: colors[0],
  2768. borderColor: 'rgb(,0,255)',
  2769. borderWidth: 1
  2770. },
  2771. pageIconColor: "#ffffff",
  2772. pageTextStyle: {
  2773. color: "#ffffff"
  2774. },
  2775. // bottom: 20,
  2776. textStyle: {
  2777. // fontSize: '12px',
  2778. color: "#FFFF",
  2779. },
  2780. data: datas.map((t) => t.name),
  2781. formatter: function (name) {
  2782. var val = datas.find((t) => t.name == name).value;
  2783. var spname = '';
  2784. // nameLength = Math.ceil(nameLength / 2)
  2785. if (name.length > 13)
  2786. spname = name.substring(0, 12) + val + "亩" + '\n' + name.substring(13, name.length)
  2787. else {
  2788. spname = name
  2789. var lastSpace = (13 - spname.length) * 3;
  2790. if (lastSpace < 0)
  2791. lastSpace = 0
  2792. spname += new Array(lastSpace).join(" ") + val + "亩" + '\n';
  2793. }
  2794. return spname
  2795. },
  2796. },
  2797. color: colors,
  2798. series: [
  2799. {
  2800. name: "集体使用权信息",
  2801. type: "pie",
  2802. center: ["25%", "50%"],
  2803. radius: ["25%", "45%"],
  2804. avoidLabelOverlap: false,
  2805. // itemStyle: {
  2806. // borderRadius: 10,
  2807. // borderWidth: 1,
  2808. // },
  2809. label: {
  2810. show: false,
  2811. position: "center",
  2812. },
  2813. emphasis: {
  2814. label: {
  2815. show: true,
  2816. fontSize: 12,
  2817. fontWeight: "bold",
  2818. },
  2819. },
  2820. labelLine: {
  2821. show: false,
  2822. },
  2823. data: datas,
  2824. },
  2825. ],
  2826. };
  2827. myChart.clear();
  2828. myChart.setOption(option);
  2829. var shaowOrHide = false;
  2830. that.JTUseLoad(datas, null, shaowOrHide)
  2831. myChart.on("legendselectchanged", function (parmas) {
  2832. that.pickEntity('ZDJTUSE');
  2833. var name = parmas.name
  2834. shaowOrHide = parmas.selected[name]
  2835. that.JTUseLoad(datas, name, shaowOrHide)
  2836. });
  2837. },
  2838. JTUseLoad(datas, name, shaowOrHide) {
  2839. var that = this;
  2840. // //集体使用信息
  2841. var collectiveUsedfldVal = "";
  2842. var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
  2843. var collectiveUsedfld = window.ZSBC.ZDBCJS.CollectiveUsed.ownerfld;
  2844. var collectiveUsedIndex = that.getfldIndex(that.qsResult.collectiveUsedFieldInfos, collectiveUsedfld);
  2845. var color = "";
  2846. var fieldValues = [];
  2847. var geometry;
  2848. var entity;
  2849. var features = that.qsResult.collectiveUsedFeatures;
  2850. var attributes = {};
  2851. for (var i = 0; i < features.length; i++) {
  2852. fieldValues = features[i].fieldValues;
  2853. if (collectiveUsedIndex > -1) {
  2854. collectiveUsedfldVal = fieldValues[collectiveUsedIndex];
  2855. }
  2856. if (name != null && collectiveUsedfldVal != name)
  2857. continue;
  2858. var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  2859. var smid = features[i].fieldValues[simIndex]
  2860. var ff = that.qsEntities.find(t => t.id == "ZDJTUSE_" + smid)
  2861. if (ff != null) {
  2862. entity = viewer.entities.getById("ZDJTUSE_" + smid)
  2863. if (entity != undefined)
  2864. entity.show = shaowOrHide;
  2865. }
  2866. else {
  2867. var index = datas.findIndex(t => t.name == collectiveUsedfldVal)
  2868. var mod = index % colors.length
  2869. var color = colors[mod]
  2870. if (color == null)
  2871. continue;
  2872. color = color.replace("rgb", "")
  2873. .replace("(", "")
  2874. .replace(")", "");
  2875. var colorArr = color.split(",");
  2876. if (colorArr == null || colorArr.length == 0)
  2877. continue;
  2878. attributes = {
  2879. fieldNames: that.zdResult.fieldInfos,
  2880. fieldValues: features[i].fieldValues,
  2881. };
  2882. geometry = features[i].geometry;
  2883. fieldValues = features[i].fieldValues;
  2884. let point3ds = [];
  2885. let pointholes = [];
  2886. let startindex = 0;
  2887. for (
  2888. let index = 0;
  2889. index < geometry.parts.length;
  2890. index++
  2891. ) {
  2892. let thisps = [];
  2893. const endindex = startindex + geometry.parts[index];
  2894. let geometryPoints = geometry.points.slice(
  2895. startindex,
  2896. endindex
  2897. );
  2898. for (
  2899. let pointindex = 0;
  2900. pointindex < geometryPoints.length;
  2901. pointindex++
  2902. ) {
  2903. const point = geometryPoints[pointindex];
  2904. thisps.push(point.x);
  2905. thisps.push(point.y);
  2906. }
  2907. if (geometry.partTopo[index] === 1) {
  2908. point3ds.push(Cesium.Cartesian3.fromDegreesArray(thisps));
  2909. } else {
  2910. pointholes.push(Cesium.Cartesian3.fromDegreesArray(thisps));
  2911. }
  2912. startindex = endindex;
  2913. }
  2914. if (point3ds.length > 0 && pointholes.length > 0) {
  2915. let holes = [];
  2916. pointholes.forEach((hole) => {
  2917. holes.push({ positions: hole });
  2918. });
  2919. entity = new Cesium.Entity({
  2920. id: "ZDJTUSE_" + smid,
  2921. polygon: {
  2922. hierarchy: {
  2923. // Cesium.PolygonHierarchy
  2924. positions: point3ds[0],
  2925. holes: holes, // Cesium.PolygonHierarchy 数组
  2926. },
  2927. material: new Cesium.Color(
  2928. parseInt(colorArr[0]) / 255,
  2929. parseInt(colorArr[1]) / 255,
  2930. parseInt(colorArr[2]) / 255,
  2931. 0.3
  2932. ),
  2933. outline: true,
  2934. outlineColor: Cesium.Color.FUCHSIA,
  2935. outlineWidth: 1.5,
  2936. },
  2937. });
  2938. } else if (point3ds.length > 0) {
  2939. entity = new Cesium.Entity({
  2940. id: "ZDJTUSE_" + smid,
  2941. polygon: {
  2942. hierarchy: point3ds[0],
  2943. material: new Cesium.Color(
  2944. parseInt(colorArr[0]) / 255,
  2945. parseInt(colorArr[1]) / 255,
  2946. parseInt(colorArr[2]) / 255,
  2947. 0.3
  2948. ),
  2949. outline: true,
  2950. outlineColor: Cesium.Color.FUCHSIA,
  2951. outlineWidth: 1.5,
  2952. },
  2953. });
  2954. }
  2955. entity.show = shaowOrHide;
  2956. entity.attributes = attributes;
  2957. that.qsEntities.push({ type: name, id: "ZDJTUSE_" + smid });
  2958. viewer.entities.add(entity);
  2959. }
  2960. }
  2961. },
  2962. /**
  2963. * 集体所有权
  2964. */
  2965. JTOwnerChart() {
  2966. var that = this;
  2967. var chartDom = document.getElementById("JTOWNERChart");
  2968. var myChart = window.echarts.init(chartDom);
  2969. var datas = [];
  2970. var nameLength = 0;
  2971. var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
  2972. var qsList = [];
  2973. for (var i = 0; i < that.qsResult.collectiveOwnerList.length; i++) {
  2974. // var name = that.qsResult.collectiveUsedList[i].qsdwmc;
  2975. datas.push({
  2976. value: parseFloat(that.qsResult.collectiveOwnerList[i].mj.toFixed(2)),
  2977. name: that.qsResult.collectiveOwnerList[i].qsdwmc,
  2978. });
  2979. }
  2980. var option = {
  2981. title: {
  2982. text: '集体所有权信息',
  2983. subtext: '',
  2984. top: 'top',
  2985. left: 'center',
  2986. textStyle: {
  2987. color: "#FFFFFF"
  2988. }
  2989. },
  2990. tooltip: {
  2991. trigger: "item",
  2992. },
  2993. legend: {
  2994. type: "scroll",
  2995. orient: "vertical",
  2996. right: 0,
  2997. top: '20%',
  2998. bottom: 20,
  2999. radius: "55%",
  3000. // bottom: 20,
  3001. textStyle: {
  3002. // fontSize: '12px',
  3003. color: "#FFFF",
  3004. },
  3005. pageIconColor: "#ffffff",
  3006. pageTextStyle: {
  3007. color: "#ffffff"
  3008. },
  3009. data: datas.map((t) => t.name),
  3010. formatter: function (name) {
  3011. var val = datas.find((t) => t.name == name).value;
  3012. var spname = '';
  3013. // nameLength = Math.ceil(nameLength / 2)
  3014. if (name.length > 13)
  3015. spname = name.substring(0, 12) + val + '亩\n' + name.substring(13, name.length) //+ val + "个"
  3016. else {
  3017. spname = name
  3018. var lastSpace = (13 - spname.length) * 3;
  3019. if (lastSpace < 0)
  3020. lastSpace = 0
  3021. spname += new Array(lastSpace).join(" ") + val + '亩';
  3022. }
  3023. return spname
  3024. },
  3025. itemStyle: {
  3026. borderWidth: 1,
  3027. borderColor: 'rgb(0,0,255)'
  3028. },
  3029. },
  3030. color: colors,
  3031. series: [
  3032. {
  3033. name: "集体所有权属分析",
  3034. type: "pie",
  3035. center: ["25%", "50%"],
  3036. radius: ["25%", "45%"],
  3037. avoidLabelOverlap: false,
  3038. // itemStyle: {
  3039. // borderRadius: 10,
  3040. // borderColor: "#fff",
  3041. // borderWidth: 2,
  3042. // },
  3043. label: {
  3044. show: false,
  3045. position: "center",
  3046. },
  3047. emphasis: {
  3048. label: {
  3049. show: true,
  3050. fontSize: 12,
  3051. fontWeight: "bold",
  3052. },
  3053. },
  3054. labelLine: {
  3055. show: false,
  3056. },
  3057. data: datas,
  3058. },
  3059. ],
  3060. };
  3061. var showOrHide = false;
  3062. that.JTOwnerLoad(datas, null, showOrHide);
  3063. myChart.clear();
  3064. myChart.setOption(option);
  3065. myChart.on("legendselectchanged", function (parmas) {
  3066. that.pickEntity('ZDJTOWNER');
  3067. var name = parmas.name
  3068. showOrHide = parmas.selected[name]
  3069. that.JTOwnerLoad(datas, name, showOrHide);
  3070. });
  3071. },
  3072. JTOwnerLoad(datas, name, showOrHide) {
  3073. var that = this;
  3074. var color = "";
  3075. var fieldValues = [];
  3076. var geometry;
  3077. var colors = ["rgb(63,177,227)", "rgb(107,230,193)", "rgb(196,235,173)", "rgb(150,222,232)"];
  3078. var entity;
  3079. var features = that.qsResult.collectiveOwnerFeatures;
  3080. var attributes = {};
  3081. // //集体使用信息
  3082. var collectiveUsedownerfldVal = "";
  3083. var collectiveUsedownerfld = window.ZSBC.ZDBCJS.CollectiveOwner.ownerfld;
  3084. var collectiveUsedownerIndex = that.getfldIndex(that.qsResult.collectiveOwnerFieldInfos, collectiveUsedownerfld);
  3085. for (var i = 0; i < features.length; i++) {
  3086. fieldValues = features[i].fieldValues;
  3087. if (collectiveUsedownerIndex > -1) {
  3088. collectiveUsedownerfldVal = fieldValues[collectiveUsedownerIndex];
  3089. }
  3090. if (name != null && collectiveUsedownerfldVal != name)
  3091. continue;
  3092. var simIndex = features[i].fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  3093. var smid = features[i].fieldValues[simIndex]
  3094. var ff = that.qsEntities.find(t => t.id == "ZDJTOWNER_" + smid)
  3095. if (ff != null) {
  3096. entity = viewer.entities.getById("ZDJTOWNER_" + smid)
  3097. if (entity != undefined)
  3098. entity.show = showOrHide;
  3099. }
  3100. else {
  3101. attributes = {
  3102. fieldNames: that.zdResult.fieldInfos,
  3103. fieldValues: features[i].fieldValues,
  3104. };
  3105. geometry = features[i].geometry;
  3106. fieldValues = features[i].fieldValues;
  3107. var index = datas.findIndex(t => t.name == collectiveUsedownerfldVal)
  3108. var mod = index % colors.length
  3109. var color = colors[mod]
  3110. if (color == null)
  3111. continue;
  3112. color = color.replace("rgb", "")
  3113. .replace("(", "")
  3114. .replace(")", "");
  3115. var colorArr = color.split(",");
  3116. if (colorArr == null || colorArr.length == 0)
  3117. continue;
  3118. let point3ds = [];
  3119. let pointholes = [];
  3120. let startindex = 0;
  3121. for (
  3122. let index = 0; index < geometry.parts.length; index++) {
  3123. let thisps = [];
  3124. const endindex = startindex + geometry.parts[index];
  3125. let geometryPoints = geometry.points.slice(
  3126. startindex,
  3127. endindex
  3128. );
  3129. for (
  3130. let pointindex = 0;
  3131. pointindex < geometryPoints.length;
  3132. pointindex++
  3133. ) {
  3134. const point = geometryPoints[pointindex];
  3135. thisps.push(point.x);
  3136. thisps.push(point.y);
  3137. }
  3138. if (geometry.partTopo[index] === 1) {
  3139. point3ds.push(Cesium.Cartesian3.fromDegreesArray(thisps));
  3140. } else {
  3141. pointholes.push(Cesium.Cartesian3.fromDegreesArray(thisps));
  3142. }
  3143. startindex = endindex;
  3144. }
  3145. if (point3ds.length > 0 && pointholes.length > 0) {
  3146. let holes = [];
  3147. pointholes.forEach((hole) => {
  3148. holes.push({ positions: hole });
  3149. });
  3150. entity = new Cesium.Entity({
  3151. id: "ZDJTOWNER_" + smid,
  3152. polygon: {
  3153. hierarchy: {
  3154. // Cesium.PolygonHierarchy
  3155. positions: point3ds[0],
  3156. holes: holes, // Cesium.PolygonHierarchy 数组
  3157. },
  3158. material: new Cesium.Color(
  3159. parseInt(colorArr[0]) / 255,
  3160. parseInt(colorArr[1]) / 255,
  3161. parseInt(colorArr[2]) / 255,
  3162. 0.3
  3163. ),
  3164. outline: true,
  3165. outlineColor: Cesium.Color.FUCHSIA,
  3166. outlineWidth: 1.5,
  3167. },
  3168. });
  3169. } else if (point3ds.length > 0) {
  3170. entity = new Cesium.Entity({
  3171. id: "ZDJTOWNER_" + smid,
  3172. polygon: {
  3173. hierarchy: point3ds[0],
  3174. material: new Cesium.Color(
  3175. parseInt(colorArr[0]) / 255,
  3176. parseInt(colorArr[1]) / 255,
  3177. parseInt(colorArr[2]) / 255,
  3178. 0.3
  3179. ),
  3180. outline: true,
  3181. outlineColor: Cesium.Color.FUCHSIA,
  3182. outlineWidth: 1.5,
  3183. },
  3184. });
  3185. }
  3186. entity.show = showOrHide
  3187. entity.attributes = attributes;
  3188. that.qsEntities.push({ type: name, id: "ZDJTOWNER_" + smid });
  3189. viewer.entities.add(entity);
  3190. }
  3191. }
  3192. },
  3193. /**
  3194. * 绘制多边形
  3195. */
  3196. startPolygon() {
  3197. var that = this;
  3198. debugger
  3199. if (handleInput) {
  3200. handleInput.destroy();
  3201. }
  3202. handlerPolygon = new Cesium.DrawHandler(
  3203. viewer,
  3204. Cesium.DrawMode.Polygon,
  3205. 0
  3206. );
  3207. handlerPolygon.activate()
  3208. handlerPolygon.activeEvt.addEventListener(function (isActive) {
  3209. if (isActive == true) {
  3210. viewer.enableCursorStyle = false;
  3211. viewer._element.style.cursor = "";
  3212. // var nodes = document.getElementsByTagName('body')
  3213. // if (nodes.length > 0)
  3214. // nodes[0].className.replace('drawCur','drawCur')
  3215. } else {
  3216. viewer.enableCursorStyle = true;
  3217. // var nodes = document.getElementsByTagName('body')
  3218. // if (nodes.length > 0) {
  3219. // nodes[0].className.replace('drawCur','')
  3220. // }
  3221. }
  3222. });
  3223. handlerPolygon.movingEvt.addEventListener(function (windowPosition) {
  3224. // if (this.handlerPolygon.isDrawing) {
  3225. // window.createTooltip.showAt(windowPosition, '点击确定多边形顶点,右键单击结束绘制,');
  3226. // } else {
  3227. // window.createTooltip.showAt(windowPosition, '点击绘制第一个点,');
  3228. // }
  3229. });
  3230. handlerPolygon.drawEvt.addEventListener(function (result) {
  3231. // handlerPolygon.polygon.show = false;
  3232. // handlerPolygon.polyline.show = false;
  3233. var nPositions = [];
  3234. that.regions = [];
  3235. for (var pt of result.object.positions) {
  3236. var cartographic = Cesium.Cartographic.fromCartesian(pt);
  3237. var longitude = Cesium.Math.toDegrees(cartographic.longitude);
  3238. var latitude = Cesium.Math.toDegrees(cartographic.latitude);
  3239. var height = cartographic.height;
  3240. that.regions.push({ x: longitude, y: latitude });
  3241. nPositions.push(longitude)
  3242. nPositions.push(latitude)
  3243. }
  3244. that.regions.push(that.regions[0]);
  3245. viewer.entities.removeAll();
  3246. polygonEntity = new Cesium.Entity({
  3247. id: 'polygon',
  3248. // position: Cesium.Cartesian3.fromDegreesArray([
  3249. // centerX,
  3250. // centerY,
  3251. // ]),
  3252. // classificationType: ClassificationType.TERRAIN,
  3253. polygon: {
  3254. hierarchy: new Cesium.PolygonHierarchy(
  3255. new Cesium.Cartesian3.fromDegreesArray(nPositions)
  3256. ),
  3257. // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
  3258. material: Cesium.Color.WHITE.withAlpha(0.3),
  3259. outline: true,
  3260. outlineColor: Cesium.Color.RED,
  3261. outlineWidth: 2.0,
  3262. },
  3263. });
  3264. viewer.entities.add(polygonEntity)
  3265. that.curProjectInfo.regions = that.regions;
  3266. // that.regions = [];
  3267. // that.regions.push(that.positions);
  3268. viewer.flyTo(polygonEntity)
  3269. handlerPolygon.clear()
  3270. handlerPolygon.deactivate();
  3271. });
  3272. },
  3273. clipImage() {
  3274. var that = this;
  3275. var promise = scene.outputSceneToFile();
  3276. Cesium.when(promise, function (base64data) {
  3277. that.imageData = base64data
  3278. })
  3279. },
  3280. /**
  3281. * 点击绘制多边形
  3282. */
  3283. drawPolygon() {
  3284. viewer.entities.removeAll();
  3285. if (polygonEntity) {
  3286. viewer.entities.remove(polygonEntity)
  3287. }
  3288. this.startPolygon();
  3289. // else {
  3290. // handlerPolygon=;
  3291. // this.positions = [];
  3292. // this.regions = [];
  3293. // }
  3294. // handlerPolygon.activate();
  3295. },
  3296. /**
  3297. * 拆迁定位
  3298. * @param {string} smid 图斑id
  3299. * @param {string} cqr //产权人
  3300. */
  3301. cqLocation(isGYFC, smid, cqr) {
  3302. var features;
  3303. var that = this;
  3304. if (isGYFC == true)
  3305. features = that.cqResult.gyfeatures;
  3306. else
  3307. features = that.cqResult.jtfeatures;
  3308. var fieldNames = [];
  3309. var smidIndex = -1;
  3310. var fieldValues = [];
  3311. var geometry = null;
  3312. if (features == null) return;
  3313. var attributes;
  3314. //产权人
  3315. var entity;
  3316. // var index = that.entities.findIndex(t => t.id == "ZDBDC_" + smid)
  3317. // if (index > -1) {
  3318. // entity = viewer.entities.getById("ZDBDC_" + smid);
  3319. // entity.show = true;
  3320. // viewer.entities.removeById('aad')
  3321. // var point = new Cesium.Entity({
  3322. // id: "aad",
  3323. // position: entity.position,
  3324. // point: {
  3325. // // 点的大小(像素)
  3326. // pixelSize: 10,
  3327. // // 点位颜色,fromCssColorString 可以直接使用CSS颜色
  3328. // color: Cesium.Color.RED.withAlpha(0),
  3329. // // 边框颜色
  3330. // outlineColor: Cesium.Color.fromCssColorString("#fff").withAlpha(0),
  3331. // // 边框宽度(像素)
  3332. // outlineWidth: 2,
  3333. // // 显示在距相机的距离处的属性,多少区间内是可以显示的
  3334. // // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
  3335. // // 0,
  3336. // // 1500
  3337. // // ),
  3338. // // 是否显示
  3339. // show: true,
  3340. // }
  3341. // })
  3342. // viewer.entities.add(point);
  3343. // viewer.flyTo(point)
  3344. // setTimeout(function () {
  3345. // viewer.entities.removeById('aad')
  3346. // }, 3000)
  3347. // }
  3348. // else {
  3349. // var curID;
  3350. // for (var i = 0; i < features.length; i++) {
  3351. // fieldNames = features[i].fieldNames;
  3352. // fieldValues = features[i].fieldValues;
  3353. // smidIndex = fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  3354. // attributes = {
  3355. // fieldNames: fieldNames,
  3356. // fieldValues: fieldValues,
  3357. // };
  3358. // curID = fieldValues[smidIndex];
  3359. // if (curID != smid)
  3360. // continue;
  3361. // geometry = features[i].geometry;
  3362. // var positions = [];
  3363. // for (var i = 0; i < geometry.points.length; i++) {
  3364. // positions.push(geometry.points[i].x);
  3365. // positions.push(geometry.points[i].y);
  3366. // }
  3367. // entity = new Cesium.Entity({
  3368. // id: "ZDBDC_" + smid,
  3369. // // label: {
  3370. // // text: cqr,
  3371. // // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
  3372. // // font: "14px sans-serif",
  3373. // // fillColor: new Cesium.Color(1, 0, 0, 1),
  3374. // // showBackground: true,
  3375. // // backgroundColor: new Cesium.Color(0, 0.8, 0, 0.8)
  3376. // // },
  3377. // position: Cesium.Cartesian3.fromDegrees(
  3378. // geometry.center.x,
  3379. // geometry.center.y,
  3380. // 50
  3381. // ),
  3382. // show: true,
  3383. // polygon: {
  3384. // hierarchy: new Cesium.PolygonHierarchy(
  3385. // new Cesium.Cartesian3.fromDegreesArray(positions)
  3386. // ),
  3387. // // positions: new Cesium.Cartesian3.fromDegreesArray(positions),
  3388. // material: new Cesium.Color(255 / 255, 211 / 255, 128 / 255, 1),
  3389. // outline: true,
  3390. // outlineColor: Cesium.Color.BLACK,
  3391. // outlineWidth: 1.5,
  3392. // },
  3393. // });
  3394. // entity.attributes = attributes;
  3395. // viewer.entities.add(entity);
  3396. // that.entities.push({ type: "ZDBDC", id: "ZDBDC_" + smid })
  3397. // viewer.entities.removeById('aad')
  3398. // var point = new Cesium.Entity({
  3399. // id: 'aad',
  3400. // position: entity.position,
  3401. // point: {
  3402. // // 点的大小(像素)
  3403. // pixelSize: 10,
  3404. // // 点位颜色,fromCssColorString 可以直接使用CSS颜色
  3405. // color: Cesium.Color.RED.withAlpha(0),
  3406. // // 边框颜色
  3407. // outlineColor: Cesium.Color.fromCssColorString("#fff").withAlpha(0),
  3408. // // 边框宽度(像素)
  3409. // outlineWidth: 2,
  3410. // // 显示在距相机的距离处的属性,多少区间内是可以显示的
  3411. // // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
  3412. // // 0,
  3413. // // 1500
  3414. // // ),
  3415. // // 是否显示
  3416. // show: true,
  3417. // }
  3418. // })
  3419. // viewer.entities.add(point);
  3420. // viewer.flyTo(point)
  3421. // setTimeout(function () {
  3422. // viewer.entities.removeById('aad')
  3423. // }, 3000)
  3424. // }
  3425. // }
  3426. var index = that.entities.findIndex(t => t.id == "ZDBDC_FC")
  3427. if (index == -1) {
  3428. that.entities.push({ type: "ZDBDC", id: "ZDBDC_FC" });
  3429. }
  3430. viewer.entities.removeById('ZDBDC_FC');
  3431. viewer.entities.removeById('aad')
  3432. if(popupBox){
  3433. popupBox.destroy();
  3434. popupBox=null;
  3435. }
  3436. var curID;
  3437. for (var i = 0; i < features.length; i++) {
  3438. fieldNames = features[i].fieldNames;
  3439. fieldValues = features[i].fieldValues;
  3440. smidIndex = fieldNames.findIndex(t => t.toUpperCase() == "SMID")
  3441. attributes = {
  3442. fieldNames: fieldNames,
  3443. fieldValues: fieldValues,
  3444. };
  3445. curID = fieldValues[smidIndex];
  3446. if (curID != smid)
  3447. continue;
  3448. geometry = features[i].geometry;
  3449. var positions = [];
  3450. for (var i = 0; i < geometry.points.length; i++) {
  3451. positions.push(geometry.points[i].x);
  3452. positions.push(geometry.points[i].y);
  3453. }
  3454. let dom = document.createElement("div");
  3455. dom.id = "ZDBDC_FCtext";
  3456. dom.style.position = "absolute";
  3457. dom.style.width = "0";
  3458. dom.style.height = "0";
  3459. // dom.style.color = "rgba(2, 23, 44, 0.8)";
  3460. // dom.style.backgroundColor = "rgba(2, 23, 44, 0.8)";
  3461. dom.style.fontSize = "1rem";
  3462. let domContent = document.createElement("div");
  3463. domContent.style.position = "absolute";
  3464. domContent.style.borderRadius = "5px";
  3465. domContent.style.border = "1px solid rgba(7, 131, 250, 0.3)";
  3466. domContent.style.backgroundColor = "rgba(2, 23, 44, 0.7)";
  3467. domContent.style.bottom = "0px";
  3468. domContent.style.left = "0px";
  3469. domContent.style.whiteSpace = "nowrap";
  3470. domContent.style.color = "white";
  3471. // domContent.style.padding = "8px 12px";
  3472. domContent.style.transform = "translate(-50%, 0%)";
  3473. domContent.innerHTML = cqr;
  3474. dom.appendChild(domContent);
  3475. popupBox = new Popup({
  3476. viewer: viewer,
  3477. element: dom,
  3478. pixelOffset: new Cesium.Cartesian2(0, 0),
  3479. translucencyByDistance: new Cesium.NearFarScalar(
  3480. 0,
  3481. 1,
  3482. 50000,
  3483. 1
  3484. ),
  3485. distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
  3486. 0,
  3487. 51000
  3488. ),
  3489. position: Cesium.Cartesian3.fromDegrees(geometry.center.x,geometry.center.y,20),
  3490. });
  3491. popupBox.show();
  3492. entity = new Cesium.Entity({
  3493. id: "ZDBDC_FC",
  3494. // label: {
  3495. // text: cqr,
  3496. // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
  3497. // font: "14px sans-serif",
  3498. // fillColor: new Cesium.Color(1, 0, 0, 1),
  3499. // showBackground: true,
  3500. // backgroundColor: new Cesium.Color(0, 0.8, 0, 0.8)
  3501. // },
  3502. position: Cesium.Cartesian3.fromDegrees(
  3503. geometry.center.x,
  3504. geometry.center.y,
  3505. 50
  3506. ),
  3507. show: true,
  3508. polygon: {
  3509. hierarchy: new Cesium.PolygonHierarchy(
  3510. new Cesium.Cartesian3.fromDegreesArray(positions)
  3511. ),
  3512. material: new Cesium.Color(255 / 255, 211 / 255, 128 / 255, 1),
  3513. outline: true,
  3514. outlineColor: Cesium.Color.BLACK,
  3515. outlineWidth: 1.5,
  3516. },
  3517. });
  3518. entity.attributes = attributes;
  3519. viewer.entities.add(entity);
  3520. }
  3521. var point = new Cesium.Entity({
  3522. id: "aad",
  3523. position: entity.position,
  3524. point: {
  3525. // 点的大小(像素)
  3526. pixelSize: 10,
  3527. // 点位颜色,fromCssColorString 可以直接使用CSS颜色
  3528. color: Cesium.Color.RED.withAlpha(0),
  3529. // 边框颜色
  3530. outlineColor: Cesium.Color.fromCssColorString("#fff").withAlpha(0),
  3531. // 边框宽度(像素)
  3532. outlineWidth: 2,
  3533. // 显示在距相机的距离处的属性,多少区间内是可以显示的
  3534. // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
  3535. // 0,
  3536. // 1500
  3537. // ),
  3538. // 是否显示
  3539. show: true,
  3540. }
  3541. })
  3542. viewer.entities.add(point);
  3543. viewer.flyTo(point);
  3544. setTimeout(function () {
  3545. viewer.entities.removeById('aad');
  3546. }, 3000)
  3547. },
  3548. /**
  3549. * 点击确定开始计算
  3550. */
  3551. submitForm(formName) {
  3552. var that = this;
  3553. if (that.regions.length == 0) {
  3554. that.$alert("请导入或绘制项目范围", "警告");
  3555. // alert('请导入或绘制项目范围')
  3556. return false;
  3557. }
  3558. console.log(JSON.stringify(that.regions));
  3559. debugger
  3560. var area = that.getRegionArea() / 666.66;
  3561. if (area > 3000) {
  3562. that.$alert("项目范围不要超过3000亩,请重新输入项目范围", "警告");
  3563. viewer.entities.removeAll();
  3564. return false;
  3565. }
  3566. that.loading = that.$loading({
  3567. lock: true,
  3568. text: '正在数据分析,请稍后...',
  3569. spinner: 'el-icon-loading',
  3570. background: 'rgba(0, 0, 0, 0.7)'
  3571. });
  3572. that.clipImage();
  3573. that.$refs[formName].validate(async (valid) => {
  3574. if (valid) {
  3575. //alert('submit!');
  3576. // that.doQuery();
  3577. //脚本函数
  3578. var param = {
  3579. geometry: that.regions,
  3580. zdValue: that.ruleForm.zdValue,
  3581. cqValue: that.ruleForm.cqValue,
  3582. qmValue: that.ruleForm.qmValue
  3583. }
  3584. var jdResult = await zdAnalyse.doQuery(param);
  3585. if (jdResult) {
  3586. that.zdResult = jdResult.zdResult;
  3587. that.cqResult = jdResult.cqResult;
  3588. that.qmResult = jdResult.qmResult;
  3589. that.qsResult = jdResult.qsResult;
  3590. }
  3591. that.loading.close();
  3592. that.$message({
  3593. message: "征地分析计算完成",
  3594. type: "success",
  3595. });
  3596. var date = new Date();
  3597. debugger
  3598. var projectName = that.ruleForm.projectName;
  3599. var item = {
  3600. "id": that.projectList.length + 1,
  3601. "projectName": projectName,
  3602. "imageData": that.imageData,
  3603. // 分析范围
  3604. "regions": JSON.stringify(that.regions),
  3605. "gyMJ": parseFloat(that.zdResult.gyMJ.toFixed(2)),
  3606. //集体面积
  3607. "jtMJ": parseFloat(that.zdResult.jtMJ.toFixed(2)),
  3608. //征地面积
  3609. "totalZDMJ": parseFloat(that.zdResult.totalZDMJ.toFixed(2)),
  3610. "dateTime": that.dateFormat(date),
  3611. /* 征地标准值
  3612. // */
  3613. "zdValue": that.ruleForm.zdValue,
  3614. // // zdZBData: window.ZSBC.ZDBCList.find(c => c.value == that.ruleForm.zdValue),
  3615. // /* 青苗标准值
  3616. // */
  3617. "qmValue": that.ruleForm.qmValue,
  3618. // // qmZBData: window.ZSBC.QMBCList.find(c => c.value == that.ruleForm.qmValue),
  3619. // /**
  3620. // * 拆迁标准值
  3621. // */
  3622. "cqValue": that.ruleForm.cqValue,
  3623. // // cqZBData: window.ZSBC.CQBCList.find(c => c.value == that.ruleForm.cqValue),
  3624. /**
  3625. * 拆迁分析结果
  3626. */
  3627. "cqResult": {
  3628. "id": null,
  3629. "projectId": null,
  3630. "count": that.cqResult.count,
  3631. "totalJZMJ": parseFloat(that.cqResult.totalJZMJ.toFixed(2)),
  3632. "totalPay": parseFloat(that.cqResult.totalPay.toFixed(2)),
  3633. "average": parseFloat(that.cqResult.average.toFixed(2)),
  3634. "gyJZMJ": parseFloat(that.cqResult.gyJZMJ.toFixed(2)),
  3635. "jtJZMJ": parseFloat(that.cqResult.jtJZMJ.toFixed(2)),
  3636. "gyCount": that.cqResult.gyCount,
  3637. "jtCount": that.cqResult.jtCount,
  3638. "gyList": JSON.stringify(that.cqResult.gyList),
  3639. "jtList": JSON.stringify(that.cqResult.jtList),
  3640. "gyfeatures": JSON.stringify(that.cqResult.gyfeatures),
  3641. "jtfeatures": JSON.stringify(that.cqResult.jtfeatures),
  3642. "fieldInfos": JSON.stringify(that.cqResult.fieldInfos)
  3643. },
  3644. /**
  3645. * 青苗分析结果
  3646. */
  3647. "qmResult": {
  3648. "id": null,
  3649. "projectId": null,
  3650. "totalPay": parseFloat(that.qmResult.totalPay.toFixed(2)),
  3651. "totalMJ": parseFloat(that.qmResult.totalMJ.toFixed(2)),
  3652. "nzwMJ": parseFloat(that.qmResult.nzwMJ.toFixed(2)),
  3653. "nzwPay": parseFloat(that.qmResult.nzwPay.toFixed(2)),
  3654. "jjzwMJ": parseFloat(that.qmResult.jjzwMJ.toFixed(2)),
  3655. "jjzwPay": parseFloat(that.qmResult.jjzwPay.toFixed(2)),
  3656. "smMJ": parseFloat(that.qmResult.smMJ.toFixed(2)),
  3657. "smPay": parseFloat(that.qmResult.smPay.toFixed(2)),
  3658. "fieldInfos": JSON.stringify(that.qmResult.fieldInfos),
  3659. "features": JSON.stringify(that.qmResult.features),
  3660. },
  3661. /**
  3662. * 征地分析结果
  3663. */
  3664. "zdResult": {
  3665. "id": null,
  3666. "projectId": null,
  3667. //国有面积
  3668. "gyMJ": parseFloat(that.zdResult.gyMJ.toFixed(2)),
  3669. //集体面积
  3670. "jtMJ": parseFloat(that.zdResult.jtMJ.toFixed(2)),
  3671. //征地面积
  3672. "totalZDMJ": parseFloat(that.zdResult.totalZDMJ.toFixed(2)),
  3673. //总补偿
  3674. "totalPay": parseFloat(that.zdResult.totalPay.toFixed(2)),
  3675. //征地补偿
  3676. "totalZDPay": parseFloat(that.zdResult.totalZDPay.toFixed(2)),
  3677. //安置补偿
  3678. "totalAZPay": parseFloat(that.zdResult.totalAZPay.toFixed(2)),
  3679. //国有地类及面积
  3680. "gydlList": JSON.stringify(that.zdResult.gydlList),
  3681. //地类及面积
  3682. "jtdlList": JSON.stringify(that.zdResult.jtdlList),
  3683. "gyfeatures": JSON.stringify(that.zdResult.gyfeatures),
  3684. "jtfeatures": JSON.stringify(that.zdResult.jtfeatures),
  3685. "fieldInfos": JSON.stringify(that.zdResult.fieldInfos),
  3686. },
  3687. /**
  3688. * 权属结果
  3689. */
  3690. "qsResult": {
  3691. "id": null,
  3692. "projectId": null,
  3693. "stateUsedMJ": parseFloat(that.qsResult.stateUsedMJ.toFixed(2)),
  3694. "stateUsedFeatures": JSON.stringify(that.qsResult.stateUsedFeatures),
  3695. "stateUsedList": JSON.stringify(that.qsResult.stateUsedList),
  3696. "stateUsedFieldInfos": JSON.stringify(that.qsResult.stateUsedFieldInfos),
  3697. "collectiveOwnerMJ": parseFloat(that.qsResult.collectiveOwnerMJ.toFixed(2)),
  3698. "collectiveOwnerFeatures": JSON.stringify(that.qsResult.collectiveOwnerFeatures),
  3699. "collectiveOwnerList": JSON.stringify(that.qsResult.collectiveOwnerList),
  3700. "collectiveOwnerFieldInfos": JSON.stringify(that.qsResult.collectiveOwnerFieldInfos),
  3701. "collectiveUsedMJ": parseFloat(that.qsResult.collectiveUsedMJ.toFixed(2)),
  3702. "collectiveUsedList": JSON.stringify(that.qsResult.collectiveUsedList),
  3703. "collectiveUsedFeatures": JSON.stringify(that.qsResult.collectiveUsedFeatures),
  3704. "collectiveUsedFieldInfos": JSON.stringify(that.qsResult.collectiveUsedFieldInfos)
  3705. }
  3706. };
  3707. // 保存项目
  3708. if (window.isUseDB)
  3709. that.saveAnalysResult(item);
  3710. else {
  3711. var dd = JSON.stringify(item);
  3712. var sd = JSON.parse(dd);
  3713. that.curProjectInfo = sd;
  3714. that.projectList.push(sd);
  3715. var list = JSON.stringify(that.projectList.reverse())
  3716. window.ZSBC.projectList = JSON.parse(list)
  3717. }
  3718. var date = new Date()
  3719. debugger
  3720. that.ruleForm.projectName = "拆迁补偿项目_" + that.formatDateTimeToLong(date);
  3721. that.activeName = "second"
  3722. } else {
  3723. console.log("error submit!!");
  3724. return false;
  3725. }
  3726. });
  3727. },
  3728. /**
  3729. * 保存分析结果
  3730. */
  3731. saveAnalysResult(projectInfo) {
  3732. var that = this
  3733. // var projectInfo = {
  3734. // "id": that.curProjectInfo.id,
  3735. // "projectName": that.curProjectInfo.name,
  3736. // "dateTime": that.curProjectInfo.dateTime,
  3737. // "regions": JSON.stringify(that.curProjectInfo.regions),
  3738. // "cqValue": that.curProjectInfo.cqValue,
  3739. // "qmValue": that.curProjectInfo.qmValue,
  3740. // "zdValue": that.curProjectInfo.zdValue,
  3741. // /**
  3742. // * 拆迁分析结果
  3743. // */
  3744. // "cqResult": {
  3745. // "id": null,
  3746. // "projectId": null,
  3747. // "count": that.curProjectInfo.cqResult.count,
  3748. // "totalJZMJ": that.curProjectInfo.cqResult.totalJZMJ,
  3749. // "totalPay": that.curProjectInfo.cqResult.totalPay,
  3750. // "average": that.curProjectInfo.cqResult.average,
  3751. // "gyJZMJ": that.curProjectInfo.cqResult.gyJZMJ,
  3752. // "jtJZMJ": that.curProjectInfo.cqResult.jtJZMJ,
  3753. // "gyCount": that.curProjectInfo.cqResult.gyCount,
  3754. // "jtCount": that.curProjectInfo.cqResult.jtCount,
  3755. // "gyList": JSON.stringify(that.curProjectInfo.cqResult.gyList),
  3756. // "jtList": JSON.stringify(that.curProjectInfo.cqResult.jtList),
  3757. // "gyfeatures": JSON.stringify(that.curProjectInfo.cqResult.gyfeatures),
  3758. // "jtfeatures": JSON.stringify(that.curProjectInfo.cqResult.jtfeatures),
  3759. // "fieldInfos": JSON.stringify(that.curProjectInfo.cqResult.fieldInfos)
  3760. // },
  3761. // /**
  3762. // * 青苗分析结果
  3763. // */
  3764. // "qmResult": {
  3765. // "id": null,
  3766. // "projectId": null,
  3767. // "totalPay": that.curProjectInfo.qmResult.totalPay,
  3768. // "totalMJ": that.curProjectInfo.qmResult.totalMJ,
  3769. // "nzwMJ": that.curProjectInfo.qmResult.nzwMJ,
  3770. // "nzwPay": that.curProjectInfo.qmResult.nzwPay,
  3771. // "jjzwMJ": that.curProjectInfo.qmResult.jjzwMJ,
  3772. // "jjzwPay": that.curProjectInfo.qmResult.jjzwPay,
  3773. // "smMJ": that.curProjectInfo.qmResult.smMJ,
  3774. // "smPay": that.curProjectInfo.qmResult.smPay,
  3775. // "fieldInfos": JSON.stringify(that.curProjectInfo.qmResult.fieldInfos),
  3776. // "features": JSON.stringify(that.curProjectInfo.qmResult.features),
  3777. // },
  3778. // /**
  3779. // * 征地分析结果
  3780. // */
  3781. // "zdResult": {
  3782. // "id": null,
  3783. // "projectId": null,
  3784. // //国有面积
  3785. // "gyMJ": that.curProjectInfo.zdResult.gyMJ,
  3786. // //集体面积
  3787. // "jtMJ": that.curProjectInfo.zdResult.jtMJ,
  3788. // //征地面积
  3789. // "totalZDMJ": that.curProjectInfo.zdResult.totalZDMJ,
  3790. // //总补偿
  3791. // "totalPay": that.curProjectInfo.zdResult.totalPay,
  3792. // //征地补偿
  3793. // "totalZDPay": that.curProjectInfo.zdResult.totalZDPay,
  3794. // //安置补偿
  3795. // "totalAZPay": that.curProjectInfo.zdResult.totalAZPay,
  3796. // //国有地类及面积
  3797. // "gydlList": JSON.stringify(that.curProjectInfo.zdResult.gydlList),
  3798. // //地类及面积
  3799. // "jtdlList": JSON.stringify(that.curProjectInfo.zdResult.jtdlList),
  3800. // "gyfeatures": JSON.stringify(that.curProjectInfo.zdResult.gyfeatures),
  3801. // "jtfeatures": JSON.stringify(that.curProjectInfo.zdResult.jtfeatures),
  3802. // "fieldInfos": JSON.stringify(that.curProjectInfo.zdResult.fieldInfos),
  3803. // },
  3804. // /**
  3805. // * 权属结果
  3806. // */
  3807. // "qsResult": {
  3808. // "id": null,
  3809. // "projectId": null,
  3810. // "stateUsedMJ": that.curProjectInfo.qsResult.stateUsedMJ,
  3811. // "stateUsedFeatures": JSON.stringify(that.curProjectInfo.qsResult.stateUsedFeatures),
  3812. // "stateUsedList": JSON.stringify(that.curProjectInfo.qsResult.stateUsedList),
  3813. // "stateUsedFieldInfos": JSON.stringify(that.curProjectInfo.qsResult.stateUsedFieldInfos),
  3814. // "collectiveOwnerMJ": that.curProjectInfo.qsResult.collectiveOwnerMJ,
  3815. // "collectiveOwnerFeatures": JSON.stringify(that.curProjectInfo.qsResult.collectiveOwnerFeatures),
  3816. // "collectiveOwnerList": JSON.stringify(that.curProjectInfo.qsResult.collectiveOwnerList),
  3817. // "collectiveOwnerFieldInfos": JSON.stringify(that.curProjectInfo.qsResult.collectiveOwnerFieldInfos),
  3818. // "collectiveUsedMJ": that.curProjectInfo.qsResult.collectiveUsedMJ,
  3819. // "collectiveUsedList": JSON.stringify(that.curProjectInfo.qsResult.collectiveUsedList),
  3820. // "collectiveUsedFeatures": JSON.stringify(that.curProjectInfo.qsResult.collectiveUsedFeatures),
  3821. // "collectiveUsedFieldInfos": JSON.stringify(that.curProjectInfo.qsResult.collectiveUsedFieldInfos)
  3822. // }
  3823. // }
  3824. addZdProject(projectInfo).then((res) => {
  3825. if (res)
  3826. console.log('项目保存完成')
  3827. that.queryProject();
  3828. }).catch((err) => {
  3829. console.log('项目保存失败')
  3830. })
  3831. },
  3832. //范围面积
  3833. getRegionArea() {
  3834. debugger
  3835. var points1 = this.regions;
  3836. var parts1 = [];
  3837. var poly1;
  3838. for (var i = 0; i < points1.length; i++) {
  3839. parts1.push([points1[i].x, points1[i].y]);
  3840. }
  3841. poly1 = polygon([parts1]);
  3842. var textarea = area(poly1) * window.earthRadius;
  3843. return textarea;
  3844. },
  3845. /***
  3846. * pararm {object} @arr
  3847. */
  3848. creaturfPolygon(arr) {
  3849. var points = [];
  3850. var parts = [];
  3851. var polygon = [];
  3852. if (arr && arr.length > 0)
  3853. for (var i = 0; i < arr.length; i++) {
  3854. points.push([arr[i].x, arr[i].y]);
  3855. }
  3856. parts.push(points);
  3857. polygon.push(parts);
  3858. return polygon(polygon);
  3859. },
  3860. getfldIndex(fieldInfos, fldName) {
  3861. var fldIndex = -1;
  3862. fieldInfos.forEach((fld, index) => {
  3863. if (fld.name.toUpperCase() == fldName.toUpperCase()) {
  3864. fldIndex = index;
  3865. }
  3866. });
  3867. return fldIndex;
  3868. },
  3869. /**
  3870. * point1(裁剪),points2(被裁剪) [{x:1,y:2}]
  3871. */
  3872. computerInsertArea(points1, points2) {
  3873. var area = 0;
  3874. if (
  3875. points1 == null ||
  3876. points2 == null ||
  3877. points2.length == 0 ||
  3878. points1.length == 0
  3879. ) {
  3880. console.log("征地补偿图斑计算传入参数错误");
  3881. area = 0;
  3882. }
  3883. var parts1 = [];
  3884. var poly1 = [];
  3885. var parts2 = [];
  3886. var poly2 = [];
  3887. // parts1.push()
  3888. for (var i = 0; i < points1.length; i++) {
  3889. parts1.push([points1[i].x, points1[i].y]);
  3890. }
  3891. poly1 = polygon([parts1]);
  3892. var textarea = area(poly1) * window.earthRadius;
  3893. for (var i = 0; i < points2.length; i++) {
  3894. parts2.push([points2[i].x, points2[i].y]);
  3895. }
  3896. poly2 = polygon([parts2]);
  3897. var isContain = booleanContains(poly1, poly2);
  3898. if (isContain) {
  3899. area = area(poly2) * window.earthRadius;
  3900. }
  3901. else {
  3902. var intersection = intersect(poly1, poly2);
  3903. area = area(intersection) * window.earthRadius;
  3904. }
  3905. return area;
  3906. },
  3907. areaFrom4326To4525(region) {
  3908. var fromProj = proj4.defs();
  3909. var toProj = proj4.defs(window.localWkid4525);
  3910. proj4.defs("EPSG:4525", "+proj=longlat +ellps=GRS80 +no_defs +type=crs");
  3911. var point;
  3912. proj4.transform(fromProj, toProj, point)
  3913. },
  3914. /**
  3915. * 时间格式化2022-02-10 12:00:00
  3916. * @param {date} date
  3917. */
  3918. dateFormat(date) {
  3919. // console.log(showTime(date.getHours()));
  3920. var year = date.getFullYear(); // 年
  3921. var month = this.showTime(date.getMonth() + 1); // 月
  3922. // var week = this.showTime(date.getDay()); // 星期
  3923. var day = this.showTime(date.getDate()); // 日
  3924. var hours = this.showTime(date.getHours()); // 小时
  3925. var minutes = this.showTime(date.getMinutes()); // 分钟
  3926. var second = this.showTime(date.getSeconds()); // 秒
  3927. var str = "";
  3928. str =
  3929. year +
  3930. "-" +
  3931. month +
  3932. "-" +
  3933. day +
  3934. " " +
  3935. hours +
  3936. ":" +
  3937. minutes +
  3938. ":" +
  3939. second;
  3940. return str;
  3941. },
  3942. // 封装一个不够两位数就补零的函数
  3943. showTime(t) {
  3944. var time;
  3945. time = t >= 10 ? t : "0" + t;
  3946. return time;
  3947. },
  3948. clear() {
  3949. this.positions = [];
  3950. this.regions = [];
  3951. this.entities.forEach((item) => {
  3952. viewer.entities.removeById(item.id);
  3953. })
  3954. this.qsEntities.forEach((item) => {
  3955. viewer.entities.removeById(item.id);
  3956. })
  3957. this.entities = []
  3958. this.qsEntities = [];
  3959. if (polygonEntity) {
  3960. viewer.entities.remove(polygonEntity)
  3961. }
  3962. if (handlerPolygon) {
  3963. handlerPolygon.deactivate();
  3964. handlerPolygon.clear();
  3965. }
  3966. },
  3967. exportWord(projectInfo) {
  3968. if (projectInfo)
  3969. var promise = scene.outputSceneToFile();
  3970. Cesium.when(promise, function (base64data) {
  3971. projectInfo.isUseDB = window.isUseDB;
  3972. expotZDBCWord(projectInfo)
  3973. })
  3974. // .then((response) => {
  3975. // debugger;
  3976. // var fileName = projectInfo.projectName;
  3977. // debugger;
  3978. // const contentDisposition = response.headers["content-disposition"];
  3979. // if (contentDisposition) {
  3980. // fileName = window.decodeURI(
  3981. // response.headers["content-disposition"].split("=")[1],
  3982. // "UTF-8"
  3983. // );
  3984. // }
  3985. // const isBlob = blobValidate(response.data);
  3986. // debugger;
  3987. // if (isBlob) {
  3988. // const blob = new Blob([response.data]);
  3989. // saveAs(blob, fileName);
  3990. // } else {
  3991. // const resText = response.text();
  3992. // const rspObj = JSON.parse(resText);
  3993. // const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode["default"];
  3994. // that.$message.error(errMsg);
  3995. // }
  3996. // }).catch((err) => {
  3997. // console.log(err)
  3998. // })
  3999. },
  4000. /**
  4001. * 清除绘制范围
  4002. */
  4003. removePolygonEntity(){
  4004. if (polygonEntity) {
  4005. viewer.entities.remove(polygonEntity)
  4006. }
  4007. },
  4008. },
  4009. /**
  4010. * 清楚临时图元
  4011. */
  4012. beforeDestroy() {
  4013. this.removePolygonEntity();
  4014. if (handlerPolygon) {
  4015. handlerPolygon.deactivate();
  4016. handlerPolygon.clear();
  4017. }
  4018. if (handleInput)
  4019. handleInput.destroy()
  4020. this.positions = [];
  4021. this.regions = [];
  4022. this.entities = []
  4023. this.qsEntities = [];
  4024. viewer.entities.removeAll();
  4025. if(popupBox){
  4026. popupBox.destroy();
  4027. popupBox=null;
  4028. }
  4029. },
  4030. destroyed() { }
  4031. };
  4032. </script>
  4033. <style lang="scss">
  4034. @import "@/../../zt.scss";
  4035. </style>
  4036. <style scoped>
  4037. .fileInput {
  4038. display: none;
  4039. }
  4040. .file-upload-button {
  4041. background-color: #0f7ac8 !important
  4042. }
  4043. .divrow {
  4044. margin: 0;
  4045. padding: 0;
  4046. display: flex;
  4047. height: 2.5rem;
  4048. }
  4049. .divImg {
  4050. width: 20%;
  4051. }
  4052. img {
  4053. height: 2rem;
  4054. width: 2rem;
  4055. }
  4056. .divCol {
  4057. width: 49.5%;
  4058. display: flex;
  4059. white-space: nowrap;
  4060. }
  4061. .divText {
  4062. width: 79%;
  4063. padding-left: 0.5rem;
  4064. }
  4065. input.el-range-input {
  4066. background-color: transparent;
  4067. }
  4068. .el-range-editor.el-input__inner {
  4069. background-color: transparent;
  4070. }
  4071. .el-row {
  4072. /* padding: 0.5rem 0 0.5rem 0; */
  4073. /* display: inline-flex; */
  4074. align-items: center;
  4075. margin-bottom: 0.5rem;
  4076. }
  4077. .el-col {
  4078. display: inline-flex;
  4079. }
  4080. .buttongroup {
  4081. display: inline-flex;
  4082. margin-top: 0.45rem;
  4083. }
  4084. .rootele {
  4085. padding: 0.5rem;
  4086. color: white;
  4087. overflow-y: none;
  4088. }
  4089. .el-col {
  4090. color: white;
  4091. }
  4092. .el-tab-pane {
  4093. color: white;
  4094. }
  4095. .el-input {
  4096. background: transparent;
  4097. }
  4098. /* ul {
  4099. height: 100;
  4100. width: 100%;
  4101. overflow-y: auto;
  4102. font-size: 1rem;
  4103. padding: 1rem;
  4104. list-style-type: none;
  4105. } */
  4106. .el-pagination {
  4107. color: #ffffff;
  4108. }
  4109. </style>