|
@@ -810,10 +810,9 @@ export default {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
-
|
|
|
- if ((this.form.flowDirectionX !== null && this.form.flowDirectionX !== '') ||
|
|
|
- (this.form.flowDirectionY !== null && this.form.flowDirectionY !== '') ||
|
|
|
- (this.form.flowDirectionZ !== null && this.form.flowDirectionZ !== '')){
|
|
|
+ if ((this.form.flowDirectionX !== null && this.form.flowDirectionX !== '' && this.form.flowDirectionX != "0") ||
|
|
|
+ (this.form.flowDirectionY !== null && this.form.flowDirectionY !== ''&& this.form.flowDirectionY != "0") ||
|
|
|
+ (this.form.flowDirectionZ !== null && this.form.flowDirectionZ !== ''&& this.form.flowDirectionZ != "0")){
|
|
|
updateFlowIn(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
@@ -824,9 +823,9 @@ export default {
|
|
|
this.$message.error('请保证来流方向X,Y,Z数据至少一项有效且取值不为0');
|
|
|
}
|
|
|
}else {
|
|
|
- if ((this.form.flowDirectionX !== null && this.form.flowDirectionX !== '') ||
|
|
|
- (this.form.flowDirectionY !== null && this.form.flowDirectionY !== '') ||
|
|
|
- (this.form.flowDirectionZ !== null && this.form.flowDirectionZ !== '')) {
|
|
|
+ if ((this.form.flowDirectionX !== null && this.form.flowDirectionX !== ''&& this.form.flowDirectionX != "0") ||
|
|
|
+ (this.form.flowDirectionY !== null && this.form.flowDirectionY !== ''&& this.form.flowDirectionY != "0") ||
|
|
|
+ (this.form.flowDirectionZ !== null && this.form.flowDirectionZ !== ''&& this.form.flowDirectionZ != "0")) {
|
|
|
addFlowIn(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|