buildListcf.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-blue" :isBack="true" backUrl="/pages/indexcf/indexcf">
  4. <block slot="content">楼宇列表</block>
  5. </cu-custom>
  6. <view :style="[{top:CustomBar + 'px'}]">
  7. <view class="search-box">
  8. <view class="choose-box">
  9. <jp-picker v-model="parkId" rangeKey="label" rangeValue="value" :range="parkList" empty="选择园区">
  10. </jp-picker>
  11. </view>
  12. <view class="input-box">
  13. <input type="text" placeholder="请输入楼宇名称" v-model="curWord" confirm-type="search"></input>
  14. </view>
  15. <text class="cuIcon-search color-white" @click="doSearch"></text>
  16. </view>
  17. <view>
  18. <view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''"
  19. v-for="(item, index) in buildList" :key="index">
  20. <view class="item-box" @click="gotoBuildInfo(item.id)">
  21. <view class="item-title">
  22. <view>
  23. <text class="line-zs"></text>{{item.buildingName}}(<text
  24. class="subtitle">{{item.parkName}}</text>)
  25. </view>
  26. </view>
  27. <view class="item-line">
  28. <view class="item-name">楼宇总面积:</view>
  29. <view class="item-content">{{item.buildingArea}}㎡</view>
  30. </view>
  31. <view class="item-line">
  32. <view class="item-name">楼宇企业数:</view>
  33. <view class="item-content">{{item.reserve3}}</view>
  34. </view>
  35. <view class="item-line">
  36. <view class="item-name">楼宇联系人:</view>
  37. <view class="item-content">{{item.buildingContacts.substring(0,5)}}({{item.reserve2}})
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <view style="height: 20rpx;"></view>
  45. </view>
  46. </template>
  47. <script>
  48. import loginService from '@/api/auth/loginService.js'
  49. export default {
  50. onShow(option) {},
  51. components: {},
  52. data() {
  53. return {
  54. searchForm: {},
  55. curWord: "", //当前搜索关键词
  56. dataList: [], // 数据列表
  57. buildList: [{
  58. "id": "23082c03aeb4464ea1b4577125a56767",
  59. "createDate": "2024-12-17 17:52:47",
  60. "createBy": "1506167921787850753",
  61. "updateDate": "2024-12-19 11:39:38",
  62. "updateBy": "1",
  63. "delFlag": 0,
  64. "parkManagementId": "c8c61706e1e3430ca4fdd8413e7b6704",
  65. "parkName": "人工智能港",
  66. "buildingName": "B3",
  67. "buildingLongitude": "120.11693",
  68. "buildingLatitude": "33.328376",
  69. "buildingContacts": "吉祥",
  70. "buildingDescribe": "",
  71. "buildingNum": "8",
  72. "buildingArea": "8081",
  73. "buildingIndustry": "",
  74. "placeSelectName": "盐城市/盐都区",
  75. "place": "320900/320903/320903004",
  76. "street": "1",
  77. "placeDetailed": "",
  78. "placeSelectType3": "320900",
  79. "placeSelectType4": "320903",
  80. "placeSelectType5": "320903004",
  81. "picture": "",
  82. "notes": "",
  83. "reserve2": "13813223933",
  84. "reserve3": "0",
  85. "reserve4": "1",
  86. "reserve9": "00003"
  87. }, {
  88. "id": "5a8400338b834360a8e029f8bc73f0d4",
  89. "createDate": "2024-12-17 17:51:02",
  90. "createBy": "1506167921787850753",
  91. "updateDate": "2024-12-17 17:51:02",
  92. "updateBy": "1506167921787850753",
  93. "delFlag": 0,
  94. "parkManagementId": "c8c61706e1e3430ca4fdd8413e7b6704",
  95. "parkName": "人工智能港",
  96. "buildingName": "B1",
  97. "buildingLongitude": "120.118174",
  98. "buildingLatitude": "33.328787",
  99. "buildingContacts": "葛金霞",
  100. "buildingDescribe": "",
  101. "buildingNum": "28",
  102. "buildingArea": "58077",
  103. "buildingIndustry": "",
  104. "placeSelectName": "盐城市/盐都区",
  105. "place": "320900/320903/320903004",
  106. "street": "1",
  107. "placeDetailed": "",
  108. "placeSelectType3": "320900",
  109. "placeSelectType4": "320903",
  110. "placeSelectType5": "320903004",
  111. "picture": "",
  112. "notes": "",
  113. "reserve2": "18752233653",
  114. "reserve3": "0",
  115. "reserve4": "1",
  116. "reserve9": "00001"
  117. }, {
  118. "id": "6a87501c27c44b83875c7ef65702247b",
  119. "createDate": "2024-12-17 11:36:10",
  120. "createBy": "1506167921787850753",
  121. "updateDate": "2024-12-17 17:03:18",
  122. "updateBy": "1506167921787850753",
  123. "delFlag": 0,
  124. "parkManagementId": "c8c61706e1e3430ca4fdd8413e7b6704",
  125. "parkName": "人工智能港",
  126. "buildingName": "B6",
  127. "buildingLongitude": "120.114055",
  128. "buildingLatitude": "33.327644",
  129. "buildingContacts": "徐玲玲",
  130. "buildingDescribe": "特种领域机器人项目,重点开展机器人成品、终端、配套零部件等的研发、生产、测试",
  131. "buildingNum": "",
  132. "buildingArea": "23946",
  133. "buildingIndustry": "人工智能",
  134. "placeSelectName": "盐城市/盐都区",
  135. "place": "320900/320903/320903004",
  136. "street": "1",
  137. "placeDetailed": "",
  138. "placeSelectType3": "320900",
  139. "placeSelectType4": "320903",
  140. "placeSelectType5": "320903004",
  141. "picture": "",
  142. "notes": "",
  143. "reserve2": "15161991110",
  144. "reserve3": "4",
  145. "reserve4": "3",
  146. "reserve9": "00006"
  147. }, {
  148. "id": "92456d83820b4def9a327380479d2e79",
  149. "createDate": "2024-12-17 17:06:00",
  150. "createBy": "1506167921787850753",
  151. "updateDate": "2024-12-17 17:06:34",
  152. "updateBy": "1506167921787850753",
  153. "delFlag": 0,
  154. "parkManagementId": "c8c61706e1e3430ca4fdd8413e7b6704",
  155. "parkName": "人工智能港",
  156. "buildingName": "B7",
  157. "buildingLongitude": "120.113098",
  158. "buildingLatitude": "33.328809",
  159. "buildingContacts": "朱海扬",
  160. "buildingDescribe": "",
  161. "buildingNum": "8",
  162. "buildingArea": "10771",
  163. "buildingIndustry": "智能穿戴、智能驾驶以及低空经济",
  164. "placeSelectName": "盐城市/盐都区",
  165. "place": "320900/320903/320903004",
  166. "street": "1",
  167. "placeDetailed": "",
  168. "placeSelectType3": "320900",
  169. "placeSelectType4": "320903",
  170. "placeSelectType5": "320903004",
  171. "picture": "",
  172. "notes": "",
  173. "reserve2": "18551557883",
  174. "reserve3": "0",
  175. "reserve4": "2",
  176. "reserve9": "00007"
  177. }, {
  178. "id": "9530e29bb7b54a62b5aaafd4293c0426",
  179. "createDate": "2024-12-17 17:51:50",
  180. "createBy": "1506167921787850753",
  181. "updateDate": "2024-12-19 11:25:02",
  182. "updateBy": "1506167921787850753",
  183. "delFlag": 0,
  184. "parkManagementId": "c8c61706e1e3430ca4fdd8413e7b6704",
  185. "parkName": "人工智能港",
  186. "buildingName": "B2",
  187. "buildingLongitude": "120.117518",
  188. "buildingLatitude": "33.328421",
  189. "buildingContacts": "王坚",
  190. "buildingDescribe": "",
  191. "buildingNum": "8",
  192. "buildingArea": "8760",
  193. "buildingIndustry": "",
  194. "placeSelectName": "盐城市/盐都区",
  195. "place": "320900/320903/320903004",
  196. "street": "1",
  197. "placeDetailed": "",
  198. "placeSelectType3": "320900",
  199. "placeSelectType4": "320903",
  200. "placeSelectType5": "320903004",
  201. "picture": "",
  202. "notes": "",
  203. "reserve2": "18752225310",
  204. "reserve3": "0",
  205. "reserve4": "1",
  206. "reserve9": "00002"
  207. }, {
  208. "id": "988c362fbcc943bab5fe0b2eded42b7e",
  209. "createDate": "2024-11-11 11:42:41",
  210. "createBy": "1",
  211. "updateDate": "2024-12-17 17:04:20",
  212. "updateBy": "1506167921787850753",
  213. "delFlag": 0,
  214. "parkManagementId": "c8c61706e1e3430ca4fdd8413e7b6704",
  215. "parkName": "人工智能港",
  216. "buildingName": "B10",
  217. "buildingLongitude": "120.112258",
  218. "buildingLatitude": "33.330872",
  219. "buildingContacts": "程岑",
  220. "buildingDescribe": "",
  221. "buildingNum": "8",
  222. "buildingArea": "10771",
  223. "buildingIndustry": "专业生物科技楼宇",
  224. "placeSelectName": "盐城市/盐都区",
  225. "place": "320900/320903/320903004",
  226. "street": "1",
  227. "placeDetailed": "",
  228. "placeSelectType3": "320900",
  229. "placeSelectType4": "320903",
  230. "placeSelectType5": "320903004",
  231. "picture": "",
  232. "notes": "",
  233. "reserve2": "18551041889",
  234. "reserve3": "4",
  235. "reserve4": "3",
  236. "reserve9": "00010"
  237. }, {
  238. "id": "a006ed5dec5b458780605774d89ac190",
  239. "createDate": "2024-11-11 11:43:22",
  240. "createBy": "1",
  241. "updateDate": "2024-12-17 17:03:06",
  242. "updateBy": "1506167921787850753",
  243. "delFlag": 0,
  244. "parkManagementId": "c8c61706e1e3430ca4fdd8413e7b6704",
  245. "parkName": "人工智能港",
  246. "buildingName": "B5",
  247. "buildingLongitude": "120.115007",
  248. "buildingLatitude": "33.327686",
  249. "buildingContacts": "虎翅云工厂盐城数字中心胡生",
  250. "buildingDescribe": "",
  251. "buildingNum": "8",
  252. "buildingArea": "8760",
  253. "buildingIndustry": "打造人工智能技术应用中心,不仅要有孵化的功能,也要呈现出从产品到商品的过程,要在探索应用上做努力",
  254. "placeSelectName": "盐城市/盐都区",
  255. "place": "320900/320903/320903004",
  256. "street": "1",
  257. "placeDetailed": "",
  258. "placeSelectType3": "320900",
  259. "placeSelectType4": "320903",
  260. "placeSelectType5": "320903004",
  261. "picture": "",
  262. "notes": "",
  263. "reserve2": "18021471090",
  264. "reserve3": "9",
  265. "reserve4": "3",
  266. "reserve9": "00005"
  267. }, {
  268. "id": "bda3cf0285964785adb49036f8144842",
  269. "createDate": "2024-11-11 11:44:07",
  270. "createBy": "1",
  271. "updateDate": "2024-12-19 11:24:33",
  272. "updateBy": "1506167921787850753",
  273. "delFlag": 0,
  274. "parkManagementId": "c8c61706e1e3430ca4fdd8413e7b6704",
  275. "parkName": "人工智能港",
  276. "buildingName": "B9",
  277. "buildingLongitude": "120.112546",
  278. "buildingLatitude": "33.330212",
  279. "buildingContacts": "朱敏",
  280. "buildingDescribe": "",
  281. "buildingNum": "8",
  282. "buildingArea": "10771",
  283. "buildingIndustry": "工业数字经济",
  284. "placeSelectName": "盐城市/盐都区",
  285. "place": "320900/320903/320903004",
  286. "street": "1",
  287. "placeDetailed": "",
  288. "placeSelectType3": "320900",
  289. "placeSelectType4": "320903",
  290. "placeSelectType5": "320903004",
  291. "picture": "",
  292. "notes": "",
  293. "reserve2": "18861985358",
  294. "reserve3": "22",
  295. "reserve4": "3",
  296. "reserve9": "00009"
  297. }, {
  298. "id": "fbb6ca3417804c4db5a5b635103a4a2c",
  299. "createDate": "2024-11-11 11:42:57",
  300. "createBy": "1",
  301. "updateDate": "2024-12-19 11:24:42",
  302. "updateBy": "1506167921787850753",
  303. "delFlag": 0,
  304. "parkManagementId": "c8c61706e1e3430ca4fdd8413e7b6704",
  305. "parkName": "人工智能港",
  306. "buildingName": "B4",
  307. "buildingLongitude": "120.115636",
  308. "buildingLatitude": "33.327882",
  309. "buildingContacts": "启迪信通-滕鹏飞",
  310. "buildingDescribe": "",
  311. "buildingNum": "8",
  312. "buildingArea": "8800",
  313. "buildingIndustry": "人工智能方向的孵化功能",
  314. "placeSelectName": "盐城市/盐都区",
  315. "place": "320900/320903/320903004",
  316. "street": "1",
  317. "placeDetailed": "",
  318. "placeSelectType3": "320900",
  319. "placeSelectType4": "320903",
  320. "placeSelectType5": "320903004",
  321. "picture": "",
  322. "notes": "",
  323. "reserve2": "18921876099",
  324. "reserve3": "46",
  325. "reserve4": "3",
  326. "reserve9": "00004"
  327. }, {
  328. "id": "fee838a5d36243f08bf45cbf2709e0b9",
  329. "createDate": "2024-11-11 11:43:36",
  330. "createBy": "1",
  331. "updateDate": "2024-12-17 17:03:51",
  332. "updateBy": "1506167921787850753",
  333. "delFlag": 0,
  334. "parkManagementId": "c8c61706e1e3430ca4fdd8413e7b6704",
  335. "parkName": "人工智能港",
  336. "buildingName": "B8",
  337. "buildingLongitude": "120.112815",
  338. "buildingLatitude": "33.329514",
  339. "buildingContacts": "徐大勇",
  340. "buildingDescribe": "",
  341. "buildingNum": "8",
  342. "buildingArea": "10771",
  343. "buildingIndustry": "元宇宙产业",
  344. "placeSelectName": "盐城市/盐都区",
  345. "place": "320900/320903/320903004",
  346. "street": "1",
  347. "placeDetailed": "",
  348. "placeSelectType3": "320900",
  349. "placeSelectType4": "320903",
  350. "placeSelectType5": "320903004",
  351. "picture": "",
  352. "notes": "",
  353. "reserve2": "13375250860",
  354. "reserve3": "33",
  355. "reserve4": "3",
  356. "reserve9": "00008"
  357. }],
  358. modalName: null,
  359. tablePage: {
  360. total: 0,
  361. currentPage: 1,
  362. pageSize: 10,
  363. orders: []
  364. },
  365. loading: false,
  366. parkList: [],
  367. parkId: '',
  368. stype: '', // 企业 => 3 楼宇 => 2 园区 => 1 zfadmin => 4 admin=> 5
  369. }
  370. },
  371. created() {
  372. },
  373. methods: {
  374. // 新增
  375. add() {
  376. uni.navigateTo({
  377. url: '/pages/buildEdit/buildEdit'
  378. })
  379. },
  380. getParkList() {
  381. loginService.parkList({
  382. current: 1,
  383. size: 1000000,
  384. }).then(({
  385. data
  386. }) => {
  387. this.parkList = data.records.map((item) => {
  388. return {
  389. label: item.parkName,
  390. value: item.id
  391. }
  392. })
  393. console.log(this.parkList, '=============>')
  394. }).catch(e => {
  395. console.log(e)
  396. })
  397. },
  398. // 修改
  399. edit(id) {
  400. uni.navigateTo({
  401. url: '/pages/buildEdit/buildEdit?id=' + id
  402. })
  403. },
  404. gotoBuildInfo(id) {
  405. uni.navigateTo({
  406. url: `/pages/buildEditcf/buildEditcf?id=${id}&ischeck=1`
  407. })
  408. },
  409. // 删除
  410. del(id) {
  411. uni.showModal({
  412. title: '提示',
  413. content: '您确认要删除数据吗',
  414. showCancel: true,
  415. success: (res) => {
  416. if (res.confirm) {
  417. loginService.delete(id).then(({
  418. data
  419. }) => {
  420. uni.showToast({
  421. title: data,
  422. icon: "success"
  423. })
  424. this.doSearch()
  425. })
  426. }
  427. }
  428. });
  429. },
  430. /*获取数据列表 */
  431. upCallback(page) {
  432. this.loading = true
  433. loginService.list({
  434. current: page.num,
  435. size: page.size,
  436. buildingName: this.curWord,
  437. }).then(({
  438. data
  439. }) => {
  440. let curPageData = data.records
  441. this.mescroll.endBySize(curPageData.length, data.total);
  442. //如果是第一页需手动制空列表
  443. if (page.num == 1) {
  444. this.dataList = [];
  445. }
  446. //追加新数据
  447. this.dataList = this.dataList.concat(curPageData);
  448. }).catch(e => {
  449. //联网失败, 结束加载
  450. this.mescroll.endErr();
  451. })
  452. },
  453. // 输入监听
  454. inputWord(e) {
  455. },
  456. // 搜索
  457. doSearch(word) {
  458. this.dataList = []; // 先清空列表,显示加载进度
  459. this.mescroll.resetUpScroll();
  460. },
  461. // ListTouch触摸开始
  462. ListTouchStart(e) {
  463. this.listTouchStart = e.touches[0].pageX
  464. },
  465. // ListTouch计算方向
  466. ListTouchMove(e) {
  467. this.listTouchDirection = e.touches[0].pageX - this.listTouchStart > -60 ? 'right' : 'left'
  468. },
  469. // ListTouch计算滚动
  470. ListTouchEnd(e) {
  471. if (this.listTouchDirection == 'left') {
  472. this.modalName = e.currentTarget.dataset.target
  473. } else {
  474. this.modalName = null
  475. }
  476. this.listTouchDirection = null
  477. }
  478. }
  479. }
  480. </script>
  481. <style>
  482. .ellipsis-description {
  483. font-size: 12px;
  484. line-height: $line-height-base;
  485. display: -webkit-box;
  486. /*作为弹性伸缩盒子模型显示*/
  487. -webkit-line-clamp: 1;
  488. /*显示的行数;如果要设置2行加...则设置为2*/
  489. overflow: hidden;
  490. /*超出的文本隐藏*/
  491. text-overflow: ellipsis;
  492. /* 溢出用省略号*/
  493. -webkit-box-orient: vertical;
  494. /*伸缩盒子的子元素排列:从上到下*/
  495. }
  496. .item-box {
  497. width: 710rpx;
  498. margin-left: 20rpx;
  499. background: #FFFFFF;
  500. box-shadow: 0px 1px 3px 0px rgba(9, 2, 4, 0.1);
  501. border-radius: 10px;
  502. padding-top: 20rpx;
  503. padding-left: 38rpx;
  504. padding-right: 10rpx;
  505. margin-top: 20rpx;
  506. }
  507. .item-title {
  508. position: relative;
  509. display: flex;
  510. justify-content: space-between;
  511. font-size: 30rpx;
  512. color: #333;
  513. font-weight: bold;
  514. align-items: center;
  515. }
  516. .item-line {
  517. display: flex;
  518. height: 48rpx;
  519. margin-top: 20rpx;
  520. }
  521. .subtitle {
  522. color: #E5880E;
  523. }
  524. .item-name {
  525. font-size: 30rpx;
  526. color: #333;
  527. }
  528. .item-content {
  529. color: #1497EF;
  530. font-size: 30rpx;
  531. }
  532. .btn-box {
  533. display: flex;
  534. }
  535. .line-zs {
  536. width: 2rpx;
  537. height: 30rpx;
  538. background: #36A7F3;
  539. }
  540. .edit-botton {
  541. width: 100rpx;
  542. height: 48rpx;
  543. line-height: 48rpx;
  544. color: #fff;
  545. font-size: 28rpx;
  546. margin-right: 20rpx;
  547. border-radius: 10rpx;
  548. background: #5A9EE9;
  549. text-align: center;
  550. }
  551. .del-botton {
  552. width: 100rpx;
  553. height: 48rpx;
  554. line-height: 48rpx;
  555. color: #fff;
  556. font-size: 28rpx;
  557. margin-right: 20rpx;
  558. border-radius: 10rpx;
  559. background: #F27C85;
  560. text-align: center;
  561. }
  562. .color-white {
  563. color: #fff;
  564. font-size: 40rpx;
  565. line-height: 60rpx;
  566. }
  567. .search-box {
  568. background: #36A7F3;
  569. display: flex;
  570. padding-left: 20rpx;
  571. padding-right: 20rpx;
  572. padding-bottom: 10rpx;
  573. }
  574. .input-box {
  575. margin-left: 20rpx;
  576. background: #fff;
  577. height: 60rpx;
  578. width: 420rpx;
  579. display: flex;
  580. align-items: center;
  581. border-radius: 30rpx;
  582. padding-left: 10rpx;
  583. margin-right: 20rpx;
  584. }
  585. .choose-box {
  586. background: #fff;
  587. width: 200rpx;
  588. border-radius: 30rpx;
  589. height: 60rpx;
  590. display: flex;
  591. align-items: center;
  592. justify-content: center;
  593. }
  594. .cu-bar .search-form {
  595. background-color: white;
  596. }
  597. </style>