LyService.vue 13 KB

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