AI销管
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

601 linhas
14 KiB

  1. <template>
  2. <view class="main">
  3. <!-- 头部导航 -->
  4. <view class="tab-box">
  5. <u-tabs class="tab-box-utabs" bar-width="120" bar-height="4" :list="tablist" :is-scroll="false"
  6. :current="activeClass" @change="clocktab"></u-tabs>
  7. </view>
  8. <!-- 内容部分 :style="[otherHeight]" -->
  9. <view class="container">
  10. <template v-if="activeClass==0">
  11. <view class="cented">
  12. <block v-for="(item,index) in alllist" :key="index">
  13. <view class="ceninfo" @click="quclick(item)">
  14. <view class="infoview">
  15. <view class="infozuo">
  16. <view class="infozuochiud2">顾</view>
  17. <view class="infozuochiud1">{{item.jbaName}}</view>
  18. </view>
  19. <view class="infoyou">
  20. <view class="infoyouchiud2">未学习</view>
  21. </view>
  22. </view>
  23. <view class="footerinfo">
  24. <view class="footerinfozuo">
  25. <image src="../../static/images/img/time.png" mode=""></image>
  26. {{item.assignedTime}}
  27. </view>
  28. <view class="footerinfozuo">
  29. <image src="../../static/images/img/voice.png" mode=""></image>
  30. {{ item.recordDuration || 0 }}min
  31. </view>
  32. <view class="footerinfozuo" style="color: #2671E2;">
  33. <image src="../../static/images/img/percent.png" mode=""></image>
  34. {{ item.fraction || 0 }}%
  35. </view>
  36. </view>
  37. <!-- 底部按钮组 -->
  38. <view class="footicon">
  39. <view class="icon">
  40. <image class="Piabodata-img1" src="../../static/images/img/view.png" mode="">
  41. </image>
  42. <!-- 浏览量 -->
  43. {{ item.pageviews || 0 }}
  44. </view>
  45. <view class="icon">
  46. <image class="Piabodata-img1" src="../../static/images/img/message.png" mode="">
  47. </image>
  48. <!-- 热度 -->
  49. {{ item.commentNum || 0 }}
  50. </view>
  51. <view class="icon">
  52. <image class="Piabodata-img1" src="../../static/images/img/hand.png" mode="">
  53. </image>
  54. <!-- 点赞数 -->
  55. {{ item.likeNum || 0 }}
  56. </view>
  57. </view>
  58. </view>
  59. </block>
  60. </view>
  61. </template>
  62. <template v-if="activeClass==1">
  63. <view class="biaoqianview">
  64. <scroll-view scroll-y="true" class="boxintention">
  65. <block v-for="(item,index) in equinoctial" :key="index">
  66. <view class="boxcenten" :class="{act: index == leftIndex}"
  67. @click="routerclick(item, index)">
  68. <view class="boxcenteninfotext">{{item.name}}</view>
  69. </view>
  70. </block>
  71. </scroll-view>
  72. <scroll-view scroll-y="true" class="rside-scroll">
  73. <view class="rside-box">
  74. <block v-for="(item,index) in alllists" :key="index">
  75. <view class="ceninfo" @click="quclicks(item)">
  76. <view class="infoview">
  77. <view class="infozuo">
  78. <view class="infozuochiud2">顾</view>
  79. <view class="infozuochiud1">{{item.jbaName}}</view>
  80. </view>
  81. <view class="infoyou">
  82. <view class="infoyouchiud2">未学习</view>
  83. </view>
  84. </view>
  85. <view class="footerinfo">
  86. <view class="footerinfozuo">
  87. <image src="../../static/images/img/time.png" mode=""></image>
  88. {{item.assignedTime}}
  89. </view>
  90. </view>
  91. <!-- 底部按钮组 -->
  92. <view class="footicon">
  93. <view class="icon">
  94. <image class="Piabodata-img1" src="../../static/images/img/view.png"
  95. mode=""></image>
  96. <!-- 浏览量 -->
  97. {{item.pageviews || 0 }}
  98. </view>
  99. <view class="icon">
  100. <image class="Piabodata-img1" src="../../static/images/img/message.png"
  101. mode=""></image>
  102. <!-- 热度 -->
  103. {{item.commentNum || 0 }}
  104. </view>
  105. <view class="icon">
  106. <image class="Piabodata-img1" src="../../static/images/img/hand.png"
  107. mode=""></image>
  108. <!-- 点赞数 -->
  109. {{item.likeNum || 0 }}
  110. </view>
  111. </view>
  112. </view>
  113. </block>
  114. </view>
  115. </scroll-view>
  116. </view>
  117. </template>
  118. </view>
  119. <!-- 底部导航栏 -->
  120. <u-tabbar :isBtnTop="false" class="tabbar" :mid-button="true" activeColor="#1296db" inactiveColor="#999999"
  121. v-model="current" :list="tabbarList"></u-tabbar>
  122. </view>
  123. </template>
  124. <script>
  125. var config = require("../../config");
  126. var util = require("@/utils/util.js");
  127. import tabbarList from '@/utils/tabbar.js'
  128. export default {
  129. data() {
  130. return {
  131. // tabbar配置项
  132. current: 3,
  133. tabbarList: tabbarList,
  134. //--- end --- tabbar配置项
  135. tablist: [{
  136. name: "优秀案例"
  137. },
  138. {
  139. name: "维度精选"
  140. }
  141. ],
  142. activeClass: 0,
  143. equinoctial: [],
  144. alllist: [], // 一级分类菜单
  145. buildingID: '',
  146. leftIndex: 0, // 左侧滚动区域选中下标
  147. alllists: [], // 二级分类菜单
  148. };
  149. },
  150. onShow() {
  151. var i = uni.getStorageSync('fendianindex')
  152. this.buildingID = uni.getStorageSync('buildingID').id;
  153. this.clocktab(i)
  154. },
  155. methods: {
  156. // 跳转部分学习
  157. quclicks(item) {
  158. uni.showLoading({
  159. title: '加载中',
  160. mask: true
  161. });
  162. const parames = {
  163. pageNum: 1,
  164. pageSize: 100,
  165. query: {
  166. whetherFinish: 1,
  167. customerId: item.carId,
  168. id: item.startFile
  169. }
  170. }
  171. var cet = {
  172. bg: 0,
  173. customerId: item.id,
  174. id: ''
  175. }
  176. this.$u.post("/corpus/fendianFindByPage", parames).then(res => {
  177. var newobj = res[0];
  178. setTimeout(function() {
  179. uni.hideLoading();
  180. }, 2000);
  181. if (res[0].merge == 0) {
  182. uni.navigateTo({
  183. url: `/pages/learning/Equinoctial/index2?customerId=${newobj.customerId}&biaoqian=${this.equinoctial[this.leftIndex].name}&startTime=${item.startTime}&startFile=${item.startFile}`
  184. })
  185. } else {
  186. uni.navigateTo({
  187. url: `/pages/learning/Equinoctial/index?customerId=${newobj.customerId}&biaoqian=${this.equinoctial[this.leftIndex].name}&startTime=${item.startTime}&startFile=${item.startFile}`
  188. })
  189. }
  190. })
  191. },
  192. //全部学习跳转
  193. quclick(item) {
  194. uni.showLoading({
  195. title: '加载中',
  196. mask: true
  197. });
  198. const parames = {
  199. pageNum: 1,
  200. pageSize: 100,
  201. query: {
  202. customerId: item.carId,
  203. }
  204. }
  205. var cet = {
  206. bg: 0,
  207. customerId: item.id,
  208. id: ''
  209. }
  210. this.$u.post("/corpus/findByPage", parames).then(res => {
  211. setTimeout(function() {
  212. uni.hideLoading();
  213. }, 2000);
  214. var newobj = res[0];
  215. if (res[0].merge == 0) {
  216. uni.navigateTo({
  217. url: `/pages/learning/Thefulltext/index2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(cet)}&stateisshow=${"2"}`
  218. })
  219. } else {
  220. uni.navigateTo({
  221. url: `/pages/learning/Thefulltext/index?customerId=${newobj.customerId}`
  222. })
  223. }
  224. })
  225. },
  226. //分点学习点击事件
  227. routerclick(item, index) {
  228. if (this.leftIndex === index) return
  229. this.leftIndex = index
  230. this.getSecond(this.equinoctial[index].marketingId)
  231. // // return
  232. // uni.navigateTo({
  233. // url: "/pages/learning/Equinoctiallearning?id=" + item.marketingId + "&biaoqian=" + item.name
  234. // })
  235. },
  236. // tab切换
  237. clocktab(index) {
  238. this.activeClass = index;
  239. if (this.activeClass == 0) {
  240. uni.setStorageSync("fendianindex", 0); //写入缓存
  241. this.ceninit()
  242. } else {
  243. uni.setStorageSync("fendianindex", 1); //写入缓存
  244. this.infoinit()
  245. }
  246. },
  247. ceninit() {
  248. let infoobj = {
  249. "pageNum": 1,
  250. "pageSize": 100,
  251. "query": {
  252. "status": 0,
  253. 'itemId': this.buildingID,
  254. }
  255. }
  256. uni.request({
  257. url: config.service.findAllZATD,
  258. method: "POST",
  259. header: {
  260. 'content-type': 'application/json',
  261. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  262. },
  263. data: infoobj,
  264. success: (data) => {
  265. if (data.data.code == 10000) {
  266. this.alllist = data.data.data.results
  267. } else {
  268. uni.showToast({
  269. title: data.data.message,
  270. duration: 2000
  271. });
  272. }
  273. }
  274. })
  275. },
  276. // 获取改学习分类下的数据
  277. getSecond(id) {
  278. console.log('1231312我调用')
  279. let infoobj = {
  280. "pageNum": 1,
  281. "pageSize": 100,
  282. "query": {
  283. "status": 1,
  284. "marketingId": id,
  285. "itemId": this.buildingID
  286. }
  287. }
  288. uni.request({
  289. url: config.service.findAllZATD,
  290. method: "POST",
  291. header: {
  292. 'content-type': 'application/json',
  293. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  294. },
  295. data: infoobj,
  296. success: (data) => {
  297. console.log(data.data.data.results,
  298. "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq");
  299. if (data.data.code == 10000) {
  300. this.alllists = data.data.data.results
  301. } else {
  302. uni.showToast({
  303. title: data.data.message,
  304. duration: 2000
  305. });
  306. }
  307. }
  308. })
  309. },
  310. infoinit() {
  311. let obj = {
  312. itemId: this.buildingID
  313. }
  314. uni.request({
  315. url: config.service.findSelectedLabel,
  316. method: "POST",
  317. data: obj,
  318. header: {
  319. 'content-type': 'application/json',
  320. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  321. },
  322. success: (data) => {
  323. if (data.data.code == 10000) {
  324. this.equinoctial = data.data.data
  325. if (data.data.data[0] && data.data.data[0].length > 0) {
  326. this.getSecond(data.data.data[0].marketingId)
  327. }
  328. } else {
  329. uni.showToast({
  330. title: data.data.message,
  331. duration: 2000
  332. });
  333. }
  334. }
  335. })
  336. }
  337. },
  338. }
  339. </script>
  340. <style lang="scss" scoped>
  341. .main {
  342. background: #F8F8F8;
  343. display: flex;
  344. flex-direction: column;
  345. }
  346. .tab-box {
  347. width: 100%;
  348. height: 80rpx;
  349. }
  350. .container {
  351. min-height: calc(100vh - 80rpx - 50px);
  352. .cented {
  353. width: 100%;
  354. display: flex;
  355. flex-direction: column;
  356. .ceninfo {
  357. position: relative;
  358. margin-top: 20rpx;
  359. width: 100%;
  360. background: #FFFFFF;
  361. .infoview {
  362. padding: 0 30rpx;
  363. width: 100%;
  364. height: 92rpx;
  365. display: flex;
  366. justify-content: space-between;
  367. border-bottom: 1rpx solid #E0E0E0;
  368. .infozuo {
  369. display: flex;
  370. align-items: center;
  371. .infozuochiud1 {
  372. font-size: 30rpx;
  373. font-weight: 600;
  374. color: #0C0C0C;
  375. }
  376. .infozuochiud2 {
  377. margin: 0 10rpx 0 0;
  378. padding: 5rpx 11rpx;
  379. border-radius: 50%;
  380. border: 1px solid #2671E2;
  381. font-size: 30rpx;
  382. font-weight: 400;
  383. color: #2671E2;
  384. }
  385. }
  386. .infoyou {
  387. height: 100%;
  388. display: flex;
  389. align-items: center;
  390. .infoyouchiud2 {
  391. font-size: 30rpx;
  392. color: #333;
  393. }
  394. }
  395. }
  396. .footerinfo {
  397. padding: 0 30rpx;
  398. width: 100%;
  399. height: 88rpx;
  400. display: flex;
  401. align-items: center;
  402. justify-content: space-between;
  403. border-bottom: 1rpx solid #E0E0E0;
  404. .footerinfozuo {
  405. display: flex;
  406. align-items: center;
  407. font-size: 28rpx;
  408. color: #333;
  409. image {
  410. margin: 0 10rpx 0 0;
  411. width: 32rpx;
  412. height: 32rpx;
  413. }
  414. }
  415. }
  416. .footicon {
  417. padding: 0 80rpx;
  418. height: 88rpx;
  419. display: flex;
  420. align-items: center;
  421. justify-content: space-between;
  422. .icon {
  423. display: flex;
  424. align-items: center;
  425. }
  426. image {
  427. margin-right: 10rpx;
  428. width: 32rpx;
  429. height: 32rpx;
  430. }
  431. }
  432. }
  433. }
  434. .biaoqianview {
  435. width: 100%;
  436. display: flex;
  437. height: calc(100vh - 80rpx - 50px);
  438. .boxintention {
  439. flex-shrink: 0;
  440. width: 176rpx;
  441. height: 100%;
  442. background: #F0F1F5;
  443. .boxcenten {
  444. width: 100%;
  445. height: 100rpx;
  446. background: #F0F1F5;
  447. display: flex;
  448. .boxcenteninfotext {
  449. width: 100%;
  450. height: 100%;
  451. text-indent: 20rpx;
  452. line-height: 100rpx;
  453. font-size: 30rpx;
  454. color: #0C0C0C;
  455. }
  456. &.act {
  457. background: #fff;
  458. }
  459. }
  460. }
  461. .rside-scroll {
  462. flex-grow: 1;
  463. padding: 0 0 0 10rpx;
  464. .rside-box {
  465. display: flex;
  466. flex-direction: column;
  467. .ceninfo {
  468. position: relative;
  469. margin-top: 20rpx;
  470. width: 100%;
  471. background: #FFFFFF;
  472. .infoview {
  473. padding: 0 30rpx;
  474. width: 100%;
  475. height: 92rpx;
  476. display: flex;
  477. justify-content: space-between;
  478. border-bottom: 1rpx solid #E0E0E0;
  479. .infozuo {
  480. display: flex;
  481. align-items: center;
  482. .infozuochiud1 {
  483. font-size: 30rpx;
  484. font-weight: 600;
  485. color: #0C0C0C;
  486. }
  487. .infozuochiud2 {
  488. margin: 0 10rpx 0 0;
  489. padding: 5rpx 11rpx;
  490. border-radius: 50%;
  491. border: 1px solid #2671E2;
  492. font-size: 30rpx;
  493. font-weight: 400;
  494. color: #2671E2;
  495. }
  496. }
  497. .infoyou {
  498. height: 100%;
  499. display: flex;
  500. align-items: center;
  501. .infoyouchiud2 {
  502. font-size: 30rpx;
  503. color: #333;
  504. }
  505. }
  506. }
  507. .footerinfo {
  508. padding: 0 30rpx;
  509. width: 100%;
  510. height: 88rpx;
  511. display: flex;
  512. align-items: center;
  513. justify-content: space-between;
  514. border-bottom: 1rpx solid #E0E0E0;
  515. .footerinfozuo {
  516. display: flex;
  517. align-items: center;
  518. font-size: 28rpx;
  519. color: #333;
  520. image {
  521. margin: 0 10rpx 0 0;
  522. width: 32rpx;
  523. height: 32rpx;
  524. }
  525. }
  526. }
  527. .footicon {
  528. padding: 0 80rpx;
  529. height: 88rpx;
  530. display: flex;
  531. align-items: center;
  532. justify-content: space-between;
  533. .icon {
  534. display: flex;
  535. align-items: center;
  536. }
  537. image {
  538. margin-right: 10rpx;
  539. width: 32rpx;
  540. height: 32rpx;
  541. }
  542. }
  543. }
  544. }
  545. }
  546. }
  547. }
  548. </style>