|
@@ -1111,9 +1111,6 @@ export default {
|
|
|
corrosionType: [
|
|
|
{ required: true, message: this.$t('腐蚀类型')+this.$t('不能为空'), trigger: "change" }
|
|
|
],
|
|
|
- inspectionMethod: [
|
|
|
- { required: true, message: this.$t('检测方法')+this.$t('不能为空'), trigger: "blur" }
|
|
|
- ],
|
|
|
/*analysis: [
|
|
|
{ required: true, message: "原因分析不能为空", trigger: "blur" }
|
|
|
],*/
|
|
@@ -1288,7 +1285,11 @@ export default {
|
|
|
const id = row.id || this.ids
|
|
|
getThickness(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
- this.form.inspectionMethod = this.form.inspectionMethod.split(",");
|
|
|
+ if (this.form.inspectionMethod) {
|
|
|
+ this.form.inspectionMethod = this.form.inspectionMethod.split(",");
|
|
|
+ }else {
|
|
|
+ this.form.inspectionMethod = []
|
|
|
+ }
|
|
|
this.open = true;
|
|
|
this.title = this.$t('修改') + this.$t('定点测厚');
|
|
|
if (this.form.photo!= null){
|
|
@@ -1313,7 +1314,11 @@ export default {
|
|
|
const id = row.id
|
|
|
getThickness(id).then(response => {
|
|
|
this.dataForm = response.data;
|
|
|
- this.dataForm.inspectionMethod = this.dataForm.inspectionMethod.split(",");
|
|
|
+ if (this.dataForm.inspectionMethod) {
|
|
|
+ this.dataForm.inspectionMethod = this.dataForm.inspectionMethod.split(",");
|
|
|
+ }else {
|
|
|
+ this.dataForm.inspectionMethod = []
|
|
|
+ }
|
|
|
this.visible = true;
|
|
|
this.title = this.$t('查看') + this.$t('定点测厚');
|
|
|
if (this.dataForm.photo!= null){
|
|
@@ -1343,7 +1348,11 @@ export default {
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- this.form.inspectionMethod = this.form.inspectionMethod.join(",");
|
|
|
+ if (this.form.inspectionMethod) {
|
|
|
+ this.form.inspectionMethod = this.form.inspectionMethod.join(",");
|
|
|
+ }else {
|
|
|
+ this.form.inspectionMethod = ''
|
|
|
+ }
|
|
|
if (this.form.id != null) {
|
|
|
updateThickness(this.form).then(response => {
|
|
|
this.msgSuccess(this.$t('修改成功'));
|