diff --git a/src/main.js b/src/main.js index 98b95ec..4612eed 100644 --- a/src/main.js +++ b/src/main.js @@ -1,4 +1,6 @@ import Vue from "vue"; +// 预览docx +import VueCompositionAPI from '@vue/composition-api' import Cookies from "js-cookie"; @@ -55,6 +57,8 @@ import DictData from "@/components/DictData"; //echarts import * as echarts from "echarts"; + + // 全局方法挂载 Vue.prototype.getDicts = getDicts; Vue.prototype.getConfigKey = getConfigKey; @@ -90,6 +94,8 @@ DictData.install(); * Currently MockJs will be used in the production environment, * please remove it before going online! ! ! */ +//预览docx +Vue.use(VueCompositionAPI) Vue.use(Element, { size: Cookies.get("size") || "medium", // set element-ui default size diff --git a/src/views/compilation/handbook/index.vue b/src/views/compilation/handbook/index.vue new file mode 100644 index 0000000..f8c4f1a --- /dev/null +++ b/src/views/compilation/handbook/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/views/compilation/knowledge/index.vue b/src/views/compilation/knowledge/index.vue index fe72ed1..17f7aca 100644 --- a/src/views/compilation/knowledge/index.vue +++ b/src/views/compilation/knowledge/index.vue @@ -41,12 +41,18 @@ @@ -59,7 +65,7 @@ - @@ -70,14 +76,22 @@ - + - - - + + + + + @@ -86,7 +100,10 @@ - + + + + @@ -108,8 +125,8 @@ :value="dict.value"> - - + + @@ -164,8 +181,8 @@ export default { detailOpen: false, // 查询参数 queryParams: { - pageNum: 1, - pageSize: 10, + current: 1, + size: 10, name: undefined, lx: undefined }, @@ -177,6 +194,7 @@ export default { fj: undefined, scsj: undefined, scyh: undefined, + wz: undefined, createBy: undefined, createId: undefined, createTime: undefined, @@ -192,6 +210,7 @@ export default { fj: undefined, scsj: undefined, scyh: undefined, + wz: undefined, createBy: undefined, createId: undefined, createTime: undefined, @@ -207,6 +226,9 @@ export default { lx: [ { required: true, message: "文件类型不能为空", trigger: "change" } ], + wz: [ + { required: true, message: "网址不能为空", trigger: "change" } + ], scyh: [ { required: true, message: "上传用户不能为空", trigger: "blur" } ], @@ -220,14 +242,15 @@ export default { 2: "研究报告", 3: "网络信息", 4: "其他", - } + }, + select: 'http' // 默认协议类型 }; }, created() { this.getList(); }, methods: { - //获取文件名字 + // 获取文件名字 getFileName(filePath) { if (filePath) { return filePath.split('/').pop(); @@ -237,7 +260,6 @@ export default { querySearchAsync(queryString, cb) { let results = []; - // 假设 getXmzskPage 是用于文件名称模糊查询的 API getXmzskPage({ name: queryString }).then(res => { res.data.records.forEach(item => { results.push({ @@ -274,6 +296,7 @@ export default { fj: undefined, scsj: undefined, scyh: undefined, + wz: undefined, createBy: undefined, createId: undefined, createTime: undefined, @@ -281,11 +304,12 @@ export default { updateId: undefined, updateTime: undefined }; + this.select = 'http'; // 重置协议类型 this.resetForm("form"); }, /** 搜索按钮操作 */ handleQuery() { - this.queryParams.pageNum = 1; + this.queryParams.current = 1; this.getList(); }, /** 重置按钮操作 */ @@ -310,6 +334,7 @@ export default { this.reset(); const catalogId = row.id; this.form = { ...row }; + this.setProtocolType(this.form.wz); // 设置协议类型 this.open = true; this.title = "修改项目知识库"; }, @@ -357,6 +382,36 @@ export default { }).catch(error => { console.error('API Request Error:', error); }); + }, + // 设置协议类型 + setProtocolType(url) { + if (url) { + if (url.startsWith('https://')) { + this.select = 'https'; + } else if (url.startsWith('http://')) { + this.select = 'http'; + } else { + this.select = 'http'; + this.form.wz = 'http://' + url; + } + } else { + this.select = 'http'; + } + }, + // 协议类型改变时更新网址 + handleProtocolChange() { + if (this.form.wz && !this.form.wz.startsWith(this.select + '://')) { + this.form.wz = this.select + '://' + this.form.wz.replace(/(http|https):\/\//, ''); + } + }, + // 文件类型改变时重置网址 + handleTypeChange() { + if (this.form.lx !== '3') { + this.form.wz = undefined; + this.select = 'http'; + } else { + this.setProtocolType(this.form.wz); + } } } }; diff --git a/src/views/compilation/onecailiao/index.vue b/src/views/compilation/onecailiao/index.vue index 25dbadd..4eec8ae 100644 --- a/src/views/compilation/onecailiao/index.vue +++ b/src/views/compilation/onecailiao/index.vue @@ -45,7 +45,7 @@ - @@ -106,7 +106,7 @@ + + \ No newline at end of file diff --git a/src/views/components/ProjectDetails/Memo.vue b/src/views/components/ProjectDetails/Memo.vue index 71e262d..654449c 100644 --- a/src/views/components/ProjectDetails/Memo.vue +++ b/src/views/components/ProjectDetails/Memo.vue @@ -246,8 +246,7 @@ export default { }, // 获取当前账号的名称 getCurrentUserName() { - // 假设当前账号的名称存储在 Vuex store 中 - return this.$store.state.user.name; // 根据实际情况调整 + return this.$store.state.user.name; }, // 格式化日期时间 formatDateTime(dateTime) { diff --git a/src/views/components/ProjectDetails/Others.vue b/src/views/components/ProjectDetails/Others.vue index 30151dd..853907a 100644 --- a/src/views/components/ProjectDetails/Others.vue +++ b/src/views/components/ProjectDetails/Others.vue @@ -235,7 +235,7 @@ export default { // 将新数据添加到 anotherInfo 数组中 this.anotherInfo.push({ - id: response.data.id, // 假设响应中包含新增数据的ID + id: response.data.id, zdname: this.form.zdname, zdinfor: this.form.zdinfor }); diff --git a/src/views/components/ProjectDetails/Projectpicture.vue b/src/views/components/ProjectDetails/Projectpicture.vue index c21b3f3..0fe07f2 100644 --- a/src/views/components/ProjectDetails/Projectpicture.vue +++ b/src/views/components/ProjectDetails/Projectpicture.vue @@ -144,7 +144,7 @@ export default { const data = elementMap[element]; evaluations.push({ element: element, - ranking: data.project // 假设 pjpm 是排名 + ranking: data.project }); projectData.push(data.project); medianData.push(data.median); @@ -158,7 +158,6 @@ export default { }, processDescriptionData(data) { // 处理雷达图解释说明的数据 - // 假设 data 是一个数组,包含解释说明的信息 this.descriptionData = data; }, initChart() { diff --git a/src/views/manage-add/index.vue b/src/views/manage-add/index.vue index 7be620b..c51e741 100644 --- a/src/views/manage-add/index.vue +++ b/src/views/manage-add/index.vue @@ -236,7 +236,6 @@ export default { checkPermi, checkRole, loadData() { - console.log('Loading data for project ID:', this.projectId); getzwBasicInformationById(this.projectId).then(response => { const data = response.data; this.basicInformation = data.basicInformation; @@ -274,7 +273,7 @@ export default { } else { this[dataKey] = updatedData; } - console.log(`接收到 ${dataKey} 更新:`, updatedData); + // console.log(`接收到 ${dataKey} 更新:`, updatedData); }, isDefault(obj, defaultObj) { @@ -289,7 +288,7 @@ export default { saveAll() { this.loading = true; const tempData = this.prepareSubmitData(); // 复用数据准备逻辑 - console.log('准备暂存的完整数据:', JSON.stringify(tempData, null, 2)); // 打印完整数据 + // console.log('准备暂存的完整数据:', JSON.stringify(tempData, null, 2)); // 打印完整数据 tempBasicInformation(tempData) .then(response => { this.$message.success('暂存成功'); @@ -307,7 +306,7 @@ export default { submitAll() { this.loading = true; const submitData = this.prepareSubmitData(); - console.log('准备提交的完整数据:', JSON.stringify(submitData, null, 2)); // 打印完整数据 + // console.log('准备提交的完整数据:', JSON.stringify(submitData, null, 2)); // 打印完整数据 fillBasicInformation(submitData) .then(response => { this.$message.success('提交成功'); @@ -326,7 +325,7 @@ export default { auditBasicInformation(submitData) .then(response => { - console.log('提交成功:', response); + // console.log('提交成功:', response); this.$message.success('审核通过'); this.isSubmitted = true; this.$router.push('/manage'); @@ -342,7 +341,7 @@ export default { auditBasicInformation(submitData) .then(response => { - console.log('提交成功:', response); + // console.log('提交成功:', response); this.$message.success('修改成功'); this.isSubmitted = true; this.$router.push('/manage'); diff --git a/src/views/orientedtwo/bqspan/index.vue b/src/views/orientedtwo/bqspan/index.vue index 5861340..656ea2a 100644 --- a/src/views/orientedtwo/bqspan/index.vue +++ b/src/views/orientedtwo/bqspan/index.vue @@ -8,25 +8,25 @@ - - - - @@ -53,11 +53,11 @@ - - - - - + + + + + +