diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/controller/XxhbjwxtjxrwController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/controller/XxhbjwxtjxrwController.java index b4299a9..c17b03c 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/controller/XxhbjwxtjxrwController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/controller/XxhbjwxtjxrwController.java @@ -156,7 +156,6 @@ public class XxhbjwxtjxrwController extends JeecgController +
+ +
+ + + + +
+ + + + + + + + + + +
+ + + + + diff --git a/jeecgboot-vue3/src/views/bl/xxhbjwxtjxrw/XxhbjwxtjxrwList.vue b/jeecgboot-vue3/src/views/bl/xxhbjwxtjxrw/XxhbjwxtjxrwList.vue index 87a6a80..4fdf790 100644 --- a/jeecgboot-vue3/src/views/bl/xxhbjwxtjxrw/XxhbjwxtjxrwList.vue +++ b/jeecgboot-vue3/src/views/bl/xxhbjwxtjxrw/XxhbjwxtjxrwList.vue @@ -4,6 +4,23 @@
+ + 模板下载: + + + + 专家用评价表 + + + + @@ -43,6 +60,7 @@ 查询 重置 + 导出 {{ toggleSearchStatus ? '收起' : '展开' }} @@ -123,6 +141,21 @@ // 高级查询配置 const superQueryConfig = reactive(superQuerySchema); + +function textDown(type,downame){ + var a = document.createElement("a"); //创建一个标签 + a.href = "/download/"+type+".docx"; + //给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点. + a.download =downame+".docx"; + //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可 + a.style.display = "none"; // 障眼法藏起来a标签 + document.body.appendChild(a); + // 将a标签追加到文档对象中 + a.click(); //模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了 + a.remove(); + // 一次性的,用完就删除a标签 +} + /** * 高级查询事件 */ diff --git a/jeecgboot-vue3/src/views/bl/xxhbjwxtxsmd/XxhbjwxtxsmdList copy.vue b/jeecgboot-vue3/src/views/bl/xxhbjwxtxsmd/XxhbjwxtxsmdList copy.vue new file mode 100644 index 0000000..0610513 --- /dev/null +++ b/jeecgboot-vue3/src/views/bl/xxhbjwxtxsmd/XxhbjwxtxsmdList copy.vue @@ -0,0 +1,212 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/bl/xxhbjwxtxsmd/XxhbjwxtxsmdList.vue b/jeecgboot-vue3/src/views/bl/xxhbjwxtxsmd/XxhbjwxtxsmdList.vue index 32cc647..73f1819 100644 --- a/jeecgboot-vue3/src/views/bl/xxhbjwxtxsmd/XxhbjwxtxsmdList.vue +++ b/jeecgboot-vue3/src/views/bl/xxhbjwxtxsmd/XxhbjwxtxsmdList.vue @@ -73,12 +73,14 @@ import { downloadFile } from '/@/utils/common/renderUtils'; import XxhbjwxtxsmdModal from './components/XxhbjwxtxsmdModal.vue' import { useUserStore } from '/@/store/modules/user'; + import { downloadFile as ajaxDownloadFileFn } from '/@/api/common/api'; const formRef = ref(); const queryParam = reactive({}); const toggleSearchStatus = ref(false); const registerModal = ref(); const userStore = useUserStore(); + const spinning = ref(false); const jxrwInfo = reactive({}); //注册table数据 @@ -119,7 +121,20 @@ sm: 20, }); - +function textDown(){ + var a = document.createElement("a"); //创建一个标签 + a.href = "/download/a.docx"; + //给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点. + a.download ="a.docx"; + //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可 + a.style.display = "none"; // 障眼法藏起来a标签 + document.body.appendChild(a); + // 将a标签追加到文档对象中 + a.click(); //模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了 + a.remove(); + // 一次性的,用完就删除a标签 +} + /** * 编辑事件 */ @@ -140,6 +155,7 @@ * 操作栏 */ function getTableAction(record) { + if(record.studentPath){ return [ { label: '预览', @@ -150,6 +166,14 @@ onClick: handleEdit.bind(null, record), }, ]; + + }else{ + return [ + { + label: '暂无文件', + disabled:true, + },]; + } }