微量闪电项目更新

main
nz618 1 year ago
parent 0fd6bc92a2
commit d2dc30700d

Binary file not shown.

@ -33,4 +33,11 @@ export function stopClean() {
// data: Qs.stringify(data) // data: Qs.stringify(data)
}) })
} }
//关机
export function shutdown() {
return request({
url: '/parameter/shut_dwon',
method: 'post',
})
}

@ -49,5 +49,12 @@ export function resultData(data) {
data: Qs.stringify(data) data: Qs.stringify(data)
}) })
} }
//是否截图冷水管
export function againExperiment(data) {
return request({
url: '/experiment/again_start_experiment',
method: 'post',
data: Qs.stringify(data)
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

@ -53,7 +53,7 @@
<script> <script>
import { P_SysControl } from '../main' import { P_SysControl } from '../main'
import {getDate} from '@/utils/common.js' import {getDate} from '@/utils/common.js'
import {openDoor,colseDoor} from '@/api/home.js' import {openDoor,colseDoor,shutdown} from '@/api/home.js'
export default { export default {
name: 'Headers', name: 'Headers',
props:['user','role','step'], props:['user','role','step'],
@ -83,13 +83,16 @@ export default {
}, },
quit(){ quit(){
var that =this var that =this
this.$confirm('您确定要退出程序吗!', '提示', { this.$confirm('您确定要关机吗!', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
center: true center: true
}).then(() => { }).then(() => {
P_SysControl.closeForm(); // P_SysControl.closeForm();
shutdown().then(()=>{
console.log('关机')
})
}) })
}, },
handleCommand(command){ handleCommand(command){

@ -31,7 +31,9 @@ try{
// extraHeaders: { "Access-Control-Allow-Origin": "*" } // extraHeaders: { "Access-Control-Allow-Origin": "*" }
// })); // }));
Vue.use(new VueSocketIO({ Vue.use(new VueSocketIO({
connection: SocketIO("http://192.168.101.75:5001", { // connection: SocketIO("http://192.168.101.75:5001", {
// connection: SocketIO("http://127.0.0.1:5001", {
connection: SocketIO("http://192.168.101.50:5001", {
autoConnect: true // 自动连接 autoConnect: true // 自动连接
}), }),
extraHeaders: { "Access-Control-Allow-Origin": "*" } extraHeaders: { "Access-Control-Allow-Origin": "*" }

@ -42,6 +42,15 @@
<div class="goBack" @click="goBack"></div> <div class="goBack" @click="goBack"></div>
<div class="add" @click="handAuto"></div> <div class="add" @click="handAuto"></div>
</div> </div>
<div class="model" v-show="cleanStatus">
<span class="icon">!</span>
<div class="dec">请选择清洗模式</div>
<div class="tip"></div>
<div class="bottom">
<div class="cancel button" @click="handClean(1)"></div>
<div class="continue button" @click="handClean(2)"></div>
</div>
</div>
</div> </div>
</template> </template>
@ -52,7 +61,7 @@ export default {
name: "Login", name: "Login",
data() { data() {
return { return {
cleanStatus:false,
}; };
}, },
created: function () { created: function () {
@ -60,15 +69,22 @@ export default {
}, },
methods: { methods: {
goBack(){ goBack(){
window.history.go('-1') this.$router.push({path:'/home'})
console.log('返回上一级') console.log('返回上一级')
}, },
handAuto(){ handAuto(){
instrumentClean().then(res=>{ this.cleanStatus=true
console.log(res,'自动清洗参数') // instrumentClean({type:1}).then(res=>{
// console.log(res,'')
// this.$router.push('/autoClean')
// })
},
handClean(type){
instrumentClean({type:type}).then(res=>{
console.log(res,'自动清洗参数2')
this.cleanStatus=false
this.$router.push('/autoClean') this.$router.push('/autoClean')
}) })
} }
}, },
}; };
@ -152,6 +168,67 @@ export default {
text-align: center; text-align: center;
} }
} }
.model{
position: fixed;
top:116px;
left:286px;
width:440px;
height:534px;
box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.16);
border-radius: 8px 8px 8px 8px;
background:#fff;
.icon{
display:block ;
border-radius: 50%;
margin:80px auto 0;
width: 94px;
height: 94px;
background: linear-gradient(180deg, #FFB300 0%, #FF7D00 100%);
font-size: 80px;
color:#fff;
text-align: center;
}
.dec{
margin:70px auto 0;
font-size: 28px;
font-weight: bold;
color: #3A3A3A;
text-align: center;
}
.tip{
margin:32px auto 0;
font-size: 24px;
font-weight: 400;
color: #C3C3C3;
text-align: center;
}
.bottom{
margin-top:64px;
display: flex;
justify-content: center;
text-align: center;
width:100%;
height:70px;
.button{
width: 136px;
height: 68px;
box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.16);
border-radius: 8px 8px 8px 8px;
font-size: 28px;
}
.cancel{
background: linear-gradient(180deg, #FFFFFF 0%, #ECECEC 100%);
color: #3A3A3A;
margin-right:12px;
line-height:68px;
}
.continue{
background: linear-gradient(180deg, #FF7B83 0%, #850006 100%);
color: #fff;
line-height:68px;
}
}
}
} }
.row { .row {

@ -0,0 +1,175 @@
<template>
<div class="loginbox">
<!-- <div class="left_card">
<img style="height:100%;width:100%" src="../../static/icon/登录配图.png" alt="">
</div> -->
<form>
<div class="contain">
<div style="display: flex; flex-direction: column">
<span class="title">用户名</span>
<el-input
class="numkeyboard"
size="medium"
autocomplete=off
v-model="username"
type="text"
placeholder="请输入用户名"
></el-input>
</div>
<div style="display: flex; flex-direction: column; margin-top: 10px">
<span class="title">密码</span>
<el-input
class="numkeyboard no-autofill-pwd"
size="medium"
auto-complete="new-password"
v-model="password"
placeholder="请输入密码"
type="password"
></el-input>
</div>
<el-row>
<button @click="Login" class="Btlogin">登录</button>
</el-row>
</div>
</form>
<div class="footer">
COPYRIGHT © 2022 杭州研一智控科技有限公司 版权所有
</div>
</div>
</template>
<script>
import { userLogin } from "@/api/api";
export default {
name: "Login",
data() {
return {
username:"请输入",
password:"",
};
},
mounted(){
this.username=undefined
console.log(this.username,'登录',this.password)
},
methods: {
go(res) {
switch (res) {
case "home":
this.$router.push("/home");
break;
}
},
Login() {
console.log(this.username,'登录1',this.password)
var that = this;
if (that.username == "" || that.password == "") {
that.$message({
message: "请填写账号,密码",
type: "warning",
});
} else {
const loading = this.$loading({
lock: true,
text: "登陆中...",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
userLogin({ user_name: this.username, password: this.password })
.then((response) => {
console.log(response.data);
let data = response.data;
if (data.status == 1) {
that.$message.error(data.message);
} else {
if (data.data.is_enabled == 1) {
sessionStorage.LoginUser = JSON.stringify(data.data);
this.$emit("send_user", data.data);
that.go("home");
} else {
that.$message.error("账户禁用");
}
}
loading.close();
})
.catch((error) => {
loading.close();
that.$message.error(error.message);
});
}
},
},
};
</script>
<style scoped lang="less">
.no-autofill-pwd {
/deep/ .el-input__inner {
-webkit-text-security:disc!important;
}
}
.loginbox {
width: 1024px;
height: 658px;
box-shadow: 24px 24px 24px 1px rgba(14, 66, 210, 0.08);
border-radius: 8px 8px 8px 8px;
padding-top:128px;
.contain {
width:480px;
margin:0 auto;
// margin:128px auto 0;
text-align: left;
.title{
font-size:28px;
margin-bottom:15px;
color:#666666;
}
.numkeyboard{
width:480px;
.el-input__inner{
height:80px !important;
}
}
.Btlogin{
width:480px;
height: 100px;
border:0;
background: linear-gradient(180deg, #FF7B83 0%, #850006 100%);
box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.4);
border-radius: 8px 8px 8px 8px;
opacity: 1;
font-size: 40px;
color: #FFFFFF;
margin-top:50px;
}
}
.footer{
margin:62px auto 0;
width: 630px;
height: 31px;
font-size: 24px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400;
color: #C3C3C3;
line-height: 36px;
}
}
</style>
<style>
.loginbox .el-input--medium .el-input__inner {
width: 480px;
height: 80px;
background: #FFFFFF;
box-shadow: inset 0px 3px 6px 1px rgba(0,0,0,0.16);
border-radius: 4px 4px 4px 4px;
opacity: 1;
border: 1px solid #DCDCDC;
font-size: 32px;
font-weight: 400;
color: #3A3A3A;
}
</style>

@ -6,21 +6,25 @@
<div class="contain"> <div class="contain">
<div style="display: flex; flex-direction: column"> <div style="display: flex; flex-direction: column">
<span class="title">用户名</span> <span class="title">用户名</span>
<el-input <el-input
class="numkeyboard" class="numkeyboard"
size="medium" size="medium"
autocomplete=off
v-model="username" v-model="username"
type="text"
placeholder="请输入用户名" placeholder="请输入用户名"
></el-input> ></el-input>
</div> </div>
<div style="display: flex; flex-direction: column; margin-top: 10px"> <div style="display: flex; flex-direction: column; margin-top: 10px">
<span class="title">密码</span> <span class="title">密码</span>
<el-input <el-input
class="numkeyboard" class="numkeyboard no-autofill-pwd"
size="medium" size="medium"
auto-complete="new-password"
v-model="password" v-model="password"
placeholder="请输入密码" placeholder="请输入密码"
show-password type="password"
></el-input> ></el-input>
</div> </div>
<el-row> <el-row>
@ -40,11 +44,14 @@ export default {
name: "Login", name: "Login",
data() { data() {
return { return {
username: "admin", username:"请输入",
password: "123456", password:"",
}; };
}, },
mounted(){
this.username=undefined
console.log(this.username,'登录',this.password)
},
methods: { methods: {
go(res) { go(res) {
switch (res) { switch (res) {
@ -54,6 +61,7 @@ export default {
} }
}, },
Login() { Login() {
console.log(this.username,'登录1',this.password)
var that = this; var that = this;
if (that.username == "" || that.password == "") { if (that.username == "" || that.password == "") {
that.$message({ that.$message({
@ -94,6 +102,12 @@ export default {
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.no-autofill-pwd {
/deep/ .el-input__inner {
-webkit-text-security:disc!important;
}
}
.loginbox { .loginbox {
width: 1024px; width: 1024px;
height: 658px; height: 658px;

@ -8,7 +8,7 @@
</template> </template>
<script> <script>
import fourStep from './components/fourStep.vue'; import fourStep from './components/reportStep.vue';
export default { export default {
name: 'ReportInfo', name: 'ReportInfo',

@ -9,7 +9,7 @@
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>
<span class="title">数据报表</span> <span class="title">数据报表</span>
<el-select v-model="standard" clearable placeholder="请选择" class="custom-select" @change="get_List"> <el-select v-model="standard" clearable placeholder="请选择" class="custom-select" @change="standChange">
<el-option <el-option
v-for="item in standards" v-for="item in standards"
:key="item.value" :key="item.value"
@ -25,7 +25,7 @@
v-model="search_value" v-model="search_value"
size="middle" size="middle"
@blur="get_List" @blur="get_List"
placeholder="搜索用户" placeholder="搜索名称"
></el-input> ></el-input>
<el-table <el-table
class="table" class="table"
@ -35,6 +35,7 @@
ref="table" ref="table"
:data="tableData" :data="tableData"
height="385" height="385"
@row-click="rowClick"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column <el-table-column
@ -50,11 +51,11 @@
</el-table> </el-table>
<div class="footer"> <div class="footer">
<div class="goBack" @click="handBack"></div> <div class="goBack" @click="handBack"></div>
<!-- v-model="params.page" -->
<el-pagination <el-pagination
class="pagination" class="pagination"
background background
v-model="params.page" @current-change="pageChange"
@current-change="get_List"
layout="total,prev, pager, next" layout="total,prev, pager, next"
:total="total"> :total="total">
</el-pagination> </el-pagination>
@ -66,6 +67,7 @@
<script> <script>
import { getExperimentList,exportReportList } from "@/api/report"; import { getExperimentList,exportReportList } from "@/api/report";
import url from "socket.io-client/lib/url";
export default { export default {
name: "Login", name: "Login",
@ -103,6 +105,18 @@ export default {
this.get_List(); this.get_List();
}, },
methods: { methods: {
rowClick(val){
console.log(val,'行点击',val.experiment_id)
this.$router.push({path:'/reportinfo',query:{experiment_id:val.experiment_id}})
},
standChange(val){
this.standard=val;
this.get_List();
},
pageChange(val){
this.params.page=val;
this.get_List();
},
get_List() { get_List() {
var that = this; var that = this;
const loading = this.$loading({ const loading = this.$loading({
@ -111,6 +125,7 @@ export default {
spinner: "el-icon-loading", spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)", background: "rgba(0, 0, 0, 0.7)",
}); });
// this.params.page=val;
let data={ let data={
search_value: this.search_value, search_value: this.search_value,
choose_date:this.value2, choose_date:this.value2,
@ -136,7 +151,7 @@ export default {
}); });
}, },
handBack(){ handBack(){
window.history.go('-1') this.$router.push({path:'/home'})
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
// this.multipleSelection = val; // this.multipleSelection = val;

@ -64,8 +64,8 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-radio :label="9"> <el-radio :label="9">
<el-input placeholder="请输入内容" v-model="ruleForm.input1" @blur="changeRadio('升温速率',ruleForm.radio1,'ASTM_D6450',ruleForm.input1)"> <el-input placeholder="请输入1-11正整数" type="number" v-model="ruleForm.input1" @blur="changeRadio('升温速率',ruleForm.radio1,'ASTM_D6450',ruleForm.input1)">
<template slot="append">/min</template> <!-- <template slot="append">/min</template> -->
</el-input> </el-input>
</el-radio> </el-radio>
</el-col> </el-col>
@ -84,7 +84,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-radio :label="9"> <el-radio :label="9">
<el-input placeholder="请输入内容" v-model="ruleForm.input2" @blur="changeRadio('升温速率',ruleForm.radio2,'ASTM_D7094',ruleForm.input2)"> <el-input placeholder="请输入1-11正整数" type="number" v-model="ruleForm.input2" @blur="changeRadio('升温速率',ruleForm.radio2,'ASTM_D7094',ruleForm.input2)">
<template slot="append">/min</template> <template slot="append">/min</template>
</el-input> </el-input>
</el-radio> </el-radio>
@ -104,7 +104,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-radio :label="9"> <el-radio :label="9">
<el-input placeholder="请输入内容" v-model="ruleForm.input3" @blur="changeRadio('升温速率',ruleForm.radio3,'SH/T0768',ruleForm.input3)"> <el-input placeholder="请输入1-11正整数" type="number" v-model="ruleForm.input3" @blur="changeRadio('升温速率',ruleForm.radio3,'SH/T0768',ruleForm.input3)">
<template slot="append">/min</template> <template slot="append">/min</template>
</el-input> </el-input>
</el-radio> </el-radio>
@ -366,7 +366,7 @@ export default {
} }
}, },
handBack(){ handBack(){
window.history.go('-1') this.$router.push({path:'/home'})
}, },
changeRadio(title,value,temp,input){ changeRadio(title,value,temp,input){
if(title=='升温速率'){ if(title=='升温速率'){
@ -379,6 +379,32 @@ export default {
this.params[temp].heating_rate_fluctuate=0.5; this.params[temp].heating_rate_fluctuate=0.5;
this.params[temp].heating_rate_custom=0; this.params[temp].heating_rate_custom=0;
}else{ }else{
if(temp=='ASTM_D6450'){
if(input>11){
this.ruleForm.input1=11
input=11
}else if(input<1){
this.ruleForm.input1=1
input=1
}
}else if(temp=='ASTM_D7094'){
if(input>11){
this.ruleForm.input2=11
input=11
}else if(input<1){
this.ruleForm.input2=1
input=1
}
}else{
if(input>11){
this.ruleForm.input3=11
input=11
}else if(input<1){
this.ruleForm.input3=1
input=1
}
}
this.params[temp].heating_rate=input; this.params[temp].heating_rate=input;
this.params[temp].heating_rate_custom=1; this.params[temp].heating_rate_custom=1;
} }
@ -451,7 +477,7 @@ export default {
} }
} }
initParams(this.params).then(response=>{ initParams(this.params).then(response=>{
console.log(res,'初始化成功') console.log(response,'初始化成功')
if(response.data.status==0){ if(response.data.status==0){
this.$message.success('初始化成功') this.$message.success('初始化成功')
}else{ }else{

@ -70,7 +70,7 @@
<!-- <secStep @next="page='3'" @open="handOpen" @close="handClose" :next_step='next_step' :lit_temperature="lit_temperature" :moment_pressure="moment_pressure" :samples_temperature="samples_temperature"></secStep> --> <!-- <secStep @next="page='3'" @open="handOpen" @close="handClose" :next_step='next_step' :lit_temperature="lit_temperature" :moment_pressure="moment_pressure" :samples_temperature="samples_temperature"></secStep> -->
</div> </div>
<div v-if="page=='2'" > <div v-if="page=='2'" >
<secStep @next="page='3'" @open="handOpen" @close="handClose" :barn_door_confirm='barn_door_confirm' :pic_step="pic_step" :next_step='next_step' :lit_temperature="lit_temperature" :moment_pressure="moment_pressure" :samples_temperature="samples_temperature"></secStep> <secStep @next="page='3'" @open="handOpen" @close="handClose" :notCoolingStatus='notCoolingStatus' :barn_door_confirm='barn_door_confirm' :pic_step="pic_step" :next_step='next_step' :lit_temperature="lit_temperature" :moment_pressure="moment_pressure" :samples_temperature="samples_temperature"></secStep>
</div> </div>
<div v-if="page=='3'" > <div v-if="page=='3'" >
<threeStep @next="page='4'" :result_step="result_step" :barn_door_confirm='barn_door_confirm' :pic_step="pic_step" :next_step='next_step' :lit_temperature="lit_temperature" :moment_pressure="moment_pressure" :samples_temperature="samples_temperature"></threeStep> <threeStep @next="page='4'" :result_step="result_step" :barn_door_confirm='barn_door_confirm' :pic_step="pic_step" :next_step='next_step' :lit_temperature="lit_temperature" :moment_pressure="moment_pressure" :samples_temperature="samples_temperature"></threeStep>
@ -298,7 +298,7 @@ export default {
}, },
data(){ data(){
return { return {
pic_step:1, pic_step:'1',
barn_door_confirm:false, barn_door_confirm:false,
result_step:false, result_step:false,
next_step:false, next_step:false,
@ -423,7 +423,8 @@ export default {
is_open_control:false, is_open_control:false,
switch_autocontrol_value:2, switch_autocontrol_value:2,
// camera_text:'', // camera_text:'',
isdraw:'0' isdraw:'0',
notCoolingStatus:''
} }
}, },
watch:{ watch:{
@ -465,6 +466,13 @@ export default {
process_result_step:function(data){ process_result_step:function(data){
console.log('结果页',data.result_step) console.log('结果页',data.result_step)
this.result_step=data.result_step; this.result_step=data.result_step;
},
//
not_cooling_water:function(data){
console.log(this.notCoolingStatus,'没有冷水管',data.msg)
this.notCoolingStatus=new Date()+Math.random();
}, },
// //
process_dynamic_pic(data){ process_dynamic_pic(data){

@ -157,7 +157,7 @@ export default {
}, },
handBack(){ handBack(){
console.log('返回') console.log('返回')
window.history.go('-1') this.$router.push({path:'/home'})
}, },
handAdd(){ handAdd(){
this.$router.push("/adduser"); this.$router.push("/adduser");

@ -73,7 +73,7 @@ export default {
}, },
methods: { methods: {
goBack(){ goBack(){
// window.history.go('-1') // this.$router.push({path:'/home'})
// console.log('') // console.log('')
this.$router.push('/home') this.$router.push('/home')
} }

@ -90,7 +90,7 @@
<div class="goBack" @click="handBack"></div> <div class="goBack" @click="handBack"></div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<div class="sampling" @click="handTake('ruleForm')"></div> <div class="sampling" @click="handTake('ruleForm')"></div>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -144,7 +144,7 @@ export default {
ruleForm: { ruleForm: {
determination_standard: "", determination_standard: "",
temperature_selection:'高温测定(100~420℃)', temperature_selection:'高温测定(100~420℃)',
expected_flash_point:'78.6', expected_flash_point:'',
initial_temperature_set:'', initial_temperature_set:'',
material_name:'', material_name:'',
final_temperature_set:'', final_temperature_set:'',
@ -241,7 +241,7 @@ export default {
this.ruleForm.temperature_selection='低温测试(-25~100℃)' this.ruleForm.temperature_selection='低温测试(-25~100℃)'
}, },
handBack(){ handBack(){
window.history.go('-1') this.$router.push({path:'/home'})
}, },
handTake(formName){ handTake(formName){
var that=this var that=this
@ -249,6 +249,15 @@ export default {
if (valid) { if (valid) {
if(that.ruleForm.expected_flash_point!='未知'&&isNaN(that.ruleForm.expected_flash_point)){ if(that.ruleForm.expected_flash_point!='未知'&&isNaN(that.ruleForm.expected_flash_point)){
return that.$message.warning('预期闪点只能设置为数值或未知!') return that.$message.warning('预期闪点只能设置为数值或未知!')
}
if(!isNaN(that.ruleForm.expected_flash_point)){
console.log(Number(that.ruleForm.expected_flash_point)-Number(that.ruleForm.initial_temperature_set),'测试')
if(Number(that.ruleForm.expected_flash_point)-Number(that.ruleForm.initial_temperature_set)<18){
return that.$message.warning('初始温度<=预期闪点18℃')
}
if(Number(that.ruleForm.final_temperature_set)-Number(that.ruleForm.expected_flash_point)<10){
return that.$message.warning('最终温度>=预期闪点10℃')
}
} }
if(Number(that.ruleForm.final_temperature_set)<Number(that.ruleForm.initial_temperature_set)){ if(Number(that.ruleForm.final_temperature_set)<Number(that.ruleForm.initial_temperature_set)){
return that.$message.warning('最终温度不能小于初始温度') return that.$message.warning('最终温度不能小于初始温度')

@ -83,9 +83,9 @@ export default {
}, },
methods: { methods: {
async getInitData (){ async getInitData (){
console.log('获取初始数据') console.log(JSON.parse(localStorage.getItem('experiment_info')),'获取初始数据',this.$route.query)
let data={ let data={
experiment_id:JSON.parse(localStorage.getItem('experiment_info')).experiment_id experiment_id:(JSON.parse(localStorage.getItem('experiment_info')).experiment_id)
} }
var that=this; var that=this;
await resultData(data).then(response=>{ await resultData(data).then(response=>{
@ -169,7 +169,7 @@ export default {
myChart.setOption(option); myChart.setOption(option);
}, },
handBack(){ handBack(){
window.history.go('-1') this.$router.push({path:'/home'})
}, },
handDelete(){ handDelete(){
let data={ let data={
@ -187,7 +187,8 @@ export default {
// } // }
var formData = new FormData() var formData = new FormData()
let arr=[] let arr=[]
arr.push(JSON.parse(localStorage.getItem('experiment_info')).experiment_id); let experiment_id=JSON.parse(localStorage.getItem('experiment_info')).experiment_id
arr.push(experiment_id);
      formData.append('experiment_id_list',JSON.stringify(arr));       formData.append('experiment_id_list',JSON.stringify(arr));
exportReportList(formData).then(response=>{ exportReportList(formData).then(response=>{
if(response.data.status==0){ if(response.data.status==0){
@ -241,6 +242,7 @@ export default {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
flex-wrap: wrap; flex-wrap: wrap;
padding-bottom:120px;
.item{ .item{
width:180px; width:180px;
padding:24px 30px; padding:24px 30px;
@ -251,7 +253,8 @@ export default {
} }
} }
.item:nth-child(1),.item:nth-child(4),.item:nth-child(5){ .item:nth-child(1),.item:nth-child(4),.item:nth-child(5){
width:280px width:260px;
overflow: hidden;
} }
} }
} }

@ -0,0 +1,305 @@
<template>
<div class="fourStep">
<div class="header">
<span class="left">校准闪点</span>
<span class="right">{{ nowDate }}</span>
</div>
<div class="echarts" >
<div class="top">
<div class="title">{{flash_point_value?flash_point_value:'-'}}</div>
<div class="subTitle">{{material_name}}</div>
</div>
<div id="main" style="width: 100%; height: 400px"></div>
<div class="info">
<div v-for="(item,index) in items" :key="index" class="item">
<div class="label">{{ item.label }}</div>
<div class="value">{{ item.value }}</div>
</div>
</div>
</div>
<div class="bottom">
<div class="button goBack" @click="handBack"></div>
<div class="button delete" @click="handDelete"></div>
<div class="button export" @click="handExport"></div>
<div class="button instrument" v-if="isShow" @click="handClean"></div>
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
import router from '../../router';
import { exportReportList } from "@/api/report";
import { deleteData,resultData } from "@/api/step";
export default {
props:{
isShow:{
type:Boolean,
default:true
}
},
data() {
return {
flash_point_value:'',
material_name:'',
nowDate: "",
items:[
{
label:'执行标准',
value:'ASTM D6450'
},
{
label:'初始温度',
value:'60.6℃'
},
{
label:'最终温度',
value:'ASTM D6450'
},
{
label:'精密度适用范围',
value:'60.6℃'
},
{
label:'点火前气压',
value:'60.6℃'
},
{
label:'环境大气压',
value:'ASTM D6450'
},
{
label:'瞬间增压',
value:'60.6℃'
},
],
xData:[],
yData:[],
};
},
mounted() {
this.currentTime();
this.getInitData();
},
methods: {
async getInitData (){
console.log(JSON.parse(localStorage.getItem('experiment_info')),'获取初始数据',this.$route.query)
let data={
experiment_id:this.$route.query.experiment_id
}
var that=this;
await resultData(data).then(response=>{
console.log(response,'结果',response.data.data)
that.xData=response.data.data.chart_data_temp,
that.yData=response.data.data.chart_data_pressure
that.items[0].value=response.data.data.determination_standard;
that.items[2].value=response.data.data.final_temperature_set;
that.items[1].value=response.data.data.initial_temperature_set;
that.items[6].value=response.data.data.instant_adding_pressure;
that.items[4].value=response.data.data.preparation_fire_air_pressure;
that.items[5].value=response.data.data.ambient_pressure;//
that.items[3].value=response.data.data.application_scope;//
that.flash_point_value=response.data.data.flash_point_value;
that.material_name=response.data.data.material_name;
// that.$message.success('')
that.init()
})
},
handSet() {},
handCancel() {
this.isShow = false;
},
currentTime() {
setInterval(this.getDate, 500);
},
getDate() {
var _this = this;
let yy = new Date().getFullYear();
let mm =
new Date().getMonth() + 1 < 10
? "0" + (new Date().getMonth() + 1)
: new Date().getMonth() + 1;
let dd =
new Date().getDate() < 10
? "0" + new Date().getDate()
: new Date().getDate();
let week = new Date().getDay();
let hh = new Date().getHours();
let ms =
new Date().getSeconds() < 10
? "0" + new Date().getSeconds()
: new Date().getSeconds();
let mf =
new Date().getMinutes() < 10
? "0" + new Date().getMinutes()
: new Date().getMinutes();
_this.nowDate = yy + "/" + mm + "/" + dd + " " + " " + hh + ":" + mf;
},
init() {
console.log('初始化')
// domecharts
var myChart = echarts.init(document.getElementById("main"));
//
var option = {
xAxis: {
name:'温度/℃',
type: 'category',
data: this.xData,
axisTick:{
show:false
},
axisLine:{
show:false
}
},
yAxis: {
name:'瞬间增压/Kpa',
type: 'value'
},
series: [
{
data: this.yData,
type: 'line',
showSymbol:false,
}
],
color:'#51A8FF'
};
// 使
myChart.setOption(option);
},
handBack(){
this.$router.push({path:'/home'})
},
handDelete(){
let data={
experiment_id:this.$route.query.experiment_id
}
deleteData(data).then(response=>{
console.log(response,'删除成功')
if(response.status==200){
this.$message.success('删除成功')
this.$router.push({path:"/ReportList"})
}else{
this.$message.warning('删除失败')
}
// this.$message.error(response.desc)
})
},
handExport(){
// let data={
// experiment_id:JSON.parse(localStorage.getItem('experiment_info')).experiment_id
// }
var formData = new FormData()
let arr=[]
let experiment_id=this.$route.query.experiment_id
arr.push(experiment_id);
      formData.append('experiment_id_list',JSON.stringify(arr));
exportReportList(formData).then(response=>{
if(response.data.status==0){
this.$message.success('导出成功')
}else{
this.$message.error(response.data.message)
}
})
},
handClean(){
this.$router.push('/clean');
}
},
};
</script>
<style lang="less" >
.fourStep {
.header {
margin: 40px 40px 0;
width: 944px;
height: 44px;
background: linear-gradient(96deg, #e4e4e4 0%, #f3f3f3 100%);
border-radius: 0px 0px 0px 0px;
display: flex;
justify-content: space-between;
padding: 0 20px;
font-size: 20px;
color: #666666;
line-height: 44px;
}
.echarts {
margin: 0 40px;
overflow: auto;
height:400px;
.top{
.title{
text-align: center;
margin:20px auto 0;
font-size: 56px;
color: #666666;
}
.subTitle{
text-align: center;
font-size: 24px;
color: #666666;
}
}
.info{
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
padding-bottom:120px;
.item{
width:180px;
padding:24px 30px;
font-size: 24px;
color:#808080;
.value{
margin-top:10px;
}
}
.item:nth-child(1),.item:nth-child(4),.item:nth-child(5){
width:260px;
overflow: hidden;
}
}
}
.bottom {
width: 1024px;
height: 120px;
background: #ffffff;
box-shadow: 0px -3px 6px 1px rgba(0, 0, 0, 0.16);
border-radius: 0px 0px 0px 0px;
opacity: 1;
position: fixed;
bottom: 0;
display: flex;
justify-content: space-between;
padding: 0 40px;
.button {
margin-top: 12px;
width: 208px;
height: 84px;
box-shadow: 0px 3px 6px 1px rgba(0, 0, 0, 0.16);
border-radius: 8px 8px 8px 8px;
line-height: 84px;
font-size: 36px;
text-align: center;
color: #fff;
}
.goBack {
background: linear-gradient(180deg, #ffffff 0%, #ececec 100%);
color: #3a3a3a;
}
.delete {
background: linear-gradient(180deg, #ff7b83 0%, #850006 100%);
}
.export {
background: linear-gradient(180deg, #59cc74 0%, #0a8828 100%);
}
.instrument {
background: linear-gradient(180deg, #51a8ff 0%, #1564b1 100%);
}
}
}
</style>

@ -69,12 +69,21 @@
<div class="continue button" @click="handTake"></div> <div class="continue button" @click="handTake"></div>
</div> </div>
</div> </div>
<div class="model" v-show="coolingStatus">
<span class="icon">!</span>
<div class="dec">未接冷水管</div>
<div class="tip">制冷未接冷水管,请确认接入了冷水管</div>
<div class="bottom">
<div class="cancel button" @click="handCoolingStatus"></div>
<div class="continue button" @click="handTakeCoolingStatus"></div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import { startExperiment } from "@/api/step"; import { startExperiment,againExperiment} from "@/api/step";
export default { export default {
props:{ props:{
lit_temperature:{ lit_temperature:{
@ -101,6 +110,10 @@ export default {
type:String, type:String,
default:'1' default:'1'
}, },
notCoolingStatus:{
type:String,
default:''
}
}, },
mounted(){ mounted(){
@ -111,8 +124,19 @@ export default {
this.items[2].value=this.experiment_info.final_temperature_set; this.items[2].value=this.experiment_info.final_temperature_set;
// this.$refs.videoRef.play() // this.$refs.videoRef.play()
}, },
watch:{
notCoolingStatus:{
handler(newValue){
console.log(newValue,'监听页数111')
this.coolingStatus=true
},
// immediate:true,
deep:true
}
},
data() { data() {
return { return {
coolingStatus:false,
experiment_info:{}, experiment_info:{},
isMeasure:true, isMeasure:true,
isShow:false, isShow:false,
@ -135,7 +159,7 @@ export default {
methods: { methods: {
handSet() {}, handSet() {},
handBack(){ handBack(){
window.history.go('-1') this.$router.push({path:'/home'})
console.log('111') console.log('111')
}, },
handCancel(){ handCancel(){
@ -160,6 +184,19 @@ export default {
}, },
handMeasure(){ handMeasure(){
this.$emit('open') this.$emit('open')
},
handCoolingStatus(){
this.coolingStatus=false;
},
handTakeCoolingStatus(){
//
againExperiment().then(res=>{
if(res.data.status=='0'){
this.coolingStatus=false;
}else{
this.$message.error(res.message)
}
})
} }
}, },
}; };

@ -53,7 +53,7 @@
</div> </div>
</div> </div>
<div class="bottom"> <div class="bottom">
<div class="goBack" @click="handBack"></div> <div class="goBack" @click="handBack"></div>
<div class="nextButton" >测量中</div> <div class="nextButton" >测量中</div>
</div> </div>
<!-- <div class="model" v-show="barn_door_confirm"> <!-- <div class="model" v-show="barn_door_confirm">
@ -145,7 +145,7 @@ export default {
methods: { methods: {
handSet() {}, handSet() {},
handBack(){ handBack(){
window.history.go('-1') this.$router.push({path:'/home'})
console.log('111') console.log('111')
}, },
handCancel(){ handCancel(){

@ -107,14 +107,13 @@ const router = new Router({
] ]
}) })
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
console.log(to, from,'路由守卫')
if(from.path=='/shiyan'){ if(from.path=='/shiyan'){
stopExperiment().then(res=>{ stopExperiment().then(res=>{
console.log(res,'停止实验')
}) })
} }
if(from.path=='/autoClean'){ if(from.path=='/autoClean'){
stopClean().then(res=>{ stopClean().then(res=>{
console.log(res,'停止实验')
}) })
} }
next() next()

@ -3,7 +3,8 @@ import axios from 'axios'
// axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' // axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
const service = axios.create({ const service = axios.create({
// baseURL: 'http:///127.0.0.1:5555/', // baseURL: 'http:///127.0.0.1:5555/',
baseURL: 'http://192.168.101.75:5001/api', // baseURL: 'http://127.0.0.1:5001/api',
baseURL: 'http://192.168.101.50:5001/api',
// baseURL: 'http://127.0.0.1:5001/api', // baseURL: 'http://127.0.0.1:5001/api',
timeout: 15000, timeout: 15000,
}) })

@ -747,7 +747,9 @@
// 点击数字或字母按键响应函数 // 点击数字或字母按键响应函数
function pressNumberOrLetterKey (e) { function pressNumberOrLetterKey (e) {
console.log(e,'点击数字2')
if (defaults.ZH) { if (defaults.ZH) {
console.log('中文')
// 中文输入状态下,如果按下的不是字母按键(数字键),认为是无意义输入 // 中文输入状态下,如果按下的不是字母按键(数字键),认为是无意义输入
// if (!$(e.target).hasClass('letter')) return // if (!$(e.target).hasClass('letter')) return
$('.outputZone').show() $('.outputZone').show()
@ -755,6 +757,10 @@
inputVal.text(inputVal.text() + $(e.target).text()) inputVal.text(inputVal.text() + $(e.target).text())
updateZHWords(e) updateZHWords(e)
} else { } else {
console.log('英文文3')
$('.outputZone').show()
const inputVal = $('.virtualkeyboard .zh-pinyin-letter')
inputVal.text(inputVal.text() + $(e.target).text())
const focusEl = $(defaults.el) const focusEl = $(defaults.el)
focusEl.val(focusEl.val() + $(e.target).text()) focusEl.val(focusEl.val() + $(e.target).text())
dispatchInputEvent(focusEl) dispatchInputEvent(focusEl)

@ -599,7 +599,7 @@
$(this).click((event) => { $(this).click((event) => {
console.log('键盘点击事件') console.log('键盘点击事件')
var placeholderList =['选择日期','选择时间'] var placeholderList =['选择日期','选择时间']
console.log(event.target.placeholder,'键盘弹出事件') console.log(event,'键盘弹出事件2')
if( placeholderList.indexOf(event.target.placeholder) !== -1 || event.target.value && event.target.value.includes('页')) return if( placeholderList.indexOf(event.target.placeholder) !== -1 || event.target.value && event.target.value.includes('页')) return
if(event.target.getAttribute("keyboard") == "no") return if(event.target.getAttribute("keyboard") == "no") return
if (!['INPUT'].includes(event.target.tagName)) return if (!['INPUT'].includes(event.target.tagName)) return
@ -720,14 +720,17 @@
// 点击数字或字母按键响应函数 // 点击数字或字母按键响应函数
function pressNumberOrLetterKey (e) { function pressNumberOrLetterKey (e) {
console.log(e,'点击数字')
if (defaults.ZH) { if (defaults.ZH) {
// 中文输入状态下,如果按下的不是字母按键(数字键),认为是无意义输入 // 中文输入状态下,如果按下的不是字母按键(数字键),认为是无意义输入
console.log(e,112)
if (!$(e.target).hasClass('letter')) return if (!$(e.target).hasClass('letter')) return
$('.outputZone').show() $('.outputZone').show()
const inputVal = $('.virtualkeyboard .zh-pinyin-letter') const inputVal = $('.virtualkeyboard .zh-pinyin-letter')
inputVal.text(inputVal.text() + $(e.target).text()) inputVal.text(inputVal.text() + $(e.target).text())
updateZHWords(e) updateZHWords(e)
} else { } else {
console.log(e,'英文')
const focusEl = $(defaults.el) const focusEl = $(defaults.el)
focusEl.val(focusEl.val() + $(e.target).text()) focusEl.val(focusEl.val() + $(e.target).text())
dispatchInputEvent(focusEl) dispatchInputEvent(focusEl)

Loading…
Cancel
Save