buildList3.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841
  1. <template >
  2. <view>
  3. <view :class="['custom-header', { 'is-back': isBack }, bgColor]">
  4. <view class="back-container" @click="handleBack">
  5. <view class="back-text">返回</view>
  6. </view>
  7. <view class="content-container">
  8. <view class="content-text">{{title}}</view>
  9. </view>
  10. </view>
  11. <swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="3000" :duration="800">
  12. <swiper-item v-for="(item, index) in picture2" :key="index">
  13. <image :src="item" class="swiper-item"></image>
  14. </swiper-item>
  15. </swiper>
  16. <view class="line-box">
  17. <view :style="[{top:CustomBar + 'px'}]">
  18. <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" :up="upOption" @up="upCallback">
  19. <view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''"
  20. v-for="(item, index) in dataList" :key="index" @touchstart="ListTouchStart"
  21. @touchmove="ListTouchMove" @touchend="ListTouchEnd" :data-target="'move-box-' + index">
  22. <view class="item-box" @click="gotoBuildInfo(item.id)">
  23. <view class="item-title">
  24. <view>
  25. {{item.name}}
  26. </view>
  27. </view>
  28. <view class="item-line">
  29. <view v-if="item.bz3!=''&&item.bz3!=undefined" class="item-name">{{item.bz1}}、{{item.bz3}}</view>
  30. <view v-if="item.bz3==''||item.bz3==undefined" class="item-name">{{item.bz1}}</view>
  31. </view>
  32. <view class="item-line">
  33. <view class="item-name2">{{item.industry}}</view>
  34. <view class="item-name3">{{item.des1}}</view>
  35. </view>
  36. </view>
  37. </view>
  38. </mescroll-body>
  39. <uni-fab :pattern=" {
  40. color: '#7A7E83',
  41. backgroundColor: '#fff',
  42. selectedColor: '#007AFF',
  43. buttonColor: '#007AFF'
  44. }" horizontal="right" vertical="bottom" @fabClick="add" v-if="stype == 5"></uni-fab>
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import loginService from "@/api/auth/loginService";
  51. import uniFab from '@/components/uni-fab/uni-fab.vue';
  52. import DoublePicker from '@/components/DoublePicker/DoublePicker.vue'
  53. import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
  54. import MescrollMoreItemMixin from "@/components/mescroll-uni/mixins/mescroll-more-item.js";
  55. import {mapActions} from 'vuex'
  56. export default {
  57. mixins: [MescrollMixin, MescrollMoreItemMixin], // 使用mixin (在main.js注册全局组件)
  58. name: "apps",
  59. components: {
  60. uniFab,
  61. DoublePicker
  62. },
  63. data() {
  64. return {
  65. isBack: true, // 是否显示返回按钮
  66. backText: '返回', // 返回按钮的文本
  67. bgColor: 'bg-blue', // 背景颜色
  68. title: '',
  69. picture2:["https://miniapp.huidutech.com.cn/yd_qycpfbH5/bg1.jpg",
  70. "https://miniapp.huidutech.com.cn/yd_qycpfbH5/bg2.jpg",
  71. "https://miniapp.huidutech.com.cn/yd_qycpfbH5/bg3.jpg",
  72. "https://miniapp.huidutech.com.cn/yd_qycpfbH5/bg4.jpg"],
  73. isLogin:"",
  74. pageInfo: {},
  75. loginid:"",
  76. stype: "", // 企业 => 3 楼宇 => 2 园区 => 1 zfadmin => 4 admin=> 5
  77. searchForm: {
  78. des1:"",
  79. industry:"",
  80. name:"",
  81. des7:"",
  82. des8:"",
  83. },
  84. curWord: "", //当前搜索关键词
  85. dataList: [], // 数据列表
  86. modalName: null,
  87. tablePage: {
  88. total: 0,
  89. currentPage: 1,
  90. pageSize: 10,
  91. orders: []
  92. },
  93. loading: false,
  94. parkId: '',
  95. parkList: [],
  96. parkList2: [],
  97. parkList3: [],
  98. parkList4: [],
  99. ddd1:"" ,
  100. };
  101. },
  102. onLoad(query) {
  103. if(query!=undefined&&query!=null&&query!=''){
  104. if(query.loginid!=undefined){
  105. this.loginid=query.loginid
  106. this.autoLogin();
  107. }
  108. if (query && query.w=='1' ) {
  109. this.title="当日活跃企业";
  110. this.curWord="1";
  111. console.log('1111')
  112. }else if(query && query.w=='2'){
  113. this.title="当月活跃企业";
  114. this.curWord="2";
  115. }
  116. }
  117. },
  118. onShow() {
  119. this.isLogin=this.$auth.checkisLogin();
  120. },
  121. created() {
  122. },
  123. methods: {
  124. ...mapActions(['refreshUserInfo']),
  125. /*获取数据列表 */
  126. upCallback(page) {
  127. console.log(this.curWord)
  128. this.loading = true
  129. loginService.Loginlist({
  130. current: page.num,
  131. size: page.size,
  132. name: this.curWord,
  133. orders: [{ column: 'a.create_date', asc: false }]
  134. }).then(({
  135. data
  136. }) => {
  137. for(var i = 0; i < data.records.length; i++){
  138. if(data.records[i].lyname=='管理员'){
  139. data.records[i].name='管理员'
  140. data.records[i].industry='暂无'
  141. }else if(data.records[i].lyname=='政府管理员'){
  142. data.records[i].name='政府管理员'
  143. data.records[i].industry='暂无'
  144. }else if(data.records[i].lyname=='盐都领导'){
  145. data.records[i].name='盐都领导'
  146. data.records[i].industry='暂无'
  147. }else if(data.records[i].lyname=='盐都领导2'){
  148. data.records[i].name='盐都领导2'
  149. data.records[i].industry='暂无'
  150. }
  151. }
  152. let curPageData = data.records
  153. this.mescroll.endBySize(curPageData.length, data.total);
  154. //如果是第一页需手动制空列表
  155. if (page.num == 1)
  156. this.dataList = [];
  157. //追加新数据
  158. this.dataList = this.dataList.concat(curPageData);
  159. }).catch(e => {
  160. //联网失败, 结束加载
  161. this.mescroll.endErr();
  162. })
  163. },
  164. gotoBuildInfo(id) {
  165. // uni.navigateTo({
  166. // url: `/pages/comEdit/comEdit?id=${id}&ischeck=1`
  167. // })
  168. console.log(id);
  169. if(id==undefined){
  170. uni.showModal({
  171. title: '管理员账号无企业详情!',
  172. showCancel: true,
  173. success: (res) => {
  174. }
  175. });
  176. }else{
  177. window.location.href=`/yd_qycpfbH5/#/pages/comEdit/comEdit?id=${id}&ischeck=1`
  178. }
  179. },
  180. updateCities(newCities) {
  181. this.cities = newCities;
  182. },
  183. // 搜索
  184. doSearch() {
  185. if(this.ddd1.column2!=''&&this.ddd1!=''){
  186. this.searchForm.bz2=this.ddd1.column1+'('+this.ddd1.column2+')';
  187. }else if(this.ddd1!=''){
  188. this.searchForm.bz2=this.ddd1.column1;
  189. }
  190. this.dataList = []; // 先清空列表,显示加载进度
  191. this.mescroll.resetUpScroll();
  192. },
  193. totongxunlu(){
  194. uni.navigateTo({
  195. url: '/pages/comList/comList'
  196. })
  197. },
  198. totongxunlu2(){
  199. uni.showModal({
  200. title: '功能暂未开放,请至后台导入!',
  201. showCancel: true,
  202. success: (res) => {
  203. }
  204. });
  205. },
  206. getPageInfo() {
  207. loginService.InfoStatistics({}).then(({ data }) => {
  208. this.pageInfo = data;
  209. });
  210. },
  211. autoLogin(){
  212. console.log("登录id"+this.loginid);
  213. loginService.loginid( this.loginid).then(({data}) => {
  214. this.$store.commit('SET_TOKEN',data.token);
  215. this.refreshUserInfo();
  216. }).catch(e => {
  217. console.error(e)
  218. })
  219. },
  220. getRole() {
  221. let userInfo = uni.getStorageSync('WMS-userinfo')
  222. var officeId = userInfo.officeDTO.id;
  223. var roleIds = userInfo.roleIds;
  224. if (roleIds.indexOf("17bac1f980264e3e8193bc965538e2c6") != -1) {
  225. //// 管理员
  226. this.stype = 5
  227. uni.setStorageSync('stype', this.stype);
  228. } else if (roleIds.indexOf("ade960e8f02544998b07397304c059c1") != -1) {
  229. // 政府管理员
  230. this.stype = 4
  231. uni.setStorageSync('stype', this.stype);
  232. } else {
  233. console.log('==================>这里走了么','================>存一个stape')
  234. loginService
  235. .getOtherIdByOffceid({
  236. officeid: officeId,
  237. })
  238. .then(({
  239. data
  240. }) => {
  241. console.log(data, "====================>getOtherIdByOffceid");
  242. this.stype = data.stype;
  243. uni.setStorageSync('stype', this.stype);
  244. });
  245. }
  246. },
  247. outloginset(){
  248. loginService.logout().then(({
  249. data
  250. }) => {
  251. this.$store.commit('logout');
  252. uni.clearStorage();
  253. })
  254. this.$store.commit('logout');
  255. uni.clearStorage();
  256. this.isLogin=this.$auth.checkisLogin();
  257. uni.hideLoading()
  258. },
  259. outlogin() {
  260. uni.showModal({
  261. title: '您确认退出么?',
  262. showCancel: true,
  263. success: (res) => {
  264. if (res.confirm) {
  265. uni.showLoading()
  266. this.outloginset();
  267. // uni.reLaunch({
  268. // url: '/pages/login/login'
  269. // })
  270. }
  271. }
  272. });
  273. },
  274. tces() {
  275. uni.navigateTo({
  276. url: '/pages/index/AudioToWord'
  277. })
  278. },
  279. // ListTouch触摸开始
  280. ListTouchStart(e) {
  281. this.listTouchStart = e.touches[0].pageX
  282. },
  283. // ListTouch计算方向
  284. ListTouchMove(e) {
  285. this.listTouchDirection = e.touches[0].pageX - this.listTouchStart > -60 ? 'right' : 'left'
  286. },
  287. // ListTouch计算滚动
  288. ListTouchEnd(e) {
  289. if (this.listTouchDirection == 'left') {
  290. this.modalName = e.currentTarget.dataset.target
  291. } else {
  292. this.modalName = null
  293. }
  294. this.listTouchDirection = null
  295. },
  296. switchTab(index) {
  297. this.activeTab = index;
  298. if(index==0){
  299. this.searchForm.des7="";
  300. }else{
  301. this.searchForm.des7=this.activeTab;
  302. }
  303. this.doSearch();
  304. },
  305. switchTab2(index) {
  306. this.activeTab = index;
  307. // if(index==0){
  308. // this.searchForm.des8="";
  309. // }else{
  310. // this.searchForm.des8=this.activeTab;
  311. // }
  312. this.searchForm.des8=this.activeTab+1;
  313. this.doSearch();
  314. },
  315. handleBack() {
  316. // 返回逻辑,比如跳转至上一页
  317. this.$router.go(-1);
  318. console.log('返回按钮被点击');
  319. }
  320. }
  321. }
  322. </script>
  323. <style>
  324. .page {
  325. height: 100vh;
  326. }
  327. .line-box {
  328. padding-left: 20rpx;
  329. padding-right: 20rpx;
  330. margin-top: 20rpx;
  331. }
  332. .mart-t {
  333. margin-top: 30rpx;
  334. }
  335. .center-box{
  336. margin-top: 20rpx;
  337. width: 100%;
  338. border-radius: 25rpx;
  339. border-radius: 25rpx;
  340. background: #fff;
  341. box-shadow: 0px 8px 16px 2px rgba(101, 101, 101, 0.2);
  342. padding-bottom: 30rpx;
  343. display: flex;
  344. flex-wrap: wrap;
  345. }
  346. .center-left-box {
  347. width: 100%;
  348. padding-bottom: 30rpx;
  349. display: flex;
  350. flex-wrap: wrap;
  351. }
  352. .btn-box-text {
  353. flex:1;
  354. height: 20rpx;
  355. text-align: center;
  356. color: #000000;
  357. font-size: 14px;
  358. font-weight: 700;
  359. }
  360. .btn-box-1 {
  361. flex:1;
  362. height: 30rpx;
  363. text-align: center;
  364. color: #36A7F3;
  365. font-size: x-large;
  366. font-weight: 700;
  367. }
  368. .btn-box-2 {
  369. flex:1;
  370. height: 30rpx;
  371. text-align: center;
  372. color:#F3365A;
  373. font-size: x-large;
  374. font-weight: 700;
  375. }
  376. .btn-box-3 {
  377. flex:1;
  378. height: 30rpx;
  379. text-align: center;
  380. color:#15D578;
  381. font-size: x-large;
  382. font-weight: 700;
  383. }
  384. .btn-box-4 {
  385. flex:1;
  386. height: 30rpx;
  387. text-align: center;
  388. color:#F1A31B;
  389. font-size: x-large;
  390. font-weight: 700;
  391. }
  392. .btn-Imbox {
  393. flex:1;
  394. height: 150rpx;
  395. padding-top: 8rpx;
  396. text-align: center;
  397. display: flex;
  398. flex-direction: column;
  399. justify-content: center; /* 子元素内部内容竖向居中 */
  400. align-items: center; /* 子元素内部内容水平居中 */
  401. text-align: center; /* 文字居中 */
  402. }
  403. .btn-Imbox p {
  404. font-size: 14px; /* 文字大小,可根据需要调整 */
  405. margin: 0; /* 去掉默认的外边距 */
  406. font-weight: 700;
  407. }
  408. .center-img{
  409. width: 90rpx;
  410. height: 90rpx;
  411. margin-bottom: 10rpx;
  412. text-align: center;
  413. }
  414. .center-img2{
  415. width: 70rpx;
  416. height: 70rpx;
  417. margin-top: 10rpx;
  418. margin-bottom: 20rpx;
  419. text-align: center;
  420. }
  421. .kuai-text{
  422. color: #000000;
  423. font-weight: 900;
  424. font-size: 34rpx;
  425. padding-top: 20rpx;
  426. padding-left: 20rpx;
  427. }
  428. .btn-box-5 {
  429. width: 337rpx;
  430. height: 200rpx;
  431. background-image: url('../../static/img/btn3.png');
  432. background-size: 100% 100%;
  433. }
  434. .btn-box-6 {
  435. width: 337rpx;
  436. height: 200rpx;
  437. background-image: url('../../static/img/btn6.png');
  438. background-size: 100% 100%;
  439. }
  440. .h-200 {
  441. height: 200rpx;
  442. }
  443. .swiper {
  444. width: 750rpx;
  445. height: 310rpx;
  446. }
  447. .swiper-item {
  448. width: 750rpx;
  449. height: 310rpx;
  450. background-color: aliceblue;
  451. }
  452. .font-size-35 {
  453. font-size: 35px !important;
  454. }
  455. .img-size {
  456. width: 80rpx;
  457. height: 80rpx;
  458. }
  459. .content-box {
  460. width: 437rpx;
  461. height: 200rpx;
  462. }
  463. .my-app .padding-sm {
  464. padding: 6px;
  465. }
  466. .grid .padding-sm .bg-white {
  467. box-shadow: 0 1px 4px #f9f9f9, 1px 1px 40px rgba(0, 0, 0, .06);
  468. }
  469. .bg-blue {
  470. background: #fff;
  471. color: #0081ff !important;
  472. }
  473. .text-white,
  474. .line-white,
  475. .lines-white {
  476. color: #0081ff !important;
  477. }
  478. .cu-bar .search-form {
  479. background-color: white;
  480. }
  481. .item-box{
  482. width: 710rpx;
  483. background: #FFFFFF;
  484. box-shadow: 0px 1px 3px 0px rgba(9,2,4,0.1);
  485. border-radius: 10px;
  486. padding-top: 20rpx;
  487. padding-left: 38rpx;
  488. padding-right: 10rpx;
  489. margin-top: 20rpx;
  490. }
  491. .item-title{
  492. position: relative;
  493. display: flex;
  494. justify-content: space-between;
  495. font-size: 30rpx;
  496. color: #010101;
  497. font-weight: bold;
  498. align-items: center;
  499. }
  500. .item-line{
  501. display: flex;
  502. height: 48rpx;
  503. margin-top: 20rpx;
  504. }
  505. .item-line2{
  506. height: 48rpx;
  507. margin-top: 20rpx;
  508. }
  509. .subtitle{
  510. color: #E5880E;
  511. }
  512. .item-name{
  513. margin-top: 5rpx;
  514. font-size: 29rpx;
  515. color: #666666;
  516. }
  517. .item-name2{
  518. font-size: 29rpx;
  519. color: #676D99;
  520. }
  521. .item-name3{
  522. display: flex;
  523. width: 100%;
  524. padding-right: 30rpx;
  525. flex: 1;
  526. justify-content: flex-end;
  527. font-size: 29rpx;
  528. color: #676D99;
  529. }
  530. .item-content{
  531. color: #1497EF;
  532. font-size: 30rpx;
  533. }
  534. .btn-box{
  535. display: flex;
  536. }
  537. .line-zs{
  538. width: 2rpx;
  539. height: 30rpx;
  540. background: #36A7F3;
  541. }
  542. .edit-botton{
  543. width: 100rpx;
  544. height: 48rpx;
  545. line-height: 48rpx;
  546. color: #fff;
  547. font-size: 28rpx;
  548. margin-right: 20rpx;
  549. border-radius: 10rpx;
  550. background: #5A9EE9;
  551. text-align: center;
  552. }
  553. .del-botton{
  554. width: 100rpx;
  555. height: 48rpx;
  556. line-height: 48rpx;
  557. color: #fff;
  558. font-size: 28rpx;
  559. margin-right: 20rpx;
  560. border-radius: 10rpx;
  561. background: #F27C85;
  562. text-align: center;
  563. }
  564. .color-white{
  565. color: #808080;
  566. font-size: 40rpx;
  567. line-height: 60rpx;
  568. }
  569. .search-box{
  570. padding-left: 20rpx;
  571. padding-right: 20rpx;
  572. padding-top: 20rpx;
  573. margin-top: 20rpx;
  574. width: 100%;
  575. border-radius: 25rpx;
  576. border-radius: 25rpx;
  577. background: #fff;
  578. box-shadow: 0px 8px 16px 2px rgba(101, 101, 101, 0.2);
  579. padding-bottom: 30rpx;
  580. display: flex;
  581. flex-wrap: wrap;
  582. }
  583. .search-box1{
  584. display: flex;
  585. }
  586. .input-box{
  587. background: #fff;
  588. height: 65rpx;
  589. width: 640rpx;
  590. display: flex;
  591. align-items: center;
  592. border-radius: 30rpx;
  593. padding-left: 30rpx;
  594. margin-right: 20rpx;
  595. }
  596. .input-boxinput{
  597. height: 75rpx;
  598. font-size: 15rpx;
  599. }
  600. .choose-box{
  601. background: #fff;
  602. width: 325rpx;
  603. border-radius: 23rpx;
  604. height: 70rpx;
  605. display: flex;
  606. align-items: center;
  607. justify-content: center;
  608. margin-right: 20rpx;
  609. border: 1rpx solid #808080;
  610. }
  611. .choose-box2{
  612. background: #fff;
  613. width: 100%;
  614. border-radius: 23rpx;
  615. height: 70rpx;
  616. display: flex;
  617. padding-left: 29rpx;
  618. align-items: center;
  619. border: 1rpx solid #808080;
  620. }
  621. .choose-box3{
  622. display: flex;
  623. }
  624. .choose-boxp{
  625. font-size: 32rpx;
  626. width: 80rpx;
  627. }
  628. .fixed-bottom-right {
  629. padding: 20rpx;
  630. position: fixed;
  631. bottom: 20px; /* 距离底部的距离 */
  632. right: 20px; /* 距离右侧的距离 */
  633. }
  634. .tabs {
  635. display: flex;
  636. justify-content: space-around;
  637. margin-bottom: 20px;
  638. }
  639. .tab-item {
  640. padding: 3px 3px;
  641. cursor: pointer;
  642. transition: all 0.3s;
  643. }
  644. .tab-item.active {
  645. color: #66b1ff;
  646. border-bottom: 2px solid #66b1ff;
  647. }
  648. .tab-content {
  649. padding: 20px;
  650. }
  651. .tab-item-content {
  652. display: none;
  653. }
  654. .tab-item-content.v-if {
  655. display: block;
  656. }
  657. /* 返回 */
  658. .item-img {
  659. width: 160rpx;
  660. height: 160rpx;
  661. }
  662. .custom-header {
  663. display: flex;
  664. align-items: center;
  665. justify-content: center;
  666. padding: 10px;
  667. width: 100%;
  668. }
  669. .is-back {
  670. position: relative;
  671. }
  672. .back-container {
  673. position: absolute;
  674. left: 10px;
  675. cursor: pointer;
  676. }
  677. .back-text {
  678. color: white; /* 返回按钮文本颜色 */
  679. }
  680. .back-text {
  681. color: white; /* 返回按钮文本颜色 */
  682. }
  683. .content-container {
  684. flex: 1;
  685. text-align: center;
  686. }
  687. .content-text {
  688. color: white; /* 标题文本颜色 */
  689. font-weight: bold;
  690. }
  691. /* 背景颜色 */
  692. .bg-blue {
  693. background-color: #4285f4; /* 假设这是一个蓝色背景 */
  694. }
  695. </style>