|
|
|
@ -46,7 +46,11 @@ |
|
|
|
<el-table v-loading="loading" :data="list"> |
|
|
|
<el-table-column :label="$t('page.system.systemLog.czr')" prop="qmrMc" width="200" /> |
|
|
|
<el-table-column :label="$t('page.system.systemLog.czlx')" :prop="$i18n.locale === 'zh_CN'?'jcmc':'jcmcEn'" width="200" /> |
|
|
|
<el-table-column :label="$t('page.system.systemLog.czxq')" align="center" :prop="$i18n.locale === 'zh_CN'?'jcnr':'jcnrEn'" /> |
|
|
|
<el-table-column :label="$t('page.system.systemLog.czxq')" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{initNr(scope.row)}}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column :label="$t('page.business.archive.czsj')" align="center" prop="createTime" width="200" /> |
|
|
|
</el-table> |
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" |
|
|
|
@ -110,6 +114,51 @@ export default { |
|
|
|
this.loading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
initNr(row){ |
|
|
|
if(this.$i18n.locale === 'zh_CN'){ |
|
|
|
debugger |
|
|
|
if(this.isJSON(row.jcnr)){ |
|
|
|
let nr = '' |
|
|
|
_.forEach(JSON.parse(row.jcnr),(o)=>{ |
|
|
|
nr+=o.name+':'+o.value+' ' |
|
|
|
}) |
|
|
|
if(nr!==''){ |
|
|
|
nr+='、' |
|
|
|
} |
|
|
|
return nr |
|
|
|
}else{ |
|
|
|
return row.jcnr |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if(this.isJSON(row.jcnrEn)){ |
|
|
|
let nr = '' |
|
|
|
_.forEach(JSON.parse(row.jcnrEn),(o)=>{ |
|
|
|
nr+=o.name+':'+o.name+' ' |
|
|
|
}) |
|
|
|
if(nr!==''){ |
|
|
|
nr+='、' |
|
|
|
} |
|
|
|
return nr |
|
|
|
}else{ |
|
|
|
return row.jcnrEn |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
isJSON(str) { |
|
|
|
if (typeof str !== 'string') { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
const result = JSON.parse(str); |
|
|
|
|
|
|
|
// 可选:确保解析后是对象或数组,而不是简单类型 |
|
|
|
const type = Object.prototype.toString.call(result); |
|
|
|
return type === '[object Object]' || type === '[object Array]'; |
|
|
|
} catch (e) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|