123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473 |
- <template>
- <!-- 项目安排 -->
- <div class="pb_content">
- <div class="race_content_body">
- <div class="raceBox">
- <div class="stepBg">
- <div
- class="steps"
- v-for="(sta, staIndex) in racePro.stageBox"
- :key="staIndex"
- >
- <div>
- <img src="../../../../assets/icon/race/progress.png" alt="" />
- </div>
- <div class="stepRightNav" @click="jump('jd' + staIndex + 1)">
- <div>阶段{{ staIndex + 1 }}</div>
- </div>
- </div>
- </div>
- <div class="right">
- <div v-for="(sa, saIndex) in racePro.stageBox" :key="saIndex" :id="'jd' + saIndex + 1">
- <div class="jdTop">
- <div class="jdTopFirst">
- <div class="right_title">
- 阶段{{ saIndex + 1 }}
- </div>
- <el-input
- v-model="sa.staTitle"
- @input="upRacePro"
- placeholder="阶段标题"
- ></el-input>
- </div>
- <div class="jdTopFirst">
- <div>总课时</div>
- <el-input
- v-model="sa.allTime"
- @input="upRacePro"
- placeholder="请输入阶段总课时"
- ></el-input>
- </div>
- </div>
- <div
- class="raceProBox"
- v-for="(race, raIndex) in sa.actBox"
- :key="raIndex"
- >
- <div class="raceTop allBox">
- <div style="color: #a1a4a8; font-size: 18px">
- 任务{{ raIndex + 1 }}
- </div>
- <div class="titleTop">
- <div class="leftBox"></div>
- <div class="hdName">任务名称</div>
- <div style="width: 58%">
- <el-input
- v-model="race.actName"
- placeholder="输入任务名称"
- @input="upRacePro"
- ></el-input>
- </div>
- <div
- style="
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: center;
- margin-left: 10px;
- "
- >
- <div style="min-width: 45px">课时</div>
- <el-input
- v-model="race.actTime"
- placeholder="输入任务名称"
- @input="upRacePro"
- ></el-input>
- </div>
- <div
- class="remove"
- v-if="racePro.stageBox[saIndex].actBox.length > 1"
- @click="deleteTask(raIndex)"
- style="position: absolute; right: 0"
- ></div>
- </div>
- </div>
- <div class="raceTop allBox">
- <div class="lineBox">
- <div class="lineTitle">活动目标</div>
- <div class="strLine"></div>
- </div>
- <div class="editorCss">
- <editor-bar
- v-model="race.driQuestion.brief"
- @change="upRacePro"
- ></editor-bar>
- </div>
- <!-- <div>
- <div class="basic_box">
- <div class="lineBox">
- <div class="lineTitleTwo">资料补充</div>
- <div class="strLine"></div>
- </div>
- <div>
- <div
- class="add_chapters_box"
- v-if="
- race.driQuestion.data &&
- race.driQuestion.data.length == 0
- "
- style="height: 185px"
- ></div>
- <div
- v-else
- class="add_chapters_box"
- style="display: flex; flex-direction: column"
- >
- <div
- class="chapter_upload"
- v-for="(item, index) in race.driQuestion.data"
- :key="item.id"
- >
- <div class="chapter_upload_t"></div>
- <div class="chapter_upload_o">
- <div class="chapter_upload_l">
- <div
- v-if="item.type == 2"
- class="chapter_upload_l_i1"
- ></div>
- <div
- v-if="item.type == 1 || item.type == 3"
- class="chapter_upload_l_i5"
- ></div>
- </div>
- <div class="chapter_upload_ic">
- <div class="chapter_upload_ic_l"></div>
- <div
- class="chapter_upload_ic_r"
- @click.stop="
- deleteChapterData(
- $event,
- sindex,
- index,
- raIndex,
- 0
- )
- "
- >
- <div></div>
- </div>
- </div>
- <div class="chapter_upload_n">
- <input
- class="first"
- v-if="item.type == 1 || item.type == 3"
- :placeholder="item.name"
- />
- <input
- class="first"
- v-if="item.type == 2"
- :placeholder="item.name"
- />
- <div class="chapter_upload_ud">
- <div class="chapter_upload_up"></div>
- <div class="chapter_upload_down"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="add_info_box">
- <button class="info_btn" @click="addImg($event)">
- 上传附件
- <input
- type="file"
- accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document,video/mp4, video/quicktime, video/x-msvideo,image/*"
- style="display: none"
- @change="
- beforeUpload($event, null, saIndex, raIndex, 0)
- "
- />
- </button>
- </div>
- <div v-if="race.driQuestion.data.proVisible" class="mask">
- <div class="progressBox">
- <div class="lbox">
- <img
- src="../../../../assets/loading.gif"
- />上传中,请稍后
- </div>
- <el-progress
- :text-inside="true"
- :stroke-width="20"
- :percentage="
- race.driQuestion.data.progress
- ? race.driQuestion.data.progress
- : 0
- "
- style="width: 80%"
- ></el-progress>
- </div>
- </div>
- </div>
- </div> -->
- </div>
- <div class="raceTop allBox">
- <div class="lineBox">
- <div class="lineTitle">活动内容</div>
- <div class="strLine"></div>
- </div>
- <div class="editorCss">
- <editor-bar
- v-model="race.tarDesign.brief"
- @change="upRacePro"
- ></editor-bar>
- </div>
- <!-- <div>
- <div class="basic_box">
- <div class="lineBox">
- <div class="lineTitleTwo">资料补充</div>
- <div class="strLine"></div>
- </div>
- <div>
- <div
- class="add_chapters_box"
- v-if="
- race.tarDesign.data && race.tarDesign.data.length == 0
- "
- style="height: 185px"
- ></div>
- <div
- v-else
- class="add_chapters_box"
- style="display: flex; flex-direction: column"
- >
- <div
- class="chapter_upload"
- v-for="(item, index) in race.tarDesign.data"
- :key="item.id"
- >
- <div class="chapter_upload_t"></div>
- <div class="chapter_upload_o">
- <div class="chapter_upload_l">
- <div
- v-if="item.type == 2"
- class="chapter_upload_l_i1"
- ></div>
- <div
- v-if="item.type == 1 || item.type == 3"
- class="chapter_upload_l_i5"
- ></div>
- </div>
- <div class="chapter_upload_ic">
- <div class="chapter_upload_ic_l"></div>
- <div
- class="chapter_upload_ic_r"
- @click.stop="
- deleteChapterData(
- $event,
- sindex,
- index,
- raIndex,
- 1
- )
- "
- >
- <div></div>
- </div>
- </div>
- <div class="chapter_upload_n">
- <input
- class="first"
- v-if="item.type == 1 || item.type == 3"
- :placeholder="item.name"
- />
- <input
- class="first"
- v-if="item.type == 2"
- :placeholder="item.name"
- />
- <div class="chapter_upload_ud">
- <div class="chapter_upload_up"></div>
- <div class="chapter_upload_down"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="add_info_box">
- <button class="info_btn" @click="addImg($event)">
- 上传附件
- <input
- type="file"
- accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document,video/mp4, video/quicktime, video/x-msvideo,image/*"
- style="display: none"
- @change="
- beforeUpload($event, null, saIndex, raIndex, 1)
- "
- />
- </button>
- </div>
- <div v-if="race.tarDesign.data.proVisible" class="mask">
- <div class="progressBox">
- <div class="lbox">
- <img
- src="../../../../assets/loading.gif"
- />上传中,请稍后
- </div>
- <el-progress
- :text-inside="true"
- :stroke-width="20"
- :percentage="
- race.tarDesign.data.progress
- ? race.tarDesign.data.progress
- : 0
- "
- style="width: 80%"
- ></el-progress>
- </div>
- </div>
- </div>
- </div> -->
- </div>
- <div class="raceTop allBox">
- <div class="lineBox">
- <div class="lineTitle">预期成果</div>
- <div class="strLine"></div>
- </div>
- <div class="editorCss">
- <editor-bar
- v-model="race.actiDesign.brief"
- @change="upRacePro"
- ></editor-bar>
- </div>
- <!-- <div>
- <div class="basic_box">
- <div class="lineBox">
- <div class="lineTitleTwo">资料补充</div>
- <div class="strLine"></div>
- </div>
- <div>
- <div
- class="add_chapters_box"
- v-if="
- race.actiDesign.data &&
- race.actiDesign.data.length == 0
- "
- style="height: 185px"
- ></div>
- <div
- v-else
- class="add_chapters_box"
- style="display: flex; flex-direction: column"
- >
- <div
- class="chapter_upload"
- v-for="(item, index) in race.actiDesign.data"
- :key="item.id"
- >
- <div class="chapter_upload_t"></div>
- <div class="chapter_upload_o">
- <div class="chapter_upload_l">
- <div
- v-if="item.type == 2"
- class="chapter_upload_l_i1"
- ></div>
- <div
- v-if="item.type == 1 || item.type == 3"
- class="chapter_upload_l_i5"
- ></div>
- </div>
- <div class="chapter_upload_ic">
- <div class="chapter_upload_ic_l"></div>
- <div
- class="chapter_upload_ic_r"
- @click.stop="
- deleteChapterData(
- $event,
- sindex,
- index,
- raIndex,
- 2
- )
- "
- >
- <div></div>
- </div>
- </div>
- <div class="chapter_upload_n">
- <input
- class="first"
- v-if="item.type == 1 || item.type == 3"
- :placeholder="item.name"
- />
- <input
- class="first"
- v-if="item.type == 2"
- :placeholder="item.name"
- />
- <div class="chapter_upload_ud">
- <div class="chapter_upload_up"></div>
- <div class="chapter_upload_down"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="add_info_box">
- <button class="info_btn" @click="addImg($event)">
- 上传附件
- <input
- type="file"
- accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document,video/mp4, video/quicktime, video/x-msvideo,image/*"
- style="display: none"
- @change="
- beforeUpload($event, null, saIndex, raIndex, 2)
- "
- />
- </button>
- </div>
- <div v-if="race.actiDesign.data.proVisible" class="mask">
- <div class="progressBox">
- <div class="lbox">
- <img
- src="../../../../assets/loading.gif"
- />上传中,请稍后
- </div>
- <el-progress
- :text-inside="true"
- :stroke-width="20"
- :percentage="
- race.actiDesign.data.progress
- ? race.actiDesign.data.progress
- : 0
- "
- style="width: 80%"
- ></el-progress>
- </div>
- </div>
- </div>
- </div> -->
- </div>
- <div class="raceTop allBox">
- <div class="lineBox">
- <div class="lineTitle">活动评价</div>
- <div class="strLine"></div>
- </div>
- <div class="editorCss">
- <editor-bar
- v-model="race.evaDesign.brief"
- @change="upRacePro"
- ></editor-bar>
- </div>
- <!-- <div>
- <div class="basic_box">
- <div class="lineBox">
- <div class="lineTitleTwo">资料补充</div>
- <div class="strLine"></div>
- </div>
- <div>
- <div
- class="add_chapters_box"
- v-if="
- race.evaDesign.data && race.evaDesign.data.length == 0
- "
- style="height: 185px"
- ></div>
- <div
- v-else
- class="add_chapters_box"
- style="display: flex; flex-direction: column"
- >
- <div
- class="chapter_upload"
- v-for="(item, index) in race.evaDesign.data"
- :key="item.id"
- >
- <div class="chapter_upload_t"></div>
- <div class="chapter_upload_o">
- <div class="chapter_upload_l">
- <div
- v-if="item.type == 2"
- class="chapter_upload_l_i1"
- ></div>
- <div
- v-if="item.type == 1 || item.type == 3"
- class="chapter_upload_l_i5"
- ></div>
- </div>
- <div class="chapter_upload_ic">
- <div class="chapter_upload_ic_l"></div>
- <div
- class="chapter_upload_ic_r"
- @click.stop="
- deleteChapterData(
- $event,
- sindex,
- index,
- raIndex,
- 3
- )
- "
- >
- <div></div>
- </div>
- </div>
- <div class="chapter_upload_n">
- <input
- class="first"
- v-if="item.type == 1 || item.type == 3"
- :placeholder="item.name"
- />
- <input
- class="first"
- v-if="item.type == 2"
- :placeholder="item.name"
- />
- <div class="chapter_upload_ud">
- <div class="chapter_upload_up"></div>
- <div class="chapter_upload_down"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="add_info_box">
- <button class="info_btn" @click="addImg($event)">
- 上传附件
- <input
- type="file"
- accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document,video/mp4, video/quicktime, video/x-msvideo,image/*"
- style="display: none"
- @change="
- beforeUpload($event, null, saIndex, raIndex, 3)
- "
- />
- </button>
- </div>
- <div v-if="race.evaDesign.data.proVisible" class="mask">
- <div class="progressBox">
- <div class="lbox">
- <img
- src="../../../../assets/loading.gif"
- />上传中,请稍后
- </div>
- <el-progress
- :text-inside="true"
- :stroke-width="20"
- :percentage="
- race.evaDesign.data.progress
- ? race.evaDesign.data.progress
- : 0
- "
- style="width: 80%"
- ></el-progress>
- </div>
- </div>
- </div>
- </div> -->
- </div>
- <div
- class="addTaskBorder"
- @click="addTaskBorder(saIndex)"
- v-if="raIndex == racePro.stageBox[saIndex].actBox.length - 1"
- >
- <div>
- <img src="../../../../assets/icon/addHw.png" alt />
- <span>添加任务</span>
- </div>
- </div>
- </div>
- <div
- class="addTaskBorder"
- @click="addStageBorder()"
- v-if="saIndex == racePro.stageBox.length - 1"
- >
- <div>
- <img src="../../../../assets/icon/addHw.png" alt />
- <span>添加阶段</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import EditorBar from "../../../tools/wangEnduit";
- export default {
- components: { EditorBar },
- props: ["raceProcess"],
- data() {
- return {
- racePro: {
- stageBox: [
- {
- staTitle: "",
- allTime: "",
- brief: "",
- data: [],
- actBox: [
- {
- actName: "",
- actTime: "",
- driQuestion: { brief: "", data: [] },
- tarDesign: { brief: "", data: [] },
- actiDesign: { brief: "", data: [] },
- evaDesign: { brief: "", data: [] },
- },
- ],
- },
- ],
- },
- };
- },
- methods: {
- change(val) {
- console.log(val);
- },
- addImg(e) {
- var el = e.currentTarget;
- el.getElementsByTagName("input")[0].click();
- },
- jump(t) {
- var a = document.getElementById(t);
- var b = document.getElementsByClassName("right")[0];
- b.scrollTop = a.offsetTop;
- },
- getChapterData(e, i, j, ic, type) {
- e.stopPropagation();
- if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
- console.log("还不能下载图片喔");
- }
- },
- time() {
- if (!this.now) {
- this.now = new Date().getTime();
- return true;
- } else {
- let time = new Date().getTime();
- if (time - this.now > 3000) {
- this.now = time;
- return true;
- } else {
- return false;
- }
- }
- },
- upRacePro() {
- this.$emit("upRacePro", this.racePro);
- },
- deleteChapterData(e, si, i, j, t) {
- e.stopPropagation();
- if (t == 0) {
- this.racePro.stageBox[si].actBox[j].driQuestion.data.splice(i, 1);
- } else if (t == 1) {
- this.racePro.stageBox[si].actBox[j].tarDesign.data.splice(i, 1);
- } else if (t == 2) {
- this.racePro.stageBox[si].actBox[j].actiDesign.data.splice(i, 1);
- } else {
- this.racePro.stageBox[si].actBox[j].evaDesign.data.splice(i, 1);
- }
- this.upRacePro();
- },
- imgChange(file, fileList, type, sindex, index, jT) {
- if (jT == 0) {
- var _tmp = this.racePro.stageBox[sindex].actBox[index].driQuestion.data;
- } else if (jT == 1) {
- var _tmp = this.racePro.stageBox[sindex].actBox[index].tarDesign.data;
- } else if (jT == 2) {
- var _tmp = this.racePro.stageBox[sindex].actBox[index].actiDesign.data;
- } else {
- var _tmp = this.racePro.stageBox[sindex].actBox[index].evaDesign.data;
- }
- this.noneBtnImg = _tmp.length >= 1;
- },
- beforeUpload(event, type, sindex, index, jsonType) {
- var file = event.target.files[0];
- var credentials = {
- accessKeyId: "AKIATLPEDU37QV5CHLMH",
- secretAccessKey: "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",
- }; //秘钥形式的登录上传
- window.AWS.config.update(credentials);
- window.AWS.config.region = "cn-northwest-1"; //设置区域
- var type1 = type;
- var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
- var _this = this;
- var b = [
- "DOC",
- "DOCX",
- "DOCM",
- "DOTM",
- "DOTX",
- "PPTX",
- "PPSX",
- "PPT",
- "PPS",
- "PPTM",
- "POTM",
- "PPAM",
- "POTX",
- "PPSM",
- ];
- var c = ["PDF", "DOT", "DOC", "DOCX", "PPT", "PPTX", "XLSX", "XLS"];
- var d = [
- "BMP",
- "PJP",
- "APNG",
- "PNG",
- "JPG",
- "GIF",
- "SVG",
- "JPEG",
- "JPG",
- "ICO",
- "PGPEG",
- "AVIF",
- ];
- if (
- b.indexOf(
- file.name
- .split(".")
- [file.name.split(".").length - 1].toLocaleUpperCase()
- ) != -1
- ) {
- if (file.size / 1024 / 1024 > 10) {
- this.$message.error("上传文件大于10兆,请重新选择文件!");
- return;
- }
- } else if (
- file.name
- .split(".")
- [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
- ) {
- if (file.size / 1024 / 1024 > 5) {
- this.$message.error("添加成上传文件大于5兆,请重新选择文件!");
- return;
- }
- }
- if (
- c.indexOf(
- file.name
- .split(".")
- [file.name.split(".").length - 1].toLocaleUpperCase()
- ) != -1
- ) {
- type1 = 1;
- } else if (
- d.indexOf(
- file.name
- .split(".")
- [file.name.split(".").length - 1].toLocaleUpperCase()
- ) != -1
- ) {
- type1 = 3;
- } else {
- type1 = 2;
- }
- if (jsonType == 0) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].driQuestion.data.progress = 0;
- _this.racePro.stageBox[sindex].actBox[
- index
- ].driQuestion.data.proVisible = true;
- } else if (jsonType == 1) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].tarDesign.data.progress = 0;
- _this.racePro.stageBox[sindex].actBox[
- index
- ].tarDesign.data.proVisible = true;
- } else if (jsonType == 2) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].actiDesign.data.progress = 0;
- _this.racePro.stageBox[sindex].actBox[
- index
- ].actiDesign.data.proVisible = true;
- } else {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].evaDesign.data.progress = 0;
- _this.racePro.stageBox[sindex].actBox[
- index
- ].evaDesign.data.proVisible = true;
- }
- if (file) {
- var params = {
- Key:
- file.name.split(".")[0] +
- new Date().getTime() +
- "." +
- file.name.split(".")[file.name.split(".").length - 1],
- ContentType: file.type,
- Body: file,
- "Access-Control-Allow-Credentials": "*",
- ACL: "public-read",
- }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
- var options = {
- partSize: 2048 * 1024 * 1024,
- queueSize: 2,
- leavePartsOnError: true,
- };
- bucket
- .upload(params, options)
- .on("httpUploadProgress", function (evt) {
- //这里可以写进度条
- // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
- if (jsonType == 0) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].driQuestion.data.progress = parseInt(
- (evt.loaded * 80) / evt.total
- );
- } else if (jsonType == 1) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].tarDesign.data.progress = parseInt(
- (evt.loaded * 80) / evt.total
- );
- } else if (jsonType == 2) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].actiDesign.data.progress = parseInt(
- (evt.loaded * 80) / evt.total
- );
- } else {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].evaDesign.data.progress = parseInt(
- (evt.loaded * 80) / evt.total
- );
- }
- })
- .send(function (err, data) {
- if (jsonType == 0) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].driQuestion.data.progress = 100;
- } else if (jsonType == 1) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].tarDesign.data.progress = 100;
- } else if (jsonType == 2) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].actiDesign.data.progress = 100;
- } else {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].evaDesign.data.progress = 100;
- }
- setTimeout(() => {
- if (jsonType == 0) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].driQuestion.data.proVisible = false;
- } else if (jsonType == 1) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].tarDesign.data.proVisible = false;
- } else if (jsonType == 2) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].actiDesign.data.proVisible = false;
- } else {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].evaDesign.data.proVisible = false;
- }
- _this.$forceUpdate();
- }, 1000);
- if (err) {
- _this.$message.error("上传失败");
- } else {
- if (jsonType == 0) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].driQuestion.data.push({
- name: file.name,
- url: data.Location,
- uid: file.uid,
- type: type1,
- });
- _this.imgChange(null, null, type1, sindex, index, jsonType);
- } else if (jsonType == 1) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].tarDesign.data.push({
- name: file.name,
- url: data.Location,
- uid: file.uid,
- type: type1,
- });
- _this.imgChange(null, null, type1, sindex, index, jsonType);
- } else if (jsonType == 2) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].actiDesign.data.push({
- name: file.name,
- url: data.Location,
- uid: file.uid,
- type: type1,
- });
- _this.imgChange(null, null, type1, sindex, index, jsonType);
- } else if (jsonType == 3) {
- _this.racePro.stageBox[sindex].actBox[
- index
- ].evaDesign.data.push({
- name: file.name,
- url: data.Location,
- uid: file.uid,
- type: type1,
- });
- _this.imgChange(null, null, type1, sindex, index, jsonType);
- }
- _this.upRacePro();
- console.log(data.Location);
- }
- });
- }
- },
- addTaskBorder(si) {
- this.racePro.stageBox[si].actBox.push({
- actName: "",
- actTime: "",
- driQuestion: { brief: "", data: [] },
- tarDesign: { brief: "", data: [] },
- actiDesign: { brief: "", data: [] },
- evaDesign: { brief: "", data: [] },
- });
- this.upRacePro();
- },
- addStageBorder() {
- this.racePro.stageBox.push({
- staTitle: "",
- allTime: "",
- brief: "",
- data: [],
- actBox: [
- {
- actName: "",
- actTime: "",
- driQuestion: { brief: "", data: [] },
- tarDesign: { brief: "", data: [] },
- actiDesign: { brief: "", data: [] },
- evaDesign: { brief: "", data: [] },
- },
- ],
- });
- },
- deleteTask(si, i) {
- var _this = this;
- if (_this.time()) {
- _this
- .$confirm("确定删除此活动吗?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- _this.racePro.stageBox[si].actBox.splice(i, 1);
- _this.$message.success("删除成功");
- this.upRacePro();
- })
- .catch(() => {
- return;
- });
- }
- },
- },
- created() {
- this.racePro = this.raceProcess;
- },
- };
- </script>
- <style scoped>
- @media screen and (max-width: 1280px) {
- .jdTop > .jdTopFirst:nth-child(2) {
- padding-left: 5% !important;
- }
- .jdTopFirst >>> .el-input {
- width: 60% !important;
- }
- }
- .pb_content {
- width: 100%;
- height: 100%;
- }
- .race_content_body {
- width: 100%;
- position: relative;
- margin: 0;
- height: 100%;
- }
- .raceBox {
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: flex-start;
- }
- .stepBg {
- padding: 80px 0 0 0;
- margin: 0 25px 0 0;
- width: 20%;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- flex-wrap: nowrap;
- background: #fff;
- /* min-height: 800px; */
- height: calc(100% - 80px);
- border-radius: 15px;
- overflow: auto;
- min-width: 260px;
- flex-direction: column;
- }
- .steps {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- position: relative;
- width: 145px;
- height: 130px;
- }
- .steps > div:nth-child(1) > img {
- z-index: 9;
- position: relative;
- }
- .stepRightNav {
- display: flex;
- flex-direction: column;
- flex-wrap: nowrap;
- justify-content: space-between;
- align-items: flex-start;
- margin-left: 10px;
- height: 50px;
- cursor: pointer;
- }
- .right {
- width: calc(100% - 20%);
- background: rgb(255, 255, 255);
- border-radius: 10px;
- overflow: auto;
- height: 100%;
- border-radius: 15px;
- /* max-height: 800px; */
- }
- .raceProBox {
- background: #f6f9fe;
- width: 90%;
- margin: 20px 0 0 20px;
- border-radius: 10px;
- border: 2px solid #c4d9f3;
- }
- .allBox {
- padding: 25px 25px 0 25px;
- }
- .allBox > div:nth-child(1) {
- font-size: 18px;
- }
- .raceTop > div:nth-child(2) {
- width: 100%;
- margin-top: 10px;
- }
- .titleTop {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: center;
- width: 100%;
- position: relative;
- }
- .titleTop > div:nth-child(2) {
- margin-left: 10px;
- }
- .leftBox {
- width: 5px;
- height: 15px;
- background: #5499e6;
- }
- .editorCss {
- width: 90% !important;
- }
- .basic_box {
- position: relative;
- margin: 0;
- min-height: 0;
- width: 90%;
- }
- .add_info_box {
- margin: 20px 0;
- }
- .add_info_box button {
- margin: 0 10px 10px 0;
- }
- .add_chapters_box {
- text-align: left;
- background-color: rgb(232 234 237);
- width: 100%;
- padding: 0px 15px;
- border-radius: 15px;
- font-size: 16px;
- box-sizing: border-box;
- position: relative;
- padding: 0 10px 5px 10px;
- height: 140px;
- overflow-y: auto;
- overflow-x: hidden;
- }
- .chapter_upload {
- height: 50px;
- margin-top: 12px;
- position: relative;
- display: flex;
- align-items: center;
- width: 100%;
- min-height: 50px;
- }
- .chapter_upload_t {
- background-color: #fff;
- position: absolute;
- height: 100%;
- top: 0px;
- left: 0px;
- border-radius: 40px;
- box-sizing: border-box;
- box-shadow: 0 0 3px 3px #dfdfdf;
- width: 100%;
- }
- .chapter_upload_o {
- width: 100%;
- height: 100%;
- position: relative;
- z-index: 1;
- display: flex;
- align-items: center;
- }
- .chapter_upload_ic {
- height: 30px;
- float: right;
- cursor: pointer;
- position: absolute;
- width: 45px;
- right: 0;
- top: 0;
- }
- .chapter_upload_ic_l {
- width: 50px;
- height: 50px;
- float: left;
- }
- .chapter_upload_ic_l div {
- width: 30px;
- height: 35px;
- background: url("../../../../assets/icon/icon.png");
- }
- .chapter_upload_ic_r {
- width: 50px;
- height: 50px;
- float: left;
- margin-left: 0px;
- display: flex;
- align-items: center;
- position: absolute;
- }
- .chapter_upload_ic_r div {
- width: 25px;
- height: 25px;
- background-image: url("../../../../assets/delete.png");
- background-size: 100% 100%;
- }
- .chapter_upload_n {
- display: flex;
- text-indent: 10px;
- text-decoration: none;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- width: 55%;
- margin-left: 10px;
- cursor: pointer;
- margin-top: 2px;
- }
- .chapter_upload_l_i1 {
- background-image: url("../../../../assets/icon/video.png");
- width: 28px;
- height: 28px;
- background-size: 100% 100%;
- }
- .chapter_upload_l_i5 {
- background-image: url("../../../../assets/icon/word.png");
- width: 24px;
- height: 24px;
- background-size: 100% 100%;
- margin-left: 1px;
- }
- .chapter_upload_l_i8 {
- background-image: url("../../../../assets/icon/line.png");
- width: 24px;
- height: 24px;
- background-size: 100% 100%;
- margin-left: 1px;
- }
- .chapter_upload_ud {
- display: flex;
- flex-direction: column;
- margin-left: 5px;
- justify-content: center;
- z-index: 99;
- }
- .chapter_upload_up {
- background-image: url("../../../../assets/icon/up.png");
- width: 17px;
- height: 15px;
- background-size: 100% 100%;
- cursor: pointer;
- }
- .chapter_upload_down {
- background-image: url("../../../../assets/icon/down.png");
- width: 17px;
- height: 15px;
- margin: 2px auto 0 auto;
- background-size: 100% 100%;
- cursor: pointer;
- }
- .chapter_upload_l {
- padding: 1px 0 0 10px;
- }
- .first {
- border: none;
- outline: none;
- width: 80%;
- min-width: 215px;
- z-index: 99;
- font-size: 14px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .info_btn {
- color: #fff;
- background-color: #0f7eff;
- padding: 8px 24px;
- font-size: 0.9375rem;
- box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
- 0px 3px 1px -2px rgb(0 0 0 / 12%);
- min-width: 64px;
- font-weight: 500;
- border-radius: 4px;
- box-sizing: border-box;
- border: none;
- cursor: pointer;
- }
- .info_btn:hover {
- background-color: #4f7cd5 !important;
- }
- .hdName {
- font-size: 22px;
- color: #407eef;
- min-width: 90px;
- margin: 0 10px;
- }
- .lineBox {
- display: flex;
- margin: 0 0 20px 0;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
- }
- .lineTitle,
- .lineTitleTwo {
- margin-top: 15px;
- width: 110px;
- }
- .lineTitle {
- color: #407eef;
- font-size: 22px;
- }
- .strLine {
- width: 85%;
- margin: 0 auto;
- border-top: 1px solid #e5e5e5;
- margin-top: 20px;
- }
- .addTaskBorder {
- border: 2px solid #e1e1e1;
- border-radius: 10px;
- width: 90%;
- margin: 20px 0 20px 20px;
- cursor: pointer;
- }
- .addTaskBorder > div {
- margin: 0 auto;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .addTaskBorder > div > img {
- width: 100px;
- }
- .addTaskBorder > div > span {
- font-size: 23px;
- color: #dbdbdb;
- }
- .remove {
- background-image: url(../../../../assets/remove.png);
- cursor: pointer;
- opacity: 0.5;
- width: 40px;
- height: 50px;
- background-repeat: no-repeat;
- background-position: 5px 10px;
- }
- .stepBg .steps::after {
- content: "";
- height: 100%;
- background: #eee;
- width: 4px;
- position: absolute;
- left: 15px;
- top: calc(50% + (35px / 2));
- transform: translateY(-50%);
- z-index: 1;
- }
- .mask {
- background-color: rgb(0 0 0 / 30%);
- /* position: fixed; */
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 20000;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .progressBox {
- width: 300px;
- height: 150px;
- background: #fff;
- border-radius: 10px;
- box-shadow: 0 0 6px 1px #bfbfbf;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- }
- .progressBox .lbox {
- height: 100px;
- font-size: 16px;
- display: flex;
- align-items: center;
- }
- .progressBox .lbox img {
- width: 40px;
- margin-right: 20px;
- }
- .progressBox >>> .el-progress-bar__outer {
- background-color: #d1dfff !important;
- }
- .progressBox .lbox {
- height: 100px;
- font-size: 19px;
- display: flex;
- align-items: center;
- }
- .progressBox .lbox img {
- width: 40px;
- margin-right: 20px;
- }
- .jdTop {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: center;
- justify-content: flex-start;
- padding: 20px 0 0 25px;
- position: relative;
- width: 90%;
- }
- .jdTopFirst {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: center;
- }
- .jdTop > .jdTopFirst:nth-child(2) {
- padding-left: 20%;
- }
- .jdTop > .jdTopFirst:nth-child(2) > div:nth-child(1) {
- min-width: 60px;
- }
- .jdTopFirst > input {
- width: 200px;
- height: 25px;
- }
- .firstTop {
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-items: center;
- width: 90%;
- }
- .rightNav {
- width: 87%;
- margin-left: 15px;
- }
- .right_title {
- height: 30px;
- font-size: 1.5em;
- font-weight: bold;
- color: #0f7eff;
- width: 100px;
- }
- </style>
|