| | |
| | | ENV = 'development' |
| | | |
| | | # 本地环境接口地址 |
| | | VITE_API_URL = 'http://192.168.0.35:8008' |
| | | #VITE_API_URL = 'http://192.168.0.35:8008' |
| | | #VITE_API_URL = 'http://192.168.0.29:8008' |
| | | #VITE_API_URL = 'http://192.168.0.69:8008' |
| | | VITE_API_URL = 'http://192.168.0.69:8008' |
| | |
| | | <!-- <router-view v-if="!$route.meta.iskeepAlive" :key="$route.id"></router-view>--> |
| | | <!-- </keep-alive>--> |
| | | <!-- </transition>--> |
| | | <router-view v-if="!$route.meta.iskeepAlive" v-slot="{ Component }"> |
| | | <transition name="fade" mode="in-out"> |
| | | <keep-alive :exclude="excludeList" :include="includeList"> |
| | | <component :is="Component" :key="$route.id"></component> |
| | | </keep-alive> |
| | | </transition> |
| | | </router-view> |
| | | <!-- <el-config-provider :size="getGlobalComponentSize" :locale="i18nLocale">--> |
| | | <!-- <router-view v-show="themeConfig.lockScreenTime > 1" />--> |
| | | <!-- <router-view v-show="themeConfig.lockScreenTime > 1" />--> |
| | | <!-- <LockScreen v-if="themeConfig.isLockScreen" />--> |
| | | <!-- <Setings ref="setingsRef" v-show="themeConfig.lockScreenTime > 1" />--> |
| | | <!-- <CloseFull v-if="!themeConfig.isLockScreen" />--> |
| | | <!-- </el-config-provider>--> |
| | | <!-- <router-view v-if="!$route.meta.iskeepAlive" v-slot="{ Component }">--> |
| | | <!-- <transition name="fade" mode="in-out">--> |
| | | <!-- <keep-alive :exclude="excludeList" :include="includeList">--> |
| | | <!-- <component :is="Component" :key="$route.id"></component>--> |
| | | <!-- </keep-alive>--> |
| | | <!-- </transition>--> |
| | | <!-- </router-view>--> |
| | | <el-config-provider :size="getGlobalComponentSize" :locale="i18nLocale"> |
| | | <router-view v-show="themeConfig.lockScreenTime > 1" /> |
| | | <router-view v-show="themeConfig.lockScreenTime > 1" /> |
| | | <LockScreen v-if="themeConfig.isLockScreen" /> |
| | | <Setings ref="setingsRef" v-show="themeConfig.lockScreenTime > 1" /> |
| | | <CloseFull v-if="!themeConfig.isLockScreen" /> |
| | | </el-config-provider> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | |
| | | }); |
| | | }, |
| | | |
| | | // v1 |
| | | deleteRecord: (data: object) => { |
| | | getTask: (data: object) => { |
| | | return request({ |
| | | url: `/prevent/checkWork/delete/deleteCheckWork`, |
| | | url: `/prevent/checkTask/update/taskToUser`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | |
| | | // v1 |
| | | modWork: (data: object) => { |
| | | return request({ |
| | | url: `/prevent/checkTask/update/updateCheckWork`, |
| | | url: `/prevent/checkWork/update/updateCheckWork`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | |
| | | // 对响应数据做点什么 |
| | | if (response.data.code && response.data.code === 'A0213') { |
| | | ElMessage.error('用户uid不存在'); |
| | | setTimeout(() => { |
| | | Session.clear(); |
| | | window.location.href = '/'; |
| | | }, 2000); |
| | | Session.clear(); |
| | | window.location.href = '/'; |
| | | } else if (response.data.code && response.data.code === 'A0215') { |
| | | ElMessage.error('token失效'); |
| | | setTimeout(() => { |
| | | Session.clear(); |
| | | window.location.href = '/'; |
| | | }, 2000); |
| | | Session.clear(); |
| | | window.location.href = '/'; |
| | | } |
| | | // if(response.data.code && response.data.code !== '200'){ |
| | | return Promise.resolve(response); |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="isShowSubmitDialog = !isShowSubmitDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitRecord" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitRecord" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <el-table :data="scope.row.checkContent" style="width: 100%"> |
| | | <el-table-column label="序号" type="index" width="150" align="center"> </el-table-column> |
| | | <el-table-column label="检查内容" prop="checkContent" align="center"> </el-table-column> |
| | | <el-table-column label="检查结果" prop="checkResult" align="center"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.checkResult === 1 ? 'success' : scope.row.checkResult === 2 ? 'danger' : 'info'"> |
| | | {{ parseNumber(scope.row.checkResult, '检查结果') }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button> |
| | |
| | | </el-table-column> |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="taskCode" label="排查名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="execDepId" label="执行部门" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ parseNumber(scope.row.execDepId, '执行部门') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskStatus" label="状态" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ parseNumber(scope.row.taskStatus, '状态') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskBelong" label="是否认领" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ parseNumber(scope.row.taskBelong, '认领状态') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createUserName" label="创建人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" v-show="scope.row.taskStatus === 1 || scope.row.taskStatus === 4" :icon="Check" @click="onHandleTask(scope.row)">任务认领</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br /> |
| | | <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="recordData.params.pageIndex" background v-model:page-size="recordData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="recordData.total" class="page-position"> </el-pagination> |
| | |
| | | }; |
| | | taskUnitList: []; |
| | | departmentList: Array<DepartmentState>; |
| | | departmentRecursionList: Array<DepartmentState>; |
| | | resultList: Array<levelListState>; |
| | | checkResultList: Array<levelListState>; |
| | | taskStatusList: Array<levelListState>; |
| | | taskTypeList: Array<levelListState>; |
| | | } |
| | |
| | | id: number; |
| | | name: string; |
| | | } |
| | | interface DepartmentState {} |
| | | interface DepartmentState { |
| | | depId: number; |
| | | depName: string; |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'record', |
| | |
| | | }, |
| | | taskUnitList: [], |
| | | departmentList: [], |
| | | departmentRecursionList: [], |
| | | resultList: [ |
| | | { id: 1, name: '正常' }, |
| | | { id: 2, name: '存在隐患' }, |
| | | { id: 3, name: '未排查' }, |
| | | { id: 4, name: '其他' } |
| | | ], |
| | | checkResultList: [ |
| | | { id: 1, name: '正常' }, |
| | | { id: 2, name: '异常' }, |
| | | { id: 3, name: '未处理' } |
| | | ], |
| | | taskStatusList: [ |
| | | { id: 1, name: '待排查' }, |
| | |
| | | let res = await departmentApi().getDepartmentList(); |
| | | if (res.data.code === '200') { |
| | | state.departmentList = res.data.data; |
| | | recursion(state.departmentList); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | recordDialogRef.value.openRecordDialog(type, value); |
| | | }; |
| | | // 删除角色 |
| | | const onDelRecord = (row: any) => { |
| | | ElMessageBox.confirm(`此操作将永久删除该条生产装置:“${row.produceDeviceName}”,是否继续?`, '提示', { |
| | | const onHandleTask = (row: any) => { |
| | | ElMessageBox.confirm(`此操作将认领该任务:“${row.taskCode}”,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(async () => { |
| | | let res = await recordApi().deleterecord({ id: row.id }); |
| | | let res = await recordApi().getTask({ id: row.id }); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | duration: 2000, |
| | | message: '删除成功' |
| | | message: '认领成功' |
| | | }); |
| | | await initRecordTableData(); |
| | | } else { |
| | |
| | | initRecordTableData(); |
| | | }; |
| | | |
| | | const recursion = (value: any) => { |
| | | for (let i of value) { |
| | | if (i.children.length !== 0) { |
| | | state.departmentRecursionList.push(i); |
| | | recursion(i.children); |
| | | } else { |
| | | state.departmentRecursionList.push(i); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | const parseNumber = (value: string | number, type: string) => { |
| | | if (type === '状态') { |
| | | return state.taskStatusList.find((item) => item.id === value)?.name; |
| | | } else if (type === '执行部门') { |
| | | return state.departmentRecursionList.find((item) => item.depId === value)?.depName; |
| | | } else if (type === '检查结果') { |
| | | return state.checkResultList.find((item) => item.id === value)?.name; |
| | | } else { |
| | | if (value === 1) { |
| | | return '未认领'; |
| | | } else { |
| | | return '已认领'; |
| | | } |
| | | } |
| | | }; |
| | | |
| | |
| | | handleSearch, |
| | | onOpenDialogRef, |
| | | onHandleSizeChange, |
| | | onDelRecord, |
| | | onHandleTask, |
| | | onHandleCurrentChange, |
| | | recordDialog, |
| | | recordDialogRef, |
| | |
| | | <el-input class="input-add" v-model.trim="workForm.checkWorkName" placeholder="请输入排查名称" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="整改部门" prop="depId"> |
| | | <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="workForm.depId"> </el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="执行人" prop="execUserId"> |
| | | <el-select class="input-add" v-model="workForm.execUserId" placeholder="请输入执行人" clearable filterable> |
| | | <el-option v-for="item in userList" :key="item.uid" :label="item.username" :value="item.uid"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="排查周期" prop="checkCycle"> |
| | | <el-input class="input-add" type="number" v-model.trim="workForm.checkCycle" placeholder="请输入排查周期" clearable></el-input> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="执行部门" prop="execDepId"> |
| | | <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="workForm.execDepId"> </el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="任务单元" prop="taskUnitId"> |
| | | <el-select class="input-add" v-model="workForm.taskUnitId" placeholder="请输入任务单元" clearable filterable> |
| | | <el-option v-for="item in taskUnitList" :key="item.id" :label="item.taskUnitName" :value="item.id"></el-option> |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isShowWorkDialog = !isShowWorkDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitWork" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitWork" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | checkWorkType: number | null; |
| | | checkWorkName: string | null; |
| | | taskUnitId: number | null; |
| | | execUserId: number | null; |
| | | execDepId: number | null; |
| | | checkCycle: number | null; |
| | | checkCycleUnit: number | null; |
| | | validTime: number | null; |
| | | validTimeUnit: number | null; |
| | | noticeTime: number | null; |
| | | noticeTimeUnit: number | null; |
| | | depId: number | null; |
| | | firstStartTime: string | null; |
| | | }; |
| | | title: string; |
| | |
| | | checkWorkType: null, |
| | | checkWorkName: null, |
| | | taskUnitId: null, |
| | | execUserId: null, |
| | | execDepId: null, |
| | | checkCycle: null, |
| | | checkCycleUnit: null, |
| | | validTime: null, |
| | | validTimeUnit: null, |
| | | noticeTime: null, |
| | | noticeTimeUnit: null, |
| | | firstStartTime: null, |
| | | depId: null |
| | | firstStartTime: null |
| | | }, |
| | | workFormRules: { |
| | | checkWorkType: [{ required: true, message: '请填写排查作业类型', trigger: 'change' }], |
| | |
| | | checkWorkType: null, |
| | | checkWorkName: null, |
| | | taskUnitId: null, |
| | | execUserId: null, |
| | | execDepId: null, |
| | | checkCycle: null, |
| | | checkCycleUnit: null, |
| | | validTime: null, |
| | | validTimeUnit: null, |
| | | noticeTime: null, |
| | | noticeTimeUnit: null, |
| | | firstStartTime: null, |
| | | depId: null |
| | | firstStartTime: null |
| | | }; |
| | | } else if (type === '查看') { |
| | | state.disabled = false; |
| | | state.title = '查看排查任务'; |
| | | state.workForm.depId = JSON.parse(JSON.stringify(value)).depId; |
| | | await achieveUserList(); |
| | | state.workForm = JSON.parse(JSON.stringify(value)); |
| | | } else { |
| | | state.disabled = true; |
| | | state.title = '修改排查任务'; |
| | | state.workForm.depId = JSON.parse(JSON.stringify(value)).depId; |
| | | await achieveUserList(); |
| | | state.workForm = JSON.parse(JSON.stringify(value)); |
| | | } |
| | | }; |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taskUnitName" label="任务单元" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="execUserName" label="执行人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="execDepId" label="执行部门" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ parseNumber(scope.row.execDepId, '执行部门') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="checkCycle" label="排查周期" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <span> |
| | |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="validTime" label="排查周期" show-overflow-tooltip> |
| | | <el-table-column prop="validTime" label="有效时间" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <span> |
| | | {{ scope.row.validTime }} |
| | | </span> |
| | | <span> |
| | | {{ parseNumber(scope.row.validTimeUnit, '排查周期') }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="validTime" label="提醒时间" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <span> |
| | | {{ scope.row.noticeTime }} |
| | | </span> |
| | | <span> |
| | | {{ parseNumber(scope.row.noticeTimeUnit, '排查周期') }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | params: { |
| | | pageIndex: number; |
| | | pageSize: number; |
| | | checkWorkType: number | null; |
| | | checkWorkStatus: number | null; |
| | | checkWorkType: number | null | ''; |
| | | checkWorkStatus: number | null | ''; |
| | | checkWorkName: string | null; |
| | | }; |
| | | }; |
| | | timeType: Array<levelListState>; |
| | | taskUnitList: Array<taskUnit>; |
| | | departmentList: Array<DepartmentState>; |
| | | departmentRecursionList: Array<DepartmentState>; |
| | | checkWorkTypeList: Array<levelListState>; |
| | | checkWorkStatusList: Array<levelListState>; |
| | | } |
| | |
| | | id: number; |
| | | name: string; |
| | | } |
| | | interface DepartmentState {} |
| | | interface DepartmentState { |
| | | depId: number; |
| | | depName: string; |
| | | children: Array<DepartmentState>; |
| | | } |
| | | interface taskUnit { |
| | | id: number; |
| | | taskUnitName: string; |
| | |
| | | }, |
| | | taskUnitList: [], |
| | | departmentList: [], |
| | | departmentRecursionList: [], |
| | | checkWorkTypeList: [ |
| | | { id: 1, name: '日常作业' }, |
| | | { id: 2, name: '周期作业' } |
| | | ], |
| | | checkWorkStatusList: [ |
| | | { id: 1, name: '开启' }, |
| | | { id: 2, name: '关闭' }, |
| | | { id: 2, name: '过期' } |
| | | { id: 2, name: '关闭' } |
| | | ], |
| | | timeType: [ |
| | | { id: 1, name: '分' }, |
| | |
| | | }); |
| | | // 初始化表格数据 |
| | | const initWorkTableData = async () => { |
| | | state.workData.params.checkWorkType = state.workData.params.checkWorkType === '' ? null : state.workData.params.checkWorkType; |
| | | state.workData.params.checkWorkStatus = state.workData.params.checkWorkStatus === '' ? null : state.workData.params.checkWorkStatus; |
| | | let res = await workApi().getWorkList(state.workData.params); |
| | | if (res.data.code === '200') { |
| | | state.workData.data = res.data.data; |
| | |
| | | let res = await departmentApi().getDepartmentList(); |
| | | if (res.data.code === '200') { |
| | | state.departmentList = res.data.data; |
| | | recursion(state.departmentList); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | const parseNumber = (value: string | number, type: string) => { |
| | | const recursion = (value: any) => { |
| | | for (let i of value) { |
| | | if (i.children.length !== 0) { |
| | | state.departmentRecursionList.push(i); |
| | | recursion(i.children); |
| | | } else { |
| | | state.departmentRecursionList.push(i); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | const parseNumber = (value: number, type: string) => { |
| | | if (type === '排查类型') { |
| | | return state.checkWorkTypeList.find((item) => item.id === value)?.name; |
| | | } else if (type === '排查周期') { |
| | | return state.timeType.find((item) => item.id == value)?.name; |
| | | } else if (type === '执行部门') { |
| | | return state.departmentRecursionList.find((item) => item.depId === value)?.depName; |
| | | // return state.departmentList.find((item: any) => { |
| | | // if (item.children.length !== 0) { |
| | | // if (item.depId === value) { |
| | | // return item; |
| | | // } else { |
| | | // return recursion(item.children, value); |
| | | // } |
| | | // } else { |
| | | // if (item.depId === value) { |
| | | // return item; |
| | | // } |
| | | // } |
| | | // })?.depName; |
| | | } |
| | | }; |
| | | |
| | | // const recursion = (children: any, value: number | string) => { |
| | | // debugger; |
| | | // return children.find((item: any) => { |
| | | // if (item.children.length !== 0) { |
| | | // if (item.depId === value) { |
| | | // return item; |
| | | // } else { |
| | | // return recursion(item.children, value); |
| | | // } |
| | | // } else { |
| | | // if (item.depId === value) { |
| | | // return item; |
| | | // } |
| | | // } |
| | | // }); |
| | | // }; |
| | | |
| | | const handleSearch = () => { |
| | | initWorkTableData(); |
| | | }; |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="isShowCheckDialog = !isShowCheckDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitCheck" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitCheck" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="isShowRectifyDialog = !isShowRectifyDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitRectify" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitRectify" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isShowDelayDialog = !isShowDelayDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitDelay" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitDelay" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isShowReportDialog = !isShowReportDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitReport" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitReport" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="管控措施分类1" prop="classify1"> |
| | | <el-select class="input-length" v-model.trim="riskControlMeasureForm.classify1" @change="changeClassifyTwoList" placeholder="请选择管控方式" clearable> |
| | | <el-select class="input-length" v-model="riskControlMeasureForm.classify1" @change="changeClassifyTwoList" placeholder="请选择管控方式" clearable> |
| | | <el-option v-for="item in classifyOneList" :key="item.id" :label="item.riskMeasureName" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isRiskControlMeasureDialog = !isRiskControlMeasureDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitRiskControlMeasureDialog" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitRiskControlMeasureDialog" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isShowProductionDeviceDialog = !isShowProductionDeviceDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitProductionDevice" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitProductionDevice" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | params: { |
| | | pageIndex: number; |
| | | pageSize: number; |
| | | riskLevel: number | null; |
| | | riskLevel: number | null | ''; |
| | | status: number; |
| | | depId: number | null; |
| | | depId: number | null | ''; |
| | | location: string | null; |
| | | produceDeviceName: string | null; |
| | | }; |
| | |
| | | }); |
| | | // 初始化表格数据 |
| | | const initProductionDeviceTableData = async () => { |
| | | state.productionDeviceData.params.riskLevel = state.productionDeviceData.params.riskLevel === '' ? null : state.productionDeviceData.params.riskLevel; |
| | | state.productionDeviceData.params.depId = state.productionDeviceData.params.depId === '' ? null : state.productionDeviceData.params.depId; |
| | | let res = await productionDeviceApi().getProductionDeviceList(state.productionDeviceData.params); |
| | | if (res.data.code === '200') { |
| | | state.productionDeviceData.data = res.data.data; |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isSafetyRiskEventDialog = !isSafetyRiskEventDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitSafetyRiskEventDialog" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitSafetyRiskEventDialog" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | const getAllSafetyRiskEventData = async () => { |
| | | let res = await safetyRiskAnalyseUnitApi().getAllSafetyRiskAnalyseUnitList(); |
| | | if (res.data.code === '200') { |
| | | state.allSafetyRiskEventData = res.data.data; |
| | | state.allSafetyRiskEventData = JSON.parse(JSON.stringify(res.data.data)); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="isShowReportDialog = !isShowReportDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitReport" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitReport" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isShowCheckUnitDialog = !isShowCheckUnitDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitCheckUnit" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitCheckUnit" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | if (type === '新增') { |
| | | state.disabled = true; |
| | | state.title = '新增隐患排查单元'; |
| | | state.measureData = []; |
| | | state.checkUnitForm = { |
| | | taskUnitName: null, |
| | | note: null, |
| | |
| | | state.disabled = false; |
| | | state.title = '查看隐患排查单元'; |
| | | state.checkUnitForm = JSON.parse(JSON.stringify(value)); |
| | | state.measureData = state.checkUnitForm.measureList; |
| | | } else { |
| | | state.disabled = true; |
| | | state.title = '修改隐患排查单元'; |
| | | state.checkUnitForm = JSON.parse(JSON.stringify(value)); |
| | | state.measureData = state.checkUnitForm.measureList; |
| | | } |
| | | }; |
| | | |
| | |
| | | <div class="system-role-container"> |
| | | <el-card shadow="hover"> |
| | | <div class="system-user-search mb15"> |
| | | <div class="basic-line"> |
| | | <span>风险等级:</span> |
| | | <el-select v-model="checkUnitData.params.riskLevel" clearable filterable class="input-box" placeholder="请选择风险等级"> |
| | | <el-option v-for="item in levelList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic-line"> |
| | | <span>部门:</span> |
| | | <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-box" v-model="checkUnitData.params.depId"> </el-cascader> |
| | | </div> |
| | | <!-- <div class="basic-line">--> |
| | | <!-- <span>风险等级:</span>--> |
| | | <!-- <el-select v-model="checkUnitData.params.riskLevel" clearable filterable class="input-box" placeholder="请选择风险等级">--> |
| | | <!-- <el-option v-for="item in levelList" :key="item.id" :label="item.name" :value="item.id"></el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="basic-line">--> |
| | | <!-- <span>部门:</span>--> |
| | | <!-- <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-box" v-model="checkUnitData.params.depId"> </el-cascader>--> |
| | | <!-- </div>--> |
| | | <el-button size="default" type="primary" class="ml10" v-throttle @click="handleSearch"> |
| | | <el-icon> |
| | | <ele-Search /> |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isSafetyRiskAnalyseUnitDialog = !isSafetyRiskAnalyseUnitDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitSafetyRiskAnalyseUnitDialog" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitSafetyRiskAnalyseUnitDialog" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="isShowRFIDDialog = !isShowRFIDDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitRFID" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitRFID" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="设备区域名称" prop="region"> |
| | | <el-input |
| | | class="input-length" |
| | | v-model.trim="facilityAreaForm.region" |
| | | placeholder="请输入设备区域名称" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-length" v-model.trim="facilityAreaForm.region" placeholder="请输入设备区域名称" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="设备区域类型" prop="regionTypeId"> |
| | | <el-select |
| | | class="input-length" |
| | | v-model="facilityAreaForm.regionTypeId" |
| | | placeholder="请选择设备区域类型" |
| | | clearable |
| | | filterable |
| | | > |
| | | <el-select class="input-length" v-model="facilityAreaForm.regionTypeId" placeholder="请选择设备区域类型" clearable filterable> |
| | | <el-option v-for="item in facilityAreaTypeList" :key="item.id" :label="item.regionType" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="isShowFacilityAreaDialog = !isShowFacilityAreaDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitFacilityArea" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitFacilityArea" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | }); |
| | | |
| | | //打开模态框 |
| | | const openFacilityAreaDialog = ( |
| | | type: string, |
| | | value: { id: number; region: string; regionTypeId: number }, |
| | | facilityAreaTypeList: Array<facilityAreaTypeState> |
| | | ) => { |
| | | const openFacilityAreaDialog = (type: string, value: { id: number; region: string; regionTypeId: number }, facilityAreaTypeList: Array<facilityAreaTypeState>) => { |
| | | state.isShowFacilityAreaDialog = true; |
| | | state.facilityAreaTypeList = facilityAreaTypeList.filter((item) => item.regionType !== '所有类型'); |
| | | setTimeout(() => { |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="isShowInspectPointDialog = !isShowInspectPointDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitInspectPoint" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitInspectPoint" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="指标类型" prop="quotaTypeId"> |
| | | <el-select |
| | | class="input-length" |
| | | v-model="inspectTargetForm.quotaTypeId" |
| | | @change="changeQuotaUnit" |
| | | placeholder="请选择指标类型" |
| | | clearable |
| | | filterable |
| | | > |
| | | <el-select class="input-length" v-model="inspectTargetForm.quotaTypeId" @change="changeQuotaUnit" placeholder="请选择指标类型" clearable filterable> |
| | | <el-option v-for="item in quotaTypeList" :key="item.id" :label="item.type" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="指标单位" prop="quotaUnit"> |
| | | <el-input |
| | | class="input-length" |
| | | v-model.trim="inspectTargetForm.quotaUnit" |
| | | type="textarea" |
| | | placeholder="请输入指标单位" |
| | | maxlength="150" |
| | | ></el-input> |
| | | <el-input class="input-length" v-model.trim="inspectTargetForm.quotaUnit" type="textarea" placeholder="请输入指标单位" maxlength="150"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="isShowInspectTargetDialog = !isShowInspectTargetDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitInspectTarget" v-throttle size="default">确 实</el-button> |
| | | <el-button type="primary" @click="submitInspectTarget" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | }; |
| | | |
| | | const changeQuotaUnit = () => { |
| | | state.inspectTargetForm.quotaUnit = JSON.parse(JSON.stringify(state.quotaTypeList)).find( |
| | | (item: any) => item.id === state.inspectTargetForm.quotaTypeId |
| | | ).unit; |
| | | state.inspectTargetForm.quotaUnit = JSON.parse(JSON.stringify(state.quotaTypeList)).find((item: any) => item.id === state.inspectTargetForm.quotaTypeId).unit; |
| | | }; |
| | | |
| | | //新增修改提交 |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="isShowUserDialog = !isShowUserDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" v-throttle @click="onSubmit" size="default">新 增</el-button> |
| | | <el-button type="primary" v-throttle @click="onSubmit" size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |