LyService.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. <template>
  2. <view class="page">
  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. <view class="line-box">
  12. <view :style="[{top:CustomBar + 'px'}]">
  13. <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" :up="upOption"
  14. @up="upCallback">
  15. <view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''"
  16. v-for="(item, index) in dataList" :key="index" @touchstart="ListTouchStart"
  17. @touchmove="ListTouchMove" @touchend="ListTouchEnd" :data-target="'move-box-' + index">
  18. <view class="item-box">
  19. <view class="item-title">
  20. 企业名称:{{item.qy.name}}
  21. </view>
  22. <view class="item-title">
  23. 对接方式:{{item.method}}
  24. </view>
  25. <view class="item-title">
  26. 沟通时间:{{item.contactDate.substring(0, 10)}}
  27. </view>
  28. <view class="item-title">
  29. 挂钩干部:{{item.qy.des14}}
  30. </view>
  31. </view>
  32. </view>
  33. </mescroll-body>
  34. </view>
  35. <!-- <view style="height: 40rpx;"></view> -->
  36. </view>
  37. <view class="btn_add">
  38. <button type="primary" @click="add">新增服务</button>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. import * as $auth from "@/common/auth.js"
  44. import loginService from "@/api/auth/loginService";
  45. import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
  46. import MescrollMoreItemMixin from "@/components/mescroll-uni/mixins/mescroll-more-item.js";
  47. import lyServiceService from '@/api/service/lyServiceService.js'
  48. export default {
  49. mixins: [MescrollMixin, MescrollMoreItemMixin], // 使用mixin (在main.js注册全局组件)
  50. data() {
  51. return {
  52. canAdd: false,
  53. userid: "",
  54. isLogin: "",
  55. pageInfo: {},
  56. loginid: "",
  57. title: "服务记录",
  58. isBack: true, // 是否显示返回按钮
  59. bgColor: 'bg-blue', // 背景颜色
  60. finish: true,
  61. curWord: "", //当前搜索关键词
  62. range: [{
  63. value: 999,
  64. text: "全部"
  65. },
  66. {
  67. value: 1,
  68. text: "反馈大走访"
  69. },
  70. {
  71. value: 2,
  72. text: "正在办理"
  73. },
  74. {
  75. value: 3,
  76. text: "难以化解"
  77. },
  78. {
  79. value: 4,
  80. text: "持续跟踪"
  81. },
  82. {
  83. value: 5,
  84. text: "提请会办"
  85. },
  86. ],
  87. dataList: [], // 数据列表
  88. modalName: null,
  89. tablePage: {
  90. total: 0,
  91. currentPage: 1,
  92. pageSize: 10,
  93. orders: []
  94. },
  95. loading: false,
  96. parkId: '',
  97. parkList: [],
  98. parkList2: [],
  99. parkList3: [],
  100. parkList4: [],
  101. ddd1: "",
  102. };
  103. },
  104. onShow() {
  105. this.isLogin = this.$auth.checkisLogin();
  106. },
  107. created() {
  108. this.userid = $auth.getUserInfo().loginName;
  109. },
  110. methods: {
  111. /*获取数据列表 */
  112. upCallback(page) {
  113. this.loading = true
  114. lyServiceService.list({
  115. current: page.num,
  116. size: page.size,
  117. orders: [{
  118. column: 'a.create_date',
  119. asc: false
  120. }],
  121. }).then(({
  122. data
  123. }) => {
  124. let curPageData = data.records
  125. this.mescroll.endBySize(curPageData.length, data.total);
  126. //如果是第一页需手动制空列表
  127. if (page.num == 1)
  128. this.dataList = [];
  129. //追加新数据
  130. this.dataList = this.dataList.concat(curPageData);
  131. }).catch(e => {
  132. //联网失败, 结束加载
  133. this.mescroll.endErr();
  134. })
  135. },
  136. change(val) {
  137. this.dataList = []
  138. if (this.curWord == '') {
  139. this.curWord = 999
  140. }
  141. this.upCallback(this.tablePage)
  142. },
  143. updateCities(newCities) {
  144. this.cities = newCities;
  145. },
  146. // 搜索
  147. doSearch() {
  148. this.dataList = []; // 先清空列表,显示加载进度
  149. this.mescroll.resetUpScroll();
  150. },
  151. // ListTouch触摸开始
  152. ListTouchStart(e) {
  153. this.listTouchStart = e.touches[0].pageX
  154. },
  155. // ListTouch计算方向
  156. ListTouchMove(e) {
  157. this.listTouchDirection = e.touches[0].pageX - this.listTouchStart > -60 ? 'right' : 'left'
  158. },
  159. // ListTouch计算滚动
  160. ListTouchEnd(e) {
  161. if (this.listTouchDirection == 'left') {
  162. this.modalName = e.currentTarget.dataset.target
  163. } else {
  164. this.modalName = null
  165. }
  166. this.listTouchDirection = null
  167. },
  168. handleBack() {
  169. // 返回逻辑,比如跳转至上一页
  170. uni.redirectTo({
  171. url: '/pages/index/Dzfindex'
  172. })
  173. },
  174. add() {
  175. if (this.isLogin == null) {
  176. uni.showModal({
  177. title: '您还未登录,现在去登录?',
  178. showCancel: true,
  179. success: (res) => {
  180. if (res.confirm) {
  181. uni.showLoading()
  182. uni.reLaunch({
  183. url: '/pages/login/login'
  184. })
  185. }
  186. }
  187. });
  188. } else {
  189. uni.navigateTo({
  190. url: '/pages/service/addService'
  191. })
  192. }
  193. },
  194. switchTab(index) {
  195. this.activeTab = index;
  196. if (this.activeTab == 0) {
  197. this.searchForm.des1 = "";
  198. } else {
  199. this.searchForm.des1 = this.activeTab;
  200. }
  201. this.doSearch();
  202. }
  203. }
  204. }
  205. </script>
  206. <style>
  207. .page {
  208. height: 100vh;
  209. }
  210. .line-box {
  211. padding-left: 20rpx;
  212. padding-right: 20rpx;
  213. margin-top: 20rpx;
  214. height: 75vh;
  215. overflow: auto;
  216. }
  217. .mart-t {
  218. margin-top: 30rpx;
  219. }
  220. .center-box {
  221. margin-top: 20rpx;
  222. width: 100%;
  223. border-radius: 25rpx;
  224. border-radius: 25rpx;
  225. background: #fff;
  226. box-shadow: 0px 8px 16px 2px rgba(101, 101, 101, 0.2);
  227. padding-bottom: 30rpx;
  228. display: flex;
  229. flex-wrap: wrap;
  230. }
  231. .center-left-box {
  232. width: 100%;
  233. padding-bottom: 30rpx;
  234. display: flex;
  235. flex-wrap: wrap;
  236. }
  237. .btn-box-text {
  238. flex: 1;
  239. height: 20rpx;
  240. text-align: center;
  241. color: #000000;
  242. font-size: 14px;
  243. font-weight: 700;
  244. }
  245. .btn-box-1 {
  246. flex: 1;
  247. height: 30rpx;
  248. text-align: center;
  249. color: #36A7F3;
  250. font-size: x-large;
  251. font-weight: 700;
  252. }
  253. .btn-box-2 {
  254. flex: 1;
  255. height: 30rpx;
  256. text-align: center;
  257. color: #F3365A;
  258. font-size: x-large;
  259. font-weight: 700;
  260. }
  261. .btn-box-3 {
  262. flex: 1;
  263. height: 30rpx;
  264. text-align: center;
  265. color: #15D578;
  266. font-size: x-large;
  267. font-weight: 700;
  268. }
  269. .btn-box-4 {
  270. flex: 1;
  271. height: 30rpx;
  272. text-align: center;
  273. color: #F1A31B;
  274. font-size: x-large;
  275. font-weight: 700;
  276. }
  277. .btn-Imbox {
  278. flex: 1;
  279. height: 150rpx;
  280. padding-top: 8rpx;
  281. text-align: center;
  282. display: flex;
  283. flex-direction: column;
  284. justify-content: center;
  285. /* 子元素内部内容竖向居中 */
  286. align-items: center;
  287. /* 子元素内部内容水平居中 */
  288. text-align: center;
  289. /* 文字居中 */
  290. }
  291. .btn-Imbox p {
  292. font-size: 14px;
  293. /* 文字大小,可根据需要调整 */
  294. margin: 0;
  295. /* 去掉默认的外边距 */
  296. font-weight: 700;
  297. }
  298. .center-img {
  299. width: 90rpx;
  300. height: 90rpx;
  301. margin-bottom: 10rpx;
  302. text-align: center;
  303. }
  304. .center-img2 {
  305. width: 70rpx;
  306. height: 70rpx;
  307. margin-top: 10rpx;
  308. margin-bottom: 20rpx;
  309. text-align: center;
  310. }
  311. .kuai-text {
  312. color: #000000;
  313. font-weight: 900;
  314. font-size: 34rpx;
  315. padding-top: 20rpx;
  316. padding-left: 20rpx;
  317. }
  318. .h-200 {
  319. height: 200rpx;
  320. }
  321. .swiper {
  322. width: 750rpx;
  323. height: 310rpx;
  324. }
  325. .swiper-item {
  326. width: 750rpx;
  327. height: 310rpx;
  328. background-color: aliceblue;
  329. }
  330. .font-size-35 {
  331. font-size: 35px !important;
  332. }
  333. .img-size {
  334. width: 80rpx;
  335. height: 80rpx;
  336. }
  337. .content-box {
  338. width: 437rpx;
  339. height: 200rpx;
  340. }
  341. .my-app .padding-sm {
  342. padding: 6px;
  343. }
  344. .grid .padding-sm .bg-white {
  345. box-shadow: 0 1px 4px #f9f9f9, 1px 1px 40px rgba(0, 0, 0, .06);
  346. }
  347. .bg-blue {
  348. background: #fff;
  349. color: #0081ff !important;
  350. }
  351. .text-white,
  352. .line-white,
  353. .lines-white {
  354. color: #0081ff !important;
  355. }
  356. .cu-bar .search-form {
  357. background-color: white;
  358. }
  359. .item-box {
  360. width: 710rpx;
  361. background: #FFFFFF;
  362. box-shadow: 0px 1px 3px 0px rgba(9, 2, 4, 0.1);
  363. border-radius: 10px;
  364. padding-top: 12rpx;
  365. padding-left: 38rpx;
  366. padding-right: 10rpx;
  367. padding-bottom: 15rpx;
  368. margin-top: 20rpx;
  369. }
  370. .item-title {
  371. font-size: 30rpx;
  372. margin-top: 12rpx;
  373. color: #010101;
  374. }
  375. .item-line {
  376. display: flex;
  377. height: 48rpx;
  378. margin-top: 20rpx;
  379. }
  380. .item-line2 {
  381. height: 48rpx;
  382. margin-top: 20rpx;
  383. }
  384. .subtitle {
  385. color: #E5880E;
  386. }
  387. .item-name {
  388. margin-top: 5rpx;
  389. font-size: 29rpx;
  390. color: #666666;
  391. }
  392. .item-name2 {
  393. font-size: 29rpx;
  394. color: #676D99;
  395. height: 40rpx;
  396. /* 这里假设两行的高度是80rpx */
  397. overflow: hidden;
  398. /* 超出部分隐藏 */
  399. text-overflow: ellipsis;
  400. /* 超出部分显示省略号 */
  401. display: -webkit-box;
  402. /* 使用Webkit的行盒模型 */
  403. -webkit-line-clamp: 1;
  404. /* 限制最多显示2行 */
  405. -webkit-box-orient: vertical;
  406. /* 垂直排列 */
  407. }
  408. .item-name3 {
  409. display: flex;
  410. width: 100%;
  411. padding-right: 30rpx;
  412. flex: 1;
  413. justify-content: flex-end;
  414. font-size: 29rpx;
  415. color: #FF4500;
  416. }
  417. .item-name31 {
  418. display: flex;
  419. width: 100%;
  420. padding-right: 30rpx;
  421. flex: 1;
  422. justify-content: flex-end;
  423. font-size: 29rpx;
  424. color: #2E8B57;
  425. }
  426. .item-content {
  427. color: #1497EF;
  428. font-size: 30rpx;
  429. }
  430. .btn-box {
  431. display: flex;
  432. }
  433. .line-zs {
  434. width: 2rpx;
  435. height: 30rpx;
  436. background: #36A7F3;
  437. }
  438. .edit-botton {
  439. width: 100rpx;
  440. height: 48rpx;
  441. line-height: 48rpx;
  442. color: #fff;
  443. font-size: 28rpx;
  444. margin-right: 20rpx;
  445. border-radius: 10rpx;
  446. background: #5A9EE9;
  447. text-align: center;
  448. }
  449. .del-botton {
  450. width: 100rpx;
  451. height: 48rpx;
  452. line-height: 48rpx;
  453. color: #fff;
  454. font-size: 28rpx;
  455. margin-right: 20rpx;
  456. border-radius: 10rpx;
  457. background: #F27C85;
  458. text-align: center;
  459. }
  460. .color-white {
  461. color: #808080;
  462. font-size: 40rpx;
  463. line-height: 60rpx;
  464. }
  465. .search-box {
  466. padding-left: 20rpx;
  467. padding-right: 20rpx;
  468. padding-top: 20rpx;
  469. margin-top: 20rpx;
  470. width: 100%;
  471. border-radius: 25rpx;
  472. border-radius: 25rpx;
  473. background: #fff;
  474. box-shadow: 0px 8px 16px 2px rgba(101, 101, 101, 0.2);
  475. padding-bottom: 30rpx;
  476. display: flex;
  477. flex-wrap: wrap;
  478. }
  479. .search-box1 {
  480. display: flex;
  481. }
  482. .input-box {
  483. background: #fff;
  484. height: 65rpx;
  485. width: 640rpx;
  486. display: flex;
  487. align-items: center;
  488. border-radius: 30rpx;
  489. padding-left: 30rpx;
  490. margin-right: 20rpx;
  491. }
  492. .input-boxinput {
  493. height: 75rpx;
  494. font-size: 15rpx;
  495. }
  496. .choose-box {
  497. background: #fff;
  498. width: 325rpx;
  499. border-radius: 23rpx;
  500. height: 70rpx;
  501. display: flex;
  502. align-items: center;
  503. justify-content: center;
  504. margin-right: 20rpx;
  505. border: 1rpx solid #808080;
  506. }
  507. .choose-box2 {
  508. background: #fff;
  509. width: 100%;
  510. border-radius: 23rpx;
  511. height: 70rpx;
  512. display: flex;
  513. padding-left: 29rpx;
  514. align-items: center;
  515. border: 1rpx solid #808080;
  516. }
  517. .choose-box3 {
  518. display: flex;
  519. }
  520. .choose-boxp {
  521. font-size: 32rpx;
  522. width: 80rpx;
  523. }
  524. .fixed-bottom-right {
  525. padding: 20rpx;
  526. position: fixed;
  527. bottom: 20px;
  528. /* 距离底部的距离 */
  529. right: 20px;
  530. /* 距离右侧的距离 */
  531. }
  532. .tabs {
  533. display: flex;
  534. justify-content: space-around;
  535. margin-bottom: 10px;
  536. }
  537. .tab-item {
  538. padding: 10px 10px;
  539. cursor: pointer;
  540. transition: all 0.3s;
  541. }
  542. .tab-item.active {
  543. color: #66b1ff;
  544. border-bottom: 2px solid #66b1ff;
  545. }
  546. .tab-content {
  547. padding: 20px;
  548. }
  549. .tab-item-content {
  550. display: none;
  551. }
  552. .tab-item-content.v-if {
  553. display: block;
  554. }
  555. .custom-header {
  556. display: flex;
  557. align-items: center;
  558. justify-content: center;
  559. padding: 10px;
  560. width: 100%;
  561. }
  562. .is-back {
  563. position: relative;
  564. }
  565. .back-container {
  566. position: absolute;
  567. left: 10px;
  568. cursor: pointer;
  569. }
  570. .back-text {
  571. color: white;
  572. /* 返回按钮文本颜色 */
  573. }
  574. /* 背景颜色 */
  575. .bg-blue {
  576. background-color: #4285f4;
  577. /* 假设这是一个蓝色背景 */
  578. }
  579. .content-container {
  580. flex: 1;
  581. text-align: center;
  582. }
  583. .content-text {
  584. color: white;
  585. /* 标题文本颜色 */
  586. font-weight: bold;
  587. }
  588. </style>