orderDetail.vue 106 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615
  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: 350px;
  60. display: inline-block;
  61. overflow: hidden;
  62. text-overflow: ellipsis;
  63. white-space: nowrap;
  64. }
  65. }
  66. }
  67. .optBody{
  68. width: 200px;
  69. flex-shrink:0;
  70. // justify-content: flex-end;
  71. text-align: right;
  72. .btnBody{
  73. margin-bottom: 10px;
  74. display: flex;
  75. justify-content: space-between;
  76. }
  77. .orderInfo{
  78. display: flex;
  79. justify-content: space-between;
  80. text-align: right;
  81. p{
  82. margin-bottom: 0;
  83. }
  84. .markName{
  85. height: 22px;
  86. font-size: 14px;
  87. font-family: PingFangSC-Regular, PingFang SC;
  88. font-weight: 400;
  89. color: rgba(0, 0, 0, 0.45);
  90. line-height: 22px;
  91. }
  92. .big{
  93. height: 28px;
  94. font-size: 20px;
  95. font-family: PingFangSC-Regular, PingFang SC;
  96. font-weight: 400;
  97. color: rgba(0, 0, 0, 0.85);
  98. line-height: 28px;
  99. }
  100. }
  101. }
  102. }
  103. }
  104. .section{
  105. .sectionBody{
  106. p{
  107. margin-bottom: 0;
  108. }
  109. .section-item{
  110. background: white;
  111. margin-bottom: 20px;
  112. }
  113. .tabBox{
  114. padding: 15px 20px 0;
  115. }
  116. .sectionHead{
  117. padding: 15px 20px;
  118. // height: 24px;
  119. font-size: 16px;
  120. font-family: PingFangSC-Medium, PingFang SC;
  121. font-weight: 500;
  122. color: rgba(0, 0, 0, 0.85);
  123. line-height: 24px;
  124. border-bottom: 1px solid #E9E9E9;;
  125. .allOrder{
  126. float: right;
  127. }
  128. }
  129. .section-box{
  130. padding: 20px 20px;
  131. .description{
  132. margin-top: 10px;
  133. .time{
  134. height: 32px;
  135. line-height: 32px;
  136. }
  137. }
  138. ul{
  139. display: flex;
  140. flex-wrap: wrap;
  141. // justify-content: space-around;
  142. }
  143. li{
  144. width: 30%;
  145. height: 22px;
  146. font-size: 14px;
  147. font-family: PingFangSC-Regular, PingFang SC;
  148. font-weight: 400;
  149. color: rgba(0, 0, 0, 0.85);
  150. line-height: 22px;
  151. text-align: left;
  152. margin-bottom: 15px;
  153. }
  154. .top{
  155. margin-bottom: 25px;
  156. }
  157. .bottom{
  158. h4{
  159. font-size: 15px;
  160. font-family: PingFangSC-Medium, PingFang SC;
  161. font-weight: 600;
  162. color: rgba(0, 0, 0, 0.85);
  163. margin-bottom: 25px;
  164. }
  165. ul{
  166. width: 850px;
  167. display: flex;
  168. justify-content: space-between;
  169. padding: 0 15px;
  170. li{
  171. width: 400px;
  172. height: 32px;
  173. line-height: 32px;
  174. padding: 0 10px;
  175. box-sizing: border-box;
  176. cursor: pointer;
  177. text-overflow: ellipsis;
  178. overflow: hidden;
  179. white-space: nowrap;
  180. background: rgba(245, 245, 245, 0.5);
  181. border-radius: 5px;;
  182. }
  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. border: 1px solid rgb(245, 245, 245 );
  220. text-align: center;
  221. }
  222. .imgBox{
  223. // height: 180px;
  224. }
  225. .videomarterialInfo{
  226. position: relative;
  227. // height: 800px;
  228. }
  229. .marterialInfo{
  230. overflow: auto;
  231. // height: 800px;
  232. position: relative;
  233. p{margin-bottom: 0;}
  234. ul,li{
  235. margin: 0;
  236. padding: 0;
  237. }
  238. .info-item{
  239. margin-bottom: 20px;
  240. display: flex;
  241. // justify-content: center;
  242. align-items: flex-start;
  243. span{
  244. display: inline-block;
  245. width: 70px;
  246. text-align: left;
  247. flex-shrink: 0;
  248. text-align: right;
  249. }
  250. .ant-tag{
  251. width: auto;
  252. min-width: 50px;
  253. text-align: center;
  254. }
  255. }
  256. .info{
  257. ul{
  258. display: flex;
  259. width: 100%;
  260. justify-content: space-between;
  261. flex-wrap: wrap;
  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. .ant-steps-item-content{
  300. width: 160px;
  301. }
  302. }
  303. </style>
  304. <template>
  305. <div class="orderDetail ">
  306. <a-spin :spinning="pageSpinning">
  307. <div class="topBody">
  308. <p class="breadcrumb">
  309. <a-breadcrumb style="display:block;width:100%">
  310. <a-breadcrumb-item ><span class="muen" @click="goPlantForm()">工作台</span></a-breadcrumb-item>
  311. <a-breadcrumb-item>订单详情</a-breadcrumb-item>
  312. </a-breadcrumb>
  313. </p>
  314. <div class="bottom">
  315. <div class="left" style="display:flex;width:70%">
  316. <div class="orderIcon">
  317. <img src="@/assets/orderIcon.png" alt="">
  318. </div>
  319. <div class='tip'>
  320. <p class="greet">{{currentOrderInfo.orderTitle}}</p>
  321. <p class="descPosition">
  322. <ul>
  323. <li>
  324. <span>订单编号:{{currentOrderInfo.id}}</span>
  325. <span>订单周期:{{currentOrderInfo.startDate+'~'+currentOrderInfo.endDate}}</span>
  326. </li>
  327. <li>
  328. <span>订单发起人:{{currentOrderInfo.createByName}}</span>
  329. <span>关联项目:{{currentOrderInfo.projectName}}</span>
  330. </li>
  331. <li>
  332. <span>创建时间:{{currentOrderInfo.createTime}}</span>
  333. <span>设计负责人:{{currentOrderInfo.designName}}</span>
  334. </li>
  335. <li v-if="currentOrderInfo.orderStatus==2">
  336. 驳回理由:{{currentOrderInfo.orderAdvice}}
  337. </li>
  338. </ul>
  339. </p>
  340. </div>
  341. </div>
  342. <div class="optBody">
  343. <div class="btnBody" v-if="role=='designLeader'">
  344. <a-button type='primary' @click="confirmOrder" :loading='confirmOrderBtnLoading' v-if="currentOrderInfo.orderStatus==0">确定订单</a-button>
  345. <a-button type='default' @click="()=>{orderRejectVisiable=true}" :loading='rejectOrderBtnLoading' v-if="currentOrderInfo.orderStatus==0">
  346. 驳回订单</a-button>
  347. </div>
  348. <div class="btnBody" v-if="role=='operator'">
  349. <a-popconfirm
  350. title="确定要撤回订单吗?"
  351. ok-text="撤回"
  352. cancel-text="取消"
  353. @confirm="withdrawOrderConfirm"
  354. @cancel="withdrawOrderCancel"
  355. >
  356. <a-button type='default' :loading='withdrawOrderBtnLoading' v-if="currentOrderInfo.orderStatus==0">撤回订单</a-button>
  357. </a-popconfirm>
  358. <a-button type='default' @click="editOrder" :loading='editOrderBtnLoading' v-if="currentOrderInfo.orderStatus==0||currentOrderInfo.orderStatus==2">修改订单</a-button>
  359. </div>
  360. <div class="orderInfo">
  361. <div>
  362. <p class="markName">状态</p>
  363. <p class="big">{{ currentOrderInfo.orderStatus | handlerOrderStatus}}</p>
  364. </div>
  365. <div>
  366. <p class="markName">订单完成度</p>
  367. <p class="big">{{Math.round((currentOrderInfo.materialFinishAmount/currentOrderInfo.materialAmount)*100)|| 0 }}%</p>
  368. </div>
  369. </div>
  370. </div>
  371. <a-modal v-model="orderRejectVisiable" title="订单驳回" width='600px'>
  372. <template slot="footer">
  373. <a-button key="back" @click="()=>{orderRejectVisiable=false}">取消</a-button>
  374. <a-button type="primary" @click="rejectOrder" :loading="loadingElse">确定驳回</a-button>
  375. </template>
  376. <div style="position:relative">
  377. <a-textarea
  378. v-model="orderAdvice"
  379. placeholder="请填写驳回理由"
  380. :auto-size="{ minRows: 3, maxRows: 5 }"
  381. :maxLength='50'
  382. />
  383. <span style="position:absolute;bottom:5px;right:10px;line-height:24px"><span style="color:#1890ff">{{orderAdvice.length}}</span>/50</span>
  384. </div>
  385. </a-modal>
  386. </div>
  387. </div>
  388. <div class="section">
  389. <div class="sectionBody">
  390. <!-- 订单进度 -->
  391. <div class="section-item">
  392. <div class="sectionHead">订单进度</div>
  393. <div class="section-box">
  394. <a-steps progress-dot :current="currentStep">
  395. <a-step title="创建订单" >
  396. <div class="description" slot="description" v-if="currentStep>=0">
  397. <p class="people">{{currentOrderInfo.createByName}}</p>
  398. <p class="time">{{currentOrderInfo.createTime}}</p>
  399. </div>
  400. </a-step>
  401. <a-step title="设计组长接单" >
  402. <div class="description" slot="description" v-if="currentStep>=1">
  403. <p class="people">{{currentOrderInfo.designName}}</p>
  404. <p class="time" v-if="currentStep>1">{{currentOrderInfo.designPassTime}}</p>
  405. </div>
  406. </a-step>
  407. <a-step title="素材制作" >
  408. <div class="description" slot="description" v-if="currentStep>=2">
  409. <p class="people"></p>
  410. <p class="time" v-if="currentStep>=2">{{currentOrderInfo.materialFinishTime?currentOrderInfo.materialFinishTime:currentOrderInfo.designPassTime }}</p>
  411. </div>
  412. </a-step>
  413. <a-step title="订单完成" >
  414. <div class="description" slot="description" v-if="currentStep>=3">
  415. <p class="people">{{currentOrderInfo.createByName}}</p>
  416. <p class="time" v-if="currentStep==3">{{currentOrderInfo.orderFinishTime}}</p>
  417. </div>
  418. </a-step>
  419. </a-steps>
  420. </div>
  421. </div>
  422. <!-- 订单详情 -->
  423. <div class="section-item">
  424. <div class="sectionHead">订单详情</div>
  425. <div class="section-box">
  426. <div class="top">
  427. <ul>
  428. <li>
  429. 订单所含物料总数:<span>{{currentOrderInfo.materialAmount}}</span>
  430. </li>
  431. <li>
  432. 真人物料数:<span>{{currentOrderInfo.realAmount}}</span>
  433. </li>
  434. <li>
  435. 投放系统:<span>{{currentOrderInfo.sysName|handlerSysName}}</span>
  436. </li>
  437. <li>
  438. 要求日更物料数:<span>{{currentOrderInfo.materialAmountDay}}</span>
  439. </li>
  440. <li>
  441. 剪辑物料数:<span>{{currentOrderInfo.cutAmount}}</span>
  442. </li>
  443. <li>
  444. APK包:<span>{{currentOrderInfo.sysPackage || '无'}}</span>
  445. </li>
  446. </ul>
  447. </div>
  448. <div class="bottom">
  449. <h4>附件</h4>
  450. <ul>
  451. <li>
  452. <a :href="currentOrderInfo.attachmentUrl" v-if="currentOrderInfo.attachmentUrl">{{currentOrderInfo.attachmentName }}</a>
  453. <span v-else>无</span>
  454. </li>
  455. </ul>
  456. </div>
  457. <div class="bottom">
  458. <h4>备注</h4>
  459. <p style="line-height:24px;text-indent:2em">{{currentOrderInfo.orderRemark}}</p>
  460. </div>
  461. </div>
  462. </div>
  463. <!-- 素材列表 -->
  464. <div class="section-item" v-if="currentOrderInfo.orderStatus==1||currentOrderInfo.orderStatus==3">
  465. <!-- <div class="tabBox">
  466. <a-tabs v-model="tabKey" @change="tabChange">
  467. <a-tab-pane :key='1' tab="真人物料"></a-tab-pane>
  468. <a-tab-pane :key='2' tab="剪辑物料"></a-tab-pane>
  469. </a-tabs>
  470. </div> -->
  471. <div class="section-box">
  472. <a-tabs v-model="activeType" @change="callback">
  473. <a-tab-pane key="1" tab="真人"></a-tab-pane>
  474. <a-tab-pane key="2" tab="剪辑" force-render></a-tab-pane>
  475. </a-tabs>
  476. <a-button type="primary" @click="getTemplate" :disabled="selectedRowKeys.length==0"> 批量指派</a-button>
  477. <a-table
  478. size="middle"
  479. :columns="columns"
  480. :dataSource="data"
  481. id="outTable"
  482. rowKey="id"
  483. :pagination="ipagination"
  484. :loading="loading"
  485. @change="sort"
  486. style="word-break: break-all;"
  487. :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,getCheckboxProps:getCheckboxProps }"
  488. >
  489. <div slot="materialStatus" slot-scope="text" >
  490. <!-- <a-spin :spinning="record.spin" size="small" >
  491. <div class="spin-content">
  492. <a-switch size="default" :checked=text @change="switchChange(text,record)"/>
  493. </div>
  494. </a-spin>
  495. <a-switch size="default" :checked=text @change="switchChange(text,record)"/> -->
  496. <span class="wancheng" v-if="text==7"> </span>
  497. <span class="bohui" v-else-if="text==3 || text==6"> </span>
  498. <span class="shenhe" v-else> </span>
  499. {{text | handlerMaterialStatus}}
  500. </div>
  501. <span slot="scriptStatus" slot-scope="text,record">
  502. <span v-if="record.materialStatus==0">
  503. <a href="javascript:;" v-if="role=='designLeader'" @click="scriptAssign(record)">指派</a>
  504. <span v-else>-</span>
  505. </span>
  506. <span v-else>
  507. <a href="javascript:;" @click="scriptViewDetails(record)">{{record.planName}}</a>
  508. </span>
  509. </span>
  510. <span slot="videoStatus" slot-scope="text,record">
  511. <span v-if="record.materialStatus==0">
  512. <a href="javascript:;" v-if="role=='designLeader'" @click="scriptAssign(record)">指派</a>
  513. <span v-else>-</span>
  514. </span>
  515. <span v-else>
  516. <a href="javascript:;" @click="viewDetails(record)">{{record.clipName}}</a>
  517. </span>
  518. </span>
  519. </a-table>
  520. </div>
  521. <a-drawer
  522. title="视频详情"
  523. width="700"
  524. :placement="placement"
  525. :closable="false"
  526. :visible="visible"
  527. @close="onClose"
  528. >
  529. <a-spin :spinning="visibleLoading">
  530. <a-drawer
  531. :title="add ? '上传视频' : '修改视频'"
  532. width="600"
  533. :closable="false"
  534. :visible="childrenDrawer"
  535. @close="onChildrenDrawerClose"
  536. >
  537. <a-spin :spinning="videoUploadLoading">
  538. <a-form :form="form" :label-col="labelCol" :wrapper-col="wrapperCol">
  539. <a-form-item label="视频上传">
  540. <!-- -->
  541. <uploadFile
  542. :checkFile="file"
  543. :value.sync="urlList.url"
  544. @overUpload="overUpload"
  545. @removeUpload="removeUpload"
  546. :fileCount="1"
  547. uploadType="video"
  548. :multiple="false"
  549. />
  550. <span v-if="repeat" style="color: red">此素材重复,请重新选择上传</span>
  551. <span v-if="confirmLoading && urlList.url != ''" style="color: green">上传成功</span>
  552. </a-form-item>
  553. <a-form-item
  554. label="封面上传"
  555. class="add-image-material"
  556. v-if="currentMaterial.projectId && add && videoinfo.url != ''"
  557. >
  558. <uploadFile
  559. :value.sync="urlListImage.url"
  560. :checkFile="fileWater"
  561. @overUpload="overUploadImage"
  562. @removeUpload="deleteImage"
  563. :fileCount="15"
  564. uploadType="image"
  565. />
  566. <span
  567. v-if="material.filter((item) => item == false).length > 0 && urlListImage.url.length > 0"
  568. style="color: red"
  569. >
  570. 上传素材的尺寸不符,请修改(
  571. <span v-for="(item, index) of material" :key="index" v-show="!item">第{{ index + 1 }}张</span>出错)
  572. </span>
  573. <span
  574. v-else-if="urlListImage.url.length > 0 && material.filter((item) => item == false).length == 0"
  575. style="color: green"
  576. >上传成功</span
  577. >
  578. </a-form-item>
  579. <a-form-item
  580. label="形式标签"
  581. v-if="add && visible"
  582. >
  583. <el-cascader
  584. placeholder="搜索你想要的形式标签"
  585. :options="departTreeModality"
  586. v-decorator="[
  587. 'modalityTagList', // 给表单赋值或拉取表单时,该input对应的key
  588. { rules: [{ required: true, message: '请选择形式标签!' }] },
  589. ]"
  590. :props="{ multiple: true,
  591. value: 'id',
  592. label: 'tagName',
  593. emitPath: false,
  594. checkStrictly: true,
  595. expandTrigger: 'hover', }"
  596. filterable
  597. style="width: 100%"
  598. ></el-cascader>
  599. </a-form-item>
  600. <!-- <a-form-item
  601. :label-col="labelCol"
  602. :wrapper-col="{
  603. xs: { span: 24 },
  604. sm: { span: 12 },
  605. }"
  606. label="内容标签"
  607. v-if="add && visible"
  608. >
  609. <el-cascader
  610. placeholder="搜索你想要的内容标签"
  611. :options="departTreeContent"
  612. class="only-video-material-disable-modal"
  613. v-decorator="[
  614. 'contentTagList',
  615. { rules: [{ required: true, message: '请选择内容标签!' }] },
  616. ]"
  617. :props="{
  618. multiple: true,
  619. value: 'id',
  620. label: 'tagName',
  621. emitPath: false,
  622. checkStrictly: true,
  623. expandTrigger: 'hover',
  624. }"
  625. filterable
  626. style="width: 100%"
  627. ></el-cascader>
  628. </a-form-item> -->
  629. <a-form-item
  630. :label-col="labelCol"
  631. :wrapper-col="{
  632. xs: { span: 24 },
  633. sm: { span: 12 },
  634. }"
  635. label="场景标签"
  636. v-if="add && visible"
  637. >
  638. <el-cascader
  639. placeholder="搜索你想要的场景标签"
  640. :options="departTreeSence"
  641. v-decorator="[
  642. 'senceTagList', // 给表单赋值或拉取表单时,该input对应的key
  643. { rules: [{ required: true, message: '请选择场景标签!' }] },
  644. ]"
  645. :props="{ multiple: true,
  646. value: 'id',
  647. label: 'tagName',
  648. emitPath: false,
  649. checkStrictly: true,
  650. expandTrigger: 'hover', }"
  651. filterable
  652. style="width: 100%"
  653. ></el-cascader>
  654. </a-form-item>
  655. <a-form-item
  656. label="基调标签"
  657. v-if="add && visible"
  658. >
  659. <el-cascader
  660. placeholder="搜索你想要的基调标签"
  661. :options="departTreeMod"
  662. v-decorator="[
  663. 'modTagList', // 给表单赋值或拉取表单时,该input对应的key
  664. { rules: [{ required: true, message: '请选择基调标签!' }] },
  665. ]"
  666. :props="{ multiple: true,
  667. value: 'id',
  668. label: 'tagName',
  669. emitPath: false,
  670. checkStrictly: true,
  671. expandTrigger: 'hover', }"
  672. filterable
  673. style="width: 100%"
  674. ></el-cascader>
  675. </a-form-item>
  676. <a-form-item
  677. label="描述"
  678. v-if="add"
  679. >
  680. <div style="position:relative">
  681. <a-textarea
  682. placeholder="请输入描述"
  683. v-decorator="[
  684. 'description', // 给表单赋值或拉取表单时,该input对应的key
  685. ]"
  686. :maxLength='50'
  687. :auto-size="{ minRows: 5, maxRows: 6 }"
  688. @change="descriptionChange"
  689. />
  690. <span style="position:absolute;bottom:5px;right:10px;line-height:24px"><span style="color:#1890ff">{{descriptionlength.length || 0}}</span>/50</span>
  691. </div>
  692. </a-form-item>
  693. </a-form>
  694. </a-spin>
  695. <div
  696. :style="{
  697. position: 'absolute',
  698. bottom: 0,
  699. width: '100%',
  700. borderTop: '1px solid #e8e8e8',
  701. padding: '10px 16px',
  702. textAlign: 'right',
  703. left: 0,
  704. background: '#fff',
  705. borderRadius: '0 0 4px 4px',
  706. }"
  707. >
  708. <a-button key="back" @click="onChildrenDrawerClose" style="margin-right:15px">取消</a-button>
  709. <a-button type="primary" :disabled="!confirmLoading" @click="onChildrenDrawerOk" :loading="loadingElse">确定</a-button>
  710. </div>
  711. </a-drawer>
  712. <div class="marterialInfo videomarterialInfo">
  713. <div class="info-item">
  714. <span>视频状态:</span>
  715. <p>{{ currentVideo.videoStatus | handlerVideoStatus }}</p>
  716. </div>
  717. <div class="info-item">
  718. <span>视频预览:</span>
  719. <div class="videoBox" v-if="currentVideo.videoStatus>=1">
  720. <video style="height:100%" :src="currentVideo.url" controls v-if="currentVideo.url"></video>
  721. <img :src="defaultPic" alt="" style="width:100px;margin:0 10px 8px 0" v-else>
  722. </div>
  723. <div v-else >
  724. <!-- :disabled="!(currentVideo.clip==userInfo.id)" -->
  725. <a-button type='primary' @click="showChildrenDrawer" :disabled="!(currentVideo.clip==userInfo.id)">上传视频</a-button>
  726. </div>
  727. </div>
  728. <div class="info-item">
  729. <span>封面预览:</span>
  730. <div class="imgBox">
  731. <div v-if="currentVideo.videoStatus!=0">
  732. <template v-if="currentVideo.imgList&&currentVideo.imgList.length">
  733. <img alt="" style="width:100px;margin:0 10px 8px 0" v-for="(item,index) in currentVideo.imgList" @click="openBigImage(item)" :key='index' :src="item">
  734. </template>
  735. <span v-else>暂无封面</span>
  736. </div>
  737. <span v-else>暂无封面</span>
  738. <!-- <img :src="defaultPic" alt="" style="width:100px;margin:0 10px 8px 0" v-else> -->
  739. </div>
  740. </div>
  741. <div class="info-item" v-if="currentVideo.videoStatus>=1">
  742. <span>视频标签:</span>
  743. <p>
  744. <a-tag v-for="(item,index) in currentVideo.tagList" :key="index" style="margin-bottom:8px">{{item}}</a-tag>
  745. <!-- {{currentVideo.tag}} -->
  746. </p>
  747. </div>
  748. <div class="info-item info">
  749. <ul>
  750. <li><span>编导:</span> {{ currentVideo.planName }} </li>
  751. <li><span>拍摄:</span> {{ currentVideo.shotName }} </li>
  752. <li><span>剪辑:</span> {{ currentVideo.clipName }} </li>
  753. </ul>
  754. <!-- v-if="role=='designLeader'&&currentVideo.videoStatus==0" -->
  755. <a-button type='link' style="margin-left:15px;position:relative;top:-6px" @click="updataPeople" v-if="role=='designLeader'&&currentVideo.videoStatus==0">重新指派</a-button>
  756. </div>
  757. <div class="info-item" v-if="currentVideo.videoStatus==2">
  758. <span>驳回理由:</span>
  759. <p>{{ currentVideo.videoAdvise }}</p>
  760. </div>
  761. <div class="bottom-btn">
  762. <!-- <a-button type='primary' @click="approved" v-if="role=='operator'&&currentMaterial.materialStatus==5" style="margin-right:20px">通过审核</a-button>
  763. <a-button type='default' @click="()=>{videoRejectVisiable=true}" v-if="role=='operator'&&currentMaterial.materialStatus==5" style="margin-right:20px">驳回</a-button>
  764. <a-button type='primary' v-if="role!='operator'&&currentVideo.videoStatus>=1" :disabled="currentVideo.clip!=userInfo.id" @click="modifyVideo" style="margin-right:20px">修改视频信息</a-button>
  765. <a-button type='default' @click="onClose">关闭</a-button> -->
  766. </div>
  767. </div>
  768. </a-spin>
  769. <div
  770. :style="{
  771. position: 'absolute',
  772. right: 0,
  773. bottom: 0,
  774. width: '100%',
  775. borderTop: '1px solid #e9e9e9',
  776. padding: '10px 16px',
  777. background: '#fff',
  778. textAlign: 'right',
  779. zIndex: 1,
  780. }"
  781. >
  782. <a-button type='primary' @click="approved" v-if="role=='operator'&&currentMaterial.materialStatus==5" style="margin-right:20px">通过审核</a-button>
  783. <a-button type='default' @click="()=>{videoRejectVisiable=true}" v-if="role=='operator'&&currentMaterial.materialStatus==5" style="margin-right:20px">驳回</a-button>
  784. <a-button type='primary' v-if="role!='operator'&&currentVideo.videoStatus>=1&&currentVideo.videoStatus<3" :disabled="currentVideo.clip!=userInfo.id" @click="modifyVideo" style="margin-right:20px">修改视频信息</a-button>
  785. <a-button type='default' @click="onClose">关闭</a-button>
  786. </div>
  787. </a-drawer>
  788. <a-drawer
  789. title="脚本详情"
  790. width="600"
  791. :placement="placement"
  792. :closable="false"
  793. :visible="scriptVisible"
  794. @close="scriptClose"
  795. >
  796. <a-spin :spinning="visibleLoading">
  797. <div class="marterialInfo">
  798. <div class="info-item">
  799. <span>脚本状态:</span>
  800. <p>{{ currentScript.scriptStatus | handlerVideoStatus }}</p>
  801. </div>
  802. <div class="info-item">
  803. <span>所属项目:</span>
  804. <p>{{currentScript.projectName}}</p>
  805. </div>
  806. <div class="info-item">
  807. <span>所属物料:</span>
  808. <p>{{currentScript.materialName}}</p>
  809. </div>
  810. <div class="info-item">
  811. <span style="height: 32px;line-height: 32px;">编导:</span>
  812. <p style="height:32px;line-height:32px">
  813. {{currentScript.planName}}
  814. <a-button type='link' style="margin-left:15px" @click="updataPeople" v-if="role=='designLeader'&&currentScript.scriptStatus==0">重新指派</a-button>
  815. </p>
  816. </div>
  817. <div class="info-item" v-if="currentScript.scriptStatus==2">
  818. <span>驳回理由:</span>
  819. <p>{{currentScript.scriptAdvise}}</p>
  820. </div>
  821. <div class="info-item">
  822. <span>脚本:</span>
  823. <div v-if="currentScript.scriptStatus>0" style="margin-right:20px">
  824. <a :href="currentScript.url">{{currentScript.scriptName}}</a>
  825. </div>
  826. <div v-if="currentScript.scriptStatus<3">
  827. <p v-if="currentMaterial.plan==userInfo.id">
  828. <a-upload
  829. name="file"
  830. :multiple="false"
  831. :action="uploadAction"
  832. :headers="tokenHeader"
  833. :showUploadList="false"
  834. :beforeUpload="beforeUpload"
  835. @change="handleChange"
  836. style="margin-right:20px"
  837. >
  838. <a-button :disabled="loadDisabled">
  839. <a-icon type="upload" />
  840. {{loadDisabled?'上传中,请稍后':'文件上传'}}
  841. </a-button>
  842. </a-upload>
  843. </p>
  844. <p v-else>
  845. <a-upload
  846. name="file"
  847. :multiple="false"
  848. :action="uploadAction"
  849. :headers="tokenHeader"
  850. :showUploadList="false"
  851. :beforeUpload="beforeUpload"
  852. @change="handleChange"
  853. style="margin-right:20px"
  854. >
  855. <a-button :disabled="true">
  856. <a-icon type="upload" />文件上传</a-button>
  857. </a-upload>
  858. </p>
  859. </div>
  860. </div>
  861. </div>
  862. </a-spin>
  863. <div
  864. :style="{
  865. position: 'absolute',
  866. right: 0,
  867. bottom: 0,
  868. width: '100%',
  869. borderTop: '1px solid #e9e9e9',
  870. padding: '10px 16px',
  871. background: '#fff',
  872. textAlign: 'right',
  873. zIndex: 1,
  874. }"
  875. >
  876. <a-button type='primary' @click="scriptApproved" style="margin-right:20px" :loading='acceptLoading' v-if="role=='operator'&&currentMaterial.materialStatus==2">通过审核</a-button>
  877. <a-button type='default' v-if="role=='operator'&&currentMaterial.materialStatus==2" @click="()=>{scriptRejectVisiable=true}" style="margin-right:20px">驳回</a-button>
  878. <!-- <a-button type='primary' @click="dowmLoadScript" style="margin-right:20px">下载脚本</a-button> -->
  879. <a-button type='default' @click="scriptClose">关闭</a-button>
  880. </div>
  881. </a-drawer>
  882. </div>
  883. <!-- 指派 -->
  884. <a-modal v-model="assignVisible" title="物料指派" width='600px'>
  885. <template slot="footer">
  886. <a-button key="back" @click="quxiao">取消</a-button>
  887. <a-button type="primary" @click="handleOk" :loading="loadingElse">确定</a-button>
  888. </template>
  889. <a-spin :spinning='assignVisibleLoading'>
  890. <a-form-model ref="ruleForm" :rules="rules" :model="formPerson" :label-col="labelCol" :wrapper-col="wrapperCol">
  891. <a-form-model-item label="编导" ref="plan" prop="plan">
  892. <a-select
  893. v-model="formPerson.plan"
  894. showSearch
  895. optionFilterProp="children"
  896. :filterOption="filterOption"
  897. :disabled="currentMaterial.materialStatus>=4"
  898. >
  899. <a-select-option :value="item.userId" v-for="item of ascription" :key="item.userId">{{item.userName}}</a-select-option>
  900. </a-select>
  901. </a-form-model-item>
  902. <!-- {{currentMaterial.materialType==1?true:false}} -->
  903. <a-form-model-item label="拍摄" ref="shot" prop="shot" :rules="[{ required: currentMaterial.materialType==1||activeType=='1', message: '拍摄人员必须指派' ,trigger: 'change' }]">
  904. <a-select
  905. v-model="formPerson.shot"
  906. showSearch
  907. optionFilterProp="children"
  908. :filterOption="filterOption"
  909. >
  910. <a-select-option :value="item.userId" v-for="item of ascription" :key="item.userId">{{item.userName}}</a-select-option>
  911. </a-select>
  912. </a-form-model-item>
  913. <a-form-model-item label="剪辑" ref="clip" prop="clip">
  914. <a-select
  915. v-model="formPerson.clip"
  916. showSearch
  917. optionFilterProp="children"
  918. :filterOption="filterOption"
  919. >
  920. <a-select-option :value="item.userId" v-for="item of ascription" :key="item.userId">
  921. {{item.userName}}
  922. </a-select-option>
  923. </a-select>
  924. </a-form-model-item>
  925. </a-form-model>
  926. </a-spin>
  927. </a-modal>
  928. <a-modal v-model="videoRejectVisiable" title="视频驳回" width='600px'>
  929. <template slot="footer">
  930. <a-button key="back" @click="()=>{videoRejectVisiable=false}">取消</a-button>
  931. <a-button type="primary" @click="reject" :loading="loadingElse">确定驳回</a-button>
  932. </template>
  933. <div style="position:relative">
  934. <a-textarea
  935. v-model="videoAdvise"
  936. placeholder="请填写驳回理由"
  937. :auto-size="{ minRows: 3, maxRows: 5 }"
  938. :maxLength='50'
  939. />
  940. <span style="position:absolute;bottom:5px;right:10px;line-height:24px"><span style="color:#1890ff">{{videoAdvise.length || 0}}</span>/50</span>
  941. </div>
  942. </a-modal>
  943. <a-modal v-model="scriptRejectVisiable" title="脚本驳回" width='600px'>
  944. <template slot="footer">
  945. <a-button key="back" @click="()=>{scriptRejectVisiable=false}">取消</a-button>
  946. <a-button type="primary" @click="scriptReject" :loading="loadingElse">确定驳回</a-button>
  947. </template>
  948. <div style="position:relative">
  949. <a-textarea
  950. v-model="scriptAdvise"
  951. placeholder="请填写驳回理由"
  952. :auto-size="{ minRows: 3, maxRows: 5 }"
  953. :maxLength='50'
  954. />
  955. <span style="position:absolute;bottom:5px;right:10px;line-height:24px"><span style="color:#1890ff">{{scriptAdvise.length}}</span>/50</span>
  956. </div>
  957. </a-modal>
  958. <a-modal v-model="viewImgVisiable" title="封面预览" width='600px' :footer=null>
  959. <div style="position:relative;text-align:center">
  960. <img :src="viewImgUrl" alt="" width="250">
  961. </div>
  962. </a-modal>
  963. </div>
  964. </div>
  965. </a-spin>
  966. </div>
  967. </template>
  968. <script>
  969. import moment from 'moment';
  970. import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
  971. import Vue from 'vue'
  972. import {ACCESS_TOKEN} from "@/store/mutation-types"
  973. import BMF from 'browser-md5-file'
  974. import { fileCheck, fileCheckImage, fileEdit, fileEditAll,orderFileInsert} from '@/api/actor'
  975. import uploadFile from '@/components/uploadFile.vue'
  976. import { closeAllVideoFun, stopOtherVideo } from '@/utils/videoControl'
  977. import UploadToAli from '@femessage/upload-to-ali'
  978. import { mapGetters } from 'vuex'
  979. const fileSuffix = [
  980. 'xls',
  981. 'xlt',
  982. 'et',
  983. 'xlsx',
  984. 'xltx',
  985. 'csv',
  986. 'xlsm',
  987. 'xltm',
  988. 'doc',
  989. 'dot',
  990. 'wps',
  991. 'wpt',
  992. 'docx',
  993. 'dotx',
  994. 'docm',
  995. 'dotm',
  996. 'ppt',
  997. 'pptx',
  998. 'pptm',
  999. 'ppsx',
  1000. 'ppsm',
  1001. 'pps',
  1002. 'potx',
  1003. 'potm',
  1004. 'dpt',
  1005. 'dps',
  1006. 'pdf',
  1007. ]
  1008. const videofileSuffix = [
  1009. 'avi',
  1010. 'wmv',
  1011. 'mpg',
  1012. 'mpeg',
  1013. 'mov',
  1014. 'rm',
  1015. 'ram',
  1016. 'swf',
  1017. 'flv',
  1018. 'mp4',
  1019. ]
  1020. let realColumns=[
  1021. {
  1022. title: '物料标题',
  1023. dataIndex: 'materialName',
  1024. align: 'center',
  1025. key: 'materialName',
  1026. scopedSlots: { customRender: 'materialName' }
  1027. },
  1028. {
  1029. title: '物料编号',
  1030. dataIndex: 'id',
  1031. align: 'center',
  1032. key: 'id',
  1033. scopedSlots: { customRender: 'id' }
  1034. },
  1035. {
  1036. title: '物料进度',
  1037. dataIndex: 'materialStatus',
  1038. align: 'center',
  1039. key: 'materialStatus',
  1040. scopedSlots: { customRender: 'materialStatus' }
  1041. },
  1042. {
  1043. title: '脚本',
  1044. dataIndex: 'scriptStatus',
  1045. align: 'center',
  1046. key: 'scriptStatus',
  1047. width:250,
  1048. scopedSlots: { customRender: 'scriptStatus' }
  1049. },
  1050. {
  1051. title: '视频',
  1052. dataIndex: 'videoStatus',
  1053. align: 'center',
  1054. key: 'videoStatus',
  1055. width:250,
  1056. scopedSlots: { customRender: 'videoStatus' }
  1057. },
  1058. ]
  1059. export default {
  1060. name:'order-detail',
  1061. components: {
  1062. UploadToAli,
  1063. uploadFile,
  1064. },
  1065. data() {
  1066. return {
  1067. activeType:'1',
  1068. descriptionlength:'',
  1069. viewImgUrl:'',
  1070. viewImgVisiable:false,
  1071. orderRejectVisiable:false,
  1072. acceptLoading:false,
  1073. videoEchoInfo:{},
  1074. videoUploadLoading:false,
  1075. videoRejectType:'1',
  1076. assignVisibleLoading:false,
  1077. visibleLoading:false,
  1078. rules: {
  1079. clip: [{ required: true, message: '剪辑人员必须指派', trigger: 'change' }],
  1080. // shot: [],
  1081. plan: [{ required: true, message: '编导人员必须指派', trigger: 'change' }],
  1082. },
  1083. loadingElse:false,
  1084. videoRejectVisiable:false,
  1085. scriptRejectVisiable:false,
  1086. childrenDrawer:false,
  1087. videoAdvise:'',
  1088. scriptAdvise:'',
  1089. defaultPic: require('@/assets/noImg.png') ,
  1090. currentScript:{},
  1091. currentVideo:{},
  1092. tokenHeader: {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)},
  1093. uploadAction:'',
  1094. videoLoad:false,
  1095. loadDisabled:false,
  1096. labelCol: { span: 4 },
  1097. wrapperCol: { span: 14 },
  1098. formPerson:{
  1099. plan:'',
  1100. shot:'',
  1101. clip:'',
  1102. },
  1103. ascription: [],
  1104. assignVisible:false,
  1105. pageSpinning:false,
  1106. userInfo:{},
  1107. roleCode:'',
  1108. tabKey:1,
  1109. selectedRowKeys:[],
  1110. selectionRows:[],
  1111. columns:[...realColumns],
  1112. data:[],
  1113. loading:false,
  1114. ipagination: {
  1115. current: 1,
  1116. pageSize: 10,
  1117. // pageSizeOptions: ['10', '20', '30'],
  1118. showTotal: (total, range) => {
  1119. return range[0] + "-" + range[1] + " 共" + total + "条"
  1120. },
  1121. showQuickJumper: true,
  1122. showSizeChanger:true,
  1123. pageSizeOptions: ['10', '30', '50'],
  1124. total: 0,
  1125. onChange: (current, pageSize) => {
  1126. // 切换分页时的回调,
  1127. // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
  1128. this.ipagination.current = current;
  1129. this.ipagination.pageSize= pageSize;
  1130. }
  1131. },
  1132. // 订单进度
  1133. orderInfo:{
  1134. status:undefined,
  1135. progress:0,
  1136. },
  1137. currentStep:1,
  1138. visible: false,
  1139. scriptVisible:false,
  1140. placement: 'right',
  1141. currentMaterial:{},
  1142. sizeType:[],
  1143. size: "4",
  1144. currentOrderId:'',
  1145. currentOrderInfo:{},
  1146. url:{
  1147. orderDetail:'/platform/order/queryById',
  1148. confirmOrder:'/platform/designer/accept',
  1149. rejectOrder:'/platform/designer/reject',
  1150. withdrawOrder:'/platform/operator/destroy',
  1151. materialList:'/platform/material/listByOrderCode',
  1152. assgin:'/platform/designer/assign',
  1153. scriptDetail:'/platform/material/scriptDetail',
  1154. videoDetail:'/platform/material/videoDetail',
  1155. scriptAccept:'/platform/material/script/accept',
  1156. scriptReject:'/platform/material/script/reject',
  1157. videoAccept:'/platform/material/video/accept',
  1158. videoReject:'/platform/material/video/reject',
  1159. },
  1160. confirmOrderBtnLoading:false,
  1161. rejectOrderBtnLoading:false,
  1162. withdrawOrderBtnLoading:false,
  1163. editOrderBtnLoading:false,
  1164. orderAdvice:'',//驳回理由
  1165. role:'',
  1166. // 上传视频
  1167. labelCol: {xs: {span: 24,},sm: {span: 5,},},
  1168. wrapperCol: {xs: {span: 24,},sm: {span: 12,},},
  1169. form:this.$form.createForm(this),
  1170. repeat: false,
  1171. confirmLoading: false,
  1172. urlList: {
  1173. url: '',
  1174. md5: '',
  1175. name: '',
  1176. },
  1177. urlListImage: {
  1178. url: [],
  1179. md5: [],
  1180. name: [],
  1181. size: [],
  1182. },
  1183. tags: [],
  1184. addImageVisible: false,
  1185. addImageData: null,
  1186. material: [],
  1187. // 标签的数据
  1188. labelValue: [],
  1189. options: [],
  1190. departTree: [],
  1191. departTreeModality: [],
  1192. departTreeContent: [],
  1193. departTreeSence: [],
  1194. departTreeMod: [],
  1195. departValue: [],
  1196. departValueInfo: [],
  1197. departValueInfoModality: [],
  1198. departValueInfoContent: [],
  1199. departValueInfoSence: [],
  1200. departValueInfoMod: [],
  1201. tagInfoList: [],
  1202. tagInfoListVisible: false,
  1203. tagCode: null,
  1204. loadingTag: false,
  1205. showImageChouzhen: false,
  1206. showImageStr: null,
  1207. add: true,
  1208. inputVisible: false,
  1209. inputValue: '',
  1210. videoinfo:{
  1211. url: '',
  1212. md5: '',
  1213. name: '',
  1214. width:undefined,
  1215. height:undefined,
  1216. },
  1217. imageinfo:[],
  1218. batch:false
  1219. }
  1220. },
  1221. methods: {
  1222. getTemplate(){
  1223. this.batch = true
  1224. this.assignVisible=true;
  1225. this.formPerson={
  1226. plan:'',
  1227. shot:'',
  1228. clip:'',
  1229. }
  1230. this.currentMaterial={}
  1231. this.getProjectId(this.selectionRows[0].projectId)
  1232. },
  1233. onSelectChange(selectedRowKeys, selectionRows) {
  1234. this.selectedRowKeys = selectedRowKeys
  1235. this.selectionRows = selectionRows
  1236. },
  1237. getCheckboxProps(record) {
  1238. return {
  1239. props: {
  1240. disabled: record.materialStatus==2||record.materialStatus==3||record.materialStatus==4||record.materialStatus==5||record.materialStatus==6||record.materialStatus==7
  1241. },
  1242. }
  1243. },
  1244. //切换页签
  1245. callback(key) {
  1246. this.ipagination.current = 1
  1247. this.selectedRowKeys = []
  1248. this.selectionRows = []
  1249. this.materialHttp()
  1250. },
  1251. //获取表单的某一个属性值
  1252. getFormData(className) {
  1253. return this.form.getFieldValue(className)
  1254. },
  1255. descriptionChange(e){
  1256. this.descriptionlength=e.target.value
  1257. },
  1258. openBigImage(item){
  1259. this.viewImgVisiable=true;
  1260. this.viewImgUrl=item
  1261. },
  1262. modifyVideo(){
  1263. this.childrenDrawer=true;
  1264. // console.log(this.currentVideo);
  1265. this.videoUploadLoading=true
  1266. getAction('/platform/material/videoEcho',{
  1267. videoId:this.currentVideo.videoId
  1268. }).then(res=>{
  1269. console.log(res)
  1270. this.videoUploadLoading=false;
  1271. this.confirmLoading=true;
  1272. if(res.result.video){
  1273. this.urlList=res.result.video
  1274. this.videoinfo=res.result.video;
  1275. this.videoinfo.url=this.videoinfo.url.replace(/https:/g,'')
  1276. }
  1277. if(res.result.covers){
  1278. this.imageinfo=res.result.covers;
  1279. this.urlListImage= {
  1280. url : res.result.covers.map(item=>{return item.url}),
  1281. md5 : res.result.covers.map(item=>item.md5),
  1282. name : res.result.covers.map(item=>item.name),
  1283. size : res.result.covers.map(item=>item.size),
  1284. format : res.result.covers.map(item=>item.format),
  1285. }
  1286. }
  1287. this.form.setFieldsValue({
  1288. // contentTagList: res.result.tags.contentTagList.map(item=>{return item.tagId}),
  1289. modalityTagList: res.result.tags.modalityTagList.map(item=>{return item.tagId}),
  1290. modTagList: res.result.tags.modTagList.map(item=>{return item.tagId}),
  1291. senceTagList: res.result.tags.senceTagList.map(item=>{return item.tagId}),
  1292. description:res.result.video.description
  1293. })
  1294. this.descriptionlength=res.result.video.description
  1295. this.videoEchoInfo=res.result
  1296. })
  1297. },
  1298. editOrder(){
  1299. this.$parent.isEdit=true;
  1300. this.$parent.orderId=this.currentOrderInfo.id;
  1301. this.$parent.currentTabComponent='placeOrder';
  1302. },
  1303. quxiao(){
  1304. this.assignVisible=false;
  1305. this.$refs.ruleForm.resetFields();
  1306. },
  1307. getProjectId(id) {
  1308. this.ascription=[];
  1309. getAction('/ctop/projectMember/getMemberList', {
  1310. projectId: id,
  1311. }).then((res) => {
  1312. this.assignVisibleLoading=false
  1313. if (res.code == 0) {
  1314. this.ascription = res.result.filter((item) => {
  1315. if (
  1316. item.roleCode == 'clip' ||
  1317. item.roleCode == 'plan' ||
  1318. item.roleCode == 'designTeamLeader' ||
  1319. item.roleCode == 'shot' ||
  1320. item.roleCode == 'plane'
  1321. ) {
  1322. return {
  1323. userId: item.userId,
  1324. userName: item.userName,
  1325. }
  1326. }
  1327. })
  1328. }
  1329. })
  1330. },
  1331. filterOption(input, option) {
  1332. return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
  1333. },
  1334. // 脚本指派
  1335. scriptAssign(record){
  1336. console.log(record)
  1337. this.currentMaterial=record;
  1338. this.assignVisible=true;
  1339. this.formPerson={
  1340. plan:'',
  1341. shot:'',
  1342. clip:'',
  1343. },
  1344. this.getProjectId(record.projectId)
  1345. },
  1346. // 视频指派
  1347. videoAssign(record){
  1348. console.log(record)
  1349. this.formPerson={
  1350. plan:'',
  1351. shot:'',
  1352. clip:'',
  1353. },
  1354. this.currentMaterial=record;
  1355. this.assignVisible=true;
  1356. this.getProjectId(record.projectId)
  1357. },
  1358. updataPeople(){
  1359. this.formPerson={
  1360. plan:this.currentMaterial.plan,
  1361. shot:this.currentMaterial.shot,
  1362. clip:this.currentMaterial.clip,
  1363. },
  1364. this.scriptVisible=false;
  1365. this.visible=false;
  1366. this.assignVisible=true;
  1367. this.assignVisibleLoading=true;
  1368. this.getProjectId(this.currentMaterial.projectId)
  1369. },
  1370. handleOk(e) {
  1371. console.log(e);
  1372. this.$refs.ruleForm.validate(valid => {
  1373. if (valid) {
  1374. console.log(this.formPerson)
  1375. this.loadingElse=true;
  1376. if(this.currentMaterial.clip&&this.currentMaterial.plan&&this.currentMaterial.shot){
  1377. postAction('/platform/designer/assignAgain',{
  1378. id:this.currentMaterial.id,
  1379. ...this.formPerson
  1380. }).then(res=>{
  1381. this.loadingElse=false;
  1382. this.assignVisible = false;
  1383. this.selectedRowKeys=[]
  1384. this.selectionRows=[]
  1385. this.$message.success(res.message);
  1386. this.materialHttp(this.activeKey)
  1387. })
  1388. }else{
  1389. if(!this.batch){
  1390. postAction(this.url.assgin,{
  1391. id:this.currentMaterial.id,
  1392. ...this.formPerson
  1393. }).then(res=>{
  1394. this.loadingElse=false;
  1395. this.assignVisible = false;
  1396. this.selectedRowKeys=[]
  1397. this.selectionRows=[]
  1398. this.$message.success(res.message);
  1399. this.materialHttp(this.activeKey)
  1400. })
  1401. }else{
  1402. postAction('/platform/designer/batchAssign',{
  1403. id:this.selectedRowKeys,
  1404. ...this.formPerson
  1405. }).then(res=>{
  1406. this.loadingElse=false;
  1407. this.assignVisible = false;
  1408. this.batch = false
  1409. this.$message.success(res.message);
  1410. this.materialHttp(this.activeKey)
  1411. this.selectedRowKeys = []
  1412. this.selectionRows = []
  1413. })
  1414. }
  1415. }
  1416. } else {
  1417. console.log('error submit!!');
  1418. return false;
  1419. }
  1420. });
  1421. },
  1422. goPlantForm(){
  1423. if(this.$parent.role=='operator'){
  1424. this.$parent.currentTabComponent='operatorPlatform'
  1425. }else if(this.$parent.role=='designLeader'){
  1426. this.$parent.currentTabComponent='designleaderPlatform'
  1427. }else if(this.$parent.role=='design'){
  1428. this.$parent.currentTabComponent='designPlatform'
  1429. }
  1430. },
  1431. // 确认订单
  1432. confirmOrder(){
  1433. this.confirmOrderBtnLoading=true;
  1434. postAction(this.url.confirmOrder,{
  1435. designPassTime:moment().format('YYYY-MM-DD HH:mm:ss'),
  1436. ...this.currentOrderInfo
  1437. }).then(res=>{
  1438. console.log(res)
  1439. this.confirmOrderBtnLoading=false;
  1440. if(res.success){
  1441. this.$message.success(res.message)
  1442. this.orderDetailHttp()
  1443. }else{
  1444. this.$message.error(res.message)
  1445. }
  1446. })
  1447. },
  1448. // 驳回订单
  1449. rejectOrder(){
  1450. if(this.orderAdvice){
  1451. this.rejectOrderBtnLoading=true;
  1452. let params={
  1453. ...this.currentOrderInfo,
  1454. orderAdvice:this.orderAdvice
  1455. }
  1456. postAction(this.url.rejectOrder,params).then(res=>{
  1457. console.log(res)
  1458. this.rejectOrderBtnLoading=false;
  1459. this.orderRejectVisiable=false;
  1460. if(res.success){
  1461. this.$message.success(res.message)
  1462. this.orderDetailHttp()
  1463. }else{
  1464. this.$message.error(res.message)
  1465. }
  1466. })
  1467. }else{
  1468. this.$message.error('请填写驳回理由')
  1469. }
  1470. },
  1471. // 撤回订单
  1472. withdrawOrderConfirm(){
  1473. this.withdrawOrderBtnLoading=true;
  1474. let params={
  1475. ...this.currentOrderInfo,
  1476. }
  1477. postAction(this.url.withdrawOrder,params).then(res=>{
  1478. console.log(res)
  1479. this.withdrawOrderBtnLoading=false;
  1480. if(res.success){
  1481. this.$message.success(res.message)
  1482. this.orderDetailHttp()
  1483. }else{
  1484. this.$message.error(res.message)
  1485. }
  1486. })
  1487. },
  1488. withdrawOrderCancel(e) {
  1489. console.log(e);
  1490. // this.$message.error('');
  1491. },
  1492. // 视频查看详情
  1493. viewDetails(record){
  1494. console.log(record)
  1495. this.currentMaterial=record
  1496. if(record.materialStatus>=4){
  1497. this.currentVideo={};
  1498. this.visible = true;
  1499. if(record.videoId){
  1500. this.visibleLoading=true;
  1501. getAction(this.url.videoDetail,{
  1502. videoId:record.videoId
  1503. }).then(res=>{
  1504. console.log(res);
  1505. this.visibleLoading=false;
  1506. if(res.success){
  1507. if(res.result){
  1508. let tagList=res.result.tag?res.result.tag.split(','):[]
  1509. let imgList=res.result.imageUrl?res.result.imageUrl.split(','):[]
  1510. console.log(tagList)
  1511. this.currentVideo={
  1512. ...res.result,
  1513. tagList,
  1514. imgList
  1515. }
  1516. }
  1517. }else{
  1518. this.currentVideo={};
  1519. }
  1520. })
  1521. }else{
  1522. this.currentVideo=record
  1523. this.visible = true;
  1524. }
  1525. }else{
  1526. this.$message.error('请等待脚本审核通过后,上传视频')
  1527. }
  1528. },
  1529. // 脚本查看详情
  1530. scriptViewDetails(record){
  1531. console.log(record)
  1532. this.currentMaterial=record
  1533. this.currentScript={};
  1534. if(record.scriptId){
  1535. this.visibleLoading=true;
  1536. this.scriptVisible = true;
  1537. getAction(this.url.scriptDetail,{
  1538. scriptId:record.scriptId
  1539. }).then(res=>{
  1540. console.log(res);
  1541. this.visibleLoading=false;
  1542. if(res.success){
  1543. this.currentScript=res.result;
  1544. }else{
  1545. this.currentScript={};
  1546. }
  1547. })
  1548. }else{
  1549. this.currentScript=record
  1550. this.scriptVisible = true;
  1551. }
  1552. },
  1553. onClose() {
  1554. this.visible = false;
  1555. },
  1556. scriptClose() {
  1557. this.scriptVisible = false;
  1558. },
  1559. sort(pagination, filters, sorter, { currentDataSource }){
  1560. this.ipagination.current=pagination.current;
  1561. this.ipagination.pageSize=pagination.pageSize;
  1562. this.materialHttp()
  1563. },
  1564. // 请求素材
  1565. materialHttp(){
  1566. this.loading=true;
  1567. this.data=[];
  1568. getAction(this.url.materialList,{
  1569. orderCode:this.currentOrderInfo.orderCode,
  1570. pageNo:this.ipagination.current,
  1571. pageSize:this.ipagination.pageSize,
  1572. materialType:this.activeType
  1573. }).then(res=>{
  1574. console.log(res);
  1575. this.data=[]
  1576. if(res.success){
  1577. this.data=res.result.list
  1578. // this.data=res.result.list.filter(item=>item.materialType==this.tabKey);
  1579. this.ipagination.total=res.result.total
  1580. // this.ipagination.total=this.data.length
  1581. this.loading=false
  1582. }
  1583. })
  1584. },
  1585. // tabqiehuan
  1586. tabChange(key){
  1587. // console.log(key);
  1588. this.materialHttp()
  1589. this.ipagination.current=1
  1590. },
  1591. // shipin通过审核
  1592. approved(){
  1593. this.acceptLoading=true;
  1594. getAction('/platform/material/verifyVideo',{
  1595. materialCode:this.currentMaterial.materialCode,
  1596. videoId:this.currentMaterial.videoId,
  1597. }).then(res=>{
  1598. if(res.success){
  1599. postAction(this.url.videoAccept,{
  1600. id:this.currentMaterial.id,
  1601. orderCode:this.currentMaterial.orderCode,
  1602. materialCode:this.currentMaterial.materialCode,
  1603. videoId:this.currentVideo.videoId
  1604. }).then(res=>{
  1605. console.log(res);
  1606. this.acceptLoading=false
  1607. this.visible=false;
  1608. this.videoAdvise=''
  1609. if(res.success){
  1610. this.$message.success(res.message);
  1611. this.materialHttp()
  1612. }else{
  1613. this.$message.error(res.message)
  1614. }
  1615. })
  1616. }else{
  1617. this.$message.error(res.message)
  1618. this.acceptLoading=false
  1619. this.materialHttp()
  1620. }
  1621. })
  1622. },
  1623. // 视频驳回
  1624. reject(){
  1625. this.loadingElse=true;
  1626. getAction('/platform/material/verifyVideo',{
  1627. materialCode:this.currentMaterial.materialCode,
  1628. videoId:this.currentMaterial.videoId,
  1629. }).then(res=>{
  1630. if(res.success){
  1631. if(this.videoAdvise){
  1632. postAction(this.url.videoReject,{
  1633. id:this.currentMaterial.id,
  1634. videoAdvise:this.videoAdvise,
  1635. materialCode:this.currentMaterial.materialCode
  1636. }).then(res=>{
  1637. console.log(res);
  1638. this.loadingElse=false
  1639. this.videoAdvise=''
  1640. this.visible=false;
  1641. this.videoRejectVisiable=false;
  1642. if(res.success){
  1643. this.$message.success(res.message);
  1644. this.materialHttp()
  1645. }else{
  1646. this.$message.error(res.message)
  1647. }
  1648. })
  1649. }else{
  1650. this.loadingElse=false;
  1651. this.$message.error('请填写驳回理由')
  1652. }
  1653. }else{
  1654. this.$message.error(res.message)
  1655. this.loadingElse=false
  1656. this.materialHttp()
  1657. }
  1658. })
  1659. },
  1660. // 脚本通过审核
  1661. scriptApproved(){
  1662. // console.log(this.currentMaterial)
  1663. this.acceptLoading=true;
  1664. getAction('/platform/material/verifyScript',{
  1665. materialCode:this.currentMaterial.materialCode,
  1666. scriptId:this.currentMaterial.scriptId,
  1667. }).then(res=>{
  1668. if(res.success){
  1669. postAction(this.url.scriptAccept,{
  1670. id:this.currentMaterial.id,
  1671. orderCode:this.currentMaterial.orderCode,
  1672. materialCode:this.currentMaterial.materialCode
  1673. }).then(res=>{
  1674. console.log(res);
  1675. this.acceptLoading=false
  1676. this.scriptVisible=false;
  1677. if(res.success){
  1678. this.$message.success(res.message);
  1679. this.materialHttp()
  1680. }else{
  1681. this.$message.error(res.message)
  1682. }
  1683. })
  1684. }else{
  1685. this.acceptLoading=false;
  1686. this.scriptVisible=false;
  1687. this.materialHttp()
  1688. this.$message.error(res.message)
  1689. }
  1690. })
  1691. },
  1692. // 脚本驳回
  1693. scriptReject(){
  1694. this.loadingElse=true;
  1695. getAction('/platform/material/verifyScript',{
  1696. materialCode:this.currentMaterial.materialCode,
  1697. scriptId:this.currentMaterial.scriptId,
  1698. }).then(res=>{
  1699. if(res.success){
  1700. if(this.scriptAdvise){
  1701. postAction(this.url.scriptReject,{
  1702. id:this.currentMaterial.id,
  1703. scriptAdvise:this.scriptAdvise,
  1704. materialCode:this.currentMaterial.materialCode
  1705. }).then(res=>{
  1706. console.log(res);
  1707. this.scriptVisible=false;
  1708. this.scriptAdvise=''
  1709. this.scriptRejectVisiable=false;
  1710. this.loadingElse=false;
  1711. if(res.success){
  1712. this.$message.success(res.message);
  1713. this.materialHttp()
  1714. }else{
  1715. this.$message.error(res.message)
  1716. }
  1717. })
  1718. }else{
  1719. this.loadingElse=false;
  1720. this.$message.error('请填写驳回理由')
  1721. }
  1722. }else{
  1723. this.loadingElse=false;
  1724. this.scriptVisible=false;
  1725. this.materialHttp()
  1726. this.$message.error(res.message)
  1727. }
  1728. })
  1729. },
  1730. // 生成水印
  1731. getWater() {
  1732. var params = qs.stringify({
  1733. id: this.id,
  1734. userId: this.userInfo().id,
  1735. watermarkTemplateId: this.size
  1736. })
  1737. postAction('/ctop/materialInfo/watermark', params).then(res => {
  1738. if (res.success) {
  1739. // getAction("/ctop/videoWatermarkTask/list").then(res=>{
  1740. // console.log(res)
  1741. // })
  1742. this.$message.success('水印素材生成中,请一分钟后刷新')
  1743. this.visibleDetail = false
  1744. this.refuseFile = []
  1745. this.refuseReason = ''
  1746. closeAllVideoFun()
  1747. this.loadData()
  1748. }
  1749. })
  1750. },
  1751. // 请求order详情数据
  1752. orderDetailHttp(){
  1753. this.pageSpinning=true;
  1754. this.currentOrderInfo={}
  1755. getAction(this.url.orderDetail,{
  1756. id:this.currentOrderId
  1757. }).then(res=>{
  1758. console.log(res)
  1759. this.pageSpinning=false;
  1760. if(res.success){
  1761. this.currentOrderInfo=res.result;
  1762. // res.result.orderStatus
  1763. console.log(this.currentOrderInfo.orderStatus)
  1764. if(this.currentOrderInfo.orderStatus || this.currentOrderInfo.orderStatus==0){
  1765. if(this.currentOrderInfo.orderStatus==0){
  1766. this.currentStep=1;
  1767. }else if(this.currentOrderInfo.orderStatus==1){
  1768. this.currentStep=2;
  1769. }else if(this.currentOrderInfo.orderStatus==2){
  1770. this.currentStep=0;
  1771. }else if(this.currentOrderInfo.orderStatus==3){
  1772. this.currentStep=3;
  1773. }
  1774. }
  1775. console.log(this.currentStep)
  1776. this.materialHttp()
  1777. }
  1778. })
  1779. },
  1780. roleJudgement(role){
  1781. // 1 运营(不区分运营经理)
  1782. // 2 设计组长
  1783. // 3 设计
  1784. // 4 管理员
  1785. if(role.indexOf('operator')!=-1||role.indexOf('Operation')!=-1||role.indexOf('operation')!=-1){
  1786. return 1
  1787. }else if(rolethis.roleCode=='designTeamLeader'){
  1788. return 2
  1789. }else if(role=='planeLeader'||role=='production'||role=='plane'||role=='shot'||role=='clip'||role=='plan'){
  1790. return 3
  1791. }else if(role=='admin'){
  1792. return 4
  1793. }
  1794. },
  1795. // 下载脚本
  1796. dowmLoadScript(){
  1797. },
  1798. beforeUpload(file) {
  1799. if (process.env.NODE_ENV == 'development') {
  1800. this.uploadAction= `/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
  1801. }
  1802. else if (process.env.NODE_ENV == 'debug') {
  1803. }
  1804. else if (process.env.NODE_ENV == 'production') {
  1805. this.uploadAction= `${this.axios.defaults.baseURL}/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
  1806. }
  1807. // this.uploadAction= `http://192.168.1.43:8088/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
  1808. // this.uploadAction= `http://139.186.151.174:8804/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
  1809. this.loadDisabled = true
  1810. const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
  1811. const fileName = file.name
  1812. const fileStrArr = fileName.split('.')
  1813. const suffix = fileStrArr[fileStrArr.length - 1]
  1814. let result = fileSuffix.some((item) => {
  1815. return item === suffix
  1816. })
  1817. if (!result) {
  1818. this.$message.error('不支持该文件类型')
  1819. this.loadDisabled = false
  1820. return false
  1821. }
  1822. if (size > 10) {
  1823. this.$message.error('文件不能大于10MB')
  1824. this.loadDisabled = false
  1825. return false
  1826. }
  1827. },
  1828. handleChange(info) {
  1829. if (info.file.status !== 'uploading') {
  1830. console.log(info.file, info.fileList)
  1831. }
  1832. if (info.file.status === 'done') {
  1833. this.$message.success(`${info.file.name} 上传成功`)
  1834. this.loadDisabled = false
  1835. this.scriptVisible=false;
  1836. this.materialHttp()
  1837. } else if (info.file.status === 'error') {
  1838. this.$message.error(`${info.file.name} file upload failed.`)
  1839. this.loadDisabled = false
  1840. this.scriptVisible=false;
  1841. }
  1842. },
  1843. showChildrenDrawer() {
  1844. this.childrenDrawer = true;
  1845. this.getTagListAll()
  1846. },
  1847. onChildrenDrawerClose() {
  1848. this.descriptionlength=''
  1849. this.childrenDrawer = false;
  1850. this.loadingElse=false
  1851. this.dataElse = []
  1852. this.form.resetFields()
  1853. this.urlList = {
  1854. url: '',
  1855. md5: '',
  1856. name: '',
  1857. }
  1858. this.tags = []
  1859. this.urlListImage = {
  1860. url: [],
  1861. md5: [],
  1862. name: [],
  1863. size: [],
  1864. }
  1865. this.imageArrList = [];
  1866. this.videoinfo={
  1867. url: '',
  1868. md5: '',
  1869. name: '',
  1870. width:undefined,
  1871. height:undefined,
  1872. };
  1873. this.imageinfo=[];
  1874. this.form.setFieldsValue({
  1875. // contentTagList: null,
  1876. modalityTagList: null,
  1877. modTagList: null,
  1878. senceTagList: null,
  1879. })
  1880. },
  1881. onChildrenDrawerOk(){
  1882. this.form.validateFieldsAndScroll((err, values) => {
  1883. if (!err) {
  1884. console.log(values)
  1885. this.loadingElse = true
  1886. var params = {
  1887. ...values,
  1888. ...this.videoinfo,
  1889. covers:[...this.imageinfo]
  1890. }
  1891. params.id = this.add ? null : this.id
  1892. params.userId = this.userInfo.id
  1893. params.projectId=this.currentMaterial.projectId
  1894. params.materialId=this.currentMaterial.id ||this.currentMaterial.materialId
  1895. params.materialCode=this.currentMaterial.materialCode
  1896. if (this.add) {
  1897. postAction('/platform/file/uploadVideo',params).then(res=>{
  1898. if (res.success) {
  1899. this.form.resetFields()
  1900. this.urlList = {
  1901. url: '',
  1902. md5: '',
  1903. name: '',
  1904. }
  1905. this.descriptionlength=''
  1906. this.urlListImage = {
  1907. url: [],
  1908. md5: [],
  1909. name: [],
  1910. size: [],
  1911. }
  1912. this.imageArrList = []
  1913. this.tags = []
  1914. this.childrenDrawer = false
  1915. this.visible=false;
  1916. this.add = true
  1917. for (const key in this.role) {
  1918. if (key == 'roleCode') {
  1919. this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
  1920. }
  1921. }
  1922. this.$message.success('素材上传成功')
  1923. this.loadingElse = false
  1924. this.videoinfo={
  1925. url: '',
  1926. md5: '',
  1927. name: '',
  1928. width:undefined,
  1929. height:undefined,
  1930. };
  1931. this.imageinfo=[];
  1932. this.materialHttp()
  1933. // this.departValue = []
  1934. } else {
  1935. this.$message.error(res.message)
  1936. this.loadingElse = false
  1937. // this.childrenDrawer = false
  1938. // this.visible=false;
  1939. }
  1940. })
  1941. // orderFileInsert(params).then((res) => {
  1942. // if (res.success) {
  1943. // this.form.resetFields()
  1944. // this.urlList = {
  1945. // url: '',
  1946. // md5: '',
  1947. // name: '',
  1948. // }
  1949. // this.urlListImage = {
  1950. // url: [],
  1951. // md5: [],
  1952. // name: [],
  1953. // size: [],
  1954. // }
  1955. // this.imageArrList = []
  1956. // this.tags = []
  1957. // this.childrenDrawer = false
  1958. // this.visible=false;
  1959. // this.add = true
  1960. // for (const key in this.role) {
  1961. // if (key == 'roleCode') {
  1962. // this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
  1963. // }
  1964. // }
  1965. // this.$message.success('素材上传成功')
  1966. // this.loadingElse = false
  1967. // this.videoinfo={};
  1968. // this.imageinfo=[];
  1969. // this.materialHttp()
  1970. // // this.departValue = []
  1971. // } else {
  1972. // this.$message.error(res.message)
  1973. // this.loadingElse = false
  1974. // this.childrenDrawer = false
  1975. // this.visible=false;
  1976. // }
  1977. // })
  1978. } else {
  1979. fileEdit({
  1980. ...params,
  1981. status: '0',
  1982. }).then((res) => {
  1983. if (res.success) {
  1984. this.form.resetFields()
  1985. this.urlList = {
  1986. url: '',
  1987. md5: '',
  1988. name: '',
  1989. }
  1990. this.tags = []
  1991. this.childrenDrawer = false
  1992. this.add = true
  1993. for (const key in this.role) {
  1994. if (key == 'roleCode') {
  1995. this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
  1996. }
  1997. }
  1998. } else {
  1999. this.$message.error(res.message)
  2000. this.childrenDrawer = false
  2001. }
  2002. })
  2003. }
  2004. }else {
  2005. }
  2006. })
  2007. },
  2008. // 上传视频相关方法
  2009. removeUpload() {
  2010. this.urlList.url='';
  2011. this.urlList.md5='';
  2012. this.urlList.name='';
  2013. this.form.setFieldsValue({
  2014. // contentTagList: null,
  2015. modalityTagList: null,
  2016. modTagList: null,
  2017. senceTagList: null,
  2018. })
  2019. },
  2020. overUpload(urlAll) {
  2021. console.log(urlAll)
  2022. this.confirmLoading = true
  2023. this.repeat = false
  2024. this.urlList.url = urlAll[0].url
  2025. this.videoinfo.url=urlAll[0].url
  2026. this.$message.success('上传成功')
  2027. getAction('/ctop/materialTagInfo/detail', {
  2028. code: this.videoinfo.md5,
  2029. }).then((res) => {
  2030. if (res.success) {
  2031. if (res.modalityTagList.length > 0) {
  2032. this.form.setFieldsValue({
  2033. // contentTagList: res.contentTagList.map((item) => {
  2034. // return item.tagId
  2035. // }),
  2036. modalityTagList: res.modalityTagList.map((item) => {
  2037. return item.tagId
  2038. }),
  2039. modTagList: res.modTagList.map((item) => {
  2040. return item.tagId
  2041. }),
  2042. senceTagList: res.senceTagList.map((item) => {
  2043. return item.tagId
  2044. }),
  2045. })
  2046. }
  2047. }
  2048. })
  2049. },
  2050. deleteImage(url) {
  2051. console.log(url, this.urlListImage.url)
  2052. var index = this.imageArrList.findIndex((v) => v.url === url)
  2053. this.imageArrList.splice(index, 1)
  2054. console.log(index)
  2055. },
  2056. overUploadImage(urlAll) {
  2057. console.log(urlAll)
  2058. var that = this
  2059. that.material = []
  2060. that.imageArrList = []
  2061. var img
  2062. if (urlAll.length > 0) {
  2063. urlAll.forEach((ele,index)=>{
  2064. this.imageinfo.forEach(item=>{
  2065. if(item.name==ele.name){
  2066. item.url=ele.url
  2067. }
  2068. })
  2069. // img = new Image()
  2070. // img.src = urlAll[index].url
  2071. })
  2072. } else {}
  2073. },
  2074. addImage(item) {
  2075. this.addImageVisible = true
  2076. this.addImageData = item
  2077. },
  2078. showImage(item) {
  2079. this.chouzhen = true
  2080. this.chouzhenList = []
  2081. var params = {
  2082. videoSignature: item.code,
  2083. pageSize: 20,
  2084. pageNo: 1,
  2085. }
  2086. getAction('/cutFrame/material/list', params).then((res) => {
  2087. console.log(res)
  2088. if (res.success) {
  2089. this.chouzhenList.push(...res.result.records)
  2090. }
  2091. })
  2092. },
  2093. closeImage() {
  2094. this.addImageVisible = false
  2095. this.urlListImage = {
  2096. url: [],
  2097. md5: [],
  2098. name: [],
  2099. size: [],
  2100. }
  2101. this.imageArrList = []
  2102. },
  2103. file(file) {
  2104. console.log(file)
  2105. var bmf = new BMF()
  2106. var that = this
  2107. return new Promise( (resolve, reject)=> {
  2108. this.getVideoMsg(file).then((videoinfo) => {
  2109. const { duration, height, width } = videoinfo;
  2110. //获取到视频的时长,高度,宽度
  2111. bmf.md5(file, (err, md5) => {
  2112. videoinfo.name = file.name
  2113. videoinfo.md5 = md5
  2114. that.repeat = false
  2115. })
  2116. videoinfo.size=file.size;
  2117. videoinfo.format=file.type
  2118. console.log(videoinfo);
  2119. this.videoinfo=videoinfo
  2120. resolve()
  2121. });
  2122. })
  2123. },
  2124. getVideoMsg(file) {
  2125. // console.log('getVideoMsg')
  2126. return new Promise((resolve) => {
  2127. let videoElement = document.createElement("video");
  2128. videoElement.src = URL.createObjectURL(file);
  2129. videoElement.addEventListener("loadedmetadata", function () {
  2130. let obj={
  2131. duration: videoElement.duration,
  2132. height: videoElement.videoHeight,
  2133. width: videoElement.videoWidth,
  2134. }
  2135. window.URL.revokeObjectURL(videoElement.src);
  2136. videoElement.remove()
  2137. resolve(obj);
  2138. });
  2139. });
  2140. },
  2141. getImageMsg(file){
  2142. return new Promise((resolve) => {
  2143. // let imageElement = document.createElement("image");
  2144. let imageElement = new Image();
  2145. let obj={}
  2146. imageElement.src = URL.createObjectURL(file);
  2147. // console.log(imageElement)
  2148. imageElement.onload=function(){
  2149. // console.log(imageElement.width)
  2150. obj={
  2151. height:imageElement.height,
  2152. width:imageElement.width
  2153. }
  2154. console.log(obj)
  2155. resolve(obj)
  2156. }
  2157. });
  2158. },
  2159. fileWater(file) {
  2160. console.log(file)
  2161. var bmf = new BMF()
  2162. var that = this
  2163. var codeData = that.videoinfo.md5 != '' ? that.videoinfo.md5 : that.addImageData.code
  2164. console.log(codeData)
  2165. this.urlListImage = {
  2166. url: [],
  2167. md5: [],
  2168. name: [],
  2169. size: [],
  2170. }
  2171. this.imageinfo=[]
  2172. return new Promise( (resolve, reject)=> {
  2173. bmf.md5(file, (err, md5) => {
  2174. that.urlListImage.name.push(file.name)
  2175. that.urlListImage.md5.push(md5)
  2176. that.urlListImage.size.push(file.size)})
  2177. this.getImageMsg(file).then((imageinfo) => {
  2178. imageinfo.size=file.size;
  2179. imageinfo.format=file.type;
  2180. imageinfo.name=file.name
  2181. bmf.md5(file, (err, md5) => {
  2182. imageinfo.md5=md5
  2183. this.imageinfo.push({
  2184. ...imageinfo
  2185. })
  2186. resolve()
  2187. })
  2188. });
  2189. })
  2190. },
  2191. getTagListAll() {
  2192. this.departTree = []
  2193. this.departTreeModality = [] //形式
  2194. this.departTreeContent = [] // 内容
  2195. this.departTreeSence = [] // 场景
  2196. this.departTreeMod = [] //基调
  2197. this.getQueryTree(1, 'departTreeModality')
  2198. this.getQueryTree(2, 'departTreeMod')
  2199. this.getQueryTree(3, 'departTreeContent')
  2200. this.getQueryTree(4, 'departTreeSence')
  2201. },
  2202. getQueryTree(type, arr) {
  2203. getAction('/ctop/tagInfo/queryTreeList', {
  2204. categoryId: type,
  2205. }).then((res) => {
  2206. if (res.success) {
  2207. if (res.result) {
  2208. this[arr] = this.getTreeData(res.result)
  2209. }
  2210. }
  2211. })
  2212. },
  2213. getTreeData(data) {
  2214. for (var i = 0; i < data.length; i++) {
  2215. if (data[i].children) {
  2216. if (data[i].children.length < 1) {
  2217. // children若为空数组,则将children设为undefined
  2218. data[i].disabled = false
  2219. } else {
  2220. // // children若不为空数组,则继续 递归调用 本方法
  2221. data[i].disabled = true
  2222. this.getTreeData(data[i].children)
  2223. }
  2224. } else {
  2225. data[i].disabled = false
  2226. }
  2227. }
  2228. return data
  2229. },
  2230. getTagListInfo(md5) {
  2231. this.departValueInfoModality = []
  2232. this.departValueInfoMod = []
  2233. this.departValueInfoContent = []
  2234. this.departValueInfoSence = []
  2235. getAction('/ctop/materialTagInfo/detail', {
  2236. code: md5,
  2237. }).then((res) => {
  2238. if (res.success) {
  2239. // , ...res.contentTagList
  2240. this.tagInfoList = [...res.modalityTagList, ...res.senceTagList, ...res.modTagList]
  2241. if (this.tagInfoListVisible) {
  2242. this.departValueInfoModality = res.modalityTagList.map((item) => {
  2243. return item.tagId
  2244. })
  2245. this.departValueInfoMod = res.modTagList.map((item) => {
  2246. return item.tagId
  2247. })
  2248. // this.departValueInfoContent = res.contentTagList.map((item) => {
  2249. // return item.tagId
  2250. // })
  2251. this.departValueInfoSence = res.senceTagList.map((item) => {
  2252. return item.tagId
  2253. })
  2254. }
  2255. }
  2256. })
  2257. },
  2258. showInput() {
  2259. this.inputVisible = true
  2260. this.$nextTick(function () {
  2261. this.$refs.input.focus()
  2262. })
  2263. },
  2264. handleInputChange(e) {
  2265. this.inputValue = e.target.value
  2266. },
  2267. handleInputConfirm() {
  2268. const inputValue = this.inputValue
  2269. let tags = this.tags
  2270. if (inputValue && tags.indexOf(inputValue) === -1) {
  2271. tags = [...tags, inputValue]
  2272. }
  2273. Object.assign(this, {
  2274. tags,
  2275. inputVisible: false,
  2276. inputValue: '',
  2277. })
  2278. },
  2279. },
  2280. created(){
  2281. // getAction('/ctop/videoWatermarkTemplate/list').then(res => {
  2282. // if (res.success) {
  2283. // this.sizeType = res.result.records
  2284. // }
  2285. // });
  2286. this.getTagListAll()
  2287. let userInfo=localStorage.getItem('pro__Login_Userinfo');
  2288. if(userInfo){
  2289. this.userInfo=JSON.parse(userInfo).value
  2290. }
  2291. this.roleCode=localStorage.getItem('roleCode')
  2292. console.log(this.$parent.orderId)
  2293. this.currentOrderId=this.$parent.orderId;
  2294. this.role=this.$parent.role;
  2295. if(this.currentOrderId){
  2296. this.orderDetailHttp()
  2297. }
  2298. },
  2299. mounted() {
  2300. },
  2301. destroyed() {
  2302. this.currentOrderInfo={}
  2303. },
  2304. activated() {
  2305. this.currentOrderId=this.$parent.orderId;
  2306. this.role=this.$parent.role;
  2307. if(this.currentOrderId){
  2308. this.orderDetailHttp()
  2309. }
  2310. },
  2311. filters:{
  2312. handlerSysName(val){
  2313. let str='';
  2314. switch(val){
  2315. case '1':
  2316. str= 'IOS'
  2317. break;
  2318. case '2':
  2319. str= '安卓'
  2320. break;
  2321. case '3':
  2322. str= '不限'
  2323. break;
  2324. default:
  2325. str='出错的'
  2326. break;
  2327. }
  2328. return str
  2329. },
  2330. handlerOrderStatus(val){
  2331. let str='';
  2332. switch(val){
  2333. case 0:
  2334. str= '待确定'
  2335. break;
  2336. case 1:
  2337. str= '制作中'
  2338. break;
  2339. case 2:
  2340. str= '已驳回'
  2341. break;
  2342. case 3:
  2343. str= '已完成'
  2344. break;
  2345. case -1:
  2346. str= '已撤回'
  2347. break;
  2348. default:
  2349. str='出错了'
  2350. break;
  2351. }
  2352. return str
  2353. },
  2354. handlerVideoStatus(val){
  2355. let str='';
  2356. switch(val){
  2357. case 0:
  2358. str= '待上传'
  2359. break;
  2360. case 1:
  2361. str= '待审核'
  2362. break;
  2363. case 2:
  2364. str= '被驳回'
  2365. break;
  2366. case 3:
  2367. str= '已审核'
  2368. break;
  2369. default:
  2370. str='出错了'
  2371. break;
  2372. }
  2373. return str
  2374. },
  2375. handlerMaterialStatus(val){
  2376. let str='';
  2377. switch(val){
  2378. case 0:
  2379. str= '待指派'
  2380. break;
  2381. case 1:
  2382. str= '脚本待上传'
  2383. break;
  2384. case 2:
  2385. str= '脚本待审核'
  2386. break;
  2387. case 3:
  2388. str= '脚本被驳回'
  2389. break;
  2390. case 4:
  2391. str= '视频待上传'
  2392. break;
  2393. case 5:
  2394. str= '视频待审核'
  2395. break;
  2396. case 6:
  2397. str= '视频被驳回'
  2398. break;
  2399. case 7:
  2400. str= '物料已完结'
  2401. break;
  2402. default:
  2403. str='出错了'
  2404. break;
  2405. }
  2406. return str
  2407. },
  2408. }
  2409. }
  2410. </script>