studentProjectWordDetail.vue 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270
  1. <template>
  2. <div id="studentProjectWordDetail" v-loading="loading || downloadWordDig">
  3. <studentProjectWord
  4. v-if="isupload == 0"
  5. :wordData="wordData"
  6. :reversedMessage="reversedMessage"
  7. :signData="signData"
  8. :download="loading"
  9. @getFile="getFile"
  10. @getFile2="getFile2"
  11. @fileOption="fileOption"
  12. @fileOption2="fileOption2"
  13. @saveFile="saveFile"
  14. />
  15. <studentProjectWordShow
  16. ref="myChild"
  17. v-if="isupload != 0 || downloadWordDig"
  18. :downWordData="downWordData"
  19. :reversedMessage="reversedMessage"
  20. :signData="signData"
  21. :download="loading"
  22. @getFile="getFile"
  23. @fileOption="fileOption"
  24. @saveFile="saveFile"
  25. />
  26. <div style="position: fixed; bottom: 5%; right: 2%">
  27. <!-- <el-button
  28. style="width: 140px; margin: 10px"
  29. @click="downloadWordDig = true"
  30. type="primary"
  31. >下载文件</el-button
  32. > -->
  33. <!-- <el-button
  34. style="width: 140px; margin: 1cqh"
  35. @click="downloadDig = true"
  36. type="primary"
  37. >下载PDF</el-button
  38. > -->
  39. <el-button
  40. style="width: 120px; margin: 10px"
  41. @click="test"
  42. type="primary"
  43. v-if="isupload == 0"
  44. >保存修改</el-button
  45. >
  46. </div>
  47. <!-- <div
  48. style="
  49. width: 500px;
  50. margin: 20px auto;
  51. display: flex;
  52. justify-content: space-between;
  53. "
  54. >
  55. <el-button
  56. style="width: 140px; margin: 20px auto"
  57. @click="downloadWordDig = true"
  58. type="primary"
  59. >下载文档(Word)</el-button
  60. >
  61. <el-button
  62. style="width: 140px; margin: 20px auto"
  63. @click="downloadDig = true"
  64. type="primary"
  65. >下载文档(PDF)</el-button
  66. >
  67. <el-button
  68. style="width: 120px; margin: 20px auto"
  69. @click="test"
  70. type="primary"
  71. v-if="isupload == 0"
  72. >立即修改</el-button
  73. >
  74. </div> -->
  75. <!-- 立即修改开始 -->
  76. <el-dialog
  77. title="立即修改"
  78. :visible.sync="updatedWordDig"
  79. width="600px"
  80. class="pageSubmitData"
  81. >
  82. <div class="deleteContent">确定提交修改?</div>
  83. <span slot="footer" class="dialog-footer">
  84. <el-button type="primary" @click="updatedWord" class="AllDialogBtn"
  85. >确认</el-button
  86. >
  87. <el-button @click="updatedWordDig = false" class="AllDialogBtn"
  88. >取消</el-button
  89. >
  90. </span>
  91. </el-dialog>
  92. <!-- 立即修改结束-->
  93. <!-- 下载文档开始 -->
  94. <el-dialog
  95. title="下载PDF"
  96. :visible.sync="downloadDig"
  97. width="600px"
  98. class="pageSubmitData"
  99. >
  100. <div class="deleteContent">确定下载文档?</div>
  101. <span slot="footer" class="dialog-footer" v-loading="loading">
  102. <el-button type="primary" @click="downloadPDFFile" class="AllDialogBtn"
  103. >确认</el-button
  104. >
  105. <el-button @click="downloadDig = false" class="AllDialogBtn"
  106. >取消</el-button
  107. >
  108. </span>
  109. </el-dialog>
  110. <el-dialog
  111. title="下载Word"
  112. :visible.sync="downloadWordDig"
  113. width="600px"
  114. class="pageSubmitData"
  115. >
  116. <div class="deleteContent">确定下载文档?</div>
  117. <span slot="footer" class="dialog-footer">
  118. <el-button type="primary" @click="downloadWordFile" class="AllDialogBtn"
  119. >确认</el-button
  120. >
  121. <!-- <el-button type="primary" @click="downloadWord2" class="AllDialogBtn"
  122. >确认2</el-button
  123. > -->
  124. <el-button @click="()=>{downloadWordDig = false;loading = false}" class="AllDialogBtn"
  125. >取消</el-button
  126. >
  127. </span>
  128. </el-dialog>
  129. <!-- 下载文档结束-->
  130. <!-- 展示文件 -->
  131. <el-dialog
  132. title="展示文件"
  133. :visible.sync="showFile"
  134. top="1vh"
  135. width="80vw"
  136. append-to-body
  137. >
  138. <div class="showFileArea" style="height: 80vh">
  139. <!-- <vpdf v-if="/^\s*$/g.test(showFileUrl)&&showFileUrl.split('.')[showFileUrl.split('.').length-1]=='pdf'" :pdfUrl="showFileUrl"></vpdf> -->
  140. <div
  141. class="workd_media"
  142. style="width: 90%; height: 90%"
  143. v-if="videoDetail.sources"
  144. >
  145. <video-player
  146. class="video-player vjs-custom-skin"
  147. :playsinline="true"
  148. :options="videoDetail"
  149. @play="onPlayerPlay($event)"
  150. style="width: 90%; height: 90%; margin: 0 auto"
  151. ></video-player>
  152. </div>
  153. <vword
  154. style="width: 100%; height: 100%; overflow: auto"
  155. class="fullStyle"
  156. v-else-if="Wordss['type'] != 'pdf' && Wordss['name'] != '图片'"
  157. :pdfUrl="
  158. 'https://view.officeapps.live.com/op/view.aspx?src=' + showFileUrl
  159. "
  160. ></vword>
  161. <vpdf
  162. style="width: 100%; height: 100%; overflow: auto"
  163. class="fullStyle"
  164. :pdfUrl="showFileUrl"
  165. v-else-if="Wordss['type'] == 'pdf'"
  166. ></vpdf>
  167. <img
  168. :src="showFileUrl"
  169. alt="图片哦"
  170. v-else-if="Wordss['name'] == '图片'"
  171. style="width: auto; height: auto; max-width: 100%; max-height: 100%"
  172. />
  173. </div>
  174. <!-- <el-button type="primary" size="mini" @click="downFile(showFileUrl)">下载文件</el-button> -->
  175. </el-dialog>
  176. <!-- 修改文件名称 -->
  177. <el-dialog
  178. title="修改名称"
  179. :visible.sync="dialogVisibleUpdateFile"
  180. :append-to-body="true"
  181. width="500px"
  182. class="dialog_diy"
  183. >
  184. <div
  185. style="
  186. width: 100%;
  187. display: flex;
  188. flex-direction: row;
  189. flex-wrap: nowrap;
  190. align-items: center;
  191. justify-content: center;
  192. "
  193. >
  194. <div style="min-width: fit-content">文件名称:</div>
  195. <el-input
  196. v-model="updateFile.fileName"
  197. placeholder="请输入要修改的名称"
  198. ></el-input>
  199. </div>
  200. <span slot="footer" class="dialog-footer">
  201. <el-button @click="dialogVisibleUpdateFile = false">取 消</el-button>
  202. <el-button type="primary" @click="updateFileName">确 定</el-button>
  203. </span>
  204. </el-dialog>
  205. <!-- 修改文件名称2-->
  206. <el-dialog
  207. title="修改名称"
  208. :visible.sync="dialogVisibleUpdateFile2"
  209. :append-to-body="true"
  210. width="500px"
  211. class="dialog_diy"
  212. >
  213. <div
  214. style="
  215. width: 100%;
  216. display: flex;
  217. flex-direction: row;
  218. flex-wrap: nowrap;
  219. align-items: center;
  220. justify-content: center;
  221. "
  222. >
  223. <div style="min-width: fit-content">文件名称:</div>
  224. <el-input
  225. v-model="updateFile.fileName"
  226. placeholder="请输入要修改的名称"
  227. ></el-input>
  228. </div>
  229. <span slot="footer" class="dialog-footer">
  230. <el-button @click="dialogVisibleUpdateFile2 = false">取 消</el-button>
  231. <el-button type="primary" @click="updateFileName2">确 定</el-button>
  232. </span>
  233. </el-dialog>
  234. </div>
  235. </template>
  236. <script>
  237. import { getNowDate } from "@/components/tool/Date.js";
  238. import { getWord2 } from "@/components/tool/getWord2";
  239. import studentProjectWord from "./studentProjectWord.vue";
  240. import studentProjectWordShow from "./studentProjectWordShow.vue";
  241. import { downloadPDF } from "@/components/tool/pdf";
  242. import vpdf from "@/components/vpdf.vue";
  243. import vword from "@/components/vword.vue";
  244. import "@/components/common/aws-sdk-2.235.1.min.js"
  245. const getFile = (url) => {
  246. return new Promise((resolve, reject) => {
  247. var credentials = {
  248. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  249. secretAccessKey: "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",
  250. }; //秘钥形式的登录上传
  251. window.AWS.config.update(credentials);
  252. window.AWS.config.region = "cn-northwest-1"; //设置区域
  253. let url2 = url;
  254. let _url2 = "";
  255. if (
  256. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  257. ) {
  258. _url2 = url2.split(
  259. "https://view.officeapps.live.com/op/view.aspx?src="
  260. )[1];
  261. } else {
  262. _url2 = url2;
  263. }
  264. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  265. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  266. var params = {
  267. Bucket: "ccrb",
  268. Key: name
  269. };
  270. s3.getObject(params, function (err, data) {
  271. if (err) {
  272. console.log(err, err.stack)
  273. resolve({ data: 1 });
  274. }else {
  275. resolve({ data: data.Body });
  276. console.log(data);
  277. } // sxuccessful response
  278. });
  279. // var credentials = {
  280. // accessKeyId: "AKIATLPEDU37QV5CHLMH",
  281. // secretAccessKey: "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",
  282. // }; //秘钥形式的登录上传
  283. // window.AWS.config.update(credentials);
  284. // window.AWS.config.region = "cn-northwest-1"; //设置区域
  285. // let url2 = url;
  286. // let _url2 = "";
  287. // if (
  288. // url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  289. // ) {
  290. // _url2 = url2.split(
  291. // "https://view.officeapps.live.com/op/view.aspx?src="
  292. // )[1];
  293. // } else {
  294. // _url2 = url2;
  295. // }
  296. // let _this = this;
  297. // var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  298. // let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  299. // var params = {
  300. // Bucket: "ccrb",
  301. // Key: name
  302. // };
  303. // s3.getObject(params, function (err, data) {
  304. // if (err) console.log(err, err.stack); // an error occurred
  305. // else {
  306. // let url = window.URL.createObjectURL(new Blob([data.Body]));
  307. // let a = document.createElement("a");
  308. // a.name = name;
  309. // a.href = url;
  310. // a.download = name;
  311. // a.click();
  312. // console.log(data);
  313. // } // sxuccessful response
  314. // });
  315. });
  316. };
  317. export default {
  318. components: { studentProjectWord, studentProjectWordShow,vword,vpdf },
  319. data() {
  320. return {
  321. isupload: 1,
  322. DepartmentData: [], //部门学院
  323. loading:false,
  324. downloadDig: false, //下载文档对话框
  325. downloadWordDig:false,
  326. updatedWordDig: false, //立即修改对话框
  327. showFile:false,// 展示文件弹窗
  328. dialogVisibleUpdateFile:false,//修改文件弹窗
  329. dialogVisibleUpdateFile2:false,//修改文件弹窗2
  330. downWordData: {
  331. applicationDate: getNowDate(1), //申请日期
  332. projectName: "",
  333. radio: "",
  334. checkList: [],
  335. schoolRadio: [],
  336. applyParsonRadio: [],
  337. applyParsonName: "",
  338. college: "",
  339. tel: "",
  340. beginTime: "",
  341. endTime: "",
  342. studentS: [
  343. { name: "", collage: "", work: "" },
  344. { name: "", collage: "", work: "" },
  345. { name: "", collage: "", work: "" },
  346. { name: "", collage: "", work: "" },
  347. { name: "", collage: "", work: "" },
  348. { name: "", collage: "", work: "" },
  349. ],
  350. teacherS: [
  351. { name: "", collage: "", work: "" },
  352. { name: "", collage: "", work: "" },
  353. ],
  354. brief: "",
  355. introduce: {
  356. back: "",
  357. innovate: "",
  358. path: "",
  359. scene: "",
  360. worth: "",
  361. team: "",
  362. cost: "",
  363. expectResults: "",
  364. expectResultsTeacher: "",
  365. expectConversion: "",
  366. plan: "",
  367. },
  368. total: 0,
  369. fund: {
  370. device: "",
  371. Material: "",
  372. processing: "",
  373. APPRAISAL: "",
  374. Collaboration: "",
  375. Transaction: "",
  376. activities: "",
  377. entery: "",
  378. },
  379. opinion:[],
  380. },
  381. wordData: {
  382. applicationDate: getNowDate(1), //申请日期
  383. projectName: "",
  384. radio: "",
  385. checkList: [],
  386. schoolRadio: [],
  387. applyParsonRadio: [],
  388. applyParsonName: "",
  389. college: "",
  390. tel: "",
  391. beginTime: "",
  392. endTime: "",
  393. studentS: [
  394. { name: "", collage: "", work: "" },
  395. { name: "", collage: "", work: "" },
  396. { name: "", collage: "", work: "" },
  397. { name: "", collage: "", work: "" },
  398. { name: "", collage: "", work: "" },
  399. { name: "", collage: "", work: "" },
  400. ],
  401. teacherS: [
  402. { name: "", collage: "", work: "" },
  403. { name: "", collage: "", work: "" },
  404. ],
  405. brief: "",
  406. introduce: {
  407. back: "",
  408. innovate: "",
  409. path: "",
  410. scene: "",
  411. worth: "",
  412. team: "",
  413. cost: "",
  414. expectResults: "",
  415. expectResultsTeacher: "",
  416. expectConversion: "",
  417. plan: "",
  418. },
  419. total: 0,
  420. fund: {
  421. device: "",
  422. Material: "",
  423. processing: "",
  424. APPRAISAL: "",
  425. Collaboration: "",
  426. Transaction: "",
  427. activities: "",
  428. entery: "",
  429. },
  430. attachment:[],//附件上传
  431. opinion:[],
  432. },
  433. signData:[],
  434. word: [
  435. "DOC",
  436. "DOCX",
  437. "DOCM",
  438. "DOTM",
  439. "DOTX",
  440. "PPTX",
  441. "PPSX",
  442. "PPT",
  443. "PPS",
  444. "PPTM",
  445. "POTM",
  446. "PPAM",
  447. "POTX",
  448. "PPSM",
  449. "XLSX",
  450. "XLS",
  451. ],
  452. pdf: ["PDF"],
  453. image: [
  454. "BMP",
  455. "PJP",
  456. "APNG",
  457. "PNG",
  458. "JPG",
  459. "GIF",
  460. "SVG",
  461. "JPEG",
  462. "JPG",
  463. "ICO",
  464. "PGPEG",
  465. "AVIF",
  466. ],
  467. vedio: [
  468. "AVI",
  469. "NAVI",
  470. "MPEG",
  471. "ASF",
  472. "MOV",
  473. "WMV",
  474. "3GP",
  475. "RM",
  476. "RMVB",
  477. "FLV",
  478. "F4V",
  479. "H.264",
  480. "H.265",
  481. "REAL VIDEO",
  482. "MKV",
  483. "WebM",
  484. "HDDVD",
  485. "MP4",
  486. "MPG",
  487. "M4V",
  488. "MGV",
  489. "OGV",
  490. "QTM",
  491. "STR",
  492. "AMC",
  493. "DVX",
  494. "EVO",
  495. "DAT",
  496. "OGG",
  497. "OGM",
  498. ],
  499. playerOptions: {
  500. playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
  501. autoplay: false, //如果true,浏览器准备好时开始回放。
  502. muted: false, // 默认情况下将会消除任何音频。
  503. loop: false, // 导致视频一结束就重新开始。
  504. preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
  505. language: "zh-CN",
  506. aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
  507. fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
  508. sources: [
  509. {
  510. type: "video/mp4", //这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目 || "video/ogg"|| "video/webm"
  511. src: "", //url地址require("../../assets/media/aaa.mp4")
  512. },
  513. ],
  514. // poster: require("../../assets/tu31.png"), //你的封面地址
  515. // poster: dataRes.imgUrl, //你的封面地址
  516. notSupportedMessage: "此视频暂无法播放,请稍后再试", //允许覆盖Video.js无法播放媒体源时显示的默认信息。
  517. controlBar: {
  518. timeDivider: true, //当前时间和持续时间的分隔符
  519. durationDisplay: true, //显示持续时间
  520. remainingTimeDisplay: false, //是否显示剩余时间功能
  521. fullscreenToggle: true, //全屏按钮
  522. },
  523. },
  524. playerO: {},
  525. videoDetail: {},
  526. Wordss:{},
  527. showFileUrl:"",
  528. canonical: {
  529. Image:
  530. /^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i,
  531. File: /^https?:\/\/(.+\/)+.+(\.(docx|xlsx|ppt|pdf))$/i,
  532. },
  533. updateFile:{
  534. url:"",
  535. fileName:""
  536. },
  537. };
  538. },
  539. methods: {
  540. getText(value) {
  541. //电话验证
  542. let verify =
  543. /^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/; //获取正则表达式 存放到verify变量中
  544. let result = verify.test(value.trim()); //判断输入框内容是否符合 正则表达式
  545. if (!result) return this.$message.error("请输入正确联系号码格式");
  546. },
  547. addTeacher() {
  548. //添加老师
  549. // if (this.wordData.teacherS.length >= 3)
  550. // return this.$message.error("指导老师最多三人");
  551. this.wordData.teacherS.push({ name: "", collage: "", work: "" });
  552. },
  553. DelTeacher(index) {
  554. //删除老师
  555. this.wordData.teacherS.splice(index, 1);
  556. },
  557. addStudent() {
  558. //添加学生
  559. this.wordData.studentS.push({ name: "", collage: "", work: "" });
  560. },
  561. DelStudent(index) {
  562. //删除学生
  563. this.wordData.studentS.splice(index, 1);
  564. },
  565. getProjectDepartmentData() {
  566. //获取项目立项申请基础信息页面所在部门数据
  567. this.ajax
  568. .post(this.$store.state.api + "/SelectAllDepartment", {
  569. uid: this.$store.state.userInfo.userid,
  570. })
  571. .then(
  572. (res) => {
  573. this.DepartmentData = res.data[0];
  574. },
  575. (err) => {
  576. console.log(err);
  577. }
  578. );
  579. },
  580. getData() {
  581. if(this.loading)return;
  582. this.loading = true;
  583. let param = {
  584. uid: this.$store.state.userInfo.userid,
  585. cid: this.$route.query["pid"],
  586. };
  587. this.ajax.get(this.$store.state.api + "/studentProjectData", param).then(
  588. (res) => {
  589. let data = res.data[0][0];
  590. this.wordData.projectName = data.title;
  591. this.wordData.radio = data.typeName;
  592. this.wordData.checkList = JSON.parse(data.multiSelectProject);
  593. this.wordData.schoolRadio = JSON.parse(data.schoolRemould);
  594. this.wordData.applyParsonRadio = JSON.parse(data.projectApplyperson);
  595. this.wordData.applyParsonName = data.pro_leader;
  596. this.wordData.college = data.classid;
  597. this.wordData.tel = data.phone;
  598. this.wordData.beginTime = data.bTime;
  599. this.wordData.endTime = data.eTime;
  600. this.wordData.studentS = JSON.parse(data.course_student);
  601. this.wordData.teacherS = JSON.parse(data.course_teacher);
  602. this.wordData.brief = data.brief;
  603. this.wordData.introduce = JSON.parse(data.chapters);
  604. this.wordData.fund = JSON.parse(data.money);
  605. this.wordData.opinion = data.opinion?JSON.parse(data.opinion):[];
  606. this.wordData.attachment = data.attachment?JSON.parse(data.attachment):[];
  607. this.downWordData = {
  608. ...this.wordData,
  609. ...{ etime: data.eTime, btime: data.bTime, dp: data.className },
  610. };
  611. this.isupload = data["isupload"];
  612. this.loading = false;
  613. },
  614. (err) => {
  615. console.log(err);
  616. }
  617. );
  618. },
  619. // 获取评审数据
  620. getSignData(){
  621. let params = {
  622. pid:this.$route.query['pid']
  623. }
  624. this.ajax.get(this.$store.state.api+'/selectSign',params).then(res=>{
  625. let signData = res.data[0]
  626. signData.sort((a,b)=>new Date(b.create_at) - new Date(a.create_at))
  627. this.signData = signData
  628. })
  629. },
  630. test() {
  631. //验证
  632. const cEmpty = /^\s*$/g;
  633. for (let i in this.wordData) {
  634. // console.log(this.wordData[i],i);
  635. switch (i) {
  636. case "projectName":
  637. if (cEmpty.test(this.wordData[i])) {
  638. this.$message.error("请输入项目名称");
  639. // this.$refs.projectName.style.background='rgb(236, 141, 141)'
  640. // setTimeout(() => {
  641. // this.$refs.projectName.style.background='#ffffff'
  642. // }, 2000);
  643. document
  644. .querySelector("#projectName")
  645. .scrollIntoView({ behavior: "smooth" });
  646. return false;
  647. }
  648. break;
  649. case "radio":
  650. if (cEmpty.test(this.wordData[i])) {
  651. this.$message.error("请选择项目分组");
  652. document
  653. .querySelector("#radio")
  654. .scrollIntoView({ behavior: "smooth" });
  655. return false;
  656. }
  657. break;
  658. // case "checkList":
  659. // if (this.wordData[i].length == 0) {
  660. // this.$message.error("优先支持项目");
  661. // document
  662. // .querySelector("#checkList")
  663. // .scrollIntoView({ behavior: "smooth" });
  664. // return false;
  665. // }
  666. // break;
  667. // case "schoolRadio":
  668. // if (cEmpty.test(this.wordData[i])) {
  669. // this.$message.error("请选择美丽校园改造项目");
  670. // document
  671. // .querySelector("#schoolRadio")
  672. // .scrollIntoView({ behavior: "smooth" });
  673. // return false;
  674. // }
  675. // break;
  676. // case "applyParsonRadio":
  677. // if (cEmpty.test(this.wordData[i])) {
  678. // this.$message.error("请选择项目申请人");
  679. // document
  680. // .querySelector("#applyParsonRadio")
  681. // .scrollIntoView({ behavior: "smooth" });
  682. // return false;
  683. // }
  684. // break;
  685. case "applyParsonName":
  686. if (cEmpty.test(this.wordData[i])) {
  687. this.$message.error("请填写申请人姓名");
  688. document
  689. .querySelector("#applyParsonName")
  690. .scrollIntoView({ behavior: "smooth" });
  691. return false;
  692. }
  693. break;
  694. case "college":
  695. if (cEmpty.test(this.wordData[i])) {
  696. this.$message.error("请选择所在学院");
  697. document
  698. .querySelector("#applyParsonName")
  699. .scrollIntoView({ behavior: "smooth" });
  700. return false;
  701. }
  702. break;
  703. case "tel":
  704. if (cEmpty.test(this.wordData[i])) {
  705. this.$message.error("请填写联系方式");
  706. document
  707. .querySelector("#applyParsonName")
  708. .scrollIntoView({ behavior: "smooth" });
  709. return false;
  710. }
  711. break;
  712. case "beginTime":
  713. if (cEmpty.test(this.wordData[i])) {
  714. this.$message.error("请选择项目起始时间");
  715. document
  716. .querySelector("#beginTime")
  717. .scrollIntoView({ behavior: "smooth" });
  718. return false;
  719. }
  720. break;
  721. case "endTime":
  722. if (cEmpty.test(this.wordData[i])) {
  723. this.$message.error("请选择计划完成时间");
  724. document
  725. .querySelector("#beginTime")
  726. .scrollIntoView({ behavior: "smooth" });
  727. return false;
  728. }
  729. break;
  730. // case "studentS":
  731. // let snum = 0;
  732. // this.wordData[i].forEach((item) => {
  733. // if (cEmpty.test(item["name"])) snum++;
  734. // // for(let j in item){
  735. // // if(cEmpty.test(item[j])){
  736. // // snum++;
  737. // // }
  738. // // }
  739. // });
  740. // if (snum > 0) {
  741. // this.$message.error("学生姓名请不要留空");
  742. // document
  743. // .querySelector("#studentS")
  744. // .scrollIntoView({ behavior: "smooth" });
  745. // return false;
  746. // }
  747. // // }
  748. // break;
  749. // case "teacherS":
  750. // let num = 0;
  751. // this.wordData[i].forEach((item) => {
  752. // if (cEmpty.test(item["name"])) num++;
  753. // // for(let j in item){
  754. // // if(cEmpty.test(item[j])){
  755. // // num++;
  756. // // }
  757. // // }
  758. // });
  759. // if (num > 0) {
  760. // this.$message.error("老师姓名请不要留空");
  761. // document
  762. // .querySelector("#teacherS")
  763. // .scrollIntoView({ behavior: "smooth" });
  764. // return false;
  765. // }
  766. // break;
  767. // case 'brief':
  768. // if (cEmpty.test(this.wordData[i])) {
  769. // this.$message.error('请填写项目简介')
  770. // // this.$refs.brief.style.background='rgb(236, 141, 141)'
  771. // // setTimeout(() => {
  772. // // this.$refs.brief.style.background='#ffffff'
  773. // // }, 2000);
  774. // document.querySelector('#brief').scrollIntoView({ behavior: "smooth" });
  775. // return false
  776. // }
  777. // break;
  778. case "fund":
  779. let mon =
  780. this.wordData.fund.device * 1 +
  781. this.wordData.fund.Material * 1 +
  782. this.wordData.fund.processing * 1 +
  783. this.wordData.fund.APPRAISAL * 1 +
  784. this.wordData.fund.Collaboration * 1 +
  785. this.wordData.fund.Transaction * 1 +
  786. this.wordData.fund.activities * 1 +
  787. this.wordData.fund.entery * 1;
  788. if (mon == 0) {
  789. document
  790. .querySelector("#fund")
  791. .scrollIntoView({ behavior: "smooth" });
  792. return this.$message.error("请输入经费");
  793. }
  794. break;
  795. }
  796. }
  797. this.wordData["total"] =
  798. this.wordData.fund.device * 1 +
  799. this.wordData.fund.Material * 1 +
  800. this.wordData.fund.processing * 1 +
  801. this.wordData.fund.APPRAISAL * 1 +
  802. this.wordData.fund.Collaboration * 1 +
  803. this.wordData.fund.Transaction * 1 +
  804. this.wordData.fund.activities * 1 +
  805. this.wordData.fund.entery * 1;
  806. this.updatedWordDig = true;
  807. },
  808. updatedWord() {
  809. let param = {
  810. uid: this.$store.state.userInfo.userid, //用户ID
  811. cid: this.$route.query["pid"],
  812. tid: "5e21b204-c206-11ed-a4cd-509a4c5b67cf", //特色创客空间建设项目分类ID
  813. tit: encodeURIComponent(this.wordData["projectName"]), //项目名称
  814. radio: this.wordData["radio"], //项目分组
  815. checkList: encodeURIComponent(JSON.stringify(this.wordData["checkList"])), //优先支持项目
  816. schoolRadio: encodeURIComponent(JSON.stringify(this.wordData["schoolRadio"])), //美丽校园改造项目
  817. applyParsonRadio: encodeURIComponent(JSON.stringify(this.wordData["applyParsonRadio"])), //项 目 申 请 人
  818. applyParsonName: encodeURIComponent(this.wordData["applyParsonName"]), //申请人姓名
  819. coid: this.wordData["college"], //学院ID,
  820. tel: this.wordData["tel"], //联系电话
  821. beh: this.wordData["beginTime"], //项目开始时间,
  822. planEnd: this.wordData["endTime"], //计划完成时间,
  823. cs: encodeURIComponent(JSON.stringify(this.wordData["studentS"])), //学生组,
  824. ct: encodeURIComponent(JSON.stringify(this.wordData["teacherS"])), //教师组,
  825. bf: encodeURIComponent(this.wordData["brief"]), //项目简介
  826. introduce: encodeURIComponent(JSON.stringify(this.wordData["introduce"])), //项目详细
  827. mon: encodeURIComponent(JSON.stringify(this.wordData["fund"])), //预算经费
  828. f: this.wordData["total"], //总经费
  829. apply: this.wordData["applicationDate"], //申请日期
  830. mem:this.wordData["teacherS"].filter(i=>i.name!='').length + this.wordData["studentS"].filter(i=>i.name!='').length,
  831. attachment:encodeURIComponent(JSON.stringify(this.wordData["attachment"])),//附件上传
  832. };
  833. this.ajax
  834. .post(this.$store.state.api + "/updateStudentProjectData", param)
  835. .then(
  836. (res) => {
  837. // console.log(res.data);
  838. if (res.data) {
  839. this.updatedWordDig = false;
  840. return this.$message.success("修改成功");
  841. } else {
  842. this.$message.error("修改失败");
  843. }
  844. },
  845. (err) => {
  846. console.log(err);
  847. }
  848. );
  849. },
  850. downloadWordFile(){
  851. this.loading = true;
  852. // var credentials = {
  853. // accessKeyId: "AKIATLPEDU37QV5CHLMH",
  854. // secretAccessKey: "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",
  855. // }; //秘钥形式的登录上传
  856. // window.AWS.config.update(credentials);
  857. // window.AWS.config.region = "cn-northwest-1"; //设置区域
  858. // let url2 = "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E6%94%B6%E5%85%A5%E6%A8%A1%E5%BC%8F1712047315470.jpg";
  859. // let _url2 = "";
  860. // if (
  861. // url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  862. // ) {
  863. // _url2 = url2.split(
  864. // "https://view.officeapps.live.com/op/view.aspx?src="
  865. // )[1];
  866. // } else {
  867. // _url2 = url2;
  868. // }
  869. // let _this = this;
  870. // var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  871. // let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  872. // var params = {
  873. // Bucket: "ccrb",
  874. // Key: name
  875. // };
  876. // s3.getObject(params, function (err, data) {
  877. // if (err) console.log(err, err.stack); // an error occurred
  878. // else {
  879. // let url = window.URL.createObjectURL(new Blob([data.Body]));
  880. // let a = document.createElement("a");
  881. // a.name = name;
  882. // a.href = url;
  883. // a.download = name;
  884. // a.click();
  885. // console.log(data);
  886. // } // sxuccessful response
  887. // });
  888. // getFile("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/%E5%9B%BE%E7%89%8711711980299371.jpg").then(res=>{
  889. // console.log(res)
  890. // })
  891. // return
  892. this.$nextTick(async ()=>{
  893. this.$message.info("正在下载,请稍等...")
  894. let elementList = this.$refs.myChild.$refs.pdfShow.querySelectorAll('.downImage')
  895. let fontSize = [];
  896. let pFontSize = [];
  897. let promises = []
  898. let fontType = {
  899. '1':"13pt",
  900. '2':"16.9pt",
  901. '3':"20.9pt",
  902. '4':"23.5pt",
  903. '5':"31.3pt",
  904. '6':"41.8pt",
  905. '7':"62.6pt"
  906. }
  907. elementList.forEach((el,elIndex) => {
  908. let img = el.getElementsByTagName('img');
  909. for(let i=0;i<img.length;i++){
  910. img[i].setAttribute('crossOrigin',"*")
  911. // let src = img[i].getAttribute("src");
  912. // promises.push(getFile(src).then(async res=>{
  913. // await new Promise(resolve => {
  914. // if (res.data != 1) {
  915. // let blob = new Blob([res.data]);
  916. // // blob = new Blob([res.data],{type:res.headers['content-type']});
  917. // let reader = new FileReader();
  918. // reader.readAsDataURL(blob);
  919. // reader.onload = function(e){
  920. // img[i].setAttribute("src",this.result);
  921. // resolve();
  922. // }
  923. // }
  924. // })
  925. // }))
  926. // img[i].setAttribute("crossOrigin","*");
  927. }
  928. let font = el.getElementsByTagName('font');
  929. for(let i=0;i<font.length;i++){
  930. fontSize.push(font[i].getAttribute("size"))
  931. font[i].removeAttribute("size")
  932. font[i].setAttribute("style",`font-size:${fontType[fontSize[i]]}`)
  933. }
  934. // 替换p标签的font-size
  935. // let p = el.getElementsByTagName('p');
  936. let p = el.querySelectorAll("*")
  937. for(let i=0;i<p.length;i++){
  938. let pStyle = p[i].getAttribute("style")
  939. if(!pStyle)continue;
  940. let matchArr = pStyle.match(/font-size: (\d+)px/);
  941. if(!matchArr)continue;
  942. pFontSize.push({style:pStyle,index:`${elIndex}:${i}`})
  943. let originalSize = pStyle.match(/font-size: (\d+)px/)[1];
  944. let newSize = parseInt(originalSize)*1.3;
  945. let newStyle = pStyle.replace(/font-size: (\d+)px/,`font-size: ${newSize}pt`)
  946. p[i].setAttribute("style",newStyle)
  947. }
  948. })
  949. // return
  950. // return await Promise.all(promises)
  951. Promise.all(promises).then(()=>{
  952. let newData = JSON.parse(JSON.stringify(this.downWordData))
  953. getWord2({...newData,signData:this.signData,elementList}).then(_=>{
  954. elementList.forEach((el,elIndex) => {
  955. let img = el.getElementsByTagName('img');
  956. for(let i=0;i<img.length;i++){
  957. img[i].removeAttribute('crossOrigin')
  958. }
  959. let font = el.getElementsByTagName('font');
  960. for(let i=0;i<font.length;i++){
  961. font[i].removeAttribute("style")
  962. font[i].setAttribute("size",fontSize[i])
  963. }
  964. // 替换p标签的font-size
  965. let p = el.querySelectorAll("*")
  966. for(let i=0;i<p.length;i++){
  967. let oldStyle = pFontSize.find(p=>p.index==`${elIndex}:${i}`)
  968. if(!oldStyle)continue;
  969. p[i].setAttribute("style",oldStyle.style)
  970. // let pStyle = p[i].getAttribute("style")
  971. // if(!pStyle)continue
  972. // let matchArr = pStyle.match(/font-size: (\d+)px/);
  973. // console.log(matchArr)
  974. // if(!matchArr)continue;
  975. // console.log(pFontSize[i])
  976. // p[i].setAttribute("style",pFontSize[i])
  977. }
  978. })
  979. this.downloadWordDig = false;
  980. this.loading = false;
  981. })
  982. })
  983. })
  984. // getWord2({...this.downWordData,elementList:this.$refs.myChild.$refs.pdfShow.querySelectorAll('.downImage')})
  985. // getWord2({...this.downWordData,signData:this.signData});
  986. },
  987. downloadPDFFile() {
  988. // let elementList = this.$refs.myChild.$refs.pdfShow.querySelectorAll('.downImage')
  989. // elementList.forEach(el => {
  990. // let img = el.getElementsByTagName('img');
  991. // for(let i=0;i<img.length;i++){
  992. // img[i].crossOrigin = "*"
  993. // }
  994. // })
  995. downloadPDF(
  996. this.$refs.myChild.$refs.pdfShow,
  997. "附件2:2023年学生创客项目申报书"
  998. );
  999. // this.wordData['total']=this.wordData.fund.facility*1 + this.wordData.fund.materials*1+this.wordData.fund.process*1+ this.wordData.fund.assist*1+this.wordData.fund.authenticate*1+ this.wordData.fund.match*1+this.wordData.fund.activity*1+this.wordData.fund.affair*1
  1000. // return console.log(this.wordData);
  1001. // let elementList = this.$refs.myChild.$refs.pdfShow.querySelectorAll('.downImage')
  1002. // elementList.forEach(el => {
  1003. // let img = el.getElementsByTagName('img');
  1004. // for(let i=0;i<img.length;i++){
  1005. // img[i].crossOrigin = "*"
  1006. // }
  1007. // })
  1008. // return console.log(elementList)
  1009. // getWord({...this.downWordData,elementList:this.$refs.myChild.$refs.pdfShow.querySelectorAll('.downImage')})
  1010. // getWord(this.downWordData)
  1011. this.downloadDig = false;
  1012. },
  1013. // 上传专家文件
  1014. getFile(file){
  1015. this.wordData.opinion.push(file);
  1016. this.saveFile();
  1017. },
  1018. // 对文件的操作
  1019. fileOption(file,index,opt){
  1020. if(opt=='0'){
  1021. this.checkFile(file.url)
  1022. }else if(opt=='1'){
  1023. if(index==0)return;
  1024. this.wordData.opinion.splice(index-1,0,this.wordData.opinion.splice(index,1)[0]);
  1025. this.saveFile();
  1026. }else if(opt=='2'){
  1027. if(index==this.wordData.opinion.length-1)return;
  1028. this.wordData.opinion.splice(index+1,0,this.wordData.opinion.splice(index,1)[0]);
  1029. this.saveFile();
  1030. }else if(opt=='3'){
  1031. this.updateFile = {...file,index:index}
  1032. this.dialogVisibleUpdateFile = true;
  1033. }else if(opt=='4'){
  1034. this.$confirm("确定删除该文件?","提示",{
  1035. type:"error",
  1036. confirmButtonText:"确定删除",
  1037. cancelButtonText:"取消",
  1038. }).then(_=>{
  1039. this.wordData.opinion.splice(index,1);
  1040. this.saveFile();
  1041. })
  1042. }
  1043. },
  1044. //上传附件
  1045. fileOption2(file,index,opt){
  1046. if(opt=='0'){
  1047. this.checkFile(file.url)
  1048. }else if(opt=='1'){
  1049. if(index==0)return;
  1050. this.wordData.attachment.splice(index-1,0,this.wordData.attachment.splice(index,1)[0]);
  1051. }else if(opt=='2'){
  1052. if(index==this.wordData.attachment.length-1)return;
  1053. this.wordData.attachment.splice(index+1,0,this.wordData.attachment.splice(index,1)[0]);
  1054. }else if(opt=='3'){
  1055. this.updateFile = {...file,index:index}
  1056. this.dialogVisibleUpdateFile2 = true;
  1057. }else if(opt=='4'){
  1058. this.$confirm("确定删除该文件?","提示",{
  1059. type:"error",
  1060. confirmButtonText:"确定删除",
  1061. cancelButtonText:"取消",
  1062. }).then(_=>{
  1063. this.wordData.attachment.splice(index,1);
  1064. })
  1065. }
  1066. },
  1067. // 上传专家文件
  1068. getFile2(file){
  1069. this.wordData.attachment.push(file);
  1070. },
  1071. // 上传文件函数
  1072. saveFile(){
  1073. let params = {
  1074. uid:this.$store.state.userInfo.userid,
  1075. pid:this.$route.query["pid"],
  1076. file:encodeURIComponent(JSON.stringify(this.wordData.opinion))
  1077. }
  1078. this.ajax.post(this.$store.state.api+"/updateProjectOpinion",params).then(res=>{
  1079. if(res.data==1){
  1080. return this.getData();
  1081. }
  1082. })
  1083. },
  1084. //展示文件
  1085. checkFile(url) {
  1086. this.videoDetail = {};
  1087. if (
  1088. this.vedio.indexOf(
  1089. url.split(".")[url.split(".").length - 1].toLocaleUpperCase()
  1090. ) != -1
  1091. ) {
  1092. this.playerOptions.sources[0].src = url;
  1093. this.videoDetail = this.playerOptions;
  1094. this.showFile = true;
  1095. } else {
  1096. if (
  1097. this.word.indexOf(
  1098. url.split(".")[url.split(".").length - 1].toLocaleUpperCase()
  1099. ) == -1 &&
  1100. this.pdf.indexOf(
  1101. url.split(".")[url.split(".").length - 1].toLocaleUpperCase()
  1102. ) == -1 &&
  1103. this.image.indexOf(
  1104. url.split(".")[url.split(".").length - 1].toLocaleUpperCase()
  1105. ) == -1
  1106. ) {
  1107. this.downFile(url);
  1108. return;
  1109. }
  1110. this.showFileUrl = url;
  1111. this.showFile = true;
  1112. if (typeof url == "undefined") return { type: "", name: "" };
  1113. let urlSplit = url.split(".");
  1114. const type = urlSplit[urlSplit.length - 1];
  1115. if (this.canonical.Image.test(url)) {
  1116. this.Wordss = { type: type, name: "图片" };
  1117. return console.log(this.Wordss);
  1118. }
  1119. if (this.canonical.File.test(url)) {
  1120. this.Wordss = { type: type, name: "文档" };
  1121. return console.log(this.Wordss);
  1122. }
  1123. if (this.canonical.vedio.test(url)) {
  1124. this.Wordss = { type: type, name: "视频" };
  1125. return console.log(this.Wordss);
  1126. } else return (this.Wordss = { type: type, name: type });
  1127. }
  1128. },
  1129. //下载文件
  1130. downFile(f) {
  1131. var credentials = {
  1132. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  1133. secretAccessKey: "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",
  1134. }; //秘钥形式的登录上传
  1135. window.AWS.config.update(credentials);
  1136. window.AWS.config.region = "cn-northwest-1"; //设置区域
  1137. let url2 = f;
  1138. let _url2 = "";
  1139. if (
  1140. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  1141. ) {
  1142. _url2 = url2.split(
  1143. "https://view.officeapps.live.com/op/view.aspx?src="
  1144. )[1];
  1145. } else {
  1146. _url2 = url2;
  1147. }
  1148. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  1149. let name = decodeURIComponent(
  1150. _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
  1151. );
  1152. var params = {
  1153. Bucket: "ccrb",
  1154. Key: name,
  1155. };
  1156. s3.getObject(params, function (err, data) {
  1157. if (err) console.log(err, err.stack); // an error occurred
  1158. else {
  1159. let url = window.URL.createObjectURL(new Blob([data.Body]));
  1160. let a = document.createElement("a");
  1161. a.name = name;
  1162. a.href = url;
  1163. a.download = name;
  1164. a.click();
  1165. console.log(data);
  1166. } // sxuccessful response
  1167. });
  1168. return;
  1169. },
  1170. // 修改文件名称
  1171. updateFileName(){
  1172. if(!this.updateFile.fileName)return this.$message.error("请输入文件名称");
  1173. this.wordData.opinion[this.updateFile.index].fileName = this.updateFile.fileName;
  1174. this.dialogVisibleUpdateFile = false;
  1175. this.saveFile();
  1176. },
  1177. // 修改文件名称
  1178. updateFileName2(){
  1179. if(!this.updateFile.fileName)return this.$message.error("请输入文件名称");
  1180. this.wordData.attachment[this.updateFile.index].fileName = this.updateFile.fileName;
  1181. this.dialogVisibleUpdateFile2 = false;
  1182. }
  1183. // downloadWord2() {
  1184. // // downloadPDF(
  1185. // // this.$refs.myChild.$refs.pdfShow,
  1186. // // "附件2:2023年学生创客项目申报书"
  1187. // // );
  1188. // // this.wordData['total']=this.wordData.fund.facility*1 + this.wordData.fund.materials*1+this.wordData.fund.process*1+ this.wordData.fund.assist*1+this.wordData.fund.authenticate*1+ this.wordData.fund.match*1+this.wordData.fund.activity*1+this.wordData.fund.affair*1
  1189. // // return console.log(this.wordData);
  1190. // let elementList = this.$refs.myChild.$refs.pdfShow.querySelectorAll('.downImage')
  1191. // elementList.forEach(el => {
  1192. // let img = el.getElementsByTagName('img');
  1193. // for(let i=0;i<img.length;i++){
  1194. // img[i].crossOrigin = "*"
  1195. // }
  1196. // })
  1197. // // return console.log(elementList)
  1198. // getWord2({...this.downWordData,elementList:this.$refs.myChild.$refs.pdfShow.querySelectorAll('.downImage')})
  1199. // // getWord(this.downWordData)
  1200. // this.downloadDig = false;
  1201. // },
  1202. },
  1203. //小型仪器设备费:device deviceRemarks
  1204. //材料费:Material MaterialRemarks
  1205. //测试化验加工费:processing processingRemarks
  1206. //项目协作费:Collaboration CollaborationRemarks
  1207. //项目成果鉴定费:APPRAISAL APPRAISALRemarks
  1208. //参展参赛费:entery enteryRemarks
  1209. //创客交流活动费:activities activitiesRemarks
  1210. //知识产权事务费:Transaction TransactionRemarks
  1211. computed: {
  1212. //经费总合
  1213. reversedMessage: function () {
  1214. return (
  1215. this.wordData.fund.device * 1 +
  1216. this.wordData.fund.Material * 1 +
  1217. this.wordData.fund.processing * 1 +
  1218. this.wordData.fund.Collaboration * 1 +
  1219. this.wordData.fund.APPRAISAL * 1 +
  1220. this.wordData.fund.entery * 1 +
  1221. this.wordData.fund.activities * 1 +
  1222. this.wordData.fund.Transaction * 1
  1223. );
  1224. },
  1225. },
  1226. mounted() {
  1227. this.getProjectDepartmentData();
  1228. this.getData();
  1229. this.getSignData();
  1230. // console.log(this.$route.query['pid']);
  1231. },
  1232. };
  1233. </script>
  1234. <style lang="less" scoped>
  1235. #studentProjectWordDetail {
  1236. width: 100%;
  1237. display: flex;
  1238. flex-direction: column;
  1239. align-items: center;
  1240. position: relative;
  1241. }
  1242. </style>