From adcc7f5c7b9a57ad7cde5dc8ec96caa3514f77b1 Mon Sep 17 00:00:00 2001 From: miaojiale <1123971748@qq.com> Date: Thu, 5 Jan 2023 10:17:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=90=A5=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Upload/index.vue | 41 ++- .../components/AcademicTrend.vue | 286 +++++++++++++++++- .../components/scientificResearch.vue | 212 ++++++------- 3 files changed, 411 insertions(+), 128 deletions(-) diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue index adfb562..d8a6df5 100644 --- a/src/components/Upload/index.vue +++ b/src/components/Upload/index.vue @@ -57,13 +57,21 @@ - {{ file.name }} +
+ {{ file.name }} +
+ @@ -268,15 +276,24 @@ export default { .el-upload-self { font-size: 14px; } -.avatar-uploader { +::v-deep .avatar-uploader { display: flex; align-items: center; + .el-upload--picture-card { + height: 20px; + transform: translateY(-4px); + } } -.pdfUpload { +::v-deep .pdfUpload { display: flex; flex-direction: row-reverse; justify-content: flex-end; - ::v-deep .el-upload-list__item { + .el-upload--text { + height: 20px; + transform: translateY(-4px); + } + + .el-upload-list__item { transform: translateY(-6px); // width: 158px; height: 20px; @@ -324,6 +341,12 @@ export default { height: 88px; display: block; } +.fileNameText { + width: 100px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} // ::v-deep .el-upload--picture-card { // width: none; // height: none; diff --git a/src/views/systems/operation-management/components/AcademicTrend.vue b/src/views/systems/operation-management/components/AcademicTrend.vue index 97fbff4..fa44787 100644 --- a/src/views/systems/operation-management/components/AcademicTrend.vue +++ b/src/views/systems/operation-management/components/AcademicTrend.vue @@ -1,14 +1,290 @@ - + diff --git a/src/views/systems/operation-management/components/scientificResearch.vue b/src/views/systems/operation-management/components/scientificResearch.vue index e52de82..6748936 100644 --- a/src/views/systems/operation-management/components/scientificResearch.vue +++ b/src/views/systems/operation-management/components/scientificResearch.vue @@ -33,59 +33,83 @@ :show-close="true" @closed="resetForm" > -
添加
+
{{ readOnly ? "查看" : "添加" }}
- - - - - - - - - - - - + + + - 保存 + 保存 + + + + + 确定删除吗? + + 取 消 + 确 定 @@ -94,50 +118,47 @@ import CustomsTable from "@/components/CustomsTable" import paginationMixin from "@/components/TabComponents/mixin" import ElUploadSelf from "@/components/Upload" -import { - articleList, - articleEnable, - deleteArticle, -} from "@/api/operation-management" +import mixin from "./mixin" +import { articleList } from "@/api/operation-management" export default { components: { CustomsTable, ElUploadSelf, }, - mixins: [paginationMixin], + mixins: [paginationMixin, mixin], data() { return { - addVisible: false, selectList: [ { label: "筛查技术方案", - value: 0, + value: "1", }, { label: "筛查指南", - value: 1, + value: "2", }, { label: "学术成果", - value: 2, + value: "3", }, { label: "项目进展与成果", - value: 3, + value: "4", }, ], - selectType: 0, + selectType: "1", listLoading: false, columns: [ { label: "标题", minWidth: 120, - value: "title", + value: "articleTitle", }, { label: "文件", minWidth: 120, - value: "file", + type: "file", + value: "filePath", }, { label: "上传时间", @@ -147,18 +168,18 @@ export default { { label: "最新修改时间", minWidth: 120, - value: "editTime", + value: "updateTime", }, { label: "上传人姓名", minWidth: 120, - value: "uploadPerson", + value: "uploadUserName", }, { label: "启用状态", minWidth: 120, type: "switch", - value: "isOpen", + value: "status", func: this.openChage, }, { @@ -168,7 +189,7 @@ export default { operType: "button", operations: [ { - func: this.editMedical, + func: this.viewMedical, formatter(row) { return { label: "查看", @@ -186,7 +207,7 @@ export default { }, }, { - func: this.rowOpration, + func: this.deleteFunc, style: { color: "#FA6400", }, @@ -200,56 +221,52 @@ export default { ], }, ], - - tableData: [ - { - title: "第一个", - isOpen: true, - }, - ], + tableData: [], formList: [ { type: "select", label: "类型", - prop: "type", + prop: "articleType", selectGroup: [ { - label: "筛查", - value: 0, + label: "筛查技术方案", + value: "1", }, { - label: "生活", - value: 1, + label: "筛查指南", + value: "2", }, { - label: "医学知识", - value: 2, + label: "学术成果", + value: "3", }, { - label: "其他", - value: 3, + label: "项目进展与成果", + value: "4", }, ], }, { type: "input", label: "标题", - prop: "title", - }, - { - type: "upload", - label: "图片", - prop: "img", + prop: "articleTitle", }, + // { + // type: "upload", + // label: "图片", + // prop: "imgPath", + // listType: "picture-card", + // }, { type: "upload", label: "PDF", - prop: "aaa", + prop: "filePath", + accept: "application/pdf", }, { type: "switch", label: "启用状态", - prop: "ssd", + prop: "status", }, ], rules: { @@ -283,39 +300,6 @@ export default { this.listLoading = false }) }, - // 添加医联体 - addMedical() { - this.addVisible = true - }, - // 编辑医联体 - editMedical(data) { - console.log(data) - this.form = { - medicalName: "黑乎乎", - medicalId: "123", - province: "001", - city: "001", - } - this.addVisible = true - }, - // 启用状态 - openChage(data, index) { - console.log(data, index) - }, - resetForm() { - this.$refs["form"].resetFields() - }, - submitForm() { - this.$refs["form"].validate((valid) => { - if (valid) { - alert("submit!") - this.addVisible = false - } else { - console.log("error submit!!") - return false - } - }) - }, }, } @@ -351,7 +335,7 @@ export default { ::v-deep .el-dialog__footer { border-top: none; text-align: center; - .el-button { + .f-btn { width: 100px; height: 32px; background: #4e68ff; -- 2.22.0