|
@@ -21,7 +21,7 @@ import { exportMethod } from "@/api/utils.js";
|
|
|
/**配置参数 */
|
|
|
const treeHeight = ref(window.innerHeight - 260 + "px"); //tree高度
|
|
|
const excelHeight = ref(window.innerHeight - 260 + "px"); //excel高度
|
|
|
-const tableHeight = ref(window.innerHeight - 260 + "px");
|
|
|
+const tableHeight = ref(window.innerHeight - 260 + "px"); //table高度
|
|
|
|
|
|
/**tree 开始 */
|
|
|
const treeData = ref([]);
|
|
@@ -68,7 +68,6 @@ const funGetTree = async () => {
|
|
|
];
|
|
|
|
|
|
let resultDatabaesArray = [];
|
|
|
-
|
|
|
databaseNameArray.forEach((pEle) => {
|
|
|
pEle.forEach((cEle) => {
|
|
|
const someRes = blackList.some((someEle) => {
|
|
@@ -133,7 +132,6 @@ const funCurrentChange = async ({ current, currentNode }) => {
|
|
|
"myData",
|
|
|
JSON.stringify({ nxxy: databaseName, nxxy1: tableName })
|
|
|
);
|
|
|
-
|
|
|
//拿取表格数据
|
|
|
const res = await request.post(
|
|
|
"/rest/sql",
|
|
@@ -153,6 +151,7 @@ const funCurrentChange = async ({ current, currentNode }) => {
|
|
|
8: "rate",
|
|
|
9: "remark",
|
|
|
};
|
|
|
+
|
|
|
res.data.forEach((ele) => {
|
|
|
let dateItem = {};
|
|
|
for (let key in ele) {
|
|
@@ -177,16 +176,14 @@ const funCurrentChange = async ({ current, currentNode }) => {
|
|
|
ele?.[0] && nbdata.push(ele[0]);
|
|
|
});
|
|
|
// console.log(55555,nbdata);
|
|
|
-
|
|
|
stationList.value = nbdata;
|
|
|
|
|
|
- // console.log(7777777777, stationList.value);
|
|
|
+
|
|
|
if (stationList.value.length) {
|
|
|
queryForm.station = stationList.value[0];
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
const queryForm = reactive({
|
|
|
station: "",
|
|
|
tbname: "",
|
|
@@ -197,7 +194,7 @@ const queryForm = reactive({
|
|
|
const stationList = ref([]);
|
|
|
|
|
|
const funStationChange = (val) => {
|
|
|
- console.log(111111111111, val);
|
|
|
+ console.log('221', val);
|
|
|
queryForm.station = val;
|
|
|
};
|
|
|
|
|
@@ -225,8 +222,7 @@ const nbsubmit = async () => {
|
|
|
} limit ${pagenumber.value - 1}, ${pagenb.value}
|
|
|
`
|
|
|
);
|
|
|
-
|
|
|
- console.log(666666666666, res);
|
|
|
+ console.log('223', res);
|
|
|
let newdata = [];
|
|
|
const map = {
|
|
|
0: "point",
|
|
@@ -248,13 +244,11 @@ const nbsubmit = async () => {
|
|
|
// dateItem.databaseName = databaseName;
|
|
|
// dateItem.tableName = tableName;
|
|
|
newdata.push(dateItem);
|
|
|
- console.log("nbnbnb", newdata);
|
|
|
+ console.log("224", newdata);
|
|
|
});
|
|
|
- console.log(999999, newdata);
|
|
|
tableData.value = newdata;
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
// 下载建点
|
|
|
// const jianbao = async (urlKey) => {
|
|
|
// const requestUrl = config[urlKey];
|
|
@@ -285,7 +279,7 @@ const exportDepReceRank = () => {
|
|
|
let fileUplod = ref(null);
|
|
|
function changeUpload(UploadFile, uploadFiles) {
|
|
|
fileUplod.value = UploadFile.raw;
|
|
|
- console.log("996", fileUplod.value);
|
|
|
+ console.log("228", fileUplod.value);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -302,7 +296,7 @@ const fslist = async (urlKey) => {
|
|
|
console.log(formData);
|
|
|
const requestUrl = config[urlKey];
|
|
|
const res = await request.post(`${requestUrl}/taos/uploadexcel`, formData);
|
|
|
- console.log("nbnbnbnbn", res);
|
|
|
+ console.log("227", res);
|
|
|
};
|
|
|
|
|
|
// 路由传递数据
|
|
@@ -319,7 +313,6 @@ const dbclick = (a) => {
|
|
|
},
|
|
|
});
|
|
|
};
|
|
|
-
|
|
|
/**table 开始 */
|
|
|
const tableName = ref("");
|
|
|
const tableLoading = ref(false);
|
|
@@ -337,7 +330,6 @@ const pagenb = ref(100); //当前的条数
|
|
|
let myData = JSON.parse(sessionStorage.getItem("myData"));
|
|
|
|
|
|
// console.log("hahhah", pagenumber.value);
|
|
|
-
|
|
|
const left1 = async () => {
|
|
|
pagenumber.value -= 1;
|
|
|
let nbfist = (pagenumber.value - 1) * 100;
|
|
@@ -445,15 +437,13 @@ const queren = () => {
|
|
|
// editIndex.value = index;
|
|
|
// tableData.value.splice(editIndex.value, 1);
|
|
|
// };
|
|
|
-
|
|
|
// 选中
|
|
|
let selectedRows = reactive([]);
|
|
|
const handleSelectionChange = (selection) => {
|
|
|
- console.log("991", selection);
|
|
|
+ console.log("229", selection);
|
|
|
selectedRows = selection;
|
|
|
// console.log("992", selectedRows);
|
|
|
};
|
|
|
-
|
|
|
// 选中删除
|
|
|
const bdhandleDelete = () => {
|
|
|
ElMessageBox.confirm("确认要删除吗?", "Warning", {
|
|
@@ -546,8 +536,8 @@ onActivated(() => {
|
|
|
:before-upload="beforeUpload"
|
|
|
:auto-upload="false"
|
|
|
>
|
|
|
- <template #trigger>
|
|
|
- <el-button type="primary">选择文件</el-button>
|
|
|
+ <template #trigger >
|
|
|
+ <el-button type="primary" class="mt-2.5" >选择文件</el-button>
|
|
|
</template>
|
|
|
</el-upload>
|
|
|
<!-- 提交文件所上传的文件 -->
|
|
@@ -556,8 +546,7 @@ onActivated(() => {
|
|
|
</el-form-item>
|
|
|
<el-form-item class="!mb-0 ml-5">
|
|
|
<el-button @click="exportDepReceRank" type="primary"
|
|
|
- >下载建点、修改点模板</el-button
|
|
|
- >
|
|
|
+ >下载建点、修改点模板</el-button>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
|
|
@@ -575,7 +564,6 @@ onActivated(() => {
|
|
|
>
|
|
|
</tree-cop>
|
|
|
</el-col>
|
|
|
-
|
|
|
<el-col :span="19">
|
|
|
<div>
|
|
|
<el-scrollbar max-height="650px">
|
|
@@ -585,6 +573,7 @@ onActivated(() => {
|
|
|
@cell-dblclick="dbclick"
|
|
|
@row-contextmenu="handleContextMenu"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
+ :border ="true"
|
|
|
>
|
|
|
<el-table-column
|
|
|
type="selection"
|
|
@@ -594,16 +583,16 @@ onActivated(() => {
|
|
|
prop="point"
|
|
|
label="测点"
|
|
|
align="center"
|
|
|
- width="200"
|
|
|
+ width="270"
|
|
|
+ resizable
|
|
|
/>
|
|
|
-
|
|
|
<el-table-column
|
|
|
prop="description"
|
|
|
label="描述"
|
|
|
align="center"
|
|
|
width="200"
|
|
|
+ resizable
|
|
|
/>
|
|
|
-
|
|
|
<el-table-column
|
|
|
prop="ts"
|
|
|
label="时间"
|
|
@@ -611,23 +600,25 @@ onActivated(() => {
|
|
|
width="200"
|
|
|
/>
|
|
|
|
|
|
- <el-table-column prop="val" label="值" align="center" />
|
|
|
- <el-table-column prop="station" label="场站" align="center" />
|
|
|
- <el-table-column prop="category" label="类别" align="center" />
|
|
|
+ <el-table-column prop="val" label="值" align="center" resizable/>
|
|
|
+ <el-table-column prop="station" label="场站" align="center" resizable/>
|
|
|
+ <el-table-column prop="category" label="类别" align="center" resizable/>
|
|
|
<el-table-column
|
|
|
prop="equipment"
|
|
|
label="设备id"
|
|
|
align="center"
|
|
|
+ resizable
|
|
|
/>
|
|
|
<el-table-column
|
|
|
prop="uniformcode"
|
|
|
label="统一识别码"
|
|
|
align="center"
|
|
|
+ resizable
|
|
|
/>
|
|
|
- <el-table-column prop="rate" label="倍率" align="center" />
|
|
|
- <el-table-column prop="remark" label="备注" align="center" />
|
|
|
+ <el-table-column prop="rate" label="倍率" align="center" resizable/>
|
|
|
+ <el-table-column prop="remark" label="备注" align="center" resizable/>
|
|
|
|
|
|
- <el-table-column label="操作" width="200">
|
|
|
+ <el-table-column label="操作" >
|
|
|
<template #default="scope">
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -635,13 +626,6 @@ onActivated(() => {
|
|
|
circle
|
|
|
@click="handleEdit(scope.$index, scope.row)"
|
|
|
/>
|
|
|
-
|
|
|
- <!-- <el-button
|
|
|
- type="danger"
|
|
|
- :icon="Delete"
|
|
|
- circle
|
|
|
- @click="handleDelete(scope.$index, scope.row)"
|
|
|
- /> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|