Commit cfd9119e authored by dlkong's avatar dlkong

项目配置人员角色;风险巡查添加岗位

parent 6d5fceb9
import request from '@/utils/request'
// 查询风险计划列表
export function listCurrentProject(query) {
return request({
url: '/risk/currentProject/list',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询现状风险岗位列表
export function listCurrentRiskPost(query) {
return request({
url: '/system/currentRiskPost/list',
method: 'get',
params: query
})
}
// 人员列表
export function userCurrentRiskPost(query) {
return request({
url: '/risk/currentProject/list',
method: 'get',
params: query
})
}
// 查询现状风险岗位详细
export function getCurrentRiskPost(id) {
return request({
url: '/system/currentRiskPost/' + id,
method: 'get'
})
}
// 新增现状风险岗位
export function addCurrentRiskPost(data) {
return request({
url: '/system/currentRiskPost',
method: 'post',
data: data
})
}
// 修改现状风险岗位
export function updateCurrentRiskPost(data) {
return request({
url: '/system/currentRiskPost',
method: 'put',
data: data
})
}
// 删除现状风险岗位
export function delCurrentRiskPost(id) {
return request({
url: '/system/currentRiskPost/' + id,
method: 'delete'
})
}
// 保存岗位
export function saveCurrentPost(data) {
return request({
url: '/system/currentRiskPost/save',
method: 'post',
data: data
})
}
...@@ -46,7 +46,7 @@ export function delPost(postId) { ...@@ -46,7 +46,7 @@ export function delPost(postId) {
// 用户配置岗位保存 // 用户配置岗位保存
export function saveUserPost(data) { export function saveUserPost(data) {
return request({ return request({
url: '/system/currentProject/save', url: '/risk/currentProject/save',
method: 'post', method: 'post',
data: data data: data
}) })
......
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1652765476275" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4184" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M928.16 144H736V64a32 32 0 0 0-32-32H320a32 32 0 0 0-32 32v80H95.84a32 32 0 0 0 0 64H129.6l77.92 698.656A96 96 0 0 0 302.912 992h418.144a96.032 96.032 0 0 0 95.424-85.344L894.4 208h33.728a32 32 0 0 0 0.032-64zM352 96h320v48H352V96z m400.896 803.552a32 32 0 0 1-31.808 28.448H302.912a32 32 0 0 1-31.808-28.448L193.984 208h636.032l-77.12 691.552z" p-id="4185" fill="#02a7f0"></path><path d="M608 820.928a32 32 0 0 0 32-32V319.104a32 32 0 0 0-64 0v469.824a32 32 0 0 0 32 32zM432 820.928a32 32 0 0 0 32-32V319.104a32 32 0 0 0-64 0v469.824a32 32 0 0 0 32 32z" p-id="4186" fill="#02a7f0"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1652765513402" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5003" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M775.84 392.768l-155.2-172.352L160.768 643.264l-38.368 187.936 190.56-12.832zM929.952 229.952l-131.2-150.944-0.288-0.32a16 16 0 0 0-22.592-0.96l-131.168 120.576 155.168 172.352 128.832-118.464a15.936 15.936 0 0 0 1.248-22.24zM96 896h832v64H96z" p-id="5004" fill="#02a7f0"></path></svg>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -251,6 +251,20 @@ export const dynamicRoutes = [ ...@@ -251,6 +251,20 @@ export const dynamicRoutes = [
}, },
], ],
}, },
{
path: "/risk/currentProject/projectPost",
component: Layout,
hidden: true,
permissions: ["system:dict:list"],
children: [
{
path: "index/:id(\\d+)",
component: () => import("@/views/risk/currentProject/projectPost"),
name: "projectPost",
meta: { title: "岗位详情", activeMenu: "/risk/currentProject/projectPost" },
},
],
},
]; ];
// 防止连续点击多次路由报错 // 防止连续点击多次路由报错
......
...@@ -8,6 +8,7 @@ const getters = { ...@@ -8,6 +8,7 @@ const getters = {
token: state => state.user.token, token: state => state.user.token,
avatar: state => state.user.avatar, avatar: state => state.user.avatar,
name: state => state.user.name, name: state => state.user.name,
userId: state => state.user.userId,
introduction: state => state.user.introduction, introduction: state => state.user.introduction,
roles: state => state.user.roles, roles: state => state.user.roles,
permissions: state => state.user.permissions, permissions: state => state.user.permissions,
......
...@@ -5,6 +5,7 @@ const user = { ...@@ -5,6 +5,7 @@ const user = {
state: { state: {
token: getToken(), token: getToken(),
name: '', name: '',
userId: '',
avatar: '', avatar: '',
roles: [], roles: [],
permissions: [] permissions: []
...@@ -17,6 +18,9 @@ const user = { ...@@ -17,6 +18,9 @@ const user = {
SET_NAME: (state, name) => { SET_NAME: (state, name) => {
state.name = name state.name = name
}, },
SET_USERID: (state, userId) => {
state.userId = userId
},
SET_AVATAR: (state, avatar) => { SET_AVATAR: (state, avatar) => {
state.avatar = avatar state.avatar = avatar
}, },
...@@ -60,6 +64,7 @@ const user = { ...@@ -60,6 +64,7 @@ const user = {
} }
commit('SET_NAME', user.userName) commit('SET_NAME', user.userName)
commit('SET_AVATAR', avatar) commit('SET_AVATAR', avatar)
commit('SET_USERID', user.userId)
resolve(res) resolve(res)
}).catch(error => { }).catch(error => {
reject(error) reject(error)
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="项目名称" prop="projectName">
<el-input
v-model="queryParams.projectName"
placeholder="请输入项目名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<div v-for="(item, index) in projectList" :key="index" class="projectItem" @click="projectDetail(item)">
<div class="left">
<p>{{item.projectName}}</p>
<p>项目类型:{{item.projectType}} | 项目地址:{{item.projectAddress}}</p>
</div>
<img src="../../../assets/images/work.svg" alt="">
</div>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script type="text/ecmascript-6">
import { listCurrentProject } from '@/api/risk/currentProject'
export default {
name: 'currentProject',
data() {
return {
// 遮罩层
loading: true,
projectList:[],
// 总条数
total: 0,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
projectName: null,
},
}
},
created(){
this.getList();
},
mounted() {
},
methods: {
/** 查询基础数据-项目列表 */
getList() {
this.loading = true;
this.queryParams.userId = this.$store.getters.userId
listCurrentProject(this.queryParams).then((response) => {
this.projectList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
projectDetail(val){
this.$router.push("/risk/currentProject/projectPost/index/" + val.projectId)
}
},
}
</script>
<style scoped lang='scss'>
.projectItem{
width: 100%;
padding: 25px 120px 25px 30px;
margin-bottom: 25px;
border: 2px solid #e6e9f0;
border-radius: 20px;
box-shadow: 3px 3px 7px #e6e9f0;
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
.left{
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
:first-child{
color: #3277f5 ;
font-size: 18px;
}
}
}
</style>
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment