| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- import { FormConfig } from '@/types/basic-form';
- import { EMERGENCY_DRILL_SCOPE, EMERGENCY_DRILL_SCOPE_DICT } from '../../constants';
- export const DRILL_CREATE_FORM_CONFIG: FormConfig[] = [
- {
- prop: 'drillScope',
- label: '演练规模:',
- component: 'el-select',
- componentProps: {
- placeholder: '请选择演练规模',
- },
- selectOptions: [
- {
- label: EMERGENCY_DRILL_SCOPE_DICT[EMERGENCY_DRILL_SCOPE.INSTITUTE].label,
- value: EMERGENCY_DRILL_SCOPE_DICT[EMERGENCY_DRILL_SCOPE.INSTITUTE].dict,
- },
- {
- label: EMERGENCY_DRILL_SCOPE_DICT[EMERGENCY_DRILL_SCOPE.DEPT].label,
- value: EMERGENCY_DRILL_SCOPE_DICT[EMERGENCY_DRILL_SCOPE.DEPT].dict,
- },
- ],
- },
- {
- prop: 'drillContent',
- label: '演练内容:',
- component: 'el-input',
- componentProps: { placeholder: '请输入演练内容' },
- },
- {
- prop: 'dueCompleteTime',
- label: '计划完成日期:',
- component: 'el-date-picker',
- componentProps: {
- type: 'date',
- placeholder: '请选择计划完成日期',
- format: 'YYYY-MM-DD',
- valueFormat: 'YYYY-MM-DD',
- },
- },
- {
- prop: 'responsibleDeptIdList',
- label: '责任部门:',
- slot: 'responsibleDeptIdList',
- },
- {
- prop: 'coordinateDeptIdList',
- label: '配合部门:',
- slot: 'coordinateDeptIdList',
- },
- {
- prop: 'preplanId',
- label: '应急预案:',
- slot: 'preplanId',
- },
- {
- prop: 'approvalTemplateId',
- label: '审批流程:',
- slot: 'approvalTemplateId',
- },
- ];
- export const DRILL_CREATE_FORM_RULES = {
- drillScope: [
- {
- required: true,
- message: '请选择演练规模',
- trigger: 'change',
- },
- ],
- drillContent: [
- {
- required: true,
- message: '请输入演练内容',
- trigger: 'blur',
- },
- ],
- dueCompleteTime: [
- {
- required: true,
- message: '请选择计划完成时间',
- trigger: 'change',
- },
- ],
- responsibleDeptIdList: [
- {
- required: true,
- message: '请选择责任部门',
- trigger: 'change',
- },
- ],
- approvalTemplateId: [
- {
- required: true,
- message: '请选择审批流程',
- trigger: 'change',
- },
- ],
- };
- export const DRILL_CREATE_FORM_DATA = {
- drillScope: '',
- drillContent: '',
- dueCompleteTime: '',
- responsibleDeptIdList: undefined,
- coordinateDeptIdList: undefined,
- preplanId: undefined,
- approvalTemplateId: undefined,
- };
- export const DRILL_EXECUTE_FORM_CONFIG = [
- {
- prop: 'drillTime',
- label: '演练时间:',
- component: 'el-date-picker',
- componentProps: {
- type: 'date',
- placeholder: '请选择演练时间',
- format: 'YYYY-MM-DD',
- valueFormat: 'YYYY-MM-DD',
- },
- },
- {
- prop: 'drillLocation',
- label: '演练地点:',
- component: 'el-input',
- componentProps: { placeholder: '请输入演练地点' },
- },
- {
- prop: 'personInChargeName',
- label: '负责人:',
- slot: 'personInChargeName',
- },
- {
- prop: 'drillDeptIdList',
- label: '演练部门:',
- slot: 'drillDeptIdList',
- },
- {
- prop: 'drillScript',
- label: '演练脚本:',
- slot: 'drillScript',
- },
- ];
- export const INS_DRILL_EXECUTE_FORM_RULES = {
- drillTime: [{ required: true, message: '请选择演练时间', trigger: 'change' }],
- drillLocation: [{ required: true, message: '请输入演练地点', trigger: 'blur' }],
- personInChargeName: [{ required: true, message: '请选择演练负责人', trigger: 'change' }],
- drillDeptIdList: [{ required: true, message: '请选择演练部门', trigger: 'change' }],
- drillScript: [{ required: true, message: '请上传演练脚本', trigger: 'change' }],
- };
- export const DEP_DRILL_EXECUTE_FORM_RULES = {
- drillTime: [{ required: true, message: '请选择演练时间', trigger: 'change' }],
- drillLocation: [{ required: true, message: '请输入演练地点', trigger: 'blur' }],
- personInChargeName: [{ required: true, message: '请选择演练负责人', trigger: 'change' }],
- };
- export const DRILL_EXECUTE_FORM_DATA = {
- drillTime: undefined,
- drillLocation: '',
- personInChargeName: undefined,
- drillDeptIdList: undefined,
- drillScript: undefined,
- };
|