|
@@ -60,6 +60,10 @@
|
|
|
:cell-style="rowStyle"
|
|
:cell-style="rowStyle"
|
|
|
stripe
|
|
stripe
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
|
|
+ :row-key="(row) => row.uniqueCode"
|
|
|
|
|
+ lazy
|
|
|
|
|
+ :load="load"
|
|
|
|
|
+ :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
|
|
>
|
|
>
|
|
|
<!-- Table Columns -->
|
|
<!-- Table Columns -->
|
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -167,45 +171,48 @@
|
|
|
min-width="150"
|
|
min-width="150"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
|
|
- v-if="
|
|
|
|
|
- scope.row.transferState !== -1 &&
|
|
|
|
|
- (scope.row.transferAddr !== null ||
|
|
|
|
|
- scope.row.transferAddr !== '')
|
|
|
|
|
- "
|
|
|
|
|
- v-hasPermi="['dataManage:dataAdministration:edit']"
|
|
|
|
|
- @click="handleEdit(scope.row)"
|
|
|
|
|
- type="text"
|
|
|
|
|
- size="small"
|
|
|
|
|
- >编辑</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button
|
|
|
|
|
- @click="handleClick(scope.row.downloadUrl)"
|
|
|
|
|
- type="text"
|
|
|
|
|
- size="small"
|
|
|
|
|
- >下载</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button
|
|
|
|
|
- v-if="
|
|
|
|
|
- scope.row.transferState == -1 &&
|
|
|
|
|
- (scope.row.transferAddr === null ||
|
|
|
|
|
- scope.row.transferAddr === '')
|
|
|
|
|
- "
|
|
|
|
|
- v-hasPermi="['dataManage:dataAdministration:editState']"
|
|
|
|
|
- @click="editTransferState(scope.row, '转换')"
|
|
|
|
|
- type="text"
|
|
|
|
|
- size="small"
|
|
|
|
|
- >转换</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button
|
|
|
|
|
- v-else
|
|
|
|
|
- @click="editTransferState(scope.row, '重新转换')"
|
|
|
|
|
- type="text"
|
|
|
|
|
- size="small"
|
|
|
|
|
- v-hasPermi="['dataManage:dataAdministration:editState']"
|
|
|
|
|
- :disabled="scope.row.transferState == 0"
|
|
|
|
|
- >重新转换</el-button
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <div v-if="scope.row.transferType">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ scope.row.transferState !== -1 &&
|
|
|
|
|
+ (scope.row.transferAddr !== null ||
|
|
|
|
|
+ scope.row.transferAddr !== '')
|
|
|
|
|
+ "
|
|
|
|
|
+ v-hasPermi="['dataManage:dataAdministration:edit']"
|
|
|
|
|
+ @click="handleEdit(scope.row)"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ >编辑</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ @click="handleClick(scope.row.downloadUrl)"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ >下载</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ scope.row.transferState == -1 &&
|
|
|
|
|
+ (scope.row.transferAddr === null ||
|
|
|
|
|
+ scope.row.transferAddr === '')
|
|
|
|
|
+ "
|
|
|
|
|
+ v-hasPermi="['dataManage:dataAdministration:editState']"
|
|
|
|
|
+ @click="editTransferState(scope.row, '转换')"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ >转换</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-else
|
|
|
|
|
+ @click="editTransferState(scope.row, '重新转换')"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ v-hasPermi="['dataManage:dataAdministration:editState']"
|
|
|
|
|
+ :disabled="scope.row.transferState == 0"
|
|
|
|
|
+ >重新转换</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else>/</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -268,7 +275,7 @@
|
|
|
>
|
|
>
|
|
|
<i class="el-icon-question"></i>
|
|
<i class="el-icon-question"></i>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
- {{ item.transferTypeName + ":" }}
|
|
|
|
|
|
|
+ {{ item.transferTypeName + "路径" + ":" }}
|
|
|
</span>
|
|
</span>
|
|
|
<el-input
|
|
<el-input
|
|
|
:min="1"
|
|
:min="1"
|
|
@@ -281,7 +288,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="13">
|
|
<el-col :span="13">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
- :label="item.timeGranularityName + ':'"
|
|
|
|
|
|
|
+ :label="item.transferTypeName + '时间粒度' + ':'"
|
|
|
:prop="'timeGranularity_' + index"
|
|
:prop="'timeGranularity_' + index"
|
|
|
:rules="getTimeGranularityRules(index)"
|
|
:rules="getTimeGranularityRules(index)"
|
|
|
>
|
|
>
|
|
@@ -289,7 +296,7 @@
|
|
|
type="number"
|
|
type="number"
|
|
|
:min="1"
|
|
:min="1"
|
|
|
v-model="item.timeGranularity"
|
|
v-model="item.timeGranularity"
|
|
|
- :placeholder="'请输入' + item.timeGranularityName"
|
|
|
|
|
|
|
+ :placeholder="'请输入' + item.transferTypeName"
|
|
|
size="small"
|
|
size="small"
|
|
|
@input="ensureMinValue(item, 'timeGranularity')"
|
|
@input="ensureMinValue(item, 'timeGranularity')"
|
|
|
>
|
|
>
|
|
@@ -351,7 +358,9 @@
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
{{
|
|
{{
|
|
|
newEditForm.dataTransferTypePathDtoList[0]
|
|
newEditForm.dataTransferTypePathDtoList[0]
|
|
|
- .transferTypeName + ":"
|
|
|
|
|
|
|
+ .transferTypeName +
|
|
|
|
|
+ "路径" +
|
|
|
|
|
+ ":"
|
|
|
}}
|
|
}}
|
|
|
</span>
|
|
</span>
|
|
|
<!-- :rules="{
|
|
<!-- :rules="{
|
|
@@ -378,16 +387,16 @@
|
|
|
<el-col :span="13">
|
|
<el-col :span="13">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
:label="
|
|
:label="
|
|
|
- newEditForm.dataTransferTypePathDtoList[0]
|
|
|
|
|
- .timeGranularityName + ':'
|
|
|
|
|
|
|
+ newEditForm.dataTransferTypePathDtoList[0].transferTypeName +
|
|
|
|
|
+ '时间粒度' +
|
|
|
|
|
+ ':'
|
|
|
"
|
|
"
|
|
|
prop="dataTransferTypePathDtoList.0.timeGranularity"
|
|
prop="dataTransferTypePathDtoList.0.timeGranularity"
|
|
|
:rules="{
|
|
:rules="{
|
|
|
required: true,
|
|
required: true,
|
|
|
message:
|
|
message:
|
|
|
'请输入' +
|
|
'请输入' +
|
|
|
- newEditForm.dataTransferTypePathDtoList[0]
|
|
|
|
|
- .timeGranularityName,
|
|
|
|
|
|
|
+ newEditForm.dataTransferTypePathDtoList[0].transferTypeName,
|
|
|
trigger: 'blur',
|
|
trigger: 'blur',
|
|
|
}"
|
|
}"
|
|
|
>
|
|
>
|
|
@@ -399,8 +408,7 @@
|
|
|
"
|
|
"
|
|
|
:placeholder="
|
|
:placeholder="
|
|
|
'请输入' +
|
|
'请输入' +
|
|
|
- newEditForm.dataTransferTypePathDtoList[0]
|
|
|
|
|
- .timeGranularityName
|
|
|
|
|
|
|
+ newEditForm.dataTransferTypePathDtoList[0].transferTypeName
|
|
|
"
|
|
"
|
|
|
size="small"
|
|
size="small"
|
|
|
>
|
|
>
|
|
@@ -478,7 +486,7 @@
|
|
|
>
|
|
>
|
|
|
<i class="el-icon-question"></i>
|
|
<i class="el-icon-question"></i>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
- {{ editTransferStateForm.transferTypeName + ":" }}
|
|
|
|
|
|
|
+ {{ editTransferStateForm.transferTypeName + "路径" + ":" }}
|
|
|
</span>
|
|
</span>
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="editTransferStateForm.dataTransferTypePath"
|
|
v-model="editTransferStateForm.dataTransferTypePath"
|
|
@@ -632,6 +640,20 @@ export default {
|
|
|
this.getBatchCodeList();
|
|
this.getBatchCodeList();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ load(tree, treeNode, resolve) {
|
|
|
|
|
+ console.log(tree, "tree");
|
|
|
|
|
+ const { batchCode } = tree; // 假设每行都有唯一的 id
|
|
|
|
|
+ // 调用接口获取子级数据
|
|
|
|
|
+ queryDataTransferByBatchCode({ batchCode })
|
|
|
|
|
+ .then((data) => {
|
|
|
|
|
+ console.log(data, "data");
|
|
|
|
|
+ resolve(data.data);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((error) => {
|
|
|
|
|
+ console.error("Failed to load child nodes", error);
|
|
|
|
|
+ resolve([]); // 确保 resolve 被调用
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
handleCloses(done) {
|
|
handleCloses(done) {
|
|
|
this.$confirm("确认关闭?")
|
|
this.$confirm("确认关闭?")
|
|
|
.then((_) => {
|
|
.then((_) => {
|
|
@@ -746,6 +768,10 @@ export default {
|
|
|
windCode: this.forPltFrom.fieldCode,
|
|
windCode: this.forPltFrom.fieldCode,
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.forPltRef.reset("fromPlt");
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
handleEdit(row) {
|
|
handleEdit(row) {
|
|
@@ -921,11 +947,17 @@ export default {
|
|
|
async getTableList() {
|
|
async getTableList() {
|
|
|
try {
|
|
try {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
- const result = await queryDataTransferList({
|
|
|
|
|
|
|
+ const result = await queryDataTransferGroup({
|
|
|
...this.formInline,
|
|
...this.formInline,
|
|
|
totalSize: undefined,
|
|
totalSize: undefined,
|
|
|
});
|
|
});
|
|
|
- this.tableData = result.data.list;
|
|
|
|
|
|
|
+ this.tableData = result.data.list.map((item) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ hasChildren: true,
|
|
|
|
|
+ children: [],
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
this.formInline.totalSize = result.data.totalSize;
|
|
this.formInline.totalSize = result.data.totalSize;
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -985,11 +1017,17 @@ export default {
|
|
|
|
|
|
|
|
async fetchData() {
|
|
async fetchData() {
|
|
|
try {
|
|
try {
|
|
|
- const result = await queryDataTransferList({
|
|
|
|
|
|
|
+ const result = await queryDataTransferGroup({
|
|
|
...this.formInline,
|
|
...this.formInline,
|
|
|
totalSize: undefined,
|
|
totalSize: undefined,
|
|
|
});
|
|
});
|
|
|
- this.tableData = result.data.list;
|
|
|
|
|
|
|
+ this.tableData = result.data.list.map((item) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ hasChildren: true,
|
|
|
|
|
+ children: [],
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
this.formInline.totalSize = result.data.totalSize;
|
|
this.formInline.totalSize = result.data.totalSize;
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
this.$message({
|
|
this.$message({
|