materialList.vue 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115
  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" :loading='acceptLoading' 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. <div style="position:relative">
  477. <a-textarea
  478. v-model="videoAdvise"
  479. placeholder="请填写驳回理由"
  480. :auto-size="{ minRows: 3, maxRows: 5 }"
  481. :maxLength='50'
  482. />
  483. <span style="position:absolute;bottom:5px;right:10px;line-height:24px"><span style="color:#1890ff">{{videoAdvise.length}}</span>/50</span>
  484. </div>
  485. </a-modal>
  486. <a-modal v-model="scriptRejectVisiable" title="脚本驳回" width='600px'>
  487. <template slot="footer">
  488. <a-button key="back" @click="()=>{scriptRejectVisiable=false}">取消</a-button>
  489. <a-button type="primary" @click="scriptReject" :loading="loadingElse">确定驳回</a-button>
  490. </template>
  491. <div style="position:relative">
  492. <a-textarea
  493. v-model="scriptAdvise"
  494. placeholder="请填写驳回理由"
  495. :auto-size="{ minRows: 3, maxRows: 5 }"
  496. :maxLength='50'
  497. />
  498. <span style="position:absolute;bottom:5px;right:10px;line-height:24px"><span style="color:#1890ff">{{scriptAdvise.length}}</span>/50</span>
  499. </div>
  500. </a-modal>
  501. </div>
  502. </div>
  503. </div>
  504. </div>
  505. </template>
  506. <script>
  507. import moment from 'moment';
  508. import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
  509. import qs from 'qs'
  510. let columns=[
  511. {
  512. title: '物料名称',
  513. dataIndex: 'materialName',
  514. align: 'center',
  515. key: 'materialName',
  516. scopedSlots: { customRender: 'materialName' }
  517. },
  518. {
  519. title: '物料编号',
  520. dataIndex: 'materialId',
  521. align: 'center',
  522. key: 'tag',
  523. scopedSlots: { customRender: 'materialId' }
  524. },
  525. {
  526. title: '物料状态',
  527. dataIndex: 'materialStatus',
  528. align: 'center',
  529. key: 'materialStatus',
  530. scopedSlots: { customRender: 'materialStatus' }
  531. },
  532. {
  533. title: '脚本',
  534. dataIndex: 'scriptStatus',
  535. align: 'center',
  536. key: 'scriptStatus',
  537. scopedSlots: { customRender: 'scriptStatus' }
  538. },
  539. {
  540. title: '视频',
  541. dataIndex: 'videoStatus',
  542. align: 'center',
  543. key: 'videoStatus',
  544. width:250,
  545. scopedSlots: { customRender: 'videoStatus' }
  546. },
  547. {
  548. title: '所属订单',
  549. dataIndex: 'orderTitle',
  550. align: 'center',
  551. key: 'orderTitle',
  552. scopedSlots: { customRender: 'orderTitle' }
  553. },
  554. ]
  555. export default {
  556. name:'material-list',
  557. data() {
  558. const panes = [
  559. { title: '脚本列表', content: '', key: 1 , },
  560. { title: '视频列表', content: '', key: 2 , },
  561. ];
  562. return {
  563. visibleLoading:false,
  564. loadingElse:false,
  565. videoRejectVisiable:false,
  566. scriptRejectVisiable:false,
  567. acceptLoading:false,
  568. videoAdvise:'',
  569. scriptAdvise:'',
  570. currentScript:{},
  571. currentVideo:{},
  572. userInfo:{},
  573. roleCode:'',
  574. panes,
  575. activeKey: 1,
  576. orderInfo:{ },
  577. columns,
  578. data:[],
  579. loading:false,
  580. ipagination: {
  581. current: 1,
  582. pageSize: 10,
  583. // pageSizeOptions: ['10', '20', '30'],
  584. showTotal: (total, range) => {
  585. return range[0] + "-" + range[1] + " 共" + total + "条"
  586. },
  587. showQuickJumper: true,
  588. showSizeChanger:true,
  589. pageSizeOptions: ['10', '30', '50'],
  590. total: 0,
  591. onChange: (current, pageSize) => {
  592. // 切换分页时的回调,
  593. // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
  594. this.ipagination.current = current;
  595. this.ipagination.pageSize= pageSize;
  596. }
  597. },
  598. // 订单进度
  599. materialName:'',
  600. materialId:'',
  601. orderStatus:'',
  602. orderParticipants:"",
  603. orderSponsor:'',
  604. visible: false,
  605. scriptVisible:false,
  606. placement: 'right',
  607. currentMaterial:{},
  608. sizeType:[],
  609. size: "4",
  610. url:{
  611. scriptDetail:'/platform/material/scriptDetail',
  612. videoDetail:'/platform/material/videoDetail',
  613. scriptAccept:'/platform/material/script/accept',
  614. scriptReject:'/platform/material/script/reject',
  615. videoAccept:'/platform/material/video/accept',
  616. videoReject:'/platform/material/video/reject',
  617. }
  618. }
  619. },
  620. methods: {
  621. goOrderDetail(record){
  622. console.log(record)
  623. this.$parent.currentTabComponent='orderDetail';
  624. this.$parent.orderId=record.orderId
  625. },
  626. goPlantForm(){
  627. if(this.$parent.role=='operator'){
  628. this.$parent.currentTabComponent='operatorPlatform'
  629. }else if(this.$parent.role=='designLeader'){
  630. this.$parent.currentTabComponent='designleaderPlatform'
  631. }else if(this.$parent.role=='design'){
  632. this.$parent.currentTabComponent='designPlatform'
  633. }
  634. },
  635. tabChange(key){
  636. console.log(key)
  637. this.tableHttp(key)
  638. },
  639. handleChange(value) {
  640. console.log(`selected ${value}`);
  641. },
  642. filterOption(input, option) {
  643. return (
  644. option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
  645. );
  646. },
  647. // 视频查看详情
  648. viewDetails(record){
  649. console.log(record)
  650. this.currentMaterial=record
  651. if(record.materialStatus>=4){
  652. this.currentVideo={};
  653. this.visible = true;
  654. this.visibleLoading=true
  655. if(record.videoId){
  656. getAction(this.url.videoDetail,{
  657. videoId:record.videoId
  658. }).then(res=>{
  659. console.log(res);
  660. this.visibleLoading=false
  661. if(res.success){
  662. if(res.result){
  663. let tagList=res.result.tag?res.result.tag.split(','):[]
  664. let imgList=res.result.imageUrl?res.result.imageUrl.split(','):[]
  665. // console.log(tagList)
  666. this.currentVideo={
  667. ...res.result,
  668. tagList,
  669. imgList
  670. }
  671. }
  672. }else{
  673. this.currentVideo={};
  674. }
  675. })
  676. }else{
  677. this.currentVideo=record
  678. this.visible = true;
  679. }
  680. }else{
  681. this.$message.error('请等待脚本审核通过后,上传视频')
  682. }
  683. },
  684. // 脚本查看详情
  685. scriptViewDetails(record){
  686. console.log(record)
  687. this.currentMaterial=record
  688. this.currentScript={};
  689. this.scriptVisible = true;
  690. if(record.scriptId){
  691. this.visibleLoading=true
  692. getAction(this.url.scriptDetail,{
  693. scriptId:record.scriptId
  694. }).then(res=>{
  695. console.log(res);
  696. this.visibleLoading=false
  697. if(res.success){
  698. this.currentScript=res.result;
  699. }else{
  700. this.currentScript={};
  701. }
  702. })
  703. }else{
  704. this.currentScript=record
  705. this.scriptVisible = true;
  706. }
  707. },
  708. // 撤回订单
  709. withdrawOrder(){
  710. },
  711. // 更多操作
  712. handleMenuClick(e) {
  713. console.log('click', e);
  714. },
  715. // 验收
  716. checkAccept(record){
  717. console.log(record)
  718. },
  719. onClose() {
  720. this.visible = false;
  721. },
  722. scriptClose() {
  723. this.scriptVisible = false;
  724. },
  725. // 上传素材
  726. uploadMaterial(){
  727. },
  728. sort(pagination, filters, sorter, { currentDataSource }){
  729. this.ipagination.current=pagination.current;
  730. this.ipagination.pageSize=pagination.pageSize;
  731. this.tableHttp(this.activeKey)
  732. },
  733. // 脚本通过审核
  734. scriptApproved(){
  735. this.acceptLoading=true;
  736. getAction('/platform/material/verifyScript',{
  737. materialCode:this.currentMaterial.materialCode,
  738. scriptId:this.currentMaterial.scriptId,
  739. }).then(res=>{
  740. if(res.success){
  741. postAction(this.url.scriptAccept,{
  742. id:this.currentMaterial.materialId,
  743. orderCode:this.currentMaterial.orderCode,
  744. materialCode:this.currentMaterial.materialCode
  745. }).then(res=>{
  746. console.log(res);
  747. this.acceptLoading=false;
  748. this.scriptVisible=false;
  749. if(res.success){
  750. this.$message.success(res.message);
  751. this.tableHttp(this.$parent.materialStatus)
  752. }else{
  753. this.$message.error(res.message)
  754. }
  755. })
  756. }else{
  757. this.acceptLoading=false;
  758. this.scriptVisible=false;
  759. this.tableHttp(this.$parent.materialStatus)
  760. this.$message.error(res.message)
  761. }
  762. })
  763. },
  764. // 脚本驳回
  765. scriptReject(){
  766. this.loadingElse=true
  767. getAction('/platform/material/verifyScript',{
  768. materialCode:this.currentMaterial.materialCode,
  769. scriptId:this.currentMaterial.scriptId,
  770. }).then(res=>{
  771. if(res.success){
  772. if(this.scriptAdvise){
  773. postAction(this.url.scriptReject,{
  774. id:this.currentMaterial.materialId,
  775. scriptAdvise:this.scriptAdvise,
  776. materialCode:this.currentMaterial.materialCode
  777. }).then(res=>{
  778. console.log(res);
  779. this.scriptAdvise=''
  780. this.scriptVisible=false;
  781. this.loadingElse=false;
  782. this.scriptRejectVisiable=false
  783. if(res.success){
  784. this.$message.success(res.message);
  785. this.tableHttp(this.$parent.materialStatus)
  786. }else{
  787. this.$message.error(res.message)
  788. }
  789. })
  790. }else{
  791. this.loadingElse=false;
  792. this.$messgae.error('请填写驳回理由')
  793. }
  794. }else{
  795. this.loadingElse=false;
  796. this.scriptVisible=false;
  797. this.tableHttp(this.$parent.materialStatus)
  798. this.$message.error(res.message)
  799. }
  800. })
  801. },
  802. // 视频通过审核
  803. approved(){
  804. this.acceptLoading=true;
  805. getAction('/platform/material/verifyVideo',{
  806. materialCode:this.currentMaterial.materialCode,
  807. videoId:this.currentMaterial.videoId,
  808. }).then(res=>{
  809. if(res.success){
  810. postAction(this.url.videoAccept,{
  811. id:this.currentMaterial.materialId,
  812. orderCode:this.currentMaterial.orderCode,
  813. materialCode:this.currentMaterial.materialCode,
  814. videoId:this.currentVideo.videoId
  815. }).then(res=>{
  816. console.log(res);
  817. this.acceptLoading=false;
  818. this.visible=false;
  819. if(res.success){
  820. this.$message.success(res.message);
  821. this.tableHttp(this.$parent.materialStatus)
  822. }else{
  823. this.$message.error(res.message)
  824. }
  825. })
  826. }else{
  827. this.$message.error(res.message)
  828. this.acceptLoading=false
  829. this.visible=false;
  830. this.tableHttp(this.$parent.materialStatus)
  831. }
  832. })
  833. },
  834. // 视频驳回
  835. reject(){
  836. this.loadingElse=true
  837. getAction('/platform/material/verifyVideo',{
  838. materialCode:this.currentMaterial.materialCode,
  839. videoId:this.currentMaterial.videoId,
  840. }).then(res=>{
  841. if(res.success){
  842. if(this.videoAdvise){
  843. postAction(this.url.videoReject,{
  844. id:this.currentMaterial.materialId,
  845. videoAdvise:this.videoAdvise,
  846. materialCode:this.currentMaterial.materialCode
  847. }).then(res=>{
  848. console.log(res);
  849. this.videoAdvise='';
  850. this.visible=false;
  851. this.loadingElse=false;
  852. this.videoRejectVisiable=false
  853. if(res.success){
  854. this.$message.success(res.message);
  855. this.tableHttp(this.$parent.materialStatus)
  856. }else{
  857. this.$message.error(res.message)
  858. }
  859. })
  860. }else{
  861. this.loadingElse=false;
  862. this.$message.error('请填写驳回理由')
  863. }
  864. }else{
  865. this.$message.error(res.message)
  866. this.loadingElse=false
  867. this.visible=false;
  868. this.tableHttp(this.$parent.materialStatus)
  869. }
  870. })
  871. },
  872. search(){
  873. },
  874. reset(){
  875. this.materialName='';
  876. this.materialId='';
  877. this.orderStatus='';
  878. this.orderParticipants="";
  879. this.orderSponsor='';
  880. },
  881. tableHttp(type){
  882. this.loading=true;
  883. let params=this.handlerParams(type)
  884. params={
  885. ...params,
  886. pageNo:this.ipagination.current,
  887. pageSize:this.ipagination.pageSize
  888. }
  889. console.log(params)
  890. getAction('/platform/material/listByOperatorUserId',params).then(res=>{
  891. console.log(res);
  892. if(res.success){
  893. this.loading=false;
  894. this.data=res.result.list;
  895. this.ipagination.total=res.result.total;
  896. }
  897. })
  898. },
  899. handlerParams(status){
  900. if(this.$parent.role=='operator'){
  901. if(status==1){
  902. return {
  903. operatorUserId:this.userInfo.id
  904. }
  905. }
  906. }else if(this.$parent.role=='designLeader'){
  907. if(status==1){
  908. return {
  909. materialStatus:0,
  910. design:this.userInfo.id
  911. }
  912. }else if(status==2){
  913. return {
  914. materialStatus:1,
  915. design:this.userInfo.id
  916. }
  917. }
  918. }else if(this.$parent.role=='design'){
  919. if(status==1){
  920. return {
  921. materialStatus:0,
  922. design:this.userInfo.id
  923. }
  924. }else if(status==2){
  925. return {
  926. materialStatus:1,
  927. design:this.userInfo.id
  928. }
  929. }else if(status==3){
  930. return {
  931. materialStatus:3,
  932. design:this.userInfo.id
  933. }
  934. }else if(status==4){
  935. return {
  936. design:this.userInfo.id
  937. }
  938. }
  939. }
  940. },
  941. },
  942. mounted(){
  943. let userInfo=localStorage.getItem('pro__Login_Userinfo');
  944. if(userInfo){
  945. this.userInfo=JSON.parse(userInfo).value
  946. }
  947. this.roleCode=localStorage.getItem('roleCode')
  948. console.log(this.$parent.materialStatus)
  949. this.tableHttp(this.$parent.materialStatus)
  950. this.activeKey=this.$parent.materialStatus
  951. },
  952. activated() {
  953. // this.tableHttp(this.$parent.materialStatus)
  954. },
  955. filters:{
  956. handlerMaterialStatus(val){
  957. let str='';
  958. switch(val){
  959. case 0:
  960. str= '待指派'
  961. break;
  962. case 1:
  963. str= '脚本待上传'
  964. break;
  965. case 2:
  966. str= '脚本待审核'
  967. break;
  968. case 3:
  969. str= '脚本被驳回'
  970. break;
  971. case 4:
  972. str= '视频待上传'
  973. break;
  974. case 5:
  975. str= '视频待审核'
  976. break;
  977. case 6:
  978. str= '视频被驳回'
  979. break;
  980. case 7:
  981. str= '物料已完结'
  982. break;
  983. default:
  984. str='出错了'
  985. break;
  986. }
  987. return str
  988. },
  989. handlerVideoStatus(val){
  990. let str='';
  991. switch(val){
  992. case 0:
  993. str= '待上传'
  994. break;
  995. case 1:
  996. str= '待审核'
  997. break;
  998. case 2:
  999. str= '被驳回'
  1000. break;
  1001. case 3:
  1002. str= '已审核'
  1003. break;
  1004. default:
  1005. str='出错了'
  1006. break;
  1007. }
  1008. return str
  1009. },
  1010. },
  1011. }
  1012. </script>