parkShow.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-blue" :isBack="true" backUrl="/pages/map/mapVisualization-th">
  4. <block slot="backText">返回</block>
  5. <block slot="content">{{parkName}}</block>
  6. </cu-custom>
  7. <view class="cu-bar bg-white solid-bottom">
  8. <view class="action">
  9. <text class="cuIcon-titles text-blue"></text> 园区信息
  10. </view>
  11. </view>
  12. <view class="cu-card case" >
  13. <view class="cu-item shadow" style="margin: 10px;">
  14. <view class="image">
  15. <image :src="parkImage" mode="widthFix"></image>
  16. </view>
  17. <view class="cu-list menu" style="padding: 0px 5px 0px 0px;">
  18. <view class="cu-item cu-item-custom">
  19. <view class="content">
  20. <text class="cuIcon-right text-black"></text>
  21. <text class="text-black">厂房面积:</text>
  22. <text class="text-black">5000㎡</text>
  23. </view>
  24. </view>
  25. <view class="cu-item cu-item-custom">
  26. <view class="content">
  27. <text class="cuIcon-right text-black"></text>
  28. <text class="text-black">入驻企业:</text>
  29. <text class="text-black">28家</text>
  30. </view>
  31. </view>
  32. <view class="cu-item cu-item-custom">
  33. <button class="cu-btn content " open-type="contact">
  34. <text class="cuIcon-right text-black"></text>
  35. <text class="text-black">招商面积:</text>
  36. <text class="text-black">3500</text>
  37. </button>
  38. </view>
  39. <view class="cu-item cu-item-custom">
  40. <button class="cu-btn content " open-type="contact">
  41. <text class="cuIcon-right text-black"></text>
  42. <text class="text-black">厂房数:</text>
  43. <text class="text-black">5</text>
  44. </button>
  45. </view>
  46. <view class="cu-item cu-item-custom">
  47. <button class="cu-btn content " open-type="contact">
  48. <text class="cuIcon-right text-black"></text>
  49. <text class="text-black">距离高铁站:</text>
  50. <text class="text-black">10km</text>
  51. </button>
  52. </view>
  53. <view class="cu-item cu-item-custom">
  54. <button class="cu-btn content " open-type="contact">
  55. <text class="cuIcon-right text-black"></text>
  56. <text class="text-black">距离机场:</text>
  57. <text class="text-black">35km</text>
  58. </button>
  59. </view>
  60. <view class="cu-item cu-item-custom">
  61. <button class="cu-btn content " open-type="contact">
  62. <text class="cuIcon-right text-black"></text>
  63. <text class="text-black">负责人:</text>
  64. <text class="text-black">17830240934</text>
  65. </button>
  66. </view>
  67. <view class="cu-item cu-item-custom">
  68. <button class="cu-btn content " open-type="contact" style="width: 100%;">
  69. <text class="cuIcon-right text-black"></text>
  70. <text class="text-black" style="white-space: nowrap;">周边配套:</text>
  71. <text class="text-black cu-ellipsis">
  72. 污水处理设、绿化设施、环保设施、环保设施、环保设施、环保设施、环保设施
  73. </text>
  74. </button>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="cu-bar bg-white solid-bottom">
  80. <view class="action">
  81. <text class="cuIcon-titles text-blue"></text> 厂房列表
  82. </view>
  83. </view>
  84. <view class="cu-card article">
  85. <!-- <view class="cu-item shadow"> -->
  86. <view style="border-radius: 5px; margin: 10px; display: block; background-color: #ffffff;">
  87. <view class="cu-list menu-avatar" style="border-radius: 5px;">
  88. <view class="cu-item" @click="plantClick('1')">
  89. <view class="cu-avatar round lg" style="line-height: 49px;">一</view>
  90. <!-- <view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg);"></view> -->
  91. <view class="content">
  92. <view class="text-black">厂房一</view>
  93. <view class="text-gray text-sm flex">
  94. <view class="text-cut">
  95. 层高:10米&nbsp;&nbsp;&nbsp;面积:8000㎡
  96. </view> </view>
  97. </view>
  98. </view>
  99. <view class="cu-item" @click="plantClick('2')">
  100. <view class="cu-avatar round lg" style="line-height: 49px;">二</view>
  101. <!-- <view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/img/champion/Taric.png);"></view> -->
  102. <view class="content">
  103. <view class="text-black">厂房二</view>
  104. <view class="text-gray text-sm flex">
  105. <view class="text-cut">
  106. 层高:8米&nbsp;&nbsp;&nbsp;面积:6500㎡
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. <view class="cu-item" @click="plantClick('3')">
  112. <view class="cu-avatar round lg" style="line-height: 49px;">三</view>
  113. <!-- <view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/img/champion/Taric.png);"></view> -->
  114. <view class="content">
  115. <view class="text-black">厂房三</view>
  116. <view class="text-gray text-sm flex">
  117. <view class="text-cut">
  118. 层高:12米&nbsp;&nbsp;&nbsp;面积:7500㎡
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. <view class="cu-item" @click="plantClick('4')">
  124. <view class="cu-avatar round lg" style="line-height: 49px;">四</view>
  125. <!-- <view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/img/champion/Taric.png);"></view> -->
  126. <view class="content">
  127. <view class="text-black">厂房四</view>
  128. <view class="text-gray text-sm flex">
  129. <view class="text-cut">
  130. 层高:6米&nbsp;&nbsp;&nbsp;面积:2500㎡
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. <view class="cu-item" @click="plantClick('5')">
  136. <view class="cu-avatar round lg" style="line-height: 49px;">五</view>
  137. <!-- <view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/img/champion/Taric.png);"></view> -->
  138. <view class="content">
  139. <view class="text-black">厂房五</view>
  140. <view class="text-gray text-sm flex">
  141. <view class="text-cut">
  142. 层高:8米&nbsp;&nbsp;&nbsp;面积:3000㎡
  143. </view>
  144. </view>
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. <!-- </view> -->
  150. </view>
  151. </view>
  152. </template>
  153. import { size } from 'lodash';
  154. <script>
  155. import mapVisualizationService from '@/api/map/mapVisualization'
  156. export default {
  157. data() {
  158. return {
  159. parkId: '',
  160. parkName: '',
  161. parkImage: '',
  162. companyName: '',
  163. StatusBar: this.StatusBar,
  164. CustomBar: this.CustomBar,
  165. scrollHeight: this.CustomBar + 55,
  166. hidden: true,
  167. listCurID: '',
  168. companyList: [],
  169. listCur: '',
  170. };
  171. },
  172. onLoad(options) {
  173. console.log(options, '=================>options')
  174. if (options.parkId) {
  175. this.parkId = options.parkId;
  176. this.parkName = options.parkName;
  177. this.parkImage = options.parkImage;
  178. // this.getCompanyList()
  179. }
  180. },
  181. mounted() {
  182. },
  183. onReady() {
  184. // let that = this;
  185. // uni.createSelectorQuery().select('.indexBar-box').boundingClientRect(function(res) {
  186. // that.boxTop = res.top
  187. // }).exec();
  188. // uni.createSelectorQuery().select('.indexes').boundingClientRect(function(res) {
  189. // that.barTop = res.top
  190. // }).exec()
  191. },
  192. methods: {
  193. plantClick(plantId){
  194. console.log( plantId );
  195. uni.navigateTo({
  196. url: '/pages/cfInfo/cfInfo'
  197. });
  198. },
  199. gotoBuildInfo(id) {
  200. uni.navigateTo({
  201. url: `/pages/comEdit/comEdit?id=${id}&ischeck=1`
  202. })
  203. },
  204. getCompanyList() {
  205. uni.showLoading()
  206. mapVisualizationService.getCompanyList({"parkId": this.parkId, "companyName": this.companyName}).then(({
  207. data
  208. }) => {
  209. console.log( data );
  210. this.companyList = data
  211. uni.hideLoading()
  212. }).catch((e) => {
  213. uni.hideLoading()
  214. })
  215. },
  216. buildingSearch() {
  217. console.log( this.companyName );
  218. this.getCompanyList()
  219. },
  220. //获取文字信息
  221. getCur(e) {
  222. this.hidden = false;
  223. this.listCur = this.companyList[e.target.id].name;
  224. },
  225. setCur(e) {
  226. this.hidden = true;
  227. this.listCur = this.listCur
  228. },
  229. //滑动选择Item
  230. tMove(e) {
  231. let y = e.touches[0].clientY,
  232. offsettop = this.boxTop,
  233. that = this;
  234. //判断选择区域,只有在选择区才会生效
  235. if (y > offsettop) {
  236. let num = parseInt((y - offsettop) / 20);
  237. this.listCur = that.companyList[num].name
  238. };
  239. },
  240. //触发全部开始选择
  241. tStart() {
  242. this.hidden = false
  243. },
  244. //触发结束选择
  245. tEnd() {
  246. this.hidden = true;
  247. this.listCurID = this.listCur
  248. },
  249. // indexSelect(e) {
  250. // let that = this;
  251. // let barHeight = this.barHeight;
  252. // let list = this.list;
  253. // let scrollY = Math.ceil(list.length * e.detail.y / barHeight);
  254. // for (let i = 0; i < list.length; i++) {
  255. // if (scrollY < i + 1) {
  256. // that.listCur = list[i].name;
  257. // that.movableY = i * 20
  258. // return false
  259. // }
  260. // }
  261. // }
  262. }
  263. }
  264. </script>
  265. <style>
  266. /* page {
  267. padding-top: 100upx;
  268. } */
  269. .empty-state {
  270. text-align: center;
  271. font-size: 20px;
  272. padding: 20px;
  273. color: #a0a0a0
  274. }
  275. .indexes {
  276. position: relative;
  277. }
  278. .indexBar {
  279. position: fixed;
  280. right: 0px;
  281. bottom: 0px;
  282. padding: 20upx 20upx 20upx 60upx;
  283. display: flex;
  284. align-items: center;
  285. }
  286. .indexBar .indexBar-box {
  287. width: 40upx;
  288. height: auto;
  289. background: #fff;
  290. display: flex;
  291. flex-direction: column;
  292. box-shadow: 0 0 20upx rgba(0, 0, 0, 0.1);
  293. border-radius: 10upx;
  294. }
  295. .indexBar-item {
  296. flex: 1;
  297. width: 40upx;
  298. height: 40upx;
  299. display: flex;
  300. align-items: center;
  301. justify-content: center;
  302. font-size: 24upx;
  303. color: #888;
  304. }
  305. movable-view.indexBar-item {
  306. width: 40upx;
  307. height: 40upx;
  308. z-index: 9;
  309. position: relative;
  310. }
  311. movable-view.indexBar-item::before {
  312. content: "";
  313. display: block;
  314. position: absolute;
  315. left: 0;
  316. top: 10upx;
  317. height: 20upx;
  318. width: 4upx;
  319. background-color: #f37b1d;
  320. }
  321. .indexToast {
  322. position: fixed;
  323. top: 0;
  324. right: 80upx;
  325. bottom: 0;
  326. background: rgba(0, 0, 0, 0.5);
  327. width: 100upx;
  328. height: 100upx;
  329. border-radius: 10upx;
  330. margin: auto;
  331. color: #fff;
  332. line-height: 100upx;
  333. text-align: center;
  334. font-size: 48upx;
  335. }
  336. .cu-item-custom {
  337. min-height: 45px !important;
  338. }
  339. .cu-ellipsis {
  340. width: calc(100% - 105px);
  341. white-space: nowrap; /* 防止文本换行 */
  342. overflow: hidden; /* 隐藏溢出的文本 */
  343. text-overflow: ellipsis; /* 显示省略号 */
  344. }
  345. </style>