questionList.vue 16 KB

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