|
|
@@ -3,25 +3,30 @@ import { FormSchema } from '/@/components/Table';
|
|
|
import { h } from 'vue';
|
|
|
|
|
|
// 生产状态映射表(扩展所有状态)
|
|
|
-const productionStatusMap: Record<string | number, { text: string; color: string }> = {
|
|
|
- 0: { text: '正常生产矿井', color: 'green' },
|
|
|
- 1: { text: '拟建矿井', color: 'blue' },
|
|
|
- 2: { text: '正常建设煤矿', color: 'green' },
|
|
|
- 3: { text: '自行停产矿井', color: 'green' },
|
|
|
- 4: { text: '正在关闭', color: 'green' },
|
|
|
- 5: { text: '责令停产整顿', color: 'green' },
|
|
|
- 6: { text: '责令停止建设', color: 'green' },
|
|
|
- 7: { text: '已关闭矿井', color: 'green' },
|
|
|
- 8: { text: '长期停产矿井', color: 'green' },
|
|
|
- 9: { text: '长期停建矿井', color: 'green' },
|
|
|
- 10: { text: '停产整改矿井', color: 'green' },
|
|
|
- 11: { text: '长期停建无法联系', color: 'green' },
|
|
|
- 12: { text: '停建整改', color: 'green' },
|
|
|
- 13: { text: '自行停建', color: 'green' },
|
|
|
- 14: { text: '正在实施关闭', color: 'green' },
|
|
|
+const productionStatusMap: Record<string | number, { text: string; value: number; color: string }> = {
|
|
|
+ 0: { text: '正常生产矿井', value: 0, color: 'green' },
|
|
|
+ 1: { text: '拟建矿井', value: 1, color: 'blue' },
|
|
|
+ 2: { text: '正常建设煤矿', value: 2, color: 'green' },
|
|
|
+ 3: { text: '自行停产矿井', value: 3, color: 'green' },
|
|
|
+ 4: { text: '正在关闭', value: 4, color: 'green' },
|
|
|
+ 5: { text: '责令停产整顿', value: 5, color: 'green' },
|
|
|
+ 6: { text: '责令停止建设', value: 6, color: 'green' },
|
|
|
+ 7: { text: '已关闭矿井', value: 7, color: 'green' },
|
|
|
+ 8: { text: '长期停产矿井', value: 8, color: 'green' },
|
|
|
+ 9: { text: '长期停建矿井', value: 9, color: 'green' },
|
|
|
+ 10: { text: '停产整改矿井', value: 10, color: 'green' },
|
|
|
+ 11: { text: '长期停建无法联系', value: 11, color: 'green' },
|
|
|
+ 12: { text: '停建整改', value: 12, color: 'green' },
|
|
|
+ 13: { text: '自行停建', value: 13, color: 'green' },
|
|
|
+ 14: { text: '正在实施关闭', value: 14, color: 'green' },
|
|
|
// 15: { text: '已关闭矿井', color: 'green' },
|
|
|
};
|
|
|
|
|
|
+// 基于productionStatusMap生成下拉选项
|
|
|
+export const productionStatusOptions = Object.entries(productionStatusMap).map(([key, item]) => ({
|
|
|
+ label: item.text, // 状态名称
|
|
|
+ value: key, // 状态值
|
|
|
+}));
|
|
|
// 颜色映射
|
|
|
const colorHexMap: Record<string, string> = {
|
|
|
blue: '#1890ff',
|
|
|
@@ -107,7 +112,7 @@ export const columns: BasicColumn[] = [
|
|
|
|
|
|
export const searchFormSchema: FormSchema[] = [
|
|
|
{
|
|
|
- field: 'mineName',
|
|
|
+ field: 'mineCode',
|
|
|
label: '煤矿名称',
|
|
|
component: 'MineCascader',
|
|
|
colProps: { span: 6 },
|
|
|
@@ -123,11 +128,7 @@ export const searchFormSchema: FormSchema[] = [
|
|
|
label: '生产状态',
|
|
|
component: 'Select',
|
|
|
componentProps: {
|
|
|
- options: [
|
|
|
- { label: '拟建矿井', value: '0' },
|
|
|
- { label: '正常生产矿井', value: '1' },
|
|
|
- { label: '长期停产矿井', value: '8' },
|
|
|
- ],
|
|
|
+ options: productionStatusOptions,
|
|
|
},
|
|
|
colProps: { span: 6 },
|
|
|
},
|