|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<el-container style="height: 100%">
|
|
|
<el-header class="panel-header">
|
|
|
- <p>管网预览</p>
|
|
|
+ <p>{{ titlename }}</p>
|
|
|
<el-button style="border: none" @click="closePanel">
|
|
|
<el-icon><Close /></el-icon>
|
|
|
</el-button>
|
|
@@ -62,13 +62,16 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <div class="footbtn">
|
|
|
+ <el-button @click="savecomvalue">保存</el-button>
|
|
|
+ </div>
|
|
|
</Pane>
|
|
|
<Pane min-size="20" size="50" max-size="80">
|
|
|
<!-- <div>xia</div> -->
|
|
|
</Pane>
|
|
|
</Splitpanes>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="模拟数据" name="simulatedata" style="height: 100%">
|
|
|
+ <!-- <el-tab-pane label="模拟数据" name="simulatedata" style="height: 100%">
|
|
|
<Splitpanes horizontal>
|
|
|
<Pane min-size="20" size="50" max-size="80">
|
|
|
<div>shang</div>
|
|
@@ -77,7 +80,7 @@
|
|
|
<div>xia</div>
|
|
|
</Pane>
|
|
|
</Splitpanes>
|
|
|
- </el-tab-pane>
|
|
|
+ </el-tab-pane> -->
|
|
|
</el-tabs>
|
|
|
</el-main>
|
|
|
|
|
@@ -170,6 +173,7 @@ const activename = ref("data")
|
|
|
|
|
|
const emit = defineEmits(["close"])
|
|
|
|
|
|
+const titlename = ref();
|
|
|
const comdata = ref()
|
|
|
const paneTabledialog = ref(false)
|
|
|
const paneKVdialog = ref(false)
|
|
@@ -190,6 +194,7 @@ const getcomdata = (pcId) => {
|
|
|
|
|
|
request(params)
|
|
|
.then((res) => {
|
|
|
+ titlename.value = `${res.name}${res.idCode}${res.ser}`
|
|
|
comdata.value = res.rows
|
|
|
console.log("comdata.value", comdata.value)
|
|
|
|
|
@@ -203,6 +208,8 @@ const getcomdata = (pcId) => {
|
|
|
|
|
|
if (item.unitType !== "无") {
|
|
|
getlistopt(item, "unit")
|
|
|
+ }else {
|
|
|
+ item.unit = '无';
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -272,6 +279,32 @@ const handleClick = (row) => {
|
|
|
getbtnvalue(pcaId,dataType)
|
|
|
}
|
|
|
|
|
|
+const savecomvalue = () => {
|
|
|
+ console.log('comdata:',comdata.value)
|
|
|
+ // dataType 为 -1 的数据
|
|
|
+ const validItems = comdata.value.filter(item => item.dataType === -1);
|
|
|
+ const pcavals = validItems
|
|
|
+ .map(item => {
|
|
|
+ const pcaId = item.pcaId ?? "";
|
|
|
+ const val = item.val ?? "";
|
|
|
+ const unit = item.unit ?? "";
|
|
|
+ return `${pcaId},${val},${unit}`;
|
|
|
+ })
|
|
|
+ .join(';');
|
|
|
+ const params = {
|
|
|
+ transCode: "ES0008",
|
|
|
+ pcavals:pcavals
|
|
|
+ }
|
|
|
+ request(params)
|
|
|
+ .then((res) => {
|
|
|
+ ElMessage.success("保存成功");
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error("err", err)
|
|
|
+ ElMessage.error("保存失败")
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
defineExpose({
|
|
|
getcomdata
|
|
|
})
|
|
@@ -288,4 +321,11 @@ defineExpose({
|
|
|
max-height: 300px;
|
|
|
overflow: auto;
|
|
|
}
|
|
|
+
|
|
|
+.footbtn {
|
|
|
+ display: flex;
|
|
|
+ justify-content: end;
|
|
|
+ align-items: center;
|
|
|
+ padding: 10px 20px;
|
|
|
+}
|
|
|
</style>
|