From a5b7405539fcd89927273fa51f099fff6dd0777e Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 09 Jul 2021 09:23:51 +0800
Subject: [PATCH] 保安员管理及保安公司管理相关得部分更改
---
src/views/securityCompany/security.vue | 270 ++++++++++++++
src/views/wel/index.vue | 11
src/router/views/index.js | 6
src/config/iconList.js | 1
src/api/management/peopleDetails.js | 110 ----
src/views/management/register.vue | 279 ++++---------
src/api/management/user.js | 131 ++++++
src/config/env.js | 4
/dev/null | 22 -
src/api/securityCompany/security.js | 60 +++
src/views/management/peopleDetails.vue | 186 +++++++++
src/styles/management.scss | 8
src/views/management/documentsPrint.vue | 42 +
13 files changed, 799 insertions(+), 331 deletions(-)
diff --git a/src/api/management/peopleDetails.js b/src/api/management/peopleDetails.js
index fd10986..47201f1 100644
--- a/src/api/management/peopleDetails.js
+++ b/src/api/management/peopleDetails.js
@@ -12,7 +12,17 @@
export const dispatchList = (cardid) => {
return request({
- url: '/api/dispatcher/list',
+ url: '/api/dispatcher/page',
+ method: 'get',
+ params: {
+ cardid
+ }
+ })
+}
+
+export const honorchList = (cardid) => {
+ return request({
+ url: '/api/honor/list',
method: 'get',
params: {
cardid
@@ -21,111 +31,25 @@
}
-
-
-
-export const remove = (ids) => {
+export const trainList = (cardid) => {
return request({
- url: '/api/blade-user/remove',
+ url: '/api/train/selectTrainInfo',
method: 'post',
params: {
- ids,
+ cardid
}
})
}
-export const add = (row) => {
+export const examinationList = (cardid) => {
return request({
- url: '/api/blade-user/submit',
- method: 'post',
- data: row
- })
-}
-
-export const update = (row) => {
- return request({
- url: '/api/blade-user/update',
- method: 'post',
- data: row
- })
-}
-
-export const updatePlatform = (userId, userType, userExt) => {
- return request({
- url: '/api/blade-user/update-platform',
+ url: '/api/examination/selectExaminationInfo',
method: 'post',
params: {
- userId,
- userType,
- userExt,
+ cardid
}
})
}
-export const getUser = (id) => {
- return request({
- url: '/api/blade-user/detail',
- method: 'get',
- params: {
- id,
- }
- })
-}
-export const getUserPlatform = (id) => {
- return request({
- url: '/api/blade-user/platform-detail',
- method: 'get',
- params: {
- id,
- }
- })
-}
-export const getUserInfo = () => {
- return request({
- url: '/api/blade-user/info',
- method: 'get',
- })
-}
-
-export const resetPassword = (userIds) => {
- return request({
- url: '/api/blade-user/reset-password',
- method: 'post',
- params: {
- userIds,
- }
- })
-}
-
-export const updatePassword = (oldPassword, newPassword, newPassword1) => {
- return request({
- url: '/api/blade-user/update-password',
- method: 'post',
- params: {
- oldPassword,
- newPassword,
- newPassword1,
- }
- })
-}
-
-export const updateInfo = (row) => {
- return request({
- url: '/api/blade-user/update-info',
- method: 'post',
- data: row
- })
-}
-
-export const grant = (userIds, roleIds) => {
- return request({
- url: '/api/blade-user/grant',
- method: 'post',
- params: {
- userIds,
- roleIds,
- }
- })
-}
diff --git a/src/api/management/user.js b/src/api/management/user.js
new file mode 100644
index 0000000..dc87146
--- /dev/null
+++ b/src/api/management/user.js
@@ -0,0 +1,131 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params, deptId) => {
+ return request({
+ url: '/api/blade-user/page',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ deptId,
+ }
+ })
+}
+
+export const remove = (ids) => {
+ return request({
+ url: '/api/blade-user/remove',
+ method: 'post',
+ params: {
+ ids,
+ }
+ })
+}
+
+export const add = (row) => {
+ return request({
+ url: '/api/blade-user/submit',
+ method: 'post',
+ data: row
+ })
+}
+
+export const update = (row) => {
+ return request({
+ url: '/api/blade-user/update',
+ method: 'post',
+ data: row
+ })
+}
+
+export const updatePlatform = (userId, userType, userExt) => {
+ return request({
+ url: '/api/blade-user/update-platform',
+ method: 'post',
+ params: {
+ userId,
+ userType,
+ userExt,
+ }
+ })
+}
+
+export const getUser = (id) => {
+ return request({
+ url: '/api/blade-user/detail',
+ method: 'get',
+ params: {
+ id,
+ }
+ })
+}
+
+export const getUserPlatform = (id) => {
+ return request({
+ url: '/api/blade-user/platform-detail',
+ method: 'get',
+ params: {
+ id,
+ }
+ })
+}
+
+export const getUserInfo = () => {
+ return request({
+ url: '/api/blade-user/info',
+ method: 'get',
+ })
+}
+
+export const resetPassword = (userIds) => {
+ return request({
+ url: '/api/blade-user/reset-password',
+ method: 'post',
+ params: {
+ userIds,
+ }
+ })
+}
+
+export const updatePassword = (oldPassword, newPassword, newPassword1) => {
+ return request({
+ url: '/api/blade-user/update-password',
+ method: 'post',
+ params: {
+ oldPassword,
+ newPassword,
+ newPassword1,
+ }
+ })
+}
+
+export const updateInfo = (row) => {
+ return request({
+ url: '/api/blade-user/update-info',
+ method: 'post',
+ data: row
+ })
+}
+
+export const grant = (userIds, roleIds) => {
+ return request({
+ url: '/api/blade-user/grant',
+ method: 'post',
+ params: {
+ userIds,
+ roleIds,
+ }
+ })
+}
+
+export const updateHold = (hold, cardid) => {
+ return request({
+ url: '/api/blade-user/updateUser',
+ method: 'get',
+ params: {
+ hold,
+ cardid
+ }
+ })
+}
diff --git a/src/api/securityCompany/security.js b/src/api/securityCompany/security.js
new file mode 100644
index 0000000..b49af67
--- /dev/null
+++ b/src/api/securityCompany/security.js
@@ -0,0 +1,60 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+ return request({
+ url: '/api/information/page',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
+export const getPostList = (tenantId) => {
+ return request({
+ url: '/api/blade-system/post/select',
+ method: 'get',
+ params: {
+ tenantId
+ }
+ })
+}
+
+export const getDetail = (id) => {
+ return request({
+ url: '/api/blade-system/post/detail',
+ method: 'get',
+ params: {
+ id
+ }
+ })
+}
+
+export const remove = (ids) => {
+ return request({
+ url: '/api/blade-system/post/remove',
+ method: 'post',
+ params: {
+ ids,
+ }
+ })
+}
+
+export const add = (row) => {
+ return request({
+ url: '/api/blade-system/post/submit',
+ method: 'post',
+ data: row
+ })
+}
+
+export const update = (row) => {
+ return request({
+ url: '/api/blade-system/post/submit',
+ method: 'post',
+ data: row
+ })
+}
+
diff --git a/src/config/env.js b/src/config/env.js
index 1cb6358..b798803 100644
--- a/src/config/env.js
+++ b/src/config/env.js
@@ -1,5 +1,7 @@
// 阿里矢量图标库配置
-let iconfontVersion = ['567566_pwc3oottzol', '2057093_bptm5k964zj', '2652129_uxkdfwyc26'];
+let iconfontVersion = ['567566_pwc3oottzol', '2057093_bptm5k964zj',
+'2652129_wxg14mpb2ie' // yjy - icon
+];
let iconfontUrl = `//at.alicdn.com/t/font_$key.css`;
let baseUrl = '';
diff --git a/src/config/iconList.js b/src/config/iconList.js
index 7b03631..cffc0f2 100644
--- a/src/config/iconList.js
+++ b/src/config/iconList.js
@@ -68,6 +68,7 @@
"iconfont icon-baoan",
"iconfont icon-baoanguanlipad",
"iconfont icon-icon-biaoxianfen",
+ "iconfont icon-zhengjian",
]
},
diff --git a/src/router/views/index.js b/src/router/views/index.js
index 0f3c0f8..fff002f 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -105,13 +105,13 @@
}]
}, {
path: '/management',
- redirect: '/management/peopleDetails',
+ redirect: '/management/index',
component: Layout,
children: [{
- path: 'peopleDetails',
+ path: 'index',
name: '保安详细资料',
meta: {
- i18n: 'peopleDetails',
+ i18n: 'index',
},
component: () =>
import( /* webpackChunkName: "views" */ '@/views/management/peopleDetails')
diff --git a/src/styles/management.scss b/src/styles/management.scss
index e22ef95..50c7749 100644
--- a/src/styles/management.scss
+++ b/src/styles/management.scss
@@ -1,6 +1,6 @@
// 保安人员管理相关样式
#avue-view {
- & > .el-row {
+ & > .morpheus-box {
position: absolute;
top: 40px;
left: 0px;
@@ -37,3 +37,9 @@
}
}
}
+
+.zhengJian-icon {
+ i.icon-zhengjian {
+ font-size: 12px !important;
+ }
+}
diff --git a/src/views/management/credentials.vue b/src/views/management/credentials.vue
deleted file mode 100644
index c046b48..0000000
--- a/src/views/management/credentials.vue
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * @Author: Morpheus
- * @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-07 11:31:50
- * menu-name 保安员证件吊销
- */
-
-<template>
- <el-row>
- <el-col :span="24">
- <el-card>
- <div class="card-body">
-
- </div>
- </el-card>
- </el-col>
- </el-row>
-</template>
-
-<script>
-
-export default {
- data () {
- return {
-
- }
- },
- created () {
-
-
-
- },
- mounted () {
-
- },
- methods: {
-
- }
-}
-</script>
-
-<style lang="scss" scoped>
-
-</style>
diff --git a/src/views/management/cultivate.vue b/src/views/management/cultivate.vue
deleted file mode 100644
index 272ecb1..0000000
--- a/src/views/management/cultivate.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * @Author: Morpheus
- * @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-05 16:44:18
- * menu-name 报名培训查询
- */
-<template>
- <div>
- 报名培训查询
- </div>
-</template>
-
-<script>
-export default {
-
-}
-</script>
-
-<style>
-
-</style>
diff --git a/src/views/management/dispatch.vue b/src/views/management/dispatch.vue
deleted file mode 100644
index f500856..0000000
--- a/src/views/management/dispatch.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * @Author: Morpheus
- * @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-05 16:40:11
- * menu-name 保安员派遣记录
- */
-<template>
- <div>
- 保安员派遣记录
- </div>
-</template>
-
-<script>
-export default {
-
-}
-</script>
-
-<style>
-
-</style>
diff --git a/src/views/management/documentsPrint.vue b/src/views/management/documentsPrint.vue
index da5a33b..b841028 100644
--- a/src/views/management/documentsPrint.vue
+++ b/src/views/management/documentsPrint.vue
@@ -2,21 +2,49 @@
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-05 16:40:11
+ * @Last Modified time: 2021-07-08 17:20:37
* menu-name 保安员证打印
*/
<template>
- <div>
- 保安员证打印
- </div>
+ <el-row class="morpheus-box">
+ <el-col :span="24">
+ <el-card>
+ <el-button type="primary"
+ @click="handlePrint1">打印局部</el-button>
+
+ <div id="test" style="position: fixed;top: 0;left: 0; right: 0;bottom: 0;margin: 0;display: none;">
+ <h2 style="color:red">12312</h2>
+ </div>
+ </el-card>
+ </el-col>
+ </el-row>
</template>
<script>
-export default {
+
+
+export default {
+ data () {
+ return {
+
+ }
+ },
+ created () {
+
+
+ },
+ mounted () {
+
+
+ },
+ methods: {
+ handlePrint1 () {
+ this.$Print('#test');
+ },
+ }
}
</script>
-<style>
-
+<style lang="scss" scoped>
</style>
diff --git a/src/views/management/peopleDetails.vue b/src/views/management/peopleDetails.vue
index a10f2c9..a0fc4d1 100644
--- a/src/views/management/peopleDetails.vue
+++ b/src/views/management/peopleDetails.vue
@@ -2,11 +2,11 @@
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-07 11:31:26
+ * @Last Modified time: 2021-07-08 11:04:25
* menu-name 保安详细资料
*/
<template>
- <el-row>
+ <el-row class="morpheus-box">
<el-col :span="24">
<el-card>
<div class="card-body">
@@ -222,8 +222,113 @@
</el-table>
</el-tab-pane>
- <el-tab-pane label="相关荣誉"
- name="fourth">相关荣誉</el-tab-pane>
+ <el-tab-pane label="获取荣誉"
+ name="fourth">
+ <el-table :data="honorchData"
+ style="width: 100%">
+
+ <el-table-column prop="name"
+ label="姓名"
+ align="center">
+ </el-table-column>
+
+ <el-table-column prop="cardid"
+ label="身份证号"
+ align="center">
+ </el-table-column>
+
+ <el-table-column prop="honor"
+ align="center"
+ label="荣誉">
+ </el-table-column>
+
+ <el-table-column prop="honortime"
+ align="center"
+ label="获取时间">
+ </el-table-column>
+
+ </el-table>
+ </el-tab-pane>
+ <el-tab-pane label="培训相关"
+ name="fifth">
+ <el-table :data="trainData"
+ style="width: 100%">
+
+ <el-table-column prop="rname"
+ label="姓名"
+ align="center">
+ </el-table-column>
+
+ <el-table-column prop="sex"
+ label="性别"
+ align="center">
+ </el-table-column>
+
+ <el-table-column prop="cardid"
+ label="身份证号"
+ align="center">
+ </el-table-column>
+
+ <el-table-column prop="train"
+ align="center"
+ label="培训单位">
+ </el-table-column>
+
+ <el-table-column prop="traincontent"
+ align="center"
+ label="培训内容">
+ </el-table-column>
+
+ <el-table-column prop="traintime"
+ align="center"
+ label="培训时间">
+ </el-table-column>
+
+ <el-table-column prop="trainaddrss"
+ align="center"
+ label="培训地址">
+ </el-table-column>
+
+ </el-table>
+ </el-tab-pane>
+ <el-tab-pane label="成绩相关"
+ name="sixth">
+ <el-table :data="examinationData"
+ style="width: 100%">
+
+ <el-table-column prop="rname"
+ label="姓名"
+ align="center">
+ </el-table-column>
+
+ <el-table-column prop="examinationbegintime"
+ label="考试开始时间"
+ align="center">
+ </el-table-column>
+
+ <el-table-column prop="examinationendtime"
+ label="开始结束时间"
+ align="center">
+ </el-table-column>
+
+ <el-table-column prop="examinationtype"
+ align="center"
+ label="考试类别">
+ </el-table-column>
+
+ <el-table-column prop="examinationc"
+ align="center"
+ label="考试成绩">
+ </el-table-column>
+
+ <el-table-column prop="examinationaddress"
+ align="center"
+ label="考试地点">
+ </el-table-column>
+
+ </el-table>
+ </el-tab-pane>
+
</el-tabs>
</div>
@@ -235,7 +340,10 @@
<script>
import {
manifestationList,
- dispatchList
+ dispatchList,
+ honorchList,
+ trainList,
+ examinationList
} from "@/api/management/peopleDetails";
@@ -246,16 +354,27 @@
form: {},
manifestationData: [],
dispatchData: [],
+ honorchData: [],
+ trainData: [],
+ examinationData: [],
}
},
created () {
+ var flag = false, i = 0, ind = null
this.$store.state.tags.tagList.forEach((item, index) => {
if (item.label == "保安详细资料") {
- this.$store.state.tags.tagList.splice(index, 1)
- return;
+ if (flag == false) {
+ ind = index
+ flag = true
+ }
+ i++
}
})
+ if (i > 1) {
+ this.$store.state.tags.tagList.splice(ind, 1)
+
+ }
this.form = this.$route.query;
@@ -263,9 +382,7 @@
},
mounted () {
- console.log(this.$store.state.tags.tag.label)
- this.$store.state.tags.tag.label = '保安详细资料'
- console.log(this.$store.state.tags.tag.label)
+ // this.$store.state.tags.tag.label = '保安详细资料'
},
methods: {
@@ -275,12 +392,15 @@
} else if (tab.index == 2) {
this.getDispatchData()
} else if (tab.index == 3) {
- console.log(1)
+ this.getHonorchData()
+ } else if (tab.index == 4) {
+ this.getTrainData()
+ } else if (tab.index == 5) {
+ this.getExaminationData()
}
},
getManifestationData () {
- // manifestationList(this.form.cardid).then(res => {
- manifestationList('360882199604251516').then(res => {
+ manifestationList(this.form.cardid).then(res => {
this.manifestationData = res.data.data.records
this.manifestationData.forEach(item => {
item.name = this.form.realName
@@ -289,9 +409,46 @@
})
},
getDispatchData () {
- dispatchList('360882199604251516').then(res => {
+ dispatchList(this.form.cardid).then(res => {
this.dispatchData = res.data.data.records
+
+ })
+ },
+ getHonorchData () {
+ honorchList(this.form.cardid).then(res => {
+
+ this.honorchData = res.data.data.records
+
+ })
+ },
+ getTrainData () {
+ trainList(this.form.cardid).then(res => {
+
+ this.trainData = res.data.data
+
+ this.trainData.forEach(item => {
+ if (item.sex == 1) {
+ item.sex = '男'
+ } else {
+ item.sex = '女'
+ }
+ })
+
+ })
+ },
+ getExaminationData () {
+ examinationList(this.form.cardid).then(res => {
+
+ this.examinationData = res.data.data
+
+ this.examinationData.forEach(item => {
+ if (item.stat == 1) {
+ item.stat = '不通过'
+ } else {
+ item.stat = '通过'
+ }
+ })
})
}
@@ -300,5 +457,4 @@
</script>
<style lang="scss" scoped>
-
</style>
diff --git a/src/views/management/performance.vue b/src/views/management/performance.vue
deleted file mode 100644
index b660cd8..0000000
--- a/src/views/management/performance.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * @Author: Morpheus
- * @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-05 16:40:11
- * menu-name 成绩查询
- */
-<template>
- <div>
- 成绩查询
- </div>
-</template>
-
-<script>
-export default {
-
-}
-</script>
-
-<style>
-
-</style>
diff --git a/src/views/management/register.vue b/src/views/management/register.vue
index 725e616..f744ebe 100644
--- a/src/views/management/register.vue
+++ b/src/views/management/register.vue
@@ -2,7 +2,7 @@
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-06 19:10:17
+ * @Last Modified time: 2021-07-08 20:31:10
* menu-name 保安员注册查询
*/
<template>
@@ -38,7 +38,7 @@
@refresh-change="refreshChange"
@row-click="handleRowClick"
@on-load="onLoad">
- <template slot-scope="{row}"
+ <!-- <template slot-scope="{row}"
slot="tenantName">
<el-tag>{{row.tenantName}}</el-tag>
</template>
@@ -53,6 +53,14 @@
<template slot-scope="{row}"
slot="userTypeName">
<el-tag>{{row.userTypeName}}</el-tag>
+ </template> -->
+ <template slot-scope="{type,size,row}"
+ slot="menu">
+ <el-button icon="icon-zhengjian"
+ :size="size"
+ :type="type"
+ class="zhengJian-icon"
+ @click.stop="handleCredentials(row)">证件吊销</el-button>
</template>
</avue-crud>
<el-dialog title="用户数据导入"
@@ -70,35 +78,7 @@
</template>
</avue-form>
</el-dialog>
- <el-dialog title="用户平台配置"
- append-to-body
- :visible.sync="platformBox">
- <avue-crud :option="platformOption"
- :table-loading="platformLoading"
- :data="platformData"
- ref="platformCrud"
- v-model="platformForm"
- :before-open="platformBeforeOpen"
- :page.sync="platformPage"
- :permission="platformPermissionList"
- @row-update="platformRowUpdate"
- @search-change="platformSearchChange"
- @search-reset="platformSearchReset"
- @selection-change="platformSelectionChange"
- @current-change="platformCurrentChange"
- @size-change="platformSizeChange"
- @refresh-change="platformRefreshChange"
- @on-load="platformOnLoad">
- <template slot-scope="{row}"
- slot="tenantName">
- <el-tag>{{row.tenantName}}</el-tag>
- </template>
- <template slot-scope="{row}"
- slot="userTypeName">
- <el-tag>{{row.userTypeName}}</el-tag>
- </template>
- </avue-crud>
- </el-dialog>
+
</basic-container>
</el-col>
</el-row>
@@ -108,10 +88,9 @@
import {
getList,
getUser,
- getUserPlatform,
- updatePlatform,
add,
-} from "@/api/system/user";
+ updateHold,
+} from "@/api/management/user";
import { getDeptTree, getDeptLazyTree } from "@/api/system/dept";
import { getRoleTree } from "@/api/system/role";
import { getPostList } from "@/api/system/post";
@@ -141,22 +120,16 @@
form: {},
search: {},
excelBox: false,
- platformBox: false,
initFlag: true,
selectionList: [],
query: {},
loading: true,
- platformLoading: false,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
- platformPage: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
+
init: {
roleTree: [],
deptTree: [],
@@ -192,7 +165,7 @@
// 操作栏多余按钮去除
delBtn: false,
editBtn: false,
-
+ addBtn: false,
selection: false,
align: 'center',
@@ -201,13 +174,12 @@
tip: false,
searchShow: true,
searchMenuSpan: 4,
- border: false,
index: true,
viewBtn: true,
//dialogType: 'drawer',
dialogClickModal: false,
// 操作栏宽度
- menuWidth: 90,
+ menuWidth: 156,
column: [
{
@@ -216,7 +188,7 @@
search: true,
searchSpan: 5,
display: false,
- width: 80
+ width: 78
},
{
label: "性别",
@@ -234,21 +206,21 @@
}],
slot: true,
display: false,
- width: 50
+ width: 48
},
{
label: "身份证号",
prop: "cardid",
slot: true,
display: false,
- width: 140
+ width: 138
},
{
label: "联系方式",
prop: "phone",
slot: true,
display: false,
- width: 96
+ width: 92
},
{
label: "联系地址",
@@ -261,14 +233,14 @@
prop: "rtime",
slot: true,
display: false,
- width: 90
+ width: 82
},
{
label: "所属角色",
prop: "roleName",
slot: true,
display: false,
- width: 100
+ width: 78
},
{
label: "所属公司",
@@ -291,7 +263,27 @@
}],
slot: true,
display: false,
- width: 90
+ width: 78
+ },
+ {
+ label: "是否持证",
+ prop: "hold",
+ type: "select",
+ search: true,
+ searchSpan: 4,
+ dicData: [{
+ label: '是',
+ value: '0'
+ }, {
+ label: '否',
+ value: '1',
+ }, {
+ label: '已吊销',
+ value: '2',
+ }],
+ slot: true,
+ display: false,
+ width: 78
},
],
group: [
@@ -505,75 +497,7 @@
data: [],
platformQuery: {},
platformSelectionList: [],
- platformData: [],
- platformForm: {},
- platformOption: {
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- selection: true,
- viewBtn: true,
- dialogClickModal: false,
- menuWidth: 120,
- editBtnText: '配置',
- column: [
- {
- label: "登录账号",
- prop: "account",
- search: true,
- display: false
- },
- {
- label: "所属租户",
- prop: "tenantName",
- slot: true,
- display: false
- },
- {
- label: "用户姓名",
- prop: "realName",
- search: true,
- display: false
- },
- {
- label: "用户平台",
- prop: "userTypeName",
- slot: true,
- display: false
- },
- {
- label: "用户平台",
- type: "select",
- dicUrl: "/api/blade-system/dict/dictionary?code=user_type",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- search: true,
- hide: true,
- display: false,
- prop: "userType",
- rules: [{
- required: true,
- message: "请选择用户平台",
- trigger: "blur"
- }]
- },
- {
- label: "用户拓展",
- prop: "userExt",
- type: "textarea",
- minRows: 8,
- span: 24,
- overHidden: true,
- row: true,
- hide: true,
- },
- ],
- },
+
excelForm: {},
excelOption: {
submitBtn: false,
@@ -651,14 +575,7 @@
editBtn: this.vaildData(this.permission.user_edit, false)
};
},
- platformPermissionList () {
- return {
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- editBtn: this.vaildData(this.permission.user_edit, false)
- };
- },
+
ids () {
let ids = [];
this.selectionList.forEach(ele => {
@@ -776,77 +693,69 @@
this.selectionClear();
});
},
- platformRowUpdate (row, index, done, loading) {
- updatePlatform(row.id, row.userType, row.userExt).then(() => {
- this.platformOnLoad(this.platformPage);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- done();
- }, error => {
- window.console.log(error);
- loading();
- });
- },
- platformBeforeOpen (done, type) {
- if (["edit", "view"].includes(type)) {
- getUserPlatform(this.platformForm.id).then(res => {
- this.platformForm = res.data.data;
- });
- }
- done();
- },
- platformSearchReset () {
- this.platformQuery = {};
- this.platformOnLoad(this.platformPage);
- },
- platformSearchChange (params, done) {
- this.platformQuery = params;
- this.platformPage.currentPage = 1;
- this.platformOnLoad(this.platformPage, params);
- done();
- },
- platformSelectionChange (list) {
- this.platformSelectionList = list;
- },
+
+
+
platformSelectionClear () {
this.platformSelectionList = [];
this.$refs.platformCrud.toggleSelection();
},
- platformCurrentChange (currentPage) {
- this.platformPage.currentPage = currentPage;
- },
- platformSizeChange (pageSize) {
- this.platformPage.pageSize = pageSize;
- },
- platformRefreshChange () {
- this.platformOnLoad(this.platformPage, this.platformQuery);
- },
- platformOnLoad (page, params = {}) {
- this.platformLoading = true;
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
- const data = res.data.data;
- this.platformPage.total = data.total;
- this.platformData = data.records;
- this.platformLoading = false;
- this.selectionClear();
- });
- },
+
// 行单击
handleRowClick (row) {
-
+ // delete (row["name"]);
+ var obj = row
+ obj["name"] = "保安详细资料"
this.$router.push({
- path: `/management/peopleDetails`,
- query: row,
+ path: `/management/index`,
+ query: obj,
});
},
+ // 证件吊销事件
+ handleCredentials (row) {
+
+ if (row.hold == 1) {
+ this.$message({
+ type: 'info',
+ message: '证件未拥有!'
+ });
+ } else if (row.hold == 2) {
+ this.$message({
+ type: 'info',
+ message: '证件已吊销!'
+ });
+ } else {
+
+ this.$confirm('此操作将吊销该人员的证件, 是否继续?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+
+ updateHold(2, row.cardid).then(res => {
+ console.log(res)
+ this.$message({
+ type: 'success',
+ message: '删除成功!'
+ });
+ })
+
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '已取消删除'
+ });
+ });
+
+ }
+
+ }
}
};
</script>
-<style>
+<style lang='scss' scoped>
.box {
height: 800px;
}
diff --git a/src/views/securityCompany/security.vue b/src/views/securityCompany/security.vue
new file mode 100644
index 0000000..2fea612
--- /dev/null
+++ b/src/views/securityCompany/security.vue
@@ -0,0 +1,270 @@
+/*
+ * @Author: Morpheus
+ * @Date: 2021-07-07 17:30:05
+ * @Last Modified by: Morpheus
+ * @Last Modified time: 2021-07-08 09:20:26
+ * menu-name 保安服务公司查询
+ */
+<template>
+ <basic-container>
+ <avue-crud :option="option"
+ :table-loading="loading"
+ :data="data"
+ :page.sync="page"
+ :permission="permissionList"
+ :before-open="beforeOpen"
+ v-model="form"
+ ref="crud"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ @row-del="rowDel"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad">
+
+ </avue-crud>
+ </basic-container>
+</template>
+
+<script>
+import { getList, getDetail, add, update, remove } from "@/api/securityCompany/security";
+import { mapGetters } from "vuex";
+
+export default {
+ data () {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ selectionList: [],
+ option: {
+ // 操作栏多余按钮去除
+ delBtn: false,
+ editBtn: false,
+ addBtn: false,
+ selection: false,
+
+
+ align: 'center',
+ height: 'auto',
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ index: true,
+ viewBtn: true,
+ dialogClickModal: false,
+
+ column: [
+ {
+ label: "企业名称",
+ prop: "enterprisename",
+ search: true,
+ searchSpan: 4,
+ display: false,
+ },
+ {
+ label: "法定代表人",
+ prop: "representative",
+ display: false,
+ width: 120
+ },
+ {
+ label: "成立日期",
+ prop: "establishtime",
+ type: "date",
+ format: 'yyyy-MM-dd',
+ valueFormat: 'yyyy-MM-dd',
+ mock: {
+ type: 'datetime',
+ format: 'yyyy-MM-dd'
+ },
+ search: true,
+ searchSpan: 4,
+ display: false,
+ width: 180
+ },
+ {
+ label: "注册资金",
+ prop: "registeredcapital",
+ display: false,
+ width: 160
+ },
+ {
+ label: "实缴资金",
+ prop: "capital",
+ display: false,
+ width: 160
+ },
+ {
+ label: "企业类型",
+ prop: "enterprises",
+ display: false,
+ },
+ {
+ label: "注册地址",
+ prop: "address",
+ search: true,
+ searchSpan: 5,
+ display: false,
+ width: 80
+ }
+ ]
+ ,
+ group: [
+ {
+ label: '详细信息',
+ prop: 'baseInfo',
+ icon: 'el-icon-user-solid',
+ column: [
+ {
+ label: "企业名称",
+ prop: "enterprisename",
+ display: false,
+ },
+
+ ]
+ },
+ {
+ label: '详细信息',
+ prop: 'detailInfo',
+ icon: 'el-icon-s-order',
+ column: [
+
+ ]
+ },
+ {
+ label: '职责信息',
+ prop: 'dutyInfo',
+ icon: 'el-icon-s-custom',
+ column: [
+
+
+ ]
+ },
+ ]
+ },
+ data: []
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList () {
+ return {
+ addBtn: this.vaildData(this.permission.post_add, false),
+ viewBtn: this.vaildData(this.permission.post_view, false),
+ delBtn: this.vaildData(this.permission.post_delete, false),
+ editBtn: this.vaildData(this.permission.post_edit, false)
+ };
+ },
+ ids () {
+ let ids = [];
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ }
+ },
+ methods: {
+ rowSave (row, done, loading) {
+ add(row).then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ done();
+ }, error => {
+ window.console.log(error);
+ loading();
+ });
+ },
+ rowUpdate (row, index, done, loading) {
+ update(row).then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ done();
+ }, error => {
+ window.console.log(error);
+ loading();
+ });
+ },
+ rowDel (row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ });
+ },
+ beforeOpen (done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetail(this.form.id).then(res => {
+ this.form = res.data.data;
+ });
+ }
+ done();
+ },
+ searchReset () {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange (params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange (list) {
+ this.selectionList = list;
+ },
+ selectionClear () {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ currentChange (currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange (pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange () {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad (page, params = {}) {
+ this.loading = true;
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
+ }
+ }
+};
+</script>
+
+<style>
+</style>
diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue
index e789ddb..fdee25d 100644
--- a/src/views/wel/index.vue
+++ b/src/views/wel/index.vue
@@ -1,7 +1,11 @@
<template>
- <el-card>
- 首页
- </el-card>
+ <el-row class="morpheus-box">
+ <el-col :span="24">
+ <el-card>
+ 首页
+ </el-card>
+ </el-col>
+ </el-row>
</template>
<script>
@@ -11,5 +15,4 @@
</script>
<style>
-
</style>
--
Gitblit v1.9.3