|
@@ -310,7 +310,7 @@
|
|
|
<script setup>
|
|
|
import { computed, ref, onMounted, reactive, toRef } from "vue";
|
|
|
import { request, uploadFile } from "@/utils/request";
|
|
|
-import { ElMessage, ElButton, ElDialog, ElSelect } from 'element-plus'
|
|
|
+import { ElMessage, ElButton, ElDialog, ElSelect, formEmits } from 'element-plus'
|
|
|
import icon from "@/assets/img/icon.png";
|
|
|
import Frame2 from "@/assets/img/Frame2.png";
|
|
|
import t1 from "@/assets/img/t1.png";
|
|
@@ -499,6 +499,8 @@ const accident = () => {
|
|
|
if (idobj.value.name == '') {
|
|
|
ElMessage.error('请选择项目')
|
|
|
} else {
|
|
|
+ rizhi.value.logs='';
|
|
|
+ newlog.value ='';
|
|
|
emit('headerclick', sgdata.value);
|
|
|
dialog.value.dialogVisible_fire = false;
|
|
|
emit('childfun');
|
|
@@ -631,11 +633,12 @@ const pollute = () => {
|
|
|
request(params)
|
|
|
.then((res) => {
|
|
|
options.value = res.rows;
|
|
|
- value.value= res.rows[0].code.split(',');
|
|
|
- console.log( value.value);
|
|
|
- tuiyanobj2.value.coids=res.rows[0].coid;
|
|
|
- tuiyanobj2.value.value= value.value;
|
|
|
-
|
|
|
+ // value.value= res.rows[0].code.split(',');
|
|
|
+ // tuiyanobj2.value.coids=res.rows[0].coid;
|
|
|
+ // tuiyanobj2.value.value= value.value;
|
|
|
+ value.value.push(res.rows[0]);
|
|
|
+ // tuiyanobj2.value.cocodes =res.rows[0].code;
|
|
|
+ // tuiyanobj2.value.coids=res.rows[0].coid;
|
|
|
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -644,7 +647,9 @@ const pollute = () => {
|
|
|
}
|
|
|
//任务求解任务信息
|
|
|
const rewu=()=>{
|
|
|
+
|
|
|
arrvalue.value=[];
|
|
|
+
|
|
|
const params = {
|
|
|
transCode: 'D10017',
|
|
|
aid:aid.value,
|
|
@@ -652,15 +657,27 @@ const rewu=()=>{
|
|
|
request(params)
|
|
|
.then((res) => {
|
|
|
arrvalue.value=res.cocodes.split(',');
|
|
|
+ tuiyanobj.value=res;
|
|
|
+ tuiyanobj.value.pickertime=res.acctime;
|
|
|
+ console.log(tuiyanobj.value.acctime)
|
|
|
+ console.log(options.value.length);
|
|
|
value.value=arrvalue.value;
|
|
|
-tuiyanobj.value=res;
|
|
|
-tuiyanobj.value.pickertime=res.acctime;
|
|
|
-console.log(tuiyanobj.value.acctime)
|
|
|
+ value.value=[];
|
|
|
+ for (let i = 0; i <options.value.length; i++){
|
|
|
+ console.log(options.value[i])
|
|
|
+ for (let j = 0; j < arrvalue.value.length; j++){
|
|
|
+ if(options.value[i].code==arrvalue.value[j]){
|
|
|
+ value.value.push(options.value[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
// ElMessage.error(err.returnMsg)
|
|
|
addinitial();
|
|
|
})
|
|
|
+
|
|
|
}
|
|
|
//默认时间
|
|
|
const inititimeDefaultal = () => {
|
|
@@ -678,22 +695,13 @@ const initial = () => {
|
|
|
}
|
|
|
const addinitial=()=>{
|
|
|
if (classradio.value == "Fire") {
|
|
|
- // options.value.coid = ["CO2"];
|
|
|
- // selectchange(val);
|
|
|
- // options.value.coid = tuiyanobj2.value.coids;
|
|
|
- value.value=[{
|
|
|
- code: "SO2",
|
|
|
- coid: 1,
|
|
|
- density: 0,
|
|
|
- diffcoe: 0.2,
|
|
|
- name: "二氧化硫",
|
|
|
- speheat: 0,
|
|
|
- }],
|
|
|
tuiyanobj2.value.pickertime = inititimeDefaultal();
|
|
|
tuiyanobj2.value.acctime = inititimeDefaultal();
|
|
|
+ tuiyanobj2.value.cocodes = options.value[0].code;
|
|
|
+ tuiyanobj2.value.coids=options.value[0].coid;
|
|
|
+ console.log(value.value);
|
|
|
tuiyanobj.value = tuiyanobj2.value;
|
|
|
- value.value=tuiyanobj2.value.value;
|
|
|
- console.log(tuiyanobj.value);
|
|
|
+ console.log(tuiyanobj2.value);
|
|
|
} else {
|
|
|
|
|
|
tuiyanobj3.value.pickertime = inititimeDefaultal();
|
|
@@ -802,7 +810,7 @@ const websocketonopen = (res) => {
|
|
|
};
|
|
|
// Websoket接收消息事件
|
|
|
const websocketonmessage = (res) => {
|
|
|
- console.log("数据", res);
|
|
|
+ // console.log("数据", res);
|
|
|
// console.log(res.data);
|
|
|
getthislog(res.data);
|
|
|
|