orderDetail.vue 102 KB

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