diff --git a/src/views/auditPages/assetsManagement/assetsAuth.vue b/src/views/auditPages/assetsManagement/assetsAuth.vue index d80e0d7..1be40e3 100644 --- a/src/views/auditPages/assetsManagement/assetsAuth.vue +++ b/src/views/auditPages/assetsManagement/assetsAuth.vue @@ -2697,25 +2697,24 @@ export default { // 获取详情 getInfo(id){ assetInfo(id).then(res=>{ - console.log(res,"res"); this.ruleForm = res.data; - this.xttz = this.ruleForm.xttz.split(',') - this.chepingUnit = this.ruleForm.gylxxList.filter((item) => item.type == 1) - this.yjgysUnit = this.ruleForm.gylxxList.filter((item) => item.type == 2) - this.jfywUnit = this.ruleForm.gylxxList.filter((item) => item.type == 3) - this.xtsjUnit = this.ruleForm.gylxxList.filter((item) => item.type == 4) - this.xtjsUnit = this.ruleForm.gylxxList.filter((item) => item.type == 5) - this.xtyyUnit = this.ruleForm.gylxxList.filter((item) => item.type == 7) - this.aqfwUnit = this.ruleForm.gylxxList.filter((item) => item.type == 6) + this.ruleForm.xttz ? this.xttz = this.ruleForm.xttz.split(',') : []; + this.ruleForm.gylxxList.length > 0 ? this.chepingUnit = this.ruleForm.gylxxList.filter((item) => item.type == 1) : [] + this.ruleForm.gylxxList.length > 0 ? this.yjgysUnit = this.ruleForm.gylxxList.filter((item) => item.type == 2) : [] + this.ruleForm.gylxxList.length > 0 ? this.jfywUnit = this.ruleForm.gylxxList.filter((item) => item.type == 3) : [] + this.ruleForm.gylxxList.length > 0 ? this.xtsjUnit = this.ruleForm.gylxxList.filter((item) => item.type == 4) : [] + this.ruleForm.gylxxList.length > 0 ? this.xtjsUnit = this.ruleForm.gylxxList.filter((item) => item.type == 5) : [] + this.ruleForm.gylxxList.length > 0 ? this.xtyyUnit = this.ruleForm.gylxxList.filter((item) => item.type == 7) : [] + this.ruleForm.gylxxList.length > 0 ? this.aqfwUnit = this.ruleForm.gylxxList.filter((item) => item.type == 6) : [] - this.fwqxx = this.ruleForm.jcwlList.filter((item) => item.type == 1) - this.wlsb = this.ruleForm.jcwlList.filter((item) => item.type == 2) - this.aqsb = this.ruleForm.jcwlList.filter((item) => item.type == 3) + this.ruleForm.jcwlList.length > 0 ? this.fwqxx = this.ruleForm.jcwlList.filter((item) => item.type == 1) : [] + this.ruleForm.jcwlList.length > 0 ? this.wlsb = this.ruleForm.jcwlList.filter((item) => item.type == 2) : [] + this.ruleForm.jcwlList.length > 0 ? this.aqsb = this.ruleForm.jcwlList.filter((item) => item.type == 3) : [] - this.xtfhqkFcg = this.ruleForm.xtfhqkFcg.split(',') - this.xtfhqkFxl = this.ruleForm.xtfhqkFxl.split(',') - this.xtfhqkFzd = this.ruleForm.xtfhqkFzd.split(',') - this.xtfhqkFls = this.ruleForm.xtfhqkFls.split(',') + this.ruleForm.xtfhqkFcg ? this.xtfhqkFcg = this.ruleForm.xtfhqkFcg.split(',') : [] + this.ruleForm.xtfhqkFxl ? this.xtfhqkFxl = this.ruleForm.xtfhqkFxl.split(',') : [] + this.ruleForm.xtfhqkFzd ? this.xtfhqkFzd = this.ruleForm.xtfhqkFzd.split(',') : [] + this.ruleForm.xtfhqkFls ? this.xtfhqkFls = this.ruleForm.xtfhqkFls.split(',') : [] if(this.ruleForm.xjgywxt.remark) { this.radio = this.ruleForm.xjgywxt.remark;