ProgressQuestionList.vue 14 KB

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