diff --git a/src/pages.json b/src/pages.json
index dcd0dbd..d5b7cc5 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -320,12 +320,12 @@
"selectedIconPath": "static/images/tabbar/work_.png",
"text": "工作台"
},
- {
- "pagePath": "pages/health/statistic/index",
- "iconPath": "static/images/tabbar/statistic.png",
- "selectedIconPath": "static/images/tabbar/statistic_.png",
- "text": "统计分析"
- },
+ // {
+ // "pagePath": "pages/health/statistic/index",
+ // "iconPath": "static/images/tabbar/statistic.png",
+ // "selectedIconPath": "static/images/tabbar/statistic_.png",
+ // "text": "统计分析"
+ // },
{
"pagePath": "pages/mine",
"iconPath": "static/images/tabbar/mine.png",
diff --git a/src/pages/health/activity/addEdit.vue b/src/pages/health/activity/addEdit.vue
index 82b60e9..83f2a6a 100644
--- a/src/pages/health/activity/addEdit.vue
+++ b/src/pages/health/activity/addEdit.vue
@@ -32,7 +32,7 @@
-
+
@@ -116,7 +116,7 @@ const endTimeShow = ref(false)
const typeList = ref([])
const showType = ref(false)
-
+const flag = ref('add')
const activityVolumeList = ref([])
const showActivityVolume = ref(false)
@@ -147,7 +147,7 @@ rules: {
place: [{ required: true, message: '活动地点不能为空', trigger: ['change', 'blur'] }],
partner: [{ required: true, message: '成员不能为空', trigger: ['change', 'blur'] }],
startTime: [{ required: true, message: '开始时间不能为空', trigger: ['change', 'blur'] }],
- endTime: [{ required: true, message: '结束时间不能为空', trigger: ['change', 'blur'] }],
+ // endTime: [{ required: true, message: '结束时间不能为空', trigger: ['change', 'blur'] }],
activityVolumeName: [{ required: true, message: '活动量不能为空', trigger: ['change', 'blur'] }],
typeName: [{ required: true, message: '类型不能为空', trigger: ['change', 'blur'] }],
}
@@ -156,12 +156,17 @@ const { form, rules} = toRefs(data)
onLoad((option) => {
- form.value.id = option.id
- if(form.value.id!=null){
+ form.value.id = option.id
+ flag.value = option.flag
+ if(flag.value==null){
+ if(form.value.id!=null){
title.value="活动记录-修改"
}else{
title.value="活动记录-新增"
}
+ }else{
+ title.value="活动记录-复制"
+ }
getData()
})
onReady(() => {
@@ -258,6 +263,7 @@ function getData() {
function submit() {
proxy.$refs['uForm'].validate().then(() => {
if (form.value.id != null) {
+ if(flag.value==null){
updateActivity(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '修改成功', complete() {
@@ -265,6 +271,16 @@ function submit() {
}
})
})
+ }else {
+ form.value.id == null
+ addActivity(form.value).then(res => {
+ proxy.$refs['uToast'].show({
+ message: '新增成功', complete() {
+ uni.navigateTo({ url: `/pages/health/activity/list` })
+ }
+ })
+ })
+ }
}else {
addActivity(form.value).then(res => {
proxy.$refs['uToast'].show({
diff --git a/src/pages/health/activity/list.vue b/src/pages/health/activity/list.vue
index b398a87..5dd2438 100644
--- a/src/pages/health/activity/list.vue
+++ b/src/pages/health/activity/list.vue
@@ -63,6 +63,7 @@
修改
+ 复制
删除
@@ -165,6 +166,10 @@ function getList() {
uni.navigateTo({ url: `/pages/health/activity/addEdit?id=${item.id}` })
isShow.value = true
}
+ function handleCopy(item) {
+ uni.navigateTo({ url: `/pages/health/activity/addEdit?flag=copy&id=${item.id}` })
+ isShow.value = true
+ }
function handleAdd() {
uni.navigateTo({ url: `/pages/health/activity/addEdit` })
isShow.value = true
diff --git a/src/pages/health/doctorRecord/addEdit.vue b/src/pages/health/doctorRecord/addEdit.vue
index 0d25f28..b738f2a 100644
--- a/src/pages/health/doctorRecord/addEdit.vue
+++ b/src/pages/health/doctorRecord/addEdit.vue
@@ -114,7 +114,7 @@ const healthRecordList = ref([])
const personList = ref([])
const typeList = ref([])
const showType = ref(false)
-
+const flag = ref('add')
const data = reactive({
form: {
id: null,
@@ -163,12 +163,17 @@ const { form, queryPersonParams, queryHealthRecordParams, rules} = toRefs(data)
onLoad((option) => {
- form.value.id = option.id
- if(form.value.id!=null){
+ form.value.id = option.id
+ flag.value = option.flag
+ if(flag.value==null){
+ if(form.value.id!=null){
title.value="就医记录-修改"
}else{
title.value="就医记录-新增"
}
+ }else{
+ title.value="就医记录-复制"
+ }
getData()
})
onReady(() => {
@@ -304,13 +309,24 @@ function datePickConfirm(e) {
function submit() {
proxy.$refs['uForm'].validate().then(() => {
if (form.value.id != null) {
- updateDoctorRecord(form.value).then(res => {
+ if(flag.value==null){
+ updateDoctorRecord(res => {
proxy.$refs['uToast'].show({
message: '修改成功', complete() {
uni.navigateTo({ url: `/pages/health/doctorRecord/list` })
}
})
})
+ }else {
+ form.value.id == null
+ addDoctorRecord(form.value).then(res => {
+ proxy.$refs['uToast'].show({
+ message: '新增成功', complete() {
+ uni.navigateTo({ url: `/pages/health/doctorRecord/list` })
+ }
+ })
+ })
+ }
}else {
addDoctorRecord(form.value).then(res => {
proxy.$refs['uToast'].show({
diff --git a/src/pages/health/doctorRecord/list.vue b/src/pages/health/doctorRecord/list.vue
index 32676ea..3d1f1de 100644
--- a/src/pages/health/doctorRecord/list.vue
+++ b/src/pages/health/doctorRecord/list.vue
@@ -127,6 +127,7 @@
修改
+ 复制
删除
@@ -373,6 +374,10 @@ function settingCancel() {
uni.navigateTo({ url: `/pages/health/doctorRecord/addEdit?id=${item.id}` })
isShow.value = true
}
+ function handleCopy(item) {
+ uni.navigateTo({ url: `/pages/health/doctorRecord/addEdit?flag=copy&id=${item.id}` })
+ isShow.value = true
+ }
function handleAdd() {
uni.navigateTo({ url: `/pages/health/doctorRecord/addEdit` })
isShow.value = true
diff --git a/src/pages/health/index.vue b/src/pages/health/index.vue
index cd326c8..7e65c2e 100644
--- a/src/pages/health/index.vue
+++ b/src/pages/health/index.vue
@@ -28,6 +28,19 @@
+
+
+
+
+
+
+
+ {{ item.text }}
+
+
+
+
+
@@ -57,6 +70,13 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
{ path: '/pages/health/milkPowderRecord/list', text: '吃奶记录', icon: 'map-pin-ellipse', permission: 'health:milkPowderRecord:list' },
{ path: '/pages/health/statistic/milkPowderStatistic/index', text: '吃奶量统计', icon: 'spinner-cycle', permission: 'health:milkPowderStatistic:list' }
+ ])
+
+ const healthStaticGridList=ref([
+ { path: '/pages/health/statistic/healthStatistic/index', text: '档案统计', icon: 'map', permission: 'health:healthRecord:list' },
+ { path: '/pages/health/statistic/doctorStatistic/index', text: '就医统计', icon: 'person', permission: 'health:doctorRecord:list' },
+ { path: '/pages/health/statistic/marStatistic/index', text: '用药统计', icon: 'shop-filled', permission: 'health:marRecord:list' },
+ { path: '/pages/health/statistic/temperatureStatistic/index', text: '体温统计', icon: 'spinner-cycle', permission: 'health:temperatureRecord:list' }
])
function navigateTo(path) {
uni.navigateTo({