dev
This commit is contained in:
parent
5caab6347d
commit
bdb62f0399
|
|
@ -1,14 +1,12 @@
|
|||
|
||||
|
||||
<template>
|
||||
<el-popover placement="bottom-start" trigger="click" :width="props.width" >
|
||||
<el-popover placement="bottom-start" trigger="click" :width="props.width">
|
||||
<template #reference>
|
||||
<el-input v-model="input" :style="{'width': props.width+'px'}" clearable></el-input>
|
||||
<el-input v-model="input" :style="{'width': props.width+'px'}" clearable :disabled="disabled"></el-input>
|
||||
</template>
|
||||
<div class="code-popo" v-if="props.list.length > 0">
|
||||
<div class="code-item" v-for="item in props.list" >
|
||||
<div class="code-item" v-for="item in props.list">
|
||||
<div class="code-item-name" v-for="subItem in item" @click="inputStr(subItem)">
|
||||
{{subItem}}
|
||||
{{ subItem }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -16,6 +14,7 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import {ref} from "vue";
|
||||
|
||||
const input = defineModel<string | null>();
|
||||
const props = defineProps({
|
||||
list: {
|
||||
|
|
@ -25,35 +24,43 @@ const props = defineProps({
|
|||
width: {
|
||||
type: Number,
|
||||
default: 1000
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
const inputStr = (str: string) => {
|
||||
let strList = input.value?input.value.split(","):[];
|
||||
let strList = input.value ? input.value.split(",") : [];
|
||||
strList.push(str);
|
||||
input.value = strList.join(",");
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.code-popo{
|
||||
.code-popo {
|
||||
width: 100%;
|
||||
.code-item{
|
||||
|
||||
.code-item {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 5px 0;
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
.code-item-name{
|
||||
|
||||
.code-item-name {
|
||||
float: left;
|
||||
font-size: 16px;
|
||||
box-sizing: border-box;
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
&:hover{
|
||||
|
||||
&:hover {
|
||||
color: #000;
|
||||
}
|
||||
&:after{
|
||||
|
||||
&:after {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
clearable
|
||||
@input="changeInput"
|
||||
class="no-border-input"
|
||||
:disabled="disabled"
|
||||
>
|
||||
</el-input>
|
||||
</template>
|
||||
|
|
@ -63,6 +64,10 @@ const props = defineProps({
|
|||
placeholder: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ const {
|
|||
|
||||
_isShow.value = isShow == null ? false : isShow;
|
||||
_showFooter.value = showFooter == null ? false : showFooter;
|
||||
_width.value = width == null ? 1200 : width;
|
||||
_height.value = height == null ? 800 : height;
|
||||
_width.value = width == null ? 1200 : Number(width);
|
||||
_height.value = height == null ? 800 : Number(height);
|
||||
_close.value = close == null ? true : close;
|
||||
|
||||
watch(() => isShow, (newVal) => {
|
||||
|
|
@ -45,9 +45,7 @@ const closeBtn = () => {
|
|||
</div>
|
||||
</div>
|
||||
<div class="content" >
|
||||
<el-scrollbar style="height:100%;margin-top: 0">
|
||||
<slot></slot>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="footer" v-if="_showFooter">
|
||||
<slot name="footer"></slot>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<template>
|
||||
<Mask :is-show="isShow" :height="900" @close="exit" title="新增" :show-footer="true">
|
||||
<template #default>
|
||||
<el-scrollbar>
|
||||
<div class="header">
|
||||
<el-button type="primary" style="margin-top: 10px" round class="btn" @click="openCreateSearch" v-if="_type!=0"
|
||||
plain>
|
||||
|
|
@ -115,7 +117,8 @@
|
|||
<el-descriptions-item label="最小包装数量|单位">
|
||||
<el-form-item>
|
||||
<div class="unit-item">
|
||||
<el-input ref="minPackagingRef" v-model="edit_data.minPackagingNumber" type="number" class="input"
|
||||
<el-input ref="minPackagingRef" v-model="edit_data.minPackagingNumber" type="number"
|
||||
class="input"
|
||||
style="width: 200px;">
|
||||
</el-input>
|
||||
<el-popover
|
||||
|
|
@ -170,7 +173,10 @@
|
|||
id="code-pop"
|
||||
class="code-popo"
|
||||
>
|
||||
<div style="color: #6c6b6b;font-size: 12px">已关联({{ idCodeList ? idCodeList.length : 0 }})</div>
|
||||
<div style="color: #6c6b6b;font-size: 12px">已关联({{
|
||||
idCodeList ? idCodeList.length : 0
|
||||
}})
|
||||
</div>
|
||||
<Divider/>
|
||||
<div class="item">
|
||||
<div v-for="(item,index) in idCodeList" :key="index">
|
||||
|
|
@ -341,6 +347,9 @@
|
|||
</el-aside>
|
||||
</el-container>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
|
||||
<template #footer>
|
||||
<div class="footer">
|
||||
<el-button @click="returnInit" type="primary" v-if="edit_data.id != null">医保库存重新初始化</el-button>
|
||||
|
|
|
|||
|
|
@ -15,10 +15,11 @@
|
|||
<div class="container">
|
||||
<el-form :model="formDate" label-width="auto" ref="formRef">
|
||||
<el-form-item label="主诉">
|
||||
<PopoverInput v-model="formDate.mainAppeal" :list="mainAppealList"/>
|
||||
<PopoverInput :disabled="disabled" v-model="formDate.mainAppeal" :list="mainAppealList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊断">
|
||||
<DiagnosisSearchInput
|
||||
:disabled="disabled"
|
||||
:request-api="diagnosisSearchApi"
|
||||
:show-config="diagnosisShowConfig"
|
||||
@selectedCallBack="diagnosisSelect"
|
||||
|
|
@ -26,31 +27,31 @@
|
|||
</DiagnosisSearchInput>
|
||||
</el-form-item>
|
||||
<el-form-item label="现病史">
|
||||
<PopoverInput v-model="formDate.nowMedicalHistory" :list="nowMedicalHistoryList"/>
|
||||
<PopoverInput :disabled="disabled" v-model="formDate.nowMedicalHistory" :list="nowMedicalHistoryList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="既往史">
|
||||
<PopoverInput v-model="formDate.beforeMedicalHistory" :list="beforeMedicalHistoryList"/>
|
||||
<PopoverInput :disabled="disabled" v-model="formDate.beforeMedicalHistory" :list="beforeMedicalHistoryList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="过敏史">
|
||||
<PopoverInput v-model="formDate.allergyHistory" :list="allergyHistoryList"/>
|
||||
<PopoverInput :disabled="disabled" v-model="formDate.allergyHistory" :list="allergyHistoryList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="体格检查">
|
||||
<PhysiqueExamInuput v-model="formDate.exam" :list="physiqueExamList"/>
|
||||
<PhysiqueExamInuput :disabled="disabled" v-model="formDate.exam" :list="physiqueExamList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="望闻问切" v-if="modelType==1">
|
||||
<PopoverInput v-model="formDate.chinaAdjunctCheck" :list="chinaAdjunctCheckList"/>
|
||||
<PopoverInput :disabled="disabled" v-model="formDate.chinaAdjunctCheck" :list="chinaAdjunctCheckList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="治法" v-if="modelType==1">
|
||||
<el-input v-model="formDate.chinaDeal"></el-input>
|
||||
<el-input v-model="formDate.chinaDeal" :disabled="disabled"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="口腔检查" v-if="modelType==2">
|
||||
<el-input v-model="formDate.mouthCheck"></el-input>
|
||||
<el-input :disabled="disabled" v-model="formDate.mouthCheck"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="辅助检查" v-if="modelType==2 || modelType ==0">
|
||||
<el-input v-model="formDate.adjunctCheck"></el-input>
|
||||
<el-input :disabled="disabled" v-model="formDate.adjunctCheck"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="处置" v-if="modelType==0 || modelType ==2">
|
||||
<el-input v-model="formDate.deal"></el-input>
|
||||
<el-input :disabled="disabled" v-model="formDate.deal"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
|
@ -58,7 +59,7 @@
|
|||
</Panel>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {ref} from "vue";
|
||||
import {computed, ref} from "vue";
|
||||
import {
|
||||
mainAppealList,
|
||||
nowMedicalHistoryList,
|
||||
|
|
@ -71,6 +72,17 @@ import PopoverInput from "@/components/PopoverInput.vue";
|
|||
import DiagnosisSearchInput from "@/components/outpatient/DiagnosisSearchInput.vue";
|
||||
import PhysiqueExamInuput from "@/components/outpatient/PhysiqueExamInuput.vue";
|
||||
|
||||
const props = defineProps({
|
||||
status: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
})
|
||||
const disabled = computed(() => {
|
||||
if(props.status === 1){
|
||||
return true
|
||||
}
|
||||
})
|
||||
const formDate = defineModel<any>();
|
||||
const modelType = ref(0)
|
||||
|
||||
|
|
@ -95,6 +107,7 @@ const diagnosisSelect = (list: any) => {
|
|||
formDate.value.diagnosisDetail = JSON.stringify(list)
|
||||
formDate.value.diagnosisSummary = diagnosisNames
|
||||
}
|
||||
defineExpose({diagnosisSelect})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<template>
|
||||
<el-popover placement="bottom-start" trigger="click" :width="props.width" ref="popoverRef" @before-enter="beforeShow">
|
||||
<template #reference>
|
||||
<el-input v-model="keyword" :style="{'width': props.width+'px'}" @input="changeInput" placeholder="诊断选择"></el-input>
|
||||
<el-input v-model="keyword" :style="{'width': props.width+'px'}" @input="changeInput" :disabled="disabled"
|
||||
placeholder="诊断选择"></el-input>
|
||||
</template>
|
||||
<div class="container" v-if="searchList.length > 0">
|
||||
<el-table :data="searchList" style="width: 100%" @row-click="clickRow" :show-header="props.showHeader"
|
||||
|
|
@ -16,7 +17,7 @@
|
|||
import {ref, watch} from "vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
|
||||
const keyword =ref("");
|
||||
const keyword = ref("");
|
||||
const popoverRef = ref();
|
||||
|
||||
interface showConfig {
|
||||
|
|
@ -40,6 +41,10 @@ const props = defineProps({
|
|||
showHeader: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -84,14 +89,13 @@ const beforeShow = () => {
|
|||
}
|
||||
const selectList = ref<any>()
|
||||
const nameList = ref<any>([]);
|
||||
watch(selectList, (newVal,oldVal ) => {
|
||||
emit('selectedCallBack',newVal)
|
||||
},{deep:true});
|
||||
const init = (list:any,nList:any) => {
|
||||
watch(selectList, (newVal, oldVal) => {
|
||||
emit('selectedCallBack', newVal)
|
||||
}, {deep: true});
|
||||
const init = (list: any, nList: any) => {
|
||||
selectList.value = list;
|
||||
nameList.value = nList;
|
||||
keyword.value = nameList.value.join(",") + ","
|
||||
|
||||
}
|
||||
defineExpose({init})
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
<template>
|
||||
<div class="disease-detail">
|
||||
<div class="top">
|
||||
<span>复制全部医嘱</span>
|
||||
<span>复制病例</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="content-title">
|
||||
<div class="name">病例</div>
|
||||
<button class="btn">复制</button>
|
||||
<button class="btn" @click="copy">复制</button>
|
||||
</div>
|
||||
<div class="content-middle">
|
||||
<p>主诉:{{ detailObj.diagnosisMedicalRecord.mainAppeal }}</p>
|
||||
|
|
@ -16,21 +12,28 @@
|
|||
<p>体查:{{ detailObj.diagnosisMedicalRecord.exam }}</p>
|
||||
<p>复查:{{ detailObj.diagnosisMedicalRecord.allergy }}</p>
|
||||
<p>过敏:{{ detailObj.diagnosisMedicalRecord.allergyHistory }}</p>
|
||||
<p>诊断:{{ detailObj.diagnosisMedicalRecord.pastMedicalHistory }}</p>
|
||||
<p>诊断:{{ detailObj.diagnosisMedicalRecord.diagnosisSummary}}</p>
|
||||
<p>处置:{{ detailObj.diagnosisMedicalRecord.treatment }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="content-title">
|
||||
<div class="name">服务项目</div>
|
||||
<button class="btn">复制</button>
|
||||
<button class="btn" @click="copyItem">复制</button>
|
||||
</div>
|
||||
<div class="content-middle">
|
||||
<div class="item" v-for="item in detailObj.itemDetail">
|
||||
<div class="name">{{item.name}}</div>
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
:content="item.itemName"
|
||||
placement="bottom-start"
|
||||
>
|
||||
<div class="name">{{ item.itemName }}</div>
|
||||
</el-tooltip>
|
||||
<div class="price">
|
||||
<div class="price-left">{{item.unit}}</div>
|
||||
<div class="price-right">¥{{item.unitPrice}}</div>
|
||||
<div class="price-left">{{ item.selectedNum || 0 }}{{ item.selectedUnit }}</div>
|
||||
<div class="price-right">¥{{ item.unitPrice }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -38,14 +41,21 @@
|
|||
<div class="content">
|
||||
<div class="content-title">
|
||||
<div class="name">药品耗材</div>
|
||||
<button class="btn">复制</button>
|
||||
<button class="btn" @click="copyGoods">复制</button>
|
||||
</div>
|
||||
<div class="content-middle">
|
||||
<div class="item" v-for="item in detailObj.goodsDetail">
|
||||
<div class="name">{{item.name}}</div>
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
:content="item.name"
|
||||
placement="bottom-start"
|
||||
>
|
||||
<div class="name">{{ item.name }}</div>
|
||||
</el-tooltip>
|
||||
<div class="price">
|
||||
<div class="price-left">{{ item.selectedNum || 0 }}{{ item.selectedUnit }}</div>
|
||||
<div class="price-right">¥{{item.selectedPrice}}</div>
|
||||
<div class="price-right">¥{{ item.selectedPrice }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -55,7 +65,7 @@
|
|||
<div class="item">
|
||||
<div class="name">合计</div>
|
||||
<div class="price">
|
||||
<div class="price-right">¥{{sumPrice}}</div>
|
||||
<div class="price-right">¥{{ sumPrice }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -68,12 +78,22 @@ import {ref, defineProps, onMounted} from 'vue'
|
|||
const {detail} = defineProps(['detail']);
|
||||
const detailObj = ref<any>(detail)
|
||||
const sumPrice = ref(0)
|
||||
onMounted(()=>{
|
||||
const emit = defineEmits(['copy', 'copyItem', 'copyGoods'])
|
||||
const copy = () => {
|
||||
emit('copy', detailObj.value)
|
||||
}
|
||||
const copyItem = () => {
|
||||
emit('copyItem', detailObj.value)
|
||||
}
|
||||
const copyGoods = () => {
|
||||
emit('copyGoods', detailObj.value)
|
||||
}
|
||||
onMounted(() => {
|
||||
const pharmaceuticalTotalAmount = detailObj.value.itemDetail.reduce((pre: any, cur: any) => {
|
||||
return pre + cur.unitPrice
|
||||
return pre + cur.selectedNum * cur.selectedPrice
|
||||
}, 0);
|
||||
|
||||
const serviceTotalAmount =detailObj.value.goodsDetail.reduce((pre: any, cur: any) => {
|
||||
const serviceTotalAmount = detailObj.value.goodsDetail.reduce((pre: any, cur: any) => {
|
||||
return pre + cur.selectedNum * cur.selectedPrice
|
||||
}, 0);
|
||||
sumPrice.value = pharmaceuticalTotalAmount + serviceTotalAmount;
|
||||
|
|
@ -114,7 +134,6 @@ onMounted(()=>{
|
|||
.name {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.btn {
|
||||
|
|
@ -139,9 +158,17 @@ onMounted(()=>{
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
.price{
|
||||
.name{
|
||||
white-space: nowrap; /* 防止文本换行 */
|
||||
overflow: hidden; /* 隐藏溢出的文本 */
|
||||
text-overflow: ellipsis; /* 显示省略号 */
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.price {
|
||||
display: flex;
|
||||
.price-left{
|
||||
|
||||
.price-left {
|
||||
margin-right: 38px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<div>
|
||||
<DiseaseDetails :detail="item"></DiseaseDetails>
|
||||
<DiseaseDetails :detail="item" @copy="copy" @copyItem="copyItem" @copyGoods="copyGoods"></DiseaseDetails>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
|
|
@ -41,6 +41,16 @@ const init = (patientId: any) => {
|
|||
const clearList = () => {
|
||||
list.value = []
|
||||
}
|
||||
const emit = defineEmits(['copy','copyItem','copyGoods'])
|
||||
const copy = (item: any) => {
|
||||
emit('copy', item)
|
||||
}
|
||||
const copyItem = (item: any) => {
|
||||
emit('copyItem', item)
|
||||
}
|
||||
const copyGoods = (item: any) => {
|
||||
emit('copyGoods', item)
|
||||
}
|
||||
defineExpose({init,clearList})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ import Panel from "@/components/common/Panel.vue";
|
|||
import {post} from "@/utils/request.ts";
|
||||
import {formatTime} from "@/utils/dateUtils.ts";
|
||||
import {apiConfig} from "@/assets/config/apiConfig.ts";
|
||||
import {ElMessageBox} from "element-plus";
|
||||
|
||||
const props = defineProps({
|
||||
status: {
|
||||
|
|
@ -82,7 +83,9 @@ const statusList = ref<any>([
|
|||
num: 0
|
||||
}
|
||||
])
|
||||
const itemId=defineModel()
|
||||
onMounted(() => {
|
||||
curItem.value = itemId
|
||||
initStatusList()
|
||||
init()
|
||||
})
|
||||
|
|
@ -126,8 +129,8 @@ const clickLi = (item: any) => {
|
|||
curItem.value = item
|
||||
emit('getId', item)
|
||||
}
|
||||
|
||||
watch(() => props.status, () => {
|
||||
curItem.value = ''
|
||||
initStatusList()
|
||||
init() // 重新初始化数据
|
||||
})
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
:show-config="itemShowConfig"
|
||||
@selectedCallBack="itemSelect"
|
||||
:placeholder="'请输入药材名称'"
|
||||
:disabled="disabled"
|
||||
>
|
||||
</SearchInput>
|
||||
</div>
|
||||
|
|
@ -51,9 +52,19 @@
|
|||
import Panel from "@/components/common/Panel.vue";
|
||||
import SearchInput from "@/components/SearchInput.vue";
|
||||
import {CircleClose} from "@element-plus/icons-vue";
|
||||
import {watch,ref} from "vue";
|
||||
|
||||
import {watch, ref, computed} from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
status: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
})
|
||||
const disabled=computed(()=>{
|
||||
if(props.status === 1){
|
||||
return true
|
||||
}
|
||||
})
|
||||
const itemSearchApi = "goods/goods/search";
|
||||
const itemShowConfig = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<el-popover placement="bottom-start" trigger="click" :width="props.width">
|
||||
<template #reference>
|
||||
<el-input v-model="input" :style="{'width': props.width+'px'}" clearable></el-input>
|
||||
<el-input v-model="input" :style="{'width': props.width+'px'}" clearable :disabled="disabled"></el-input>
|
||||
</template>
|
||||
<el-tabs v-model="tabName" class="demo-tabs">
|
||||
<el-tab-pane v-for="item in props.list" :label="item.name" :name="item.name">
|
||||
|
|
@ -41,6 +41,10 @@ const props = defineProps({
|
|||
width: {
|
||||
type: Number,
|
||||
default: 1000
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
:show-config="serviceShowConfig"
|
||||
@selectedCallBack="serviceSelect"
|
||||
:placeholder="'请输入项目名称'"
|
||||
:disabled="disabled"
|
||||
>
|
||||
</SearchInput>
|
||||
</div>
|
||||
|
|
@ -35,10 +36,22 @@
|
|||
</Panel>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {defineModel, computed} from "vue";
|
||||
import Panel from "@/components/common/Panel.vue";
|
||||
import {CircleClose} from '@element-plus/icons-vue'
|
||||
import SearchInput from "@/components/SearchInput.vue";
|
||||
|
||||
const props=defineProps({
|
||||
status: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
})
|
||||
const disabled = computed(() => {
|
||||
if(props.status === 1){
|
||||
return true
|
||||
}
|
||||
})
|
||||
const serviceSearchApi = "item/search";
|
||||
const serviceShowConfig = [
|
||||
{
|
||||
|
|
@ -63,6 +76,7 @@ const list = defineModel<any[]>({default: () => []});
|
|||
const deleteItem = (id: any) => {
|
||||
list.value = list.value.filter((item) => item.id !== id);
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,111 @@
|
|||
<template>
|
||||
<Mask :top="100" :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) {
|
||||
console.log("表单验证失败");
|
||||
return;
|
||||
}
|
||||
// 如果验证通过,发送请求
|
||||
post("setting/user/save", {userInfo: userInfo.value}).then((res: any) => {
|
||||
formDataRef.value?.resetFields();
|
||||
close()
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
<template>
|
||||
<CloseBtn @click="close"></CloseBtn>
|
||||
<el-form
|
||||
:model="form"
|
||||
>
|
||||
<el-descriptions
|
||||
:column="3"
|
||||
border
|
||||
title="详情"
|
||||
direction="vertical"
|
||||
label-width="20"
|
||||
>
|
||||
<el-descriptions-item label="名称">
|
||||
<div>{{ form.name }}</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="编码">
|
||||
<div>{{ form.code }}</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
<div>{{ form.status }}</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">
|
||||
<div>{{ form.create_time }}</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
<div>{{ form.status }}</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">
|
||||
<div>{{ form.create_time }}</div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {reactive,defineEmits} from "vue";
|
||||
import {ElDescriptionsItem} from "element-plus";
|
||||
import CloseBtn from "@/components/CloseBtn.vue";
|
||||
|
||||
const form= reactive({
|
||||
name: '1',
|
||||
code: '2',
|
||||
status: '3',
|
||||
create_time: '4',
|
||||
})
|
||||
const emit = defineEmits(['close'])
|
||||
const close = () => {
|
||||
emit('close')
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
|
|
@ -1,15 +1,18 @@
|
|||
<template>
|
||||
<Mask :is-show="isShow" @close="close" :title="props.id?'项目编辑':'项目新增'" :show-footer="true">
|
||||
<div style="padding: 24px">
|
||||
<Mask :is-show="isShow" width="400" height="550" @close="close" :title="props.id?'项目编辑':'项目新增'"
|
||||
:show-footer="true">
|
||||
<template #default>
|
||||
<el-scrollbar>
|
||||
<div style="padding: 0 24px">
|
||||
<div class="header" style="width: 100%;display: flex;justify-content: center;margin-bottom: 10px">
|
||||
<el-button type="primary" style="margin-top:10px" round class="btn" @click="openCreateSearch"
|
||||
plain>
|
||||
一键建档
|
||||
</el-button>
|
||||
</div>
|
||||
<el-form :model="form" label-width="auto">
|
||||
<el-form :model="form" label-width="auto" :rules="formRules">
|
||||
<el-descriptions
|
||||
:column="3"
|
||||
:column="2"
|
||||
direction="vertical"
|
||||
border
|
||||
>
|
||||
|
|
@ -19,38 +22,38 @@
|
|||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="单位">
|
||||
<el-form-item>
|
||||
<el-form-item prop="unit">
|
||||
<el-input v-model.number="form.unit" min="0">
|
||||
<template #append>次</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="原价">
|
||||
<el-form-item>
|
||||
<el-input v-model="form.purchaseUnitPrice">
|
||||
<template #prefix>
|
||||
¥
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="售价">
|
||||
<el-form-item>
|
||||
<el-input v-model="form.unitPrice">
|
||||
<template #prefix>¥</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="医保码">
|
||||
<el-form-item>
|
||||
<el-input v-model="form.itemSocialCode"/>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="原价">
|
||||
<el-form-item>
|
||||
<el-input v-model="form.purchaseUnitPrice">
|
||||
<template #append>
|
||||
<el-button text @click="imageURL">¥</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="售价">
|
||||
<el-form-item>
|
||||
<el-input v-model="form.unitPrice">
|
||||
<template #append>
|
||||
<el-button type="text" @click="imageURL">¥</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<el-button type="primary" @click="save()">保存</el-button>
|
||||
|
|
@ -155,11 +158,21 @@ onMounted(() => {
|
|||
const init = () => {
|
||||
isShow.value = true
|
||||
if (props.id) {
|
||||
post("item/getItemById", {id:props.id}).then((res: any) => {
|
||||
post("item/getItemById", {id: props.id}).then((res: any) => {
|
||||
form.value = res
|
||||
form.value.unit = Number(res.unit)
|
||||
})
|
||||
}
|
||||
}
|
||||
const formRules = {
|
||||
itemName: [
|
||||
{required: true, message: '请输入项目名称', trigger: 'blur'},
|
||||
],
|
||||
unit: [
|
||||
{required: true, message: '请输入单位', trigger: 'blur'},
|
||||
{type: 'number', message: '单位必须为数字值'}
|
||||
],
|
||||
}
|
||||
defineExpose({init})
|
||||
</script>
|
||||
<style scoped>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<Mask :is-show="isShow" @close="exit" :width="800" :height="600" title="成员管理" :show-footer="true">
|
||||
<el-scrollbar>
|
||||
<div style="padding: 24px">
|
||||
<el-form :model="userInfo" label-width="auto" :rules="rules" ref="ruleFormRef" style="width: 100%;height: 100%">
|
||||
<el-descriptions
|
||||
|
|
@ -117,6 +118,7 @@
|
|||
</el-descriptions>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<el-button type="primary" @click="save()">保存</el-button>
|
||||
|
|
@ -267,7 +269,7 @@ const deleteDetail = () => {
|
|||
}
|
||||
const init = () => {
|
||||
isShow.value = true
|
||||
if(props.id){
|
||||
if (props.id) {
|
||||
getById()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<Mask :width="800" :height="600" :is-show="show" :top="100" @close="close" title="药品" :show-footer="true">
|
||||
<div class="search_content_wrapper">
|
||||
<div class="search_content_wrapper" style="padding: 24px">
|
||||
<div class="search_wrapper">
|
||||
<span>项目名称:</span>
|
||||
<el-input
|
||||
|
|
@ -8,8 +8,9 @@
|
|||
v-model="keyword"
|
||||
placeholder="请输入药品名称或者编号"
|
||||
@keydown.enter="search_social"
|
||||
clearable/>
|
||||
<button @click="search_social">搜索</button>
|
||||
clearable
|
||||
/>
|
||||
<el-button type="primary" @click="search_social">搜索</el-button>
|
||||
</div>
|
||||
<div class="search_result">
|
||||
|
||||
|
|
@ -86,14 +87,16 @@ let change_page = (page: number) => {
|
|||
// })
|
||||
const change_current_search_data_index = (val: any) => {
|
||||
current_search_data = JSON.parse(JSON.stringify(val));
|
||||
console.log(current_search_data.id)
|
||||
// console.log(current_search_data.id)
|
||||
// proos.changeData(current_search_data)
|
||||
}
|
||||
const init = (_name: string) => {
|
||||
keyword.value = _name;
|
||||
show.value = true;
|
||||
// init_search_data()
|
||||
// search_social()
|
||||
if(_name != ''){
|
||||
init_search_data()
|
||||
search_social()
|
||||
}
|
||||
};
|
||||
defineExpose({init});
|
||||
|
||||
|
|
@ -108,7 +111,7 @@ function init_search_data() {
|
|||
}
|
||||
|
||||
let confirm = () => {
|
||||
let jsondata = current_search_data.json;
|
||||
let jsondata = current_search_data;
|
||||
let data = {
|
||||
id: null,
|
||||
type: null,
|
||||
|
|
@ -130,13 +133,10 @@ let confirm = () => {
|
|||
regType: jsondata.reg_type,
|
||||
approvalNumber: jsondata.approval_number,
|
||||
category: jsondata.category
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
console.log("data", data)
|
||||
emit('confirm', data)
|
||||
show.value = false;
|
||||
close()
|
||||
|
||||
}
|
||||
let isloading = ref(false);
|
||||
|
|
@ -172,6 +172,7 @@ let search_social = () => {
|
|||
}
|
||||
const close = () => {
|
||||
show.value = false;
|
||||
// search_result.value = {}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
@ -185,11 +186,8 @@ const close = () => {
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
margin: auto;
|
||||
margin-top: 24px;
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.search_wrapper {
|
||||
|
|
@ -232,11 +230,15 @@ const close = () => {
|
|||
width: 100%;
|
||||
height: 400px;
|
||||
}
|
||||
.bottom{
|
||||
|
||||
.bottom {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 24px;
|
||||
}
|
||||
:deep(.el-input__wrapper){
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<template>
|
||||
<Mask :is-show="isShow" @close="exit" :height="570" :title="props.id?'编辑':'新增'" :show-footer="true">
|
||||
<template #default>
|
||||
<el-scrollbar>
|
||||
<div style="padding: 24px">
|
||||
<el-form :model="form" label-width="auto">
|
||||
<el-descriptions
|
||||
|
|
@ -109,6 +111,8 @@
|
|||
</el-descriptions>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div class="bottom">
|
||||
<el-button type="primary" @click="save()">保存</el-button>
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
<template>
|
||||
<div class="container">
|
||||
<div class="left">
|
||||
<MedicalQueue :status="status" @getId="getId" @getStatus="getStatus"></MedicalQueue>
|
||||
<MedicalQueue v-model="itemId" :status="status" @getId="getId" @getStatus="getStatus"></MedicalQueue>
|
||||
</div>
|
||||
<div class="middle">
|
||||
<el-scrollbar>
|
||||
<div class="case">
|
||||
<CaseDetail v-if="patientRegistration.status==3" v-model="formData"></CaseDetail>
|
||||
<Case v-else v-model="formData"></Case>
|
||||
<CaseDetail v-if="patientRegistration.status==3" v-model="formData" ></CaseDetail>
|
||||
<Case ref="caseRef" v-else v-model="formData" :status="status"></Case>
|
||||
</div>
|
||||
<div class="service-items">
|
||||
<ServiceItemsDetail v-if="patientRegistration.status==3" v-model="itemList"></ServiceItemsDetail>
|
||||
<ServiceItems v-else v-model="itemList"></ServiceItems>
|
||||
<ServiceItems v-else v-model="itemList" :status="status"></ServiceItems>
|
||||
</div>
|
||||
<div class="pharmaceutical-consumables">
|
||||
<PharmaceuticalConsumablesDetail v-if="patientRegistration.status==3"
|
||||
v-model="goodsList"></PharmaceuticalConsumablesDetail>
|
||||
<PharmaceuticalConsumables v-else v-model="goodsList"></PharmaceuticalConsumables>
|
||||
v-model="goodsList" ></PharmaceuticalConsumablesDetail>
|
||||
<PharmaceuticalConsumables v-else v-model="goodsList" :status="status"></PharmaceuticalConsumables>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<Settlement v-if="status!=1" v-model="totalAmount" @deleteItem="deleteItem" @save="save" :status="status"
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
<MedicalInformation v-model="patientRegistration" ref="medicalInformationRef"></MedicalInformation>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<MedicalHistory ref="medicalHistoryRef"></MedicalHistory>
|
||||
<MedicalHistory ref="medicalHistoryRef" @copy="copyForm" @copyItem="copyItemList" @copyGoods="copyGoodsList"></MedicalHistory>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -94,20 +94,22 @@ const medicalHistoryRef = ref()
|
|||
const patientRegistration = ref<any>({})
|
||||
const getId = (item: any) => {
|
||||
registerId.value = item.id
|
||||
itemId.value = item.id
|
||||
patientId.value = item.patientInfoId
|
||||
status.value = item.status
|
||||
nextTick(() => {
|
||||
medicalHistoryRef.value?.init(patientId.value);
|
||||
})
|
||||
if (item.status == 1) {
|
||||
ElMessageBox.alert(`您将要接诊${item.name}`, '提示', {
|
||||
ElMessageBox.confirm(`您将要接诊${item.name}`, "提示", {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
showClose: true,
|
||||
callback: (action: Action) => {
|
||||
callback: (action: any) => {
|
||||
if (action == "confirm") {
|
||||
post('registration/changeStatus', {id: item.id, status: 2}).then((res: any) => {
|
||||
status.value = 2
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
@ -138,6 +140,7 @@ const getStatus = (e: any) => {
|
|||
medicalHistoryRef.value?.clearList();
|
||||
})
|
||||
}
|
||||
const itemId = ref<any>('')
|
||||
const edit = () => {
|
||||
post('registration/changeStatus', {id: registerId.value, status: 2}).then((res: any) => {
|
||||
status.value = 2
|
||||
|
|
@ -153,6 +156,21 @@ watch([() => goodsList.value, itemList], ([newGoodsList, newItemList]) => {
|
|||
}, 0);
|
||||
totalAmount.value = pharmaceuticalTotalAmount + serviceTotalAmount;
|
||||
}, {deep: true});
|
||||
const caseRef= ref<any>("")
|
||||
const copyForm=(item:any) => {
|
||||
formData.value = item.diagnosisMedicalRecord
|
||||
const diagnosisNames =JSON.parse(item.diagnosisMedicalRecord.diagnosisDetail)
|
||||
nextTick(()=>{
|
||||
caseRef.value?.diagnosisSelect(diagnosisNames)
|
||||
})
|
||||
}
|
||||
const copyItemList=(item:any) => {
|
||||
console.log(item)
|
||||
itemList.value = item.itemDetail
|
||||
}
|
||||
const copyGoodsList=(item:any) => {
|
||||
goodsList.value = item.goodsDetail
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.container {
|
||||
|
|
|
|||
|
|
@ -113,8 +113,9 @@ const handleSelect = (item: any) => {
|
|||
}
|
||||
const isShow = ref(false)
|
||||
const ItemEditRef = ref<any>('')
|
||||
const id = ref('')
|
||||
const id = ref<any>('')
|
||||
const rowClick = ((row: any) => {
|
||||
id.value = row.id
|
||||
openDialog()
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,94 @@
|
|||
<template>
|
||||
<div class="container-wrapper">
|
||||
log
|
||||
<div class="container-wrapper" style="padding: 24px">
|
||||
<div class="title">操作日志</div>
|
||||
<div class="content">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
:default-sort="{prop: 'id', order: 'descending'}"
|
||||
@row-click="rowClick"
|
||||
>
|
||||
<el-table-column prop="id" label="ID"></el-table-column>
|
||||
<el-table-column prop="username" label="用户名"></el-table-column>
|
||||
<el-table-column prop="operation" label="操作"></el-table-column>
|
||||
<el-table-column prop="time" label="时间"></el-table-column>
|
||||
<el-table-column prop="method" label="方法"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:current-page="currentPage"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
></el-pagination>
|
||||
</div>
|
||||
<Mask :is-show="isShow" :width="800" :height="500">
|
||||
<Detail @close="isShow = false"/>
|
||||
</Mask>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
|
||||
import {onMounted, ref} from 'vue'
|
||||
import {post} from '@/utils/request.ts'
|
||||
import Mask from "@/components/Mask.vue";
|
||||
import Detail from "@/components/settings/Detail.vue";
|
||||
const tableData = ref<any>([
|
||||
{
|
||||
id: 1,
|
||||
username: 'admin',
|
||||
operation: '新增用户',
|
||||
time: '2021-01-01 00:00:00',
|
||||
}
|
||||
])
|
||||
onMounted(()=>{
|
||||
init()
|
||||
})
|
||||
const init=()=>{
|
||||
const params = {
|
||||
currentPage: currentPage.value,
|
||||
pageSize: pageSize.value,
|
||||
}
|
||||
// post("",{params:params}).then((res:any)=>{
|
||||
// tableData.value=res
|
||||
// })
|
||||
}
|
||||
const currentPage = ref(1)
|
||||
const pageSize = ref(20)
|
||||
const total = ref(0)
|
||||
const handleCurrentChange = (val: any) => {
|
||||
currentPage.value = val
|
||||
}
|
||||
const isShow = ref(false)
|
||||
const rowClick=(row:any)=>{
|
||||
isShow.value=true
|
||||
console.log(row,'ROW')
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.container-wrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.title{
|
||||
font-size: 20px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
background: #fff;
|
||||
font-weight: 500;
|
||||
}
|
||||
.content{
|
||||
flex: 1;
|
||||
background: #fff;
|
||||
}
|
||||
.pagination{
|
||||
height: 60px;
|
||||
background: #fff;
|
||||
border-top: 1px solid #ebeef5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -1,69 +1,81 @@
|
|||
<template>
|
||||
<div class="container-wrapper">
|
||||
<el-button @click="sendMessage">发送消息 </el-button>
|
||||
<el-button @click="getarry">拉配置 </el-button>
|
||||
<el-button @click="getNetwork">拿ip</el-button>
|
||||
<div class="container-wrapper" style="padding: 24px">
|
||||
<el-form ref="ruleFormRef" style="max-width: 600px" :model="tableDate" label-width="auto"
|
||||
class="demo-ruleForm" status-icon>
|
||||
<el-form-item label="打印机名称" prop="common_name">
|
||||
<el-select v-model="printConfig.printName" >
|
||||
<el-option v-for="item in tableDate" :label="item" :value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="打印类型" prop="common_sortName">
|
||||
<el-select v-model="printConfig.pageType">
|
||||
<el-option v-for="item in pageTypes" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
import {getKey} from "@/utils/discrotyUtil.ts";
|
||||
import gends from "@/assets/config/directory/gends.json";
|
||||
import natys from "@/assets/config/directory/antys.json";
|
||||
import psnCertTypes from "@/assets/config/directory/psnCertTypes.json";
|
||||
import insutypes from "@/assets/config/directory/insutypes.json";
|
||||
import {onMounted, onUnmounted, ref} from "vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import type {Request, Response} from "@/utils/ws.ts";
|
||||
import {useWsStore} from "@/stores/wsStore.ts";
|
||||
import type {Request, Response} from "@/utils/ws.ts";
|
||||
import {ElMessage} from "element-plus";
|
||||
|
||||
const pageTypes = [
|
||||
{
|
||||
label: "80小票打印机",
|
||||
value: "80"
|
||||
},
|
||||
{
|
||||
label: "58小票打印机",
|
||||
value: "58"
|
||||
}
|
||||
]
|
||||
const printConfig= ref<any>({
|
||||
printName:"",
|
||||
pageType:""
|
||||
})
|
||||
|
||||
|
||||
const save = () => {
|
||||
post("common/config/savePrinter", {printConfig:printConfig.value}).then((res:any)=>{
|
||||
ElMessage.success("保存成功")
|
||||
})
|
||||
}
|
||||
const getPrintConfig = () => {
|
||||
post("common/config/getPrintConfig").then((res:any)=>{
|
||||
printConfig.value.printName=res.printName
|
||||
printConfig.value.pageType=res.pageType
|
||||
})
|
||||
}
|
||||
const tableDate = ref<any>([])
|
||||
const wsStore = useWsStore();
|
||||
const isReading = ref(false)
|
||||
const ReadSocialCard = async (readType: string) => {
|
||||
isReading.value = true;
|
||||
let data: any = {}
|
||||
data.key ="111111111111";
|
||||
data.val="哈哈哈哈122222222222222";
|
||||
let request: Request = {
|
||||
type: "Config/set",
|
||||
config: {},
|
||||
data: data
|
||||
}
|
||||
wsStore.sendMessage(request);
|
||||
};
|
||||
const sendMessage = () => {
|
||||
ReadSocialCard("CardDefault");
|
||||
|
||||
|
||||
let request: Request = {
|
||||
type: "getPrintList",
|
||||
config: null,
|
||||
data: null
|
||||
}
|
||||
wsStore.sendMessage(request);
|
||||
const reciceMessage = (response: Response) => {
|
||||
console.log(response);
|
||||
}
|
||||
const getarry = () => {
|
||||
let data: any = {}
|
||||
let request: Request = {
|
||||
type: "Config/getAll",
|
||||
config: {},
|
||||
data: data
|
||||
}
|
||||
wsStore.sendMessage(request);
|
||||
}
|
||||
const getNetwork = () => {
|
||||
let data: any = {}
|
||||
let request: Request = {
|
||||
type: "getNetwork",
|
||||
config: {},
|
||||
data: data
|
||||
}
|
||||
wsStore.sendMessage(request);
|
||||
tableDate.value = response.Data;
|
||||
getPrintConfig()
|
||||
}
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
wsStore.setMessageCallback(reciceMessage)
|
||||
});
|
||||
})
|
||||
onUnmounted(() => {
|
||||
wsStore.removeAllMessageCallback()
|
||||
})
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
Loading…
Reference in New Issue