LyService.vue 13 KB

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