ProgressQuestionList.vue 14 KB

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