| | |
| | | import '/@/theme/index.scss'; |
| | | import mitt from 'mitt'; |
| | | import VueGridLayout from 'vue-grid-layout'; |
| | | import locale from 'element-plus/lib/locale/lang/zh-cn' |
| | | |
| | | const app = createApp(App); |
| | | for (const [key, component] of Object.entries(ElementPlusIconsVue)) { |
| | |
| | | directive(app); |
| | | other.elSvg(app); |
| | | |
| | | app.use(pinia).use(router).use(ElementPlus, { i18n: i18n.global.t }).use(i18n).use(VueGridLayout).mount('#app'); |
| | | app.use(pinia).use(router).use(ElementPlus, { i18n: i18n.global.t,locale }).use(i18n).use(VueGridLayout).mount('#app'); |
| | | |
| | | app.config.globalProperties.mittBus = mitt(); |
| | |
| | | await initBackEndControlRoutes(); |
| | | router.push('/home') |
| | | }; |
| | | //点击进入特殊作业 |
| | | const toSpecialWorkSys = () => { |
| | | router.push('/layoutPage'); |
| | | }; |
| | | // //点击进入特殊作业 |
| | | // const toSpecialWorkSys = () => { |
| | | // router.push('/layoutPage'); |
| | | // }; |
| | | // 页面加载时 |
| | | onMounted(() => { |
| | | NextLoading.done(); |
| | |
| | | loginIconTwo, |
| | | getThemeConfig, |
| | | renderMenu, |
| | | toSpecialWorkSys, |
| | | ...toRefs(state), |
| | | }; |
| | | }, |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <el-scrollbar height="100%"> |
| | | <div class="homeCard"> |
| | | <el-row> |
| | | <el-button type="primary" size="large" @click="addApprove">新建审批环节</el-button> |
| | | </el-row> |
| | | <el-row> |
| | | <el-table :data="tableData" border style="width: 100%"> |
| | | <el-table-column prop="id" label="编号" width="180" /> |
| | | <el-table-column prop="step" label="环节名称" width="180" /> |
| | | <el-table-column prop="type" label="审核类型"/> |
| | | <el-table-column type="index" label="编号" width="100"/> |
| | | <el-table-column prop="step" label="环节名称"/> |
| | | <el-table-column prop="type" label="审核类型" width="180"/> |
| | | <el-table-column prop="createTime" label="创建时间" width="180" /> |
| | | <el-table-column prop="editor" label="最新编辑人" width="180" /> |
| | | <el-table-column prop="editorTime" label="最新编辑时间" /> |
| | | <el-table-column prop="editeTime" label="最新编辑时间" width="180" /> |
| | | <el-table-column fixed="right" label="操作" width="180"> |
| | | <template #default> |
| | | <el-button link type="primary" size="small">编辑</el-button> |
| | | <el-button link type="danger" size="small">删除</el-button> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="editeRow(scope.$index,scope.row)">编辑</el-button> |
| | | <el-button link type="danger" size="small" @click="deleteRow(scope.$index)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-row> |
| | | <el-dialog v-model="dialogAddForm" title="新建审批环节"> |
| | | <el-form :model="reportForm" label-width="120px"> |
| | | <el-form-item label="环节名称"> |
| | | </div> |
| | | <el-dialog v-model="dialogAddForm" title="新建审批环节" @close="dialogColse"> |
| | | <el-form :model="reportForm" label-width="120px" ref="ruleFormRef" :rules="rules"> |
| | | <el-form-item label="环节名称" prop="step"> |
| | | <el-select v-model="reportForm.step" placeholder="选择环节名称"> |
| | | <el-option label="作业负责人审批" value="作业负责人审批" /> |
| | | <el-option label="作业负责人审批2" value="作业负责人审批2" /> |
| | | <el-option label="作业负责人审批3" value="作业负责人审批3" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="审核类型"> |
| | | <el-form-item label="审核类型" prop="type"> |
| | | <el-select v-model="reportForm.type" placeholder="选择审核类型"> |
| | | <el-option label="上报审批意见" value="上报审批意见" /> |
| | | <el-option label="上报气体检测数据" value="上报气体检测数据" /> |
| | |
| | | <el-input v-model="reportForm.editor" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="onSubmitAddForm" size="default">确认</el-button> |
| | | <el-button size="default">取消</el-button> |
| | | <el-button type="primary" @click="onSubmitAddForm(ruleFormRef)" size="default">确认</el-button> |
| | | <el-button size="default" @click="dialogAddForm = false">取消</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-dialog> |
| | | </el-scrollbar> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | import { Session } from '/@/utils/storage'; |
| | | import { ElMessage } from 'element-plus' |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | |
| | | let global: any = { |
| | | homeChartOne: null, |
| | | homeChartTwo: null, |
| | |
| | | interface type { |
| | | |
| | | } |
| | | interface User { |
| | | step: string, |
| | | type: string, |
| | | createTime: string |
| | | } |
| | | export default defineComponent({ |
| | | name: 'reportTypeSetting', |
| | | setup() { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({}); |
| | | const tableData = [ |
| | | const tableData = reactive([ |
| | | { |
| | | id: '0', |
| | | step: '作业负责人审批', |
| | | type: '', |
| | | createTime: '', |
| | | editor: '', |
| | | editorTime: '' |
| | | editeTime: '' |
| | | }, |
| | | { |
| | | id: '1', |
| | | step: '作业负责人审批', |
| | | type: '', |
| | | createTime: '', |
| | | editor: '', |
| | | editorTime: '' |
| | | editeTime: '' |
| | | }, |
| | | { |
| | | id: '2', |
| | | step: '作业负责人审批', |
| | | type: '', |
| | | createTime: '', |
| | | editor: '', |
| | | editorTime: '' |
| | | editeTime: '' |
| | | } |
| | | ]; |
| | | ]); |
| | | const dialogAddForm = ref(false); |
| | | const reportForm = reactive({ |
| | | id: '', |
| | | const rowIndex = ref(-1) |
| | | const reportForm = ref({ |
| | | step: '', |
| | | type: '', |
| | | createTime: '', |
| | | editor: '', |
| | | editorTime: '' |
| | | editeTime: '' |
| | | }) |
| | | const addApprove = ()=>{ |
| | | dialogAddForm.value = true |
| | | }; |
| | | const onSubmitAddForm = () => { |
| | | console.log('submit!') |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const rules = reactive<FormRules>({ |
| | | step:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | type:[{required: true, message: '该内容不能为空',trigger:'blur'}] |
| | | }) |
| | | const onSubmitAddForm = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | if(rowIndex.value == -1){ |
| | | reportForm.value.createTime = new Date().toLocaleString() |
| | | reportForm.value.editeTime = new Date().toLocaleString() |
| | | tableData.push(reportForm.value) |
| | | }else{ |
| | | tableData[rowIndex.value] = reportForm.value |
| | | } |
| | | |
| | | // reportForm.value = { |
| | | // step: '', |
| | | // type: '', |
| | | // createTime: '', |
| | | // editor: '', |
| | | // editeTime: '' |
| | | // } |
| | | dialogAddForm.value = false |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | | }) |
| | | } |
| | | const editeRow = (index: number, row: User) =>{ |
| | | dialogAddForm.value = true |
| | | rowIndex.value = index |
| | | reportForm.value = JSON.parse(JSON.stringify(row)) |
| | | reportForm.value.editeTime = new Date().toLocaleString() |
| | | } |
| | | const deleteRow = (index)=>{ |
| | | tableData.splice( index,1) |
| | | } |
| | | const dialogColse = () =>{ |
| | | reportForm.value = { |
| | | step: '', |
| | | type: '', |
| | | createTime: '', |
| | | editor: '', |
| | | editeTime: '' |
| | | } |
| | | rowIndex.value = -1 |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | |
| | | tableData, |
| | | dialogAddForm, |
| | | reportForm, |
| | | ruleFormRef, |
| | | rules, |
| | | rowIndex, |
| | | dialogColse, |
| | | editeRow, |
| | | deleteRow, |
| | | addApprove, |
| | | onSubmitAddForm, |
| | | ...toRefs(state), |
| | |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | overflow: hidden; |
| | | padding: 80px; |
| | | padding: 20px; |
| | | height: 100%; |
| | | .homeCard{ |
| | | width: 100%; |
| | | padding: 20px; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | } |
| | | .el-row{ |
| | | margin-bottom: 20px; |
| | | } |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <el-scrollbar height="100%"> |
| | | <el-row> |
| | | <div class="homeCard"> |
| | | <el-col :span="12"> |
| | | <div class="grid-content topInfo"> |
| | | <div>流程名称</div> |
| | |
| | | <el-button plain>重置</el-button> |
| | | </div> |
| | | </el-col> |
| | | </div> |
| | | </el-row> |
| | | <div class="mainPages"> |
| | | <div class="homeCard"> |
| | | <div class="main-card"> |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | |
| | | /> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <style scoped lang="scss"> |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | padding: 20px 40px; |
| | | padding: 20px; |
| | | .homeCard{ |
| | | width: 100%; |
| | | padding: 20px; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | } |
| | | .el-row{ |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | .el-col{ |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 20px 0; |
| | | } |
| | | .grid-content{ |
| | | align-items: center; |
| | |
| | | } |
| | | .main-card{ |
| | | width: 100%; |
| | | padding: 20px; |
| | | background: #fff; |
| | | .cardTop{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 20px; |
| | | .mainCardBtn{ |
| | | margin: 0; |
| | | } |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <el-scrollbar height="100%"> |
| | | <div class="homeCard"> |
| | | <div> |
| | | <div v-for="(item,index) in approveSteps" class="stepItem"> |
| | | <div class="stepNum">{{index+1}}</div> |
| | | <div class="stepCard"> |
| | |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-row> |
| | | <el-button type="primary" @click="confirmEdit" size="default">确认</el-button> |
| | | <el-button @click="cancelEdit" size="default">取消</el-button> |
| | | <el-button type="primary" @click="confirmEdit" size="large">确认</el-button> |
| | | <el-button @click="cancelEdit" size="large">取消</el-button> |
| | | </el-row> |
| | | <el-drawer v-model="showAdd" direction="rtl"> |
| | | </div> |
| | | <el-drawer v-model="showAdd" direction="rtl" @close="colseDrawer"> |
| | | <template #title> |
| | | <h4>新增审批流</h4> |
| | | </template> |
| | | <template #default> |
| | | <el-form :model="addProgress" label-width="120px"> |
| | | <el-form-item label="审批部门"> |
| | | <el-form :model="addProgress" label-width="120px" ref="ruleFormRef" :rules="ProgressRules"> |
| | | <el-form-item label="审批部门" prop="department"> |
| | | <el-select v-model="addProgress.department" placeholder="请选择审批部门"> |
| | | <el-option label="动土" value="动土" /> |
| | | <el-option label="动火" value="动火" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="审批人员"> |
| | | <el-form-item label="审批人员" prop="manager"> |
| | | <el-select v-model="addProgress.manager" placeholder="请选择审批人员"> |
| | | <el-option label="人员1" value="人员1" /> |
| | | <el-option label="人员2" value="人员2" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="其他参数"> |
| | | <el-form-item label="其他参数" prop="others"> |
| | | <el-input v-model="addProgress.others" /> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </el-scrollbar> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | import { Session } from '/@/utils/storage'; |
| | | import { ElMessage } from 'element-plus' |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | let global: any = { |
| | | homeChartOne: null, |
| | | homeChartTwo: null, |
| | |
| | | manager: '', |
| | | others: '' |
| | | }) |
| | | const confirmClick = () => { |
| | | approveSteps.splice(chosenIndex.value+1,0,addProgress.value) |
| | | addProgress.value = { |
| | | department: '', |
| | | manager: '', |
| | | others: '' |
| | | } |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const ProgressRules = reactive<FormRules>({ |
| | | department: [{required:true,message: '该选项不能为空',trigger: 'blur'}], |
| | | manager: [{required:true,message: '该选项不能为空',trigger: 'blur'}] |
| | | }) |
| | | const confirmClick = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | approveSteps.splice(chosenIndex.value+1,0,addProgress.value) |
| | | showAdd.value = false |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | | }) |
| | | |
| | | } |
| | | const cancelClick=()=>{ |
| | | showAdd.value = false |
| | | } |
| | | const addFlow = (index) => { |
| | |
| | | approveSteps.splice( i,1) |
| | | deleteDialog.value = false |
| | | } |
| | | const colseDrawer = ()=>{ |
| | | addProgress.value = { |
| | | department: '', |
| | | manager: '', |
| | | others: '' |
| | | } |
| | | } |
| | | const cancelEdit = () => { |
| | | |
| | | } |
| | |
| | | showAdd, |
| | | approveSteps, |
| | | addProgress, |
| | | ruleFormRef, |
| | | ProgressRules, |
| | | chosenIndex, |
| | | deleteDialog, |
| | | colseDrawer, |
| | | conFirmDelete, |
| | | cancelClick, |
| | | deleteFlow, |
| | | addFlow, |
| | | confirmClick, |
| | |
| | | <style scoped lang="scss"> |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | padding: 80px; |
| | | padding: 20px; |
| | | .homeCard{ |
| | | width: 100%; |
| | | padding: 20px; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | } |
| | | .stepItem{ |
| | | display: flex; |
| | | align-items: flex-start; |
| | | margin-bottom: 30px; |
| | | margin-left: 30px; |
| | | padding-bottom: 30px; |
| | | border-left: 2px solid #ccc; |
| | | &:first-of-type{ |
| | | margin-top: 30px; |
| | | } |
| | | &:last-of-type{ |
| | | margin-bottom: 0; |
| | | border-left: none; |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <el-scrollbar height="100%"> |
| | | <div class="homeCard"> |
| | | <el-row> |
| | | <el-button type="primary" size="large" @click="addReport">新建上报类型</el-button> |
| | | </el-row> |
| | | <el-row> |
| | | <el-table :data="tableData" border style="width: 100%"> |
| | | <el-table-column prop="id" label="标识" width="180" /> |
| | | <el-table-column type="index" label="标识" width="100"/> |
| | | <el-table-column prop="type" label="上报数据类型名称" width="180" /> |
| | | <el-table-column prop="founder" label="创建人"/> |
| | | <el-table-column prop="createTime" label="创建时间" width="180" /> |
| | | <el-table-column prop="editor" label="最新编辑人" width="180" /> |
| | | <el-table-column prop="editorTime" label="最新编辑时间" /> |
| | | <el-table-column prop="editeTime" label="最新编辑时间" /> |
| | | <el-table-column fixed="right" label="操作" width="180"> |
| | | <template #default> |
| | | <el-button link type="primary" size="small">编辑</el-button> |
| | | <el-button link type="danger" size="small">删除</el-button> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="editeRow(scope.$index,scope.row)">编辑</el-button> |
| | | <el-button link type="danger" size="small" @click="deleteRow(scope.$index)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-row> |
| | | <el-dialog v-model="dialogAddForm" title="新建上报类型"> |
| | | <el-form :model="reportForm" label-width="120px"> |
| | | <el-form-item label="上报数据类型"> |
| | | </div> |
| | | <el-dialog v-model="dialogAddForm" title="新建上报类型" @close="dialogColse"> |
| | | <el-form :model="reportForm" label-width="120px" ref="ruleFormRef" :rules="addRules"> |
| | | <el-form-item label="上报数据类型" prop="type"> |
| | | <el-select v-model="reportForm.type" placeholder="选择上报数据类型"> |
| | | <el-option label="上报审批意见" value="上报审批意见" /> |
| | | <el-option label="上报气体监测数据" value="上报气体监测数据" /> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="创建人"> |
| | | <el-select v-model="reportForm.founder" placeholder="选择创建人"> |
| | | <el-select v-model="reportForm.founder" property="founder" placeholder="选择创建人"> |
| | | <el-option label="创建人1" value="创建人1" /> |
| | | <el-option label="创建人2" value="创建人2" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="最新编辑人"> |
| | | <el-form-item label="最新编辑人" prop="editor"> |
| | | <el-input v-model="reportForm.editor" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="onSubmitAddForm" size="default">确认</el-button> |
| | | <el-button size="default">取消</el-button> |
| | | <el-button type="primary" @click="onSubmitAddForm(ruleFormRef)" size="default">确认</el-button> |
| | | <el-button size="default" @click="dialogAddForm = false">取消</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-dialog> |
| | | </el-scrollbar> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | import { Session } from '/@/utils/storage'; |
| | | import { ElMessage } from 'element-plus' |
| | | import { FormInstance, FormRules } from 'element-plus' |
| | | let global: any = { |
| | | homeChartOne: null, |
| | | homeChartTwo: null, |
| | |
| | | interface type { |
| | | |
| | | } |
| | | interface User { |
| | | type: string, |
| | | founder: string, |
| | | editor: string |
| | | } |
| | | export default defineComponent({ |
| | | name: 'reportTypeSetting', |
| | | setup() { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({}); |
| | | const tableData = [ |
| | | const tableData =reactive([ |
| | | { |
| | | id: '0', |
| | | type: '上报审批意见', |
| | | founder: '', |
| | | createTime: '', |
| | | editor: '', |
| | | editorTime: '' |
| | | editeTime: '' |
| | | }, |
| | | { |
| | | id: '1', |
| | | type: '上报气体检测数据', |
| | | founder: '', |
| | | createTime: '', |
| | | editor: '', |
| | | editorTime: '' |
| | | editeTime: '' |
| | | }, |
| | | { |
| | | id: '2', |
| | | type: '上报安全措施确认', |
| | | founder: '', |
| | | createTime: '', |
| | | editor: '', |
| | | editorTime: '' |
| | | editeTime: '' |
| | | } |
| | | ]; |
| | | ]) |
| | | const dialogAddForm = ref(false); |
| | | const reportForm = reactive({ |
| | | id: '', |
| | | const rowIndex = ref(-1) |
| | | const reportForm = ref({ |
| | | type: '', |
| | | founder: '', |
| | | createTime: '', |
| | | editor: '', |
| | | editorTime: '' |
| | | editeTime: '' |
| | | }) |
| | | const addReport = ()=>{ |
| | | dialogAddForm.value = true |
| | | }; |
| | | const onSubmitAddForm = () => { |
| | | console.log('submit!') |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const addRules = reactive<FormRules>({ |
| | | type:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | founder:[{required: true, message: '该内容不能为空',trigger:'blur'}], |
| | | editor:[{required: true, message: '该内容不能为空',trigger:'blur'}] |
| | | }) |
| | | const onSubmitAddForm = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | if(rowIndex.value == -1){ |
| | | reportForm.value.createTime = new Date().toLocaleString() |
| | | reportForm.value.editeTime = new Date().toLocaleString() |
| | | tableData.push(reportForm.value) |
| | | }else{ |
| | | tableData[rowIndex.value] = reportForm.value |
| | | } |
| | | dialogAddForm.value = false |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | | }) |
| | | } |
| | | const editeRow = (index: number, row: User) =>{ |
| | | dialogAddForm.value = true |
| | | rowIndex.value = index |
| | | reportForm.value = JSON.parse(JSON.stringify(row)) |
| | | reportForm.value.editeTime = new Date().toLocaleString() |
| | | } |
| | | const deleteRow = (index)=>{ |
| | | tableData.splice( index,1) |
| | | } |
| | | const dialogColse = () =>{ |
| | | reportForm.value = { |
| | | type: '', |
| | | founder: '', |
| | | createTime: '', |
| | | editor: '', |
| | | editeTime: '' |
| | | } |
| | | rowIndex.value = -1 |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | |
| | | tableData, |
| | | dialogAddForm, |
| | | reportForm, |
| | | ruleFormRef, |
| | | addRules, |
| | | dialogColse, |
| | | editeRow, |
| | | deleteRow, |
| | | addReport, |
| | | onSubmitAddForm, |
| | | ...toRefs(state), |
| | |
| | | <style scoped lang="scss"> |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | padding: 80px; |
| | | padding: 20px; |
| | | .homeCard{ |
| | | width: 100%; |
| | | padding: 20px; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | } |
| | | .el-row{ |
| | | margin-bottom: 20px; |
| | | } |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <el-form :model="form" label-width="120px"> |
| | | <el-scrollbar height="100%"> |
| | | <div class="homeCard"> |
| | | <el-form :model="form" label-width="150px"> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="申请部门"> |
| | |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="申请人"> |
| | | <el-select v-model="form.applyName" placeholder="请选择"> |
| | | <el-option label="胡海涛" value="胡海涛" /> |
| | | <el-option label="其他人" value="其他人" /> |
| | | </el-select> |
| | | <el-input |
| | | v-model="form.applyName" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-button type="primary" size="default">添加作业人</el-button> |
| | | <el-col :span="3"><el-button type="primary" size="default" @click="dialogAddWorker = true">添加作业人</el-button></el-col> |
| | | <el-col :span="21"> |
| | | <el-table :data="form.workerList" style="width: 100%"> |
| | | <el-table-column type="index" label="序号" width="100"/> |
| | | <el-table-column prop="worker" label="作业人"/> |
| | | <el-table-column prop="role" label="作业人角色" width="180" /> |
| | | <el-table-column prop="unit" label="所属单位" width="180" /> |
| | | <el-table-column prop="certificate" label="证书名称" width="180" /> |
| | | <el-table-column prop="certificateId" label="证书号" /> |
| | | <el-table-column fixed="right" label="操作"> |
| | | <template #default="scope"> |
| | | <el-button link type="danger" size="small" @click="deleteRow(scope.$index)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业地点"> |
| | | <el-input |
| | | v-model="form.workLocation" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业期限"> |
| | | <el-date-picker |
| | | v-model="form.workTimeLine" |
| | | type="daterange" |
| | | unlink-panels |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | :shortcuts="shortcuts" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业内容"> |
| | | <el-input |
| | | v-model="form.workContent" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业单位"> |
| | | <el-input |
| | | v-model="form.workUnit" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append>选择作业单位</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="作业负责人"> |
| | | <el-input |
| | | v-model="form.responser" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="监护人"> |
| | | <el-input |
| | | v-model="form.monitor" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="监护人岗位"> |
| | | <el-input |
| | | v-model="form.monitorStation" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="生产车间负责人"> |
| | | <el-input |
| | | v-model="form.workhouseLeader" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="申请日期"> |
| | | <el-date-picker |
| | | size="large" |
| | | v-model="form.applyDate" |
| | | type="date" |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-divider /> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="涉及的其他特殊作业"> |
| | | <el-checkbox-group v-model="form.otherSpecialWorks"> |
| | | <el-checkbox label="动火作业" /> |
| | | <el-checkbox label="受限空间" /> |
| | | <el-checkbox label="高处作业" /> |
| | | <el-checkbox label="吊装作业" /> |
| | | <el-checkbox label="临时用电" /> |
| | | <el-checkbox label="设备检修" /> |
| | | <el-checkbox label="盲板抽堵" /> |
| | | <el-checkbox label="断路作业" /> |
| | | <el-checkbox label="动土作业" /> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col> |
| | | <el-form-item label="防护用品"> |
| | | <el-cascader |
| | | v-model="form.protections" |
| | | :options="protectOption" |
| | | :props="{expandTrigger: 'hover'}" |
| | | @change="protectionsChange" |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"><el-button type="primary" size="default" @click="dialogAddFile = true">点击添加安全交底和风险告知书</el-button></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="实施安全教育人"> |
| | | <el-input |
| | | v-model="form.safetyMan" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="被教育人"> |
| | | <el-input |
| | | v-model="form.educated" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-divider /> |
| | | <el-row> |
| | | <el-col :span="24" class="submitBtn"> |
| | | <el-button type="primary" size="large" plain>发起申请</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <el-dialog v-model="dialogAddWorker" title="添加作业人"> |
| | | <el-form :model="addWorkerForm" label-width="120px"> |
| | | <el-form-item label="作业人"> |
| | | <el-input |
| | | v-model="addWorkerForm.worker" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="作业人角色"> |
| | | <el-input |
| | | v-model="addWorkerForm.role" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="作业人角色"> |
| | | <el-input |
| | | v-model="addWorkerForm.unit" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="证书名称"> |
| | | <el-input |
| | | v-model="addWorkerForm.certificate" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="证书号"> |
| | | <el-input |
| | | v-model="addWorkerForm.certificateId" |
| | | placeholder="请输入" |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="onSubmitAddForm" size="default">确认</el-button> |
| | | <el-button size="default" @click="cancleAdd">取消</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogAddFile" title="安全交底和风险告知"> |
| | | <el-form :model="saftyFileForm" label-width="0" ref="ruleFormRef" :rules="saftyFileRules"> |
| | | <el-form-item label="" prop="surrounding"> |
| | | <div>1.作业许可范围及作业环境:</div> |
| | | <el-input |
| | | v-model="saftyFileForm.surrounding" |
| | | :rows="2" |
| | | type="textarea" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="risk"> |
| | | <div>2.作业风险:</div> |
| | | <el-input |
| | | v-model="saftyFileForm.risk" |
| | | :rows="2" |
| | | type="textarea" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="protection"> |
| | | <div>3.防范措施(工艺、设备、个体防护等):</div> |
| | | <el-input |
| | | v-model="saftyFileForm.protection" |
| | | :rows="2" |
| | | type="textarea" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="emergency"> |
| | | <div>4.应急措施:</div> |
| | | <el-input |
| | | v-model="saftyFileForm.emergency" |
| | | :rows="2" |
| | | type="textarea" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="otherStuff"> |
| | | <div>5.其他注意事项:</div> |
| | | <el-input |
| | | v-model="saftyFileForm.otherStuff" |
| | | :rows="2" |
| | | type="textarea" |
| | | placeholder="请输入" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="onSubmitAddFile(ruleFormRef)" size="default">确认</el-button> |
| | | <el-button size="default" @click="cancleAddFile">取消</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-dialog> |
| | | </el-scrollbar> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | import { Session } from '/@/utils/storage'; |
| | | import { Search } from '@element-plus/icons-vue' |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | let global: any = { |
| | | homeChartOne: null, |
| | | homeChartTwo: null, |
| | |
| | | applyName: '', |
| | | level: '', |
| | | riskIdentify: '', |
| | | workWay: '' |
| | | workWay: '', |
| | | workerList: [], |
| | | workLocation: '', |
| | | workTimeLine: '', |
| | | workContent: '', |
| | | workUnit: '', |
| | | responser: '', |
| | | monitor: '', |
| | | workMonitor: '', |
| | | monitorStation: '', |
| | | workhouseLeader: '', |
| | | applyDate: '', |
| | | otherSpecialWorks: [], |
| | | protections: '', |
| | | saftyFile: {}, |
| | | safetyMan: '', |
| | | educated: '' |
| | | }) |
| | | const dialogAddWorker = ref(false) |
| | | const dialogAddFile = ref(false) |
| | | const addWorkerForm = ref({ |
| | | worker: '', |
| | | role: '', |
| | | unit: '', |
| | | certificate: '', |
| | | certificateId: '' |
| | | }) |
| | | const saftyFileForm = reactive({ |
| | | surrounding: '', |
| | | risk: '', |
| | | protection: '', |
| | | emergency: '', |
| | | otherStuff: '' |
| | | }) |
| | | const shortcuts = [ |
| | | { |
| | | text: 'Last week', |
| | | value: () => { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) |
| | | return [start, end] |
| | | }, |
| | | }, |
| | | { |
| | | text: 'Last month', |
| | | value: () => { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) |
| | | return [start, end] |
| | | }, |
| | | }, |
| | | { |
| | | text: 'Last 3 months', |
| | | value: () => { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) |
| | | return [start, end] |
| | | }, |
| | | }, |
| | | ] |
| | | const protectOption = [ |
| | | { |
| | | value: 'guide', |
| | | label: 'Guide', |
| | | children: [ |
| | | { |
| | | value: 'disciplines', |
| | | label: 'Disciplines', |
| | | children: [ |
| | | { |
| | | value: 'consistency', |
| | | label: 'Consistency', |
| | | }, |
| | | { |
| | | value: 'feedback', |
| | | label: 'Feedback', |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | value: 'navigation', |
| | | label: 'Navigation', |
| | | children: [ |
| | | { |
| | | value: 'side nav', |
| | | label: 'Side Navigation', |
| | | } |
| | | ], |
| | | }, |
| | | ], |
| | | } |
| | | ] |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const saftyFileRules = reactive<FormRules>({ |
| | | surrounding: [{required: true,message: '该选项不能为空'}], |
| | | risk: [{required: true,message: '该选项不能为空'}], |
| | | protection: [{required: true,message: '该选项不能为空'} ], |
| | | emergency: [{required: true,message: '该选项不能为空'} ] |
| | | }) |
| | | const protectionsChange = (value) => { |
| | | console.log(value) |
| | | } |
| | | |
| | | const onSubmit = () => { |
| | | console.log('submit!') |
| | | const onSubmitAddForm = () => { |
| | | form.workerList.push(addWorkerForm.value) |
| | | addWorkerForm.value = { |
| | | worker: '', |
| | | role: '', |
| | | unit: '', |
| | | certificate: '', |
| | | certificateId: '' |
| | | } |
| | | dialogAddWorker.value = false |
| | | } |
| | | const onSubmitAddFile = () =>{ |
| | | |
| | | } |
| | | const cancleAdd = ()=> { |
| | | addWorkerForm.value = { |
| | | worker: '', |
| | | role: '', |
| | | unit: '', |
| | | certificate: '', |
| | | certificateId: '' |
| | | } |
| | | dialogAddWorker.value = false |
| | | } |
| | | const cancleAddFile = ()=>{ |
| | | |
| | | } |
| | | const deleteRow = (index) =>{ |
| | | form.workerList.splice( index,1) |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | |
| | | return { |
| | | renderMenu, |
| | | form, |
| | | onSubmit, |
| | | Search, |
| | | shortcuts, |
| | | protectOption, |
| | | dialogAddWorker, |
| | | dialogAddFile, |
| | | addWorkerForm, |
| | | saftyFileForm, |
| | | ruleFormRef, |
| | | saftyFileRules, |
| | | cancleAddFile, |
| | | deleteRow, |
| | | cancleAdd, |
| | | onSubmitAddForm, |
| | | onSubmitAddFile, |
| | | protectionsChange, |
| | | ...toRefs(state), |
| | | }; |
| | | }, |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | padding: 40px; |
| | | padding: 20px; |
| | | .homeCard{ |
| | | width: 100%; |
| | | padding: 20px; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | } |
| | | .el-row{ |
| | | margin-bottom: 20px; |
| | | } |
| | |
| | | margin-bottom: 0; |
| | | } |
| | | .el-col{ |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 10px; |
| | | } |
| | | .el-input{ |
| | | width: 100% !important; |
| | | } |
| | | .el-date-editor::v-deep{ |
| | | width: 100%; |
| | | } |
| | | .el-select{ |
| | | width: 100%; |
| | | } |
| | | .el-cascader{ |
| | | width: 100% !important; |
| | | } |
| | | .submitBtn{ |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <el-scrollbar height="100%"> |
| | | <el-row> |
| | | <div class="homeCard"> |
| | | <el-col :span="6"> |
| | | <div class="grid-content topInfo"> |
| | | <div>预约时间:</div> |
| | |
| | | </el-col> |
| | | <el-col :span="12" class="topBtns"> |
| | | <div class="grid-content topInfo"> |
| | | <div style="margin-right: 20px"><el-button type="primary" plain size="default">查询历史</el-button></div> |
| | | <div><el-button type="primary" @click="dialogChartsVisible = true" size="default">查看统计图表</el-button></div> |
| | | <div style="margin-right: 20px"><el-button type="primary" plain>查询历史</el-button></div> |
| | | <div><el-button type="primary" @click="dialogChartsVisible = true">查看统计图表</el-button></div> |
| | | </div> |
| | | </el-col> |
| | | </div> |
| | | </el-row> |
| | | <el-row> |
| | | <div class="homeCard"> |
| | | <el-table :data="tableData" border style="width: 100%"> |
| | | <el-table-column prop="id" label="编号" width="180" /> |
| | | <el-table-column prop="time" label="预约时间" width="180" /> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-row> |
| | | <el-dialog v-model="dialogChartsVisible" title="统计图表"> |
| | | <el-row> |
| | |
| | | v-model="dateRange" |
| | | type="daterange" |
| | | unlink-panels |
| | | range-separator="To" |
| | | range-separator="至" |
| | | start-placeholder="Start date" |
| | | end-placeholder="End date" |
| | | :shortcuts="shortcuts" |
| | |
| | | </el-row> |
| | | <div ref="myChart" style="width: 100%;height:400px;"></div> |
| | | </el-dialog> |
| | | </el-scrollbar> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <style scoped lang="scss"> |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | padding: 20px 40px; |
| | | padding: 20px; |
| | | .el-row{ |
| | | margin-bottom: 20px; |
| | | } |
| | | .el-row:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | .el-col{ |
| | | .homeCard{ |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 40px 0; |
| | | padding: 20px; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .grid-content{ |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <el-scrollbar height="100%"> |
| | | <el-row> |
| | | <div class="homeCard"> |
| | | <el-col :span="6"> |
| | | <div class="grid-content topInfo"> |
| | | <div>当前所属部门:</div> |
| | |
| | | <div><el-button type="success" @click="dialogFormVisible = true">新增预约</el-button></div> |
| | | </div> |
| | | </el-col> |
| | | </div> |
| | | </el-row> |
| | | <el-row> |
| | | <div class="homeCard"> |
| | | <el-table :data="tableData" border style="width: 100%"> |
| | | <el-table-column prop="id" label="编号" width="120" /> |
| | | <el-table-column prop="time" label="预约时间" width="150" /> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-row> |
| | | <el-dialog v-model="dialogFormVisible" title="新增预约"> |
| | | <el-form :model="reservationForm"> |
| | |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </el-scrollbar> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <style scoped lang="scss"> |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | padding: 20px 40px; |
| | | padding: 20px; |
| | | .el-row{ |
| | | margin-bottom: 20px; |
| | | } |
| | | .el-row:last-child { |
| | | .el-row:last-of-type { |
| | | margin-bottom: 0; |
| | | } |
| | | .el-col{ |
| | | .homeCard{ |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 40px 0 20px; |
| | | padding: 20px; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | } |
| | | .grid-content{ |
| | | align-items: center; |