|
|
@ -211,7 +211,8 @@ export default { |
|
|
|
listConfigAll: [], |
|
|
|
listConfigAll: [], |
|
|
|
previewVisible: false, |
|
|
|
previewVisible: false, |
|
|
|
previewHead: [], |
|
|
|
previewHead: [], |
|
|
|
previewData: [] |
|
|
|
previewData: [], |
|
|
|
|
|
|
|
submited: false, |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
@ -489,10 +490,13 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
confirm(){ |
|
|
|
confirm(){ |
|
|
|
|
|
|
|
if(this.submited) return false |
|
|
|
if(!this.productName) return this.$message.warning('请输入数据产品名称') |
|
|
|
if(!this.productName) return this.$message.warning('请输入数据产品名称') |
|
|
|
if(!this.market) return this.$message.warning('请输入市场价格') |
|
|
|
if(!this.market) return this.$message.warning('请输入市场价格') |
|
|
|
if(isNaN(this.market)) return this.$message.warning('市场价格请输入数字') |
|
|
|
if(isNaN(this.market)) return this.$message.warning('市场价格请输入数字') |
|
|
|
if(!this.$refs.type.getCheckedNodes().length) return this.$message.warning('请选择数据') |
|
|
|
if(!this.$refs.type.getCheckedNodes().length) return this.$message.warning('请选择数据') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.submited = true |
|
|
|
|
|
|
|
|
|
|
|
this.getIds().then(() => { |
|
|
|
this.getIds().then(() => { |
|
|
|
let tableId = Array.from(new Set(this.tableId)) |
|
|
|
let tableId = Array.from(new Set(this.tableId)) |
|
|
@ -515,13 +519,19 @@ export default { |
|
|
|
this.$message.success('新增成功') |
|
|
|
this.$message.success('新增成功') |
|
|
|
this.productVisible = false |
|
|
|
this.productVisible = false |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
}).catch(res => {}) |
|
|
|
this.submited = false |
|
|
|
|
|
|
|
}).catch(res => { |
|
|
|
|
|
|
|
this.submited = false |
|
|
|
|
|
|
|
}) |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
this.$post(this.api.saveProduct,data).then(res => { |
|
|
|
this.$post(this.api.saveProduct,data).then(res => { |
|
|
|
this.$message.success('新增成功') |
|
|
|
this.$message.success('新增成功') |
|
|
|
this.productVisible = false |
|
|
|
this.productVisible = false |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
}).catch(res => {}) |
|
|
|
this.submited = false |
|
|
|
|
|
|
|
}).catch(res => { |
|
|
|
|
|
|
|
this.submited = false |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|