LyService.vue 13 KB

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