From c8f78c2a4e8436414d4b8d793e319be869564df2 Mon Sep 17 00:00:00 2001
From: miaojiale <1123971748@qq.com>
Date: Wed, 4 Jan 2023 17:47:56 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=90=A5=E7=AE=A1=E7=90=86=E9=83=A8?=
=?UTF-8?q?=E5=88=86=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/CustomsTable/index.vue | 49 ++++-
src/components/Upload/index.vue | 42 +++-
.../components/HealthPopularization.vue | 157 +++++----------
.../components/NewsMeeting.vue | 189 ++++++++----------
.../components/NoticeAnnouncement.vue | 171 +++++++++-------
.../operation-management/components/mixin.js | 99 +++++++++
.../components/scientificResearch.vue | 5 -
7 files changed, 411 insertions(+), 301 deletions(-)
create mode 100644 src/views/systems/operation-management/components/mixin.js
diff --git a/src/components/CustomsTable/index.vue b/src/components/CustomsTable/index.vue
index 652f1f8..0cbc630 100644
--- a/src/components/CustomsTable/index.vue
+++ b/src/components/CustomsTable/index.vue
@@ -1,10 +1,10 @@
- {{ scope.row[column.value] }}
@@ -46,6 +46,7 @@
+
+
+
+
+
+
+
+ {{
+ scope.row[column.value]
+ ? scope.row[column.value][0].fileName
+ : ""
+ }}
+
-
+
@@ -131,6 +166,7 @@
import resize from "../TabComponents/resize.js"
import { mapGetters } from "vuex"
export default {
+ mixins: [resize],
props: {
tableHeight: Number, // 表格的高度
maxHeight: Number, // 表格的最大高度
@@ -145,10 +181,13 @@ export default {
tableData: Array, // 表格数据
showIndex: { default: false }, // 是否展示索引
},
- mixins: [resize],
data() {
return {
fontSize: ["12px", "14px", "16px"],
+ httpPrefix:
+ process.env.NODE_ENV === "development"
+ ? "/api"
+ : process.env.VUE_APP_BASE_API,
}
},
computed: {
diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue
index 38a4d96..adfb562 100644
--- a/src/components/Upload/index.vue
+++ b/src/components/Upload/index.vue
@@ -42,6 +42,29 @@
点击上传
+
+
![]()
+
+
+
+
+
+
{{ file.name }}
+
@@ -125,7 +148,7 @@ export default {
return this.value.map((_) => {
return (
_.url ||
- `${this.httpPrefix}/cloud-upms/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}`
+ `https://ds.cixincloud.com/geca-api/disease-data/file/info/${_.bucketName}/${_.uuidName}`
)
})
},
@@ -136,8 +159,8 @@ export default {
if (newValue === oldValue) return
this.fileList = newValue.map((_) => {
return {
- name: _.file_name,
- url: `${this.httpPrefix}/cloud-upms/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}`,
+ name: _.fileName,
+ url: `https://ds.cixincloud.com/geca-api/disease-data/file/info/${_.bucketName}/${_.uuidName}`,
}
})
},
@@ -203,7 +226,7 @@ export default {
let responseUrl
if (file.response) {
const _ = file.response.data
- responseUrl = `${this.httpPrefix}/cloud-upms/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}`
+ responseUrl = `https://ds.cixincloud.com/geca-api/disease-data/file/info/${_.bucketName}/${_.uuidName}`
}
try {
if (name.match(/\.(png|jpg|jpeg)/)) {
@@ -255,8 +278,8 @@ export default {
justify-content: flex-end;
::v-deep .el-upload-list__item {
transform: translateY(-6px);
- width: 158px;
- height: 40px;
+ // width: 158px;
+ height: 20px;
}
}
::v-deep .avatar-uploader .el-upload {
@@ -273,6 +296,10 @@ export default {
height: 30px;
line-height: 0px;
}
+ .el-upload--text {
+ height: 20px;
+ transform: translateY(-4px);
+ }
}
::v-deep .avatar-uploader .el-upload:hover {
border-color: #409eff;
@@ -280,6 +307,9 @@ export default {
::v-deep .el-upload-list__item {
width: 88px;
height: 88px;
+ &:hover {
+ background-color: #fff;
+ }
}
.avatar-uploader-icon {
font-size: 28px;
diff --git a/src/views/systems/operation-management/components/HealthPopularization.vue b/src/views/systems/operation-management/components/HealthPopularization.vue
index 622925c..4e924ba 100644
--- a/src/views/systems/operation-management/components/HealthPopularization.vue
+++ b/src/views/systems/operation-management/components/HealthPopularization.vue
@@ -40,7 +40,7 @@
:label-position="'right'"
label-width="110px"
label-suffix=":"
- :rules="rules"
+ :disabled="readOnly"
>
-
+
+
@@ -92,13 +93,23 @@
>
-
+
+
+
+
+ 确定删除吗?
+
@@ -107,41 +118,38 @@
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
import ElUploadSelf from "@/components/Upload"
-import {
- articleList,
- articleEnable,
- deleteArticle,
- addArticle,
-} 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 {
- readOnly: true,
- addVisible: false,
+ // readOnly: true,
+ // addVisible: false,
+ // deleteVisible: false,
selectList: [
{
label: "筛查",
- value: 0,
+ value: "0",
},
{
label: "生活",
- value: 1,
+ value: "1",
},
{
label: "医学知识",
- value: 2,
+ value: "2",
},
{
label: "其他",
- value: 3,
+ value: "3",
},
],
- selectType: 0,
+ selectType: "0",
listLoading: false,
columns: [
{
@@ -151,13 +159,15 @@ export default {
},
{
label: "图片",
+ type: "img",
minWidth: 120,
- value: "iamge",
+ value: "imgPath",
},
{
label: "文件",
minWidth: 120,
- value: "file",
+ type: "file",
+ value: "filePath",
},
{
label: "上传时间",
@@ -167,18 +177,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,
},
{
@@ -206,7 +216,7 @@ export default {
},
},
{
- func: this.rowOpration,
+ func: this.deleteFunc,
style: {
color: "#FA6400",
},
@@ -235,19 +245,19 @@ export default {
selectGroup: [
{
label: "筛查",
- value: 1,
+ value: "1",
},
{
label: "生活",
- value: 2,
+ value: "2",
},
{
label: "医学知识",
- value: 3,
+ value: "3",
},
{
label: "其他",
- value: 4,
+ value: "4",
},
],
},
@@ -274,12 +284,9 @@ export default {
prop: "status",
},
],
- rules: {
- title: [{ required: true, message: "请输入标题", trigger: "blur" }],
- },
- form: {
- status: 1,
- },
+ // form: {
+ // status: 1,
+ // },
}
},
watch: {},
@@ -287,9 +294,6 @@ export default {
this.getArticleList()
},
methods: {
- fileSuccess(val) {
- console.log(this.form)
- },
// 获取健康科普
getArticleList() {
this.listLoading = true
@@ -297,7 +301,7 @@ export default {
size: this.pageSize,
current: this.pageIndex,
moduleType: "4",
- articleType: this.selectType + 1,
+ articleType: this.selectType - 0 + 1,
}
articleList(params)
.then((res) => {
@@ -311,72 +315,6 @@ export default {
this.listLoading = false
})
},
- // 添加文章
- addMedical() {
- this.readOnly = false
- this.addVisible = true
- },
- // 查看
- viewMedical() {
- this.readOnly = true
- this.form = {
- title: "123",
- }
- this.addVisible = true
- },
- // 编辑医联体
- editMedical(data) {
- this.readOnly = false
- console.log(data)
- this.form = {
- medicalName: "黑乎乎",
- medicalId: "123",
- province: "001",
- city: "001",
- }
- this.addVisible = true
- },
- // 启用状态
- openChage(data, index) {
- console.log(data, index)
- let params = {
- id: data.id,
- status: data.status ? 1 : 0,
- }
- articleEnable(params).then((res) => {
- if (res.code == 1) {
- // this.$message.success("保存成功")
- this.getArticleList()
- }
- })
- },
- resetForm() {
- this.$refs["form"].resetFields()
- this.form = {
- status: 1,
- }
- },
- submitForm() {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- addArticle({
- ...this.form,
- moduleType: "4",
- }).then((res) => {
- if (res.code == 1) {
- this.addVisible = false
- this.$refs["form"].resetFields()
- this.form = {
- status: 1,
- }
- }
- })
- } else {
- console.log("error submit!!")
- return false
- }
- })
- },
},
}
@@ -412,15 +350,10 @@ export default {
::v-deep .el-dialog__footer {
border-top: none;
text-align: center;
- .el-button {
+ .f-btn {
width: 100px;
height: 32px;
background: #4e68ff;
}
}
-::v-deep .el-upload {
- .el-button {
- transform: translateY(-4px);
- }
-}
diff --git a/src/views/systems/operation-management/components/NewsMeeting.vue b/src/views/systems/operation-management/components/NewsMeeting.vue
index 5f3f29a..a680b04 100644
--- a/src/views/systems/operation-management/components/NewsMeeting.vue
+++ b/src/views/systems/operation-management/components/NewsMeeting.vue
@@ -18,66 +18,105 @@
@currentPageChange="handleCurrentChange"
/>
-
-
- 确定删除吗?
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- -->
+
+
+
+ 确定删除吗?
+
+
diff --git a/src/views/systems/operation-management/components/NoticeAnnouncement.vue b/src/views/systems/operation-management/components/NoticeAnnouncement.vue
index d8d04bb..47e4d8a 100644
--- a/src/views/systems/operation-management/components/NoticeAnnouncement.vue
+++ b/src/views/systems/operation-management/components/NoticeAnnouncement.vue
@@ -18,41 +18,89 @@
@currentPageChange="handleCurrentChange"
/>
-
- 添加医联体
+
+ {{ readOnly ? "查看" : "添加" }}
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定删除吗?
+
@@ -60,30 +108,31 @@
--
2.22.0