From b5069cc8ebdb8bc51f1b45f0c49a7e385490a32a Mon Sep 17 00:00:00 2001 From: Your Name <123456> Date: 星期一, 04 七月 2022 11:17:28 +0800 Subject: [PATCH] Merge branch 'master' of https://sinanoaq.cn:8888/r/gtqt --- src/assets/loginPage/login-bg.jpg | 0 src/views/layoutPage/index.vue | 182 ++++++ src/views/specialWorkSystem/approvalProcess/approveProcessManagement/index.vue | 289 ++++++++++ src/views/specialWorkSystem/workApplyManagement/workApply/index.vue | 130 ++++ src/assets/loginPage/login-bg.png | 0 src/views/specialWorkSystem/workPlan/workAppointSummary/index.vue | 241 ++++--- src/main.ts | 5 src/views/specialWorkSystem/workPlan/workReservation/index.vue | 43 /dev/null | 182 ------ src/views/loginPage/loginPage.vue | 5 src/views/specialWorkSystem/approvalProcess/reportTypeSetting/index.vue | 147 +++++ src/views/specialWorkSystem/approvalProcess/addApproveProcess/index.vue | 148 +++++ src/assets/menu/bg_home1.jpg | 0 package.json | 2 src/views/specialWorkSystem/approvalProcess/approveProcessSetting/index.vue | 246 ++++++++ src/views/homeMenu/homeMenu.vue | 34 16 files changed, 1,324 insertions(+), 330 deletions(-) diff --git a/package.json b/package.json index 56ddfa6..a092f0e 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/" }, "dependencies": { - "@element-plus/icons-vue": "^2.0.3", + "@element-plus/icons-vue": "^2.0.6", "@wangeditor/editor": "^5.1.1", "axios": "^0.27.2", "countup.js": "^2.2.0", diff --git a/src/assets/loginPage/login-bg.jpg b/src/assets/loginPage/login-bg.jpg new file mode 100644 index 0000000..6427cb6 --- /dev/null +++ b/src/assets/loginPage/login-bg.jpg Binary files differ diff --git a/src/assets/loginPage/login-bg.png b/src/assets/loginPage/login-bg.png new file mode 100644 index 0000000..71fd539 --- /dev/null +++ b/src/assets/loginPage/login-bg.png Binary files differ diff --git a/src/assets/menu/bg_home1.jpg b/src/assets/menu/bg_home1.jpg new file mode 100644 index 0000000..b4389fb --- /dev/null +++ b/src/assets/menu/bg_home1.jpg Binary files differ diff --git a/src/main.ts b/src/main.ts index acd3d24..b5bd532 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,13 +7,16 @@ import other from '/@/utils/other'; import ElementPlus from 'element-plus'; +import * as ElementPlusIconsVue from '@element-plus/icons-vue' import 'element-plus/dist/index.css'; import '/@/theme/index.scss'; import mitt from 'mitt'; import VueGridLayout from 'vue-grid-layout'; const app = createApp(App); - +for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component) +} directive(app); other.elSvg(app); diff --git a/src/views/homeMenu/homeMenu.vue b/src/views/homeMenu/homeMenu.vue index 79c6862..1b8ad74 100644 --- a/src/views/homeMenu/homeMenu.vue +++ b/src/views/homeMenu/homeMenu.vue @@ -3,9 +3,9 @@ <div class="topPanel"> <div class="topPanelCont"> <div class="topTit"> - <div>新疆国泰新华安</div> + <div>新疆国泰新华</div> <span></span> - <div>全风险预警监测系统</div> + <div>安全风险预警监测系统</div> </div> <div class="userInfo"> <div class="avator"> @@ -20,7 +20,7 @@ <div class="menuGrid"> <div class="gridCont"> - <el-row :gutter="16"> + <el-row :gutter="20"> <el-col :span="6"><div class="grid-content" @click="renderMenu('2')"><div class="itemTit">双重预防系统</div><img class="iconImg" src="../../assets/menu/icon4.png"><img class="bgImg" src="../../assets/menu/card4.png"></div></el-col> <el-col :span="6"><div class="grid-content" @click="renderMenu('3')"><div class="itemTit">特殊作业系统</div><img class="iconImg" src="../../assets/menu/icon7.png"><img class="bgImg" src="../../assets/menu/card7.png"></div></el-col> <el-col :span="6"><div class="grid-content" @click="renderMenu('4')"><div class="itemTit">智能巡检系统</div><img class="iconImg" src="../../assets/menu/icon8.png"><img class="bgImg" src="../../assets/menu/card8.png"></div></el-col> @@ -34,13 +34,13 @@ </div> </el-col> </el-row> - <el-row :gutter="16"> + <el-row :gutter="20"> <el-col :span="6"><div class="grid-content grid-content-2" @click="renderMenu('6')"><div class="itemTit">应急管理系统</div><img class="iconImg" src="../../assets/menu/icon5.png"><img class="bgImg" src="../../assets/menu/card5.png"></div></el-col> <el-col :span="6"><div class="grid-content grid-content-2" @click="renderMenu('7')"><div class="itemTit">目标责任管理系统</div><img class="iconImg" src="../../assets/menu/icon2.png"><img class="bgImg" src="../../assets/menu/card2.png"></div></el-col> <el-col :span="6"><div class="grid-content grid-content-2" @click="renderMenu('8')"><div class="itemTit">事故管理系统</div><img class="iconImg" src="../../assets/menu/icon6.png"><img class="bgImg" src="../../assets/menu/card6.png"></div></el-col> <el-col :span="6"><div class="grid-content grid-content-2" @click="renderMenu('9')"><div class="itemTit">设备综合管控系统</div><img class="iconImg" src="../../assets/menu/icon9.png"><img class="bgImg" src="../../assets/menu/card9.png"></div></el-col> </el-row> - <el-row :gutter="16"> + <el-row :gutter="20"> <el-col :span="6"><div class="grid-content grid-content-3" @click="renderMenu('10')"><div class="itemTit">安全知识图谱系统</div><img class="iconImg" src="../../assets/menu/icon3.png"><img class="bgImg" src="../../assets/menu/card3.png"></div></el-col> <el-col :span="9"><div class="grid-content grid-content-3" @click="renderMenu('11')"><div class="itemTit">危险化学品全生命周期安全<br>管理系统</div><img class="iconImg" src="../../assets/menu/icon10.png"><img class="bgImg" src="../../assets/menu/card10.png"></div></el-col> <el-col :span="9"><div class="grid-content grid-content-3" @click="renderMenu('1')"><div class="itemTit">基础数据权限管理系统</div><img class="iconImg" src="../../assets/menu/icon11.png"><img class="bgImg" src="../../assets/menu/card11.png"></div></el-col> @@ -94,11 +94,11 @@ Session.set('projectId',value) userInfos.value.projectId = value await initBackEndControlRoutes(); - router.push('./') + router.push('/layoutPage') }; //点击进入特殊作业 const toSpecialWorkSys = () => { - router.push('/workReservation'); + router.push('/layoutPage'); }; // 页面加载时 onMounted(() => { @@ -123,7 +123,7 @@ width: 100%; height: 100%; position: relative; - background: url("../../assets/menu/bg_home.jpg") no-repeat center; + background: url("../../assets/menu/bg_home1.jpg") no-repeat center; .topPanel{ position: absolute; width: 100%; @@ -218,7 +218,7 @@ .gridCont{ width: 1200px; .el-row { - margin-bottom: 16px; + margin-bottom: 20px; } .el-row:last-child { margin-bottom: 0; @@ -228,11 +228,11 @@ } .grid-content { - border-radius: 8px; + border-radius: 10px; height: 234px; padding: 32px; position: relative; - background-image: linear-gradient(135deg,#00C0F5,#147AEA); + background-image: linear-gradient(135deg,#00C0F5,#44b1ff); overflow: hidden; cursor: pointer; transition: .3s; @@ -263,13 +263,13 @@ } } - .grid-content-2{ - background-image: linear-gradient(135deg,#0098F5,#1461EA); - } + /*.grid-content-2{*/ + /* background-image: linear-gradient(135deg,#0098F5,#1461EA);*/ + /*}*/ - .grid-content-3{ - background-image: linear-gradient(135deg,#006DF5,#1450EA); - } + /*.grid-content-3{*/ + /* background-image: linear-gradient(135deg,#006DF5,#1450EA);*/ + /*}*/ } } diff --git a/src/views/layoutPage/index.vue b/src/views/layoutPage/index.vue new file mode 100644 index 0000000..fc2ab10 --- /dev/null +++ b/src/views/layoutPage/index.vue @@ -0,0 +1,182 @@ +<template> + <div class="home-container"> + <el-row :gutter="15" class="home-card-one mb15"> + <el-col + :xs="24" + :sm="12" + :md="12" + :lg="4" + :xl="4" + v-for="(v, k) in homeOne" + :key="k" + :class="{ 'home-media home-media-lg': k > 1, 'home-media-sm': k === 1 }" + > + <div class="home-card-item flex" > + <el-button @click="renderMenu(v.id)">{{v.name}}</el-button> + </div> + </el-col> + </el-row> + <el-row :gutter="15" class="home-card-two mb15"> + <el-col :xs="24" :sm="14" :md="14" :lg="16" :xl="16"> + <div class="home-card-item"> + <div style="height: 100%"> + <el-button @click="renderMenu('6')">{{'应急管理系统'}}</el-button> + </div> + </div> + </el-col> + <el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="8" class="home-media"> + <div class="home-card-item"> + <div style="height: 100%"> + <el-button @click="renderMenu('7')">{{'目标责任管理系统'}}</el-button> + </div> + </div> + </el-col> + </el-row> + <el-row :gutter="15" class="home-card-three"> + <el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="8"> + <div class="home-card-item"> + <el-button @click="renderMenu('8')">{{'事故管理系统'}}</el-button> + </div> + </el-col> + <el-col :xs="24" :sm="14" :md="14" :lg="16" :xl="16" class="home-media"> + <div class="home-card-item"> + <div style="height: 100%"> + <el-button @click="renderMenu('9')">{{'设备综合管控系统'}}</el-button> + </div> + </div> + </el-col> + </el-row> + </div> +</template> + +<script lang="ts"> +import { toRefs, reactive, defineComponent, } from 'vue'; +import { storeToRefs } from 'pinia'; +import { initBackEndControlRoutes } from '/@/router/backEnd'; +import {useUserInfo} from "/@/stores/userInfo"; +import { Session } from '/@/utils/storage'; +let global: any = { + homeChartOne: null, + homeChartTwo: null, + homeCharThree: null, + dispose: [null, '', undefined], +}; + +interface stateType { + homeOne: Array <type> +} +interface type { + id:number, + name: string +} +export default defineComponent({ + name: 'layoutPage', + setup() { + const userInfo = useUserInfo() + const { userInfos } = storeToRefs(userInfo); + const state = reactive<stateType>({ + homeOne:[{id:1,name:'基础数据权限管理系统'},{id:2,name:'双重预防系统'},{id:3,name:'系统2'},{id:4,name:'系统3'},{id:5,name:'系统4'}], + }); + // 折线图 + const renderMenu = async (value: string) => { + Session.set('projectId',value) + userInfos.value.projectId = value + await initBackEndControlRoutes(); + }; + return { + renderMenu, + ...toRefs(state), + }; + }, +}); +</script> + +<style scoped lang="scss"> +$homeNavLengh: 8; +.home-container { + overflow: hidden; + .home-card-one, + .home-card-two, + .home-card-three { + .home-card-item { + width: 100%; + height: 130px; + border-radius: 4px; + transition: all ease 0.3s; + padding: 20px; + overflow: hidden; + background: var(--el-color-white); + color: var(--el-text-color-primary); + border: 1px solid var(--next-border-color-light); + &:hover { + box-shadow: 0 2px 12px var(--next-color-dark-hover); + transition: all ease 0.3s; + } + &-icon { + width: 70px; + height: 70px; + border-radius: 100%; + flex-shrink: 1; + i { + color: var(--el-text-color-placeholder); + } + } + &-title { + font-size: 15px; + font-weight: bold; + height: 30px; + } + } + } + .home-card-one { + @for $i from 0 through 3 { + .home-one-animation#{$i} { + opacity: 0; + animation-name: error-num; + animation-duration: 0.5s; + animation-fill-mode: forwards; + animation-delay: calc($i/10) + s; + } + } + } + .home-card-two, + .home-card-three { + .home-card-item { + height: 400px; + width: 100%; + overflow: hidden; + .home-monitor { + height: 100%; + .flex-warp-item { + width: 25%; + height: 111px; + display: flex; + .flex-warp-item-box { + margin: auto; + text-align: center; + color: var(--el-text-color-primary); + display: flex; + border-radius: 5px; + background: var(--next-bg-color); + cursor: pointer; + transition: all 0.3s ease; + &:hover { + background: var(--el-color-primary-light-9); + transition: all 0.3s ease; + } + } + @for $i from 0 through $homeNavLengh { + .home-animation#{$i} { + opacity: 0; + animation-name: error-num; + animation-duration: 0.5s; + animation-fill-mode: forwards; + animation-delay: calc($i/10) + s; + } + } + } + } + } + } +} +</style> diff --git a/src/views/loginPage/loginPage.vue b/src/views/loginPage/loginPage.vue index 66c68bc..5346db8 100644 --- a/src/views/loginPage/loginPage.vue +++ b/src/views/loginPage/loginPage.vue @@ -82,7 +82,8 @@ display: flex; align-items: center; justify-content: center; - background-image: radial-gradient(at center, #0075c3, #000b61); + background: url("../../assets/loginPage/login-bg.jpg") no-repeat center; + /*background-image: radial-gradient(at center, #0075c3, #000b61);*/ canvas { display: block; @@ -113,7 +114,7 @@ .loginContL{ font-size: 48px; font-weight: bold; - padding-top: 20px; + padding-top: 80px; margin-right: 30px; .apTitleT{ diff --git a/src/views/specialWorkSystem/approvalProcess/addApproveProcess/index.vue b/src/views/specialWorkSystem/approvalProcess/addApproveProcess/index.vue new file mode 100644 index 0000000..1d7dbe0 --- /dev/null +++ b/src/views/specialWorkSystem/approvalProcess/addApproveProcess/index.vue @@ -0,0 +1,148 @@ +<template> + <div class="home-container"> + <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 prop="createTime" label="创建时间" width="180" /> + <el-table-column prop="editor" label="最新编辑人" width="180" /> + <el-table-column prop="editorTime" 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> + </el-table-column> + </el-table> + </el-row> + <el-dialog v-model="dialogAddForm" title="新建审批环节"> + <el-form :model="reportForm" label-width="120px"> + <el-form-item label="环节名称"> + <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-select v-model="reportForm.type" placeholder="选择审核类型"> + <el-option label="上报审批意见" value="上报审批意见" /> + <el-option label="上报气体检测数据" value="上报气体检测数据" /> + <el-option label="上报安全措施确认" value="上报安全措施确认" /> + </el-select> + </el-form-item> + <el-form-item label="最新编辑人"> + <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-form-item> + </el-form> + </el-dialog> + </div> +</template> + +<script lang="ts"> + import { toRefs, reactive, defineComponent, ref } from 'vue'; + import { storeToRefs } from 'pinia'; + import { initBackEndControlRoutes } from '/@/router/backEnd'; + import {useUserInfo} from "/@/stores/userInfo"; + import { Session } from '/@/utils/storage'; + import { ElMessage } from 'element-plus' + let global: any = { + homeChartOne: null, + homeChartTwo: null, + homeCharThree: null, + dispose: [null, '', undefined], + }; + + interface stateType { + homeOne: Array <type> + } + interface type { + + } + export default defineComponent({ + name: 'reportTypeSetting', + setup() { + const userInfo = useUserInfo() + const { userInfos } = storeToRefs(userInfo); + const state = reactive<stateType>({}); + const tableData = [ + { + id: '0', + step: '作业负责人审批', + type: '', + createTime: '', + editor: '', + editorTime: '' + }, + { + id: '1', + step: '作业负责人审批', + type: '', + createTime: '', + editor: '', + editorTime: '' + }, + { + id: '2', + step: '作业负责人审批', + type: '', + createTime: '', + editor: '', + editorTime: '' + } + ]; + const dialogAddForm = ref(false); + const reportForm = reactive({ + id: '', + step: '', + type: '', + createTime: '', + editor: '', + editorTime: '' + }) + const addApprove = ()=>{ + dialogAddForm.value = true + }; + const onSubmitAddForm = () => { + console.log('submit!') + } + // 折线图 + const renderMenu = async (value: string) => { + Session.set('projectId',value) + userInfos.value.projectId = value + await initBackEndControlRoutes(); + }; + return { + renderMenu, + tableData, + dialogAddForm, + reportForm, + addApprove, + onSubmitAddForm, + ...toRefs(state), + }; + }, + }); +</script> + +<style scoped lang="scss"> + $homeNavLengh: 8; + .home-container { + overflow: hidden; + padding: 80px; + .el-row{ + margin-bottom: 20px; + } + .el-row:last-child { + margin-bottom: 0; + } + } +</style> diff --git a/src/views/specialWorkSystem/approvalProcess/approveProcessManagement/index.vue b/src/views/specialWorkSystem/approvalProcess/approveProcessManagement/index.vue new file mode 100644 index 0000000..b93d5f4 --- /dev/null +++ b/src/views/specialWorkSystem/approvalProcess/approveProcessManagement/index.vue @@ -0,0 +1,289 @@ +<template> + <div class="home-container"> + <el-row> + <el-col :span="12"> + <div class="grid-content topInfo"> + <div>流程名称</div> + <el-input v-model="searchWord" placeholder="请输入关键词"></el-input> + <el-button type="primary">查询</el-button> + <el-button plain>重置</el-button> + </div> + </el-col> + </el-row> + <div class="mainPages"> + <div class="main-card"> + <el-row class="cardTop"> + <el-col :span="12" class="mainCardBtn"> + <el-button type="primary" :icon="Plus" size="default">新建</el-button> + <el-button type="danger" :icon="Delete" size="default">删除</el-button> + <el-button type="success" size="default">设置分类</el-button> + </el-col> + <el-button type="primary" :icon="Refresh" /> + </el-row> + <el-table + ref="multipleTableRef" + :data="tableData" + style="width: 100%" + :header-cell-style="{background: '#fafafa'}" + @selection-change="handleSelectionChange" + > + <el-table-column type="selection" width="55" /> + <el-table-column property="name" label="流程名称" width="200" /> + <el-table-column property="flowKey" label="流程key" width="180" /> + <el-table-column property="sort" label="分类"/> + <el-table-column label="版本" width="180"> + <template #default="scope"> + <el-tag>{{ scope.row.version }}</el-tag> + </template> + </el-table-column> + <el-table-column label="流程状态" width="180"> + <template #default="scope"> + <el-tag type="success">{{ scope.row.status }}</el-tag> + </template> + </el-table-column> + <el-table-column property="updateTime" label="更新时间"/> + <el-table-column fixed="right" label="操作" width="180"> + <template #default> + <el-button link type="primary" size="small">修改</el-button> + <el-button link type="success" size="small">发布</el-button> + <el-button link type="danger" size="small">删除</el-button> + </template> + </el-table-column> + </el-table> + </div> + <div class="pageBtn"> + <el-pagination + v-model:currentPage="currentPage" + v-model:page-size="pageSize" + :page-sizes="[10, 15]" + small=false + background + layout="total, sizes, prev, pager, next, jumper" + :total="100" + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + /> + </div> + </div> + </div> +</template> + +<script lang="ts"> + import { toRefs, reactive, defineComponent, ref } from 'vue'; + import { storeToRefs } from 'pinia'; + import { initBackEndControlRoutes } from '/@/router/backEnd'; + import {useUserInfo} from "/@/stores/userInfo"; + import { Session } from '/@/utils/storage'; + import { Plus, Delete, Refresh } from '@element-plus/icons-vue' + import { ElTable } from 'element-plus' + let global: any = { + homeChartOne: null, + homeChartTwo: null, + homeCharThree: null, + dispose: [null, '', undefined], + }; + + interface stateType { + homeOne: Array <type> + } + interface type { + + } + interface User { + date: string + name: string + address: string + } + export default defineComponent({ + name: 'reportTypeSetting', + setup() { + const userInfo = useUserInfo() + const { userInfos } = storeToRefs(userInfo); + const state = reactive<stateType>({}); + const multipleTableRef = ref<InstanceType<typeof ElTable>>() + const multipleSelection = ref<User[]>([]) + const handleSelectionChange = (val: User[]) => { + multipleSelection.value = val + } + const currentPage = ref(1) + const pageSize = ref(10) + const handleSizeChange = (val: number) => { + console.log(`${val} items per page`) + } + const handleCurrentChange = (val: number) => { + console.log(`current page: ${val}`) + } + const tableData: User[] = [ + { + name: '风险点复评预警', + flowKey: 'process111', + sort: '未设置', + version: 'V:4', + status: '已发布', + updateTime: '2021-04-22 15:21:31' + }, + { + name: '风险点复评预警', + flowKey: 'process111', + sort: '未设置', + version: 'V:4', + status: '已发布', + updateTime: '2021-04-22 15:21:31' + }, + { + name: '风险点复评预警', + flowKey: 'process111', + sort: '未设置', + version: 'V:4', + status: '已发布', + updateTime: '2021-04-22 15:21:31' + }, + { + name: '风险点复评预警', + flowKey: 'process111', + sort: '未设置', + version: 'V:4', + status: '已发布', + updateTime: '2021-04-22 15:21:31' + }, + { + name: '风险点复评预警', + flowKey: 'process111', + sort: '未设置', + version: 'V:4', + status: '已发布', + updateTime: '2021-04-22 15:21:31' + }, + { + name: '风险点复评预警', + flowKey: 'process111', + sort: '未设置', + version: 'V:4', + status: '已发布', + updateTime: '2021-04-22 15:21:31' + }, + { + name: '风险点复评预警', + flowKey: 'process111', + sort: '未设置', + version: 'V:4', + status: '已发布', + updateTime: '2021-04-22 15:21:31' + }, + { + name: '风险点复评预警', + flowKey: 'process111', + sort: '未设置', + version: 'V:4', + status: '已发布', + updateTime: '2021-04-22 15:21:31' + }, + { + name: '风险点复评预警', + flowKey: 'process111', + sort: '未设置', + version: 'V:4', + status: '已发布', + updateTime: '2021-04-22 15:21:31' + }, + { + name: '风险点复评预警', + flowKey: 'process111', + sort: '未设置', + version: 'V:4', + status: '已发布', + updateTime: '2021-04-22 15:21:31' + } + ] + // 折线图 + const renderMenu = async (value: string) => { + Session.set('projectId',value) + userInfos.value.projectId = value + await initBackEndControlRoutes(); + }; + return { + renderMenu, + multipleTableRef, + tableData, + currentPage, + pageSize, + handleSizeChange, + handleCurrentChange, + Plus, + Delete, + handleSelectionChange, + Refresh, + ...toRefs(state), + }; + }, + }); +</script> + +<style scoped lang="scss"> + $homeNavLengh: 8; + .home-container { + overflow: hidden; + padding: 20px 40px; + .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; + min-height: 36px; + } + + .topInfo { + display: flex; + align-items: center; + font-size: 16px; + font-weight: bold; + + &>div{ + white-space: nowrap; + margin-right: 20px; + } + } + } + .mainPages{ + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; + } + .main-card{ + width: 100%; + padding: 20px; + background: #fff; + .cardTop{ + display: flex; + align-items: center; + justify-content: space-between; + .mainCardBtn{ + margin: 0; + } + } + } + .pageBtn{ + display: flex; + align-items: center; + justify-content: right; + margin-top: 20px; + + .demo-pagination-block + .demo-pagination-block { + margin-top: 10px; + } + .demo-pagination-block .demonstration { + margin-bottom: 16px; + } + } + } +</style> diff --git a/src/views/specialWorkSystem/approvalProcess/approveProcessSetting/index.vue b/src/views/specialWorkSystem/approvalProcess/approveProcessSetting/index.vue new file mode 100644 index 0000000..5d7eae9 --- /dev/null +++ b/src/views/specialWorkSystem/approvalProcess/approveProcessSetting/index.vue @@ -0,0 +1,246 @@ +<template> + <div class="home-container"> + <div v-for="(item,index) in approveSteps" class="stepItem"> + <div class="stepNum">{{index+1}}</div> + <div class="stepCard"> + <el-card class="box-card" shadow="hover"> + <template #header> + <div class="card-header"> + <div>步骤<span>{{index+1}}</span></div> + <div> + <el-button type="primary" size="default" @click="addFlow(index)">新增</el-button> + <el-button type="danger" size="default" @click="deleteFlow(index)">删除</el-button> + </div> + </div> + </template> + <div class="text item">审批部门:<span>{{item.department}}</span></div> + <div class="text item">审批人员:<span>{{item.manager}}</span></div> + <div class="text item">其他参数:<span>{{item.others}}</span></div> + </el-card> + </div> + </div> + <el-row> + <el-button type="primary" @click="confirmEdit" size="default">确认</el-button> + <el-button @click="cancelEdit" size="default">取消</el-button> + </el-row> + <el-drawer v-model="showAdd" direction="rtl"> + <template #title> + <h4>新增审批流</h4> + </template> + <template #default> + <el-form :model="addProgress" label-width="120px"> + <el-form-item label="审批部门"> + <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-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-input v-model="addProgress.others" /> + </el-form-item> + </el-form> + </template> + <template #footer> + <div style="flex: auto"> + <el-button type="primary" @click="confirmClick(ruleFormRef)" size="default">确认</el-button> + <el-button @click="cancelClick" size="default">取消</el-button> + </div> + </template> + </el-drawer> + <el-dialog v-model="deleteDialog" title="提示" width="30%" center> + <span>您确定要删除该审批流吗?</span> + <template #footer> + <span class="dialog-footer"> + <el-button type="primary" @click="conFirmDelete" size="default">确认</el-button> + <el-button @click="deleteDialog = false" size="default">取消</el-button> + </span> + </template> + </el-dialog> + </div> +</template> + +<script lang="ts"> + import { toRefs, reactive, defineComponent, ref } from 'vue'; + import { storeToRefs } from 'pinia'; + import { initBackEndControlRoutes } from '/@/router/backEnd'; + import {useUserInfo} from "/@/stores/userInfo"; + import { Session } from '/@/utils/storage'; + import { ElMessage } from 'element-plus' + let global: any = { + homeChartOne: null, + homeChartTwo: null, + homeCharThree: null, + dispose: [null, '', undefined], + }; + + interface stateType { + homeOne: Array <type> + } + interface type { + + } + export default defineComponent({ + name: 'approveProcessSetting', + setup() { + const userInfo = useUserInfo() + const { userInfos } = storeToRefs(userInfo); + const approveSteps = [ + { + department: '动土', + manager: '', + others: '' + }, + { + department: '动土', + manager: '', + others: '' + }, + { + department: '动土', + manager: '', + others: '' + } + ]; + const showAdd = ref(false) + const deleteDialog = ref(false) + const chosenIndex = ref('') + const addProgress = ref({ + department: '', + manager: '', + others: '' + }) + const confirmClick = () => { + approveSteps.splice(chosenIndex.value+1,0,addProgress.value) + addProgress.value = { + department: '', + manager: '', + others: '' + } + showAdd.value = false + } + const addFlow = (index) => { + showAdd.value = true + chosenIndex.value = index + } + const deleteFlow = (index) => { + if(approveSteps.length>1){ + deleteDialog.value = true + chosenIndex.value = index + }else{ + ElMessage({ + message: '抱歉最后一条无法删除', + type: 'warning', + }) + } + } + const conFirmDelete = () => { + const i = chosenIndex.value + approveSteps.splice( i,1) + deleteDialog.value = false + } + const cancelEdit = () => { + + } + const confirmEdit = () =>{ + + } + const state = reactive<stateType>({}); + // 折线图 + const renderMenu = async (value: string) => { + Session.set('projectId',value) + userInfos.value.projectId = value + await initBackEndControlRoutes(); + }; + return { + renderMenu, + showAdd, + approveSteps, + addProgress, + chosenIndex, + deleteDialog, + conFirmDelete, + deleteFlow, + addFlow, + confirmClick, + cancelEdit, + confirmEdit, + ...toRefs(state), + }; + }, + }); +</script> + +<style scoped lang="scss"> + $homeNavLengh: 8; + .home-container { + overflow: hidden; + padding: 80px; + .stepItem{ + display: flex; + align-items: flex-start; + margin-bottom: 30px; + padding-bottom: 30px; + border-left: 2px solid #ccc; + &:last-of-type{ + margin-bottom: 0; + border-left: none; + } + .stepNum { + width: 30px; + height: 30px; + border-radius: 15px; + box-sizing: border-box; + color: #333; + border: 2px solid #999; + line-height: 26px; + text-align: center; + margin-right: 40px; + margin-left: -16px; + margin-top: -30px; + } + .stepCard { + margin-top: -30px; + + .box-card { + width: 480px; + + .card-header { + display: flex; + justify-content: space-between; + align-items: center; + + span{ + font-weight: bold; + margin-left: 10px; + } + } + + .text { + font-size: 14px; + } + + .item { + margin-bottom: 18px; + } + } + } + &:hover .card-header{ + color: #0098F5; + } + &:hover .stepNum{ + border: 2px solid #0098F5; + color: #0098F5; + } + } + + .el-form{ + padding: 40px 20px; + } + } +</style> diff --git a/src/views/specialWorkSystem/approvalProcess/reportTypeSetting/index.vue b/src/views/specialWorkSystem/approvalProcess/reportTypeSetting/index.vue new file mode 100644 index 0000000..5ab484f --- /dev/null +++ b/src/views/specialWorkSystem/approvalProcess/reportTypeSetting/index.vue @@ -0,0 +1,147 @@ +<template> + <div class="home-container"> + <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 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 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> + </el-table-column> + </el-table> + </el-row> + <el-dialog v-model="dialogAddForm" title="新建上报类型"> + <el-form :model="reportForm" label-width="120px"> + <el-form-item label="上报数据类型"> + <el-select v-model="reportForm.type" placeholder="选择上报数据类型"> + <el-option label="上报审批意见" value="上报审批意见" /> + <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-option label="创建人1" value="创建人1" /> + <el-option label="创建人2" value="创建人2" /> + </el-select> + </el-form-item> + <el-form-item label="最新编辑人"> + <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-form-item> + </el-form> + </el-dialog> + </div> +</template> + +<script lang="ts"> + import { toRefs, reactive, defineComponent, ref } from 'vue'; + import { storeToRefs } from 'pinia'; + import { initBackEndControlRoutes } from '/@/router/backEnd'; + import {useUserInfo} from "/@/stores/userInfo"; + import { Session } from '/@/utils/storage'; + import { ElMessage } from 'element-plus' + let global: any = { + homeChartOne: null, + homeChartTwo: null, + homeCharThree: null, + dispose: [null, '', undefined], + }; + + interface stateType { + homeOne: Array <type> + } + interface type { + + } + export default defineComponent({ + name: 'reportTypeSetting', + setup() { + const userInfo = useUserInfo() + const { userInfos } = storeToRefs(userInfo); + const state = reactive<stateType>({}); + const tableData = [ + { + id: '0', + type: '上报审批意见', + founder: '', + createTime: '', + editor: '', + editorTime: '' + }, + { + id: '1', + type: '上报气体检测数据', + founder: '', + createTime: '', + editor: '', + editorTime: '' + }, + { + id: '2', + type: '上报安全措施确认', + founder: '', + createTime: '', + editor: '', + editorTime: '' + } + ]; + const dialogAddForm = ref(false); + const reportForm = reactive({ + id: '', + type: '', + founder: '', + createTime: '', + editor: '', + editorTime: '' + }) + const addReport = ()=>{ + dialogAddForm.value = true + }; + const onSubmitAddForm = () => { + console.log('submit!') + } + // 折线图 + const renderMenu = async (value: string) => { + Session.set('projectId',value) + userInfos.value.projectId = value + await initBackEndControlRoutes(); + }; + return { + renderMenu, + tableData, + dialogAddForm, + reportForm, + addReport, + onSubmitAddForm, + ...toRefs(state), + }; + }, + }); +</script> + +<style scoped lang="scss"> + $homeNavLengh: 8; + .home-container { + overflow: hidden; + padding: 80px; + .el-row{ + margin-bottom: 20px; + } + .el-row:last-child { + margin-bottom: 0; + } + } +</style> diff --git a/src/views/specialWorkSystem/workApplyManagement/workApply/index.vue b/src/views/specialWorkSystem/workApplyManagement/workApply/index.vue new file mode 100644 index 0000000..9bde059 --- /dev/null +++ b/src/views/specialWorkSystem/workApplyManagement/workApply/index.vue @@ -0,0 +1,130 @@ +<template> + <div class="home-container"> + <el-form :model="form" label-width="120px"> + <el-row> + <el-col :span="8"> + <el-form-item label="申请部门"> + <el-select v-model="form.department" placeholder="请选择部门"> + <el-option label="机修班" value="机修班" /> + <el-option label="火工班" value="火工班" /> + </el-select> + </el-form-item> + </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-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="作业等级"> + <el-select v-model="form.level" placeholder="请选择"> + <el-option label="一" value="一" /> + <el-option label="二" value="二" /> + </el-select> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="危害辨识"> + <el-select v-model="form.riskIdentify" placeholder="请选择"> + <el-option label="辨识一" value="辨识一" /> + <el-option label="辨识二" value="辨识二" /> + </el-select> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="动火方式"> + <el-select v-model="form.workWay" placeholder="请选择"> + <el-option label="方式一" value="方式一" /> + <el-option label="方式二" value="方式二" /> + </el-select> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-button type="primary" size="default">添加作业人</el-button> + </el-col> + </el-row> + </el-form> + </div> +</template> + +<script lang="ts"> + import { toRefs, reactive, defineComponent, ref } from 'vue'; + import { storeToRefs } from 'pinia'; + import { initBackEndControlRoutes } from '/@/router/backEnd'; + import {useUserInfo} from "/@/stores/userInfo"; + import { Session } from '/@/utils/storage'; + let global: any = { + homeChartOne: null, + homeChartTwo: null, + homeCharThree: null, + dispose: [null, '', undefined], + }; + + interface stateType { + homeOne: Array <type> + } + interface type { + + } + export default defineComponent({ + name: 'workApply', + setup() { + const userInfo = useUserInfo() + const { userInfos } = storeToRefs(userInfo); + const state = reactive<stateType>({ + homeOne:[{id:1,name:'基础数据权限管理系统'},{id:2,name:'双重预防系统'},{id:3,name:'系统2'},{id:4,name:'系统3'},{id:5,name:'系统4'}], + }); + const form = reactive({ + department: '', + applyName: '', + level: '', + riskIdentify: '', + workWay: '' + }) + + const onSubmit = () => { + console.log('submit!') + } + // 折线图 + const renderMenu = async (value: string) => { + Session.set('projectId',value) + userInfos.value.projectId = value + await initBackEndControlRoutes(); + }; + return { + renderMenu, + form, + onSubmit, + ...toRefs(state), + }; + }, + }); +</script> + +<style scoped lang="scss"> + $homeNavLengh: 8; + .home-container { + overflow: hidden; + padding: 40px; + .el-row{ + margin-bottom: 20px; + } + .el-row:last-child { + margin-bottom: 0; + } + .el-col{ + display: flex; + align-items: center; + margin-bottom: 10px; + } + } +</style> diff --git a/src/views/specialWorkSystem/workPlan/departAppointStatistics/index.vue b/src/views/specialWorkSystem/workPlan/departAppointStatistics/index.vue deleted file mode 100644 index 8afa077..0000000 --- a/src/views/specialWorkSystem/workPlan/departAppointStatistics/index.vue +++ /dev/null @@ -1,182 +0,0 @@ -<template> - <div class="home-container"> - <el-row :gutter="15" class="home-card-one mb15"> - <el-col - :xs="24" - :sm="12" - :md="12" - :lg="4" - :xl="4" - v-for="(v, k) in homeOne" - :key="k" - :class="{ 'home-media home-media-lg': k > 1, 'home-media-sm': k === 1 }" - > - <div class="home-card-item flex" > - <el-button @click="renderMenu(v.id)">{{v.name}}</el-button> - </div> - </el-col> - </el-row> - <el-row :gutter="15" class="home-card-two mb15"> - <el-col :xs="24" :sm="14" :md="14" :lg="16" :xl="16"> - <div class="home-card-item"> - <div style="height: 100%"> - <el-button @click="renderMenu('6')">{{'应急管理系统'}}</el-button> - </div> - </div> - </el-col> - <el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="8" class="home-media"> - <div class="home-card-item"> - <div style="height: 100%"> - <el-button @click="renderMenu('7')">{{'目标责任管理系统'}}</el-button> - </div> - </div> - </el-col> - </el-row> - <el-row :gutter="15" class="home-card-three"> - <el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="8"> - <div class="home-card-item"> - <el-button @click="renderMenu('8')">{{'事故管理系统'}}</el-button> - </div> - </el-col> - <el-col :xs="24" :sm="14" :md="14" :lg="16" :xl="16" class="home-media"> - <div class="home-card-item"> - <div style="height: 100%"> - <el-button @click="renderMenu('9')">{{'设备综合管控系统'}}</el-button> - </div> - </div> - </el-col> - </el-row> - </div> -</template> - -<script lang="ts"> - import { toRefs, reactive, defineComponent, } from 'vue'; - import { storeToRefs } from 'pinia'; - import { initBackEndControlRoutes } from '/@/router/backEnd'; - import {useUserInfo} from "/@/stores/userInfo"; - import { Session } from '/@/utils/storage'; - let global: any = { - homeChartOne: null, - homeChartTwo: null, - homeCharThree: null, - dispose: [null, '', undefined], - }; - - interface stateType { - homeOne: Array <type> - } - interface type { - id:number, - name: string - } - export default defineComponent({ - name: 'home', - setup() { - const userInfo = useUserInfo() - const { userInfos } = storeToRefs(userInfo); - const state = reactive<stateType>({ - homeOne:[{id:1,name:'基础数据权限管理系统'},{id:2,name:'双重预防系统'},{id:3,name:'系统2'},{id:4,name:'系统3'},{id:5,name:'系统4'}], - }); - // 折线图 - const renderMenu = async (value: string) => { - Session.set('projectId',value) - userInfos.value.projectId = value - await initBackEndControlRoutes(); - }; - return { - renderMenu, - ...toRefs(state), - }; - }, - }); -</script> - -<style scoped lang="scss"> - $homeNavLengh: 8; - .home-container { - overflow: hidden; - .home-card-one, - .home-card-two, - .home-card-three { - .home-card-item { - width: 100%; - height: 130px; - border-radius: 4px; - transition: all ease 0.3s; - padding: 20px; - overflow: hidden; - background: var(--el-color-white); - color: var(--el-text-color-primary); - border: 1px solid var(--next-border-color-light); - &:hover { - box-shadow: 0 2px 12px var(--next-color-dark-hover); - transition: all ease 0.3s; - } - &-icon { - width: 70px; - height: 70px; - border-radius: 100%; - flex-shrink: 1; - i { - color: var(--el-text-color-placeholder); - } - } - &-title { - font-size: 15px; - font-weight: bold; - height: 30px; - } - } - } - .home-card-one { - @for $i from 0 through 3 { - .home-one-animation#{$i} { - opacity: 0; - animation-name: error-num; - animation-duration: 0.5s; - animation-fill-mode: forwards; - animation-delay: calc($i/10) + s; - } - } - } - .home-card-two, - .home-card-three { - .home-card-item { - height: 400px; - width: 100%; - overflow: hidden; - .home-monitor { - height: 100%; - .flex-warp-item { - width: 25%; - height: 111px; - display: flex; - .flex-warp-item-box { - margin: auto; - text-align: center; - color: var(--el-text-color-primary); - display: flex; - border-radius: 5px; - background: var(--next-bg-color); - cursor: pointer; - transition: all 0.3s ease; - &:hover { - background: var(--el-color-primary-light-9); - transition: all 0.3s ease; - } - } - @for $i from 0 through $homeNavLengh { - .home-animation#{$i} { - opacity: 0; - animation-name: error-num; - animation-duration: 0.5s; - animation-fill-mode: forwards; - animation-delay: calc($i/10) + s; - } - } - } - } - } - } - } -</style> diff --git a/src/views/specialWorkSystem/workPlan/workAppointSummary/index.vue b/src/views/specialWorkSystem/workPlan/workAppointSummary/index.vue index 29eeb55..f8b7127 100644 --- a/src/views/specialWorkSystem/workPlan/workAppointSummary/index.vue +++ b/src/views/specialWorkSystem/workPlan/workAppointSummary/index.vue @@ -29,11 +29,10 @@ </div> </div> </el-col> - <el-col :span="6"></el-col> - <el-col :span="6"> + <el-col :span="12" class="topBtns"> <div class="grid-content topInfo"> - <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 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> </el-col> </el-row> @@ -50,14 +49,14 @@ <el-table-column prop="high" label="高处" /> <el-table-column prop="block" label="盲板抽堵" width="180" /> <el-table-column prop="tempUse" label="临时用电" width="180" /> - <el-table-column fixed label="操作"> + <el-table-column fixed="right" label="操作"> <template #default> <el-button link type="primary" size="small">操作</el-button> </template> </el-table-column> </el-table> </el-row> - <el-dialog v-model="dialogChartsVisible" title="Shipping address"> + <el-dialog v-model="dialogChartsVisible" title="统计图表"> <el-row> <div class="grid-content"> <div>日期查询:</div> @@ -88,13 +87,13 @@ </div> </div> </el-row> - <div id="main" style="width: 600px;height:400px;"></div> + <div ref="myChart" style="width: 100%;height:400px;"></div> </el-dialog> </div> </template> <script lang="ts"> - import { toRefs, reactive, defineComponent, ref } from 'vue'; + import { toRefs, reactive, defineComponent, ref, onMounted } from 'vue'; import { storeToRefs } from 'pinia'; import { initBackEndControlRoutes } from '/@/router/backEnd'; import {useUserInfo} from "/@/stores/userInfo"; @@ -103,6 +102,13 @@ import { TooltipComponent, TooltipComponentOption, GridComponent, GridComponentOption, LegendComponent, LegendComponentOption } from 'echarts/components'; import { BarChart, BarSeriesOption } from 'echarts/charts'; import { CanvasRenderer } from 'echarts/renderers'; + echarts.use([ + TooltipComponent, + GridComponent, + LegendComponent, + BarChart, + CanvasRenderer + ]); let global: any = { homeChartOne: null, homeChartTwo: null, @@ -286,112 +292,111 @@ const state = reactive<stateType>({ homeOne:[{id:1,name:'基础数据权限管理系统'},{id:2,name:'双重预防系统'},{id:3,name:'系统2'},{id:4,name:'系统3'},{id:5,name:'系统4'}], }); + const myChart = ref<HTMLElement>() + const myCharts = ref<any>() + setTimeout(()=>{ + type EChartsOption = echarts.ComposeOption< + | TooltipComponentOption + | GridComponentOption + | LegendComponentOption + | BarSeriesOption + >; + myCharts.value = echarts.init(myChart.value!); + const option: EChartsOption = { + tooltip: { + trigger: 'axis', + axisPointer: { + // Use axis to trigger tooltip + type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow' + } + }, + legend: {}, + grid: { + left: '3%', + right: '3%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'value' + }, + yAxis: { + type: 'category', + data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + }, + series: [ + { + name: 'Direct', + type: 'bar', + stack: 'total', + label: { + show: true + }, + emphasis: { + focus: 'series' + }, + data: [320, 302, 301, 334, 390, 330, 320] + }, + { + name: 'Mail Ad', + type: 'bar', + stack: 'total', + label: { + show: true + }, + emphasis: { + focus: 'series' + }, + data: [120, 132, 101, 134, 90, 230, 210] + }, + { + name: 'Affiliate Ad', + type: 'bar', + stack: 'total', + label: { + show: true + }, + emphasis: { + focus: 'series' + }, + data: [220, 182, 191, 234, 290, 330, 310] + }, + { + name: 'Video Ad', + type: 'bar', + stack: 'total', + label: { + show: true + }, + emphasis: { + focus: 'series' + }, + data: [150, 212, 201, 154, 190, 330, 410] + }, + { + name: 'Search Engine', + type: 'bar', + stack: 'total', + label: { + show: true + }, + emphasis: { + focus: 'series' + }, + data: [820, 832, 901, 934, 1290, 1330, 1320] + } + ] + }; + option && myCharts.value.setOption(option); + },2000) // 分布图 - echarts.use([ - TooltipComponent, - GridComponent, - LegendComponent, - BarChart, - CanvasRenderer - ]); + // onMounted(()=>{ + // setTimeout(() => { + // drawChart() + // },1000) + // }); - type EChartsOption = echarts.ComposeOption< - | TooltipComponentOption - | GridComponentOption - | LegendComponentOption - | BarSeriesOption - >; - - const chartDom = document.getElementById('main')!; - const myChart = echarts.init(chartDom); - const option: EChartsOption = { - tooltip: { - trigger: 'axis', - axisPointer: { - // Use axis to trigger tooltip - type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow' - } - }, - legend: {}, - grid: { - left: '3%', - right: '4%', - bottom: '3%', - containLabel: true - }, - xAxis: { - type: 'value' - }, - yAxis: { - type: 'category', - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] - }, - series: [ - { - name: 'Direct', - type: 'bar', - stack: 'total', - label: { - show: true - }, - emphasis: { - focus: 'series' - }, - data: [320, 302, 301, 334, 390, 330, 320] - }, - { - name: 'Mail Ad', - type: 'bar', - stack: 'total', - label: { - show: true - }, - emphasis: { - focus: 'series' - }, - data: [120, 132, 101, 134, 90, 230, 210] - }, - { - name: 'Affiliate Ad', - type: 'bar', - stack: 'total', - label: { - show: true - }, - emphasis: { - focus: 'series' - }, - data: [220, 182, 191, 234, 290, 330, 310] - }, - { - name: 'Video Ad', - type: 'bar', - stack: 'total', - label: { - show: true - }, - emphasis: { - focus: 'series' - }, - data: [150, 212, 201, 154, 190, 330, 410] - }, - { - name: 'Search Engine', - type: 'bar', - stack: 'total', - label: { - show: true - }, - emphasis: { - focus: 'series' - }, - data: [820, 832, 901, 934, 1290, 1330, 1320] - } - ] - }; - - option && myChart.setOption(option); // 折线图 const renderMenu = async (value: string) => { @@ -411,6 +416,7 @@ departmentName, departmentOptions, props, + myChart, handleChange, ...toRefs(state), }; @@ -423,12 +429,21 @@ .home-container { overflow: hidden; padding: 20px 40px; + .el-row{ + margin-bottom: 20px; + } + .el-row:last-child { + margin-bottom: 0; + } .el-col{ display: flex; align-items: center; + margin: 40px 0; } .grid-content{ + display: flex; align-items: center; + min-height: 36px; } .topInfo{ @@ -450,6 +465,10 @@ flex: 1; } } + .topBtns{ + display: flex; + justify-content: right; + } .el-button--text { margin-right: 15px; } diff --git a/src/views/specialWorkSystem/workPlan/workReservation/index.vue b/src/views/specialWorkSystem/workPlan/workReservation/index.vue index 71d014f..52d567c 100644 --- a/src/views/specialWorkSystem/workPlan/workReservation/index.vue +++ b/src/views/specialWorkSystem/workPlan/workReservation/index.vue @@ -35,7 +35,7 @@ </div> </div> </el-col> - <el-col :span="6"> + <el-col :span="6" class="topBtns"> <div class="grid-content topInfo"> <div style="margin-right: 20px"><el-button type="primary" plain>查询历史</el-button></div> <div><el-button type="success" @click="dialogFormVisible = true">新增预约</el-button></div> @@ -44,25 +44,25 @@ </el-row> <el-row> <el-table :data="tableData" border style="width: 100%"> - <el-table-column prop="id" label="编号" width="180" /> - <el-table-column prop="time" label="预约时间" width="180" /> - <el-table-column prop="department" label="预约部门" /> - <el-table-column prop="dirtyWork" label="动土作业" width="180" /> - <el-table-column prop="fireWork" label="动火作业" width="180" /> - <el-table-column prop="hangWork" label="吊装作业" /> - <el-table-column prop="spaceWork" label="受限空间作业" width="180" /> - <el-table-column prop="cut" label="断路" width="180" /> + <el-table-column prop="id" label="编号" width="120" /> + <el-table-column prop="time" label="预约时间" width="150" /> + <el-table-column prop="department" label="预约部门" width="180" /> + <el-table-column prop="dirtyWork" label="动土作业" width="100" /> + <el-table-column prop="fireWork" label="动火作业" width="100" /> + <el-table-column prop="hangWork" label="吊装作业" width="100" /> + <el-table-column prop="spaceWork" label="受限空间作业"/> + <el-table-column prop="cut" label="断路"/> <el-table-column prop="high" label="高处" /> - <el-table-column prop="block" label="盲板抽堵" width="180" /> - <el-table-column prop="tempUse" label="临时用电" width="180" /> - <el-table-column fixed label="操作"> + <el-table-column prop="block" label="盲板抽堵"/> + <el-table-column prop="tempUse" label="临时用电"/> + <el-table-column fixed="right" label="操作"> <template #default> <el-button link type="primary" size="small">操作</el-button> </template> </el-table-column> </el-table> </el-row> - <el-dialog v-model="dialogFormVisible" title="Shipping address"> + <el-dialog v-model="dialogFormVisible" title="新增预约"> <el-form :model="reservationForm"> <el-form-item label="我的当前部门" :label-width="formLabelWidth"> <el-input v-model="reservationForm.department" placeholder="" /> @@ -87,8 +87,8 @@ </el-form> <template #footer> <span class="dialog-footer"> - <el-button @click="dialogFormVisible = false">取消</el-button> - <el-button type="primary" @click="dialogFormVisible = false">确认</el-button> + <el-button @click="dialogFormVisible = false" size="default">取消</el-button> + <el-button type="primary" @click="dialogFormVisible = false" size="default">确认</el-button> </span> </template> </el-dialog> @@ -205,7 +205,6 @@ renderMenu, searchTime, typeValue, - defaultTime, reserveOptions, tableData, dialogFormVisible, @@ -222,12 +221,20 @@ .home-container { overflow: hidden; padding: 20px 40px; + .el-row{ + margin-bottom: 20px; + } + .el-row:last-child { + margin-bottom: 0; + } .el-col{ display: flex; align-items: center; + margin: 40px 0 20px; } .grid-content{ align-items: center; + min-height: 36px; } .topInfo{ @@ -249,6 +256,10 @@ flex: 1; } } + .topBtns{ + display: flex; + justify-content: right; + } .el-button--text { margin-right: 15px; } -- Gitblit v1.9.2