fix: 系统功能优化完善。
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<u--input v-model="form.startTime" disabled disabledColor="#ffffff" placeholder="请选择开始时间" inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="结束时间" prop="endTime" required @click="selectEndTime()">
|
||||
<u-form-item label="结束时间" prop="endTime" @click="selectEndTime()">
|
||||
<u--input v-model="form.endTime" disabled disabledColor="#ffffff" placeholder="请选择结束时间" inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
@@ -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({
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
</view>
|
||||
<view class="operate" >
|
||||
<view class="btn filling" @click="handleEdit(item)">修改</view>
|
||||
<view class="btn filling" @click="handleCopy(item)">复制</view>
|
||||
<view class="btn filling" @click="handleDelete(item)">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -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
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -127,6 +127,7 @@
|
||||
</view>
|
||||
<view class="operate" >
|
||||
<view class="btn filling" @click="handleEdit(item)">修改</view>
|
||||
<view class="btn filling" @click="handleCopy(item)">复制</view>
|
||||
<view class="btn filling" @click="handleDelete(item)">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -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
|
||||
|
||||
@@ -28,6 +28,19 @@
|
||||
</uni-grid>
|
||||
</view>
|
||||
|
||||
<!-- 宫格组件 -->
|
||||
<uni-section title="统计分析" v-show="auth.hasPermi('health:person:list')" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
<uni-grid :column="4" :showBorder="false">
|
||||
<uni-grid-item v-for="(item, index) in healthStaticGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons :type="item.icon" size="30"></uni-icons>
|
||||
<text class="text">{{ item.text }}</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user