ProgressQuestionList.vue 14 KB

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