LyService.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  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. uni.redirectTo({
  219. url: '/pages/index/Dzfindex'
  220. })
  221. },
  222. add() {
  223. if (this.isLogin == null) {
  224. uni.showModal({
  225. title: '您还未登录,现在去登录?',
  226. showCancel: true,
  227. success: (res) => {
  228. if (res.confirm) {
  229. uni.showLoading()
  230. uni.reLaunch({
  231. url: '/pages/login/login'
  232. })
  233. }
  234. }
  235. });
  236. } else {
  237. uni.navigateTo({
  238. url: '/pages/service/addService'
  239. })
  240. }
  241. },
  242. switchTab(index) {
  243. this.activeTab = index;
  244. if (this.activeTab == 0) {
  245. this.searchForm.des1 = "";
  246. } else {
  247. this.searchForm.des1 = this.activeTab;
  248. }
  249. this.doSearch();
  250. }
  251. }
  252. }
  253. </script>
  254. <style>
  255. .page {
  256. height: 100vh;
  257. }
  258. .line-box {
  259. padding-left: 20rpx;
  260. padding-right: 20rpx;
  261. margin-top: 20rpx;
  262. height: 75vh;
  263. }
  264. .mart-t {
  265. margin-top: 30rpx;
  266. }
  267. .center-box {
  268. margin-top: 20rpx;
  269. width: 100%;
  270. border-radius: 25rpx;
  271. border-radius: 25rpx;
  272. background: #fff;
  273. box-shadow: 0px 8px 16px 2px rgba(101, 101, 101, 0.2);
  274. padding-bottom: 30rpx;
  275. display: flex;
  276. flex-wrap: wrap;
  277. }
  278. .center-left-box {
  279. width: 100%;
  280. padding-bottom: 30rpx;
  281. display: flex;
  282. flex-wrap: wrap;
  283. }
  284. .btn-box-text {
  285. flex: 1;
  286. height: 20rpx;
  287. text-align: center;
  288. color: #000000;
  289. font-size: 14px;
  290. font-weight: 700;
  291. }
  292. .btn-box-1 {
  293. flex: 1;
  294. height: 30rpx;
  295. text-align: center;
  296. color: #36A7F3;
  297. font-size: x-large;
  298. font-weight: 700;
  299. }
  300. .btn-box-2 {
  301. flex: 1;
  302. height: 30rpx;
  303. text-align: center;
  304. color: #F3365A;
  305. font-size: x-large;
  306. font-weight: 700;
  307. }
  308. .btn-box-3 {
  309. flex: 1;
  310. height: 30rpx;
  311. text-align: center;
  312. color: #15D578;
  313. font-size: x-large;
  314. font-weight: 700;
  315. }
  316. .btn-box-4 {
  317. flex: 1;
  318. height: 30rpx;
  319. text-align: center;
  320. color: #F1A31B;
  321. font-size: x-large;
  322. font-weight: 700;
  323. }
  324. .btn-Imbox {
  325. flex: 1;
  326. height: 150rpx;
  327. padding-top: 8rpx;
  328. text-align: center;
  329. display: flex;
  330. flex-direction: column;
  331. justify-content: center;
  332. /* 子元素内部内容竖向居中 */
  333. align-items: center;
  334. /* 子元素内部内容水平居中 */
  335. text-align: center;
  336. /* 文字居中 */
  337. }
  338. .btn-Imbox p {
  339. font-size: 14px;
  340. /* 文字大小,可根据需要调整 */
  341. margin: 0;
  342. /* 去掉默认的外边距 */
  343. font-weight: 700;
  344. }
  345. .center-img {
  346. width: 90rpx;
  347. height: 90rpx;
  348. margin-bottom: 10rpx;
  349. text-align: center;
  350. }
  351. .center-img2 {
  352. width: 70rpx;
  353. height: 70rpx;
  354. margin-top: 10rpx;
  355. margin-bottom: 20rpx;
  356. text-align: center;
  357. }
  358. .kuai-text {
  359. color: #000000;
  360. font-weight: 900;
  361. font-size: 34rpx;
  362. padding-top: 20rpx;
  363. padding-left: 20rpx;
  364. }
  365. .h-200 {
  366. height: 200rpx;
  367. }
  368. .swiper {
  369. width: 750rpx;
  370. height: 310rpx;
  371. }
  372. .swiper-item {
  373. width: 750rpx;
  374. height: 310rpx;
  375. background-color: aliceblue;
  376. }
  377. .font-size-35 {
  378. font-size: 35px !important;
  379. }
  380. .img-size {
  381. width: 80rpx;
  382. height: 80rpx;
  383. }
  384. .content-box {
  385. width: 437rpx;
  386. height: 200rpx;
  387. }
  388. .my-app .padding-sm {
  389. padding: 6px;
  390. }
  391. .grid .padding-sm .bg-white {
  392. box-shadow: 0 1px 4px #f9f9f9, 1px 1px 40px rgba(0, 0, 0, .06);
  393. }
  394. .bg-blue {
  395. background: #fff;
  396. color: #0081ff !important;
  397. }
  398. .text-white,
  399. .line-white,
  400. .lines-white {
  401. color: #0081ff !important;
  402. }
  403. .cu-bar .search-form {
  404. background-color: white;
  405. }
  406. .item-box {
  407. width: 710rpx;
  408. background: #FFFFFF;
  409. box-shadow: 0px 1px 3px 0px rgba(9, 2, 4, 0.1);
  410. border-radius: 10px;
  411. padding-top: 12rpx;
  412. padding-left: 38rpx;
  413. padding-right: 10rpx;
  414. padding-bottom: 15rpx;
  415. margin-top: 20rpx;
  416. }
  417. .item-title {
  418. font-size: 30rpx;
  419. margin-top: 12rpx;
  420. color: #010101;
  421. }
  422. .item-line {
  423. display: flex;
  424. height: 48rpx;
  425. margin-top: 20rpx;
  426. }
  427. .item-line2 {
  428. height: 48rpx;
  429. margin-top: 20rpx;
  430. }
  431. .subtitle {
  432. color: #E5880E;
  433. }
  434. .item-name {
  435. margin-top: 5rpx;
  436. font-size: 29rpx;
  437. color: #666666;
  438. }
  439. .item-name2 {
  440. font-size: 29rpx;
  441. color: #676D99;
  442. height: 40rpx;
  443. /* 这里假设两行的高度是80rpx */
  444. overflow: hidden;
  445. /* 超出部分隐藏 */
  446. text-overflow: ellipsis;
  447. /* 超出部分显示省略号 */
  448. display: -webkit-box;
  449. /* 使用Webkit的行盒模型 */
  450. -webkit-line-clamp: 1;
  451. /* 限制最多显示2行 */
  452. -webkit-box-orient: vertical;
  453. /* 垂直排列 */
  454. }
  455. .item-name3 {
  456. display: flex;
  457. width: 100%;
  458. padding-right: 30rpx;
  459. flex: 1;
  460. justify-content: flex-end;
  461. font-size: 29rpx;
  462. color: #FF4500;
  463. }
  464. .item-name31 {
  465. display: flex;
  466. width: 100%;
  467. padding-right: 30rpx;
  468. flex: 1;
  469. justify-content: flex-end;
  470. font-size: 29rpx;
  471. color: #2E8B57;
  472. }
  473. .item-content {
  474. color: #1497EF;
  475. font-size: 30rpx;
  476. }
  477. .btn-box {
  478. display: flex;
  479. }
  480. .line-zs {
  481. width: 2rpx;
  482. height: 30rpx;
  483. background: #36A7F3;
  484. }
  485. .edit-botton {
  486. width: 100rpx;
  487. height: 48rpx;
  488. line-height: 48rpx;
  489. color: #fff;
  490. font-size: 28rpx;
  491. margin-right: 20rpx;
  492. border-radius: 10rpx;
  493. background: #5A9EE9;
  494. text-align: center;
  495. }
  496. .del-botton {
  497. width: 100rpx;
  498. height: 48rpx;
  499. line-height: 48rpx;
  500. color: #fff;
  501. font-size: 28rpx;
  502. margin-right: 20rpx;
  503. border-radius: 10rpx;
  504. background: #F27C85;
  505. text-align: center;
  506. }
  507. .color-white {
  508. color: #808080;
  509. font-size: 40rpx;
  510. line-height: 60rpx;
  511. }
  512. .search-box {
  513. padding-left: 20rpx;
  514. padding-right: 20rpx;
  515. padding-top: 20rpx;
  516. margin-top: 20rpx;
  517. width: 100%;
  518. border-radius: 25rpx;
  519. border-radius: 25rpx;
  520. background: #fff;
  521. box-shadow: 0px 8px 16px 2px rgba(101, 101, 101, 0.2);
  522. padding-bottom: 30rpx;
  523. display: flex;
  524. flex-wrap: wrap;
  525. }
  526. .search-box1 {
  527. display: flex;
  528. }
  529. .input-box {
  530. background: #fff;
  531. height: 65rpx;
  532. width: 640rpx;
  533. display: flex;
  534. align-items: center;
  535. border-radius: 30rpx;
  536. padding-left: 30rpx;
  537. margin-right: 20rpx;
  538. }
  539. .input-boxinput {
  540. height: 75rpx;
  541. font-size: 15rpx;
  542. }
  543. .choose-box {
  544. background: #fff;
  545. width: 325rpx;
  546. border-radius: 23rpx;
  547. height: 70rpx;
  548. display: flex;
  549. align-items: center;
  550. justify-content: center;
  551. margin-right: 20rpx;
  552. border: 1rpx solid #808080;
  553. }
  554. .choose-box2 {
  555. background: #fff;
  556. width: 100%;
  557. border-radius: 23rpx;
  558. height: 70rpx;
  559. display: flex;
  560. padding-left: 29rpx;
  561. align-items: center;
  562. border: 1rpx solid #808080;
  563. }
  564. .choose-box3 {
  565. display: flex;
  566. }
  567. .choose-boxp {
  568. font-size: 32rpx;
  569. width: 80rpx;
  570. }
  571. .fixed-bottom-right {
  572. padding: 20rpx;
  573. position: fixed;
  574. bottom: 20px;
  575. /* 距离底部的距离 */
  576. right: 20px;
  577. /* 距离右侧的距离 */
  578. }
  579. .tabs {
  580. display: flex;
  581. justify-content: space-around;
  582. margin-bottom: 10px;
  583. }
  584. .tab-item {
  585. padding: 10px 10px;
  586. cursor: pointer;
  587. transition: all 0.3s;
  588. }
  589. .tab-item.active {
  590. color: #66b1ff;
  591. border-bottom: 2px solid #66b1ff;
  592. }
  593. .tab-content {
  594. padding: 20px;
  595. }
  596. .tab-item-content {
  597. display: none;
  598. }
  599. .tab-item-content.v-if {
  600. display: block;
  601. }
  602. .custom-header {
  603. display: flex;
  604. align-items: center;
  605. justify-content: center;
  606. padding: 10px;
  607. width: 100%;
  608. }
  609. .is-back {
  610. position: relative;
  611. }
  612. .back-container {
  613. position: absolute;
  614. left: 10px;
  615. cursor: pointer;
  616. }
  617. .back-text {
  618. color: white;
  619. /* 返回按钮文本颜色 */
  620. }
  621. /* 背景颜色 */
  622. .bg-blue {
  623. background-color: #4285f4;
  624. /* 假设这是一个蓝色背景 */
  625. }
  626. .content-container {
  627. flex: 1;
  628. text-align: center;
  629. }
  630. .content-text {
  631. color: white;
  632. /* 标题文本颜色 */
  633. font-weight: bold;
  634. }
  635. </style>