ProgressQuestionList.vue 14 KB

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