questionList.vue 17 KB

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