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. 68
      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 = {{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 @greenvalley = http://www.sxwikionline.com/gateway/greenvalley
@type = content-type: application/json;charset=utf-8 @type = content-type: application/json;charset=utf-8
@ -54,3 +55,18 @@ Authorization: Bearer {{login.response.body.$.data.token}}
"teamName": "" "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{ .wrap .bg-top .animation{
position: absolute; position: absolute;
top: -1px; top: -1px;
left: 21.5%; left: 14%;
width: 57%; width: 72%;
height: 162px; height: 162px;
} }

35
src/components/Panel/Panel.vue

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

68
src/components/Sensor/Sensor.js

@ -1,8 +1,20 @@
var option = { 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
};
},
computed: {
...mapState('messages', ['vibrationSensor']),
option() {
return {
legend: { legend: {
x: 'center', x: 'center',
y: 'top', y: 'top',
data: ['传感器1', '传感器2'], data: ['传感器1', '传感器2', '传感器3'],
textStyle: { textStyle: {
fontWeight: 'normal', fontWeight: 'normal',
color: '#ccc', //标题颜色 color: '#ccc', //标题颜色
@ -40,7 +52,7 @@ var option = {
series: [ series: [
{ {
name: '传感器1', name: '传感器1',
data: [320, 932, 401, 834, 290, 530, 620], data: this.series1,
type: 'line', type: 'line',
smooth: true, smooth: true,
symbol: 'none', symbol: 'none',
@ -69,7 +81,7 @@ var option = {
}, },
{ {
name: '传感器2', name: '传感器2',
data: [420, 232, 401, 234, 490, 230, 420], data: this.series2,
type: 'line', type: 'line',
smooth: true, smooth: true,
symbol: 'none', symbol: 'none',
@ -101,7 +113,53 @@ var option = {
}, },
}, },
}, },
{
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
},
},
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> </div>
</template> </template>
<script> <script>
import option from './Sensor.js'; import mixin from './Sensor.js';
// import option from './Sensor3D.js'; // import option from './Sensor3D.js';
export default { export default {
name: 'Sensor', name: 'Sensor',
mixins: [mixin],
data() { data() {
return { return {
width: '', width: '',
@ -36,7 +37,7 @@ export default {
// domecharts // domecharts
let myChart = this.$echarts.init(document.getElementById('Sensor')); 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: // 体重 case 1: // 体重
// 收到同步消息 // 收到同步消息
// 把消息添加到store 的消息栈中 // 把消息添加到store 的消息栈中
this.messagesAddWeight(data); this.messagesAddWeight(data.data);
break; break;
case 2: // RFID case 2: // RFID
this.messagesAddRfid(data); this.messagesAddRfid(data.data);
break; break;
case 3: // 称重传感器一 case 3: // 称重传感器一
this.messagesAddWeighSensor1(data); this.messagesAddWeighSensor1(data.data);
break; break;
case 4: // 称重传感器二 case 4: // 称重传感器二
this.messagesAddWeighSensor2(data); this.messagesAddWeighSensor2(data.data);
break; break;
case 5: // 称重传感器三 case 5: // 称重传感器三
this.messagesAddWeighSensor3(data); this.messagesAddWeighSensor3(data.data);
break; break;
case 6: // 称重传感器四 case 6: // 称重传感器四
this.messagesAddWeighSensor4(data); this.messagesAddWeighSensor4(data.data);
break; break;
case 7: // 震动传感器 case 7: // 震动传感器
this.messagesAddVibrationSensor(data); this.messagesAddVibrationSensor(data.data);
break; break;
case 8: // 溶栓剂量(总量) case 8: // 溶栓剂量(总量)
this.messagesAddThrombolyticDose(data); this.messagesAddThrombolyticDose(data.data);
break; break;
case 9: // 团注剂量 case 9: // 团注剂量
this.messagesAddBolusDose(data); this.messagesAddBolusDose(data.data);
break; break;
case 10: // 维持剂量 case 10: // 维持剂量
this.messagesAddMaintenanceDose(data); this.messagesAddMaintenanceDose(data.data);
break; break;
default: default:
break; break;

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

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

Loading…
Cancel
Save