| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="创建审批链"> |
| | | <div style="width: 100%; margin-bottom: 20px" v-show="disabled"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="openApproveLevelDialog('新增', '')">新增巡检点</el-button> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="openApproveLevelDialog('新增', '')">新增审批层级</el-button> |
| | | </div> |
| | | <div style="width: 100%; margin-left: -30px"> |
| | | <div v-for="(item, index) in approveRuleForm.stepList" class="stepItem"> |
| | |
| | | </el-card> |
| | | </div> |
| | | <div v-show="disabled"> |
| | | <!-- <el-button type="primary" size="default" @click="addFlow(index)">新增下一区域</el-button>--> |
| | | <el-button type="primary" style="margin-left: 12px" size="default" @click="openApproveLevelDialog('修改', item)">修改</el-button> |
| | | <el-button type="danger" size="default" @click="deleteApproveLevel(index, item)">删除</el-button> |
| | | </div> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <div align="right" v-show="disabled"> |
| | | </el-form> |
| | | <template #footer> |
| | | <div v-show="disabled" class="dialog-footer"> |
| | | <el-button type="warning" @click="ifShowApproveRuleDialog = false" size="default" plain>取消</el-button> |
| | | <el-button type="primary" @click="submitApproveRule()" size="default">确认</el-button> |
| | | </div> |
| | | </el-form> |
| | | </template> |
| | | </el-dialog> |
| | | <approve-level-dialog ref="approveLevelDialogRef" @addApprovalLevel="achieveApprovalLevel"></approve-level-dialog> |
| | | </div> |
| | |
| | | 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 = [ |
| | |
| | | |
| | | const parseNumber = (type: string, value: number) => { |
| | | if (type === '时间单位') { |
| | | debugger; |
| | | return data.timeList.find((item) => item.id === value)?.name; |
| | | } |
| | | }; |
| | |
| | | |
| | | return { |
| | | ...toRefs(data), |
| | | Plus, |
| | | clearValue, |
| | | parseNumber, |
| | | approveLevelDialog, |