|
@@ -109,18 +109,25 @@
|
|
|
width="150"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button @click="handleEdit(scope.row)" type="text" size="small"
|
|
|
+ <el-button
|
|
|
+ v-if="
|
|
|
+ scope.row.transferState !== -1 &&
|
|
|
+ (scope.row.transferAddr !== null ||
|
|
|
+ scope.row.transferAddr !== '')
|
|
|
+ "
|
|
|
+ @click="handleEdit(scope.row)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
>编辑</el-button
|
|
|
>
|
|
|
<el-button @click="handleClick(scope.row)" type="text" size="small"
|
|
|
>下载</el-button
|
|
|
>
|
|
|
-
|
|
|
<el-button
|
|
|
v-if="
|
|
|
scope.row.transferState == -1 &&
|
|
|
- (scope.row.transferFileAddr === null ||
|
|
|
- scope.row.transferFileAddr === '')
|
|
|
+ (scope.row.transferAddr === null ||
|
|
|
+ scope.row.transferAddr === '')
|
|
|
"
|
|
|
@click="editTransferState(scope.row, '转换')"
|
|
|
type="text"
|
|
@@ -186,11 +193,11 @@
|
|
|
<el-col :span="11">
|
|
|
<el-form-item
|
|
|
:label="item.transferTypeName + ':'"
|
|
|
- :prop="'transferFileAddr_' + index"
|
|
|
+ :prop="'transferAddr_' + index"
|
|
|
:rules="getFileAddrRules(index)"
|
|
|
>
|
|
|
<el-input
|
|
|
- v-model="item.transferFileAddr"
|
|
|
+ v-model="item.transferAddr"
|
|
|
:placeholder="'请输入' + item.transferTypeName"
|
|
|
size="small"
|
|
|
></el-input>
|
|
@@ -260,7 +267,7 @@
|
|
|
newEditForm.dataTransferTypePathDtoList[0].transferTypeName +
|
|
|
':'
|
|
|
"
|
|
|
- prop="dataTransferTypePathDtoList.0.transferFileAddr"
|
|
|
+ prop="dataTransferTypePathDtoList.0.transferAddr"
|
|
|
>
|
|
|
<!-- :rules="{
|
|
|
required: true,
|
|
@@ -272,7 +279,7 @@
|
|
|
<el-input
|
|
|
disabled
|
|
|
v-model="
|
|
|
- newEditForm.dataTransferTypePathDtoList[0].transferFileAddr
|
|
|
+ newEditForm.dataTransferTypePathDtoList[0].transferAddr
|
|
|
"
|
|
|
:placeholder="
|
|
|
'请输入' +
|
|
@@ -386,7 +393,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
editTransferStateForm: {
|
|
|
- transferFileAddr: "",
|
|
|
+ transferAddr: "",
|
|
|
},
|
|
|
editTransferStateTitle: "",
|
|
|
editTransferStateLoading: false,
|
|
@@ -471,8 +478,7 @@ export default {
|
|
|
if (valid) {
|
|
|
this.loadingViewEdit = true;
|
|
|
dataTransfer({
|
|
|
- dataTransferFileAddr:
|
|
|
- this.editTransferStateForm.dataTransferTypePath,
|
|
|
+ dataTransferAddr: this.editTransferStateForm.dataTransferTypePath,
|
|
|
dataTransferType: this.editTransferStateForm.transferType,
|
|
|
batchCode: this.editTransferStateForm.batchCode,
|
|
|
})
|
|
@@ -510,6 +516,7 @@ export default {
|
|
|
};
|
|
|
this.editNuedialog = false;
|
|
|
this.loadingViewEdit = false;
|
|
|
+ this.getTableList();
|
|
|
},
|
|
|
editly(formName) {
|
|
|
this.$refs[formName].validate((valid) => {
|
|
@@ -518,7 +525,7 @@ export default {
|
|
|
editTimeGranularityQuery({
|
|
|
timeGranularity:
|
|
|
this.newEditForm.dataTransferTypePathDtoList[0].timeGranularity,
|
|
|
- transferType:
|
|
|
+ dataTransferType:
|
|
|
this.newEditForm.dataTransferTypePathDtoList[0].transferType,
|
|
|
batchCode: this.newEditForm.batchCode,
|
|
|
})
|
|
@@ -527,7 +534,7 @@ export default {
|
|
|
message: "编辑成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
- this.getTableList();
|
|
|
+
|
|
|
this.editCancel();
|
|
|
})
|
|
|
.catch((error) => {
|
|
@@ -552,9 +559,9 @@ export default {
|
|
|
];
|
|
|
},
|
|
|
validateFileAddr(rule, value, callback) {
|
|
|
- // 判断是否至少有一项 transferFileAddr 有值
|
|
|
+ // 判断是否至少有一项 transferAddr 有值
|
|
|
const hasFileAddr = this.newform.dataTransferTypePathDtoList.some(
|
|
|
- (item) => item.transferFileAddr
|
|
|
+ (item) => item.transferAddr
|
|
|
);
|
|
|
if (!hasFileAddr) {
|
|
|
callback(new Error("请至少填写一个数据路径"));
|
|
@@ -563,9 +570,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
validateTimeGranularity(rule, value, callback, index) {
|
|
|
- // 判断对应的 transferFileAddr 有值,则对应的 timeGranularity 也必须有值
|
|
|
+ // 判断对应的 transferAddr 有值,则对应的 timeGranularity 也必须有值
|
|
|
const currentItem = this.newform.dataTransferTypePathDtoList[index];
|
|
|
- if (currentItem.transferFileAddr && !currentItem.timeGranularity) {
|
|
|
+ if (currentItem.transferAddr && !currentItem.timeGranularity) {
|
|
|
callback(new Error("请填写时间粒度"));
|
|
|
} else {
|
|
|
callback();
|