From 928ed9260ecdd5d4e5d0aebcc2797fd295288d09 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Tue, 9 Jul 2024 16:16:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E6=95=B4=E4=BD=93=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/task/newplan.js | 20 +- src/views/dashboard/article.vue | 120 +++++++++ src/views/dashboard/components/addArticle.vue | 239 ++++++++++++++++++ src/views/dashboard/index.vue | 161 +++++++----- src/views/objective/targetindex.vue | 2 +- .../task/list/components/addPatrol copy.vue | 2 +- src/views/task/list/components/addPatrol.vue | 40 +-- src/views/task/list/components/addPlan.vue | 13 + src/views/task/list/components/addUnit.vue | 86 ++++++- src/views/task/list/components/checkUnit.vue | 2 +- .../task/list/components/showPatrol copy.vue | 2 +- src/views/task/list/components/showPatrol.vue | 55 ++-- src/views/task/list/outline.vue | 10 +- src/views/task/list/patrol.vue | 114 +-------- src/views/task/list/unit.vue | 22 +- vue.config.js | 2 +- 16 files changed, 649 insertions(+), 241 deletions(-) create mode 100644 src/views/dashboard/article.vue create mode 100644 src/views/dashboard/components/addArticle.vue diff --git a/src/api/task/newplan.js b/src/api/task/newplan.js index d16d26a..54785db 100644 --- a/src/api/task/newplan.js +++ b/src/api/task/newplan.js @@ -2,15 +2,21 @@ import request from "@/utils/request"; function customParamsSerializer(params) { let result = ''; for (let key in params) { - if (params.hasOwnProperty(key)) { - if (Array.isArray(params[key])) { - params[key].forEach((item,index) => { - result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`; - }); - } else { - result += `${key}=${params[key]}&`; + if(key=='filter'){ + if (params.hasOwnProperty(key)) { + if (Array.isArray(params[key])) { + params[key].forEach((item,index) => { + result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`; + }); + } else { + result += `${key}=${params[key]}&`; + } } + + }else{ + result += `${key}=${params[key]}&`; } + } return result.slice(0, -1); } diff --git a/src/views/dashboard/article.vue b/src/views/dashboard/article.vue new file mode 100644 index 0000000..c82f1ac --- /dev/null +++ b/src/views/dashboard/article.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/src/views/dashboard/components/addArticle.vue b/src/views/dashboard/components/addArticle.vue new file mode 100644 index 0000000..9306714 --- /dev/null +++ b/src/views/dashboard/components/addArticle.vue @@ -0,0 +1,239 @@ + + + + + diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 569c7be..d092d84 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -3,36 +3,64 @@
- - + + +
+
+ 资讯动态 +
+
+ + + +

{{ item.title }}

+
+
+
+
+
-
-
- 科室任务统计 -
- - -
+ +
+
+ 动态信息
-
-
- - - - +
+
+ + + + +
-
-
- + + +
+
+
+ +
@@ -223,6 +251,35 @@
+ + + +
+
+ 科室任务统计 +
+ + +
+
+
+
+ + + + +
+
+ +
@@ -326,40 +383,6 @@
-
- -
-
- 动态信息 -
-
-
- - - - - -
- - - -
-
@@ -400,7 +423,9 @@ import { chartinspection, chartDepartment } from "@/api/chart.js"; - + import { + index as indexSwiper + } from '@/api/task/newplan.js' import { mapGetters } from 'vuex' @@ -436,6 +461,7 @@ export default { login_id: '', department_id: '', isautoplay:true, + articleSwiper:[], activeCount:1, activeName: 'first', activeAllList:[], @@ -1009,7 +1035,8 @@ export default { console.log("this.stateObj",this.stateObj) // this.updateMissionPlan() this.getUserId() - this.getUnitTypeList() + this.getUnitTypeList() + this.getSwiperList() // this.getQuestion() // this.getActiveList() @@ -1022,6 +1049,16 @@ export default { }, methods: { + // 资讯动态 + async getSwiperList() { + const res = await indexSwiper({ + page:1, + page_size:5, + table_name: 'articles', + with_relations:['image'] + }) + this.articleSwiper = res.data + }, async logout(){ await this.$store.dispatch("user/logout") this.$router.push(`/login?redirect=${this.$route.fullPath}`) diff --git a/src/views/objective/targetindex.vue b/src/views/objective/targetindex.vue index 574500b..34cd143 100644 --- a/src/views/objective/targetindex.vue +++ b/src/views/objective/targetindex.vue @@ -309,7 +309,7 @@ }], date: [{ required: true, - message: '请选择检查日期', + message: '请选择发现时间', trigger: 'blur' }], remark: [{ diff --git a/src/views/task/list/components/addPatrol copy.vue b/src/views/task/list/components/addPatrol copy.vue index d7a6d88..9e0f2f8 100644 --- a/src/views/task/list/components/addPatrol copy.vue +++ b/src/views/task/list/components/addPatrol copy.vue @@ -239,7 +239,7 @@ // }], date: [{ required: true, - message: '请选择检查日期' + message: '请选择发现时间' }], siteName: [{ required: true, diff --git a/src/views/task/list/components/addPatrol.vue b/src/views/task/list/components/addPatrol.vue index 6643769..1f443f2 100644 --- a/src/views/task/list/components/addPatrol.vue +++ b/src/views/task/list/components/addPatrol.vue @@ -2,7 +2,7 @@
-