Browse Source

备注

master
aBin 5 years ago
parent
commit
99275eb3ea
  1. 18
      rest/project.http
  2. 4
      src/common/index.styl
  3. 35
      src/components/Panel/Panel.vue
  4. 256
      src/components/Sensor/Sensor.js
  5. 5
      src/components/Sensor/Sensor.vue
  6. 20
      src/mixins/socket.js
  7. 8
      src/store/modules/messages/state.js

18
rest/project.http

@ -1,5 +1,6 @@
# @tall = {{url}}/tall/v1.0
@tall = http://www.sxwikionline.com/gateway/tall/v1.0
@tall = http://test.tall.wiki/gateway/tall/v1.0
@bin = https://test.tall.wiki/gateway/wisdomcar/debug/record
@greenvalley = http://www.sxwikionline.com/gateway/greenvalley
@type = content-type: application/json;charset=utf-8
@ -54,3 +55,18 @@ Authorization: Bearer {{login.response.body.$.data.token}}
"teamName": ""
}
}
### 根据团队id查看研发团队相关信息
POST {{bin}}
{{type}}
Authorization: Bearer {{login.response.body.$.data.token}}
{
"param": {
"carNumber":"001",
"type":"1",
"value":"70000",
"time":"1607937529000",
}
}

4
src/common/index.styl

@ -26,8 +26,8 @@
.wrap .bg-top .animation{
position: absolute;
top: -1px;
left: 21.5%;
width: 57%;
left: 14%;
width: 72%;
height: 162px;
}

35
src/components/Panel/Panel.vue

@ -4,21 +4,21 @@
<div class="d-flex panel-box-1">
<div class="flex-1">
<span class="panel-tips">患者体重kg</span>
<span class="panel-con">60.00</span>
<span class="panel-con">{{ weightMessage }}</span>
</div>
<div class="flex-1">
<span class="panel-tips">药物剂量mg</span>
<span class="panel-con">55.00</span>
<span class="panel-con">{{ thrombolyticDose }}</span>
</div>
</div>
<div class="d-flex panel-box-1">
<div class="flex-1">
<span class="panel-tips">团注剂量mg</span>
<span class="panel-con">5.40</span>
<span class="panel-con">{{ bolusDose }}</span>
</div>
<div class="flex-1">
<span class="panel-tips">维持剂量mg</span>
<span class="panel-con">48.60</span>
<span class="panel-con">{{ maintenanceDose }}</span>
</div>
</div>
<div style="width: 95%; padding-left: 5%">
@ -29,13 +29,16 @@
</span>
</div>
<a-progress :percent="percent" :show-info="false" :stroke-color="strokeColor" :stroke-width="strokeWidth" status="active" />
<div>123</div>
<div class="flex-1" style="width: 106%; margin-left: -3%">
<div class="flex-1" style="justify-content: center" v-for="(item, index) in lists" :key="index">{{ item }}</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex';
export default {
name: 'Panel',
data() {
@ -49,8 +52,28 @@ export default {
from: '#1362B8',
to: '#06D0CA',
},
lists: [
'呼叫',
'到场',
'评估',
'采血',
'CT',
'谈话',
'签字',
'注射',
'介入',
'手术',
'穿刺',
'DSA',
'溶栓',
'再通',
'支架',
'解脱',
'结束',
],
};
},
computed: mapState('messages', ['weightMessage', 'bolusDose', 'maintenanceDose', 'thrombolyticDose']),
mounted() {
const that = this;
var add = setInterval(function() {
@ -58,7 +81,7 @@ export default {
that.percent = 0;
that.percentA = 0;
} else {
that.percent++;
that.percent += 100 / 16;
that.percentA = (that.percent * 100) / 120 + '%';
}
}, 1000);

256
src/components/Sensor/Sensor.js

@ -1,107 +1,165 @@
var option = {
legend: {
x: 'center',
y: 'top',
data: ['传感器1', '传感器2'],
textStyle: {
fontWeight: 'normal',
color: '#ccc', //标题颜色
},
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLine: {
//y轴
show: false,
},
},
yAxis: {
show: true,
type: 'value',
splitLine: { show: false }, //去除网格线
nameTextStyle: {
color: '#abb8ce',
show: false,
},
axisLabel: {
color: '#abb8ce',
show: false,
},
axisTick: {
//y轴刻度线
show: false,
},
axisLine: {
//y轴
show: false,
},
import { mapState } from 'vuex';
const mixin = {
data() {
return {
series1: [10, 20, 30, 10, 20, 30, 10, 20, 30], // 传感器1
series2: [20, 30, 10, 20, 30, 10, 20, 30, 10], // 传感器1
series3: [30, 10, 20, 30, 10, 20, 30, 10, 20], // 传感器1
};
},
series: [
{
name: '传感器1',
data: [320, 932, 401, 834, 290, 530, 620],
type: 'line',
smooth: true,
symbol: 'none',
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: 'rgba(10,73,130,1)', // 0% 处的颜色
computed: {
...mapState('messages', ['vibrationSensor']),
option() {
return {
legend: {
x: 'center',
y: 'top',
data: ['传感器1', '传感器2', '传感器3'],
textStyle: {
fontWeight: 'normal',
color: '#ccc', //标题颜色
},
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLine: {
//y轴
show: false,
},
},
yAxis: {
show: true,
type: 'value',
splitLine: { show: false }, //去除网格线
nameTextStyle: {
color: '#abb8ce',
show: false,
},
axisLabel: {
color: '#abb8ce',
show: false,
},
axisTick: {
//y轴刻度线
show: false,
},
axisLine: {
//y轴
show: false,
},
},
series: [
{
name: '传感器1',
data: this.series1,
type: 'line',
smooth: true,
symbol: 'none',
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: 'rgba(10,73,130,1)', // 0% 处的颜色
},
{
offset: 1,
color: 'rgba(10,73,130,0)', // 100% 处的颜色
},
],
global: false, // 缺省为 false
},
},
{
offset: 1,
color: 'rgba(10,73,130,0)', // 100% 处的颜色
areaStyle: {},
lineStyle: { normal: { color: 'rgb(39,149,243)', width: 2 } },
},
{
name: '传感器2',
data: this.series2,
type: 'line',
smooth: true,
symbol: 'none',
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: 'rgba(91,225,251,1)', // 0% 处的颜色
},
{
offset: 1,
color: 'rgba(91,225,251,0)', // 100% 处的颜色
},
],
global: false, // 缺省为 false
},
},
],
global: false, // 缺省为 false
},
},
areaStyle: {},
lineStyle: { normal: { color: 'rgb(39,149,243)', width: 2 } },
},
{
name: '传感器2',
data: [420, 232, 401, 234, 490, 230, 420],
type: 'line',
smooth: true,
symbol: 'none',
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: 'rgba(91,225,251,1)', // 0% 处的颜色
areaStyle: {},
lineStyle: {
normal: {
color: 'rgb(91,225,251)',
width: 2,
},
},
{
offset: 1,
color: 'rgba(91,225,251,0)', // 100% 处的颜色
},
{
name: '传感器3',
data: this.series3,
type: 'line',
smooth: true,
symbol: 'none',
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: 'rgba(241,158,194,1)', // 0% 处的颜色
},
{
offset: 1,
color: 'rgba(241,158,194,0)', // 100% 处的颜色
},
],
global: false, // 缺省为 false
},
},
],
global: false, // 缺省为 false
},
},
areaStyle: {},
lineStyle: {
normal: {
color: 'rgb(91,225,251)',
width: 2,
},
},
areaStyle: {},
lineStyle: {
normal: {
color: 'rgb(241,158,194)',
width: 2,
},
},
},
],
};
},
},
watch: {
vibrationSensor(val) {
var vibList = val.split(',');
this.series1 = this.series1.concat(parseInt(vibList[0]));
this.series2 = this.series1.concat(parseInt(vibList[1]));
this.series3 = this.series1.concat(parseInt(vibList[2]));
console.log('vibrationSensor:', val);
},
],
},
};
export default option;
export default mixin;

5
src/components/Sensor/Sensor.vue

@ -5,10 +5,11 @@
</div>
</template>
<script>
import option from './Sensor.js';
import mixin from './Sensor.js';
// import option from './Sensor3D.js';
export default {
name: 'Sensor',
mixins: [mixin],
data() {
return {
width: '',
@ -36,7 +37,7 @@ export default {
// domecharts
let myChart = this.$echarts.init(document.getElementById('Sensor'));
//
myChart.setOption(option);
myChart.setOption(this.option);
},
},
};

20
src/mixins/socket.js

@ -63,34 +63,34 @@ const mixin = {
case 1: // 体重
// 收到同步消息
// 把消息添加到store 的消息栈中
this.messagesAddWeight(data);
this.messagesAddWeight(data.data);
break;
case 2: // RFID
this.messagesAddRfid(data);
this.messagesAddRfid(data.data);
break;
case 3: // 称重传感器一
this.messagesAddWeighSensor1(data);
this.messagesAddWeighSensor1(data.data);
break;
case 4: // 称重传感器二
this.messagesAddWeighSensor2(data);
this.messagesAddWeighSensor2(data.data);
break;
case 5: // 称重传感器三
this.messagesAddWeighSensor3(data);
this.messagesAddWeighSensor3(data.data);
break;
case 6: // 称重传感器四
this.messagesAddWeighSensor4(data);
this.messagesAddWeighSensor4(data.data);
break;
case 7: // 震动传感器
this.messagesAddVibrationSensor(data);
this.messagesAddVibrationSensor(data.data);
break;
case 8: // 溶栓剂量(总量)
this.messagesAddThrombolyticDose(data);
this.messagesAddThrombolyticDose(data.data);
break;
case 9: // 团注剂量
this.messagesAddBolusDose(data);
this.messagesAddBolusDose(data.data);
break;
case 10: // 维持剂量
this.messagesAddMaintenanceDose(data);
this.messagesAddMaintenanceDose(data.data);
break;
default:
break;

8
src/store/modules/messages/state.js

@ -1,15 +1,15 @@
const state = {
syncMessages: [], // 同步消息
weightMessage: null, // 体重
weightMessage: 0, // 体重
rfidMessage: null, // RFID
weighSensor1: null, // 称重传感器一
weighSensor2: null, // 称重传感器二
weighSensor3: null, // 称重传感器三
weighSensor4: null, // 称重传感器四
vibrationSensor: null, // 震动传感器
thrombolyticDose: null, // 溶栓剂量(总量)
bolusDose: null, // 团注剂量
maintenanceDose: null, // 维持剂量
thrombolyticDose: 0, // 溶栓剂量(总量)
bolusDose: 0, // 团注剂量
maintenanceDose: 0, // 维持剂量
};
export default state;

Loading…
Cancel
Save