|
|
@@ -21,6 +21,12 @@ export const productionStatusMap: Record<string | number, { label: string; value
|
|
|
// 15: { label: '已关闭矿井', value: 15, color: 'green' },
|
|
|
};
|
|
|
|
|
|
+// 基于productionStatusMap生成下拉选项
|
|
|
+export const productionStatusOptions = Object.entries(productionStatusMap).map(([key, item]) => ({
|
|
|
+ label: item.label, // 状态名称
|
|
|
+ value: key, // 状态值(转字符串,和原硬编码格式一致)
|
|
|
+}));
|
|
|
+
|
|
|
// 颜色映射
|
|
|
const colorHexMap: Record<string, string> = {
|
|
|
blue: '#1890ff',
|
|
|
@@ -59,7 +65,6 @@ export const columns: BasicColumn[] = [
|
|
|
dataIndex: 'mineLinkStatus',
|
|
|
width: 100,
|
|
|
customRender: ({ record }) => {
|
|
|
- console.log(record.mineLinkStatus);
|
|
|
const status = record.mineLinkStatus;
|
|
|
if (status === undefined || status === null) {
|
|
|
return h('span', { style: { color: colorHexMap.black } }, '/');
|
|
|
@@ -105,42 +110,38 @@ export const searchFormSchema: FormSchema[] = [
|
|
|
colProps: { span: 6 },
|
|
|
groupName: '常规查询',
|
|
|
},
|
|
|
- {
|
|
|
- field: 'mineNameAbbr',
|
|
|
- label: '煤矿简称',
|
|
|
- component: 'Input',
|
|
|
- colProps: { span: 6 },
|
|
|
- groupName: '常规查询',
|
|
|
- },
|
|
|
- {
|
|
|
- field: 'productionStatus',
|
|
|
- label: '生产状态',
|
|
|
- component: 'Select',
|
|
|
- componentProps: {
|
|
|
- options: [
|
|
|
- { label: '拟建矿井', value: '0' },
|
|
|
- { label: '正常生产矿井', value: '1' },
|
|
|
- { label: '长期停产矿井', value: '1' },
|
|
|
- ],
|
|
|
- },
|
|
|
- colProps: { span: 6 },
|
|
|
- groupName: '常规查询',
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // field: 'mineNameAbbr',
|
|
|
+ // label: '煤矿简称',
|
|
|
+ // component: 'Input',
|
|
|
+ // colProps: { span: 6 },
|
|
|
+ // groupName: '常规查询',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // field: 'productionStatus',
|
|
|
+ // label: '生产状态',
|
|
|
+ // component: 'Select',
|
|
|
+ // componentProps: {
|
|
|
+ // options: productionStatusOptions
|
|
|
+ // },
|
|
|
+ // colProps: { span: 6 },
|
|
|
+ // groupName: '常规查询',
|
|
|
+ // },
|
|
|
|
|
|
- {
|
|
|
- field: 'mineLinkStatus',
|
|
|
- label: '在线状态',
|
|
|
- component: 'Select',
|
|
|
- componentProps: {
|
|
|
- options: [
|
|
|
- { label: '离线', value: '0' },
|
|
|
- { label: '在线', value: '1' },
|
|
|
- { label: '未连接', value: '2' },
|
|
|
- ],
|
|
|
- },
|
|
|
- colProps: { span: 6 },
|
|
|
- groupName: '常规查询',
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // field: 'mineLinkStatus',
|
|
|
+ // label: '在线状态',
|
|
|
+ // component: 'Select',
|
|
|
+ // componentProps: {
|
|
|
+ // options: [
|
|
|
+ // { label: '离线', value: '0' },
|
|
|
+ // { label: '在线', value: '1' },
|
|
|
+ // { label: '未连接', value: '2' },
|
|
|
+ // ],
|
|
|
+ // },
|
|
|
+ // colProps: { span: 6 },
|
|
|
+ // groupName: '常规查询',
|
|
|
+ // },
|
|
|
];
|
|
|
|
|
|
// 模拟煤矿在线状态选项数据
|