ProgressQuestionList.vue 14 KB

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