123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046 |
- <style lang="scss" scoped>
- .orderDetail{
- ul,li{
- margin: 0;
- padding: 0;
- }
-
- width: 100%;
- .topBody{
- width: 100%;
- background: #FFFFFF;
- margin-bottom: 12px;
- padding: 20px;
- box-sizing: border-box;
- .breadcrumb{
- height: 22px;
- font-size: 12px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #000000;
- line-height: 22px;
- }
- .bottom{
- display: flex;
- position: relative;
- justify-content: space-between;
- // padding: 20px;
- .orderIcon{
- width: 28px;
- height: 28px;
- margin-right: 15px;
- img{
- width: 100%;
- }
- }
- .tip{
- .greet{
- width: 300px;
- height: 28px;
- font-size: 20px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: rgba(0, 0, 0, 0.85);
- line-height: 28px;
- margin-bottom: 5px;
- }
- .descPosition{
-
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: rgba(0, 0, 0, 0.45);
- overflow: hidden;
- margin-bottom: 0;
- li{
- height: 22px;
- line-height: 22px;
- margin-top:3px ;
- }
- span{
- width: 250px;
- display: inline-block;
- }
- }
- }
- .optBody{
- width: 200px;
- flex-shrink:0;
- // justify-content: flex-end;
- text-align: right;
- .btnBody{
- margin-bottom: 10px;
- }
- .orderInfo{
- display: flex;
- justify-content: space-between;
- text-align: right;
- p{
- margin-bottom: 0;
- }
-
- .markName{
- height: 22px;
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: rgba(0, 0, 0, 0.45);
- line-height: 22px;
- }
- .big{
- height: 28px;
- font-size: 20px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: rgba(0, 0, 0, 0.85);
- line-height: 28px;
- }
- }
- }
- }
- }
- .section{
- background: white;
- padding:20px ;
- .breadcrumb{
- height: 22px;
- font-size: 12px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #000000;
- line-height: 22px;
- }
- .sectionBody{
-
- p{
- margin-bottom: 0;
- }
- .section-item{
- background: white;
- margin-bottom: 20px;
- }
- .tabBox{
- padding: 15px 20px 0;
- display: flex;
- flex-wrap: wrap;
- position: relative;
- .search-item{
- margin-bottom: 12px;
- width: 30%;
- }
- .opt-item{
- position: absolute;
- right: 20px;
- top: 16px;
- }
- }
- .sectionHead{
- padding: 15px 20px;
- // height: 24px;
- font-size: 16px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: rgba(0, 0, 0, 0.85);
- line-height: 24px;
- border-bottom: 1px solid #E9E9E9;;
- .allOrder{
- float: right;
- }
- }
- .section-box{
- margin-top: 30px;
- padding: 20px 20px;
- border: 1px solid #E9E9E9;
- .description{
- margin-top: 10px;
- .time{
- height: 32px;
- line-height: 32px;
- }
- }
- ul{
- display: flex;
- flex-wrap: wrap;
- // justify-content: space-around;
- }
- li{
-
- width: 30%;
- height: 22px;
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: rgba(0, 0, 0, 0.85);
- line-height: 22px;
- text-align: left;
- margin-bottom: 15px;
- }
- .top{
- margin-bottom: 25px;
- }
- .bottom{
- h4{
-
- font-size: 15px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 600;
- color: rgba(0, 0, 0, 0.85);
- margin-bottom: 25px;
- }
- }
- .shenhe{
- width: 6px;
- height: 6px;
- display: inline-block;
- background: #52C41A;
- border-radius: 50%;
- position: relative;
- top: -2px;
- }
- .wancheng{
- width: 6px;
- height: 6px;
- display: inline-block;
- background: #1890FF;
- border-radius: 50%;
- // margin-right: 3px;
- position: relative;
- top: -2px;
- }
- .bohui{
- width: 6px;
- height: 6px;
- display: inline-block;
- background: #F5222D;
- border-radius: 50%;
- position: relative;
- top: -2px;
- }
- }
-
- }
- }
- }
- .videoBox{
-
- height: 240px;
- }
- .imgBox{
- width: 90%;
- }
- .videomarterialInfo{
- position: relative;
- // height: 800px;
- }
- .marterialInfo{
- overflow: auto;
- // height: 800px;
- position: relative;
- p{margin-bottom: 0;}
- ul,li{
- margin: 0;
- padding: 0;
- }
- .info-item{
- margin-bottom: 20px;
- display: flex;
- // justify-content: center;
- align-items: flex-start;
- span{
- display: inline-block;
- width: 70px;
- text-align: left;
- flex-shrink: 0;
- }
- .ant-tag{
- width: auto;
- min-width: 50px;
- text-align: center;
- }
- }
- .info{
- ul{
- width: 100%;
- display: flex;
- justify-content: space-between;
- flex-wrap: wrap;
- }
- li{
- width: 33.3%;
- margin-bottom: 20px;
- }
- margin-bottom: 0;
- }
- // .btnBody{
- // width: 100%;
- // height: 80px;
- // position: relative;
- // }
- .bottom-btn{
- width: 100%;
- text-align: center;
- position: absolute;
- bottom: 0px;
- left: 0;
- // margin-top: 20px;
- }
- .scriptbottom-btn{
- width: 100%;
- // height: 60px;
- line-height: 60px;
- text-align: center;
- position: absolute;
- bottom: 0px;
- left: 0;
-
- }
- }
- </style>
- <style lang="less">
- .orderDetail{
- .ant-timeline-item-head{
- background: rgb(240,242,245);
- }
- .muen{
- cursor: pointer;
- }
- .muen:hover{
- color: #1890ff;
- }
- }
-
-
- </style>
- <template>
- <div class="orderDetail ">
-
- <div class="section">
- <p class="breadcrumb">
- <a-breadcrumb style="display:block;width:100%">
- <a-breadcrumb-item ><span class="muen" @click="goPlantForm()">工作台</span></a-breadcrumb-item>
- <!-- <a-breadcrumb-item>订单列表</a-breadcrumb-item> -->
- <a-breadcrumb-item>物料列表</a-breadcrumb-item>
- </a-breadcrumb>
- </p>
- <div class="sectionBody">
- <div class="tabBody">
- <a-tabs v-model="activeKey" @change='tabChange'>
- <a-tab-pane v-for="pane in panes" :key="pane.key" :tab="pane.title" >
- <!-- {{ pane.content }}{{pane.role+'-'+roleCode}} -->
- </a-tab-pane>
- </a-tabs>
- </div>
- <!-- 素材列表 -->
- <div class="section-item">
- <div class="tabBox">
-
- <!-- <div class="search-item">
- <span>物料名称:</span>
- <a-input placeholder="请输入名称" allow-clear v-model="materialName" style="width:300px" />
- </div>
- <div class="search-item">
- <span>物料编号:</span>
- <a-input placeholder="请输入编号" allow-clear v-model="materialId" style="width:300px" />
- </div>
-
- <div class="search-item">
- <span>所属订单:</span>
- <a-input placeholder="请输入订单名称" allow-clear v-model="orderName" style="width:300px" />
- </div>
- <div class="opt-item">
- <a-button type='primary' @click="search" style="margin-right:20px">查询</a-button>
- <a-button type='default' @click="reset">查询</a-button>
- </div> -->
- </div>
-
-
- <div class="section-box">
- <a-table
- size="middle"
- :columns="columns"
- :dataSource="data"
- id="outTable"
- :pagination="ipagination"
- :loading="loading"
- @change="sort"
- style="word-break: break-all;"
- >
- <div slot="materialStatus" slot-scope="text" >
- <span class="wancheng" v-if="text==7"> </span>
- <span class="bohui" v-else-if="text==6||text==3"> </span>
- <span class="shenhe" v-else> </span>
- {{text | handlerMaterialStatus}}
- </div>
- <div slot="scriptStatus" slot-scope="text,record">
- <span v-if="record.materialStatus==0&&role=='design'">-</span>
- <a href="javascript:;" v-if="record.materialStatus==0&&role=='designLeader'" @click="scriptAssign(record)">指派</a>
- <span v-else>
- <a href="javascript:;" @click="scriptViewDetails(record)">{{record.planName}}</a>
- </span>
- </div>
- <div slot="videoStatus" slot-scope="text,record">
- <span v-if="record.materialStatus==0&&role=='design'">-</span>
- <a href="javascript:;" v-if="record.materialStatus==0&&role=='designLeader'" @click="videoAssign(record)">指派</a>
- <span v-else>
- <a href="javascript:;" @click="viewDetails(record)">{{record.clipName}}</a>
- </span>
- </div>
- <div slot="orderTitle" slot-scope="text,record">
-
- <a href="javascript:;" @click="goOrderDetail(record)">{{text}}</a>
-
- </div>
- </a-table>
- </div>
-
- <a-drawer
- title="视频详情"
- width="700"
- :placement="placement"
- :closable="false"
- :visible="visible"
- @close="onClose"
- >
-
- <a-spin :spinning="visibleLoading">
- <a-drawer
- :title="add ? '上传视频' : '修改视频'"
- width="600"
- :closable="false"
- :visible="childrenDrawer"
- @close="onChildrenDrawerClose"
- >
- <a-spin :spinning="videoUploadLoading">
- <a-form :form="form" :label-col="labelCol" :wrapper-col="wrapperCol">
-
- <a-form-item label="视频上传">
-
- <uploadFile
- :checkFile="file"
- :value.sync="urlList.url"
- @overUpload="overUpload"
- @removeUpload="removeUpload"
- :fileCount="1"
- uploadType="video"
- :multiple="false"
- />
- <span v-if="repeat" style="color: red">此素材重复,请重新选择上传</span>
- <!-- {{urlList.url }} -->
- <span v-if="confirmLoading && urlList.url != ''" style="color: green">上传成功</span>
- </a-form-item>
-
- <a-form-item
- label="封面上传"
- class="add-image-material"
- v-if="currentMaterial.projectId && add && urlList.url != ''"
- >
- <uploadFile
- :value.sync="urlListImage.url"
- :checkFile="fileWater"
- @overUpload="overUploadImage"
- @removeUpload="deleteImage"
- :fileCount="15"
- uploadType="image"
- />
- <span
- v-if="material.filter((item) => item == false).length > 0 && urlListImage.url.length > 0"
- style="color: red"
- >
- 上传素材的尺寸不符,请修改(
- <span v-for="(item, index) of material" :key="index" v-show="!item">第{{ index + 1 }}张</span>出错)
- </span>
- <span
- v-else-if="urlListImage.url.length > 0 && material.filter((item) => item == false).length == 0"
- style="color: green"
- >上传成功</span
- >
- </a-form-item>
- <a-form-item
- label="形式标签"
- v-if="add && visible"
- >
- <el-cascader
- placeholder="搜索你想要的形式标签"
- :options="departTreeModality"
- v-decorator="[
- 'modalityTagList', // 给表单赋值或拉取表单时,该input对应的key
- { rules: [{ required: true, message: '请选择形式标签!' }] },
- ]"
- :props="{ multiple: true,
- value: 'id',
- label: 'tagName',
- emitPath: false,
- checkStrictly: true,
- expandTrigger: 'hover', }"
- filterable
- style="width: 100%"
- ></el-cascader>
- </a-form-item>
- <!-- <a-form-item
- :label-col="labelCol"
- :wrapper-col="{
- xs: { span: 24 },
- sm: { span: 12 },
- }"
- label="内容标签"
- v-if="add && visible"
- >
- <el-cascader
- placeholder="搜索你想要的内容标签"
- :options="departTreeContent"
- class="only-video-material-disable-modal"
- v-decorator="[
- 'contentTagList',
- { rules: [{ required: true, message: '请选择内容标签!' }] },
- ]"
- :props="{
- checkStrictly: true, value: 'tagCode', label: 'tagName', expandTrigger: 'hover'
- }"
- filterable
- style="width: 100%"
- ></el-cascader>
- </a-form-item> -->
- <a-form-item
- :label-col="labelCol"
- :wrapper-col="{
- xs: { span: 24 },
- sm: { span: 12 },
- }"
- label="场景标签"
- v-if="add && visible"
- >
- <el-cascader
- placeholder="搜索你想要的场景标签"
- :options="departTreeSence"
- v-decorator="[
- 'senceTagList', // 给表单赋值或拉取表单时,该input对应的key
- { rules: [{ required: true, message: '请选择场景标签!' }] },
- ]"
- :props="{ multiple: true,
- value: 'id',
- label: 'tagName',
- emitPath: false,
- checkStrictly: true,
- expandTrigger: 'hover', }"
- filterable
- style="width: 100%"
- ></el-cascader>
- </a-form-item>
- <a-form-item
-
- label="基调标签"
- v-if="add && visible"
- >
- <el-cascader
- placeholder="搜索你想要的基调标签"
- :options="departTreeMod"
- v-decorator="[
- 'modTagList', // 给表单赋值或拉取表单时,该input对应的key
- { rules: [{ required: true, message: '请选择基调标签!' }] },
- ]"
- :props="{ multiple: true,
- value: 'id',
- label: 'tagName',
- emitPath: false,
- checkStrictly: true,
- expandTrigger: 'hover', }"
- filterable
- style="width: 100%"
- ></el-cascader>
- </a-form-item>
- <a-form-item
-
- label="描述"
- v-if="add"
- >
- <div style="position:relative">
- <a-textarea
- placeholder="请输入描述"
- v-decorator="[
- 'description', // 给表单赋值或拉取表单时,该input对应的key
- ]"
- :maxLength='50'
- :auto-size="{ minRows: 5, maxRows: 6 }"
- @change="descriptionChange"
- />
- <span style="position:absolute;bottom:5px;right:10px;line-height:24px"><span style="color:#1890ff">{{descriptionlength.length || 0}}</span>/50</span>
- </div>
- </a-form-item>
- </a-form>
- </a-spin>
- <div
- :style="{
- position: 'absolute',
- bottom: 0,
- width: '100%',
- borderTop: '1px solid #e8e8e8',
- padding: '10px 16px',
- textAlign: 'right',
- left: 0,
- background: '#fff',
- borderRadius: '0 0 4px 4px',
-
- }"
- >
-
- <a-button key="back" @click="onChildrenDrawerClose" style="margin-right:15px">取消</a-button>
- <a-button type="primary" :disabled="!confirmLoading" @click="onChildrenDrawerOk" :loading="loadingElse">确定</a-button>
-
- </div>
- </a-drawer>
-
-
- <div class="marterialInfo videomarterialInfo">
- <div class="info-item">
- <span>视频状态:</span>
- <p>{{ currentVideo.videoStatus | handlerVideoStatus }}</p>
- </div>
- <div class="info-item">
- <span>视频预览:</span>
- <div class="videoBox" v-if="currentVideo.videoStatus>=1">
- <video style="height:100%" :src="currentVideo.url" controls v-if="currentVideo.url"></video>
- <img :src="defaultPic" alt="" style="width:100px;margin:0 10px 8px 0" v-else>
- </div>
- <div v-else >
- <!-- :disabled="!(currentVideo.clip==userInfo.id)" -->
- <a-button type='primary' @click="showChildrenDrawer" :disabled="!(currentVideo.clip==userInfo.id)">上传视频</a-button>
- </div>
- </div>
- <div class="info-item">
- <span>封面预览:</span>
- <div class="imgBox">
- <div v-if="currentVideo.videoStatus!=0">
- <template v-if="currentVideo.imgList&¤tVideo.imgList.length">
- <img alt="" style="width:100px;margin:0 10px 8px 0" v-for="(item,index) in currentVideo.imgList" @click="openBigImage(item)" :key='index' :src="item">
- </template>
- <span v-else>暂无封面</span>
- </div>
-
- <!-- <img :src="defaultPic" alt="" style="width:100px;margin:0 10px 8px 0" v-else> -->
- <span v-else>暂无封面</span>
- </div>
- </div>
-
- <div class="info-item" v-if="currentVideo.videoStatus>=1">
- <span>视频标签:</span>
- <p>
- <a-tag v-for="(item,index) in currentVideo.tagList" :key="index" style="margin-bottom:8px">{{item}}</a-tag>
- <!-- {{currentVideo.tag}} -->
- </p>
- </div>
- <div class="info-item info">
- <ul style="position:relative">
-
- <li><span>编导:</span> {{ currentVideo.planName }} </li>
- <li><span>拍摄:</span> {{ currentVideo.shotName }} </li>
- <li><span>剪辑:</span> {{ currentVideo.clipName }} </li>
- <!-- v-if="role=='designLeader'&¤tVideo.videoStatus==0" -->
- <a-button type='link' style="margin-left:15px;position:absolute;top:-6px;right:0" @click="updataPeople" v-if="role=='designLeader'&¤tVideo.videoStatus==0">重新指派</a-button>
- </ul>
- </div>
- <div class="info-item" v-if="currentVideo.videoStatus==2">
- <span>驳回理由:</span>
- <p>{{ currentVideo.videoAdvise }}</p>
- </div>
- <!-- <div class="info-item btnBody"> -->
- <!-- <div class="bottom-btn">
- <a-button type='primary' v-if="currentVideo.videoStatus>=1" @click="modifyVideo" :disabled="!(currentVideo.clip==userInfo.id)" style="margin-right:20px">修改视频信息</a-button>
- <a-button type='default' @click="onClose">关闭</a-button>
- </div> -->
- <!-- </div> -->
-
- </div>
- </a-spin>
- <div
- :style="{
- position: 'absolute',
- right: 0,
- bottom: 0,
- width: '100%',
- borderTop: '1px solid #e9e9e9',
- padding: '10px 16px',
- background: '#fff',
- textAlign: 'right',
- zIndex: 1,
- }"
- >
- <a-button type='primary' v-if="currentVideo.videoStatus>=1&¤tVideo.videoStatus<3" @click="modifyVideo" :disabled="!(currentVideo.clip==userInfo.id)" style="margin-right:20px">修改视频信息</a-button>
- <a-button type='default' @click="onClose">关闭</a-button>
- </div>
- </a-drawer>
-
- <a-drawer
- title="脚本详情"
- width="600"
- :placement="placement"
- :closable="false"
- :visible="scriptVisible"
- @close="scriptClose"
- >
- <a-spin :spinning="visibleLoading">
- <div class="marterialInfo">
- <div class="info-item">
- <span>脚本状态:</span>
- <p>{{ currentScript.scriptStatus | handlerVideoStatus }}</p>
- </div>
- <div class="info-item">
- <span>所属项目:</span>
- <p>{{currentScript.projectName}}</p>
-
- </div>
- <div class="info-item">
- <span>所属物料:</span>
- <p>{{currentScript.materialName}}</p>
- </div>
- <div class="info-item">
- <span style="height: 32px;line-height: 32px;">编导:</span>
- <p style="height:32px;line-height:32px">
- {{currentScript.planName}}
- <a-button type='link' style="margin-left:15px" @click="updataPeople" v-if="role=='designLeader'&¤tScript.scriptStatus==0">重新指派</a-button>
- </p>
- </div>
- <div class="info-item" v-if="currentScript.scriptStatus==2">
- <span>驳回理由:</span>
- <p>{{currentScript.scriptAdvise}}</p>
- </div>
- <div class="info-item">
- <span>脚本:</span>
- <div v-if="currentScript.scriptStatus>0" style="margin-right:20px">
- <a :href="currentScript.url">{{currentScript.scriptName}}</a>
- </div>
- <div v-if="currentScript.scriptStatus<3">
-
- <p v-if="currentMaterial.plan==userInfo.id">
- <a-upload
- name="file"
- :multiple="false"
- :action="uploadAction"
- :headers="tokenHeader"
- :showUploadList="false"
- :beforeUpload="beforeUpload"
- @change="handleChange"
- style="margin-right:20px"
-
- >
- <a-button :disabled="loadDisabled">
- <a-icon type="upload" />
- {{loadDisabled?'上传中,请稍后':'文件上传'}}
- </a-button>
- </a-upload>
- </p>
- <p v-else>
- <a-upload
- name="file"
- :multiple="false"
- :action="uploadAction"
- :headers="tokenHeader"
- :showUploadList="false"
- :beforeUpload="beforeUpload"
- @change="handleChange"
- style="margin-right:20px"
-
- >
- <a-button :disabled="true">
- <a-icon type="upload" />文件上传</a-button>
- </a-upload>
- </p>
-
- </div>
-
- </div>
-
- <!-- <div class="scriptbottom-btn">
-
- <a-button type='default' @click="scriptClose">关闭</a-button>
- </div> -->
- </div>
- </a-spin>
- <div
- :style="{
- position: 'absolute',
- right: 0,
- bottom: 0,
- width: '100%',
- borderTop: '1px solid #e9e9e9',
- padding: '10px 16px',
- background: '#fff',
- textAlign: 'right',
- zIndex: 1,
- }"
- >
- <a-button type='default' @click="scriptClose">关闭</a-button>
- </div>
- </a-drawer>
- <!-- 指派 -->
- <a-modal v-model="assignVisible" title="物料指派" width='600px'>
- <template slot="footer">
- <a-button key="back" @click="quxiao">取消</a-button>
- <a-button type="primary" @click="handleOk" :loading="loadingElse">确定</a-button>
- </template>
- <a-spin :spinning='assignVisibleLoading'>
- <a-form-model ref="ruleForm" :rules="rules" :model="formPerson" :label-col="labelCol" :wrapper-col="wrapperCol">
- <a-form-model-item label="编导" ref="plan" prop="plan">
- <a-select
- v-model="formPerson.plan"
- showSearch
- optionFilterProp="children"
- :filterOption="filterOption"
- :disabled="currentMaterial.materialStatus>=4"
- >
- <a-select-option :value="item.userId" v-for="item of ascription" :key="item.userId">{{item.userName}}</a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item label="拍摄" ref="shot" prop="shot" :rules='[{ required: currentMaterial.materialType==1, message: "拍摄人员必须指派" ,trigger: "change" }]'>
- <a-select
-
- v-model="formPerson.shot"
- showSearch
- optionFilterProp="children"
- :filterOption="filterOption"
- >
- <a-select-option :value="item.userId" v-for="item of ascription" :key="item.userId">{{item.userName}}</a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item label="剪辑" ref="clip" prop="clip">
- <a-select
- v-model="formPerson.clip"
- showSearch
- optionFilterProp="children"
- :filterOption="filterOption"
- >
- <a-select-option :value="item.userId" v-for="item of ascription" :key="item.userId">
- {{item.userName}}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- </a-form-model>
- </a-spin>
- </a-modal>
- <a-modal v-model="viewImgVisiable" title="封面预览" width='600px' :footer=null>
-
- <div style="position:relative;text-align:center">
- <img :src="viewImgUrl" alt="" width="250">
- </div>
-
- </a-modal>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import moment from 'moment';
- import qs from 'qs'
- import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
- import Vue from 'vue'
- import {ACCESS_TOKEN} from "@/store/mutation-types"
- import BMF from 'browser-md5-file'
- import { fileCheck, fileCheckImage, fileEdit, fileEditAll,orderFileInsert} from '@/api/actor'
- import uploadFile from '@/components/uploadFile.vue'
- import { closeAllVideoFun, stopOtherVideo } from '@/utils/videoControl'
- import UploadToAli from '@femessage/upload-to-ali'
- import { mapGetters } from 'vuex'
- import TrendVue from '../../../components/Trend/Trend.vue';
- const fileSuffix = [
- 'xls',
- 'xlt',
- 'et',
- 'xlsx',
- 'xltx',
- 'csv',
- 'xlsm',
- 'xltm',
- 'doc',
- 'dot',
- 'wps',
- 'wpt',
- 'docx',
- 'dotx',
- 'docm',
- 'dotm',
- 'ppt',
- 'pptx',
- 'pptm',
- 'ppsx',
- 'ppsm',
- 'pps',
- 'potx',
- 'potm',
- 'dpt',
- 'dps',
- 'pdf',
- ]
- const videofileSuffix = [
- 'avi',
- 'wmv',
- 'mpg',
- 'mpeg',
- 'mov',
- 'rm',
- 'ram',
- 'swf',
- 'flv',
- 'mp4',
-
- ]
- let listColumns=[
- {
- title: '物料名称',
- dataIndex: 'materialName',
- align: 'center',
- key: 'materialName',
- scopedSlots: { customRender: 'materialName' }
- },
- {
- title: '物料编号',
- dataIndex: 'materialId',
- align: 'center',
- key: 'tag',
- scopedSlots: { customRender: 'materialId' }
- },
- {
- title: '物料状态',
- dataIndex: 'materialStatus',
- align: 'center',
- key: 'materialStatus',
- scopedSlots: { customRender: 'materialStatus' }
- },
- {
- title: '脚本',
- dataIndex: 'scriptStatus',
- align: 'center',
- key: 'scriptStatus',
- scopedSlots: { customRender: 'scriptStatus' }
- },
- {
- title: '视频',
- dataIndex: 'videoStatus',
- align: 'center',
- key: 'videoStatus',
- width:250,
- scopedSlots: { customRender: 'videoStatus' }
- },
- {
- title: '所属订单',
- dataIndex: 'orderTitle',
- align: 'center',
- key: 'orderTitle',
- scopedSlots: { customRender: 'orderTitle' }
- },
-
- ]
- export default {
- name:'material-list',
- components: {
-
- UploadToAli,
- uploadFile,
-
- },
- data() {
-
- const operatorPanes = [
- { title: '待审核的', content: '', key: 1 , },
- { title: '已完成的', content: '', key: 2 ,},
- ];
- const designLeaderPanes=[
-
- { title: '我参与的', content: '', key: 1 , },
- { title: '被驳回的', content: '', key: 2 , },
- { title: '待指派的', content: '', key: 4 , },
- // { title: '已完成的', content: '', key: 3 ,},
-
- ]
- const designPanes=[
- { title: '指派给我', content: '', key: 1 , },
- { title: '被驳回的', content: '', key: 2 , },
- { title: '已完成的', content: '', key: 3 ,},
- { title: '全部物料', content: '', key: 4 ,},
-
- ]
- return {
- descriptionlength:'',
- viewImgUrl:'',
- viewImgVisiable:false,
- videoEchoInfo:{},
- videoUploadLoading:false,
- videoinfo:{
- url: '',
- md5: '',
- name: '',
- width:undefined,
- height:undefined,
- },
- imageinfo:[],
- assignVisibleLoading:false,
- visibleLoading:false,
- loadingElse2:false,
- rules: {
-
- clip: [{ required: true, message: '剪辑人员必须指派', trigger: 'change' }],
- // shot: [{ required: true, message: '拍摄人员必须指派', trigger: 'change' }],
- plan: [{ required: true, message: '编导人员必须指派', trigger: 'change' }],
-
- },
- // 上传视频
- labelCol: {xs: {span: 24,},sm: {span: 5,},},
- wrapperCol: {xs: {span: 24,},sm: {span: 12,},},
- form:this.$form.createForm(this),
- repeat: false,
- confirmLoading: false,
- urlList: {
- url: '',
- md5: '',
- name: '',
- },
- urlListImage: {
- url: [],
- md5: [],
- name: [],
- size: [],
- },
- tags: [],
- addImageVisible: false,
- addImageData: null,
- material: [],
- // 标签的数据
- labelValue: [],
- options: [],
- departTree: [],
- departTreeModality: [],
- departTreeContent: [],
- departTreeSence: [],
- departTreeMod: [],
- departValue: [],
- departValueInfo: [],
- departValueInfoModality: [],
- departValueInfoContent: [],
- departValueInfoSence: [],
- departValueInfoMod: [],
- tagInfoList: [],
- tagInfoListVisible: false,
- tagCode: null,
- loadingTag: false,
- showImageChouzhen: false,
- showImageStr: null,
- add: true,
- inputVisible: false,
- inputValue: '',
- childrenDrawer:false,
- videoAdvise:'',
- scriptAdvise:'',
- defaultPic: require('@/assets/noImg.png') ,
-
- tokenHeader: {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)},
- uploadAction:'',
- videoLoad:false,
- loadDisabled:false,
- labelCol: { span: 4 },
- wrapperCol: { span: 14 },
- loadingElse: false,
- formPerson:{
- plan:'',
- shot:'',
- clip:'',
- },
-
- ascription: [],
- acceptLoading:false,
- videoAdvise:'',
- scriptAdvise:'',
- currentScript:{},
- currentVideo:{},
- visible: false,
- scriptVisible:false,
- placement: 'right',
- currentMaterial:{},
- url:{
- assgin:'/platform/designer/assign',
- scriptDetail:'/platform/material/scriptDetail',
- videoDetail:'/platform/material/videoDetail',
- scriptAccept:'/platform/material/script/accept',
- scriptReject:'/platform/material/script/reject',
- videoAccept:'/platform/material/video/accept',
- videoReject:'/platform/material/video/reject',
- },
- operatorPanes,
- designLeaderPanes,
- designPanes,
- userInfo:{},
- roleCode:'',
- panes:[],
- activeKey: '1',
- orderInfo:{ },
- columns:[...listColumns],
- data:[],
- loading:false,
- ipagination: {
- current: 1,
- pageSize: 10,
- // pageSizeOptions: ['10', '20', '30'],
- showTotal: (total, range) => {
- return range[0] + "-" + range[1] + " 共" + total + "条"
- },
- showQuickJumper: true,
- showSizeChanger:true,
- pageSizeOptions: ['10', '30', '50'],
- total: 0,
- onChange: (current, pageSize) => {
- // 切换分页时的回调,
- // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
- this.ipagination.current = current;
- this.ipagination.pageSize= pageSize;
- }
- },
- // 订单进度
- orderName:'',
- materialName:'',
- materialId:'',
-
- sizeType:[],
- size: "4",
- role:"",
- assignVisible:false,
-
- }
- },
- methods: {
- descriptionChange(e){
- this.descriptionlength=e.target.value
- },
- openBigImage(item){
- this.viewImgVisiable=true;
- this.viewImgUrl=item
- },
- quxiao(){
- this.assignVisible=false;
- this.$refs.ruleForm.resetFields();
- this.loadingElse=false;
- },
- handleOk(e) {
- console.log(e);
- this.$refs.ruleForm.validate(valid => {
- if (valid) {
- this.loadingElse=true;
- if(this.currentMaterial.clip&&this.currentMaterial.plan&&this.currentMaterial.shot){
- postAction('/platform/designer/assignAgain',{
- id:this.currentMaterial.materialId,
- ...this.formPerson
- }).then(res=>{
- this.loadingElse=false;
- this.assignVisible = false;
- this.$message.success(res.message);
- this.materialHttp(this.activeKey)
- })
- }else{
- postAction(this.url.assgin,{
- id:this.currentMaterial.materialId,
- ...this.formPerson
- }).then(res=>{
- this.loadingElse=false;
- this.assignVisible = false;
- this.$message.success(res.message);
- this.materialHttp(this.activeKey)
- })
- }
-
- } else {
- console.log('error submit!!');
- return false;
- }
- });
-
-
- },
- // 脚本指派
- scriptAssign(record){
- console.log(record)
- this.currentMaterial=record;
- this.assignVisible=true;
- this.formPerson={
- plan:'',
- shot:'',
- clip:'',
- },
- this.getProjectId(record.projectId)
- },
- // 视频指派
- videoAssign(record){
- console.log(record)
- this.formPerson={
- plan:'',
- shot:'',
- clip:'',
- },
- this.currentMaterial=record;
- this.assignVisible=true;
- this.getProjectId(record.projectId)
- },
- updataPeople(){
- this.formPerson={
- plan:this.currentMaterial.plan,
- shot:this.currentMaterial.shot,
- clip:this.currentMaterial.clip,
- },
-
- this.assignVisible=true;
- this.scriptVisible=false;
- this.visible=false;
- this.assignVisibleLoading=true;
- this.getProjectId(this.currentMaterial.projectId)
- },
- getProjectId(id) {
- this.ascription=[];
- getAction('/ctop/projectMember/getMemberList', {
- projectId: id,
- }).then((res) => {
- this.assignVisibleLoading=false;
- if (res.code == 0) {
- this.ascription = res.result.filter((item) => {
- if (
- item.roleCode == 'clip' ||
- item.roleCode == 'plan' ||
- item.roleCode == 'designTeamLeader' ||
- item.roleCode == 'shot' ||
- item.roleCode == 'plane'
- ) {
- return {
- userId: item.userId,
- userName: item.userName,
- }
- }
- })
- }
- })
- },
- modifyVideo(){
- this.childrenDrawer=true;
- // console.log(this.currentVideo);
-
- this.videoUploadLoading=true
- getAction('/platform/material/videoEcho',{
- videoId:this.currentVideo.videoId
- }).then(res=>{
- console.log(res)
- console.log(res)
- this.videoUploadLoading=false;
- this.confirmLoading=true;
- if(res.result.video){
- this.urlList=res.result.video
- this.videoinfo=res.result.video;
- this.videoinfo.url=this.videoinfo.url.replace(/https:/g,'')
- }
- if(res.result.covers){
- this.imageinfo=res.result.covers;
- this.urlListImage= {
- url : res.result.covers.map(item=>{return item.url}),
- md5 : res.result.covers.map(item=>item.md5),
- name : res.result.covers.map(item=>item.name),
- size : res.result.covers.map(item=>item.size),
- format : res.result.covers.map(item=>item.format),
- }
- }
-
- this.form.setFieldsValue({
- // contentTagList: res.result.tags.contentTagList.map(item=>{return item.tagId}),
- modalityTagList: res.result.tags.modalityTagList.map(item=>{return item.tagId}),
- modTagList: res.result.tags.modTagList.map(item=>{return item.tagId}),
- senceTagList: res.result.tags.senceTagList.map(item=>{return item.tagId}),
- description:res.result.video.description
- })
- this.descriptionlength=res.result.video.description
- this.videoEchoInfo=res.result
- })
-
- },
- goOrderDetail(record){
- console.log(record)
- this.$parent.currentTabComponent='orderDetail';
- this.$parent.orderId=record.orderId
- },
- goPlantForm(){
- if(this.$parent.role=='operator'){
- this.$parent.currentTabComponent='operatorPlatform'
- }else if(this.$parent.role=='designLeader'){
- this.$parent.currentTabComponent='designleaderPlatform'
- }else if(this.$parent.role=='design'){
- this.$parent.currentTabComponent='designPlatform'
- }
- },
- tabChange(key){
- console.log(key)
- this.materialHttp(key)
- },
- handleChange(value) {
- console.log(`selected ${value}`);
- },
-
- filterOption(input, option) {
- return (
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
- );
- },
-
-
- onClose() {
- this.visible = false;
- },
- // 上传素材
- uploadMaterial(){
- },
- sort(pagination, filters, sorter, { currentDataSource }){
-
- this.ipagination.current=pagination.current;
- this.ipagination.pageSize=pagination.pageSize;
- this.materialHttp(this.activeKey)
- },
- // 请求素材
- materialHttp(type){
- this.loading=true;
- this.data=[];
- let params=this.handlerParams(type)
- params={
- ...params,
- pageNo:this.ipagination.current,
- pageSize:this.ipagination.pageSize
- }
- getAction('/platform/material/listByRole',params).then(res=>{
- console.log(res);
- if(res.success){
- this.loading=false;
- this.data=res.result.list;
- this.ipagination.total=res.result.total;
- }
- })
- },
-
- onClose() {
- this.visible = false;
- },
- scriptClose() {
- this.scriptVisible = false;
- },
- // 视频查看详情
- viewDetails(record){
- console.log(record)
- this.currentMaterial=record
- if(record.materialStatus>=4){
- this.currentVideo={};
- this.visible = true;
-
- if(record.videoId){
- this.visibleLoading=true
- getAction(this.url.videoDetail,{
- videoId:record.videoId
- }).then(res=>{
- console.log(res);
- this.visibleLoading=false
- if(res.success){
- if(res.result){
-
- let tagList=res.result.tag?res.result.tag.split(','):[]
- let imgList=res.result.imageUrl?res.result.imageUrl.split(','):[]
- console.log(tagList)
- this.currentVideo={
- ...res.result,
- tagList,
- imgList
- }
- }
-
-
- }else{
- this.currentVideo={};
- }
- })
- }else{
- this.currentVideo=record
- this.visible = true;
- }
- }else{
- this.$message.error('请等待脚本审核通过后,上传视频')
- }
-
- },
- // 脚本查看详情
- scriptViewDetails(record){
- console.log(record)
- this.currentMaterial=record
- this.currentScript={};
- if(record.scriptId){
- this.visibleLoading=true
- getAction(this.url.scriptDetail,{
- scriptId:record.scriptId
- }).then(res=>{
- console.log(res);
- this.visibleLoading=false
- if(res.success){
- this.currentScript=res.result;
- this.scriptVisible = true;
- }else{
- this.currentScript={};
- }
- })
- }else{
- this.currentScript=record
- this.scriptVisible = true;
- }
-
- },
-
- search(){
- },
- reset(){
- this.materialName='';
- this.materialId='';
- this.orderStatus='';
- this.orderParticipants="";
- this.orderSponsor='';
- },
-
- handlerParams(status){
- if(this.$parent.role=='designLeader'){
- if(status==1){
- return {
- materialStatus:'1234567',
- designUserId:this.userInfo.id
- }
- }else if(status==2){
- return {
- materialStatus:'36',
- designUserId:this.userInfo.id
- }
- }else if(status==4){
- return {
- materialStatus:'0',
- designUserId:this.userInfo.id
- }
- }
- }else if(this.$parent.role=='design'){
- if(status==1){
- return {
- materialStatus:'1346',
- designUserId:this.userInfo.id
- }
- }else if(status==2){
- return {
- materialStatus:'36',
- designUserId:this.userInfo.id
- }
- }else if(status==3){
- return {
- materialStatus:'7',
- designUserId:this.userInfo.id
- }
- }else if(status==4){
- return {
- materialStatus:'1234567',
- designUserId:this.userInfo.id
- }
- }
- }
-
- },
- handlerParamsRole(role){
- if(this.$parent.role=='operator'){
- this.panes=this.operatorPanes
- }else if(this.$parent.role=='designLeader'){
- this.panes=this.designLeaderPanes
- }
- },
- beforeUpload(file) {
- if (process.env.NODE_ENV == 'development') {
- this.uploadAction= `/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
- }
- else if (process.env.NODE_ENV == 'debug') {
- }
- else if (process.env.NODE_ENV == 'production') {
- this.uploadAction= `${this.axios.defaults.baseURL}/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
- }
- // this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
- // this.uploadAction= `http://139.186.151.174:8804/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
- // this.uploadAction= `http://192.168.1.43:8088/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
- this.loadDisabled = true
- const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
- const fileName = file.name
- const fileStrArr = fileName.split('.')
- const suffix = fileStrArr[fileStrArr.length - 1]
- let result = fileSuffix.some((item) => {
- return item === suffix
- })
- if (!result) {
- this.$message.error('不支持该文件类型')
- this.loadDisabled = false
- return false
- }
- if (size > 10) {
- this.$message.error('文件不能大于10MB')
- this.loadDisabled = false
- return false
- }
-
- },
- handleChange(info) {
- if (info.file.status !== 'uploading') {
- console.log(info.file, info.fileList)
- }
- if (info.file.status === 'done') {
- this.$message.success(`${info.file.name} 上传成功`)
- this.loadDisabled = false
- this.scriptVisible=false;
- this.materialHttp(this.activeKey)
- } else if (info.file.status === 'error') {
- this.$message.error(`${info.file.name} file upload failed.`)
- this.loadDisabled = false
- this.scriptVisible=false;
- }
- },
- showChildrenDrawer() {
- this.childrenDrawer = true;
- this.getTagListAll()
- },
- onChildrenDrawerClose() {
- this.descriptionlength=''
- this.childrenDrawer = false;
- this.loadingElse=false
- this.dataElse = []
- this.form.resetFields()
- this.urlList = {
- url: '',
- md5: '',
- name: '',
- }
- this.tags = []
- this.urlListImage = {
- url: [],
- md5: [],
- name: [],
- size: [],
- }
- this.imageArrList = [];
- this.videoinfo={
- url: '',
- md5: '',
- name: '',
- width:undefined,
- height:undefined,
- };
- this.imageinfo=[];
- this.form.setFieldsValue({
- // contentTagList: null,
- modalityTagList: null,
- modTagList: null,
- senceTagList: null,
- })
- },
- onChildrenDrawerOk(){
- this.form.validateFieldsAndScroll((err, values) => {
- if (!err) {
- console.log(values)
- this.loadingElse = true
- var params = {
- ...values,
- ...this.videoinfo,
- covers:[...this.imageinfo]
- }
-
- params.id = this.add ? null : this.id
- params.userId = this.userInfo.id
- params.projectId=this.currentMaterial.projectId
- params.materialId=this.currentMaterial.id ||this.currentMaterial.materialId
- params.materialCode=this.currentMaterial.materialCode
-
- postAction('/platform/file/uploadVideo',params).then(res=>{
- this.loading=false;
- if (res.success) {
- this.descriptionlength=''
- this.form.resetFields()
- this.urlList = {
- url: '',
- md5: '',
- name: '',
- }
-
- this.urlListImage = {
- url: [],
- md5: [],
- name: [],
- size: [],
- }
- this.imageArrList = []
- this.tags = []
-
- this.childrenDrawer = false
- this.visible=false;
- this.add = true
- for (const key in this.role) {
- if (key == 'roleCode') {
- this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
- }
- }
- this.$message.success('素材上传成功')
- this.loadingElse = false
- this.videoinfo={
- url: '',
- md5: '',
- name: '',
- width:undefined,
- height:undefined,
- };
- this.imageinfo=[];
- this.materialHttp(this.activeKey)
- // this.departValue = []
- } else {
- this.$message.error(res.message)
- this.loadingElse = false
- // this.childrenDrawer = false
- // this.visible=false;
- }
- })
-
- } else {
- this.$message.error('请正确填写必填项目')
- }
-
- })
- },
- // 上传视频相关方法
- removeUpload() {
- this.urlList.url='';
- this.urlList.md5='';
- this.urlList.name='';
-
- this.form.setFieldsValue({
- // contentTagList: null,
- modalityTagList: null,
- modTagList: null,
- senceTagList: null,
- })
- },
- overUpload(urlAll) {
- console.log(urlAll)
- this.confirmLoading = true
- this.repeat = false
- this.urlList.url = urlAll[0].url
-
- this.videoinfo.url=urlAll[0].url
- this.$message.success('上传成功')
- getAction('/ctop/materialTagInfo/detail', {
- code: this.videoinfo.md5,
- }).then((res) => {
- if (res.success) {
- if (res.modalityTagList.length > 0) {
- this.form.setFieldsValue({
- // contentTagList: res.contentTagList.map((item) => {
- // return item.tagId
- // }),
- modalityTagList: res.modalityTagList.map((item) => {
- return item.tagId
- }),
- modTagList: res.modTagList.map((item) => {
- return item.tagId
- }),
- senceTagList: res.senceTagList.map((item) => {
- return item.tagId
- }),
- })
- }
- }
- })
- },
- deleteImage(url) {
- console.log(url, this.urlListImage.url)
- var index = this.imageArrList.findIndex((v) => v.url === url)
- this.imageArrList.splice(index, 1)
- console.log(index)
- },
- overUploadImage(urlAll) {
- console.log(urlAll)
- var that = this
- that.material = []
- that.imageArrList = []
- var img
- if (urlAll.length > 0) {
- urlAll.forEach((ele,index)=>{
- this.imageinfo.forEach(item=>{
- if(item.name==ele.name){
- item.url=ele.url
- }
- })
- // img = new Image()
- // img.src = urlAll[index].url
- })
-
- } else {}
- },
- addImage(item) {
- this.addImageVisible = true
- this.addImageData = item
- },
- showImage(item) {
- this.chouzhen = true
- this.chouzhenList = []
- var params = {
- videoSignature: item.code,
- pageSize: 20,
- pageNo: 1,
- }
- getAction('/cutFrame/material/list', params).then((res) => {
- console.log(res)
- if (res.success) {
- this.chouzhenList.push(...res.result.records)
- }
- })
- },
- closeImage() {
- this.addImageVisible = false
- this.urlListImage = {
- url: [],
- md5: [],
- name: [],
- size: [],
- }
- this.imageArrList = []
-
- },
- file(file) {
- console.log(file)
- var bmf = new BMF()
- var that = this
-
- return new Promise( (resolve, reject)=> {
-
- this.getVideoMsg(file).then((videoinfo) => {
- const { duration, height, width } = videoinfo;
- //获取到视频的时长,高度,宽度
- bmf.md5(file, (err, md5) => {
- videoinfo.name = file.name
- videoinfo.md5 = md5
- that.repeat = false
- })
- videoinfo.size=file.size;
- videoinfo.format=file.type
- console.log(videoinfo);
- this.videoinfo=videoinfo
- resolve()
- });
- })
-
-
- },
-
- getVideoMsg(file) {
- // console.log('getVideoMsg')
- return new Promise((resolve) => {
- let videoElement = document.createElement("video");
- videoElement.src = URL.createObjectURL(file);
- videoElement.addEventListener("loadedmetadata", function () {
- let obj={
- duration: videoElement.duration,
- height: videoElement.videoHeight,
- width: videoElement.videoWidth,
- }
-
- window.URL.revokeObjectURL(videoElement.src);
- videoElement.remove()
- resolve(obj);
- });
- });
- },
- getImageMsg(file){
- return new Promise((resolve) => {
- // let imageElement = document.createElement("image");
- let imageElement = new Image();
- let obj={}
- imageElement.src = URL.createObjectURL(file);
- // console.log(imageElement)
- imageElement.onload=function(){
- // console.log(imageElement.width)
- obj={
- height:imageElement.height,
- width:imageElement.width
- }
- console.log(obj)
- resolve(obj)
- }
-
- });
- },
- fileWater(file) {
- console.log(file)
- var bmf = new BMF()
- var that = this
- var codeData = that.videoinfo.md5 != '' ? that.videoinfo.md5 : that.addImageData.code
- console.log(codeData)
- this.urlListImage = {
- url: [],
- md5: [],
- name: [],
- size: [],
- }
- this.imageinfo=[]
- return new Promise( (resolve, reject)=> {
- bmf.md5(file, (err, md5) => {
- that.urlListImage.name.push(file.name)
- that.urlListImage.md5.push(md5)
- that.urlListImage.size.push(file.size)})
-
- this.getImageMsg(file).then((imageinfo) => {
-
- imageinfo.size=file.size;
- imageinfo.format=file.type;
- imageinfo.name=file.name
- bmf.md5(file, (err, md5) => {
- imageinfo.md5=md5
- this.imageinfo.push({
- ...imageinfo
- })
- resolve()
- })
-
- });
- })
- },
- getTagListAll() {
- this.departTree = []
- this.departTreeModality = [] //形式
- this.departTreeContent = [] // 内容
- this.departTreeSence = [] // 场景
- this.departTreeMod = [] //基调
- this.getQueryTree(1, 'departTreeModality')
- this.getQueryTree(2, 'departTreeMod')
- this.getQueryTree(3, 'departTreeContent')
- this.getQueryTree(4, 'departTreeSence')
- },
- getQueryTree(type, arr) {
- getAction('/ctop/tagInfo/queryTreeList', {
- categoryId: type,
- }).then((res) => {
- if (res.success) {
- if (res.result) {
- this[arr] = this.getTreeData(res.result)
- }
- }
- })
- },
- getTreeData(data) {
- for (var i = 0; i < data.length; i++) {
- if (data[i].children) {
- if (data[i].children.length < 1) {
- // children若为空数组,则将children设为undefined
- data[i].disabled = false
- } else {
- // // children若不为空数组,则继续 递归调用 本方法
- data[i].disabled = true
- this.getTreeData(data[i].children)
- }
- } else {
- data[i].disabled = false
- }
- }
- return data
- },
- getTagListInfo(md5) {
- this.departValueInfoModality = []
- this.departValueInfoMod = []
- this.departValueInfoContent = []
- this.departValueInfoSence = []
- getAction('/ctop/materialTagInfo/detail', {
- code: md5,
- }).then((res) => {
- if (res.success) {
- // , ...res.contentTagList
- this.tagInfoList = [...res.modalityTagList, ...res.senceTagList, ...res.modTagList]
- if (this.tagInfoListVisible) {
- this.departValueInfoModality = res.modalityTagList.map((item) => {
- return item.tagId
- })
- this.departValueInfoMod = res.modTagList.map((item) => {
- return item.tagId
- })
- // this.departValueInfoContent = res.contentTagList.map((item) => {
- // return item.tagId
- // })
- this.departValueInfoSence = res.senceTagList.map((item) => {
- return item.tagId
- })
- }
- }
- })
- },
- showInput() {
- this.inputVisible = true
- this.$nextTick(function () {
- this.$refs.input.focus()
- })
- },
- handleInputChange(e) {
- this.inputValue = e.target.value
- },
- handleInputConfirm() {
- const inputValue = this.inputValue
- let tags = this.tags
- if (inputValue && tags.indexOf(inputValue) === -1) {
- tags = [...tags, inputValue]
- }
- Object.assign(this, {
- tags,
- inputVisible: false,
- inputValue: '',
- })
- },
- },
- mounted(){
-
- let userInfo=localStorage.getItem('pro__Login_Userinfo');
- if(userInfo){
- this.userInfo=JSON.parse(userInfo).value
- }
- this.roleCode=localStorage.getItem('roleCode')
- console.log(this.$parent.materialStatus)
- this.role=this.$parent.role;
- this.activeKey=this.$parent.materialStatus
- this.materialHttp(this.$parent.materialStatus)
- this.getTagListAll()
- },
- activated() {
- if(this.$parent.role=='operator'){
- this.panes=this.operatorPanes
- }else if(this.$parent.role=='designLeader'){
- this.panes=this.designLeaderPanes
- }else if(this.$parent.role=='design'){
- this.panes=this.designPanes
- }
- this.activeKey=this.$parent.materialStatus
- this.materialHttp(this.$parent.materialStatus)
- this.getTagListAll()
- },
- filters:{
- handlerMaterialStatus(val){
- let str='';
- switch(val){
-
- case 0:
- str= '待指派'
- break;
- case 1:
- str= '脚本待上传'
- break;
- case 2:
- str= '脚本待审核'
- break;
- case 3:
- str= '脚本被驳回'
- break;
- case 4:
- str= '视频待上传'
- break;
- case 5:
- str= '视频待审核'
- break;
- case 6:
- str= '视频被驳回'
- break;
- case 7:
- str= '物料已完结'
- break;
- default:
- str='出错了'
- break;
- }
- return str
- },
- handlerVideoStatus(val){
- let str='';
- switch(val){
-
- case 0:
- str= '待上传'
- break;
- case 1:
- str= '待审核'
- break;
- case 2:
- str= '被驳回'
- break;
- case 3:
- str= '已审核'
- break;
- default:
- str='出错了'
- break;
- }
- return str
- },
-
- },
- }
- </script>
|