|
|
@@ -123,15 +123,16 @@ function normalizeAsset(identity, source) {
|
|
|
devices: assetDevices(attributes),
|
|
|
attachments: assetAttachments(attributes),
|
|
|
sections: compactSections([
|
|
|
- section('基本信息', [field('设施编码(code)', source.code || identity.id), field('设施类别(category)', facilityCategoryText(category)), field('运行状态(status)', status), field('数据更新时间(updatedAt)', source.updatedAt)]),
|
|
|
- section('位置与归属', [field('位置描述(location)', location, true), field('所属片区(districtName)', source.districtName), field('坐标(coordinates)', coordinatesText(source.coordinates), true)]),
|
|
|
+ section('基本信息', [field('设施编码', source.code || identity.id), field('设施类别', facilityCategoryText(category)), field('运行状态', status), field('数据更新时间', source.updatedAt)]),
|
|
|
+ section('位置与归属', [field('位置描述', location, true), field('所属片区', source.districtName), field('坐标', coordinatesText(source.coordinates), true)]),
|
|
|
section('业务详情', fields),
|
|
|
]),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/** 设施状态 → 语义色键(0 正常=绿、1 维护中=黄、2 异常=红;认不出走中性)。 */
|
|
|
-function facilityStatusTone(status) {
|
|
|
+/** 设施状态 → 语义色键(0 正常=绿、1 维护中=黄、2 异常=红;认不出走中性)。
|
|
|
+ * 维护者第 15 轮:运行信息的指标行也要按设施状态着色,所以本函数对外导出(原先是模块私有)。 */
|
|
|
+export function facilityStatusTone(status) {
|
|
|
const code = status === null || status === undefined ? '' : String(status).trim()
|
|
|
if (code === '0') return 'lv4'
|
|
|
if (code === '1') return 'lv2'
|
|
|
@@ -201,9 +202,9 @@ function codedText(value, dictionary, withCode = false) {
|
|
|
return withCode ? `${label}(${code})` : label
|
|
|
}
|
|
|
|
|
|
-/** 类别显示名:「中文(英文码)」;认不出的类别只回码。 */
|
|
|
+/** 类别显示名:一律中文(维护者 2026-10-29:取消英文括注)。 */
|
|
|
export function facilityCategoryText(category) {
|
|
|
- return codedText(category, FACILITY_CATEGORY_TEXT, true)
|
|
|
+ return codedText(category, FACILITY_CATEGORY_TEXT)
|
|
|
}
|
|
|
|
|
|
/** 设施状态(0 正常 / 1 维护中 / 2 异常)→ 中文;空值如实空。 */
|
|
|
@@ -228,20 +229,20 @@ export function facilityStatusText(status) {
|
|
|
function pipesFields(a) {
|
|
|
const drainage = String(a.networkType ?? '').trim() === '1'
|
|
|
return [
|
|
|
- { label: '管网类型(networkType)', key: 'networkType', format: (v) => codedText(v, NETWORK_TYPE_TEXT, true) },
|
|
|
+ { label: '管网类型', key: 'networkType', format: (v) => codedText(v, NETWORK_TYPE_TEXT) },
|
|
|
// 二级分类=原来的"管网等级":后端 network_level 只用于区分排水管道(污水/雨水)。
|
|
|
// 非排水管这个字段没有业务含义,按要求显示「—」而不是隐藏。
|
|
|
{
|
|
|
- label: '二级分类(networkLevel)',
|
|
|
+ label: '二级分类',
|
|
|
key: 'networkLevel',
|
|
|
always: true,
|
|
|
- format: (v) => (drainage ? codedText(v, NETWORK_LEVEL_TEXT, true) : ''),
|
|
|
+ format: (v) => (drainage ? codedText(v, NETWORK_LEVEL_TEXT) : ''),
|
|
|
invalidNote: drainage ? '' : '仅排水管道适用',
|
|
|
},
|
|
|
{ label: '长度', key: 'lengthMeters', unit: '米' },
|
|
|
{ label: '管径', key: 'diameterMillimeters', unit: '毫米' },
|
|
|
{ label: '材质', key: 'material' },
|
|
|
- { label: '管养单位(managementUnit)', key: 'managementUnit' },
|
|
|
+ { label: '管养单位', key: 'managementUnit' },
|
|
|
{ label: '建设日期', key: 'buildDate' },
|
|
|
{ label: '备注', key: 'remark', wide: true },
|
|
|
]
|
|
|
@@ -250,7 +251,7 @@ function pipesFields(a) {
|
|
|
const ASSET_FIELD_ROWS = {
|
|
|
PIPE_NETWORK: null, // 见 pipesFields():需要按管网类型决定二级分类是否适用
|
|
|
WATER_PLANT: [
|
|
|
- { label: '水源类型(waterSourceType)', key: 'waterSourceType' },
|
|
|
+ { label: '水源类型', key: 'waterSourceType' },
|
|
|
{ label: '设计能力', key: 'designCapacity', unit: '万m³/d' },
|
|
|
{ label: '当前能力', key: 'currentCapacity', unit: '万m³/d' },
|
|
|
{ label: '处理工艺', key: 'treatmentProcess', wide: true },
|
|
|
@@ -261,9 +262,9 @@ const ASSET_FIELD_ROWS = {
|
|
|
{ label: '备注', key: 'remark', wide: true },
|
|
|
],
|
|
|
ENGINEERING_FACILITY: [
|
|
|
- { label: '设施类型(facilityType)', key: 'facilityType', format: (v) => codedText(v, ENGINEERING_FACILITY_TYPE_TEXT, true) },
|
|
|
+ { label: '设施类型', key: 'facilityType', format: (v) => codedText(v, ENGINEERING_FACILITY_TYPE_TEXT) },
|
|
|
{ label: '设施等级', key: 'facilityLevel' },
|
|
|
- { label: '管理单位(managementUnit)', key: 'managementUnit' },
|
|
|
+ { label: '管理单位', key: 'managementUnit' },
|
|
|
{ label: '建设日期', key: 'buildDate' },
|
|
|
{ label: '设计流量', key: 'designFlow', unit: 'm³/s' },
|
|
|
{ label: '设计扬程', key: 'designHead', unit: 'm' },
|
|
|
@@ -272,7 +273,7 @@ const ASSET_FIELD_ROWS = {
|
|
|
{ label: '备注', key: 'remark', wide: true },
|
|
|
],
|
|
|
PUMP_STATION: [
|
|
|
- { label: '泵站类型(stationType)', key: 'stationType' },
|
|
|
+ { label: '泵站类型', key: 'stationType' },
|
|
|
{ label: '水泵数量', key: 'pumpCount', unit: '台' },
|
|
|
{ label: '设计流量', key: 'designFlow', unit: 'm³/h' },
|
|
|
{ label: '设计扬程', key: 'designHead', unit: 'm' },
|
|
|
@@ -283,7 +284,7 @@ const ASSET_FIELD_ROWS = {
|
|
|
{ label: '备注', key: 'remark', wide: true },
|
|
|
],
|
|
|
EMERGENCY_RESOURCE: [
|
|
|
- { label: '设备类型(equipmentTypeId)', key: 'equipmentTypeId' },
|
|
|
+ { label: '设备类型', key: 'equipmentTypeId' },
|
|
|
{ label: '型号', key: 'model' },
|
|
|
{ label: '规格', key: 'specification', wide: true },
|
|
|
{ label: '制造商', key: 'manufacturer' },
|
|
|
@@ -292,18 +293,18 @@ const ASSET_FIELD_ROWS = {
|
|
|
{ label: '安装时间', key: 'installTime' },
|
|
|
{ label: '维护人', key: 'maintainer' },
|
|
|
{ label: '维护电话', key: 'maintainerPhone' },
|
|
|
- { label: '权属单位(ownershipUnit)', key: 'ownershipUnit' },
|
|
|
+ { label: '权属单位', key: 'ownershipUnit' },
|
|
|
{ label: '设备图片', key: 'image' },
|
|
|
{ label: '备注', key: 'remark', wide: true },
|
|
|
],
|
|
|
HAZARD: [
|
|
|
- { label: '隐患类型(hazardType)', key: 'hazardType' },
|
|
|
+ { label: '隐患类型', key: 'hazardType' },
|
|
|
{ label: '隐患等级', key: 'level' },
|
|
|
{ label: '来源', key: 'source' },
|
|
|
{ label: '隐患描述', key: 'description', wide: true },
|
|
|
- { label: '关联管网(networkId)', key: 'networkId' },
|
|
|
- { label: '关联设备(equipmentId)', key: 'equipmentId' },
|
|
|
- { label: '关联工单(workOrderId)', key: 'workOrderId' },
|
|
|
+ { label: '关联管网', key: 'networkId' },
|
|
|
+ { label: '关联设备', key: 'equipmentId' },
|
|
|
+ { label: '关联工单', key: 'workOrderId' },
|
|
|
{ label: '报告单位', key: 'reportUnit' },
|
|
|
{ label: '报告时间', key: 'reportTime' },
|
|
|
{ label: '整改方案', key: 'rectifyPlan', wide: true },
|
|
|
@@ -314,11 +315,11 @@ const ASSET_FIELD_ROWS = {
|
|
|
{ label: '备注', key: 'remark', wide: true },
|
|
|
],
|
|
|
PROTECTION_TARGET: [
|
|
|
- { label: '关联管网(networkId)', key: 'networkId' },
|
|
|
+ { label: '关联管网', key: 'networkId' },
|
|
|
{ label: '风险等级', key: 'riskLevel' },
|
|
|
{ label: '风险分值', key: 'riskScore', unit: '分' },
|
|
|
{ label: '风险颜色', key: 'riskColor' },
|
|
|
- { label: '评估模型(assessmentModel)', key: 'assessmentModel' },
|
|
|
+ { label: '评估模型', key: 'assessmentModel' },
|
|
|
{ label: '评估时间', key: 'assessmentTime' },
|
|
|
{ label: '风险因素', key: 'riskFactors', wide: true },
|
|
|
{ label: '危险源', key: 'hazardSources', wide: true },
|