123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049 |
- <template>
- <div class="buildingDetails">
- <div class="buildingDetails-page">
- <div class="max-left-box">
- <div class="max-left-box-one" v-if="!mapSrc">
- <div class="max-button-big-position-box">
- <img src="@/assets/ZDimages/evacuation3_2/img_xgbj_syl.png">
- <el-upload
- class="up-img-button-box"
- style="height:40px;width:300px;"
- :action="uploadImgUrl"
- :show-file-list="false"
- accept="image/png"
- :on-success="(res, file)=>handleAvatarSuccess(res, file,1)"
- :headers="headers"
- :before-upload="beforeAvatarUpload">
- <p class="up-img-button">+ 上传图片</p>
- </el-upload>
- <p class="up-img-text">请点击上传图片按钮上传实验室楼层布局参考图</p>
- </div>
- </div>
- <div class="max-left-button-box" v-show="mapSrc">
- <p class="null-p"></p>
- <el-upload
- class="up-img-p"
- :action="uploadImgUrl"
- :show-file-list="false"
- accept="image/png"
- :on-success="(res, file)=>handleAvatarSuccess(res, file,2)"
- :headers="headers"
- :before-upload="beforeAvatarUpload">
- <p style="margin:0;">更换图纸</p>
- </el-upload>
- <div class="opacity-button-box">
- <p @click="opacityClick(1)">-</p>
- <p>透明度:{{mapOpacityText}}%</p>
- <p @click="opacityClick(2)">+</p>
- </div>
- </div>
- <div class="max-left-map-big-box scrollbar-box" ref="maxBigBox" v-show="mapSrc">
- <div class="left-map-box" ref="maxBox" :style="'width:'+layerWidth+'px;height:'+layerHeight+'px;'">
- <!--循环房间数据-->
- <div :class="item.type == 2?'for-map-box-one':(item.type == 1?'for-map-box':(item.type == 3?'for-map-box-two':''))" v-for="(item,index) in mapList" :key="index"
- ref="moveBox"
- :style="'top:'+item.y+'px;left:'+item.x+'px;width:'+item.w+'px;height:'+item.h+'px;'">
- <div class="top-big-box">
- <p class="top-left-p"
- @mousedown.stop="(MouseEvent)=>zoomDownXY(MouseEvent,index,4)"></p>
- <p class="top-center-p"
- @mousedown.stop="(MouseEvent)=>zoomDownY(MouseEvent,index,1)"></p>
- <p class="top-right-p"
- @mousedown.stop="(MouseEvent)=>zoomDownXY(MouseEvent,index,1)"></p>
- </div>
- <div class="center-big-box">
- <p class="center-left-p"
- @mousedown.stop="(MouseEvent)=>zoomDownX(MouseEvent,index,4)"></p>
- <div class="center-move-box"
- :style="'line-height:'+(item.w>item.h?item.h-4:item.w-4)+'px;'"
- @contextmenu="(contextmenu)=>boxRightClick(contextmenu,item,index)"
- @mousedown.stop="(MouseEvent)=>dragDown(MouseEvent,index)">
- {{item.roomNum&&item.type == 1?item.roomNum:(!item.roomNum&&item.type == 1?'配置房间':'')}}
- </div>
- <p class="center-right-p"
- @mousedown.stop="(MouseEvent)=>zoomDownX(MouseEvent,index,2)"></p>
- </div>
- <div class="bottom-big-box">
- <p class="bottom-left-p"
- @mousedown.stop="(MouseEvent)=>zoomDownXY(MouseEvent,index,3)"></p>
- <p class="bottom-center-p"
- @mousedown.stop="(MouseEvent)=>zoomDownY(MouseEvent,index,3)"></p>
- <p class="bottom-right-p"
- @mousedown.stop="(MouseEvent)=>zoomDownXY(MouseEvent,index,2)"></p>
- </div>
- <p class="center-move-door-p" v-if="item.type == 1"
- :class="minItem.toward=='top'?'center-move-door-p-t':(minItem.toward=='bottom'?'center-move-door-p-b':(minItem.toward=='left'?'center-move-door-p-l':(minItem.toward=='right'?'center-move-door-p-r':'')))"
- v-for="(minItem,minIndex) in item.doorList" :key="minIndex"
- @contextmenu.stop="(contextmenu)=>boxRightClick(contextmenu,minItem,index,minIndex)"
- :style="'top:'+minItem.y+'px;left:'+minItem.x+'px;width:'+minItem.w+'px;height:'+minItem.h+'px;'"
- @mousedown.stop="(MouseEvent)=>doorDragDown(MouseEvent,index,minIndex)"
- ></p>
- <p class="center-move-door-p" v-if="item.type == 3"
- :class="minItem.toward=='top'?'center-move-door-p-t-ss':(minItem.toward=='bottom'?'center-move-door-p-b-ss':(minItem.toward=='left'?'center-move-door-p-l-ss':(minItem.toward=='right'?'center-move-door-p-r-ss':'')))"
- v-for="(minItem,minIndex) in item.doorList" :key="minIndex"
- @contextmenu.stop="(contextmenu)=>boxRightClick(contextmenu,minItem,index,minIndex)"
- :style="'top:'+minItem.y+'px;left:'+minItem.x+'px;width:'+minItem.w+'px;height:'+minItem.h+'px;'"
- @mousedown.stop="(MouseEvent)=>doorDragDown(MouseEvent,index,minIndex)"
- ></p>
- <p class="center-move-light-p" v-if="minItem.type != 'light'&&!minItem.openType"
- v-for="(minItem,minIndex) in item.lightList" :key="minIndex"
- :class="minItem.type == 'lab'?'colorDoor':(minItem.type == 'traffic'?'colorTraffic':(minItem.type == 'connect'?'colorConnect':''))"
- :style="'top:'+minItem.y+'px;left:'+minItem.x+'px;width:'+minItem.w+'px;height:'+minItem.h+'px;'"
- ><span v-for="(optionsItem,optionsIndex) in dialogOptions" v-if="minItem.state == optionsItem.value">{{optionsItem.label}}</span>{{minItem.name}}</p>
- <p class="center-move-light-p" v-if="minItem.type == 'light'&&!minItem.openType"
- v-for="(minItem,minIndex) in item.lightList" :key="minIndex"
- @contextmenu.stop="(contextmenu)=>boxRightClick(contextmenu,minItem,index,minIndex)"
- :class="minItem.state=='1'?'lightTop':(minItem.state=='2'?'lightBottom':(minItem.state=='3'?'lightLeft':(minItem.state=='4'?'lightRight':'lightNone')))"
- :style="'top:'+minItem.y+'px;left:'+minItem.x+'px;width:'+minItem.w+'px;height:'+minItem.h+'px;'"
- @mousedown.stop="(MouseEvent)=>lightDragDown(MouseEvent,index,minIndex)"
- ></p>
- </div>
- </div>
- <img class="left-map-img" :src="mapSrc" :style="'opacity:'+mapOpacity+';width:'+layerWidth+'px;height:'+layerHeight+'px;'">
- </div>
- </div>
- <div class="max-right-box">
- <div class="right-title-box">
- <p class="right-title-p">xxxxxx楼xxxx层</p>
- <div @click="buttonShadeClick">
- <p class="el-icon-question"></p>
- <p>使用帮助</p>
- </div>
- </div>
- <div class="right-bottom-max-box scrollbar-box">
- <div class="right-for-max-box">
- <p class="right-for-title">结构</p>
- <div class="right-for-box" v-for="(item,index) in roomList" :key="index">
- <img
- draggable="true"
- @dragstart="(DragEvent)=>externalAddDragStart(DragEvent,item.type)"
- @dragend="(DragEvent)=>externalAddDragEnd(DragEvent,'2')"
- :src="item.url">
- <p>{{item.name}}</p>
- </div>
- </div>
- <div class="right-for-max-box">
- <p class="right-for-title">房间</p>
- <div class="right-for-box" v-for="(item,index) in accessoriesList" :key="index">
- <img
- draggable="true"
- @dragstart="(DragEvent)=>internalAddDragStart(DragEvent,item.type)"
- @dragend="(DragEvent)=>internalAddDragEnd(DragEvent,'2')"
- :src="item.url">
- <p>{{item.name}}</p>
- </div>
- </div>
- <div class="right-button-box">
- <p></p>
- <p @click="clickBack">返回</p>
- <p @click="setDataButton">保存</p>
- <p></p>
- </div>
- </div>
- </div>
- </div>
- <!--右键-->
- <div class="map-shade-max-big-box" v-if="mouseType != 0" @click="offMapShade">
- <div class="map-shade-big-box" :style="'top:'+mouseY+'px;left:'+mouseX+'px;'">
- <p class="shade-button-p" v-if="dialogOpenType == 1 || dialogOpenType == 6" @click="clickShadeButton(1)">编辑</p>
- <p class="shade-border-p" v-if="dialogOpenType == 1 || dialogOpenType == 6"></p>
- <p class="shade-button-p" @click="clickShadeButton(2)">删除</p>
- </div>
- </div>
- <!--房间/灯设置-->
- <el-dialog :title="dialogOpenType==1?'新增房间':(dialogOpenType==6?'新增指示灯':'')" :visible.sync="dialogOpen" v-if="dialogOpen" width="600px" append-to-body>
- <el-form ref="dialogForm" :model="dialogForm" :rules="rules" label-width="120px">
- <div v-if="dialogOpenType == 1">
- <el-form-item label="房间类型:" prop="roomType">
- <el-select v-model="dialogForm.roomType" placeholder="请选择房间类型" style="width:300px;">
- <el-option
- v-for="item in roomOptions"
- :key="item.dictValue"
- :label="item.dictLabel"
- :value="item.dictValue">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="房间编号:" prop="roomNum">
- <el-input v-model="dialogForm.roomNum" placeholder="请输入房间编号" maxlength="20" style="width:300px;"/>
- </el-form-item>
- <el-form-item label="房间名称:" prop="roomName" v-if="dialogForm.roomType == '-99'">
- <el-input v-model="dialogForm.roomName" placeholder="请输入房间名称" maxlength="20" style="width:300px;"/>
- </el-form-item>
- <el-form-item label="房间选择:" prop="subId" v-if="dialogForm.roomType != '-99'">
- <el-select
- style="width:300px;"
- v-model="dialogForm.subId"
- filterable
- remote
- reserve-keyword
- @focus="selectFocus"
- @change="selectClick"
- placeholder="请选择房间"
- :remote-method="userSelectList"
- :loading="loading">
- <el-option
- v-for="item in subjectOptions"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </div>
- <div v-if="dialogOpenType == 6">
- <el-form-item label="继电器类型:" prop="relayType">
- <el-radio-group v-model="dialogForm.relayType" style="margin-top:4px;">
- <el-radio :label="2">新版继电器</el-radio>
- <el-radio :label="1">老版继电器</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="继电器参数:" prop="configName" v-if="dialogForm.relayType == 2">
- <el-input v-model="dialogForm.configName" placeholder="请输入继电器参数" maxlength="20" style="width:300px;"/>
- </el-form-item>
- <el-form-item label="状态参数:" prop="configStatus" style="width:398px;" v-if="dialogForm.relayType == 2">
- <el-input v-model="dialogForm.configStatus" placeholder="请输入状态参数" maxlength="20" style="width:300px;"/>
- </el-form-item>
- <el-form-item label="继电器编号:" prop="relayCode" v-if="dialogForm.relayType == 1">
- <el-input v-model="dialogForm.relayCode" placeholder="请输入继电器参数" maxlength="20" style="width:300px;"/>
- </el-form-item>
- <el-form-item label="继电器路数:" prop="relayBit" style="width:398px;" v-if="dialogForm.relayType == 1" class="dialog-relay-bit-form-item-box">
- <el-input-number v-model="dialogForm.relayBit" :min="1" :max="12" placeholder="请输入状态参数" :controls="false" style="width:300px;"></el-input-number>
- </el-form-item>
- <el-form-item label="指示灯类型:" prop="state">
- <el-radio-group v-model="dialogForm.state" style="margin-top:4px;">
- <el-radio :label="item.value" v-for="item in dialogOptions">{{item.label}}</el-radio>
- </el-radio-group>
- </el-form-item>
- </div>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <div style="display: flex">
- <p style="flex:1;"></p>
- <p style="cursor:pointer;border-radius:6px;width:70px;line-height:30px;font-size:12px;text-align:center;margin-right:17px;color:#999999;background:#E0E0E0;" @click="buttonSetButton(1)">取消</p>
- <p style="cursor:pointer;border-radius:6px;width:70px;line-height:30px;font-size:12px;text-align:center;color:#fff;background:#0045AF;" @click="buttonSetButton(2)">确定</p>
- <p style="flex:1;"></p>
- </div>
- </div>
- </el-dialog>
- <!--引导遮罩层-->
- <div class="shade-max-big-box" v-if="shadeBoxType != 0">
- <div v-if="shadeBoxType == 1" class="shade-max-box-1">
- <img class="shade-big-img" src="@/assets/ZDimages/evacuation3_2/img_znwl_jt.png">
- <p class="shade-big-1-text-1">更换图纸</p>
- <div class="shade-big-1-text-2">
- <p>-</p>
- <p>透明度:{{mapOpacityText}}%</p>
- <p>+</p>
- </div>
- <p class="shade-big-1-text-3">请先行上传图纸,根据图纸进行楼层布局的临摹,能够让绘制的图形更加精准</p>
- <p class="shade-big-1-text-4">上传图纸的可以修改透明度,如图纸会对绘制产生干扰,则能够将透明度降低方便绘制和临摹。</p>
- <p class="shade-big-1-text-5" @click="shadeClick(2)">下一步</p>
- </div>
- <div v-if="shadeBoxType == 2" class="shade-max-box-2">
- <img class="shade-big-img" src="@/assets/ZDimages/evacuation3_2/img_znwl_jt.png">
- <div class="shade-big-1-text-1">
- <img src="@/assets/ZDimages/evacuation3_2/img_xgbj_gd.png">
- <p>楼道</p>
- </div>
- <div class="shade-big-1-text-2">
- <img src="@/assets/ZDimages/evacuation3_2/img_xgbj_yjck.png">
- <p>应急出口</p>
- </div>
- <div class="shade-big-1-text-3">
- <img src="@/assets/ZDimages/evacuation3_2/img_xgbj_fj.png">
- <p>房间</p>
- </div>
- <p class="shade-big-1-text-4">楼道绘制方法为点击拖拽至绘制区域,鼠标左键选中楼道可以调整楼道的位置和尺寸。楼道支持与其他楼道衔接,衔接办法为选择矩形楼道中线上的点位与另外一个矩形过的中线进行结合即可。</p>
- <p class="shade-big-1-text-5">应急出口为固定尺寸,点击拖拽至绘制区域即可。</p>
- <p class="shade-big-1-text-6">房间可直接拖拽至绘制区域,鼠标左键选中房间可以调整楼道的位置和尺寸。</p>
- <p class="shade-big-1-text-7" @click="shadeClick(3)">下一步</p>
- </div>
- <div v-if="shadeBoxType == 3" class="shade-max-box-3">
- <img class="shade-big-img" src="@/assets/ZDimages/evacuation3_2/img_znwl_jtt.png">
- <p class="shade-big-1-text-1">房门为固定尺寸,点击拖拽至绘制区域的房间内即可。</p>
- <p class="shade-big-1-text-2">疏散灯需要拖拽至绘制区域的走道中,请您确认疏散灯位置尽可能与实际安装位置一致。</p>
- <p class="shade-big-1-text-3" @click="shadeClick(4)">下一步</p>
- <div class="shade-big-1-text-4">
- <img src="@/assets/ZDimages/evacuation3_2/img_xgbj_fj.png">
- <p>房间</p>
- </div>
- <div class="shade-big-1-text-5">
- <img src="@/assets/ZDimages/evacuation3_2/img_xgbj_fj.png">
- <p>房间</p>
- </div>
- </div>
- <div v-if="shadeBoxType == 4" class="shade-max-box-4">
- <div>
- <p>最后提示:</p>
- <p>左键选中组件可以调整大小和位置,右键选中组件可以删除组件或编辑组件属性,马上开始绘制布局吧。</p>
- <p @click="shadeClick(0)">开始绘制</p>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { Loading } from 'element-ui'
- import { getToken } from "@/utils/auth";
- import { checkDoorTo,checkLightDirection,checkRoom,calculateTrafficPoint,addDoorPoint,
- doorMoveJudge,lightMoveJudge,roomMove,roomAdd,lightAdd,addDoor,fourCornersZoom,
- fourEdgeZoom,setJsData,checkInstall} from "@/utils/evacuationLayout";
- import { subjectList,lineVertex} from "@/api/evacuation3_2/index";
- export default {
- name: "builDingDetails",
- props:{
- propsData:{},
- },
- data() {
- return {
- loading:false,
- loadingInstance:{},
- uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
- headers: {
- Authorization: "Bearer " + getToken(),
- },
- //背景图透明度
- mapOpacity:0.5,
- mapOpacityText:50,
- //背景图地址
- // mapSrc:'https://img0.baidu.com/it/u=3368678403,249914024&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
- mapSrc:'',
- /*********************布局设置参数*********************/
- //边界位置
- borderLeft:null,
- borderTop:null,
- //画布/楼层尺寸
- layerWidth:null,
- layerHeight:null,
- //房间尺寸限制
- minHeight:100,
- maxHeight:600,
- minWidth:100,
- maxWidth:800,
- //门尺寸数据
- doorHeight:34,
- doorWidth:34,
- //灯尺寸数据
- minLightNum:40,
- maxLightNum:40,
- //交通点检测时触手范围
- tentaclesLength:10,
- //房间数据
- newMapList:[],
- mapList: [],
- //当前坐标
- clientX: "",
- clientY: "",
- boxIndex: "",
- //房间边框/角方向状态 1.上/右上 2.右/右下 3.下/左下 4.左/左上
- moveType:null,
- //抓取类型 1.房间 2.楼道 3.应急出口 4.房门 6.疏散灯
- grab:null,
- //子类抓取下标
- minIndex:null,
- //***********************模拟数据列表*************************//
- // 可选房间列表 //1.房间 2.楼道 3.应急出口
- roomList:[
- {
- name:"楼道",
- type: '2',
- url:require('@/assets/ZDimages/evacuation3_2/img_xgbj_gd.png'),
- },
- {
- name:"应急出口",
- type: '3',
- url:require('@/assets/ZDimages/evacuation3_2/img_xgbj_yjck.png'),
- },
- {
- name:"房间",
- type: '1',
- url:require('@/assets/ZDimages/evacuation3_2/img_xgbj_fj.png'),
- },
- ],
- // 房间内配件列表 //4.房间 6.疏散灯
- accessoriesList:[
- {
- name:"房门",
- type: '4',
- url:require('@/assets/ZDimages/evacuation3_2/img_xgbj_fjm.png'),
- },
- {
- name:"疏散灯",
- type: '6',
- url:require('@/assets/ZDimages/evacuation3_2/icon_bjt_ssd.png'),
- },
- ],
- //************************弹层开关*******************************//
- shadeBoxType:0,
- //************************灯设置数据*******************************//
- dialogOpen:0,
- dialogOpenType:0,
- dialogIndex:null,
- dialogMinIndex:null,
- dialogForm:{},
- dialogOptions: [
- {
- value: '1',
- label: '上指示灯'
- }, {
- value: '2',
- label: '下指示灯'
- }, {
- value: '3',
- label: '左指示灯'
- }, {
- value: '4',
- label: '右指示灯'
- },
- ],
- //鼠标右键抓取坐标
- mouseX:null,
- mouseY:null,
- mouseType:0,
- //房间类型列表
- roomOptions:[],
- rules:{
- roomType:[
- {required: true, message: '请选择房间类型', trigger: 'blur'},
- { required: true, message: "请选择房间类型", validator: this.spaceJudgment, trigger: "blur" }
- ],
- roomNum:[
- {required: true, message: '请输入房间编号', trigger: 'blur'},
- { required: true, message: "请输入房间编号", validator: this.spaceJudgment, trigger: "blur" }
- ],
- roomName:[
- {required: true, message: '请输入房间名称', trigger: 'blur'},
- { required: true, message: "请输入房间名称", validator: this.spaceJudgment, trigger: "blur" }
- ],
- subId:[
- {required: true, message: '请选择房间', trigger: 'blur'},
- { required: true, message: "请选择房间", validator: this.spaceJudgment, trigger: "blur" }
- ],
- name1:[
- {required: true, message: '请选择继电器类型', trigger: 'blur'},
- { required: true, message: "请选择继电器类型", validator: this.spaceJudgment, trigger: "blur" }
- ],
- name2:[
- {required: true, message: '请输入继电器参数', trigger: 'blur'},
- { required: true, message: "请输入继电器参数", validator: this.spaceJudgment, trigger: "blur" }
- ],
- name3:[
- {required: true, message: '请输入状态参数', trigger: 'blur'},
- { required: true, message: "请输入状态参数", validator: this.spaceJudgment, trigger: "blur" }
- ],
- state:[
- {required: true, message: '请选择指示灯类型', trigger: 'blur'},
- { required: true, message: "请选择指示灯类型", validator: this.spaceJudgment, trigger: "blur" }
- ],
- },
- //拖拽时显示的图片
- roomImg_1:null,
- roomImg_2:null,
- roomImg_3:null,
- doorImg:null,
- lightImg:null,
- //选择实验室 下拉列表
- roomSelectList:[],
- roomSelectValue:'',
- //懒加载实验室列表
- subjectOptions:[],
- }
- },
- created() {
- },
- mounted(){
- this.initialization();
- this.getDicts("layout_room_type").then(response => {
- this.roomOptions = response.data;
- this.roomOptions.push({dictLabel:'其他',dictValue:'-99'})
- });
- // this.$set(this,'mapList',[{"name":"q01","y":401,"x":1,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"right","w":25,"h":25,"x":73,"y":29.5}]},{"name":"z01","y":98,"x":801,"w":100,"h":100,"type":"3","direction":"1","doorList":[{"type":"door","toward":"left","w":25,"h":25,"x":2,"y":39.5}]},{"name":"l01","y":101,"x":101,"w":100,"h":498,"type":"2","direction":"1","lightList":[{"type":"light","state":"1","w":20,"h":20,"x":40,"y":10},{"type":"light","state":"2","w":20,"h":20,"x":40,"y":90},{"type":"light","state":"1","w":20,"h":20,"x":40,"y":295},{"type":"light","state":"2","w":20,"h":20,"x":40,"y":367},{"type":"light","state":"1","w":20,"h":20,"x":40,"y":400},{"type":"light","state":"2","w":20,"h":20,"x":40,"y":464}]},{"name":"l02","y":301,"x":201,"w":500,"h":100,"type":"2","direction":"1","lightList":[{"type":"light","state":"3","w":20,"h":20,"x":41,"y":40},{"type":"light","state":"4","w":20,"h":20,"x":121,"y":40},{"type":"light","state":"3","w":20,"h":20,"x":348,"y":40},{"type":"light","state":"4","w":20,"h":20,"x":448,"y":40},{"type":"light","state":"3","w":20,"h":20,"x":194,"y":40},{"type":"light","state":"4","w":20,"h":20,"x":277,"y":40}]},{"name":"l03","y":101,"x":701,"w":100,"h":498,"type":"2","direction":"1","lightList":[{"type":"light","state":"1","w":20,"h":20,"x":40,"y":12},{"type":"light","state":"2","w":20,"h":20,"x":40,"y":167},{"type":"light","state":"1","w":20,"h":20,"x":40,"y":321},{"type":"light","state":"2","w":20,"h":20,"x":40,"y":449}]},{"name":"l04","y":101,"x":401,"w":100,"h":200,"type":"2","direction":"1","lightList":[{"type":"light","state":"1","w":20,"h":20,"x":40,"y":46},{"type":"light","state":"2","w":20,"h":20,"x":40,"y":158}]},{"name":"l05","y":401,"x":401,"w":100,"h":198,"type":"2","direction":"1","lightList":[{"type":"light","state":"1","w":20,"h":20,"x":40,"y":23},{"type":"light","state":"2","w":20,"h":20,"x":40,"y":155}]},{"x":301,"y":201,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"right","w":25,"h":25,"x":73,"y":20.5}]},{"x":1,"y":501,"w":100,"h":100,"type":"3","direction":"1","doorList":[{"type":"door","toward":"right","w":25,"h":25,"x":73,"y":30.5}]},{"x":801,"y":498,"w":100,"h":100,"type":"3","direction":"1","doorList":[{"type":"door","toward":"left","w":25,"h":25,"x":2,"y":18.5}]},{"x":301,"y":101,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"top","w":25,"h":25,"x":35.5,"y":2}]},{"x":201,"y":201,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"left","w":25,"h":25,"x":2,"y":23.5}]},{"x":201,"y":101,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"left","w":25,"h":25,"x":2,"y":44.5}]},{"x":1,"y":301,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"right","w":25,"h":25,"x":73,"y":30.5}]},{"x":1,"y":201,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"right","w":25,"h":25,"x":73,"y":40.5}]},{"x":1,"y":101,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"right","w":25,"h":25,"x":73,"y":49.5}]},{"x":801,"y":398,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"left","w":25,"h":25,"x":2,"y":36.5}]},{"x":801,"y":298,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"left","w":25,"h":25,"x":2,"y":34.5}]},{"x":801,"y":198,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"left","w":25,"h":25,"x":2,"y":22.5}]},{"x":201,"y":401,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"left","w":25,"h":25,"x":2,"y":26.5}]},{"x":301,"y":401,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"right","w":25,"h":25,"x":73,"y":43.5}]},{"x":201,"y":501,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"left","w":25,"h":25,"x":2,"y":29.5}]},{"x":301,"y":501,"w":100,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"right","w":25,"h":25,"x":73,"y":27.5}]},{"x":501,"y":201,"w":200,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"right","w":25,"h":25,"x":173,"y":30.5}]},{"x":501,"y":101,"w":200,"h":100,"type":"1","direction":"1","doorList":[{"type":"door","toward":"top","w":25,"h":25,"x":136.5,"y":2}]},{"x":501,"y":401,"w":100,"h":198,"type":"1","direction":"1","doorList":[{"type":"door","toward":"bottom","w":25,"h":25,"x":35.5,"y":171}]},{"x":601,"y":401,"w":100,"h":198,"type":"1","direction":"1","doorList":[{"type":"door","toward":"bottom","w":25,"h":25,"x":33.5,"y":171}]},{"x":101,"y":1,"w":700,"h":100,"type":"2","direction":"1","lightList":[{"type":"light","state":"3","w":20,"h":20,"x":160,"y":40},{"type":"light","state":"4","w":20,"h":20,"x":274,"y":40},{"type":"light","state":"3","w":20,"h":20,"x":495,"y":40},{"type":"light","state":"4","w":20,"h":20,"x":580,"y":40}]},{"x":401,"y":599,"w":400,"h":100,"type":"2","direction":"1","lightList":[{"type":"light","state":"3","w":20,"h":20,"x":87,"y":40},{"type":"light","state":"4","w":20,"h":20,"x":171,"y":40},{"type":"light","state":"3","w":20,"h":20,"x":207,"y":40},{"type":"light","state":"4","w":20,"h":20,"x":272,"y":40}]},{"x":1,"y":1,"w":100,"h":100,"type":"3","direction":"1","doorList":[{"type":"door","toward":"right","w":25,"h":25,"x":73,"y":36.5}]}])
- // this.$set(this,'mapSrc','1');
- },
- methods:{
- //提交
- setDataButton(){
- let self = this;
- if(checkRoom(this.mapList)&&
- checkDoorTo(this.mapList)&&
- checkInstall(this.mapList)){
- let newMapList = JSON.parse(JSON.stringify(this.mapList))
- let obj = addDoorPoint(newMapList)
- console.log('obj',obj);
- //提交数据处理
- let roomList = [];
- let lightList = [];
- for(let i=0;i<obj.mapList.length;i++){
- if(obj.mapList[i].type == 1){
- let minObj = {
- roomType:obj.mapList[i].roomType,
- roomNum:obj.mapList[i].roomNum,
- pointName:obj.mapList[i].key,
- }
- if(obj.mapList[i].roomType != '-99'){
- minObj.subId = obj.mapList[i].subId
- minObj.subName = obj.mapList[i].subName
- }else{
- minObj.roomName = obj.mapList[i].roomName
- }
- roomList.push(minObj);
- }else if(obj.mapList[i].type == 2){
- for(let o=0;o<obj.mapList[i].lightList.length;o++){
- if( obj.mapList[i].lightList[o].type == 'light'){
- let minObj = {
- pointName:obj.mapList[i].lightList[o].key,
- relayType:obj.mapList[i].lightList[o].relayType,
- state:obj.mapList[i].lightList[o].state,
- }
- if(obj.mapList[i].lightList[o].relayType == 1){
- minObj.relayCode = obj.mapList[i].lightList[o].relayCode
- minObj.relayBit = obj.mapList[i].lightList[o].relayBit
- }else if(obj.mapList[i].lightList[o].relayType == 2){
- minObj.configName = obj.mapList[i].lightList[o].configName
- minObj.configStatus = obj.mapList[i].lightList[o].configStatus
- }
- lightList.push(minObj);
- }
- }
- }
- }
- let newObj = {
- imgUrl: this.mapSrc,
- canvasWidth: this.layerWidth,
- canvasHeight: this.layerHeight,
- buildId: this.propsData.buildId,
- floorId: this.propsData.floorId,
- relationalData:obj.newList,//点数据
- buildFloorLayouts:roomList,//房间数据
- exitPointRelayList:lightList,//灯数据
- layoutData:JSON.stringify(this.mapList),//布局数据
- layoutJoinData:JSON.stringify(obj.evacuationList),//布局数据
- };
- console.log('newObj',newObj);
- lineVertex(newObj).then(response => {
- this.msgSuccess(response.msg);
- this.$parent.clickPage(3)
- });
- }
- },
- //返回
- clickBack(){
- this.$parent.clickPage(1)
- },
- //初始化
- initialization(){
- if(this.propsData.layoutData){
- this.$set(this,'mapSrc',this.propsData.imgUrl);
- this.$set(this,'layerWidth',this.propsData.canvasWidth);
- this.$set(this,'layerHeight',this.propsData.canvasHeight);
- this.$set(this,'maxWidth',this.propsData.canvasWidth);
- this.$set(this,'maxHeight',this.propsData.canvasHeight);
- this.$set(this,'mapList',JSON.parse(this.propsData.layoutData));
- this.$set(this,'shadeBoxType',1);
- }else{
- this.$set(this,'shadeBoxType',0);
- }
- },
- //懒加载实验室
- userSelectList(e){
- subjectList({name:e}).then(response => {
- this.subjectOptions = response.data;
- });
- },
- selectFocus(){
- console.log("123");
- },
- selectClick(e){
- let self = this;
- for(let i=0;i<self.subjectOptions.length;i++){
- if(e == self.subjectOptions[i].id){
- self.$set(self.dialogForm,'subName',self.subjectOptions[i].name);
- }
- }
- },
- /*********************************右键操作事件*********************************/
- //右键事件
- boxRightClick(event,item,index,minIndex){
- event.returnValue = false;
- if(item.type == 'light'){
- this.$set(this,'mouseX',event.clientX)
- this.$set(this,'mouseY',event.clientY )
- this.$set(this,'mouseType',6)
- this.$set(this,'dialogOpenType',6)
- this.$set(this,'dialogIndex',index)
- this.$set(this,'dialogMinIndex',minIndex)
- let obj = {
- relayType:item.relayType?item.relayType:2,
- state:item.state?item.state:"",
- }
- if(obj.relayType == 1){
- obj.relayCode = item.relayCode?item.relayCode:"";
- obj.relayBit = item.relayBit?item.relayBit:"";
- }else if(obj.relayType == 2){
- obj.configName = item.configName?item.configName:"";
- obj.configStatus = item.configStatus?item.configStatus:"";
- }
- this.$set(this,'dialogForm',JSON.parse(JSON.stringify(obj)));
- //等待写
- }else if(item.type == 'door'){
- this.$set(this,'mouseX',event.clientX )
- this.$set(this,'mouseY',event.clientY)
- this.$set(this,'mouseType',4)
- this.$set(this,'dialogOpenType',4)
- this.$set(this,'dialogIndex',index)
- this.$set(this,'dialogMinIndex',minIndex)
- this.$set(this,'dialogForm',JSON.parse(JSON.stringify(item)))
- }else if(item.type == '1'){
- this.$set(this,'mouseX',event.clientX )
- this.$set(this,'mouseY',event.clientY)
- this.$set(this,'mouseType',1)
- this.$set(this,'dialogOpenType',1)
- this.$set(this,'dialogIndex',index)
- let obj = {
- roomType:item.roomType?item.roomType:"",
- roomNum:item.roomNum?item.roomNum:"",
- roomName:item.roomName?item.roomName:"",
- subId:item.subId?item.subId:"",
- subName:item.subName?item.subName:"",
- }
- this.$set(this,'dialogForm',JSON.parse(JSON.stringify(obj)));
- }else if(item.type == '2'){
- this.$set(this,'mouseX',event.clientX )
- this.$set(this,'mouseY',event.clientY)
- this.$set(this,'mouseType',2)
- this.$set(this,'dialogOpenType',2)
- this.$set(this,'dialogIndex',index)
- }else if(item.type == '3'){
- this.$set(this,'mouseX',event.clientX )
- this.$set(this,'mouseY',event.clientY)
- this.$set(this,'mouseType',3)
- this.$set(this,'dialogOpenType',3)
- this.$set(this,'dialogIndex',index)
- }
- },
- //弹窗确定
- buttonSetButton(type){
- if(type == 1){
- this.dialogOpen = false;
- }else if(type == 2){
- this.$refs["dialogForm"].validate(valid => {
- if (valid) {
- if(this.dialogOpenType == 1){
- this.$set(this.mapList[this.dialogIndex],'roomType',this.dialogForm.roomType);
- this.$set(this.mapList[this.dialogIndex],'roomNum',this.dialogForm.roomNum);
- this.$set(this.mapList[this.dialogIndex],'roomName',this.dialogForm.roomName);
- this.$set(this.mapList[this.dialogIndex],'subId',this.dialogForm.subId);
- this.$set(this.mapList[this.dialogIndex],'subName',this.dialogForm.subName);
- this.dialogOpen = false;
- }else if(this.dialogOpenType == 6){
- this.$set(this.mapList[this.dialogIndex].lightList[this.dialogMinIndex],'relayType',this.dialogForm.relayType);
- this.$set(this.mapList[this.dialogIndex].lightList[this.dialogMinIndex],'state',this.dialogForm.state);
- if(this.dialogForm.relayType == 1){
- this.$set(this.mapList[this.dialogIndex].lightList[this.dialogMinIndex],'relayCode',this.dialogForm.relayCode);
- this.$set(this.mapList[this.dialogIndex].lightList[this.dialogMinIndex],'relayBit',this.dialogForm.relayBit);
- }else if(this.dialogForm.relayType == 2){
- this.$set(this.mapList[this.dialogIndex].lightList[this.dialogMinIndex],'configName',this.dialogForm.configName);
- this.$set(this.mapList[this.dialogIndex].lightList[this.dialogMinIndex],'configStatus',this.dialogForm.configStatus);
- }
- this.dialogOpen = false;
- }
- }
- })
- }
- },
- //遮罩菜单选中事件
- clickShadeButton(type){
- if(type == 1){
- this.$set(this,'dialogOpen',true)
- }else if (type == 2){
- if(this.dialogOpenType == 1 || this.dialogOpenType == 2 || this.dialogOpenType == 3){
- this.mapList.splice(this.dialogIndex,1)
- }else if(this.dialogOpenType == 4){
- this.mapList[this.dialogIndex].doorList.splice(this.dialogMinIndex,1)
- }else if(this.dialogOpenType == 6){
- this.mapList[this.dialogIndex].lightList.splice(this.dialogMinIndex,1)
- }
- this.$forceUpdate();
- }
- },
- //关闭下啦遮罩层
- offMapShade(){
- this.$set(this,'mouseType',0)
- },
- /*********************************房间内部移动事件*********************************/
- //门按下时绑定事件
- doorDragDown(e, index, minIndex){
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- this.$set(this, 'clientX', e.clientX);
- this.$set(this, 'clientY', e.clientY);
- this.$set(this, 'boxIndex', index);
- this.$set(this, 'minIndex', minIndex);
- this.$refs.maxBox.addEventListener('mousemove', this.doorDragMove, false)
- this.$refs.maxBox.addEventListener('mouseup', this.doorDragUp, false)
- }
- },
- //门弹起时绑定事件
- doorDragUp(e){
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- this.$refs.maxBox.removeEventListener('mousemove', this.doorDragMove, false)
- this.$refs.maxBox.removeEventListener('mouseup', this.doorDragUp, false)
- }
- },
- //门移动事件
- doorDragMove(event){
- let obj = doorMoveJudge(this.mapList,this.boxIndex,this.minIndex,event,this.$refs.maxBigBox.scrollLeft,this.$refs.maxBigBox.scrollTop);
- if(obj){
- let newObj = JSON.parse(JSON.stringify(this.mapList[this.boxIndex].doorList));
- newObj[this.minIndex] = { type:'door', toward:obj.toward, w:this.doorWidth, h:this.doorHeight, x:obj.x, y:obj.y, }
- this.$set(this.mapList[this.boxIndex],'doorList',newObj);
- }
- //到达边界删除事件
- if(event.clientX<=(this.borderLeft)||event.clientX>=(this.borderLeft+this.layerWidth-1)||event.clientY<=(this.borderTop)||event.clientY>=(this.borderTop+this.layerHeight-1)){
- this.$refs.maxBox.removeEventListener('mousemove', this.doorDragMove, false)
- this.$refs.maxBox.removeEventListener('mouseup', this.doorDragUp, false)
- }
- },
- //灯按下时绑定事件
- lightDragDown(e, index,minIndex){
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- this.$set(this, 'clientX', e.clientX);
- this.$set(this, 'clientY', e.clientY);
- this.$set(this, 'boxIndex', index);
- this.$set(this, 'minIndex', minIndex);
- this.$refs.maxBox.addEventListener('mousemove', this.lightDragMove, false)
- this.$refs.maxBox.addEventListener('mouseup', this.lightDragUp, false)
- }
- },
- //灯弹起时绑定事件
- lightDragUp(e){
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- this.$refs.maxBox.removeEventListener('mousemove', this.lightDragMove, false)
- this.$refs.maxBox.removeEventListener('mouseup', this.lightDragUp, false)
- }
- },
- //灯移动事件
- lightDragMove(event){
- let obj = lightMoveJudge(this.mapList,this.boxIndex,this.minIndex,event,this.$refs.maxBigBox.scrollLeft,this.$refs.maxBigBox.scrollTop);
- if(obj){
- this.$set(this.mapList[this.boxIndex].lightList[this.minIndex],'x',obj.x?obj.x:this.mapList[this.boxIndex].lightList[this.minIndex].x);
- this.$set(this.mapList[this.boxIndex].lightList[this.minIndex],'y',obj.y?obj.y:this.mapList[this.boxIndex].lightList[this.minIndex].y);
- }
- //到达边界删除事件
- if(event.clientX<=(this.borderLeft)||event.clientX>=(this.borderLeft+this.layerWidth-1)||event.clientY<=(this.borderTop)||event.clientY>=(this.borderTop+this.layerHeight-1)){
- this.$refs.maxBox.removeEventListener('mousemove', this.lightDragMove, false)
- this.$refs.maxBox.removeEventListener('mouseup', this.lightDragUp, false)
- }
- },
- /*********************************房间移动事件*********************************/
- //按下时绑定事件
- dragDown(e, index) {
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- this.$set(this, 'clientX', e.clientX);
- this.$set(this, 'clientY', e.clientY);
- this.$set(this, 'boxIndex', index);
- this.$refs.maxBox.addEventListener('mousemove', this.dragMove, false)
- this.$refs.maxBox.addEventListener('mouseup', this.dragUp, false)
- }
- },
- //弹起时删除事件
- dragUp(e) {
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- this.$refs.maxBox.removeEventListener('mousemove', this.dragMove, false)
- this.$refs.maxBox.removeEventListener('mouseup', this.dragUp, false)
- }
- },
- //移动事件
- dragMove(event) {
- if (event.button === 0) { //0鼠标左键 1中键 2右键
- let obj = roomMove(this.mapList,this.boxIndex,this.clientX,this.clientY,event)
- if(obj.x){
- this.$set(this.mapList[this.boxIndex], 'x', obj.x)
- }
- if (obj.y){
- this.$set(this.mapList[this.boxIndex], 'y', obj.y)
- }
- if(event.clientX<=(this.borderLeft+10)||event.clientX>=(this.borderLeft+this.layerWidth-10)||event.clientY<=(this.borderTop+10)||event.clientY>=(this.borderTop+this.layerHeight-10)){
- this.$refs.maxBox.removeEventListener('mousemove', this.dragMove, false)
- this.$refs.maxBox.removeEventListener('mouseup', this.dragUp, false)
- }
- this.$set(this, 'clientX', event.clientX);
- this.$set(this, 'clientY', event.clientY);
- }
- },
- /*********************************尺寸调整事件X,Y*********************************/
- //四角-按下时绑定事件
- zoomDownXY(e, index, type){
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- this.$set(this, 'clientX', e.clientX);
- this.$set(this, 'clientY', e.clientY);
- this.$set(this, 'boxIndex', index);
- this.$set(this, 'moveType', type);
- this.$refs.maxBox.addEventListener('mousemove', this.zoomMoverXY, false)
- this.$refs.maxBox.addEventListener('mouseup', this.zoomUpXY, false)
- }
- },
- //四角-弹起时删除事件
- zoomUpXY(e){
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- this.$refs.maxBox.removeEventListener('mousemove', this.zoomMoverXY, false)
- this.$refs.maxBox.removeEventListener('mouseup', this.zoomMoverXY, false)
- }
- },
- //四角-拖拽事件
- zoomMoverXY(event){
- // moveType 1.上/右上 2.右/右下 3.下/左下 4.左/左上
- if(event.button === 0){
- let obj = fourCornersZoom(this.mapList,this.boxIndex,event,this.clientX,this.clientY,this.moveType);
- if(obj){
- this.$set(this.mapList[this.boxIndex],'x',obj.x?obj.x:this.mapList[this.boxIndex].x);
- this.$set(this.mapList[this.boxIndex],'y',obj.y?obj.y:this.mapList[this.boxIndex].y);
- this.$set(this.mapList[this.boxIndex],'w',obj.w?obj.w:this.mapList[this.boxIndex].w);
- this.$set(this.mapList[this.boxIndex],'h',obj.h?obj.h:this.mapList[this.boxIndex].h);
- if(this.mapList[this.boxIndex].type == '1' || this.mapList[this.boxIndex].type == '3'){
- this.$set(this.mapList[this.boxIndex],'doorList',obj.doorList?obj.doorList:this.mapList[this.boxIndex].doorList);
- }if(this.mapList[this.boxIndex].type == '2'){
- this.$set(this.mapList[this.boxIndex],'lightList',obj.lightList?obj.lightList:this.mapList[this.boxIndex].lightList);
- }
- //到达边界删除事件
- if(event.clientX<=(this.borderLeft)||event.clientX>=(this.borderLeft+this.layerWidth-1)||event.clientY<=(this.borderTop)||event.clientY>=(this.borderTop+this.layerHeight-1)){
- this.$refs.maxBox.removeEventListener('mousemove', this.zoomMoverXY, false)
- this.$refs.maxBox.removeEventListener('mouseup', this.zoomMoverXY, false)
- }
- this.$set(this, 'clientX', event.clientX);
- this.$set(this, 'clientY', event.clientY);
- }
- }
- },
- /*********************************尺寸调整事件X*********************************/
- //左右边框-按下时绑定事件
- zoomDownX(e, index, type){
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- this.$set(this, 'clientX', e.clientX);
- this.$set(this, 'clientY', e.clientY);
- this.$set(this, 'boxIndex', index);
- this.$set(this, 'moveType', type);
- this.$refs.maxBox.addEventListener('mousemove', this.zoomMoverX, false)
- this.$refs.maxBox.addEventListener('mouseup', this.zoomUpX, false)
- }
- },
- //左右边框-弹起时删除事件
- zoomUpX(e){
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- this.$refs.maxBox.removeEventListener('mousemove', this.zoomMoverX, false)
- this.$refs.maxBox.removeEventListener('mouseup', this.zoomMoverX, false)
- }
- },
- //左右边框-拖拽事件
- zoomMoverX(e){
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- let obj = fourEdgeZoom(this.mapList,this.boxIndex,e,this.clientX,this.clientY,this.moveType);
- if(obj){
- this.$set(this.mapList[this.boxIndex],'x',obj.x?obj.x:this.mapList[this.boxIndex].x);
- this.$set(this.mapList[this.boxIndex],'w',obj.w?obj.w:this.mapList[this.boxIndex].w);
- if(this.mapList[this.boxIndex].type == '1' || this.mapList[this.boxIndex].type == '3'){
- this.$set(this.mapList[this.boxIndex],'doorList',obj.doorList?obj.doorList:this.mapList[this.boxIndex].doorList);
- }if(this.mapList[this.boxIndex].type == '2'){
- this.$set(this.mapList[this.boxIndex],'lightList',obj.lightList?obj.lightList:this.mapList[this.boxIndex].lightList);
- }
- //到达边界删除事件
- if(e.clientX<=(this.borderLeft)||e.clientX>=(this.borderLeft+this.layerWidth-1)||e.clientY<=(this.borderTop)||e.clientY>=(this.borderTop+this.layerHeight-1)){
- this.$refs.maxBox.removeEventListener('mousemove', this.zoomMoverX, false)
- this.$refs.maxBox.removeEventListener('mouseup', this.zoomMoverX, false)
- }
- this.$set(this, 'clientX', e.clientX);
- }
- }
- },
- /*********************************尺寸调整事件Y*********************************/
- //上下边框-按下时绑定事件
- zoomDownY(e, index, type){
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- this.$set(this, 'clientX', e.clientX);
- this.$set(this, 'clientY', e.clientY);
- this.$set(this, 'boxIndex', index);
- this.$set(this, 'moveType', type);
- this.$refs.maxBox.addEventListener('mousemove', this.zoomMoverY, false)
- this.$refs.maxBox.addEventListener('mouseup', this.zoomUpY, false)
- }
- },
- //上下边框-弹起时删除事件
- zoomUpY(e){
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- this.$refs.maxBox.removeEventListener('mousemove', this.zoomMoverY, false)
- this.$refs.maxBox.removeEventListener('mouseup', this.zoomMoverY, false)
- }
- },
- //上下边框-拖拽事件
- zoomMoverY(e){
- if (e.button === 0) { //0鼠标左键 1中键 2右键
- let obj = fourEdgeZoom(this.mapList,this.boxIndex,e,this.clientX,this.clientY,this.moveType);
- if(obj){
- this.$set(this.mapList[this.boxIndex],'y',obj.y?obj.y:this.mapList[this.boxIndex].y);
- this.$set(this.mapList[this.boxIndex],'h',obj.h?obj.h:this.mapList[this.boxIndex].h);
- if(this.mapList[this.boxIndex].type == '1' || this.mapList[this.boxIndex].type == '3'){
- this.$set(this.mapList[this.boxIndex],'doorList',obj.doorList?obj.doorList:this.mapList[this.boxIndex].doorList);
- }if(this.mapList[this.boxIndex].type == '2'){
- this.$set(this.mapList[this.boxIndex],'lightList',obj.lightList?obj.lightList:this.mapList[this.boxIndex].lightList);
- }
- //到达边界删除事件
- if(e.clientX<=(this.borderLeft)||e.clientX>=(this.borderLeft+this.layerWidth-1)||e.clientY<=(this.borderTop)||e.clientY>=(this.borderTop+this.layerHeight-1)){
- this.$refs.maxBox.removeEventListener('mousemove', this.zoomMoverY, false)
- this.$refs.maxBox.removeEventListener('mouseup', this.zoomMoverY, false)
- }
- this.$set(this, 'clientY', e.clientY);
- }
- }
- },
- /*********************************添加拖拽逻辑*********************************/
- externalAddDragStart(e,type){
- if(this.mapSrc){
- e.dataTransfer.setDragImage(type == 1?this.roomImg_1:(type == 2?this.roomImg_2:(type == 3?this.roomImg_3:'')), 48, 48);
- this.$set(this,'grab',type);
- }
- },
- //添加房间
- externalAddDragEnd(e){
- if(this.mapSrc){
- let obj = roomAdd(e,this.mapList,this.grab,this.$refs.maxBigBox.scrollLeft,this.$refs.maxBigBox.scrollTop);
- if(obj){
- this.mapList.push(obj);
- }
- }
- },
- internalAddDragStart(e,type){
- e.dataTransfer.setDragImage(type == 4?this.doorImg:(type == 6?this.lightImg:''),
- type == 4?17:(type == 6?20:''),
- type == 4?17:(type == 6?20:''));
- this.$set(this,'grab',type);
- },
- //添加门/灯
- internalAddDragEnd(event){
- if(this.grab == 4){
- let obj = addDoor(event,this.mapList,this.$refs.maxBigBox.scrollLeft,this.$refs.maxBigBox.scrollTop,this.grab);
- if (obj){
- //暂时限制只能添加一个
- if(this.mapList[obj.index].doorList[0]){
- this.msgError('一个房间只能添加一个门')
- }else{
- this.mapList[obj.index].doorList.push({
- type:obj.type,
- toward:obj.toward,
- w:obj.w,
- h:obj.h,
- x:obj.x,
- y:obj.y,
- });
- }
- }
- }else if(this.grab == 6){
- let obj = lightAdd(event,this.$refs.maxBigBox.scrollLeft,this.$refs.maxBigBox.scrollTop,this.mapList,this.grab);
- if (obj){
- this.mapList[obj.index].lightList.push({
- type:obj.type,
- state:obj.state,
- w:obj.w,
- h:obj.h,
- x:obj.x,
- y:obj.y,
- });
- }
- }
- },
- /*********************************画布坐标矫正相关******************************/
- //矫正边界坐标
- shadeClick(type){
- //初始化抓取图样
- this.roomImg_1 = new Image();
- this.roomImg_1.src = require('@/assets/ZDimages/evacuation3_2/romm_1.png');
- this.roomImg_2 = new Image();
- this.roomImg_2.src = require('@/assets/ZDimages/evacuation3_2/romm_2.png');
- this.roomImg_3 = new Image();
- this.roomImg_3.src = require('@/assets/ZDimages/evacuation3_2/romm_3.png');
- this.doorImg = new Image();
- this.doorImg.src = require('@/assets/ZDimages/evacuation3_2/icon_sysbjt_m.png');
- this.lightImg = new Image();
- this.lightImg.src = require('@/assets/ZDimages/evacuation3_2/icon_fxyj_wszys.png');
- this.$set(this,'borderLeft', Math.round(this.$refs.maxBigBox.getBoundingClientRect().left));
- this.$set(this,'borderTop', Math.round(this.$refs.maxBigBox.getBoundingClientRect().top));
- let data = {
- borderLeft : this.borderLeft,
- borderTop : this.borderTop,
- layerWidth : this.layerWidth,
- layerHeight : this.layerHeight,
- minHeight : this.minHeight,
- maxHeight : this.maxHeight,
- minWidth : this.minWidth,
- maxWidth : this.maxWidth,
- doorHeight : this.doorHeight,
- doorWidth : this.doorWidth,
- minLightNum : this.minLightNum,
- maxLightNum : this.maxLightNum,
- tentaclesLength : this.tentaclesLength,
- }
- setJsData(data);
- this.$set(this, 'shadeBoxType', type);
- },
- //透明度调整
- opacityClick(type){
- if(type == 1){
- if(this.mapOpacityText>10){
- this.$set(this,'mapOpacityText',this.mapOpacityText - 10);
- this.$set(this,'mapOpacity',this.mapOpacityText/100);
- }
- }else if (type == 2){
- if(this.mapOpacityText<100){
- this.$set(this,'mapOpacityText',this.mapOpacityText + 10);
- this.$set(this,'mapOpacity',this.mapOpacityText/100);
- }
- }
- },
- //上传
- handleAvatarSuccess(res, file, type) {
- // console.log('res',res);
- // console.log('file',file);
- // console.log('type',type);
- if(res){
- this.loadingInstance.close();
- if(res.data){
- if(res.data.url){
- this.$set(this,'mapSrc',res.data.url)
- if (type == 1){
- this.$set(this, 'shadeBoxType', 1);
- }
- }
- }
- }
- },
- beforeAvatarUpload(file) {
- if (file.type == 'image/png' || file.type == 'image/jpeg' || file.type == 'image/gif') {
- this.asyncImgChecked(file).then(data => {
- if (data) {
- // console.log('data',data);
- this.loadingInstance = Loading.service({ spinner:"", background: 'rgba(255, 255, 255, 0.1)' })
- return true;
- } else {
- this.$message.error('图片尺寸不能大于于1500 X 1000')
- return false;
- }
- })
- }else{
- this.$message.error('只能上传png/gif/jpg格式');
- return false;
- }
- },
- // 计算图片尺寸
- asyncImgChecked (file) {
- let self = this;
- return new Promise((resolve) => {
- let reader = new FileReader()
- reader.readAsDataURL(file) // 必须用file.raw
- reader.onload = e => { // 让页面中的img标签的src指向读取的路径
- let img = e.target.result;
- const image = new Image()
- image.src=img
- image.onload = _=>{
- let width = image.width
- let height= image.height
- if(width >1500 || height > 1000){
- resolve(false)
- }else{
- self.$set(self,'layerWidth',width);
- self.$set(self,'layerHeight',height);
- self.$set(self,'maxWidth',width);
- self.$set(self,'maxHeight',height);
- resolve(true)
- }
- }
- }
- })
- },
- buttonShadeClick(){
- this.shadeBoxType = 1;
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .buildingDetails{
- flex:1;
- display: flex!important;
- flex-direction: column;
- overflow: hidden;
- position: relative;
- *{
- margin:0;
- font-weight:500;
- }
- .buildingDetails-page{
- flex:1;
- display: flex;
- overflow: hidden;
- .max-left-box{
- flex:1;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- .max-left-box-one{
- top:0;
- left:0;
- flex:1;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- border:1px solid #e0e0e0;
- margin:22px 0 24px 28px;
- position: relative;
- .max-button-big-position-box{
- position: absolute;
- top:50%;
- left:50%;
- width:332px;
- height:370px;
- margin-left:-166px;
- margin-top:-185px;
- img{
- width:332px;
- height:248px;
- -webkit-user-drag:none
- }
- .up-img-button-box{
- height:40px;
- padding:0;
- margin:34px 16px 19px 16px;
- .up-img-button{
- width:300px;
- line-height:40px;
- color:#0183FA;
- text-align: center;
- border:1px dashed #0183FA;
- border-radius:6px;
- }
- }
- .up-img-text{
- line-height:24px;
- font-size:15px;
- color:#333;
- text-align: center;
- }
- }
- }
- .max-left-button-box{
- display: flex;
- .null-p{
- flex:1;
- }
- .up-img-p{
- width:120px;
- line-height:40px;
- text-align: center;
- font-size:16px;
- color:#333;
- border-radius:6px;
- border: 1px solid #E0E0E0;
- margin:22px 0 0 0;
- }
- .opacity-button-box{
- display: flex;
- border: 1px solid #E0E0E0;
- border-radius:6px;
- width:210px;
- margin:22px 20px 0 26px;
- p{
- font-size:16px;
- text-align: center;
- line-height:40px;
- }
- p:nth-child(1){
- width:40px;
- cursor: pointer;
- }
- p:nth-child(2){
- width:130px;
- border-left:1px solid #e0e0e0;
- border-right:1px solid #e0e0e0;
- }
- p:nth-child(3){
- width:40px;
- cursor: pointer;
- }
- }
- }
- .max-left-map-big-box{
- flex:1;
- margin:22px 0 24px 28px;
- border:1px solid #e0e0e0;
- position: relative;
- .left-map-box{
- z-index:10;
- color:#fff;
- border: 1px solid #dedede;
- position: relative;
- .for-map-box:hover{
- .top-big-box{
- background: #CEF2FD!important;
- }
- .center-left-p{
- background: #CEF2FD!important;
- }
- .center-right-p{
- background: #CEF2FD!important;
- }
- .bottom-big-box{
- background: #CEF2FD!important;
- }
- }
- .for-map-box {
- user-select: none;//解决偶发性拖拽时鼠标变成禁止符号导致拖拽回弹失效
- position: absolute;
- display: flex;
- flex-direction: column;
- background: #CEF2FD;
- .top-big-box{
- display: flex;
- height:2px;
- background: #fff;
- .top-left-p{
- width:2px;
- cursor: se-resize;
- }
- .top-center-p{
- flex:1;
- cursor: n-resize;
- }
- .top-right-p{
- width:2px;
- cursor: ne-resize;
- }
- }
- .center-big-box{
- flex:1;
- display: flex;
- .center-left-p{
- width:2px;
- background: #fff;
- cursor: w-resize;
- }
- .center-move-box{
- flex:1;
- /*cursor: move;*/
- cursor: pointer;
- text-align: center;
- color:#333;
- overflow: hidden;
- }
- .center-right-p{
- width:2px;
- background: #fff;
- cursor: w-resize;
- }
- }
- .bottom-big-box{
- display: flex;
- height:2px;
- background: #fff;
- .bottom-left-p{
- width:2px;
- cursor: ne-resize;
- }
- .bottom-center-p{
- flex:1;
- cursor: n-resize;
- }
- .bottom-right-p{
- width:2px;
- cursor: se-resize;
- }
- }
- .center-move-door-p{
- position: absolute;
- }
- .center-move-light-p{
- position: absolute;
- background: #00ff00;
- font-size:12px;
- font-weight:500;
- }
- .lightNone{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_fxyj_wszys.png");
- background-size: 100%;
- }
- .lightTop{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_sjt.png");
- background-size: 100%;
- }
- .lightBottom{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_xjt.png");
- background-size: 100%;
- }
- .lightLeft{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_zuo.png");
- background-size: 100%;
- }
- .lightRight{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_yuo.png");
- background-size: 100%;
- }
- .colorDoor{
- background: red!important;
- }
- .colorTraffic{
- background: #0183fa!important;
- }
- .colorConnect{
- background: #A11DDF!important;
- }
- }
- .for-map-box-one {
- user-select: none;//解决偶发性拖拽时鼠标变成禁止符号导致拖拽回弹失效
- position: absolute;
- display: flex;
- flex-direction: column;
- background: #CEFDD5;
- .top-big-box{
- display: flex;
- height:2px;
- /*background: #0183fa;*/
- .top-left-p{
- width:2px;
- cursor: se-resize;
- }
- .top-center-p{
- flex:1;
- cursor: n-resize;
- }
- .top-right-p{
- width:2px;
- cursor: ne-resize;
- }
- }
- .center-big-box{
- flex:1;
- display: flex;
- .center-left-p{
- width:2px;
- /*background: #0183fa;*/
- cursor: w-resize;
- }
- .center-move-box{
- flex:1;
- /*cursor: move;*/
- cursor: pointer;
- text-align: center;
- color:#333;
- overflow: hidden;
- }
- .center-right-p{
- width:2px;
- /*background: #0183fa;*/
- cursor: w-resize;
- }
- }
- .bottom-big-box{
- display: flex;
- height:2px;
- /*background: #0183fa;*/
- .bottom-left-p{
- width:2px;
- cursor: ne-resize;
- }
- .bottom-center-p{
- flex:1;
- cursor: n-resize;
- }
- .bottom-right-p{
- width:2px;
- cursor: se-resize;
- }
- }
- .center-move-door-p{
- position: absolute;
- background: #0183fa;
- }
- .center-move-light-p{
- position: absolute;
- background: #00ff00;
- font-size:12px;
- font-weight:500;
- }
- .lightNone{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_fxyj_wszys.png");
- background-size: 100%;
- }
- .lightTop{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_sjt.png");
- background-size: 100%;
- }
- .lightBottom{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_xjt.png");
- background-size: 100%;
- }
- .lightLeft{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_zuo.png");
- background-size: 100%;
- }
- .lightRight{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_yuo.png");
- background-size: 100%;
- }
- .colorDoor{
- background: red!important;
- }
- .colorTraffic{
- background: #0183fa!important;
- }
- .colorConnect{
- background: #A11DDF!important;
- }
- }
- .for-map-box-two {
- user-select: none;//解决偶发性拖拽时鼠标变成禁止符号导致拖拽回弹失效
- position: absolute;
- display: flex;
- flex-direction: column;
- background:url("../../../../assets/ZDimages/evacuation3_2/icon_yjtd.png") center center no-repeat #39AE36;
- background-size: 60px 60px;
- .top-big-box{
- display: flex;
- height:2px;
- /*background: #0183fa;*/
- background: #fff;
- .top-left-p{
- width:2px;
- cursor: se-resize;
- }
- .top-center-p{
- flex:1;
- cursor: n-resize;
- }
- .top-right-p{
- width:2px;
- cursor: ne-resize;
- }
- }
- .center-big-box{
- flex:1;
- display: flex;
- .center-left-p{
- width:2px;
- /*background: #0183fa;*/
- background: #fff;
- cursor: w-resize;
- }
- .center-move-box{
- flex:1;
- /*cursor: move;*/
- cursor: pointer;
- text-align: center;
- color:#333;
- overflow: hidden;
- }
- .center-right-p{
- width:2px;
- /*background: #0183fa;*/
- background: #fff;
- cursor: w-resize;
- }
- }
- .bottom-big-box{
- display: flex;
- height:2px;
- /*background: #0183fa;*/
- background: #fff;
- .bottom-left-p{
- width:2px;
- cursor: ne-resize;
- }
- .bottom-center-p{
- flex:1;
- cursor: n-resize;
- }
- .bottom-right-p{
- width:2px;
- cursor: se-resize;
- }
- }
- .center-move-door-p{
- position: absolute;
- background: #0183fa;
- }
- .center-move-light-p{
- position: absolute;
- background: #00ff00;
- font-size:12px;
- font-weight:500;
- }
- .lightNone{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_fxyj_wszys.png");
- background-size: 100%;
- }
- .lightTop{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_sjt.png");
- background-size: 100%;
- }
- .lightBottom{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_xjt.png");
- background-size: 100%;
- }
- .lightLeft{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_zuo.png");
- background-size: 100%;
- }
- .lightRight{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_yuo.png");
- background-size: 100%;
- }
- .colorDoor{
- background: red!important;
- }
- .colorTraffic{
- background: #0183fa!important;
- }
- .colorConnect{
- background: #A11DDF!important;
- }
- .for-map-box-two-img{
- position: absolute;
- top:50%;
- left:50%;
- margin-left:-30px;
- margin-top:-30px;
- width:60px;
- height:60px;
- }
- }
- .for-map-box-two:hover{
- .top-big-box{
- background: #39AE36!important;
- }
- .center-left-p{
- background: #39AE36!important;
- }
- .center-right-p{
- background: #39AE36!important;
- }
- .bottom-big-box{
- background: #39AE36!important;
- }
- }
- .center-move-door-p-t{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_sysbjt_m.png")!important;
- background-size: 100%!important;
- transform: rotate(180deg);
- }
- .center-move-door-p-b{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_sysbjt_m.png")!important;
- background-size: 100%!important;
- }
- .center-move-door-p-l{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_sysbjt_m.png")!important;
- background-size: 100%!important;
- transform: rotate(90deg);
- }
- .center-move-door-p-r{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_sysbjt_m.png")!important;
- background-size: 100%!important;
- transform: rotateZ(270deg);
- }
- .center-move-door-p-t-ss{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_aqtd_m.png")!important;
- background-size: 100%!important;
- transform: rotate(180deg);
- }
- .center-move-door-p-b-ss{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_aqtd_m.png")!important;
- background-size: 100%!important;
- }
- .center-move-door-p-l-ss{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_aqtd_m.png")!important;
- background-size: 100%!important;
- transform: rotate(90deg);
- }
- .center-move-door-p-r-ss{
- background: url("../../../../assets/ZDimages/evacuation3_2/icon_aqtd_m.png")!important;
- background-size: 100%!important;
- transform: rotateZ(270deg);
- }
- }
- .left-map-img{
- position: absolute;
- left:0;
- top:0;
- z-index:5;
- -webkit-user-drag: none;
- }
- }
- }
- .max-right-box{
- width:376px;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- .right-title-box{
- margin:0 28px;
- display: flex;
- line-height:70px;
- border-bottom:1px solid #D8D8D8;
- .right-title-p{
- flex:1;
- font-size:16px;
- color:#333;
- }
- div{
- cursor: pointer;
- display: flex;
- font-size:16px;
- color:#333;
- p:nth-child(1){
- color:rgb(234,149,24);
- line-height: 70px;
- margin-right:4px;
- }
- p:nth-child(2){
- font-size:16px;
- color:#333;
- }
- }
- }
- .right-bottom-max-box{
- .right-for-max-box{
- margin-left:28px;
- .right-for-title{
- line-height:60px;
- font-size:16px;
- }
- .right-for-box{
- display: inline-block;
- width:150px;
- height:160px;
- margin-right:20px;
- margin-bottom:20px;
- border:1px solid #e0e0e0;
- border-radius:6px;
- overflow: hidden;
- img{
- display: block;
- width:150px;
- height:120px;
- cursor: pointer;
- }
- p{
- line-height:40px;
- border-top:1px solid #e0e0e0;
- text-align: center;
- font-size:14px;
- }
- }
- }
- .right-button-box{
- display: flex;
- p:nth-child(1){
- flex:1;
- }
- p:nth-child(2){
- width:70px;
- line-height: 30px;
- font-size:12px;
- text-align: center;
- background: #E0E0E0;
- color: #999999;
- margin-right:17px;
- border-radius:6px;
- cursor: pointer;
- }
- p:nth-child(3){
- width:70px;
- line-height: 30px;
- font-size:12px;
- text-align: center;
- background: #0045AF;
- color: #fff;
- border-radius:6px;
- cursor: pointer;
- }
- p:nth-child(4){
- flex:1;
- }
- }
- }
- }
- }
- .map-shade-max-big-box{
- z-index:10000;
- position: fixed;
- top: 0;
- left: 0;
- height:100%;
- width:100%;
- .map-shade-big-box{
- width:80px;
- position: absolute;
- border-radius:8px;
- background: #fff;
- font-size:12px;
- font-weight:500;
- box-shadow: 0 4px 10px 0 rgba(0,0,0,0.302);
- overflow: hidden;
- .shade-button-p{
- height:30px;
- line-height:30px;
- text-align: center;
- }
- .shade-button-p:hover{
- color: #fff;
- background: #00a0e9;
- cursor: pointer;
- }
- .shade-border-p{
- height:1px;
- margin:0 10px;
- background:#E0E0E0;
- }
- }
- }
- .shade-max-big-box{
- z-index:10000;
- width:100%;
- height:100%;
- position: fixed;
- top:0;
- left:0;
- background: rgba(0,0,0,0.6);
- .shade-max-box-1{
- width:100%;
- height:100%;
- position: relative;
- .shade-big-img{
- width:126px;
- height:124px;
- position: absolute;
- top:120px;
- left:1010px;
- }
- .shade-big-1-text-1{
- position: absolute;
- top:177px;
- left:1144px;
- background:#fff;
- width:120px;
- line-height:40px;
- text-align: center;
- border:1px solid #e0e0e0;
- border-radius:6px;
- color:#333;
- font-size:16px;
- }
- .shade-big-1-text-2{
- display: flex;
- position: absolute;
- top:177px;
- left:1290px;
- background:#fff;
- width:210px;
- line-height:40px;
- text-align: center;
- border:1px solid #e0e0e0;
- border-radius:6px;
- color:#333;
- font-size:16px;
- p:nth-child(1){
- width:40px;
- }
- p:nth-child(2){
- flex:1;
- border-left:1px solid #e0e0e0;
- border-right:1px solid #e0e0e0;
- }
- p:nth-child(3){
- width:40px;
- }
- }
- .shade-big-1-text-3{
- position: absolute;
- top:230px;
- left:780px;
- color:#fff;
- width:298px;
- }
- .shade-big-1-text-4{
- position: absolute;
- top:300px;
- left:780px;
- color:#fff;
- width:298px;
- }
- .shade-big-1-text-5{
- position: absolute;
- top:395px;
- left:835px;
- background:#fff;
- width:182px;
- line-height:40px;
- text-align: center;
- border:1px solid #e0e0e0;
- border-radius:6px;
- color:#333;
- font-size:16px;
- cursor: pointer;
- }
- }
- .shade-max-box-2{
- width:100%;
- height:100%;
- position: relative;
- .shade-big-img{
- width:126px;
- height:124px;
- position: absolute;
- top:220px;
- right:370px;
- }
- .shade-big-1-text-1{
- background:#fff;
- position: absolute;
- top:286px;
- right:222px;
- width:150px;
- height:160px;
- border:1px solid #e0e0e0;
- border-radius:6px;
- overflow: hidden;
- img{
- display: block;
- width:150px;
- height:120px;
- }
- p{
- line-height:40px;
- border-top:1px solid #e0e0e0;
- text-align: center;
- font-size:14px;
- }
- }
- .shade-big-1-text-1{
- background:#fff;
- position: absolute;
- top:286px;
- right:222px;
- width:150px;
- height:160px;
- border:1px solid #e0e0e0;
- border-radius:6px;
- overflow: hidden;
- img{
- display: block;
- width:150px;
- height:120px;
- }
- p{
- line-height:40px;
- border-top:1px solid #e0e0e0;
- text-align: center;
- font-size:14px;
- }
- }
- .shade-big-1-text-2{
- background:#fff;
- position: absolute;
- top:286px;
- right:52px;
- width:150px;
- height:160px;
- border:1px solid #e0e0e0;
- border-radius:6px;
- overflow: hidden;
- img{
- display: block;
- width:150px;
- height:120px;
- }
- p{
- line-height:40px;
- border-top:1px solid #e0e0e0;
- text-align: center;
- font-size:14px;
- }
- }
- .shade-big-1-text-3{
- background:#fff;
- position: absolute;
- top:470px;
- right:222px;
- width:150px;
- height:160px;
- border:1px solid #e0e0e0;
- border-radius:6px;
- overflow: hidden;
- img{
- display: block;
- width:150px;
- height:120px;
- }
- p{
- line-height:40px;
- border-top:1px solid #e0e0e0;
- text-align: center;
- font-size:14px;
- }
- }
- .shade-big-1-text-4{
- position: absolute;
- top:330px;
- right:440px;
- color:#fff;
- width:298px;
- }
- .shade-big-1-text-5{
- position: absolute;
- top:460px;
- right:440px;
- color:#fff;
- width:298px;
- }
- .shade-big-1-text-6{
- position: absolute;
- top:530px;
- right:440px;
- color:#fff;
- width:298px;
- }
- .shade-big-1-text-7{
- position: absolute;
- top:610px;
- right:500px;
- background:#fff;
- width:182px;
- line-height:40px;
- text-align: center;
- border:1px solid #e0e0e0;
- border-radius:6px;
- color:#333;
- font-size:16px;
- cursor: pointer;
- }
- }
- .shade-max-box-3{
- .shade-big-img{
- width:126px;
- height:124px;
- position: absolute;
- top:670px;
- right:390px;
- }
- .shade-big-1-text-1{
- position: absolute;
- top:460px;
- right:420px;
- color:#fff;
- width:298px;
- }
- .shade-big-1-text-2{
- position: absolute;
- top:540px;
- right:420px;
- color:#fff;
- width:298px;
- }
- .shade-big-1-text-3{
- position: absolute;
- top:630px;
- right:480px;
- background:#fff;
- width:182px;
- line-height:40px;
- text-align: center;
- border:1px solid #e0e0e0;
- border-radius:6px;
- color:#333;
- font-size:16px;
- cursor: pointer;
- }
- .shade-big-1-text-4{
- background:#fff;
- position: absolute;
- top:286px;
- right:222px;
- width:150px;
- height:160px;
- border:1px solid #e0e0e0;
- border-radius:6px;
- overflow: hidden;
- img{
- display: block;
- width:150px;
- height:120px;
- }
- p{
- line-height:40px;
- border-top:1px solid #e0e0e0;
- text-align: center;
- font-size:14px;
- }
- }
- .shade-big-1-text-5{
- background:#fff;
- position: absolute;
- top:286px;
- right:222px;
- width:150px;
- height:160px;
- border:1px solid #e0e0e0;
- border-radius:6px;
- overflow: hidden;
- img{
- display: block;
- width:150px;
- height:120px;
- }
- p{
- line-height:40px;
- border-top:1px solid #e0e0e0;
- text-align: center;
- font-size:14px;
- }
- }
- }
- .shade-max-box-4{
- div{
- position: absolute;
- top:50%;
- left:50%;
- width:460px;
- height:200px;
- margin-top:-100px;
- margin-left:-230px;
- background: #fff;
- padding:18px 30px 0 30px;
- border-radius:6px;
- p:nth-child(1){
- font-size:16px;
- line-height:20px;
- margin-bottom:20px;
- }
- p:nth-child(2){
- font-size:16px;
- line-height:20px;
- }
- p:nth-child(3){
- font-size:16px;
- line-height:20px;
- color:#0183FA;
- margin-left:320px;
- margin-top:50px;
- cursor: pointer;
- }
- }
- }
- }
- }
- </style>
- <style lang="scss">
- .dialog-relay-bit-form-item-box input{
- text-align: left !important;
- }
- </style>
|