approverecord.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. <template>
  2. <div @click="approvetap" class="approverecord">
  3. <div @click.stop="dothis" class="approverecordlayer">
  4. <div class="titlebox">
  5. <div class="staffmsgbox clearfix fontfpr font28 center">
  6. <div @click="setlastypetap(1)" :class="{'nowstafftit':lastype=='1'}" class="pull-left center width50_ ">话术审核</div>
  7. <div @click="setlastypetap(2)" :class="{'nowstafftit':lastype=='2'}" class="pull-left width50_ relative ">回答审核</div>
  8. </div>
  9. <div class="clearfix teamerbox fontfpr font28 color384855">
  10. <div @click="setwordtap('0')" :class="{'nowteam':skillstate==0}" class="pull-left relative ">全部</div>
  11. <div @click="setwordtap('1')" :class="{'nowteam':skillstate==1}" class="pull-left relative ">通过</div>
  12. <div @click="setwordtap('2')" :class="{'nowteam':skillstate==2}" class="pull-left relative ">驳回</div>
  13. </div>
  14. <div class="bgbox bgF0F4F7"></div>
  15. </div>
  16. <mescroll-vue ref="wordListBox" class="managementmescroll" :down="mescrollDown" :up="mescrollUp" @init="mescrollInit">
  17. <div v-if='lastype==1'>
  18. <div v-for="item in wordlist" :key="item.id">
  19. <div class="everyshareword" >
  20. <div class="myquestion clearfix">
  21. <div class="answerlogo font28 fontfpr colorfff lh36 center pull-left">问</div>
  22. <div class="pull-left rightanswerbox">
  23. <div class="font28 fontfpr lh40 color384855">{{item.title}}</div>
  24. <div v-show="!!item.imgs" class="imgarrbox clearfix">
  25. <img v-for="(imgitem,idx) in item.imgs" @click.stop="lookimgtap(imgitem)" :key="idx" class="pull-left" :src="imgitem" />
  26. </div>
  27. </div>
  28. </div>
  29. <div class="myanswerbox clearfix">
  30. <div class="answerlogo font28 fontfpr colorfff lh36 center pull-left">答</div>
  31. <div class="pull-left rightanswerbox">
  32. <div class="ellipsisTwo fontfpr font28 color384855 lh40">{{item.content}}</div>
  33. <div class="clearfix relative font24 fontfpr colorB6CADE lh48 otherfootbox">
  34. <div class="pull-left">上传时间:{{item.addtime.split(' ')[0]}}</div>
  35. <div class="pull-right approvebtn" :class="{'color249EFB':item.status=='审核通过','colorF54D64':item.status=='被驳回'}">{{item.status}}</div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. <div class="bgbox"></div>
  41. </div>
  42. <nonedata :datashow="datashow" :len="wordlist.length"></nonedata>
  43. </div>
  44. <div v-if='lastype==2'>
  45. <div v-for="item in commentlist" :key="item.id">
  46. <div class="everyanswerbox clearfix relative">
  47. <div class="answerlogo font28 fontfpr colorfff lh36 center pull-left">答</div>
  48. <div class="pull-left rightanswerbox">
  49. <div class="ellipsisTwo fontfpr font28 color384855 lh40">{{item.comments}}</div>
  50. <div class="questionmsg">
  51. <div class="font24 fontfpr lh34 color9DB6CF">问题:{{item.title}}</div>
  52. <div v-show="!!item.imgs" class="imgarrbox clearfix">
  53. <img v-for="(imgitem,idx) in item.imgs" @click.stop="lookimgtap(imgitem)" :key="idx" class="pull-left" :src="imgitem" />
  54. </div>
  55. </div>
  56. <div class="clearfix relative font24 fontfpr colorB6CADE lh48">
  57. <div class="pull-left">回答时间:{{item.addtime.split(' ')[0]}}</div>
  58. <div class="pull-right approvebtn" :class="{'color249EFB':item.status=='审核通过','colorF54D64':item.status=='被驳回'}">{{item.status}}</div>
  59. </div>
  60. </div>
  61. </div>
  62. <div class="bgbox"></div>
  63. </div>
  64. <nonedata :datashow="datashow" :len="commentlist.length"></nonedata>
  65. </div>
  66. </mescroll-vue>
  67. </div>
  68. </div>
  69. </template>
  70. <script>
  71. import MescrollVue from "mescroll.js/mescroll.vue";
  72. import nonedata from "@/components/nonedata";
  73. import { ImagePreview } from 'vant';
  74. import { approveTalkskill,approveTalkskillComment} from '@/api/mine/management';
  75. export default {
  76. name:'approverecord',
  77. data(){
  78. return {
  79. lastype:1,
  80. skillstate:0,
  81. datashow:false,
  82. wordlist:[],
  83. commentlist:[],
  84. mescroll: null, // mescroll实例对象
  85. mescrollDown: {}, //下拉刷新的配置. (如果下拉刷新和上拉加载处理的逻辑是一样的,则mescrollDown可不用写了)
  86. mescrollUp: {
  87. // 上拉加载的配置.
  88. callback: this.recordfun, // 上拉回调,此处简写; 相当于 callback: function(page, mescroll) { }
  89. //以下是一些常用的配置,当然不写也可以的.
  90. page: {
  91. num: 0, //当前页 默认0,回调之前会加1; 即callback(page)会从1开始
  92. size: 10, //每页数据条数,默认10
  93. },
  94. htmlNodata:'',
  95. noMoreSize: 5, //如果列表已无数据,可设置列表的总数量要大于5才显示无更多数据;
  96. // 避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
  97. // 这就是为什么无更多数据有时候不显示的原因
  98. },
  99. };
  100. },
  101. components: {
  102. MescrollVue,
  103. [ImagePreview.Component.name]: ImagePreview.Component,
  104. nonedata:nonedata
  105. },
  106. created(){
  107. },
  108. methods:{
  109. dothis(){},
  110. approvetap(){
  111. this.$emit('approvetap1');
  112. },
  113. setlastypetap:function (num) {
  114. this.lastype=num;
  115. this.datashow=false;
  116. if(this.lastype==1&&this.wordlist.length==0){
  117. this.mescroll.resetUpScroll();
  118. }else if(this.lastype==2&&this.commentlist.length==0){
  119. this.mescroll.resetUpScroll();
  120. }
  121. },
  122. lookimgtap(img){
  123. ImagePreview([
  124. img,
  125. ]);
  126. },
  127. setwordtap(num){
  128. if(this.skillstate!=num){
  129. this.skillstate=num;
  130. this.mescroll.resetUpScroll();
  131. }
  132. },
  133. mescrollInit(mescroll) {
  134. this.mescroll = mescroll; // 如果this.mescroll对象没有使用到,则mescrollInit可以不用配置
  135. },
  136. recordfun(page, mescroll){
  137. const that=this;
  138. let data={
  139. page:page.num,
  140. limit:10,
  141. status:that.skillstate
  142. };
  143. let urlstr=this.lastype==1?approveTalkskill:approveTalkskillComment;
  144. urlstr(data).then(res=>{
  145. if(res.data.code==0){
  146. if(that.lastype==1){
  147. if (page.num === 1){
  148. that.wordlist=[];
  149. }
  150. that.datashow=true;
  151. that.wordlist = that.wordlist.concat(res.data.data);
  152. // 数据渲染成功后,隐藏下拉刷新的状态
  153. that.$nextTick(() => {
  154. mescroll.endSuccess(res.data.data.length);
  155. });
  156. }else{
  157. if (page.num === 1){
  158. that.commentlist=[];
  159. }
  160. that.datashow=true;
  161. that.commentlist = that.commentlist.concat(res.data.data);
  162. // 数据渲染成功后,隐藏下拉刷新的状态
  163. that.$nextTick(() => {
  164. mescroll.endSuccess(res.data.data.length);
  165. });
  166. }
  167. }
  168. })
  169. },
  170. },
  171. mounted(){
  172. }
  173. }
  174. </script>
  175. <style lang="less" scoped>
  176. .approverecord{
  177. display: block;
  178. width: 100%;
  179. height: 100%;
  180. position: fixed;
  181. top: 0;
  182. left: 0;
  183. z-index: 1000;
  184. background: rgba(0, 0, 0, 0.35);
  185. }
  186. .approverecordlayer{
  187. display: block;
  188. width: 710px;
  189. height: 80%;
  190. overflow: hidden;
  191. padding-top: 200px;
  192. position: absolute;
  193. left: 20px;
  194. top: 50%;
  195. box-sizing: border-box;
  196. background: #ffffff;
  197. transform: translateY(-50%);
  198. }
  199. .titlebox{
  200. position: fixed;
  201. width: 100%;
  202. height: 208px;
  203. background: #ffffff;
  204. z-index: 8;
  205. top: 0;
  206. left: 0;
  207. }
  208. .staffmsgbox {
  209. display: block;
  210. width: 100%;
  211. height: 98px;
  212. box-sizing: content-box;
  213. border-bottom: 2px solid #B6CADE;
  214. color: rgba(0, 0, 0, 0.85);
  215. }
  216. .staffmsgbox div {
  217. position: relative;
  218. line-height: 98px;
  219. }
  220. .staffmsgbox div.nowstafftit {
  221. position: relative;
  222. color: #249EFB;
  223. font-size: 36px;
  224. }
  225. .staffmsgbox div.nowstafftit::before {
  226. content: " ";
  227. display: block;
  228. width: 100%;
  229. height: 2px;
  230. background-color: #249EFB;
  231. position: absolute;
  232. bottom: -2px;
  233. left: 0%;
  234. }
  235. .staffmsgbox div span {
  236. position: absolute;
  237. width: 20px;
  238. height: 20px;
  239. background: #F54D64;
  240. border-radius: 50%;
  241. top: 24px;
  242. right: 52px;
  243. }
  244. .teamerbox {
  245. display: block;
  246. width: 100%;
  247. padding: 22px 0;
  248. div.recordbox{
  249. margin-right: 40px;
  250. }
  251. }
  252. .teamerbox div {
  253. display: block;
  254. min-width: 128px;
  255. padding: 0 16px;
  256. text-align: center;
  257. height: 48px;
  258. line-height: 48px;
  259. background: #D4E4ED;
  260. border-radius: 2px;
  261. margin-left: 40px;
  262. }
  263. .teamerbox div.nowteam {
  264. background-color: #249EFB;
  265. border-radius: 4px;
  266. color: #ffffff;
  267. }
  268. .everyshareword{
  269. display: block;
  270. width: 100%;
  271. padding: 36px 20px 24px;
  272. position: relative;
  273. .myquestion{
  274. display: block;
  275. width: 100%;
  276. border-bottom: 1px solid #DDEEFB;/*no*/
  277. padding-right: 20px;
  278. padding-bottom: 24px;
  279. padding-left: 42px;
  280. box-sizing: border-box;
  281. position: relative;
  282. .answerlogo{
  283. display:block;
  284. width: 32px;
  285. height: 32px;
  286. background: #249efb;
  287. border-radius: 4px;
  288. position: absolute;
  289. top: 4px;
  290. left: 4px;
  291. }
  292. .rightanswerbox{
  293. display:block;
  294. width: 100%;
  295. }
  296. .imgarrbox{
  297. display:block;
  298. margin-top:18px;
  299. }
  300. .imgarrbox img{
  301. display:block;
  302. width: 76px;
  303. height: 76px;
  304. border: 1px solid #F0F4F7;/*no*/
  305. margin-right:12px;
  306. }
  307. }
  308. .myanswerbox{
  309. display: block;
  310. width: 100%;
  311. padding: 20px 20px 0 42px;
  312. position: relative;
  313. .answerlogo{
  314. display:block;
  315. width: 32px;
  316. height: 32px;
  317. background: #F54D64;
  318. border-radius: 4px;
  319. position: absolute;
  320. top: 20px;
  321. left: 4px;
  322. }
  323. .rightanswerbox{
  324. display:block;
  325. width: 100%;
  326. }
  327. .otherfootbox{
  328. margin-top: 20px;
  329. }
  330. .approvebtn{
  331. display:block;
  332. padding: 0 16px;
  333. height:48px;
  334. font-size:26px;
  335. line-height:48px;
  336. }
  337. }
  338. }
  339. .everyanswerbox{
  340. display:block;
  341. width:100%;
  342. padding: 36px 20px 24px;
  343. .answerlogo{
  344. display:block;
  345. width: 32px;
  346. height: 32px;
  347. background: #F54D64;
  348. border-radius: 4px;
  349. position: relative;
  350. top: 4px;
  351. }
  352. .rightanswerbox{
  353. display:block;
  354. margin-left:10px;
  355. width:620px;
  356. }
  357. .questionmsg{
  358. display:block;
  359. width:100%;
  360. padding: 16px 20px;
  361. background: #F0F4F7;
  362. border-radius: 6px;
  363. margin:18px 0;
  364. .imgarrbox{
  365. display:block;
  366. margin-top:18px;
  367. img{
  368. display:block;
  369. width: 76px;
  370. height: 76px;
  371. border: 1px solid #F0F4F7;/*no*/
  372. margin-right:12px;
  373. }
  374. }
  375. }
  376. .approvebtn{
  377. display:block;
  378. height:48px;
  379. font-size:26px;
  380. line-height:48px;
  381. }
  382. }
  383. </style>