fix: 健康管理系统,自测问题修复及功能优化完善。

This commit is contained in:
tianyongbao
2024-12-20 15:48:05 +08:00
parent 775ab0b222
commit 0f75162f6b
24 changed files with 3200 additions and 171 deletions

View File

@@ -5,13 +5,13 @@
<u-input v-model="queryParams.keys" border="false" type="select" @click="searchBlur" placeholder="请输入名称编码品牌厂家" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
<u-icon name="plus-circle-fill" v-show="auth.hasPermi('health:medicineBasic:add')" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx" v-show="auth.hasPermi('health:medicineBasic:add')">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择创建时间" suffixIcon="calendar"
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择录入日期" suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
@@ -25,7 +25,7 @@
<view v-for="item in typeList" :key="item.id" class="state-item"
:class="item.selected ? 'active' : ''" @click="selectType(item)">{{ item.dictLabel }}</view>
</view>
<view class="select-header">创建时间</view>
<view class="select-header">录入日期</view>
<view class="selcet-content" style="padding: 0 24rpx">
<u-input
:disabled="true"
@@ -61,7 +61,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -74,7 +74,7 @@
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-header" @click="enterDetails(item)">
<u--text lines="2" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
<u--text suffixIcon="arrow-right" lines="2" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.shortName +'-'+ item.brand +'('+ item.packaging+')' " size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<view class="item-row">
@@ -106,10 +106,14 @@
<text class="row-label">生产厂家</text>
<text class="row-value">{{ item.manufacturers }}</text>
</view>
<view class="item-row">
<text class="row-label">录入时间</text>
<text class="row-value">{{ item.createTime }}</text>
</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 class="btn filling" v-show="auth.hasPermi('health:medicineBasic:edit')" @click="handleEdit(item)">修改</view>
<view class="btn filling" v-show="auth.hasPermi('health:medicineBasic:edit')" @click="handleCopy(item)">复制</view>
<view class="btn filling" v-show="auth.hasPermi('health:medicineBasic:remove')" @click="handleDelete(item)">删除</view>
</view>
</view>
</u-list-item>
@@ -129,6 +133,7 @@ import { listMedicineBasic, delMedicineBasic } from '@/api/health/medicineBasic'
import { getDicts } from '@/api/system/dict/data.js'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
import dayjs from 'dayjs'
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";