Mon May 29 05:58:00 UTC 2023 inscode

上级 0699c4bf
......@@ -3,15 +3,17 @@ import parent from './page/ziChuanFuVal/parent.vue';
import watchEffect from './page/watchEffect/watchEffect.vue';
import erzi from './page/fuChuanZiVal/erzi.vue';
import elementplusxx from './page/test1/elementplusxx.vue';
import pinjie from './page/srcPinJie/pinjie.vue';
let name = '小明'
</script>
<template>
<!-- <parent></parent> -->
<!-- <watchEffect></watchEffect> -->
<!-- <erzi :title="name"></erzi> -->
<parent></parent>
<watchEffect></watchEffect>
<erzi :title="name"></erzi>
<elementplusxx></elementplusxx>
<pinjie></pinjie>
</template>
<style scoped>
......
......@@ -13,4 +13,5 @@ console.log(props.title);
获取来自父组件的值:{{ title }}
</div>
</template>
<style scoped>
\ No newline at end of file
<style scoped>
</style>
\ No newline at end of file
<script setup>
import {ref} from 'vue';
const getVal = [
{
drugname: "精氨酸注射液", //药品名称
remaining_quantity: 8, //药品数量
stationNo: 2, //药匣站号
low_alarm: true, //存量低报警
},
{
drugname: "头孢唑林钠(国家集采)", //药品名称
remaining_quantity: 28, //药品数量
stationNo: 8, //药匣站号
low_alarm: false, //存量低报警
},
{
drugname: "帕洛诺司琼注射液(国家集采)", //药品名称
remaining_quantity: 30, //药品数量
stationNo: 11, //药匣站号
low_alarm: false, //存量低报警
},
{
drugname: "亚砷酸", //药品名称
remaining_quantity: 33, //药品数量
stationNo: 43, //药匣站号
low_alarm: false, //存量低报警
},
{
drugname: "二羟丙茶碱注射液", //药品名称
remaining_quantity: 118, //药品数量
stationNo: 51, //药匣站号
low_alarm: false, //存量低报警
},
];
const sortResult = ref();
sortResult.value=getVal
console.log(sortResult.value[0].stationNo);
for (let index = 1; index <= 40; index++) {
if(sortResult.value.filter(item=>item.stationNo==index).length==0){
//如果没有这个id编号的值,就增加一个对象
sortResult.value.push({drugname:'',remaining_quantity:0,stationNo:(index),low_alarm:true});
}
}
</script>
\ No newline at end of file
<script setup>
import { ref } from 'vue';
const data = ref({
photoName: "gonganlogo.png",
content: "这是一个好看的图片",
})
</script>
<template>
<img style="width: 200px;" :src="`https://mimg.127.net/p/images/logo/${data.photoName}`" alt="">
</template>
<style scoped>
</style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册