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