file.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902
  1. <template>
  2. <div class="c_box" v-loading="isloading">
  3. <!-- <div class="mask"></div> -->
  4. <div v-if="!checkJson">暂未设置题目</div>
  5. <div v-else class="choice_box">
  6. <!-- <div class="title"><div>{{ `(${option[checkJson.type].name})` }}</div><div v-html="checkJson.title"></div></div> -->
  7. <div class="c_title">
  8. <div class="title" style="display: flex;">
  9. <!-- + `(${option[checkJson.type].name})` -->
  10. <span style="min-width: fit-content;">{{ tindex + 1 + "、" }}</span>
  11. <span>{{ checkJson.title }}</span>
  12. <span style="color: #efa030;min-width: fit-content;" v-if="checkJson.score">({{ '分值:' + checkJson.score
  13. + '分' }})</span>
  14. </div>
  15. <!-- </div><div v-html="checkJson.title"></div> -->
  16. <div class="p_box" v-if="checkJson.file && checkJson.file.length > 1">
  17. <span class="btnU" @click="uploadCourse">批量下载</span>
  18. </div>
  19. <div class="p_box" v-if="isTeacher == 1 && checkJson.score">
  20. <el-input v-model="checkJson.score2" class="c_input" @change="numberPan"
  21. placeholder="请输入得分"></el-input><span style="margin: 0 10px;">/</span><span>{{ checkJson.score
  22. }}分</span>
  23. </div>
  24. <div class="p_box" v-if="isTeacher == 2 && checkJson.score2">
  25. <span>{{ checkJson.score2 }}分</span><span style="margin: 0 10px;">/</span><span>{{ checkJson.score
  26. }}分</span>
  27. </div>
  28. </div>
  29. <div class="detail" v-if="checkJson.detail" v-html="checkJson.detail" style="color: #00000099;margin-top: 5px;">
  30. </div>
  31. <div class="choices">
  32. <div class="uploadBtn" v-if="checktype == 1">
  33. <div class="btn" @click.stop="addImg($event)">
  34. <span :style="isN==1? 'font-size: 12px;' : ''">添加本地文件</span>
  35. <input type="file" accept="*" style="display: none" multiple="multiple"
  36. @change="beforeUpload($event)" />
  37. </div>
  38. <div class="btn" @click="openFileBox()">
  39. <span :style="isN==1? 'font-size: 12px;' : ''">从资源库添加</span>
  40. </div>
  41. <div class="switch">
  42. <el-switch
  43. active-color="#3681fc"
  44. v-model="isTong">
  45. </el-switch>
  46. <span :style="isN==1? 'font-size: 12px;' : ''" @click="isTong = !isTong">同步至资源库</span>
  47. </div>
  48. </div>
  49. <div class="binfo_input">
  50. <div class="fileBox" v-if="checkJson.file && checkJson.file.length">
  51. <div class="fileC">
  52. <div class="file" v-for="(item, index) in checkJson.file" :key="index"
  53. v-loading="downLoading == item.url" @click.stop="checkFile(item)">
  54. <img class="del" src="../../../../../assets/icon/fileIcon/deleteworks.png"
  55. @click.stop="delFile(index)" v-if="checktype == 1" />
  56. <img class="download" src="../../../../../assets/icon/fileIcon/download.png"
  57. @click.stop="downloadFile(item)" :style="{ right: checktype != 1 ? '10px' : '45px' }" />
  58. <img class="img" :src="wordIcon" alt="" v-if="item.type == 1" />
  59. <img class="img" :src="videoIcon" alt="" v-if="item.type == 2" />
  60. <img class="img" :src="item.url" alt="" v-if="item.type == 3" />
  61. <img class="img" :src="wordIcon" alt="" v-if="item.type == 4" />
  62. <img class="img" :src="fileIcon" alt="" v-if="item.type == 5" />
  63. <div class="name">
  64. <el-tooltip :content="item.name" placement="top" effect="dark">
  65. <span>{{ item.name }}</span>
  66. </el-tooltip>
  67. </div>
  68. </div>
  69. </div>
  70. <!-- <div class="btn" @click.stop="openFileBox()" v-if="checktype == 1">
  71. <span>点击添加文件</span>
  72. <input type="file" accept="*" style="display: none" @change="beforeUpload($event)" />
  73. </div> -->
  74. </div>
  75. <div class="uploadQ" v-else-if="checktype == 1">
  76. <span>填写者上传区</span>
  77. <!-- <input type="file" accept="*" style="display: none" @change="beforeUpload($event)" /> -->
  78. </div>
  79. <div class="uploadQ" v-else>
  80. <span>暂无添加附件</span>
  81. </div>
  82. <div v-if="proVisible" class="mask">
  83. <div class="progressBox">
  84. <div class="lbox">
  85. <img src="../../../../../assets/loading.gif" />上传中,请稍后
  86. </div>
  87. <!-- <div style="margin-bottom: 10px">
  88. <span>{{
  89. isFinishSize
  90. }}M</span>
  91. /
  92. <span>{{
  93. isAllSize
  94. }}M</span>
  95. </div>
  96. <el-progress :text-inside="true" :stroke-width="20" :percentage="progress
  97. ? progress
  98. : 0
  99. " style="width: 80%"></el-progress> -->
  100. </div>
  101. </div>
  102. </div>
  103. <!-- <textarea :readonly="checktype == 2" rows="2" v-autoHeight="68" class="binfo_input binfo_textarea" cols v-model="checkJson.answer2"
  104. placeholder=""></textarea> -->
  105. </div>
  106. </div>
  107. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  108. <wVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :url="wurl"></wVideo>
  109. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl"></wOffice>
  110. <checkfile :dialogVisiblefile.sync="dialogVisiblefile" @setCheckJson="setCheckJson"></checkfile>
  111. </div>
  112. </template>
  113. <script>
  114. import "../../../../../common/aws-sdk-2.235.1.min.js";
  115. import videoIcon from '../../../../../assets/icon/fileIcon/isVideo.png'
  116. import wordIcon from '../../../../../assets/icon/fileIcon/isWord.png'
  117. import fileIcon from '../../../../../assets/icon/fileIcon/word2.png'
  118. import wpdf from "../../../test/file/wPdf2.vue";
  119. import wVideo from "../../../test/file/wVideo.vue";
  120. import wOffice from "../../../test/file/wOffice.vue";
  121. import checkfile from "../../../test/file/checkfile.vue";
  122. import JSZip from "jszip";
  123. import FileSaver from "file-saver";
  124. const getFile = (url) => {
  125. return new Promise((resolve, reject) => {
  126. var credentials = {
  127. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  128. secretAccessKey: "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",
  129. }; //秘钥形式的登录上传
  130. window.AWS.config.update(credentials);
  131. window.AWS.config.region = "cn-northwest-1"; //设置区域
  132. let url2 = url;
  133. let _url2 = "";
  134. if (
  135. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  136. ) {
  137. _url2 = url2.split(
  138. "https://view.officeapps.live.com/op/view.aspx?src="
  139. )[1];
  140. } else {
  141. _url2 = url2;
  142. }
  143. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  144. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  145. var params = {
  146. Bucket: "ccrb",
  147. Key: name
  148. };
  149. s3.getObject(params, function (err, data) {
  150. if (err) {
  151. console.log(err, err.stack)
  152. resolve({ data: 1 });
  153. } else {
  154. resolve({ data: data.Body });
  155. console.log(data);
  156. } // sxuccessful response
  157. });
  158. // axios({
  159. });
  160. };
  161. export default {
  162. components: {
  163. wpdf,
  164. wVideo,
  165. wOffice,
  166. checkfile
  167. },
  168. props: {
  169. tindex: {
  170. type: Number
  171. },
  172. cJson: {
  173. type: Object,
  174. },
  175. checktype: {
  176. type: Number,
  177. default: 1
  178. },
  179. see: {
  180. type: Boolean,
  181. default: false
  182. },
  183. isTeacher: {
  184. type: Number,
  185. default: 2
  186. }
  187. },
  188. data() {
  189. return {
  190. option: {
  191. 1: { name: '附件' },
  192. },
  193. userid: this.$route.query.userid,
  194. isN: this.$route.query.isN,
  195. checkJson: undefined,
  196. progress: 0,
  197. isFinishSize: 0,
  198. proVisible: false,
  199. isAllSize: 0,
  200. videoIcon: videoIcon,
  201. wordIcon: wordIcon,
  202. fileIcon: fileIcon,
  203. downLoading: '',
  204. dialogVisiblePdf: false,
  205. dialogVisibleVideo: false,
  206. dialogVisibleOffice: false,
  207. dialogVisiblefile: false,
  208. wurl: "",
  209. isloading: false,
  210. isTong: false
  211. }
  212. },
  213. watch: {
  214. checkJson: {
  215. handler(newValue) {
  216. this.$emit('update:cJson', newValue)
  217. },
  218. deep: true
  219. },
  220. cJson: {
  221. handler(newValue,oldVal) {
  222. if(newValue.file && this.checkJson.file && newValue.file.length !== this.checkJson.file.length){
  223. this.checkJson = this.depthCopy(newValue)
  224. this.$forceUpdate()
  225. }else if(newValue.file && !this.checkJson.file){
  226. this.checkJson = this.depthCopy(newValue)
  227. this.$forceUpdate()
  228. }else if(!newValue.file && this.checkJson.file){
  229. this.checkJson = this.depthCopy(newValue)
  230. this.$forceUpdate()
  231. }else if (JSON.stringify(newValue) !== JSON.stringify(oldVal)) {
  232. this.checkJson = this.depthCopy(newValue)
  233. this.$forceUpdate()
  234. }
  235. },
  236. deep: true
  237. },
  238. },
  239. methods: {
  240. depthCopy(s) {
  241. return JSON.parse(JSON.stringify(s));
  242. },
  243. openFileBox() {
  244. this.dialogVisiblefile = true
  245. },
  246. addImg(e) {
  247. var el = e.currentTarget;
  248. el.getElementsByTagName("input")[0].click();
  249. e.target.value = "";
  250. },
  251. numberPan() {
  252. if (/[^\d]/.test(this.checkJson.score2) || this.checkJson.score2 < 0) {
  253. this.$message.error('请输入大于0的数字')
  254. this.checkJson.score2 = ''
  255. }
  256. if (parseInt(this.checkJson.score2) > parseInt(this.checkJson.score)) {
  257. this.$message.error('不能输入大于得分的数字')
  258. this.checkJson.score2 = this.checkJson.score
  259. }
  260. },
  261. beforeUpload(event, type) {
  262. // const loading = this.openLoading();
  263. let file = "";
  264. let cfindex2 = 0;
  265. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  266. file = event.target.files[cfindex];
  267. var credentials = {
  268. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  269. secretAccessKey: "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",
  270. }; //秘钥形式的登录上传
  271. window.AWS.config.update(credentials);
  272. window.AWS.config.region = "cn-northwest-1"; //设置区域
  273. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  274. var _this = this;
  275. // _this.progress = 0;
  276. _this.proVisible = true;
  277. // _this.isFinishSize = 0;
  278. // _this.isAllSize = (file.size / 1024 / 1024).toFixed(2);
  279. let _name = file.name
  280. let size = file.size;
  281. _this.$forceUpdate();
  282. if (file) {
  283. var params = {
  284. Key:
  285. file.name.split(".")[0] +
  286. new Date().getTime() +
  287. "." +
  288. file.name.split(".")[file.name.split(".").length - 1],
  289. ContentType: file.type,
  290. Body: file,
  291. "Access-Control-Allow-Credentials": "*",
  292. ACL: "public-read",
  293. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  294. var options = {
  295. partSize: 2048 * 1024 * 1024,
  296. queueSize: 2,
  297. leavePartsOnError: true,
  298. };
  299. bucket
  300. .upload(params, options)
  301. .on("httpUploadProgress", function (evt) {
  302. //这里可以写进度条
  303. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  304. // _this.progress = parseInt((evt.loaded / evt.total) * 100);
  305. // _this.isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  306. // _this.$forceUpdate();
  307. })
  308. .send(function (err, data) {
  309. cfindex2++;
  310. // _this.progress = 100;
  311. // _this.isFinishSize = _this.isAllSize;
  312. // _this.$forceUpdate();
  313. // setTimeout(() => {
  314. // _this.proVisible = false;
  315. // _this.$forceUpdate();
  316. // }, 1000);
  317. setTimeout(() => {
  318. if (
  319. cfindex2 == event.target.files.length ||
  320. cfindex2 > event.target.files.length
  321. ) {
  322. _this.proVisible = false;
  323. }
  324. }, 1000);
  325. // loading.close();
  326. if (err) {
  327. _this.$message.error("上传失败");
  328. } else {
  329. let _type = 2;
  330. var imgA = [
  331. "png",
  332. "jpg",
  333. "jpeg",
  334. "bmp",
  335. "gif",
  336. "webp",
  337. "psd",
  338. "svg",
  339. "tiff",
  340. ];
  341. var fileA = [
  342. "DOC",
  343. "DOCX",
  344. "DOCM",
  345. "DOTM",
  346. "DOTX",
  347. "PPTX",
  348. "PPSX",
  349. "PPT",
  350. "PPS",
  351. "PPTM",
  352. "POTM",
  353. "PPAM",
  354. "POTX",
  355. "PPSM",
  356. "XLSX",
  357. "XLS",
  358. ];
  359. var videoA = [
  360. "AVI",
  361. "NAVI",
  362. "MPEG",
  363. "ASF",
  364. "MOV",
  365. "WMV",
  366. "3GP",
  367. "RM",
  368. "RMVB",
  369. "FLV",
  370. "F4V",
  371. "H.264",
  372. "H.265",
  373. "REAL VIDEO",
  374. "MKV",
  375. "WebM",
  376. "HDDVD",
  377. "MP4",
  378. "MPG",
  379. "M4V",
  380. "MGV",
  381. "OGV",
  382. "QTM",
  383. "STR",
  384. "AMC",
  385. "DVX",
  386. "EVO",
  387. "DAT",
  388. "OGG",
  389. "OGM",
  390. ];
  391. if (
  392. fileA.indexOf(
  393. data.Location.split(".")[
  394. data.Location.split(".").length - 1
  395. ].toLocaleUpperCase()
  396. ) != -1
  397. ) {
  398. _type = 1; //word 文件
  399. } else if (
  400. videoA.indexOf(
  401. data.Location.split(".")[
  402. data.Location.split(".").length - 1
  403. ].toLocaleUpperCase()
  404. ) != -1
  405. ) {
  406. _type = 2; //视频
  407. } else if (
  408. imgA.indexOf(
  409. data.Location.split(".")[
  410. data.Location.split(".").length - 1
  411. ].toLocaleLowerCase()
  412. ) != -1
  413. ) {
  414. _type = 3; //图片
  415. } else if (
  416. 'pdf'.indexOf(
  417. data.Location.split(".")[
  418. data.Location.split(".").length - 1
  419. ].toLocaleLowerCase()
  420. ) != -1
  421. ) {
  422. _type = 4; //pdf
  423. } else {
  424. _type = 5; //文件
  425. }
  426. if (_this.checkJson.file) {
  427. _this.checkJson.file.push({
  428. name: _name,
  429. url: data.Location,
  430. type: _type,
  431. });
  432. } else {
  433. _this.checkJson.file = []
  434. _this.checkJson.file.push({
  435. name: _name,
  436. url: data.Location,
  437. type: _type,
  438. });
  439. }
  440. if(_this.isTong){
  441. let _file = {
  442. name: _name,
  443. url: data.Location,
  444. type: _type,
  445. size: _this.formatFileSize(size)
  446. }
  447. _this.addSource(_file)
  448. }
  449. _this.$forceUpdate();
  450. _this.$emit('update:cJson', _this.checkJson)
  451. console.log(_this.checkJson);
  452. console.log(data.Location);
  453. }
  454. });
  455. }
  456. }
  457. },
  458. addSource(file) {
  459. let params = [{
  460. n: file.name,
  461. file: file.url,
  462. type: file.type,
  463. pid: '0',
  464. uid: this.userid,
  465. size: file.size,
  466. }];
  467. this.ajax
  468. .post(this.$store.state.api + "addSourceFile", params)
  469. .then((res) => {
  470. // if (_ctype == 2) {
  471. // this.$message.success('上传成功');
  472. // }
  473. })
  474. .catch((err) => {
  475. console.error(err);
  476. });
  477. },
  478. formatFileSize(bytes) {
  479. if (bytes < 1024) {
  480. return bytes + "B";
  481. } else if (bytes < 1048576) {
  482. return (bytes / 1024).toFixed(2) + "KB";
  483. } else if (bytes < 1073741824) {
  484. return (bytes / 1048576).toFixed(2) + "MB";
  485. } else {
  486. return (bytes / 1073741824).toFixed(2) + "GB";
  487. }
  488. },
  489. downloadFile(f) {
  490. var credentials = {
  491. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  492. secretAccessKey: "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",
  493. }; //秘钥形式的登录上传
  494. window.AWS.config.update(credentials);
  495. window.AWS.config.region = "cn-northwest-1"; //设置区域
  496. let url2 = f.url;
  497. let _url2 = "";
  498. if (
  499. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  500. ) {
  501. _url2 = url2.split(
  502. "https://view.officeapps.live.com/op/view.aspx?src="
  503. )[1];
  504. } else {
  505. _url2 = url2;
  506. }
  507. let _this = this;
  508. _this.downLoading = _url2
  509. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  510. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  511. var params = {
  512. Bucket: "ccrb",
  513. Key: name
  514. };
  515. s3.getObject(params, function (err, data) {
  516. _this.downLoading = ''
  517. if (err) console.log(err, err.stack); // an error occurred
  518. else {
  519. let url = window.URL.createObjectURL(new Blob([data.Body]));
  520. let a = document.createElement("a");
  521. a.name = f.name;
  522. a.href = url;
  523. a.download = f.name;
  524. a.click();
  525. console.log(data);
  526. } // sxuccessful response
  527. });
  528. },
  529. setCheckJson(name, url, type) {
  530. if (this.checkJson.file) {
  531. this.checkJson.file.push({
  532. name: name,
  533. url: url,
  534. type: type,
  535. });
  536. } else {
  537. this.checkJson.file = []
  538. this.checkJson.file.push({
  539. name: name,
  540. url: url,
  541. type: type,
  542. });
  543. }
  544. this.$forceUpdate();
  545. },
  546. checkFile(item) {
  547. if (item.type == 3) {
  548. this.$hevueImgPreview(item.url);
  549. } else if (item.type == 5) {
  550. this.downloadFile(item);
  551. } else if (item.type == 1) {
  552. this.dialogVisibleOffice = true
  553. this.wurl = item.url
  554. } else if (item.type == 2) {
  555. this.dialogVisibleVideo = true
  556. this.wurl = item.url
  557. } else if (item.type == 4) {
  558. this.dialogVisiblePdf = true
  559. this.wurl = item.url
  560. }
  561. },
  562. delFile(index) {
  563. this.checkJson.file.splice(index, 1)
  564. this.$emit('update:cJson', this.checkJson)
  565. this.$forceUpdate();
  566. },
  567. uploadCourse() {
  568. this.isloading = true;
  569. const _chapInfo = this.checkJson.file;
  570. let url = [];
  571. for (let i = 0; i < _chapInfo.length; i++) {
  572. url.push({
  573. name: _chapInfo[i].name,
  574. url: _chapInfo[i].url,
  575. });
  576. }
  577. console.log(url);
  578. this.downLoadAll(url);
  579. },
  580. downLoadAll(url) {
  581. const data = url; // 需要下载打包的路径, 可以是本地相对路径, 也可以是跨域的全路径
  582. const zip = new JSZip();
  583. const cache = {};
  584. const promises = [];
  585. data.forEach((item) => {
  586. const promise = getFile(item.url).then((data) => {
  587. if (data.data != 1) {
  588. // 下载文件, 并存成ArrayBuffer对象
  589. const file_name = item.name; // 获取文件名
  590. zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
  591. cache[file_name] = data.data;
  592. }
  593. });
  594. promises.push(promise);
  595. });
  596. Promise.all(promises).then(() => {
  597. zip.generateAsync({ type: "blob" }).then((content) => {
  598. // 生成二进制流
  599. FileSaver.saveAs(content, "附件.zip"); // 利用file-saver保存文件 自定义文件名
  600. setTimeout(() => {
  601. this.isloading = false;
  602. }, 2000);
  603. });
  604. });
  605. },
  606. },
  607. mounted() {
  608. this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined
  609. }
  610. }
  611. </script>
  612. <style scoped>
  613. .c_box {
  614. width: 100%;
  615. position: relative;
  616. }
  617. /* .mask {
  618. position: absolute;
  619. height: 100%;
  620. width: 100%;
  621. z-index: 2;
  622. } */
  623. .choice_box {
  624. white-space: pre-line;
  625. }
  626. .choice_box>.title {
  627. font-weight: bold;
  628. width: 100%;
  629. word-break: break-all;
  630. }
  631. .choice_box>.choices {
  632. margin-top: 10px;
  633. }
  634. .binfo_input {
  635. width: 100%;
  636. margin: 0;
  637. padding: 10px;
  638. display: block;
  639. min-width: 0;
  640. outline: none;
  641. box-sizing: border-box;
  642. background: none;
  643. border: none;
  644. border-radius: 5px;
  645. background: #fff;
  646. font-size: 16px;
  647. resize: none;
  648. font-family: 'Microsoft YaHei';
  649. min-height: 120px;
  650. /* border: 1px solid #3682fc00; */
  651. border: 1.5px solid #e0e0e0;
  652. position: relative;
  653. }
  654. .binfo_input>.uploadQ {
  655. /* border: 1.5px dashed #d1fdfdf; */
  656. height: 120px;
  657. width: 100%;
  658. display: flex;
  659. align-items: center;
  660. justify-content: center;
  661. background: #f9fafb;
  662. color: rgb(124, 124, 124);
  663. border-radius: 5px;
  664. cursor: pointer;
  665. }
  666. .mask {
  667. background-color: rgb(0 0 0 / 30%);
  668. /* position: fixed; */
  669. position: absolute;
  670. top: 0;
  671. left: 0;
  672. width: 100%;
  673. height: 100%;
  674. z-index: 90;
  675. display: flex;
  676. align-items: center;
  677. justify-content: center;
  678. }
  679. .progressBox {
  680. width: 300px;
  681. height: 150px;
  682. background: #fff;
  683. border-radius: 10px;
  684. box-shadow: 0 0 6px 1px #bfbfbf;
  685. display: flex;
  686. align-items: center;
  687. justify-content: center;
  688. flex-direction: column;
  689. position: relative;
  690. color: #6c6c6c;
  691. }
  692. .progressBox>>>.el-progress-bar__outer {
  693. background-color: #d1dfff !important;
  694. }
  695. .progressBox .lbox {
  696. height: 50px;
  697. font-size: 19px;
  698. display: flex;
  699. align-items: center;
  700. color: #747474;
  701. }
  702. .progressBox .lbox img {
  703. width: 40px;
  704. margin-right: 20px;
  705. }
  706. .closeCss {
  707. position: absolute;
  708. top: 8px;
  709. right: 8px;
  710. cursor: pointer;
  711. width: 20px;
  712. height: 20px;
  713. }
  714. .closeCss>img {
  715. width: 100%;
  716. height: 100%;
  717. }
  718. .binfo_input>.fileBox {}
  719. .binfo_input>.fileBox .fileC {
  720. display: flex;
  721. flex-wrap: wrap;
  722. width: 100%;
  723. cursor: pointer;
  724. }
  725. .binfo_input>.fileBox .fileC>.file {
  726. width: 200px;
  727. height: 140px;
  728. margin: 10px 10px 10px 0px;
  729. border-radius: 15px;
  730. box-shadow: rgb(223, 218, 218) 0px 0px 6px 1px;
  731. overflow: hidden;
  732. margin-right: 15px;
  733. position: relative;
  734. display: flex;
  735. flex-direction: column;
  736. }
  737. .binfo_input>.fileBox .fileC>.file>.img {
  738. width: 100%;
  739. height: calc(100% - 35px);
  740. object-fit: cover;
  741. }
  742. .binfo_input>.fileBox .fileC>.file>.del {
  743. position: absolute;
  744. width: 25px;
  745. top: 10px;
  746. right: 10px;
  747. cursor: pointer;
  748. }
  749. .binfo_input>.fileBox .fileC>.file>.download {
  750. position: absolute;
  751. width: 25px;
  752. top: 10px;
  753. right: 35px;
  754. cursor: pointer;
  755. opacity: .8;
  756. }
  757. .binfo_input>.fileBox .fileC>.file>.name {
  758. height: 35px;
  759. width: 100%;
  760. background: #f9f9f9;
  761. display: flex;
  762. align-items: center;
  763. padding: 0 10px;
  764. box-sizing: border-box;
  765. }
  766. .binfo_input>.fileBox .fileC>.file>.name>span {
  767. display: block;
  768. text-overflow: ellipsis;
  769. max-width: 100%;
  770. white-space: nowrap;
  771. overflow: hidden;
  772. }
  773. .binfo_input>.fileBox .btn {
  774. width: 100%;
  775. height: 40px;
  776. background: #007bff;
  777. color: #fff;
  778. border-radius: 15px;
  779. margin-top: 10px;
  780. display: flex;
  781. align-items: center;
  782. justify-content: center;
  783. cursor: pointer;
  784. }
  785. .choice_box>.c_title {
  786. display: flex;
  787. justify-content: space-between;
  788. }
  789. .choice_box>.c_title .title {
  790. font-weight: bold;
  791. width: 100%;
  792. word-break: break-all;
  793. }
  794. .choice_box>.c_title .p_box {
  795. margin-left: 5px;
  796. min-width: fit-content;
  797. display: flex;
  798. align-items: center;
  799. }
  800. .p_box>.btnU {
  801. color: #fff;
  802. background-color: #0061FF;
  803. padding: 0 24px;
  804. font-size: 14px;
  805. min-width: 64px;
  806. font-weight: 500;
  807. border-radius: 4px;
  808. box-sizing: border-box;
  809. border: none;
  810. cursor: pointer;
  811. transition: all 0.2s ease-in-out;
  812. height: 36px;
  813. display: flex;
  814. align-items: center;
  815. justify-content: center;
  816. line-height: 1;
  817. }
  818. .c_input {
  819. width: 90px;
  820. }
  821. .c_input>>>.el-input__inner {
  822. padding: 0 5px;
  823. text-align: right;
  824. }
  825. .uploadBtn {
  826. display: flex;
  827. margin-bottom: 10px;
  828. align-items: center;
  829. width: 100%;
  830. justify-content: flex-end;
  831. }
  832. .uploadBtn .btn {
  833. display: flex;
  834. cursor: pointer;
  835. align-items: center;
  836. height: 30px;
  837. padding: 0 8px;
  838. background: #fff;
  839. color: #3681FC;
  840. border: 1px solid #3681FC;
  841. box-sizing: border-box;
  842. border-radius: 4px;
  843. font-size: 14px;
  844. align-items: center;
  845. margin-right: 10px;
  846. }
  847. .uploadBtn .switch{
  848. display: flex;
  849. align-items: center;
  850. cursor: pointer;
  851. }
  852. .uploadBtn .switch > span{
  853. margin-left: 5px;
  854. }
  855. </style>