index.vue 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739
  1. <!--
  2. revit扫楼数据整理
  3. -->
  4. <template>
  5. <div style="height:100%;">
  6. <div class="build_header" ref="header">
  7. <!-- 建筑选择 -->
  8. <span style="padding-right:12px;color:#999;vertical-align: middle;">建筑名称</span>
  9. <el-select v-model="buildId" style="margin-right:10px;" placeholder="请选择" @change="changeBuild">
  10. <el-option v-for="item in buildList" :key="item.id" :label="item.localName"
  11. :value="item.id"></el-option>
  12. </el-select>
  13. <!-- 楼层选择 -->
  14. <span style="padding-right:12px;color:#999;">楼层</span>
  15. <el-select v-model="floorId" placeholder="请选择" @change="changeFloor">
  16. <el-option v-for="item in floorList" :key="item.id" :label="item.localName"
  17. :value="item.id"></el-option>
  18. </el-select>
  19. <!-- 选择时间插件 -->
  20. <build-time :timeArr="timeArr" @checkTime="checkTime"></build-time>
  21. </div>
  22. <div class="left-main">
  23. <div id="buildData">
  24. <!-- 头部信息 -->
  25. <div class="point_view" ref="point">
  26. <!-- 点位标签 -->
  27. <div class="build_label" v-show="labelShow">
  28. <!-- 左按钮 -->
  29. <div class="turn_left">
  30. <i class="iconfont" @click="turn(0)">&#xe720;</i>
  31. </div>
  32. <!-- 主体视窗 -->
  33. <div class="label_view">
  34. <el-scrollbar>
  35. <div class="swiper-wrapper">
  36. <div class="swiper-slide" :class="checkPointClass == 'all' ? 'active_swiper' : ''"
  37. @click="checkPoint('all','all','all')">
  38. <div class="all_view">
  39. <h3>全部</h3>
  40. </div>
  41. </div>
  42. <div class="swiper-slide" v-for="(item,index) in PTArr" :key="index"
  43. :class="checkPointClass == index ? 'active_swiper' : ''"
  44. @click="checkPoint(index,item.Id,item.Name)">
  45. <div class="img_view">
  46. <div :class="index == 0 ? 'msg_view' : 'title_view'">
  47. <h3>{{ item.Name }}</h3>
  48. <p>
  49. 附近的资产:
  50. <span>{{ item.Total }}</span> 个(
  51. <em>{{ item.Nocheck }}</em> 个未完成修订)
  52. </p>
  53. </div>
  54. <img v-if="index != 0" v-load @error="setErrorImg"
  55. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Image +'&width=200'"
  56. :alt="item.Name">
  57. <el-button type="text" v-if="index != 0" class="btn" @click.stop="getTable(item.Id,index)">查看详情
  58. </el-button>
  59. <i v-if="index != 0" class="iconfont icon-shuaxin icon" @click.stop="refreshImg(index)"></i>
  60. </div>
  61. </div>
  62. </div>
  63. </el-scrollbar>
  64. </div>
  65. <!-- 右按钮 -->
  66. <div class="turn_right">
  67. <i class="iconfont" @click="turn(1)">&#xe6f8;</i>
  68. </div>
  69. </div>
  70. <!-- 控制点位标签显示 -->
  71. <div class="label_show">
  72. <el-button plain @click="labelShowBtn">{{ labelChecked }}</el-button>
  73. </div>
  74. </div>
  75. <!-- 全部与未完成 -->
  76. <div class="build_operate" ref="operate">
  77. <el-radio-group v-model="checked" @change="changeChecked(checked)">
  78. <el-radio-button :label="''">全部</el-radio-button>
  79. <el-radio-button :label="0">未完成修订</el-radio-button>
  80. </el-radio-group>
  81. <div class="undo_btn" @click="undo">
  82. <el-button plain>撤回</el-button>
  83. </div>
  84. <div class="undo_btn" @click="refresh">
  85. <el-button plain>刷新</el-button>
  86. </div>
  87. <div class="undo_btn" @click="download">
  88. <el-button plain>下载</el-button>
  89. </div>
  90. <p class="build_msg" v-show="buildMsgShow" :class="buildMsg ? 'blink' : ''">
  91. 其他设备族的资产只能在对应页签内维护,设备族变更的资产刷新后不匹配的信息点值将丢失,将会在对应的页签内显示</p>
  92. </div>
  93. <!-- 主体表格与tab -->
  94. <div class="build_table">
  95. <el-tabs type="card" v-model="tabAvtive" @tab-click="createHotBtn">
  96. <el-tab-pane v-for="(item,index) in facilityList" :key="index" :name="'table' + index"
  97. :label="item.familyName + '(' + item.count + ')'">
  98. <div style="padding: .2rem;width:100%;padding-bottom:35px;" v-loading="loading">
  99. <div :id="'table' + index" v-loading="tableLoading"></div>
  100. <div class="data_page center">
  101. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  102. :current-page.sync="currentPage[tabChecked]"
  103. :page-sizes="pageSizeArrs" :page-size="pageSizeArr[tabChecked]"
  104. layout="total, sizes, prev, pager, next, jumper"
  105. :total="pageCount[tabChecked]"></el-pagination>
  106. </div>
  107. </div>
  108. </el-tab-pane>
  109. </el-tabs>
  110. </div>
  111. <!-- 图片查看浮层 -->
  112. <div class="mouse_move" style="backgroundColor:#ccc;height:3px;cursor:n-resize;" @mousedown="drag"
  113. @mouseup="mouseUp"></div>
  114. <div class="build_pic" v-bind:style="{height:picHeight+'px'}" ref="picview">
  115. <!-- <div class="pic_show" @click="picNoShow">关闭</div> -->
  116. <div class="turn_left">
  117. <i class="iconfont" @click="turnPic(0)">&#xe720;</i>
  118. </div>
  119. <div class="pic_view">
  120. <div class="swiper-container" id="swiperPic" v-show="tablePicArr.Pic.length">
  121. <div class="swiper-wrapper">
  122. <div class="swiper-slide" v-for="(item,$index) in tablePicArr.Nameplate" :key="item.Key">
  123. <div class="img_view">
  124. <img v-load @error="setErrorImg" @click="seeBig(item.Key,item.Name,item.Type)"
  125. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key"
  126. :title="item.Name" :alt="item.Name">
  127. <i class="iconfont icon-shuaxin icon" @click.stop="changeImgUrl('Nameplate',$index)"></i>
  128. </div>
  129. </div>
  130. <div class="swiper-slide" v-for="(item,$index) in tablePicArr.Pic" :key="item.Key">
  131. <div class="img_view" v-if="item.Type != 'image_video'">
  132. <img v-load @error="setErrorImg" @click="seeBig(item.Key,item.Name,item.Type)"
  133. v-if="item.Name == '铭牌照片'"
  134. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  135. :title="item.Name" :alt="item.Name">
  136. <img v-load @error="setErrorImg" @click="seeBig(item.Key,item.Name,item.Type)"
  137. v-if="item.Name == '设备正面照片'"
  138. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  139. :title="item.Name" :alt="item.Name">
  140. <img v-load @error="setErrorImg" @click="seeBig(item.Key,item.Name,item.Type)"
  141. v-if="item.Name == '带二维码的设备远景照片'"
  142. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  143. :title="item.Name" :alt="item.Name">
  144. <img v-load @error="setErrorImg" @click="seeBig(item.Key,item.Name,item.Type)"
  145. v-if="item.Name == '设备左侧照片'"
  146. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  147. :title="item.Name" :alt="item.Name">
  148. <img v-load @error="setErrorImg" @click="seeBig(item.Key,item.Name,item.Type)"
  149. v-if="item.Name == '设备右侧照片'"
  150. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  151. :title="item.Name" :alt="item.Name">
  152. <img v-load @error="setErrorImg" @click="seeBig(item.Key,item.Name,item.Type)"
  153. v-if="item.Name == '设备背面照片'"
  154. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  155. :title="item.Name" :alt="item.Name">
  156. <img v-load @error="setErrorImg" @click="seeBig(item.Key,item.Name,item.Type)"
  157. v-if="item.Name == '带二维码的设备近景照片'"
  158. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  159. :title="item.Name" :alt="item.Name">
  160. <img v-load @error="setErrorImg" @click="seeBig(item.Key,item.Name,item.Type)"
  161. v-if="item.Name == '视频资料' && item.Type == 'image'"
  162. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  163. :title="item.Name" :alt="item.Name">
  164. <div v-if="item.Type == 'video'" style="width:100%;height:100%;">
  165. <video style="width:100%;height:100%;"
  166. :src="'/image-service/common/file_get/'+ item.Key + '?systemId=dataPlatform'" controls
  167. :poster="'/image-service/common/image_get?systemId=dataPlatform&key='+ delVideo(item.Key) +'&width=200'"></video>
  168. </div>
  169. <img v-load @error="setErrorImg" @click="seeBig(item.Key,item.Name,item.Type)"
  170. v-if="item.Name == '其他照片'"
  171. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  172. :title="item.Name" :alt="item.Name">
  173. <img v-load @error="setErrorImg" @click="seeBig(item.Key,item.Name,item.Type)"
  174. v-if="item.Name == '全景照片'"
  175. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  176. :title="item.Name" :alt="item.Name">
  177. <!-- <i
  178. @click="delPic($index)"
  179. class="iconfont icon-guanbi"
  180. style="z-index:99;background:#fff;position:absolute;right:10px;top:10px;"
  181. ></i>-->
  182. <i class="iconfont icon-shuaxin icon" @click.stop="changeImgUrl('Pic',$index)"></i>
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. <div v-show="!tablePicArr.Pic.length">
  188. <p>{{ tablePicMsg ? tablePicMsg : '请选择资产' }}</p>
  189. </div>
  190. </div>
  191. <div class="turn_right">
  192. <i class="iconfont" @click="turnPic(1)">&#xe6f8;</i>
  193. </div>
  194. </div>
  195. <!-- 查看图片、视频、全景图页面唤起 -->
  196. <div class="iframe_view" v-if="iframeShow">
  197. <div class="iframe_no" @click="iframeShow = false">
  198. <i class="iconfont icon-guanbi"></i>
  199. </div>
  200. <iframe id="google_ads_frame2" name="google_ads_frame2" frameborder="0" :src="iframeSrc" marginwidth="0"
  201. marginheight="0" vspace="0"
  202. hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true"></iframe>
  203. </div>
  204. <!-- 编辑点位标签弹窗 -->
  205. <el-dialog title="点位标签编辑" class="modification" :visible.sync="dialogTableVisible" @close="closeDialog">
  206. <div class="content_box">
  207. <div class="mod_title">
  208. <div class="qr_code">
  209. <img v-if="pointList.PointId"
  210. :src="'/ScanBuilding/service/qrcode/point?projectId=' + projectId + '&pointId=' + pointList.PointId + '&FloorId=' + floorId + '&width=200&height=200'"
  211. alt>
  212. <p v-else>暂无二维码</p>
  213. </div>
  214. <!-- 头部信息 -->
  215. <div class="msg_main">
  216. <p :title="floorName">现场位置:{{ floorName ? floorName : '暂无' }}</p>
  217. <div class="input_view">
  218. <input type="text" v-model="pointList.PointName" @focus="nameShow = true" @blur="nameNotShow"
  219. @keyup.enter="savePointChange"
  220. placeholder="点位标签的名称">
  221. <i class="iconfont icon-check" v-show="nameShow" @click="savePointChange"></i>
  222. </div>
  223. <div class="input_view">
  224. <input type="text" v-model="pointList.PointLocalId" @focus="noShow = true" @blur="noNotShow"
  225. @keyup.enter="savePointChange"
  226. placeholder="点位标签的本地编码">
  227. <i class="iconfont icon-check" v-show="noShow" @click="savePointChange"></i>
  228. </div>
  229. </div>
  230. </div>
  231. <!-- 表格信息 -->
  232. <div class="cant_mod">
  233. <div class="msg_table">
  234. <div class="table_header">编码及关系</div>
  235. <table>
  236. <tbody>
  237. <tr>
  238. <td>点位标签id</td>
  239. <td>{{ pointList.PointId }}</td>
  240. </tr>
  241. <tr>
  242. <td>模型id</td>
  243. <td>{{ pointList.BimId ? pointList.BimId : '暂无' }}</td>
  244. </tr>
  245. </tbody>
  246. </table>
  247. </div>
  248. <!-- 照片信息 -->
  249. <div class="locale_pic">
  250. <p>现场照片</p>
  251. <div v-if="pointList.ImageList">
  252. <!-- //图片排序 -->
  253. <ul>
  254. <li v-for="(item,index) in imgList.place" v-if="imgList.place.length" class="img_view">
  255. <img @click="seeBig(item.Key,item.Name,item.Type)"
  256. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  257. alt>
  258. <i class="iconfont icon-shuaxin icon" @click.stop="changeImage(index)"></i>
  259. </li>
  260. <li v-for="(item,index) in imgList.nameplate" v-if="imgList.nameplate.length" class="img_view">
  261. <img @click="seeBig(item.Key,item.Name,item.Type)"
  262. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  263. alt>
  264. <i class="iconfont icon-shuaxin icon" @click.stop="changeImage(index)"></i>
  265. </li>
  266. <li v-for="(item,index) in imgList.ahead" v-if="imgList.ahead.length" class="img_view">
  267. <img @click="seeBig(item.Key,item.Name,item.Type)"
  268. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  269. alt>
  270. <i class="iconfont icon-shuaxin icon" @click.stop="changeImage(index)"></i>
  271. </li>
  272. <li v-for="(item,index) in imgList.qrCodeLooger" v-if="imgList.qrCodeLooger.length"
  273. class="img_view">
  274. <img @click="seeBig(item.Key,item.Name,item.Type)"
  275. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  276. alt>
  277. <i class="iconfont icon-shuaxin icon" @click.stop="changeImage(index)"></i>
  278. </li>
  279. <li v-for="(item,index) in imgList.left" v-if="imgList.left.length" class="img_view">
  280. <img @click="seeBig(item.Key,item.Name,item.Type)"
  281. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  282. alt>
  283. <i class="iconfont icon-shuaxin icon" @click.stop="changeImage(index)"></i>
  284. </li>
  285. <li v-for="(item,index) in imgList.right" v-if="imgList.right.length" class="img_view">
  286. <img @click="seeBig(item.Key,item.Name,item.Type)"
  287. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  288. alt>
  289. <i class="iconfont icon-shuaxin icon" @click.stop="changeImage(index)"></i>
  290. </li>
  291. <li v-for="(item,index) in imgList.bottom" v-if="imgList.bottom.length" class="img_view">
  292. <img @click="seeBig(item.Key,item.Name,item.Type)"
  293. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  294. alt>
  295. <i class="iconfont icon-shuaxin icon" @click.stop="changeImage(index)"></i>
  296. </li>
  297. <li v-for="(item,index) in imgList.qrCode" v-if="imgList.qrCode.length" class="img_view">
  298. <img @click="seeBig(item.Key,item.Name,item.Type)"
  299. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  300. alt>
  301. <i class="iconfont icon-shuaxin icon" @click.stop="changeImage(index)"></i>
  302. </li>
  303. <li v-for="(item,index) in imgList.panorama" v-if="imgList.panorama.length" class="img_view">
  304. <img @click="seeBig(item.Key,item.Name,item.Type)"
  305. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  306. alt>
  307. <i class="iconfont icon-shuaxin icon" @click.stop="changeImage(index)"></i>
  308. </li>
  309. <li v-for="(item,index) in imgList.else" v-if="imgList.else.length && item.Type != 'image_video'"
  310. class="img_view">
  311. <img @click="seeBig(item.Key,item.Name,item.Type)"
  312. :src="'/image-service/common/image_get?systemId=dataPlatform&key='+ item.Key +'&width=200'"
  313. alt>
  314. <i class="iconfont icon-shuaxin icon" @click.stop="changeImage(index)"></i>
  315. </li>
  316. <li v-for="item in imgList.video" style="border: 1px solid #ccc;">
  317. <video style="width:100%;height:100%;"
  318. :src="'/image-service/common/file_get/'+ item.Key + '?systemId=dataPlatform'" controls
  319. :poster="'/image-service/common/image_get?systemId=dataPlatform&key='+ delVideo(item.Key) +'&width=200'"></video>
  320. </li>
  321. </ul>
  322. </div>
  323. <div v-else>暂无照片</div>
  324. </div>
  325. <div id="viewer"></div>
  326. </div>
  327. </div>
  328. </el-dialog>
  329. <!-- 删除提示 -->
  330. <el-dialog title="提示" :visible.sync="deldialog">
  331. <span>你确定删除该资产吗?</span>
  332. <span slot="footer" class="dialog-footer">
  333. <el-button @click="refresh">取 消</el-button>
  334. <el-button type="primary" @click="delTrue">确 定</el-button>
  335. </span>
  336. </el-dialog>
  337. <drag v-show="dragShow" @closeDrag="dragShow = false" :iframeSrc="dragSrc"></drag>
  338. </div>
  339. </div>
  340. <div class="right-main">
  341. <recommend ref="recommend" @loadData="loadData"></recommend>
  342. </div>
  343. </div>
  344. </template>
  345. <script>
  346. import buildTime from "@/components/data_admin/selectTime";
  347. import drag from "@/components/data_admin/drag";
  348. import Swiper from "swiper";
  349. import tools from "@/utils/scan/tools"
  350. import recommend from "@/components/data_admin/buildData/recommend-2";
  351. import showTools from "@/utils/handsontable/notShow"
  352. import text from "@/utils/handsontable/mainText"
  353. // import DragResize from '@/assets/js/resize'
  354. import "@/assets/js/chosen.jquery.min";
  355. import "@/assets/js/handsontable-chosen-editor";
  356. import handsonUtils from "@/utils/scan/hasontableUtils"
  357. import 'swiper/dist/css/swiper.min.css'
  358. import Handsontable from "handsontable-pro"
  359. import 'handsontable-pro/dist/handsontable.full.css'
  360. import zhCN from 'handsontable-pro/languages/zh-CN';
  361. //接口
  362. import {
  363. getPT, //根据时间、建筑名称、楼层查询点位标签
  364. getPoint, //获取点位标签详情
  365. updatePoint, //修改点位标签
  366. getTabFamily, //获取tab标签
  367. getTableHeader, //获取表格数据头部
  368. getTableMain, //获取表格主体内容
  369. upDateTableMain, //提交修改设备资产
  370. delErrAssets, //删除设备资产
  371. getdelMain, //获取过滤掉后的表格主体
  372. getBasicMatch, //获取完全匹配的厂商库id
  373. // buildingQuery, //数据中心-建筑查询
  374. // floorQuery, //数据中心-楼层查询
  375. queryLocationPoint, //数据中心-点位标签查询
  376. updateLocationPoint, //数据中心-更新点位标签
  377. getEquipBelongs, //数据中心-获取设备族
  378. queryProperty, //数据中心-资产查询
  379. deleteProperty, //数据中心-删除资产
  380. updateProperty, //数据中心-更新资产
  381. // getDataDictionary, //数据中心-查询表头
  382. queryPropertyTypeCount, //数据中心-资产分类及数量
  383. queryPropertyPoint, //数据中心-位置标签及对应资产数量
  384. } from "@/api/scan/request";
  385. import { getDataDictionary } from "@/api/dict";
  386. import { buildingQuery } from '@/api/object/build';
  387. import { floorQuery } from '@/api/object/floor';
  388. import { mapGetters, mapActions } from "vuex"
  389. export default {
  390. components: {
  391. buildTime,
  392. drag,
  393. recommend
  394. },
  395. data() {
  396. return {
  397. buildList: [],
  398. buildId: "",
  399. floorList: [],
  400. floorId: "",
  401. timeArr: ["一个月内", "一周内", "近三天", "昨天", "今天"],
  402. checkTimeArr: [],
  403. PTArr: [],
  404. value: "", //select的值
  405. swiper: "", //点位标签的swiper
  406. labelChecked: "请选择点位标签!", //按钮文案
  407. labelShow: true, //头部的点位标签的显示
  408. swiper2: "", //图片的swiper
  409. dialogTableVisible: false, //编辑点位标签弹窗显示
  410. dialogVisible: false, //请求错误弹窗
  411. ajaxMsg: "", //请求错误提示
  412. picShow: false, //最底层图片窗
  413. pointList: "", //点位标签详情数组
  414. pointId: "all", //点位标签详情查询需求的id
  415. checkPointClass: "all", //点击点位标签的当前标签
  416. pointCheck: "", //当前点击到的点位标签
  417. checked: 0, //审核标志
  418. facilityList: [], //设备list
  419. myHotArr: [], //Handsontable实例数组
  420. code: "", //被选中的设备族
  421. myHotHeaderArr: [], //表格实例的头部数组
  422. myHotMainArr: [], //表格实例的主体内容数组
  423. tabChecked: 0, //tab当前被选中的
  424. currentPageArr: [], //当前选中页数数组
  425. pageCount: [], //总共数据条数
  426. pageSizeArrs: [10, 30, 50, 100], //下拉页数个数
  427. pageSizeArr: [], //数组当前页个数
  428. currentPage: [], //当前页数
  429. loading: false, //loading动画
  430. deldialog: false, //删除提示
  431. delArr: [], //需要删除的Fmid
  432. tablePicArr: {
  433. Pic: []
  434. }, //底部pic的数组
  435. tabAvtive: "table0", //tab活跃页
  436. deepArr: [], //删除存储数组
  437. iframeSrc: "", //iframe的src
  438. iframeShow: false, //iframe的显示
  439. tableLoading: false, //table的loading
  440. AllFamily: [], //所有的Family
  441. filtersArr: [], //表格数据被过滤后的下标
  442. tablePicMsg: "", //设备照片提示语
  443. rowArr: "", //鼠标单击表格时的位置
  444. nameShow: false, //点位标签名的勾号是否显示
  445. noShow: false, //点位标签no是否显示
  446. imgList: [], //点位标签的图片数组
  447. floorName: "", //被选中的楼层名
  448. buildMsgShow: false, //提示显示与否
  449. buildMsg: false, //是否跳动
  450. picHeight: 180, //图片容器的高度
  451. dragShow: false, //拖拽容器的显示
  452. dragSrc: '', //拖拽元素的src
  453. infos: "", //点击时的信息
  454. };
  455. },
  456. created() {
  457. //默认时间赋值
  458. this.checkTimeArr = [
  459. this.getNowFormatDate(new Date().setHours(0, 0, 0, 0)),
  460. this.getNowFormatDate(new Date())
  461. ];
  462. // 获取建筑信息
  463. this.getBuilding();
  464. //获取所有所有的设备族
  465. this.getAllFamily();
  466. },
  467. computed: {
  468. ...mapGetters("layout", [
  469. "projectId",
  470. "userId",
  471. "secret"
  472. ])
  473. },
  474. methods: {
  475. //获取所有设备族
  476. getAllFamily() {
  477. let pa = {
  478. data: {
  479. orders: 'family asc',
  480. distinct: true,
  481. pageSize: 500,
  482. projection: ["family", "familyName"]
  483. }
  484. }
  485. getEquipBelongs(pa, res => {
  486. this.AllFamily = res.content.map(t => {
  487. return {
  488. Code: t.family,
  489. Name: t.familyName
  490. }
  491. })
  492. })
  493. },
  494. //重新获取数据loadhot
  495. loadData() {
  496. let param = {
  497. BeginTime: this.checkTimeArr[0],
  498. BuildId: this.buildId,
  499. Checked: this.checked,
  500. EndTime: this.checkTimeArr[1],
  501. Family: this.code,
  502. FloorId: this.floorId,
  503. PageNum: this.currentPage[this.tabChecked],
  504. PageSize: this.pageSizeArr[this.tabChecked],
  505. PointId: this.pointCheck,
  506. ProjId: this.projectId,
  507. UserId: this.userId
  508. };
  509. getdelMain(param).then(res => {
  510. if (res.data.Result == "success") {
  511. let data = res.data.FmList
  512. if (data && data.length) {
  513. //如果数据存在,有localname取localname,否则取随机生成name
  514. data = data.map(item => {
  515. item.Infos.EquipLocalName = item.Infos.EquipLocalName || item.Infos.EquipName
  516. return item
  517. })
  518. }
  519. this.myHotMainArr[this.tabChecked] = data;
  520. this.pageCount[this.tabChecked] = res.data.Count;
  521. let dom = this.myHotArr[this.tabChecked];
  522. //存储一个数组防止删除操作找寻不到删除的该数组
  523. this.tableLoading = false;
  524. this.deepArr = this.deepCopy(data);
  525. if (!!this.myHotArr[this.tabChecked]) {
  526. this.myHotArr[this.tabChecked].loadData(data)
  527. this.myHotMainArr[this.tabChecked] = data
  528. } else {
  529. this.createHot(
  530. this.tabChecked,
  531. data,
  532. this.myHotHeaderArr[this.tabChecked]
  533. );
  534. }
  535. this.loading = false
  536. } else {
  537. this.$message.error("请求错误:" + res.data.ResultMsg)
  538. }
  539. })
  540. // .catch(_ => {
  541. // this.$message.error("请求错误")
  542. // })
  543. },
  544. //删除图片
  545. delPic(index) {
  546. let param = {}
  547. if (!!this.tablePicArr && this.tablePicArr.Pic.length) {
  548. this.$confirm("<p>你确定删除此照片吗?</p><div style='height:200px;'><img style='display: block;margin: auto;' src='/image-service/common/image_get?systemId=dataPlatform&width=200&height=200&key=" + this.tablePicArr.Pic[index].key + "' /></div>",
  549. "删除图片", {
  550. dangerouslyUseHTMLString: true
  551. }).then(() => {
  552. if (this.tablePicArr.Pic[index].name == "铭牌照片") {
  553. this.delPicPost("Nameplate", this.tablePicArr.Pic[index].key)
  554. } else {
  555. this.delPicPost("Pic", this.tablePicArr.Pic[index].key)
  556. }
  557. }).catch(_ => {
  558. this.$message("取消删除")
  559. })
  560. } else {
  561. this.$message.error("请确定该资产有pic信息")
  562. }
  563. },
  564. delPicPost(name, key) {
  565. let myInfos = this.infos.Infos[name].map(item => {
  566. if (item.Key == key) {
  567. return undefined
  568. } else {
  569. return item
  570. }
  571. }).filter(b => b);
  572. let param = {}
  573. param.BuildId = this.infos.BuildId
  574. param.BuildName = this.infos.BuildName
  575. param.Checked = this.infos.Checked
  576. param.CodeType = this.infos.CodeType
  577. param.CreateTime = this.infos.CreateTime
  578. param.Family = this.infos.Family
  579. param.FamilyName = this.infos.FamilyName
  580. param.FloorId = this.infos.FloorId
  581. param.FmId = this.infos.FmId
  582. param.FmName = this.infos.FmName
  583. param.LastUpdate = this.infos.LastUpdate
  584. param.ProjId = this.infos.ProjId
  585. param.X = this.infos.X
  586. param.Y = this.infos.Y
  587. param.Infos = {}
  588. if (!!this.infos.Infos.Pic && this.infos.Infos.Pic.length) {
  589. param.Infos.Pic = tools.copyArr(this.infos.Infos.Pic)
  590. }
  591. if (!!this.infos.Infos.Nameplate && this.infos.Infos.Nameplate.length) {
  592. param.Infos.Nameplate = tools.copyArr(this.infos.Infos.Nameplate)
  593. }
  594. param.Infos[name] = myInfos
  595. let Pj = {
  596. ProjId: this.projectId,
  597. UserId: this.userId
  598. }
  599. upDateTableMain(Pj, [param]).then(res => {
  600. if (res.data.Result == "success") {
  601. if (!!param.Infos.Nameplate) {
  602. this.tablePicArr.Pic = param.Infos.Nameplate.concat(param.Infos.Pic)
  603. } else {
  604. this.tablePicArr.Pic = param.Infos.Pic
  605. }
  606. this.$message.success("删除成功")
  607. this.getTableMain()
  608. } else {
  609. this.$message.error("请求错误:" + res.data.ResultMsg)
  610. }
  611. }).catch(_ => {
  612. this.$message.error("请求错误")
  613. })
  614. },
  615. //图片div移动事件
  616. drag(el) {
  617. let picDiv = this.$refs["picview"];
  618. let startY = el.clientY;
  619. const _this = this;
  620. document.onmousemove = function (e) {
  621. e.preventDefault();
  622. let endY = e.clientY;
  623. _this.picHeight = _this.picHeight - endY + startY;
  624. if (_this.picHeight > 245) {
  625. _this.mouseUp()
  626. }
  627. startY = endY;
  628. };
  629. },
  630. //移动图片容器的时候鼠标up时触发重新渲染表格高度
  631. mouseUp(el) {
  632. document.onmousemove = null;
  633. if (this.myHotArr[this.tabChecked]) {
  634. let windowH = document.documentElement.clientHeight
  635. let headerH = this.$refs["header"].offsetHeight;
  636. let pointH = this.$refs["point"].offsetHeight;
  637. let operateH = this.$refs["operate"].offsetHeight;
  638. let picH = this.$refs["picview"].offsetHeight;
  639. let height = windowH - headerH - 48 - operateH - picH - 32 - 32 - 32;
  640. this.myHotArr[this.tabChecked].container.children[0].style.height = height + 'px'
  641. this.myHotArr[this.tabChecked].container.parentNode.style.height = height + 'px'
  642. }
  643. this.createPicSwiper();
  644. },
  645. //获取建筑列表
  646. getBuilding() {
  647. buildingQuery({}, res => {
  648. this.buildList = res.content;
  649. });
  650. },
  651. //获取点位标签详情
  652. getPointDetail() {
  653. let pa = {
  654. Filters: `Id='${this.pointId}'`
  655. }
  656. queryLocationPoint(pa, res => {
  657. this.pointList = res.Content[0];
  658. this.imgList = this.delImage(res.Content[0].ImageList || []);
  659. this.dialogTableVisible = true;
  660. })
  661. },
  662. delImage(imageList) {
  663. let list = {
  664. place: [],
  665. nameplate: [],
  666. ahead: [],
  667. qrCodeLooger: [],
  668. left: [],
  669. right: [],
  670. bottom: [],
  671. video: [],
  672. else: [],
  673. qrCode: [],
  674. panorama: []
  675. };
  676. let imgList = imageList;
  677. for (let i = 0; i < imgList.length; i++) {
  678. switch (imgList[i].name) {
  679. case "安装位置":
  680. list.place.push(imgList[i]);
  681. break;
  682. case "铭牌照片":
  683. list.nameplate.push(imgList[i]);
  684. break;
  685. case "设备正面照片":
  686. list.ahead.push(imgList[i]);
  687. break;
  688. case "带二维码的设备远景照片":
  689. list.qrCodeLooger.push(imgList[i]);
  690. break;
  691. case "设备左侧照片":
  692. list.left.push(imgList[i]);
  693. break;
  694. case "设备右侧照片":
  695. list.right.push(imgList[i]);
  696. break;
  697. case "设备背面照片":
  698. list.right.push(imgList[i]);
  699. break;
  700. case "带二维码的设备近景照片":
  701. list.qrCode.push(imgList[i]);
  702. break;
  703. case "视频":
  704. list.video.push(imgList[i]);
  705. break;
  706. case "全景照片":
  707. list.panorama.push(imgList[i]);
  708. break;
  709. default:
  710. list.else.push(imgList[i]);
  711. }
  712. }
  713. return list;
  714. },
  715. //保存点位标签详情的修改
  716. savePoint() {
  717. let pa = {
  718. Content: [this.pointList]
  719. }
  720. updateLocationPoint(pa, res => {
  721. this.$message.success('更新成功')
  722. })
  723. },
  724. //获取点位标签
  725. getPT() {
  726. let pa = {
  727. buildingId: this.buildId,
  728. endingTime: this.checkTimeArr[1],
  729. startTime: this.checkTimeArr[0]
  730. }
  731. if (this.floorId == 'all') {
  732. pa.floorId = `all`
  733. } else if (this.floorId != 'noKnow') {
  734. pa.floorId = this.floorId
  735. }
  736. queryPropertyPoint(pa, res => {
  737. this.PTArr = res.Content;
  738. this.labelShow = true;
  739. this.createPTSwiper();
  740. })
  741. },
  742. //获取楼层列表
  743. getFloorData() {
  744. let param = {
  745. filters: `buildingId='${this.buildId}'`,
  746. orders: 'floorSequenceId desc'
  747. };
  748. floorQuery(param, res => {
  749. this.floorList = res.content
  750. this.floorList.unshift({
  751. name: "全部",
  752. localName: "全部",
  753. id: "all"
  754. }, {
  755. name: "未明确楼层",
  756. localName: "未明确楼层",
  757. id: "noKnow"
  758. })
  759. });
  760. },
  761. //保存设备资产的更新
  762. upDateTableMain(paramList) {
  763. let param = {
  764. ProjId: this.projectId,
  765. UserId: this.userId
  766. };
  767. upDateTableMain(param, paramList).then(result => {
  768. if (result.data.Result == "success") {
  769. return;
  770. } else {
  771. this.dialogVisible = true;
  772. this.ajaxMsg = "保存出错";
  773. }
  774. });
  775. },
  776. //获取设备族列表
  777. getTabFamily() {
  778. let pa = {
  779. buildingId: this.buildId,
  780. checked: this.checked,
  781. endingTime: this.checkTimeArr[1],
  782. pointId: this.pointId,
  783. startTime: this.checkTimeArr[0]
  784. }
  785. if (this.floorId == 'noKnow') {
  786. pa.floorId = 'isNull'
  787. } else if (this.floorId != 'all') {
  788. pa.floorId = this.floorId
  789. }
  790. queryPropertyTypeCount(pa, res => {
  791. console.log('=================');
  792. console.log(res);
  793. this.myHotArr.length = this.myHotMainArr.length = this.pageCount.length = this.currentPageArr.length = this.pageSizeArr.length = this.currentPage.length = res.content.length;
  794. for (let i = 0; i < this.pageCount.length; i++) {
  795. this.pageCount[i] = 10;
  796. this.currentPageArr[i] = 1;
  797. this.pageSizeArr[i] = 10;
  798. this.currentPage[i] = 1;
  799. }
  800. if (this.facilityList.length == res.content.length) {
  801. this.facilityList = res.content;
  802. this.createHotBtn({
  803. index: this.tabAvtive.split("table")[1]
  804. });
  805. } else {
  806. this.facilityList = res.content;
  807. this.createHotBtn({
  808. index: 0
  809. });
  810. }
  811. })
  812. },
  813. //点击刷新图片
  814. refreshImg(index) {
  815. if (this.PTArr[index].Image.indexOf("time") != "-1") {
  816. let url = this.PTArr[index].Image.split("time");
  817. this.PTArr[index].Image = url[0] + "time=" + new Date().getTime();
  818. } else {
  819. this.PTArr[index].Image =
  820. this.PTArr[index].Image + "&time=" + new Date().getTime();
  821. }
  822. },
  823. //第一个输入框失去焦点
  824. nameNotShow() {
  825. let that = this;
  826. let timer = window.setTimeout(function () {
  827. that.nameShow = false;
  828. if (!that.nameShow) {
  829. window.clearTimeout(timer);
  830. }
  831. }, 1000);
  832. },
  833. //第二个输入框失去焦点
  834. noNotShow() {
  835. let that = this;
  836. let timer = window.setTimeout(function () {
  837. that.noShow = false;
  838. if (!that.noShow) {
  839. window.clearTimeout(timer);
  840. }
  841. }, 1000);
  842. },
  843. //修改底部图片url
  844. changeImgUrl(name, index) {
  845. let data = this.tablePicArr[name][index];
  846. if (data.key.indexOf("time") != "-1") {
  847. let url = data.key.split("time");
  848. data.key = url[0] + "time=" + new Date().getTime();
  849. } else {
  850. data.key = data.key + "&time=" + new Date().getTime();
  851. }
  852. },
  853. labelShowBtn() {
  854. this.labelShow = !this.labelShow;
  855. },
  856. //弹窗图片刷新
  857. changeImage(index) {
  858. let data = this.pointList.ImageList[index];
  859. if (data.key.indexOf("time") != "-1") {
  860. let url = data.key.split("time");
  861. data.key = url[0] + "time=" + new Date().getTime();
  862. } else {
  863. data.key = data.key + "&time=" + new Date().getTime();
  864. }
  865. },
  866. //图片加载失败替换url
  867. setErrorImg(e) {
  868. let el = e.path[0];
  869. el.style.cssText = "width:100%;height100%;display:block;";
  870. },
  871. //获取表格头部内容与下拉内容
  872. getTableHeader() {
  873. let param = {
  874. code: this.code,
  875. ProjId: this.projectId
  876. };
  877. if (!!this.code) {
  878. let pa = {
  879. type: this.code,
  880. orders: 'sort asc',
  881. pageSize: 500
  882. }
  883. getDataDictionary(pa, res => {
  884. this.myHotHeaderArr[this.tabChecked] = res.content;
  885. this.getTableMain();
  886. })
  887. }
  888. },
  889. //获取表格主体内容
  890. async getTableMain() {
  891. let pa = {
  892. pageNumber: this.currentPage[this.tabChecked],
  893. pageSize: this.pageSizeArr[this.tabChecked],
  894. filters: `createTime>='${this.checkTimeArr[0]}';createTime<='${this.checkTimeArr[1]}';buildingId='${this.buildId}';family='${this.code}'`
  895. }
  896. //;codeType in [ -1,-2,-3,0,2]
  897. // 添加建筑条件
  898. if (this.floorId == 'noKnow') {
  899. pa.filters += `;floorId isNull`
  900. } else if (this.floorId != 'all') {
  901. pa.filters += `;floorId='${this.floorId}'`
  902. }
  903. // 添加完成修订条件
  904. if (this.checked === 0) {
  905. pa.filters += `;checked=false or checked isNull`
  906. }
  907. // 添加标签条件
  908. if (!this.pointCheck) {
  909. pa.filters += `;pointId isNull`
  910. } else if (this.pointCheck != 'all') {
  911. pa.filters += `;pointId='${this.pointCheck}'`
  912. }
  913. queryProperty(pa, res => {
  914. let data = res.content
  915. this.myHotMainArr[this.tabChecked] = data;
  916. this.pageCount[this.tabChecked] = res.total;
  917. let dom = this.myHotArr[this.tabChecked];
  918. this.tableLoading = false;
  919. this.deepArr = this.deepCopy(data);
  920. if (!!this.myHotArr[this.tabChecked]) {
  921. this.myHotArr[this.tabChecked].loadData(data)
  922. this.myHotMainArr[this.tabChecked] = data
  923. } else {
  924. this.createHot(this.tabChecked, data, this.myHotHeaderArr[this.tabChecked]);
  925. }
  926. this.loading = false
  927. })
  928. },
  929. getTabsData2() {
  930. let param = {
  931. BeginTime: this.checkTimeArr[0],
  932. BuildId: this.buildId,
  933. Checked: this.checked,
  934. EndTime: this.checkTimeArr[1],
  935. Family: this.code,
  936. FloorId: this.floorId,
  937. PageNum: this.currentPage[this.tabChecked],
  938. PageSize: this.pageSizeArr[this.tabChecked],
  939. PointId: this.pointCheck,
  940. ProjId: this.projectId,
  941. UserId: this.userId
  942. }
  943. getdelMain(param).then(result => {
  944. this.buildMsgShow = false;
  945. if (result.data.Result == "success") {
  946. let data = result.data.FmList
  947. if (data && data.length) {
  948. //如果数据存在,有localname取localname,否则取随机生成name
  949. data = data.map(item => {
  950. item.Infos.EquipLocalName = item.Infos.EquipLocalName || item.Infos.EquipName
  951. return item
  952. })
  953. }
  954. this.myHotMainArr[this.tabChecked] = result.data.FmList;
  955. this.pageCount[this.tabChecked] = result.data.Count;
  956. let dom = this.myHotArr[this.tabChecked];
  957. //存储一个数组防止删除操作找寻不到删除的该数组
  958. this.tableLoading = false;
  959. this.deepArr = this.deepCopy(result.data.FmList);
  960. if (!result.data.Count) {
  961. // this.loading = false;
  962. // this.myHotArr[this.tabChecked].loadData(result.data.FmList);
  963. } else {
  964. this.$nextTick(() => {
  965. if (this.myHotArr[this.tabChecked] && this.myHotArr[this.tabChecked] != '') {
  966. this.myHotArr[this.tabChecked].destroy()
  967. }
  968. this.createHot(
  969. this.tabChecked,
  970. result.data.FmList,
  971. this.myHotHeaderArr[this.tabChecked]
  972. );
  973. });
  974. }
  975. this.loading = false;
  976. } else {
  977. // this.dialogVisible = true;
  978. // this.ajaxMsg = "请求出错";
  979. this.$message.error("请求出错")
  980. }
  981. });
  982. },
  983. download() {
  984. if (!!this.myHotArr[this.tabChecked]) {
  985. let fileName = ''
  986. this.buildList.map(item => {
  987. if (item.id == this.buildId) {
  988. fileName += item.localName
  989. }
  990. })
  991. this.floorList.map(item => {
  992. if (item.id == this.floorId) {
  993. fileName += '-' + item.localName
  994. }
  995. })
  996. this.facilityList.map((item, index) => {
  997. if (index == this.tabChecked) {
  998. fileName += '-' + item.familyName + item.count
  999. }
  1000. })
  1001. this.myHotArr[this.tabChecked].getPlugin('exportFile').downloadFile("csv", {
  1002. filename: fileName,
  1003. columnHeaders: true,
  1004. exportHiddenRows: true,
  1005. exportHiddenColumns: true,
  1006. rowHeaders: true
  1007. })
  1008. } else {
  1009. this.$message("请确定存在表格")
  1010. }
  1011. },
  1012. //删除资产
  1013. delErrAssets() {
  1014. let param = {
  1015. ProjId: this.projectId,
  1016. UserId: this.userId
  1017. };
  1018. let paramList = this.delArr;
  1019. delErrAssets(param, paramList).then(result => {
  1020. if (result.data.Result == "success") {
  1021. this.deldialog = false;
  1022. this.getTabFamily();
  1023. return;
  1024. } else {
  1025. this.$message.error("请求出错")
  1026. }
  1027. });
  1028. },
  1029. delVideo(key) {
  1030. return key
  1031. },
  1032. //修改撕码状态
  1033. changeAeestsCode() {
  1034. let param = {
  1035. ProjId: this.projectId,
  1036. UserId: this.userId
  1037. };
  1038. let paramList = this.delArr;
  1039. paramList.map(item => {
  1040. item.CodeType = 3
  1041. return item
  1042. })
  1043. upDateTableMain(param, paramList).then(result => {
  1044. if (result.data.Result == "success") {
  1045. this.deldialog = false;
  1046. this.getTabFamily();
  1047. return;
  1048. } else {
  1049. this.$message.error("请求出错")
  1050. }
  1051. });
  1052. },
  1053. //关闭点位标签详情
  1054. closeDialog() {
  1055. this.getPT();
  1056. },
  1057. //点击tab创建对应的表格
  1058. createHotBtn(tab) {
  1059. this.loading = true;
  1060. this.tabChecked = tab.index;
  1061. this.rowArr = "";
  1062. this.code = this.facilityList.length ? this.facilityList[tab.index].family : null;
  1063. this.getTableHeader();
  1064. },
  1065. //创建点位标签swiper
  1066. createPTSwiper() {
  1067. this.$nextTick(() => {
  1068. if (this.$refs['swiperPoint']) {
  1069. this.$refs['swiperPoint'].style.transform = ''
  1070. }
  1071. this.swiper = "";
  1072. this.swiper = new Swiper("#swiper", {
  1073. slidesPerView: 4,
  1074. spaceBetween: 30
  1075. });
  1076. });
  1077. },
  1078. //生成图片查看swiper
  1079. createPicSwiper() {
  1080. let sizeNum;
  1081. if (this.picHeight <= 200) {
  1082. sizeNum = 5;
  1083. } else if (this.picHeight < 400) {
  1084. sizeNum = 4;
  1085. } else if (this.picHeight < 600) {
  1086. sizeNum = 3;
  1087. } else {
  1088. sizeNum = 2;
  1089. }
  1090. this.$nextTick(() => {
  1091. this.swiper2 = new Swiper("#swiperPic", {
  1092. slidesPerView: sizeNum,
  1093. spaceBetween: 30
  1094. });
  1095. });
  1096. },
  1097. //点位标签详情中的enter事件
  1098. savePointChange() {
  1099. this.savePoint();
  1100. },
  1101. //点击点位标签整个swiper事件
  1102. checkPoint(val, id, name) {
  1103. name = name || "";
  1104. if (name == "") {
  1105. this.labelChecked = "请选择点位标签!";
  1106. } else if (name == "all") {
  1107. this.labelChecked = "全部";
  1108. } else {
  1109. this.labelChecked = name;
  1110. }
  1111. this.checkPointClass = val;
  1112. if (id) {
  1113. this.pointId = id;
  1114. } else {
  1115. this.pointId = "";
  1116. }
  1117. this.pointCheck = id;
  1118. this.changeChecked(0);
  1119. },
  1120. getTable(pointId, index) {
  1121. this.pointId = pointId;
  1122. // this.loading = true
  1123. this.getPointDetail();
  1124. },
  1125. //表格实例的单击事件
  1126. tableDown(el, rowArr) {
  1127. if (rowArr.row < 0) {
  1128. return
  1129. }
  1130. let filter = this.filtersArr[this.tabChecked];
  1131. //被筛选过后的数组
  1132. let trimmedArr = this.trimmedRows();
  1133. //是否启用了排序
  1134. let isSort = this.myHotArr[this.tabChecked].getPlugin("columnSorting").isSorted();
  1135. if (trimmedArr.length && isSort) {
  1136. let sortArr = this.myHotArr[this.tabChecked].getPlugin("columnSorting")
  1137. .rowsMapper.__arrayMap;
  1138. let infos = this.myHotMainArr[this.tabChecked][
  1139. trimmedArr[sortArr[rowArr.row]]
  1140. ];
  1141. this.getInfors(infos, rowArr);
  1142. } else if (isSort) {
  1143. //排序后的数组
  1144. let sortArr = this.myHotArr[this.tabChecked].getPlugin("columnSorting")
  1145. .rowsMapper.__arrayMap;
  1146. let infos = this.myHotMainArr[this.tabChecked][sortArr[rowArr.row]];
  1147. this.getInfors(infos, rowArr);
  1148. } else if (trimmedArr.length) {
  1149. let infos = this.myHotMainArr[this.tabChecked][trimmedArr[rowArr.row]];
  1150. this.getInfors(infos, rowArr);
  1151. } else {
  1152. let infos = this.myHotMainArr[this.tabChecked][rowArr.row];
  1153. this.getInfors(infos, rowArr);
  1154. }
  1155. },
  1156. getInfors(data, rowArr, falg = false) {
  1157. let val = this.myHotArr[this.tabChecked].getActiveEditor().prop;
  1158. this.$refs.recommend.randerData(data, val, this.myHotHeaderArr[this.tabChecked])
  1159. if (data.LedgerParam.PhotoDoc && (data.LedgerParam.PhotoDoc.Pic || data.LedgerParam.PhotoDoc.Nameplate)) {
  1160. if (data.LedgerParam.PhotoDoc.Nameplate) {
  1161. this.tablePicArr.Pic = data.LedgerParam.PhotoDoc.Nameplate.concat(data.LedgerParam.PhotoDoc.Pic) || [];
  1162. } else {
  1163. this.tablePicArr.Pic = data.LedgerParam.PhotoDoc.Pic || [];
  1164. }
  1165. } else {
  1166. this.tablePicArr.Pic = [];
  1167. }
  1168. if (this.tablePicArr.Pic && this.tablePicArr.Pic.length) {
  1169. this.dragSrc =
  1170. process.env.BASE_URL + ":8890/photo-View.html?type=" +
  1171. // process.env.BASE_URL + "/photo-View.html?type=" +
  1172. // "http://172.16.0.181:8890/photo-View.html?type=" +
  1173. this.tablePicArr.Pic[0].type +
  1174. "&key=" +
  1175. this.tablePicArr.Pic[0].key +
  1176. "&name=" +
  1177. this.tablePicArr.Pic[0].name;
  1178. }
  1179. this.infos = tools.deepClone(data)
  1180. this.tablePicMsg = "该设备照片为空";
  1181. this.picShow = true;
  1182. this.createPicSwiper();
  1183. this.rowArr = rowArr;
  1184. },
  1185. //下层的弹窗不显示
  1186. picNoShow() {
  1187. this.picShow = false;
  1188. },
  1189. //修改楼层
  1190. changeFloor() {
  1191. this.checkPointClass = -1;
  1192. for (let i = 0; i < this.floorList.length; i++) {
  1193. if (this.floorId == this.floorList[i].id) {
  1194. this.floorName = this.floorList[i].localName;
  1195. }
  1196. }
  1197. this.getPT();
  1198. this.checkPoint("all", this.pointId);
  1199. },
  1200. //切换时间事件
  1201. checkTime(val) {
  1202. this.checkTimeArr = val;
  1203. this.getPT();
  1204. this.checkPoint("all", this.pointId);
  1205. this.refresh();
  1206. },
  1207. //swiper点击label切换按钮事件
  1208. turn(val) {
  1209. if (val) {
  1210. this.swiper.slideNext();
  1211. } else {
  1212. this.swiper.slidePrev();
  1213. }
  1214. },
  1215. //swiper切换照片按钮事件
  1216. turnPic(val) {
  1217. if (val) {
  1218. this.swiper2.slideNext();
  1219. } else {
  1220. this.swiper2.slidePrev();
  1221. }
  1222. },
  1223. //头部建筑名称切换事件
  1224. changeBuild() {
  1225. this.getFloorData();
  1226. },
  1227. //获取现在的时间
  1228. getNowFormatDate(str) {
  1229. var date = new Date(str);
  1230. var seperator1 = "-";
  1231. var seperator2 = ":";
  1232. var month = date.getMonth() + 1;
  1233. var strDate = date.getDate();
  1234. if (month >= 1 && month <= 9) {
  1235. month = "0" + month;
  1236. }
  1237. if (strDate >= 0 && strDate <= 9) {
  1238. strDate = "0" + strDate;
  1239. }
  1240. var currentdate =
  1241. date.getFullYear() +
  1242. seperator1 +
  1243. month +
  1244. seperator1 +
  1245. strDate +
  1246. " " +
  1247. date.getHours() +
  1248. seperator2 +
  1249. date.getMinutes() +
  1250. seperator2 +
  1251. date.getSeconds();
  1252. return currentdate;
  1253. },
  1254. //点击图片查看大图
  1255. seeBig(key, name, type) {
  1256. this.dragSrc =
  1257. process.env.BASE_URL + ":8890/photo-View.html?type=" +
  1258. // process.env.BASE_URL + "/photo-View.html?type=" +
  1259. type +
  1260. "&key=" +
  1261. key +
  1262. "&name=" +
  1263. name;
  1264. this.dragShow = true
  1265. },
  1266. //改变页条数
  1267. handleSizeChange(val) {
  1268. this.tableLoading = true;
  1269. this.pageSizeArr[this.tabChecked] = val;
  1270. this.clearHot();
  1271. this.getTableMain();
  1272. },
  1273. //改变当前页
  1274. handleCurrentChange(val) {
  1275. this.tableLoading = true;
  1276. this.currentPageArr[this.tabChecked] = val;
  1277. this.clearHot();
  1278. this.getTableMain();
  1279. },
  1280. //改变checked,全部未完成修订
  1281. changeChecked(val) {
  1282. this.checked = val;
  1283. this.tabChecked = 0;
  1284. this.tabAvtive = "table0";
  1285. this.clearHot();
  1286. this.getTabFamily();
  1287. // this.createHotBtn({index:0})
  1288. },
  1289. //当表格中的内容被修改
  1290. tdChange(changeData, source) {
  1291. // 修改了的数据
  1292. let filter = this.filtersArr[this.tabChecked];
  1293. if (changeData) {
  1294. let trimmedArr = this.trimmedRows();
  1295. let param = handsonUtils.getParam(changeData, source, this.myHotArr[this.tabChecked], trimmedArr);
  1296. let data = [];
  1297. //获取第一个点击的数组
  1298. let firstObj = handsonUtils.getUnshiftParam(changeData, source, this.myHotArr[this.tabChecked], trimmedArr);
  1299. for (let i = 0; i < param.length; i++) {
  1300. data.push(param[i]);
  1301. }
  1302. //如果data中包含/且data长度为1,将其转换成.
  1303. if (changeData.length == 1 && changeData[0][1].indexOf("/") > 0) {
  1304. changeData[0][1] = changeData[0][1].split("/").join(".")
  1305. }
  1306. //存在data进行修改请求
  1307. if (data && data.length) {
  1308. this.updateBusiness(data, changeData, firstObj);
  1309. }
  1310. }
  1311. },
  1312. //修改请求
  1313. updateBusiness(data, change, obj) {
  1314. let pa = {
  1315. Content: data
  1316. }
  1317. updateProperty(pa, res => {
  1318. this.getTabFamily();
  1319. })
  1320. },
  1321. //判断文案是否相同
  1322. async getIdForVender(param) {
  1323. return await getBasicMatch(param).then(res => {
  1324. if (res.data.result == "success") {
  1325. return res.data.content
  1326. } else {
  1327. this.$message.error("请求错误" + res.data.resultMsg)
  1328. }
  1329. }).catch(error => {
  1330. this.$message.error(error)
  1331. })
  1332. },
  1333. getParam(changeData, source) {
  1334. let param = "";
  1335. //被筛选过后的数组
  1336. let trimmedArr = this.trimmedRows();
  1337. //是否启用了排序
  1338. let isSort = this.myHotArr[this.tabChecked]
  1339. .getPlugin("columnSorting")
  1340. .isSorted();
  1341. if (trimmedArr.length && isSort) {
  1342. //排序后的数组
  1343. let sortArr = this.myHotArr[this.tabChecked].getPlugin(
  1344. "columnSorting"
  1345. ).rowsMapper.__arrayMap;
  1346. param = changeData.map(item => {
  1347. return this.myHotArr[this.tabChecked].getSourceDataAtRow(
  1348. trimmedArr[sortArr[item[0]]]
  1349. );
  1350. });
  1351. } else if (isSort) {
  1352. //排序后的数组
  1353. let sortArr = this.myHotArr[this.tabChecked].getPlugin(
  1354. "columnSorting"
  1355. ).rowsMapper.__arrayMap;
  1356. param = changeData.map(item => {
  1357. return this.myHotArr[this.tabChecked].getSourceDataAtRow(
  1358. sortArr[item[0]]
  1359. );
  1360. });
  1361. } else if (trimmedArr.length) {
  1362. param = changeData.map(item => {
  1363. return this.myHotArr[this.tabChecked].getSourceDataAtRow(
  1364. trimmedArr[item[0]]
  1365. );
  1366. });
  1367. } else {
  1368. param = changeData.map(item => {
  1369. return this.myHotArr[this.tabChecked].getSourceDataAtRow(item[0]);
  1370. });
  1371. }
  1372. return param
  1373. },
  1374. //处理右键删除
  1375. romoveFm(index, amout) {
  1376. let delData = tools.differenceArr(this.myHotMainArr[this.tabChecked], this.deepArr)
  1377. this.$confirm('确认删除?')
  1378. .then(_ => {
  1379. let param = {
  1380. ProjId: this.projectId,
  1381. UserId: this.userId
  1382. };
  1383. let paramList = delData.map(item => {
  1384. item.CodeType = 3
  1385. return item
  1386. })
  1387. upDateTableMain(param, paramList).then(result => {
  1388. if (result.data.Result == "success") {
  1389. this.deldialog = false;
  1390. this.getTabFamily();
  1391. return;
  1392. } else {
  1393. this.dialogVisible = true;
  1394. this.ajaxMsg = "请求出错";
  1395. }
  1396. });
  1397. })
  1398. .catch(_ => {
  1399. this.$message("取消删除")
  1400. });
  1401. },
  1402. // 刷新当前表格
  1403. refresh() {
  1404. this.deldialog = false;
  1405. this.loading = true;
  1406. if (this.myHotArr[this.tabChecked]) {
  1407. this.myHotArr[this.tabChecked].destroy();
  1408. }
  1409. this.myHotArr[this.tabChecked] = "";
  1410. this.getTableMain();
  1411. },
  1412. //确定要删除
  1413. delTrue() {
  1414. //删除
  1415. // this.delErrAssets();
  1416. //撕码
  1417. this.changeAeestsCode()
  1418. },
  1419. //撤回操作
  1420. undo() {
  1421. this.myHotArr[this.tabChecked].undo();
  1422. },
  1423. //创建表格实例
  1424. createHot(variableNum, data, headerArr) {
  1425. if (!headerArr) {
  1426. return
  1427. }
  1428. let maxRow = "";
  1429. //当当前页数*当前页个数小于总个数时,当前表格行数为当前页数
  1430. if (
  1431. this.pageCount[this.tabChecked] >=
  1432. this.pageSizeArr[this.tabChecked] * this.currentPage[this.tabChecked]
  1433. ) {
  1434. maxRow = this.pageSizeArr[this.tabChecked];
  1435. } else {
  1436. maxRow =
  1437. this.pageCount[this.tabChecked] % this.pageSizeArr[this.tabChecked];
  1438. }
  1439. let containter = document.getElementById("table" + variableNum);
  1440. let height = 0;
  1441. let winHeight = document.documentElement.clientHeight;
  1442. let headerH = this.$refs["header"].offsetHeight;
  1443. let pointH = this.$refs["point"].offsetHeight;
  1444. let operateH = this.$refs["operate"].offsetHeight;
  1445. let picH = this.$refs["picview"].offsetHeight;
  1446. height = winHeight - headerH - 48 - operateH - picH - 32 - 32 - 32 - 155;
  1447. let headers = this.delHeader(headerArr)
  1448. let customBorders = data.map((item, index) => {
  1449. //铭牌识别标志
  1450. if (item.Nametemplate == 1) {
  1451. return {
  1452. range: {
  1453. from: {
  1454. row: index,
  1455. col: 0
  1456. },
  1457. to: {
  1458. row: index,
  1459. col: headers.length
  1460. }
  1461. },
  1462. left: {
  1463. width: 2,
  1464. color: "red"
  1465. },
  1466. right: {
  1467. width: 2,
  1468. color: "red"
  1469. },
  1470. top: {
  1471. width: 2,
  1472. color: "red"
  1473. },
  1474. bottom: {
  1475. width: 2,
  1476. color: "red"
  1477. }
  1478. }
  1479. } else {
  1480. return undefined
  1481. }
  1482. }).filter(d => d)
  1483. let options = {
  1484. data: data,
  1485. colHeaders: headers,
  1486. manualColumnResize: true,
  1487. manualColumnMove: true,
  1488. maxRows: maxRow,
  1489. height: height,
  1490. columnSorting: true, //添加排序
  1491. sortIndicator: true, //添加排序
  1492. renderAllRows: true,
  1493. autoColumnSize: true,
  1494. fixedColumnsLeft: 5,
  1495. language: "zh-CN",
  1496. contextMenu: {
  1497. items: {
  1498. remove_row: {
  1499. name: "删除资产"
  1500. }
  1501. }
  1502. },
  1503. // customBorders: customBorders,
  1504. columns: this.getType(headerArr),
  1505. afterOnCellMouseDown: this.tableDown, //鼠标单击
  1506. afterChange: this.tdChange, //修改后
  1507. afterRemoveRow: this.romoveFm, //右键删除
  1508. dropdownMenu: [
  1509. "filter_by_condition",
  1510. "filter_by_value",
  1511. "filter_action_bar"
  1512. ],
  1513. filters: true,
  1514. afterFilter: this.trimmedRows,
  1515. afterDocumentKeyDown: this.afterDocumentKeyDown
  1516. };
  1517. console.log(options, variableNum)
  1518. this.myHotArr[variableNum] = new Handsontable(containter, options);
  1519. //存在点击tab后分页不正确的问题,使用0转换
  1520. this.tabChecked = 0;
  1521. this.tabChecked = variableNum;
  1522. let pro = document.getElementById("hot-display-license-info");
  1523. pro.parentNode.removeChild(pro);
  1524. },
  1525. afterDocumentKeyDown(e) {
  1526. // this.$nextTick(() => {
  1527. let activeEditer = this.myHotArr[this.tabChecked].getActiveEditor(), td, row, prop,
  1528. val = e.realTarget.value,
  1529. infoArr = ["Brand", "Specification", "Manufacturer", "Supplier", "Maintainer", "Insurer", "SupplierContactor", "SupplierPhone", "SupplierEmail", "SupplierWeb", "SupplierFax", "MaintainerContactor", "MaintainerPhone", "MaintainerEmail", "MaintainerWeb", "MaintainerFax", "InsurerContactor", "InsurerPhone", "InsurerEmail", "InsurerWeb", "InsurerFax"];
  1530. if (activeEditer) {
  1531. td = activeEditer.TD
  1532. row = activeEditer.row
  1533. prop = activeEditer.prop
  1534. } else {
  1535. return false
  1536. }
  1537. let filter = this.filtersArr[this.tabChecked];
  1538. // console.log(activeEditer, val, document.getElementsByClassName("handsontableInput")[0].value)
  1539. //被筛选过后的数组
  1540. if (e.which == 8) {
  1541. console.log("val", val)
  1542. val = val.substring(0, val.length - 1)
  1543. console.log("val1", val)
  1544. }
  1545. let trimmedArr = this.trimmedRows();
  1546. //是否启用了排序
  1547. let isSort = this.myHotArr[this.tabChecked]
  1548. .getPlugin("columnSorting")
  1549. .isSorted();
  1550. let infos = "";
  1551. // if (infoArr.indexOf(prop.split('.')[1]) < 0) {
  1552. // return false
  1553. // }
  1554. if (trimmedArr.length && isSort) {
  1555. let sortArr = this.myHotArr[this.tabChecked].getPlugin("columnSorting")
  1556. .rowsMapper.__arrayMap;
  1557. infos = this.myHotMainArr[this.tabChecked][
  1558. trimmedArr[sortArr[row]]
  1559. ];
  1560. } else if (isSort) {
  1561. //排序后的数组
  1562. let sortArr = this.myHotArr[this.tabChecked].getPlugin("columnSorting")
  1563. .rowsMapper.__arrayMap;
  1564. infos = this.myHotMainArr[this.tabChecked][sortArr[row]];
  1565. } else if (trimmedArr.length) {
  1566. infos = this.myHotMainArr[this.tabChecked][trimmedArr[row]];
  1567. } else {
  1568. infos = this.myHotMainArr[this.tabChecked][row];
  1569. }
  1570. if (this.$refs.recommend) {
  1571. this.$refs.recommend.randerData(infos, prop, this.myHotHeaderArr[this.tabChecked], true, val)
  1572. }
  1573. // })
  1574. },
  1575. //获取被筛选掉的行号
  1576. trimmedRows() {
  1577. // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
  1578. var plugin = this.myHotArr[this.tabChecked].getPlugin("trimRows")
  1579. .trimmedRows;
  1580. let dataLength = this.pageSizeArr[this.tabChecked];
  1581. let dataArr = new Array();
  1582. for (let i = 0; i < dataLength; i++) {
  1583. dataArr.push(i);
  1584. }
  1585. if (plugin.length <= 0) {
  1586. dataArr = undefined;
  1587. } else {
  1588. dataArr = this.array_diff(dataArr, plugin);
  1589. }
  1590. this.filtersArr[this.tabChecked] = dataArr;
  1591. return dataArr || [];
  1592. // var DataArray = new Array();
  1593. // for (var i = 0; i < plugin.length; i++) {
  1594. // // 通过行号获取数据
  1595. // DataArray.push(this.myHotArr[this.tabChecked].getSourceDataAtRow(plugin[i]));
  1596. // }
  1597. },
  1598. //去除数组中相同的元素
  1599. array_diff(a, b) {
  1600. for (var i = 0; i < b.length; i++) {
  1601. for (var j = 0; j < a.length; j++) {
  1602. if (a[j] == b[i]) {
  1603. a.splice(j, 1);
  1604. j = j - 1;
  1605. }
  1606. }
  1607. }
  1608. return a;
  1609. },
  1610. //清空所有实例
  1611. clearHot() {
  1612. this.myHotArr = this.myHotArr.map(item => {
  1613. if (item) {
  1614. return item.destroy();
  1615. } else {
  1616. return;
  1617. }
  1618. });
  1619. },
  1620. //处理头部header方法
  1621. delHeader(arr) {
  1622. let data = showTools.headerTextFilter(arr, 'property', false, 'Visible')
  1623. data.unshift("标记", "点位标签", "设备族");
  1624. return data;
  1625. },
  1626. //通过header生成columns
  1627. getType(arr) {
  1628. let data = showTools.headerTypeFilter(arr, 'property', false, 'Visible')
  1629. data.unshift({
  1630. type: "checkbox",
  1631. checkedTemplate: true,
  1632. uncheckedTemplate: false,
  1633. data: "Checked",
  1634. label: {
  1635. position: "after",
  1636. value: "完成修订"
  1637. }
  1638. }, {
  1639. data: "PointName",
  1640. readOnly: true
  1641. }, {
  1642. editor: "chosen",
  1643. data: "Family",
  1644. renderer: tools.customDropdownRenderer,
  1645. chosenOptions: {
  1646. data: this.AllFamily
  1647. }
  1648. });
  1649. data = data.filter(item => item)
  1650. return data;
  1651. },
  1652. //工具函数浅复制深拷贝,防止共用存储空间
  1653. deepCopy(obj) {
  1654. var out = [],
  1655. i = 0,
  1656. len = obj.length;
  1657. for (; i < len; i++) {
  1658. if (obj[i] instanceof Array) {
  1659. out[i] = deepcopy(obj[i]);
  1660. } else out[i] = obj[i];
  1661. }
  1662. return out;
  1663. }
  1664. },
  1665. watch: {
  1666. projectId() {
  1667. //默认时间赋值
  1668. this.checkTimeArr = [
  1669. this.getNowFormatDate(new Date().setHours(0, 0, 0, 0)),
  1670. this.getNowFormatDate(new Date())
  1671. ];
  1672. this.buildId = ""
  1673. this.floorId = ""
  1674. this.buildList = []
  1675. this.floorList = []
  1676. this.tabAvtive = "table0"
  1677. this.labelChecked = "请选择点位标签!"
  1678. // 获取建筑信息
  1679. this.getBuilding();
  1680. //获取所有所有的设备族
  1681. this.getAllFamily();
  1682. this.checked = 0
  1683. }
  1684. }
  1685. };
  1686. </script>
  1687. <style lang="scss" scoped>
  1688. .page-content {
  1689. position: relative;
  1690. }
  1691. @import "../../../components/data_admin/buildData/style.scss";
  1692. </style>
  1693. <style lang="scss" scoped>
  1694. #buildData {
  1695. .el-tabs__header {
  1696. width: 100%;
  1697. }
  1698. .el-dialog {
  1699. width: 900px;
  1700. height: auto;
  1701. }
  1702. .center {
  1703. text-align: center;
  1704. }
  1705. .el-radio-button__inner {
  1706. width: 90px;
  1707. }
  1708. .build_label {
  1709. .label_view {
  1710. padding: 0 4rem;
  1711. box-sizing: border-box;
  1712. }
  1713. }
  1714. .build_pic {
  1715. .turn_right {
  1716. right: 0;
  1717. }
  1718. }
  1719. }
  1720. .content_box {
  1721. max-height: 440px;
  1722. overflow-y: auto;
  1723. }
  1724. </style>