fix 81093
This commit is contained in:
+20
-8
@@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ model.enterpriseStandardInspectRectifyPlan.enterpriseStandardInspectReport.baseClause }}</span>
|
||||
<span>{{ getNestedProperty(model, 'enterpriseStandardInspectRectifyPlan.enterpriseStandardInspectReport.baseClause') }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 标准内容或要求 -->
|
||||
@@ -32,7 +32,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ model.enterpriseStandardInspectRectifyPlan.enterpriseStandardInspectReport.standardRequire }}</span>
|
||||
<span>{{ getNestedProperty(model, 'enterpriseStandardInspectRectifyPlan.enterpriseStandardInspectReport.standardRequire') }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 整改单位 -->
|
||||
@@ -43,7 +43,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ model.enterpriseStandardInspectRectifyPlan.responseDepart_dictText }}</span>
|
||||
<span>{{ getNestedProperty(model, 'enterpriseStandardInspectRectifyPlan.responseDepart_dictText') }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 不符合项描述 -->
|
||||
@@ -54,7 +54,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ model.enterpriseStandardInspectRectifyPlan.issue }}</span>
|
||||
<span>{{ getNestedProperty(model, 'enterpriseStandardInspectRectifyPlan.issue') }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 整改措施 -->
|
||||
@@ -65,7 +65,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ model.enterpriseStandardInspectRectifyPlan.rectifyMeasure }}</span>
|
||||
<span>{{ getNestedProperty(model, 'enterpriseStandardInspectRectifyPlan.rectifyMeasure') }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 整改负责人 -->
|
||||
@@ -76,7 +76,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ model.enterpriseStandardInspectRectifyPlan.responseUserDictText }}</span>
|
||||
<span>{{ getNestedProperty(model, 'enterpriseStandardInspectRectifyPlan.responseUserDictText') }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 计划完成日期 -->
|
||||
@@ -87,7 +87,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ model.enterpriseStandardInspectRectifyPlan.planCompleteDate }}</span>
|
||||
<span>{{ getNestedProperty(model, 'enterpriseStandardInspectRectifyPlan.planCompleteDate') }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
this.operationType = val + ''
|
||||
},
|
||||
initData (data) {
|
||||
this.model = Object.assign({}, data)
|
||||
this.model = JSON.parse(JSON.stringify(data))
|
||||
this.operationType = data.operationType + ''
|
||||
// 给表单赋值
|
||||
this.formInline = {
|
||||
@@ -298,6 +298,18 @@ export default {
|
||||
// 禁用日期选择大于当前天
|
||||
disabledDate (date) {
|
||||
return date.isBefore(moment().add(1, 'days'), 'day')
|
||||
},
|
||||
// 获取深层次属性防止报错
|
||||
getNestedProperty (obj, prop) {
|
||||
const props = prop.split('.')
|
||||
let result = obj
|
||||
for (let i = 0; i < props.length; i++) {
|
||||
if (!result || typeof result !== 'object') {
|
||||
return ''
|
||||
}
|
||||
result = result[props[i]]
|
||||
}
|
||||
return result || ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user