dev
This commit is contained in:
parent
51f7c91735
commit
058d621733
|
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"11": {
|
||||
"name": "每天一次",
|
||||
"abbreviation": "qd"
|
||||
},
|
||||
"12": {
|
||||
"name": "每天二次",
|
||||
"abbreviation": "bid"
|
||||
},
|
||||
"13": {
|
||||
"name": "每天三次",
|
||||
"abbreviation": "tid"
|
||||
},
|
||||
"14": {
|
||||
"name": "每天四次",
|
||||
"abbreviation": "qid"
|
||||
},
|
||||
"21": {
|
||||
"name": "每周一次",
|
||||
"abbreviation": "qw"
|
||||
},
|
||||
"22": {
|
||||
"name": "每周二次",
|
||||
"abbreviation": "biw"
|
||||
},
|
||||
"23": {
|
||||
"name": "每周三次",
|
||||
"abbreviation": "tiw"
|
||||
},
|
||||
"31": {
|
||||
"name": "每小时一次",
|
||||
"abbreviation": "qh"
|
||||
},
|
||||
"32": {
|
||||
"name": "每2小时一次",
|
||||
"abbreviation": "q2h"
|
||||
},
|
||||
"33": {
|
||||
"name": "每4小时一次",
|
||||
"abbreviation": "q4h"
|
||||
},
|
||||
"34": {
|
||||
"name": "每5小时一次",
|
||||
"abbreviation": "q5h"
|
||||
},
|
||||
"35": {
|
||||
"name": "每6小时一次",
|
||||
"abbreviation": "q6h"
|
||||
},
|
||||
"36": {
|
||||
"name": "每8小时一次",
|
||||
"abbreviation": "q8h"
|
||||
},
|
||||
"37": {
|
||||
"name": "每12小时一次",
|
||||
"abbreviation": "q12h"
|
||||
},
|
||||
"41": {
|
||||
"name": "每晚一次",
|
||||
"abbreviation": "qn"
|
||||
},
|
||||
"42": {
|
||||
"name": "隔天一次",
|
||||
"abbreviation": "qod"
|
||||
},
|
||||
"43": {
|
||||
"name": "五天一次",
|
||||
"abbreviation": "q5d"
|
||||
},
|
||||
"44": {
|
||||
"name": "十天一次",
|
||||
"abbreviation": "q10d"
|
||||
},
|
||||
"51": {
|
||||
"name": "12小时维持",
|
||||
"abbreviation": ""
|
||||
},
|
||||
"52": {
|
||||
"name": "24小时维持",
|
||||
"abbreviation": ""
|
||||
},
|
||||
"61": {
|
||||
"name": "立即",
|
||||
"abbreviation": "st"
|
||||
},
|
||||
"62": {
|
||||
"name": "必要时使用",
|
||||
"abbreviation": "prn"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<panel title="药品耗材">
|
||||
<div class="panel-content" style="padding: 0 24px 24px">
|
||||
<el-table v-if="goodsDetail.length>0" :data="goodsDetail" max-height="300" style="width: 100%"
|
||||
<el-table v-if="goodsDetail.length>0" :data="goodsDetail" max-height="300"
|
||||
:header-cell-style="{ backgroundColor: '#F5FAFF' }">
|
||||
<el-table-column prop="name" label="名称" width="400" :show-overflow-tooltip="showTooltip">
|
||||
<el-table-column prop="name" label="名称" width="300" :show-overflow-tooltip="showTooltip">
|
||||
<template #default="scope">
|
||||
<el-popover
|
||||
v-if="!showTooltip"
|
||||
|
|
@ -43,12 +43,17 @@
|
|||
<span v-else>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用方法" width="200">
|
||||
<template #default="scope">
|
||||
<Usage v-model="usage"></Usage>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="selectedPrice" label="单价" width="200">
|
||||
<!-- <el-table-column label="使用方法" width="170">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <Usage v-model="scope.row.usage"></Usage>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="selectedUnit" label="频率" width="200">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <Frequency v-model="scope.row.frequency"></Frequency>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="selectedPrice" label="单价">
|
||||
<template #default="scope">
|
||||
¥{{ scope.row.selectedPrice }}
|
||||
</template>
|
||||
|
|
@ -123,6 +128,7 @@ import {ElMessage} from "element-plus";
|
|||
import {Delete} from "@element-plus/icons-vue";
|
||||
import Usage from "./goodsDetail/Usage.vue"
|
||||
import {API} from "@/assets/config/API.ts";
|
||||
import Frequency from "@/components/common/goods/goodsDetail/Frequency.vue";
|
||||
|
||||
const props = defineProps({
|
||||
status: {
|
||||
|
|
@ -251,7 +257,7 @@ const colosInfo = () => {
|
|||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table__cell) {
|
||||
padding: 0 4px;
|
||||
padding: 0;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
<script setup lang="ts">
|
||||
import usedFrqu from "@/assets/config/directory/usedFrqu.json"
|
||||
const frequency = defineModel<string>() // 根据实际类型调整
|
||||
const change = (e:any) => {
|
||||
console.log(e,'e')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-select
|
||||
class="native-select"
|
||||
v-model="frequency"
|
||||
@change="change"
|
||||
|
||||
>
|
||||
<el-option
|
||||
style="width: 200px"
|
||||
v-for="(item, index) in Object.entries(usedFrqu)"
|
||||
:key="index"
|
||||
:label="item[1].name"
|
||||
:value="item[0]"
|
||||
>
|
||||
<span style="float: left">{{ item[1].abbreviation }}</span>
|
||||
<span
|
||||
style="
|
||||
float: right;
|
||||
color: var(--el-text-color-secondary);
|
||||
font-size: 13px;
|
||||
"
|
||||
>
|
||||
{{ item[1].name }}
|
||||
</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
|
|
@ -20,13 +20,12 @@ const handlerBlur = () => {
|
|||
<template>
|
||||
<el-popover
|
||||
:visible="isVisible"
|
||||
placement="bottom"
|
||||
title=""
|
||||
:width="200"
|
||||
trigger="click"
|
||||
style="height: 100%"
|
||||
>
|
||||
<template #reference>
|
||||
<el-input v-model="usage" placeholder="使用方法" @focus="focus" @blur="handlerBlur"></el-input>
|
||||
<el-input v-model="usage" @input="focus" @focus="focus" @blur="handlerBlur"></el-input>
|
||||
</template>
|
||||
<div class="box">
|
||||
<div class="item-list">
|
||||
|
|
@ -36,7 +35,6 @@ const handlerBlur = () => {
|
|||
</div>
|
||||
</div>
|
||||
</el-popover>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
@ -78,10 +76,12 @@ const handlerBlur = () => {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
.active {
|
||||
background: #4d6de4 !important;
|
||||
color: #fff !important;
|
||||
:deep(.el-input__wrapper){
|
||||
height: 100%;
|
||||
border-radius: 0;
|
||||
}
|
||||
:deep(.el-input__wrapper.is-focus){
|
||||
box-shadow: none;
|
||||
border: 1px solid #4d6de4;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
<template>
|
||||
<Mask :width="400" :height="400" :is-show="show">
|
||||
<CloseBtn @click="close"></CloseBtn>
|
||||
<el-card>
|
||||
<template #header>
|
||||
<span>添加用户</span>
|
||||
</template>
|
||||
<div>
|
||||
<el-form
|
||||
:model="userInfo"
|
||||
ref="formDataRef"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="userInfo.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名" prop="username">
|
||||
<el-input v-model="userInfo.username"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码" prop="password">
|
||||
<el-input v-model="userInfo.password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员类型" prop="type">
|
||||
<el-select v-model="userInfo.type">
|
||||
<el-option
|
||||
v-for="item in personType"
|
||||
:key="item.key"
|
||||
:label="item.value"
|
||||
:value="item.key"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
<el-button @click="close">取消</el-button>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</Mask>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import Mask from "@/components/Mask.vue";
|
||||
import {type PropType, ref} from "vue";
|
||||
import CloseBtn from "@/components/CloseBtn.vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
|
||||
const props = defineProps({
|
||||
saveCallback: {
|
||||
type: Function as PropType<(args?: any) => void>,
|
||||
default: () => {}
|
||||
}
|
||||
})
|
||||
const personType = ref<any>([
|
||||
{
|
||||
key: "0",
|
||||
value: "普通用户",
|
||||
},
|
||||
{
|
||||
key: "1",
|
||||
value: "管理员",
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
value: "医师",
|
||||
}
|
||||
]);
|
||||
const show = ref<boolean>(false);
|
||||
const userInfo = ref<any>({})
|
||||
const formDataRef = ref();
|
||||
const open = () => {
|
||||
show.value = true;
|
||||
};
|
||||
const close = () => {
|
||||
show.value = false;
|
||||
props.saveCallback();
|
||||
};
|
||||
defineExpose({open})
|
||||
|
||||
const rules = {
|
||||
name: [
|
||||
{required: true, message: "请输入姓名", trigger: 'blur'}
|
||||
],
|
||||
username: [
|
||||
{required: true, message: "请输入用户名", trigger: 'blur'}
|
||||
],
|
||||
password: [
|
||||
{required: true, message: "请输入密码", trigger: 'blur'}
|
||||
],
|
||||
type: [
|
||||
{required: true, message: "请输入人员类型", trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
const save = () => {
|
||||
formDataRef.value?.validate((valid: boolean) => {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// 如果验证通过,发送请求
|
||||
post(API."setting/user/save", {userInfo: userInfo.value}).then((res: any) => {
|
||||
formDataRef.value?.resetFields();
|
||||
close()
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
Loading…
Reference in New Issue