materialList.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057
  1. <style lang="scss" scoped>
  2. .orderDetail{
  3. ul,li{
  4. margin: 0;
  5. padding: 0;
  6. }
  7. width: 100%;
  8. .topBody{
  9. width: 100%;
  10. background: #FFFFFF;
  11. margin-bottom: 12px;
  12. padding: 20px;
  13. box-sizing: border-box;
  14. .breadcrumb{
  15. height: 22px;
  16. font-size: 12px;
  17. font-family: PingFangSC-Regular, PingFang SC;
  18. font-weight: 400;
  19. color: #000000;
  20. line-height: 22px;
  21. }
  22. .bottom{
  23. display: flex;
  24. position: relative;
  25. justify-content: space-between;
  26. // padding: 20px;
  27. .orderIcon{
  28. width: 28px;
  29. height: 28px;
  30. margin-right: 15px;
  31. img{
  32. width: 100%;
  33. }
  34. }
  35. .tip{
  36. .greet{
  37. width: 300px;
  38. height: 28px;
  39. font-size: 20px;
  40. font-family: PingFangSC-Medium, PingFang SC;
  41. font-weight: 500;
  42. color: rgba(0, 0, 0, 0.85);
  43. line-height: 28px;
  44. margin-bottom: 5px;
  45. }
  46. .descPosition{
  47. font-size: 14px;
  48. font-family: PingFangSC-Regular, PingFang SC;
  49. font-weight: 400;
  50. color: rgba(0, 0, 0, 0.45);
  51. overflow: hidden;
  52. margin-bottom: 0;
  53. li{
  54. height: 22px;
  55. line-height: 22px;
  56. margin-top:3px ;
  57. }
  58. span{
  59. width: 250px;
  60. display: inline-block;
  61. }
  62. }
  63. }
  64. .optBody{
  65. width: 200px;
  66. flex-shrink:0;
  67. // justify-content: flex-end;
  68. text-align: right;
  69. .btnBody{
  70. margin-bottom: 10px;
  71. }
  72. .orderInfo{
  73. display: flex;
  74. justify-content: space-between;
  75. text-align: right;
  76. p{
  77. margin-bottom: 0;
  78. }
  79. .markName{
  80. height: 22px;
  81. font-size: 14px;
  82. font-family: PingFangSC-Regular, PingFang SC;
  83. font-weight: 400;
  84. color: rgba(0, 0, 0, 0.45);
  85. line-height: 22px;
  86. }
  87. .big{
  88. height: 28px;
  89. font-size: 20px;
  90. font-family: PingFangSC-Regular, PingFang SC;
  91. font-weight: 400;
  92. color: rgba(0, 0, 0, 0.85);
  93. line-height: 28px;
  94. }
  95. }
  96. }
  97. }
  98. }
  99. .section{
  100. background: white;
  101. padding:20px ;
  102. .breadcrumb{
  103. height: 22px;
  104. font-size: 12px;
  105. font-family: PingFangSC-Regular, PingFang SC;
  106. font-weight: 400;
  107. color: #000000;
  108. line-height: 22px;
  109. }
  110. .sectionBody{
  111. p{
  112. margin-bottom: 0;
  113. }
  114. .section-item{
  115. background: white;
  116. margin-bottom: 20px;
  117. }
  118. .tabBox{
  119. padding: 15px 20px 0;
  120. display: flex;
  121. flex-wrap: wrap;
  122. position: relative;
  123. .search-item{
  124. margin-bottom: 12px;
  125. width: 30%;
  126. }
  127. .opt-item{
  128. position: absolute;
  129. right: 20px;
  130. top: 16px;
  131. }
  132. }
  133. .sectionHead{
  134. padding: 15px 20px;
  135. // height: 24px;
  136. font-size: 16px;
  137. font-family: PingFangSC-Medium, PingFang SC;
  138. font-weight: 500;
  139. color: rgba(0, 0, 0, 0.85);
  140. line-height: 24px;
  141. border-bottom: 1px solid #E9E9E9;;
  142. .allOrder{
  143. float: right;
  144. }
  145. }
  146. .section-box{
  147. margin-top: 30px;
  148. padding: 20px 20px;
  149. border: 1px solid #E9E9E9;
  150. .description{
  151. margin-top: 10px;
  152. .time{
  153. height: 32px;
  154. line-height: 32px;
  155. }
  156. }
  157. ul{
  158. display: flex;
  159. flex-wrap: wrap;
  160. // justify-content: space-around;
  161. }
  162. li{
  163. width: 30%;
  164. height: 22px;
  165. font-size: 14px;
  166. font-family: PingFangSC-Regular, PingFang SC;
  167. font-weight: 400;
  168. color: rgba(0, 0, 0, 0.85);
  169. line-height: 22px;
  170. text-align: left;
  171. margin-bottom: 15px;
  172. }
  173. .top{
  174. margin-bottom: 25px;
  175. }
  176. .bottom{
  177. h4{
  178. font-size: 15px;
  179. font-family: PingFangSC-Medium, PingFang SC;
  180. font-weight: 600;
  181. color: rgba(0, 0, 0, 0.85);
  182. margin-bottom: 25px;
  183. }
  184. }
  185. .shenhe{
  186. width: 6px;
  187. height: 6px;
  188. display: inline-block;
  189. background: #52C41A;
  190. border-radius: 50%;
  191. position: relative;
  192. top: -2px;
  193. }
  194. .wancheng{
  195. width: 6px;
  196. height: 6px;
  197. display: inline-block;
  198. background: #1890FF;
  199. border-radius: 50%;
  200. // margin-right: 3px;
  201. position: relative;
  202. top: -2px;
  203. }
  204. .bohui{
  205. width: 6px;
  206. height: 6px;
  207. display: inline-block;
  208. background: #F5222D;
  209. border-radius: 50%;
  210. position: relative;
  211. top: -2px;
  212. }
  213. }
  214. }
  215. }
  216. }
  217. .videoBox{
  218. height: 240px;
  219. }
  220. .imgBox{
  221. width: 90%;
  222. }
  223. .videomarterialInfo{
  224. position: relative;
  225. height: 800px;
  226. }
  227. .marterialInfo{
  228. overflow: auto;
  229. height: 800px;
  230. position: relative;
  231. p{margin-bottom: 0;}
  232. ul,li{
  233. margin: 0;
  234. padding: 0;
  235. }
  236. .info-item{
  237. margin-bottom: 20px;
  238. display: flex;
  239. // justify-content: center;
  240. align-items: flex-start;
  241. span{
  242. display: inline-block;
  243. width: 70px;
  244. text-align: left;
  245. flex-shrink: 0;
  246. text-align: right;
  247. }
  248. .ant-tag{
  249. width: auto;
  250. min-width: 50px;
  251. text-align: center;
  252. }
  253. }
  254. .info{
  255. width: 100%;
  256. ul{
  257. width: 100%;
  258. display: flex;
  259. justify-content: space-between;
  260. flex-wrap: wrap;
  261. width: 100%;
  262. }
  263. li{
  264. width: 33.3%;
  265. margin-bottom: 20px;
  266. }
  267. margin-bottom: 0;
  268. }
  269. .bottom-btn{
  270. width: 100%;
  271. text-align: center;
  272. position: absolute;
  273. bottom: 0px;
  274. left: 0;
  275. // margin-top: 20px;
  276. }
  277. .scriptbottom-btn{
  278. width: 100%;
  279. // height: 60px;
  280. line-height: 60px;
  281. text-align: center;
  282. position: absolute;
  283. bottom: 0px;
  284. left: 0;
  285. }
  286. }
  287. </style>
  288. <style lang="less">
  289. .orderDetail{
  290. .ant-timeline-item-head{
  291. background: rgb(240,242,245);
  292. }
  293. .muen{
  294. cursor: pointer;
  295. }
  296. .muen:hover{
  297. color: #1890ff;
  298. }
  299. }
  300. </style>
  301. <template>
  302. <div class="orderDetail ">
  303. <div class="section">
  304. <p class="breadcrumb">
  305. <a-breadcrumb style="display:block;width:100%">
  306. <a-breadcrumb-item ><span class="muen" @click="goPlantForm()">工作台</span></a-breadcrumb-item>
  307. <a-breadcrumb-item>物料列表</a-breadcrumb-item>
  308. </a-breadcrumb>
  309. </p>
  310. <div class="sectionBody">
  311. <!-- <div class="tabBody">
  312. <a-tabs v-model="activeKey" @change='tabChange'>
  313. <a-tab-pane v-for="pane in panes" :key="pane.key" :tab="pane.title" >
  314. </a-tab-pane>
  315. </a-tabs>
  316. </div> -->
  317. <!-- 素材列表 -->
  318. <div class="section-item">
  319. <div class="tabBox">
  320. <!-- <div class="search-item">
  321. <span>名称:</span>
  322. <a-input placeholder="请输入订单名称" allow-clear v-model="materialName" style="width:300px" />
  323. </div>
  324. <div class="search-item">
  325. <span>编号:</span>
  326. <a-input placeholder="请输入订单编号" allow-clear v-model="materialId" style="width:300px" />
  327. </div>
  328. <div class="search-item">
  329. <span>所属订单:</span>
  330. <a-input placeholder="所属订单" allow-clear v-model="orderSponsor" style="width:300px" />
  331. </div>
  332. <div class="opt-item">
  333. <a-button type='primary' @click="search" style="margin-right:20px">查询</a-button>
  334. <a-button type='default' @click="reset">查询</a-button>
  335. </div> -->
  336. </div>
  337. <div class="section-box">
  338. <a-table
  339. size="middle"
  340. :columns="columns"
  341. :dataSource="data"
  342. id="outTable"
  343. :pagination="ipagination"
  344. :loading="loading"
  345. @change="sort"
  346. style="word-break: break-all;"
  347. >
  348. <div slot="materialStatus" slot-scope="text" >
  349. <span class="wancheng" v-if="text==7"> </span>
  350. <span class="bohui" v-else-if="text==6||text==3"> </span>
  351. <span class="shenhe" v-else> </span>
  352. {{text | handlerMaterialStatus}}
  353. </div>
  354. <div slot="scriptStatus" slot-scope="text,record">
  355. <span v-if="record.materialStatus==0">-</span>
  356. <span v-else>
  357. <a href="javascript:;" @click="scriptViewDetails(record)">{{record.planName}}</a>
  358. </span>
  359. </div>
  360. <div slot="videoStatus" slot-scope="text,record">
  361. <span v-if="record.materialStatus==0">-</span>
  362. <span v-else>
  363. <a href="javascript:;" @click="viewDetails(record)">{{record.clipName}}</a>
  364. </span>
  365. </div>
  366. <div slot="orderTitle" slot-scope="text,record">
  367. <a href="javascript:;" @click="goOrderDetail(record)">{{text}}</a>
  368. </div>
  369. </a-table>
  370. </div>
  371. <a-drawer
  372. title="视频详情"
  373. width="700"
  374. :placement="placement"
  375. :closable="false"
  376. :visible="visible"
  377. @close="onClose"
  378. >
  379. <a-spin :spinning="visibleLoading">
  380. <div class="marterialInfo videomarterialInfo">
  381. <div class="info-item">
  382. <span>视频状态:</span>
  383. <p>{{ currentVideo.videoStatus | handlerVideoStatus }}</p>
  384. </div>
  385. <div class="info-item">
  386. <span>视频预览:</span>
  387. <div class="videoBox" v-if="currentVideo.videoStatus==1||currentVideo.videoStatus==3">
  388. <video style="height:100%" :src="currentVideo.url" v-if="currentVideo.url" controls></video>
  389. <img :src="defaultPic" alt="" style="height:100%" v-else>
  390. </div>
  391. </div>
  392. <div class="info-item">
  393. <span>封面预览:</span>
  394. <div class="imgBox" v-if="currentVideo.imgList&&currentVideo.imgList.length">
  395. <img alt="" style="width:100px;margin:0 10px 8px 0" v-for="(item,index) in currentVideo.imgList" :key='index' :src="item">
  396. </div>
  397. <div v-else>
  398. <span>暂无封面</span>
  399. </div>
  400. </div>
  401. <div class="info-item" v-if="currentVideo.videoStatus==1">
  402. <span>视频标签:</span>
  403. <p>
  404. <a-tag v-for="(item,index) in currentVideo.tagList" :key="index" style="margin-bottom:8px">{{item}}</a-tag>
  405. <!-- {{currentVideo.tag}} -->
  406. </p>
  407. </div>
  408. <div class="info-item info">
  409. <ul>
  410. <li><span>编导:</span> {{ currentVideo.planName }} </li>
  411. <li><span>拍摄:</span> {{ currentVideo.shotName }} </li>
  412. <li><span>剪辑:</span> {{ currentVideo.clipName }} </li>
  413. </ul>
  414. </div>
  415. <div class="info-item" v-if="currentVideo.videoStatus==2">
  416. <span>驳回理由:</span>
  417. <p>{{ currentVideo.videoAdvise }}</p>
  418. </div>
  419. <div class="bottom-btn">
  420. <a-button type='primary' @click="approved" v-if="currentMaterial.materialStatus==5" :loading='acceptLoading' style="margin-right:20px">通过审核</a-button>
  421. <a-button type='default' @click="()=>{videoRejectVisiable=true}" v-if="currentMaterial.materialStatus==5" style="margin-right:20px">驳回</a-button>
  422. <a-button type='default' @click="onClose">关闭</a-button>
  423. </div>
  424. </div>
  425. </a-spin>
  426. </a-drawer>
  427. <a-drawer
  428. title="脚本详情"
  429. width="600"
  430. :placement="placement"
  431. :closable="false"
  432. :visible="scriptVisible"
  433. @close="scriptClose"
  434. >
  435. <a-spin :spinning="visibleLoading">
  436. <div class="marterialInfo">
  437. <div class="info-item">
  438. <span>脚本状态:</span>
  439. <p>{{ currentScript.scriptStatus | handlerVideoStatus }}</p>
  440. </div>
  441. <div class="info-item">
  442. <span>所属项目:</span>
  443. <p>{{currentScript.projectName}}</p>
  444. </div>
  445. <div class="info-item">
  446. <span>所属物料:</span>
  447. <p>{{currentScript.materialName}}</p>
  448. </div>
  449. <div class="info-item">
  450. <span>编导:</span>
  451. <p>{{currentScript.planName}}</p>
  452. </div>
  453. <div class="info-item" v-if="currentScript.scriptStatus==2">
  454. <span>驳回理由:</span>
  455. <p>{{currentScript.scriptAdvise}}</p>
  456. </div>
  457. <div class="info-item">
  458. <span>脚本:</span>
  459. <p v-if="currentScript.scriptStatus==0">暂无</p>
  460. <p v-else><a :href="currentScript.url">{{currentScript.scriptName}}</a></p>
  461. </div>
  462. <div class="scriptbottom-btn">
  463. <a-button type='primary' @click="scriptApproved" v-if="currentMaterial.materialStatus==2" style="margin-right:20px" >通过审核</a-button>
  464. <a-button type='default' v-if="currentMaterial.materialStatus==2" @click="()=>{scriptRejectVisiable=true}" style="margin-right:20px">驳回</a-button>
  465. <a-button type='default' @click="scriptClose">关闭</a-button>
  466. </div>
  467. </div>
  468. </a-spin>
  469. </a-drawer>
  470. <!-- bohui -->
  471. <a-modal v-model="videoRejectVisiable" title="视频驳回" width='600px'>
  472. <template slot="footer">
  473. <a-button key="back" @click="()=>{videoRejectVisiable=false}">取消</a-button>
  474. <a-button type="primary" @click="reject" :loading="loadingElse">确定驳回</a-button>
  475. </template>
  476. <a-textarea
  477. v-model="videoAdvise"
  478. placeholder="请填写驳回理由"
  479. :auto-size="{ minRows: 3, maxRows: 5 }"
  480. />
  481. </a-modal>
  482. <a-modal v-model="scriptRejectVisiable" title="脚本驳回" width='600px'>
  483. <template slot="footer">
  484. <a-button key="back" @click="()=>{scriptRejectVisiable=false}">取消</a-button>
  485. <a-button type="primary" @click="scriptReject" :loading="loadingElse">确定驳回</a-button>
  486. </template>
  487. <a-textarea
  488. v-model="scriptAdvise"
  489. placeholder="请填写驳回理由"
  490. :auto-size="{ minRows: 3, maxRows: 5 }"
  491. />
  492. </a-modal>
  493. </div>
  494. </div>
  495. </div>
  496. </div>
  497. </template>
  498. <script>
  499. import moment from 'moment';
  500. import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
  501. import qs from 'qs'
  502. let columns=[
  503. {
  504. title: '物料名称',
  505. dataIndex: 'materialName',
  506. align: 'center',
  507. key: 'materialName',
  508. scopedSlots: { customRender: 'materialName' }
  509. },
  510. {
  511. title: '物料编号',
  512. dataIndex: 'materialId',
  513. align: 'center',
  514. key: 'tag',
  515. scopedSlots: { customRender: 'materialId' }
  516. },
  517. {
  518. title: '物料状态',
  519. dataIndex: 'materialStatus',
  520. align: 'center',
  521. key: 'materialStatus',
  522. scopedSlots: { customRender: 'materialStatus' }
  523. },
  524. {
  525. title: '脚本',
  526. dataIndex: 'scriptStatus',
  527. align: 'center',
  528. key: 'scriptStatus',
  529. scopedSlots: { customRender: 'scriptStatus' }
  530. },
  531. {
  532. title: '视频',
  533. dataIndex: 'videoStatus',
  534. align: 'center',
  535. key: 'videoStatus',
  536. width:250,
  537. scopedSlots: { customRender: 'videoStatus' }
  538. },
  539. {
  540. title: '所属订单',
  541. dataIndex: 'orderTitle',
  542. align: 'center',
  543. key: 'orderTitle',
  544. scopedSlots: { customRender: 'orderTitle' }
  545. },
  546. ]
  547. export default {
  548. name:'material-list',
  549. data() {
  550. const panes = [
  551. { title: '脚本列表', content: '', key: 1 , },
  552. { title: '视频列表', content: '', key: 2 , },
  553. ];
  554. return {
  555. visibleLoading:false,
  556. loadingElse:false,
  557. videoRejectVisiable:false,
  558. scriptRejectVisiable:false,
  559. acceptLoading:false,
  560. videoAdvise:'',
  561. scriptAdvise:'',
  562. currentScript:{},
  563. currentVideo:{},
  564. userInfo:{},
  565. roleCode:'',
  566. panes,
  567. activeKey: 1,
  568. orderInfo:{ },
  569. columns,
  570. data:[],
  571. loading:false,
  572. ipagination: {
  573. current: 1,
  574. pageSize: 10,
  575. // pageSizeOptions: ['10', '20', '30'],
  576. showTotal: (total, range) => {
  577. return range[0] + "-" + range[1] + " 共" + total + "条"
  578. },
  579. showQuickJumper: true,
  580. showSizeChanger:true,
  581. pageSizeOptions: ['10', '30', '50'],
  582. total: 0,
  583. onChange: (current, pageSize) => {
  584. // 切换分页时的回调,
  585. // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
  586. this.ipagination.current = current;
  587. this.ipagination.pageSize= pageSize;
  588. }
  589. },
  590. // 订单进度
  591. materialName:'',
  592. materialId:'',
  593. orderStatus:'',
  594. orderParticipants:"",
  595. orderSponsor:'',
  596. visible: false,
  597. scriptVisible:false,
  598. placement: 'right',
  599. currentMaterial:{},
  600. sizeType:[],
  601. size: "4",
  602. url:{
  603. scriptDetail:'/platform/material/scriptDetail',
  604. videoDetail:'/platform/material/videoDetail',
  605. scriptAccept:'/platform/material/script/accept',
  606. scriptReject:'/platform/material/script/reject',
  607. videoAccept:'/platform/material/video/accept',
  608. videoReject:'/platform/material/video/reject',
  609. }
  610. }
  611. },
  612. methods: {
  613. goOrderDetail(record){
  614. console.log(record)
  615. this.$parent.currentTabComponent='orderDetail';
  616. this.$parent.orderId=record.orderId
  617. },
  618. goPlantForm(){
  619. if(this.$parent.role=='operator'){
  620. this.$parent.currentTabComponent='operatorPlatform'
  621. }else if(this.$parent.role=='designLeader'){
  622. this.$parent.currentTabComponent='designleaderPlatform'
  623. }else if(this.$parent.role=='design'){
  624. this.$parent.currentTabComponent='designPlatform'
  625. }
  626. },
  627. tabChange(key){
  628. console.log(key)
  629. this.tableHttp(key)
  630. },
  631. handleChange(value) {
  632. console.log(`selected ${value}`);
  633. },
  634. filterOption(input, option) {
  635. return (
  636. option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
  637. );
  638. },
  639. // 视频查看详情
  640. viewDetails(record){
  641. console.log(record)
  642. this.currentMaterial=record
  643. if(record.materialStatus>=4){
  644. this.currentVideo={};
  645. this.visible = true;
  646. this.visibleLoading=true
  647. if(record.videoId){
  648. getAction(this.url.videoDetail,{
  649. videoId:record.videoId
  650. }).then(res=>{
  651. console.log(res);
  652. this.visibleLoading=false
  653. if(res.success){
  654. if(res.result){
  655. let tagList=res.result.tag?res.result.tag.split(','):[]
  656. let imgList=res.result.imageUrl?res.result.imageUrl.split(','):[]
  657. // console.log(tagList)
  658. this.currentVideo={
  659. ...res.result,
  660. tagList,
  661. imgList
  662. }
  663. }
  664. }else{
  665. this.currentVideo={};
  666. }
  667. })
  668. }else{
  669. this.currentVideo=record
  670. this.visible = true;
  671. }
  672. }else{
  673. this.$message.error('请等待脚本审核通过后,上传视频')
  674. }
  675. },
  676. // 脚本查看详情
  677. scriptViewDetails(record){
  678. console.log(record)
  679. this.currentMaterial=record
  680. this.currentScript={};
  681. this.scriptVisible = true;
  682. if(record.scriptId){
  683. this.visibleLoading=true
  684. getAction(this.url.scriptDetail,{
  685. scriptId:record.scriptId
  686. }).then(res=>{
  687. console.log(res);
  688. this.visibleLoading=false
  689. if(res.success){
  690. this.currentScript=res.result;
  691. }else{
  692. this.currentScript={};
  693. }
  694. })
  695. }else{
  696. this.currentScript=record
  697. this.scriptVisible = true;
  698. }
  699. },
  700. // 撤回订单
  701. withdrawOrder(){
  702. },
  703. // 更多操作
  704. handleMenuClick(e) {
  705. console.log('click', e);
  706. },
  707. // 验收
  708. checkAccept(record){
  709. console.log(record)
  710. },
  711. onClose() {
  712. this.visible = false;
  713. },
  714. scriptClose() {
  715. this.scriptVisible = false;
  716. },
  717. // 上传素材
  718. uploadMaterial(){
  719. },
  720. sort(pagination, filters, sorter, { currentDataSource }){
  721. this.ipagination.current=pagination.current;
  722. this.ipagination.pageSize=pagination.pageSize;
  723. this.tableHttp(this.activeKey)
  724. },
  725. // 脚本通过审核
  726. scriptApproved(){
  727. postAction(this.url.scriptAccept,{
  728. id:this.currentMaterial.materialId,
  729. orderCode:this.currentMaterial.orderCode,
  730. materialCode:this.currentMaterial.materialCode
  731. }).then(res=>{
  732. console.log(res);
  733. this.scriptVisible=false;
  734. if(res.success){
  735. this.$message.success(res.message);
  736. this.tableHttp(this.$parent.materialStatus)
  737. }else{
  738. this.$message.error(res.message)
  739. }
  740. })
  741. },
  742. // 脚本驳回
  743. scriptReject(){
  744. this.loadingElse=true
  745. if(this.scriptAdvise){
  746. postAction(this.url.scriptReject,{
  747. id:this.currentMaterial.materialId,
  748. scriptAdvise:this.scriptAdvise,
  749. materialCode:this.currentMaterial.materialCode
  750. }).then(res=>{
  751. console.log(res);
  752. this.scriptAdvise=''
  753. this.scriptVisible=false;
  754. this.loadingElse=false;
  755. this.scriptRejectVisiable=false
  756. if(res.success){
  757. this.$message.success(res.message);
  758. this.tableHttp(this.$parent.materialStatus)
  759. }else{
  760. this.$message.error(res.message)
  761. }
  762. })
  763. }else{
  764. this.loadingElse=false;
  765. this.$messgae.error('请填写驳回理由')
  766. }
  767. },
  768. // 视频通过审核
  769. approved(){
  770. this.acceptLoading=true;
  771. postAction(this.url.videoAccept,{
  772. id:this.currentMaterial.materialId,
  773. orderCode:this.currentMaterial.orderCode,
  774. materialCode:this.currentMaterial.materialCode,
  775. videoId:this.currentVideo.videoId
  776. }).then(res=>{
  777. console.log(res);
  778. this.acceptLoading=false;
  779. this.visible=false;
  780. if(res.success){
  781. this.$message.success(res.message);
  782. this.tableHttp(this.$parent.materialStatus)
  783. }else{
  784. this.$message.error(res.message)
  785. }
  786. })
  787. },
  788. // 视频驳回
  789. reject(){
  790. this.loadingElse=true
  791. if(this.videoAdvise){
  792. postAction(this.url.videoReject,{
  793. id:this.currentMaterial.materialId,
  794. videoAdvise:this.videoAdvise,
  795. materialCode:this.currentMaterial.materialCode
  796. }).then(res=>{
  797. console.log(res);
  798. this.videoAdvise='';
  799. this.visible=false;
  800. this.loadingElse=false;
  801. this.videoRejectVisiable=false
  802. if(res.success){
  803. this.$message.success(res.message);
  804. this.tableHttp(this.$parent.materialStatus)
  805. }else{
  806. this.$message.error(res.message)
  807. }
  808. })
  809. }else{
  810. this.loadingElse=false;
  811. this.$message.error('请填写驳回理由')
  812. }
  813. },
  814. search(){
  815. },
  816. reset(){
  817. this.materialName='';
  818. this.materialId='';
  819. this.orderStatus='';
  820. this.orderParticipants="";
  821. this.orderSponsor='';
  822. },
  823. tableHttp(type){
  824. this.loading=true;
  825. let params=this.handlerParams(type)
  826. params={
  827. ...params,
  828. pageNo:this.ipagination.current,
  829. pageSize:this.ipagination.pageSize
  830. }
  831. console.log(params)
  832. getAction('/platform/material/listByOperatorUserId',params).then(res=>{
  833. console.log(res);
  834. if(res.success){
  835. this.loading=false;
  836. this.data=res.result.list;
  837. this.ipagination.total=res.result.total;
  838. }
  839. })
  840. },
  841. handlerParams(status){
  842. if(this.$parent.role=='operator'){
  843. if(status==1){
  844. return {
  845. operatorUserId:this.userInfo.id
  846. }
  847. }
  848. }else if(this.$parent.role=='designLeader'){
  849. if(status==1){
  850. return {
  851. materialStatus:0,
  852. design:this.userInfo.id
  853. }
  854. }else if(status==2){
  855. return {
  856. materialStatus:1,
  857. design:this.userInfo.id
  858. }
  859. }
  860. }else if(this.$parent.role=='design'){
  861. if(status==1){
  862. return {
  863. materialStatus:0,
  864. design:this.userInfo.id
  865. }
  866. }else if(status==2){
  867. return {
  868. materialStatus:1,
  869. design:this.userInfo.id
  870. }
  871. }else if(status==3){
  872. return {
  873. materialStatus:3,
  874. design:this.userInfo.id
  875. }
  876. }else if(status==4){
  877. return {
  878. design:this.userInfo.id
  879. }
  880. }
  881. }
  882. },
  883. },
  884. mounted(){
  885. let userInfo=localStorage.getItem('pro__Login_Userinfo');
  886. if(userInfo){
  887. this.userInfo=JSON.parse(userInfo).value
  888. }
  889. this.roleCode=localStorage.getItem('roleCode')
  890. console.log(this.$parent.materialStatus)
  891. this.tableHttp(this.$parent.materialStatus)
  892. this.activeKey=this.$parent.materialStatus
  893. },
  894. activated() {
  895. // this.tableHttp(this.$parent.materialStatus)
  896. },
  897. filters:{
  898. handlerMaterialStatus(val){
  899. let str='';
  900. switch(val){
  901. case 0:
  902. str= '待指派'
  903. break;
  904. case 1:
  905. str= '脚本待上传'
  906. break;
  907. case 2:
  908. str= '脚本待审核'
  909. break;
  910. case 3:
  911. str= '脚本被驳回'
  912. break;
  913. case 4:
  914. str= '视频待上传'
  915. break;
  916. case 5:
  917. str= '视频待审核'
  918. break;
  919. case 6:
  920. str= '视频被驳回'
  921. break;
  922. case 7:
  923. str= '物料已完结'
  924. break;
  925. default:
  926. str='出错了'
  927. break;
  928. }
  929. return str
  930. },
  931. handlerVideoStatus(val){
  932. let str='';
  933. switch(val){
  934. case 0:
  935. str= '待上传'
  936. break;
  937. case 1:
  938. str= '待审核'
  939. break;
  940. case 2:
  941. str= '被驳回'
  942. break;
  943. case 3:
  944. str= '已审核'
  945. break;
  946. default:
  947. str='出错了'
  948. break;
  949. }
  950. return str
  951. },
  952. },
  953. }
  954. </script>