| | |
| | | import { reactive, toRefs, ref } from 'vue'; |
| | | import { ElMessage } from 'element-plus/es'; |
| | | import { approveRuleApi } from '/@/api/specialWorkSystem/approveRule'; |
| | | import { Edit, View, Plus, Delete, Refresh, Search, Download } from '@element-plus/icons-vue'; |
| | | import approveLevelDialog from '/@/views/specialWorkSystem/workFlow/approveRule/components/approveLevelDialog.vue'; |
| | | interface dataState { |
| | | title: string; |
| | |
| | | } |
| | | export default { |
| | | name: 'approveRuleDialog', |
| | | components: { approveLevelDialog }, |
| | | components: { approveLevelDialog,Plus }, |
| | | setup(props: any, context: any) { |
| | | const approveRuleFormRef = ref(); |
| | | const approveLevelDialogRef = ref(); |
| | |
| | | if (data.approveRuleForm.workType === 1) { |
| | | data.approveRuleForm.workLevel = null; |
| | | data.workLevelList = [ |
| | | { id: 3, name: '特级动火作业' }, |
| | | { id: 1, name: '一级动火作业' }, |
| | | { id: 2, name: '二级动火作业' }, |
| | | { id: 3, name: '三级动火作业' } |
| | | { id: 2, name: '二级动火作业' } |
| | | ]; |
| | | } else if (data.approveRuleForm.workType === 3) { |
| | | data.approveRuleForm.workLevel = null; |
| | |
| | | } else if (data.approveRuleForm.workType === 6) { |
| | | data.approveRuleForm.workLevel = null; |
| | | data.workLevelList = [ |
| | | { id: 7, name: '特级高处作业' }, |
| | | { id: 4, name: '一级高处作业' }, |
| | | { id: 5, name: '二级高处作业' }, |
| | | { id: 6, name: '三级高处作业' }, |
| | | { id: 7, name: '四级高处作业' } |
| | | ]; |
| | | } else if (data.approveRuleForm.workType === 8) { |
| | | data.approveRuleForm.workLevel = null; |
| | |
| | | const setValue = (workType: number) => { |
| | | if (workType === 1) { |
| | | data.workLevelList = [ |
| | | { id: 3, name: '特级动火作业' }, |
| | | { id: 1, name: '一级动火作业' }, |
| | | { id: 2, name: '二级动火作业' }, |
| | | { id: 3, name: '三级动火作业' } |
| | | ]; |
| | | } else if (workType === 3) { |
| | | data.workLevelList = [ |
| | |
| | | ]; |
| | | } else if (workType === 6) { |
| | | data.workLevelList = [ |
| | | { id: 7, name: '四级高处作业' }, |
| | | { id: 4, name: '一级高处作业' }, |
| | | { id: 5, name: '二级高处作业' }, |
| | | { id: 6, name: '三级高处作业' }, |
| | | { id: 7, name: '四级高处作业' } |
| | | { id: 6, name: '三级高处作业' } |
| | | ]; |
| | | } else if (workType === 8) { |
| | | data.workLevelList = [ |
| | |
| | | |
| | | return { |
| | | ...toRefs(data), |
| | | Plus, |
| | | clearValue, |
| | | parseNumber, |
| | | approveLevelDialog, |