Browse Source

新增健康上报模块/集团管理模块完善

ren
renguanyu111 4 years ago
parent
commit
8e60404679
  1. 3
      web/.eslintrc.js
  2. 2
      web/index.html
  3. 73
      web/package-lock.json
  4. 104
      web/package.json
  5. 118
      web/src/api/group.js
  6. 143
      web/src/components/wangEnduit/index.vue
  7. 7
      web/src/main.js
  8. 7
      web/src/mixins/infoList.js
  9. 1
      web/src/utils/map/china-cities.json
  10. 1
      web/src/utils/map/china-contour.json
  11. 1
      web/src/utils/map/china.json
  12. 27
      web/src/utils/map/js/china-contour.js
  13. 28
      web/src/utils/map/js/china.js
  14. 27
      web/src/utils/map/js/province/anhui.js
  15. 27
      web/src/utils/map/js/province/aomen.js
  16. 27
      web/src/utils/map/js/province/beijing.js
  17. 1
      web/src/utils/map/js/province/chongqing.js
  18. 27
      web/src/utils/map/js/province/fujian.js
  19. 27
      web/src/utils/map/js/province/gansu.js
  20. 27
      web/src/utils/map/js/province/guangdong.js
  21. 27
      web/src/utils/map/js/province/guangxi.js
  22. 27
      web/src/utils/map/js/province/guizhou.js
  23. 27
      web/src/utils/map/js/province/hainan.js
  24. 27
      web/src/utils/map/js/province/hebei.js
  25. 27
      web/src/utils/map/js/province/heilongjiang.js
  26. 27
      web/src/utils/map/js/province/henan.js
  27. 27
      web/src/utils/map/js/province/hubei.js
  28. 27
      web/src/utils/map/js/province/hunan.js
  29. 27
      web/src/utils/map/js/province/jiangsu.js
  30. 27
      web/src/utils/map/js/province/jiangxi.js
  31. 27
      web/src/utils/map/js/province/jilin.js
  32. 27
      web/src/utils/map/js/province/liaoning.js
  33. 27
      web/src/utils/map/js/province/neimenggu.js
  34. 27
      web/src/utils/map/js/province/ningxia.js
  35. 27
      web/src/utils/map/js/province/qinghai.js
  36. 27
      web/src/utils/map/js/province/shandong.js
  37. 1
      web/src/utils/map/js/province/shanghai.js
  38. 27
      web/src/utils/map/js/province/shanxi.js
  39. 27
      web/src/utils/map/js/province/shanxi1.js
  40. 27
      web/src/utils/map/js/province/sichuan.js
  41. 1
      web/src/utils/map/js/province/taiwan.js
  42. 27
      web/src/utils/map/js/province/tianjin.js
  43. 27
      web/src/utils/map/js/province/xianggang.js
  44. 1
      web/src/utils/map/js/province/xinjiang.js
  45. 1
      web/src/utils/map/js/province/xizang.js
  46. 27
      web/src/utils/map/js/province/yunnan.js
  47. 27
      web/src/utils/map/js/province/zhejiang.js
  48. 1
      web/src/utils/map/js/world.js
  49. 1
      web/src/utils/map/province/anhui.json
  50. 1
      web/src/utils/map/province/aomen.json
  51. 1
      web/src/utils/map/province/beijing.json
  52. 1
      web/src/utils/map/province/chongqing.json
  53. 1
      web/src/utils/map/province/fujian.json
  54. 1
      web/src/utils/map/province/gansu.json
  55. 1
      web/src/utils/map/province/guangdong.json
  56. 1
      web/src/utils/map/province/guangxi.json
  57. 1
      web/src/utils/map/province/guizhou.json
  58. 1
      web/src/utils/map/province/hainan.json
  59. 1
      web/src/utils/map/province/hebei.json
  60. 1
      web/src/utils/map/province/heilongjiang.json
  61. 1
      web/src/utils/map/province/henan.json
  62. 1
      web/src/utils/map/province/hubei.json
  63. 1
      web/src/utils/map/province/hunan.json
  64. 1
      web/src/utils/map/province/jiangsu.json
  65. 1
      web/src/utils/map/province/jiangxi.json
  66. 1
      web/src/utils/map/province/jilin.json
  67. 1
      web/src/utils/map/province/liaoning.json
  68. 1
      web/src/utils/map/province/neimenggu.json
  69. 1
      web/src/utils/map/province/ningxia.json
  70. 1
      web/src/utils/map/province/qinghai.json
  71. 1
      web/src/utils/map/province/shandong.json
  72. 1
      web/src/utils/map/province/shanghai.json
  73. 1
      web/src/utils/map/province/shanxi.json
  74. 1
      web/src/utils/map/province/shanxi1.json
  75. 1
      web/src/utils/map/province/sichuan.json
  76. 1
      web/src/utils/map/province/taiwan.json
  77. 1
      web/src/utils/map/province/tianjin.json
  78. 1
      web/src/utils/map/province/xianggang.json
  79. 1
      web/src/utils/map/province/xinjiang.json
  80. 1
      web/src/utils/map/province/xizang.json
  81. 1
      web/src/utils/map/province/yunnan.json
  82. 1
      web/src/utils/map/province/zhejiang.json
  83. 1
      web/src/utils/map/world.json
  84. 371
      web/src/view/dataReport/dataSetting/index.vue
  85. 17
      web/src/view/dataReport/index.vue
  86. 2
      web/src/view/educate/examManage/examManage.vue
  87. 9
      web/src/view/educate/topic/topic.vue
  88. 250
      web/src/view/group/department/index.vue
  89. 331
      web/src/view/group/post/index.vue
  90. 506
      web/src/view/group/staff/index.vue
  91. 17
      web/src/view/healthy/index.vue
  92. 183
      web/src/view/healthy/map/index.vue
  93. 28
      web/src/view/healthy/map/shandong.js
  94. 1
      web/src/view/healthy/map/shandong.json
  95. 95
      web/src/view/healthy/table/index.vue
  96. 350
      web/src/view/news/index.vue
  97. 5
      web/src/view/superAdmin/authority/authority.vue
  98. 9
      web/vue.config.js
  99. 29
      web/yarn.lock

3
web/.eslintrc.js

@ -2,6 +2,9 @@
//@description: ESlint 语法检测
module.exports = {
root: true,
globals: {
BMap: true
},
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'

2
web/index.html

@ -7,6 +7,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="favicon.ico">
<title></title>
<!-- <script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=ljiKlTAsS7SNVqDM16IUwRVFFhrvbxiF"></script> -->
<script type="text/javascript">
(function(window) {
var theUA = window.navigator.userAgent.toLowerCase();
@ -30,6 +31,7 @@
</script>
</head>
<body>
<div id="app"></div>

73
web/package-lock.json

@ -27,7 +27,8 @@
"vue-particle-line": "^0.1.4",
"vue-router": "^4.0.0-0",
"vuex": "^4.0.0-0",
"vuex-persist": "^2.1.0"
"vuex-persist": "^2.1.0",
"wangeditor": "^4.7.9"
},
"devDependencies": {
"@vitejs/plugin-legacy": "^1.4.4",
@ -1613,7 +1614,6 @@
"version": "7.15.3",
"resolved": "https://registry.nlark.com/@babel/runtime/download/@babel/runtime-7.15.3.tgz?cache=0&sync_timestamp=1628666503436&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fruntime%2Fdownload%2F%40babel%2Fruntime-7.15.3.tgz",
"integrity": "sha1-LhwogMoRjlsvmYgyK9inZWoyUCs=",
"dev": true,
"dependencies": {
"regenerator-runtime": "^0.13.4"
},
@ -1621,6 +1621,18 @@
"node": ">=6.9.0"
}
},
"node_modules/@babel/runtime-corejs3": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.0.tgz",
"integrity": "sha512-Oi2qwQ21X7/d9gn3WiwkDTJmq3TQtYNz89lRnoFy8VeZpWlsyXvzSwiRrRZ8cXluvSwqKxqHJ6dBd9Rv+p0ZGQ==",
"dependencies": {
"core-js-pure": "^3.19.0",
"regenerator-runtime": "^0.13.4"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/standalone": {
"version": "7.15.4",
"resolved": "https://registry.npmjs.org/@babel/standalone/-/standalone-7.15.4.tgz",
@ -5086,6 +5098,16 @@
"semver": "bin/semver.js"
}
},
"node_modules/core-js-pure": {
"version": "3.19.1",
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.1.tgz",
"integrity": "sha512-Q0Knr8Es84vtv62ei6/6jXH/7izKmOrtrxH9WJTHLCMAVeU+8TF8z8Nr08CsH4Ot0oJKzBzJJL9SJBYIv7WlfQ==",
"hasInstallScript": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/core-js"
}
},
"node_modules/core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz",
@ -14561,6 +14583,21 @@
"vuex": ">=2.5"
}
},
"node_modules/wangeditor": {
"version": "4.7.9",
"resolved": "https://registry.npmjs.org/wangeditor/-/wangeditor-4.7.9.tgz",
"integrity": "sha512-x8u/SJQ4pHLp597CzWm/0DrITUGpNaPk4jms03VYSaIt1mSoF5wd+dAxBsfPgmaYrYWx6CZtyGZA4Kv6s1vvlw==",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@babel/runtime-corejs3": "^7.11.2",
"tslib": "^2.1.0"
}
},
"node_modules/wangeditor/node_modules/tslib": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
},
"node_modules/watchpack": {
"version": "1.7.5",
"resolved": "https://registry.nlark.com/watchpack/download/watchpack-1.7.5.tgz",
@ -16719,11 +16756,19 @@
"version": "7.15.3",
"resolved": "https://registry.nlark.com/@babel/runtime/download/@babel/runtime-7.15.3.tgz?cache=0&sync_timestamp=1628666503436&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fruntime%2Fdownload%2F%40babel%2Fruntime-7.15.3.tgz",
"integrity": "sha1-LhwogMoRjlsvmYgyK9inZWoyUCs=",
"dev": true,
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"@babel/runtime-corejs3": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.0.tgz",
"integrity": "sha512-Oi2qwQ21X7/d9gn3WiwkDTJmq3TQtYNz89lRnoFy8VeZpWlsyXvzSwiRrRZ8cXluvSwqKxqHJ6dBd9Rv+p0ZGQ==",
"requires": {
"core-js-pure": "^3.19.0",
"regenerator-runtime": "^0.13.4"
}
},
"@babel/standalone": {
"version": "7.15.4",
"resolved": "https://registry.npmjs.org/@babel/standalone/-/standalone-7.15.4.tgz",
@ -19564,6 +19609,11 @@
}
}
},
"core-js-pure": {
"version": "3.19.1",
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.1.tgz",
"integrity": "sha512-Q0Knr8Es84vtv62ei6/6jXH/7izKmOrtrxH9WJTHLCMAVeU+8TF8z8Nr08CsH4Ot0oJKzBzJJL9SJBYIv7WlfQ=="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz",
@ -27143,6 +27193,23 @@
"lodash": "^4.17.19"
}
},
"wangeditor": {
"version": "4.7.9",
"resolved": "https://registry.npmjs.org/wangeditor/-/wangeditor-4.7.9.tgz",
"integrity": "sha512-x8u/SJQ4pHLp597CzWm/0DrITUGpNaPk4jms03VYSaIt1mSoF5wd+dAxBsfPgmaYrYWx6CZtyGZA4Kv6s1vvlw==",
"requires": {
"@babel/runtime": "^7.11.2",
"@babel/runtime-corejs3": "^7.11.2",
"tslib": "^2.1.0"
},
"dependencies": {
"tslib": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
}
}
},
"watchpack": {
"version": "1.7.5",
"resolved": "https://registry.nlark.com/watchpack/download/watchpack-1.7.5.tgz",

104
web/package.json

@ -1,53 +1,55 @@
{
"name": "gin-vue-admin",
"version": "2.3.5",
"private": true,
"scripts": {
"serve": "vite --host --mode development",
"build": "vite build --mode production",
"preview": "vite preview"
},
"dependencies": {
"@babel/polyfill": "^7.12.1",
"@element-plus/icons": "0.0.11",
"axios": "^0.19.2",
"core-js": "^3.6.5",
"echarts": "4.9.0",
"element-plus": "^1.1.0-beta.24",
"highlight.js": "^10.6.0",
"marked": "^2.0.0",
"mitt": "^3.0.0",
"path": "^0.12.7",
"qs": "^6.8.0",
"quill": "^1.3.7",
"screenfull": "^5.0.2",
"script-ext-html-webpack-plugin": "^2.1.4",
"spark-md5": "^3.0.1",
"vue": "^3.2.0",
"vue-particle-line": "^0.1.4",
"vue-router": "^4.0.0-0",
"vuex": "^4.0.0-0",
"vuex-persist": "^2.1.0"
},
"devDependencies": {
"@vitejs/plugin-legacy": "^1.4.4",
"@vitejs/plugin-vue": "latest",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.1.5",
"babel-eslint": "^10.1.0",
"babel-plugin-import": "^1.13.3",
"babel-polyfill": "^6.26.0",
"dotenv": "^10.0.0",
"es6-promise": "^4.2.8",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vite": "2",
"vite-plugin-importer": "^0.2.5"
}
"name": "gin-vue-admin",
"version": "2.3.5",
"private": true,
"scripts": {
"serve": "vite --host --mode development",
"build": "vite build --mode production",
"preview": "vite preview"
},
"dependencies": {
"@babel/polyfill": "^7.12.1",
"@element-plus/icons": "0.0.11",
"axios": "^0.19.2",
"core-js": "^3.6.5",
"echarts": "^5.2.2",
"element-plus": "^1.1.0-beta.24",
"highlight.js": "^10.6.0",
"marked": "^2.0.0",
"mitt": "^3.0.0",
"path": "^0.12.7",
"qs": "^6.8.0",
"quill": "^1.3.7",
"screenfull": "^5.0.2",
"script-ext-html-webpack-plugin": "^2.1.4",
"spark-md5": "^3.0.1",
"vue": "^3.2.0",
"vue-baidu-map": "^0.21.22",
"vue-particle-line": "^0.1.4",
"vue-router": "^4.0.0-0",
"vuex": "^4.0.0-0",
"vuex-persist": "^2.1.0",
"wangeditor": "^4.7.9"
},
"devDependencies": {
"@vitejs/plugin-legacy": "^1.4.4",
"@vitejs/plugin-vue": "latest",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.1.5",
"babel-eslint": "^10.1.0",
"babel-plugin-import": "^1.13.3",
"babel-polyfill": "^6.26.0",
"dotenv": "^10.0.0",
"es6-promise": "^4.2.8",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vite": "2",
"vite-plugin-importer": "^0.2.5"
}
}

118
web/src/api/group.js

@ -0,0 +1,118 @@
// 集团api
import service from '@/utils/request'
// @Tags api
// @Summary 获取集团详情 不分页
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "分页获取用户列表"
// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/getApiList [post]
// {
// page int
// pageSize int
// }
export const getgroupinfo = (data) => {
return service({
url: '/group/getgroupinfo',
method: 'post',
data
})
}
// @Tags Api
// @Summary 获取子公司详情
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body api.CreateApiParams true "创建api"
// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/createApi [post]
export const getsubsidiaryinfo = (data) => {
return service({
url: '/group/getsubsidiaryinfo',
method: 'post',
data
})
}
// @Tags menu
// @Summary 添加集团信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body api.GetById true "添加集团信息"
// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/getApiById [post]
export const addgroupinfo = (data) => {
return service({
url: '/group/addgroupinfo',
method: 'post',
data
})
}
// @Tags Api
// @Summary 获取工段详情
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body api.CreateApiParams true "获取工段详情"
// @Success 200 {string} json "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /api/updateApi [post]
export const getgrouppositioninfo = (data) => {
return service({
url: '/group/getgrouppositioninfo',
method: 'post',
data
})
}
// @Tags Api
// @Summary 修改集团信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body api.CreateApiParams true "修改集团信息"
// @Success 200 {string} json "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /group/eitegroupinfo [post]
export const eitegroupinfo = (data) => {
return service({
url: '/group/eitegroupinfo',
method: 'post',
data
})
}
// @Tags Api
// @Summary 删除集团框架相应信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /group/delgroupinfo [post]
export const delgroupinfo = (data) => {
return service({
url: '/group/delgroupinfo',
method: 'post',
data
})
}
// @Tags Api
// @Summary 获取集团架构
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body dbModel.Api true "获取集团架构"
// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /group/grouplist [get]
export const grouplist = (data) => {
return service({
url: '/group/grouplist',
method: 'get',
data
})
}

143
web/src/components/wangEnduit/index.vue

@ -0,0 +1,143 @@
<template lang="html">
<div class="editor">
<div ref="toolbar" class="toolbar">
</div>
<div ref="editor" class="text">
</div>
</div>
</template>
<script>
import E from 'wangeditor'
export default {
name: 'editoritem',
data() {
return {
// uploadPath,
editor: null,
info_: null
}
},
model: {
prop: 'value',
event: 'change'
},
props: {
value: {
type: String,
default: ''
},
isClear: {
type: Boolean,
default: false
}
},
watch: {
isClear(val) {
//
if (val) {
this.editor.txt.clear()
this.info_ = null
}
},
value: function(value) {
if (value !== this.editor.txt.html()) {
this.editor.txt.html(this.value)
}
}
//valuevalue
},
mounted() {
this.seteditor()
this.editor.txt.html(this.value)
},
methods: {
seteditor() {
// http://192.168.2.125:8080/admin/storage/create
this.editor = new E(this.$refs.toolbar, this.$refs.editor)
this.editor.customConfig.uploadImgShowBase64 = false // base 64
this.editor.customConfig.uploadImgServer = 'http://otp.cdinfotech.top/file/upload_images'//
this.editor.customConfig.uploadImgHeaders = { }// header
this.editor.customConfig.uploadFileName = 'file' //
this.editor.customConfig.uploadImgMaxSize = 2 * 1024 * 1024 // 2M
this.editor.customConfig.uploadImgMaxLength = 6 // 3
this.editor.customConfig.uploadImgTimeout = 3 * 60 * 1000 //
//
this.editor.customConfig.menus = [
'head', //
'bold', //
'fontSize', //
'fontName', //
'italic', //
'underline', // 线
'strikeThrough', // 线
'foreColor', //
'backColor', //
'link', //
'list', //
'justify', //
'quote', //
'emoticon', //
'image', //
'table', //
'video', //
'code', //
'undo', //
'redo', //
'fullscreen' //
]
this.editor.customConfig.uploadImgHooks = {
fail: (xhr, editor, result) => {
//
},
success: (xhr, editor, result) => {
//
},
timeout: (xhr, editor) => {
//
},
error: (xhr, editor) => {
//
},
customInsert: (insertImg, result, editor) => {
//
//
//resultdata[{url:""},...]
// console.log(result.data[0].url)
//insertImg()
//
// for (let i = 0; i < 1; i++) {
// console.log(result)
let url = "http://otp.cdinfotech.top"+result.url
insertImg(url)
// }
}
}
this.editor.customConfig.onchange = (html) => {
this.info_ = html //
this.$emit('change', this.info_) //
}
//
this.editor.create()
}
}
}
</script>
<style scoped lang="css">
.editor {
width: 100%;
margin: 0 auto;
position: relative;
z-index: 0;
}
.toolbar {
border: 1px solid #ccc;
}
.text {
border: 1px solid #ccc;
min-height: 500px;
}
</style>

7
web/src/main.js

@ -1,10 +1,10 @@
import 'babel-polyfill'
import promise from 'es6-promise'
import { createApp } from 'vue'
import 'element-plus/dist/index.css'
import './style/element_visiable.scss'
import ElementPlus from 'element-plus'
import * as echarts from 'echarts'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
// 引入gin-vue-admin前端初始化相关内容
import './core/gin-vue-admin'
@ -18,8 +18,12 @@ import { store } from '@/store/index'
import App from './App.vue'
promise.polyfill()
const app = createApp(App)
app.config.globalProperties.$echarts = echarts
app.config.productionTip = false
app.use(run)
.use(auth)
@ -27,4 +31,5 @@ app.use(run)
.use(router)
.use(ElementPlus, { locale: zhCn }).mount('#app')
export default app

7
web/src/mixins/infoList.js

@ -49,12 +49,19 @@ export default {
async getTableData(beforeFunc = () => {}, afterFunc = () => {}) {
beforeFunc()
const table = await this.listApi({ page: this.page, pageSize: this.pageSize, ...this.searchInfo })
console.log(table.code)
console.log("datalist")
console.log(table.data)
if (table.code === 0) {
this.tableData = table.data.list
this.total = table.data.total
this.page = table.data.page
this.pageSize = table.data.pageSize
}
if (table.code === 200) {
this.tableData = table.data
}
afterFunc()
}
}

1
web/src/utils/map/china-cities.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/china-contour.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/china.json

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/china-contour.js

File diff suppressed because one or more lines are too long

28
web/src/utils/map/js/china.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/anhui.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/aomen.js

@ -0,0 +1,27 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['exports', 'echarts'], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
// CommonJS
factory(exports, require('echarts'));
} else {
// Browser globals
factory({}, root.echarts);
}
}(this, function (exports, echarts) {
var log = function (msg) {
if (typeof console !== 'undefined') {
console && console.error && console.error(msg);
}
}
if (!echarts) {
log('ECharts is not Loaded');
return;
}
if (!echarts.registerMap) {
log('ECharts Map is not loaded')
return;
}
echarts.registerMap('澳门', {"type":"FeatureCollection","features":[{"id":"820001","type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[["@@LADC^umZ@DONWE@DALBBF@H@DFBBTC"],["@@P@LC@AGM@OECMBABBTCD@DDH"]],"encodeOffsets":[[[116285,22746]],[[116303,22746]]]},"properties":{"cp":[113.552965,22.207882],"name":"花地玛堂区","childNum":2}},{"id":"820002","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@MK@CA@AAGDEB@NVFJG"],"encodeOffsets":[[116281,22734]]},"properties":{"cp":[113.549052,22.199175],"name":"花王堂区","childNum":1}},{"id":"820003","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@EGOB@DNLHE@C"],"encodeOffsets":[[116285,22729]]},"properties":{"cp":[113.550252,22.193791],"name":"望德堂区","childNum":1}},{"id":"820004","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@ŸYMVAN@BFCBBDAFHDBBFDHIJJEFDPCHHlYJQ"],"encodeOffsets":[[116313,22707]]},"properties":{"cp":[113.55374,22.188119],"name":"大堂区","childNum":1}},{"id":"820005","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@JICGAECACGEBAAEDBFNXB@"],"encodeOffsets":[[116266,22728]]},"properties":{"cp":[113.54167,22.187778],"name":"风顺堂区","childNum":1}},{"id":"820006","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@ ZNWRquZCBCC@AEA@@ADCDCAACEAGBQ@INEL"],"encodeOffsets":[[116265,22694]]},"properties":{"cp":[113.558783,22.154124],"name":"嘉模堂区","childNum":1}},{"id":"820007","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@MOIAIEI@@GE@AAUCBdCFIFR@HAFBBDDBDCBC@@FB@BDDDA\\M"],"encodeOffsets":[[116316,22676]]},"properties":{"cp":[113.56925,22.136546],"name":"路凼填海区","childNum":1}},{"id":"820008","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@DKMMa_GC_COD@dVDBBF@@HJ@JFJBNPZK"],"encodeOffsets":[[116329,22670]]},"properties":{"cp":[113.559954,22.124049],"name":"圣方济各堂区","childNum":1}}],"UTF8Encoding":true});
}));

27
web/src/utils/map/js/province/beijing.js

File diff suppressed because one or more lines are too long

1
web/src/utils/map/js/province/chongqing.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/fujian.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/gansu.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/guangdong.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/guangxi.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/guizhou.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/hainan.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/hebei.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/heilongjiang.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/henan.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/hubei.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/hunan.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/jiangsu.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/jiangxi.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/jilin.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/liaoning.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/neimenggu.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/ningxia.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/qinghai.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/shandong.js

File diff suppressed because one or more lines are too long

1
web/src/utils/map/js/province/shanghai.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/shanxi.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/shanxi1.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/sichuan.js

File diff suppressed because one or more lines are too long

1
web/src/utils/map/js/province/taiwan.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/tianjin.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/xianggang.js

File diff suppressed because one or more lines are too long

1
web/src/utils/map/js/province/xinjiang.js

File diff suppressed because one or more lines are too long

1
web/src/utils/map/js/province/xizang.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/yunnan.js

File diff suppressed because one or more lines are too long

27
web/src/utils/map/js/province/zhejiang.js

File diff suppressed because one or more lines are too long

1
web/src/utils/map/js/world.js

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/anhui.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/aomen.json

@ -0,0 +1 @@
{"type":"FeatureCollection","features":[{"id":"820001","type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[["@@LADC^umZ@DONWE@DALBBF@H@DFBBTC"],["@@P@LC@AGM@OECMBABBTCD@DDH"]],"encodeOffsets":[[[116285,22746]],[[116303,22746]]]},"properties":{"cp":[113.552965,22.207882],"name":"花地玛堂区","childNum":2}},{"id":"820002","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@MK@CA@AAGDEB@NVFJG"],"encodeOffsets":[[116281,22734]]},"properties":{"cp":[113.549052,22.199175],"name":"花王堂区","childNum":1}},{"id":"820003","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@EGOB@DNLHE@C"],"encodeOffsets":[[116285,22729]]},"properties":{"cp":[113.550252,22.193791],"name":"望德堂区","childNum":1}},{"id":"820004","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@ŸYMVAN@BFCBBDAFHDBBFDHIJJEFDPCHHlYJQ"],"encodeOffsets":[[116313,22707]]},"properties":{"cp":[113.55374,22.188119],"name":"大堂区","childNum":1}},{"id":"820005","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@JICGAECACGEBAAEDBFNXB@"],"encodeOffsets":[[116266,22728]]},"properties":{"cp":[113.54167,22.187778],"name":"风顺堂区","childNum":1}},{"id":"820006","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@ ZNWRquZCBCC@AEA@@ADCDCAACEAGBQ@INEL"],"encodeOffsets":[[116265,22694]]},"properties":{"cp":[113.558783,22.154124],"name":"嘉模堂区","childNum":1}},{"id":"820007","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@MOIAIEI@@GE@AAUCBdCFIFR@HAFBBDDBDCBC@@FB@BDDDA\\M"],"encodeOffsets":[[116316,22676]]},"properties":{"cp":[113.56925,22.136546],"name":"路凼填海区","childNum":1}},{"id":"820008","type":"Feature","geometry":{"type":"Polygon","coordinates":["@@DKMMa_GC_COD@dVDBBF@@HJ@JFJBNPZK"],"encodeOffsets":[[116329,22670]]},"properties":{"cp":[113.559954,22.124049],"name":"圣方济各堂区","childNum":1}}],"UTF8Encoding":true}

1
web/src/utils/map/province/beijing.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/chongqing.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/fujian.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/gansu.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/guangdong.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/guangxi.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/guizhou.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/hainan.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/hebei.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/heilongjiang.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/henan.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/hubei.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/hunan.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/jiangsu.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/jiangxi.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/jilin.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/liaoning.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/neimenggu.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/ningxia.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/qinghai.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/shandong.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/shanghai.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/shanxi.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/shanxi1.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/sichuan.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/taiwan.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/tianjin.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/xianggang.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/xinjiang.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/xizang.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/yunnan.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/province/zhejiang.json

File diff suppressed because one or more lines are too long

1
web/src/utils/map/world.json

File diff suppressed because one or more lines are too long

371
web/src/view/dataReport/dataSetting/index.vue

@ -0,0 +1,371 @@
<template>
<div>
<!-- 数据提报表设置 -->
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="searchInfo">
<el-form-item label="名称">
<el-input v-model="searchInfo.path" placeholder="请输入报表名称" />
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog('addApi')">新增</el-button>
<!-- <el-button size="mini" type="primary" icon="el-icon-upload" @click="openDialog('addApi')">导入员工数据</el-button> -->
<el-popover v-model:visible="deleteVisible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin-top: 8px;">
<el-button size="mini" type="text" @click="deleteVisible = false">取消</el-button>
<el-button size="mini" type="primary" @click="onDelete">确定</el-button>
</div>
<template #reference>
<el-button icon="el-icon-delete" size="mini" :disabled="!apis.length" style="margin-left: 10px;">删除</el-button>
</template>
</el-popover>
</div>
<el-table :data="tableData" @sort-change="sortChange" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"/>
<el-table-column align="left" label="数据提报表名称" prop="ID"/>
<el-table-column align="left" label="发布时间" prop="path"/>
<el-table-column align="left" label="评分分配" prop="apiGroup"/>
<el-table-column align="left" label="发布人" prop="description"/>
<el-table-column align="left" fixed="right" label="操作" width="200">
<template #default="scope">
<el-button
icon="el-icon-edit"
size="small"
type="text"
@click="editApi(scope.row)"
>编辑</el-button>
<el-button
icon="el-icon-delete"
size="small"
type="text"
@click="deleteApi(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="gva-pagination">
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="dialogTitle" width="40%">
<el-form ref="apiForm" :model="form" :rules="rules" label-width="100px">
<el-form-item label="数据提报表名称" prop="num">
<el-input v-model="form.num" autocomplete="off"/>
</el-form-item>
<el-form-item
v-for="(domain, index) in form.domains"
:label="'评分标准' + (index+1)"
:key="domain.key"
:prop="'domains.' + index + '.value'"
:rules="{
required: true, message: '评分标准不能为空', trigger: 'blur'
}"
>
<el-input v-model="domain.value"></el-input><el-button @click.prevent="removeDomain(domain)">删除</el-button>
</el-form-item>
<el-form-item>
<el-button @click="addDomain">新增评分标准</el-button>
</el-form-item>
<el-form-item label="阅读量" prop="num">
<div>{{form.domains}}</div>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button size="small" @click="closeDialog"> </el-button>
<el-button size="small" type="primary" @click="enterDialog"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
// mixins getTableData this.searchInfo
import {
getApiById,
getApiList,
createApi,
updateApi,
deleteApi,
deleteApisByIds
} from '@/api/api'
import infoList from '@/mixins/infoList'
// import EditorBar from '../../components/wangEnduit/index.vue'
import { toSQLLine } from '@/utils/stringFun'
import warningBar from '@/components/warningBar/warningBar.vue'
const methodOptions = [
{
value: 'POST',
label: '创建',
type: 'success'
},
{
value: 'GET',
label: '查看',
type: ''
},
{
value: 'PUT',
label: '更新',
type: 'warning'
},
{
value: 'DELETE',
label: '删除',
type: 'danger'
}
]
export default {
name: 'Api',
components: {
// warningBar,EditorBar
warningBar
},
mixins: [infoList],
data() {
return {
deleteVisible: false,
// listApi: getApiList,
dialogFormVisible: false,
dialogTitle: '新增新闻',
apis: [],
form: {
domains: [{
value: ''
}],
wxId:'',
jdId:'',
num:'',
name:'',
type:'',
birthDate:'',
onboardingDate:'',
password:'',
passwordTwo:'',
department:'',
post: '',
gender: '',
age: '',
certificate: '',
certificateNum: '',
phone: '',
state: '',
},
methodOptions: methodOptions,
type: '',
rules: {
path: [{ required: true, message: '请输入api路径', trigger: 'blur' }],
apiGroup: [
{ required: true, message: '请输入组名称', trigger: 'blur' }
],
description: [
{ required: true, message: '请输入api介绍', trigger: 'blur' }
]
}
}
},
created() {
this.getTableData()
},
methods: {
//
removeDomain(item) {
var index = this.form.domains.indexOf(item)
if (index !== -1) {
this.form.domains.splice(index, 1)
}
},
//
addDomain() {
this.form.domains.push({
value: '',
key: Date.now()
});
},
methodFiletr(value) {
const target = methodOptions.filter(item => item.value === value)[0]
return target && `${target.label}`
},
tagTypeFiletr(value) {
const target = methodOptions.filter(item => item.value === value)[0]
return target && `${target.type}`
},
// api
handleSelectionChange(val) {
this.apis = val
},
async onDelete() {
const ids = this.apis.forEach(item => item.ID)
const res = await deleteApisByIds({ ids })
if (res.code === 0) {
this.$message({
type: 'success',
message: res.msg
})
if (this.tableData.length === ids.length && this.page > 1) {
this.page--
}
this.deleteVisible = false
this.getTableData()
}
},
//
sortChange({ prop, order }) {
if (prop) {
this.searchInfo.orderKey = toSQLLine(prop)
this.searchInfo.desc = order === 'descending'
}
this.getTableData()
},
onReset() {
this.searchInfo = {}
},
//
//
onSubmit() {
this.page = 1
this.pageSize = 10
this.getTableData()
},
initForm() {
this.$refs.apiForm.resetFields()
this.form = {
domains: [{
value: ''
}],
path: '',
apiGroup: '',
method: '',
description: ''
}
},
closeDialog() {
this.initForm()
this.dialogFormVisible = false
},
openDialog(type) {
switch (type) {
case 'addApi':
this.dialogTitle = '新增数据提报表'
break
case 'edit':
this.dialogTitle = '编辑新增数据提报表'
break
default:
break
}
this.type = type
this.dialogFormVisible = true
},
async editApi(row) {
const res = await getApiById({ id: row.ID })
this.form = res.data.api
this.openDialog('edit')
},
async deleteApi(row) {
this.$confirm('此操作将永久删除所有角色下该api, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async() => {
const res = await deleteApi(row)
if (res.code === 0) {
this.$message({
type: 'success',
message: '删除成功!'
})
if (this.tableData.length === 1 && this.page > 1) {
this.page--
}
this.getTableData()
}
})
},
async enterDialog() {
this.$refs.apiForm.validate(async valid => {
if (valid) {
switch (this.type) {
case 'addApi':
{
const res = await createApi(this.form)
if (res.code === 0) {
this.$message({
type: 'success',
message: '添加成功',
showClose: true
})
}
this.getTableData()
this.closeDialog()
}
break
case 'edit':
{
const res = await updateApi(this.form)
if (res.code === 0) {
this.$message({
type: 'success',
message: '编辑成功',
showClose: true
})
}
this.getTableData()
this.closeDialog()
}
break
default:
// eslint-disable-next-line no-lone-blocks
{
this.$message({
type: 'error',
message: '未知操作',
showClose: true
})
}
break
}
}
})
}
}
}
</script>
<style scoped lang="scss">
.el-input {
width: 220px;
}
.button-box {
padding: 10px 20px;
.el-button {
float: right;
}
}
.warning {
color: #dc143c;
}
</style>

17
web/src/view/dataReport/index.vue

@ -0,0 +1,17 @@
<template>
<div>
<router-view v-slot="{ Component }">
<transition mode="out-in" name="el-fade-in-linear">
<keep-alive :include="$store.getters['router/keepAliveRouters']">
<component :is="Component" />
</keep-alive>
</transition>
</router-view>
</div>
</template>
<script>
export default {
name: 'dataReport'
}
</script>

2
web/src/view/educate/examManage/examManage.vue

@ -98,7 +98,7 @@
</div>
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="dialogTitle">
<warning-bar title="新增API,需要在角色管理内篇日志权限才可使用" />
<el-form ref="apiForm" :model="form" :rules="rules" label-width="80px">
<el-form-item label="路径" prop="path">
<el-input v-model="form.path" autocomplete="off" />

9
web/src/view/educate/topic/topic.vue

@ -1,18 +1,19 @@
<template>
<!-- 题库管理 -->
<div>
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="searchInfo">
<el-form-item label="工段">
<el-select v-model="searchInfo.workSection" clearable placeholder="请选择">
<el-option value="1">a工段</el-option>
<el-option value="2">b工段</el-option>
<el-option value="1" label="a工段">a工段</el-option>
<el-option value="2" label="b工段">b工段</el-option>
</el-select>
</el-form-item>
<el-form-item label="职务">
<el-select v-model="searchInfo.method" clearable placeholder="职务">
<el-option value="1">a职务</el-option>
<el-option value="2">b职务</el-option>
<el-option value="1" label="a职务">a职务</el-option>
<el-option value="2" label="b职务">b职务</el-option>
</el-select>
</el-form-item>
<el-form-item label="题目">

250
web/src/view/group/department/index.vue

@ -1,4 +1,5 @@
<template>
<!-- 部门管理 -->
<div>
<!-- <div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="searchInfo">
@ -29,7 +30,8 @@
</div> -->
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog('addApi')">新增</el-button>
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog('addApi')">新增分公司</el-button>
<!-- <el-popover v-model:visible="deleteVisible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin-top: 8px;">
@ -41,11 +43,12 @@
</template>
</el-popover> -->
</div>
<el-table
:data="tableData"
accordion
style="width: 100%;margin-bottom: 20px;"
row-key="id"
row-key="singid"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column prop="name" label="部门名称"></el-table-column>
<el-table-column prop="sort" label="排序" width="180"></el-table-column>
@ -56,6 +59,7 @@
</template>
</el-table-column>
<el-table-column prop="wxId" label="企业微信ID"></el-table-column>
<el-table-column prop="jdId" label="金蝶ID"></el-table-column>
<el-table-column prop="attributes" label="属性">
<template #default="scope">
<el-tag v-show="scope.row.attributes==1">私有</el-tag>
@ -65,6 +69,20 @@
<el-table-column prop="date" label="创建时间"></el-table-column>
<el-table-column align="left" fixed="right" label="操作" width="200">
<template #default="scope">
<el-button
v-if="scope.row.queryid==1"
icon="el-icon-edit"
size="small"
type="text"
@click="editApi(scope.row)"
>新增部门</el-button>
<el-button
v-if="scope.row.queryid==2"
icon="el-icon-edit"
size="small"
type="text"
@click="editApi(scope.row)"
>新增工段</el-button>
<el-button
icon="el-icon-edit"
size="small"
@ -108,6 +126,9 @@
<el-form-item label="企业微信ID" prop="method">
<el-input style="width: 217px!important" v-model="form.wxId"/>
</el-form-item>
<el-form-item label="金蝶ID" prop="method">
<el-input style="width: 217px!important" v-model="form.jdId"/>
</el-form-item>
<el-form-item label="属性" prop="method">
<el-radio v-model="radio" label="1">私有</el-radio>
<el-radio v-model="radio" label="2">共享</el-radio>
@ -132,13 +153,8 @@
// mixins getTableData this.searchInfo
import {
getApiById,
getApiList,
createApi,
updateApi,
deleteApi,
deleteApisByIds
} from '@/api/api'
grouplist,
} from '@/api/group'
import infoList from '@/mixins/infoList'
import { toSQLLine } from '@/utils/stringFun'
import warningBar from '@/components/warningBar/warningBar.vue'
@ -173,177 +189,74 @@ export default {
mixins: [infoList],
data() {
return {
radio: '1',
tableData: [{
cheshiList:[{
id: 1,
date: '2016-05-02',
name: '荣信集团',
address: true,
wxId:"ceshi",
attributes:1,
sort: 1,
children: [{
id: 90,
date: '2016-05-01',
name: '测试',
address: false,
sort: 90,
}]
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
id: 2,
date: '2016-05-02',
name: '恒信生物',
address: true,
sort: 2,
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
id: 3,
date: '2016-05-02',
name: '恒信高科',
address: true,
sort: 3,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
children: [{
id: 31,
date: '2016-05-01',
name: '甲醇分厂',
address: true,
sort: 31,
children: [{
id: 50,
date: '2016-05-01',
name: '中控室',
address: false,
sort: 50,
}]
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
id: 32,
date: '2016-05-01',
name: '化产分厂',
address: true,
sort: 32,
},{
id: 33,
date: '2016-05-01',
name: '动力分厂',
address: true,
sort: 33,
},{
id: 34,
date: '2016-05-01',
name: '机焦车间',
address: true,
sort: 34,
},{
id: 35,
date: '2016-05-01',
name: '质检计量中心',
address: true,
sort: 35,
},{
id: 36,
date: '2016-05-01',
name: '安环部',
address: true,
sort: 36,
},{
id: 37,
date: '2016-05-01',
name: '备煤车间',
address: true,
sort: 37,
},{
id: 38,
date: '2016-05-01',
name: '保卫部',
address: true,
sort: 38,
},{
id: 39,
date: '2016-05-01',
name: '企管部',
address: true,
sort: 39,
},{
id: 40,
date: '2016-05-01',
name: '高管',
address: true,
sort: 40,
},{
id: 41,
date: '2016-05-01',
name: '综合办',
address: true,
sort: 41,
},{
id: 42,
date: '2016-05-01',
name: '人力资源部',
address: true,
sort: 42,
},{
id: 43,
date: '2016-05-01',
name: '财务部',
address: true,
sort: 43,
}
]
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
children:[
{
id: 38,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
},
],
}]
}, {
id: 4,
date: '2016-05-03',
name: '恒信置业',
address: true,
sort: 4,
}, {
id: 5,
date: '2016-05-03',
name: '恒信新材料',
address: true,
sort: 5,
}, {
id: 6,
date: '2016-05-03',
name: '集团高管',
address: true,
sort: 6,
}, {
id: 7,
date: '2016-05-03',
name: '集团办公室',
address: true,
sort: 7,
}, {
id: 8,
date: '2016-05-03',
name: '集团财务部',
address: true,
sort: 8,
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}],
tableData1: [{
id: 1,
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
id: 9,
date: '2016-05-03',
name: '集团营销部',
address: true,
sort: 9,
id: 2,
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
id: 10,
date: '2016-05-03',
name: '恒信荟荃',
address: true,
sort: 10,
id: 3,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
hasChildren: true
}, {
id: 11,
id: 4,
date: '2016-05-03',
name: '酒店管理',
address: true,
sort: 11,
}
],
deleteVisible: false,
// listApi: getApiList,
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}],
radio: '1',
tableData: [],
deleteVisible: false,
listApi: grouplist,
dialogFormVisible: false,
dialogTitle: '新增Api',
dialogTitle: '新增部门',
apis: [],
form: {
path: '',
@ -367,10 +280,23 @@ export default {
}
}
},
created() {
async created() {
this.getTableData()
this.getgrouplist()
this.pageSize = 999
await this.getTableData()
},
methods: {
look(){
console.log("查看")
console.log(this.tableData)
},
//
async getgrouplist(){
const res = await grouplist()
console.log("集团架构")
console.log(res)
},
// input
handleChange(){
@ -435,7 +361,7 @@ export default {
openDialog(type) {
switch (type) {
case 'addApi':
this.dialogTitle = '新增部门'
this.dialogTitle = '新增'
break
case 'edit':
this.dialogTitle = '编辑'

331
web/src/view/group/post/index.vue

@ -0,0 +1,331 @@
<template>
<div>
<!-- 岗位管理 -->
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="searchInfo">
<el-form-item label="岗位名称">
<el-input v-model="searchInfo.name" placeholder="请输入岗位名称" />
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog('addApi')">新增</el-button>
<el-popover v-model:visible="deleteVisible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin-top: 8px;">
<el-button size="mini" type="text" @click="deleteVisible = false">取消</el-button>
<el-button size="mini" type="primary" @click="onDelete">确定</el-button>
</div>
<template #reference>
<el-button icon="el-icon-delete" size="mini" :disabled="!apis.length" style="margin-left: 10px;">删除</el-button>
</template>
</el-popover>
</div>
<el-table :data="tableData" @sort-change="sortChange" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
/>
<el-table-column align="left" label="岗位名称" min-width="150" prop="name"/>
<el-table-column align="left" label="岗位权重" min-width="150" prop="weights"/>
<el-table-column align="left" label="岗位状态" min-width="150" prop="state">
<template #default="scope">
<el-switch v-model="scope.row"></el-switch>
</template>
</el-table-column>
<el-table-column align="left" fixed="right" label="操作" width="200">
<template #default="scope">
<el-button
icon="el-icon-edit"
size="small"
type="text"
@click="editApi(scope.row)"
>编辑</el-button>
<el-button
icon="el-icon-delete"
size="small"
type="text"
@click="deleteApi(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="gva-pagination">
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="dialogTitle" width=20%>
<el-form ref="apiForm" :model="form" :rules="rules" label-width="80px">
<el-form-item label="岗位名称" prop="path">
<el-input v-model="form.path" autocomplete="off" />
</el-form-item>
<el-form-item label="岗位权重" prop="method">
<el-input v-model="form.path" autocomplete="off" />
</el-form-item>
<el-form-item label="岗位状态" prop="apiGroup">
<el-switch v-model="form.delivery"></el-switch>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button size="small" @click="closeDialog"> </el-button>
<el-button size="small" type="primary" @click="enterDialog"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
// mixins getTableData this.searchInfo
import {
getApiById,
getApiList,
createApi,
updateApi,
deleteApi,
deleteApisByIds
} from '@/api/api'
import infoList from '@/mixins/infoList'
import { toSQLLine } from '@/utils/stringFun'
import warningBar from '@/components/warningBar/warningBar.vue'
const methodOptions = [
{
value: 'POST',
label: '创建',
type: 'success'
},
{
value: 'GET',
label: '查看',
type: ''
},
{
value: 'PUT',
label: '更新',
type: 'warning'
},
{
value: 'DELETE',
label: '删除',
type: 'danger'
}
]
export default {
name: 'Api',
components: {
warningBar
},
mixins: [infoList],
data() {
return {
deleteVisible: false,
// listApi: getApiList,
dialogFormVisible: false,
dialogTitle: '新增',
apis: [],
form: {
path: '',
apiGroup: '',
method: '',
description: ''
},
methodOptions: methodOptions,
type: '',
rules: {
path: [{ required: true, message: '请输入api路径', trigger: 'blur' }],
apiGroup: [
{ required: true, message: '请输入组名称', trigger: 'blur' }
],
method: [
{ required: true, message: '请选择请求方式', trigger: 'blur' }
],
description: [
{ required: true, message: '请输入api介绍', trigger: 'blur' }
]
}
}
},
created() {
this.getTableData()
},
methods: {
methodFiletr(value) {
const target = methodOptions.filter(item => item.value === value)[0]
return target && `${target.label}`
},
tagTypeFiletr(value) {
const target = methodOptions.filter(item => item.value === value)[0]
return target && `${target.type}`
},
// api
handleSelectionChange(val) {
this.apis = val
},
async onDelete() {
const ids = this.apis.forEach(item => item.ID)
const res = await deleteApisByIds({ ids })
if (res.code === 0) {
this.$message({
type: 'success',
message: res.msg
})
if (this.tableData.length === ids.length && this.page > 1) {
this.page--
}
this.deleteVisible = false
this.getTableData()
}
},
//
sortChange({ prop, order }) {
if (prop) {
this.searchInfo.orderKey = toSQLLine(prop)
this.searchInfo.desc = order === 'descending'
}
this.getTableData()
},
onReset() {
this.searchInfo = {}
},
//
onSubmit() {
this.page = 1
this.pageSize = 10
this.getTableData()
},
initForm() {
this.$refs.apiForm.resetFields()
this.form = {
path: '',
apiGroup: '',
method: '',
description: ''
}
},
closeDialog() {
this.initForm()
this.dialogFormVisible = false
},
openDialog(type) {
switch (type) {
case 'addApi':
this.dialogTitle = '新增岗位信息'
break
case 'edit':
this.dialogTitle = '编辑岗位信息'
break
default:
break
}
this.type = type
this.dialogFormVisible = true
},
async editApi(row) {
const res = await getApiById({ id: row.ID })
this.form = res.data.api
this.openDialog('edit')
},
async deleteApi(row) {
this.$confirm('此操作将永久删除所有角色下该api, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async() => {
const res = await deleteApi(row)
if (res.code === 0) {
this.$message({
type: 'success',
message: '删除成功!'
})
if (this.tableData.length === 1 && this.page > 1) {
this.page--
}
this.getTableData()
}
})
},
async enterDialog() {
this.$refs.apiForm.validate(async valid => {
if (valid) {
switch (this.type) {
case 'addApi':
{
const res = await createApi(this.form)
if (res.code === 0) {
this.$message({
type: 'success',
message: '添加成功',
showClose: true
})
}
this.getTableData()
this.closeDialog()
}
break
case 'edit':
{
const res = await updateApi(this.form)
if (res.code === 0) {
this.$message({
type: 'success',
message: '编辑成功',
showClose: true
})
}
this.getTableData()
this.closeDialog()
}
break
default:
// eslint-disable-next-line no-lone-blocks
{
this.$message({
type: 'error',
message: '未知操作',
showClose: true
})
}
break
}
}
})
}
}
}
</script>
<style scoped lang="scss">
.button-box {
padding: 10px 20px;
.el-button {
float: right;
}
}
.warning {
color: #dc143c;
}
</style>

506
web/src/view/group/staff/index.vue

@ -0,0 +1,506 @@
<template>
<!-- 员工管理 -->
<div>
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="searchInfo">
<el-form-item label="工段">
<el-select v-model="searchInfo.workSection" clearable placeholder="请选择">
<el-option value="1" label="a工段">a工段</el-option>
<el-option value="2" label="b工段">b工段</el-option>
</el-select>
</el-form-item>
<el-form-item label="职务">
<el-select v-model="searchInfo.method" clearable placeholder="职务">
<el-option value="1" label="a职务">a职务</el-option>
<el-option value="2" label="b职务">b职务</el-option>
</el-select>
</el-form-item>
<el-form-item label="员工姓名">
<el-input v-model="searchInfo.path" placeholder="请输入员工姓名" />
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item>
<el-date-picker
v-model="value2"
align="right"
type="date"
placeholder="选择日期"
:picker-options="pickerOptions">
</el-date-picker>
</el-form>
</div>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog('addApi')">新增</el-button>
<el-button size="mini" type="primary" icon="el-icon-upload" @click="openDialog('addApi')">导入员工数据</el-button>
<el-popover v-model:visible="deleteVisible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin-top: 8px;">
<el-button size="mini" type="text" @click="deleteVisible = false">取消</el-button>
<el-button size="mini" type="primary" @click="onDelete">确定</el-button>
</div>
<template #reference>
<el-button icon="el-icon-delete" size="mini" :disabled="!apis.length" style="margin-left: 10px;">删除</el-button>
</template>
</el-popover>
</div>
<el-table :data="tableData" @sort-change="sortChange" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
/>
<el-table-column align="left" label="编号" prop="ID"/>
<el-table-column align="left" label="姓名" prop="path"/>
<el-table-column align="left" label="归属" prop="apiGroup"/>
<el-table-column align="left" label="职务" prop="description"/>
<el-table-column align="left" label="班组" prop="method"/>
<el-table-column align="left" label="员工类别" prop="method"/>
<el-table-column align="left" label="雇佣状态" prop="method">
<template #default="scope">
<el-switch v-model="scope.row"/>
</template>
</el-table-column>
<el-table-column align="left" label="状态" prop="method">
<template #default="scope">
<el-switch v-model="scope.row"/>
</template>
</el-table-column>
<el-table-column align="left" label="企业微信ID" prop="method"/>
<el-table-column align="left" label="金蝶ID" prop="method"/>
<el-table-column align="left" fixed="right" label="操作" width="200">
<template #default="scope">
<el-button
icon="el-icon-edit"
size="small"
type="text"
@click="editApi(scope.row)"
>编辑</el-button>
<el-button
icon="el-icon-delete"
size="small"
type="text"
@click="deleteApi(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="gva-pagination">
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="dialogTitle" width="40%">
<el-form ref="apiForm" :model="form" :rules="rules" label-width="85px">
<el-row>
<el-col :span="8">
<el-form-item label="职工编号" prop="num">
<el-input style="width: 162px;" v-model="form.num" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="职工姓名" prop="name">
<el-input style="width: 162px;" v-model="form.name" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="员工类别" prop="type">
<el-select v-model="form.type" clearable placeholder="请选择员工类别">
<el-option value="1" label="正式工">正式工</el-option>
<el-option value="2" label="合同工">合同工</el-option>
<el-option value="3" label="实习生">实习生</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="出生日期" prop="birthDate">
<el-date-picker
v-model="form.birthDate"
align="right"
type="date"
format="YYYY/MM/DD"
value-format="x"
placeholder="选择出生日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="入职日期" prop="onboardingDate">
<el-date-picker
v-model="form.onboardingDate"
type="date"
placeholder="选择入职日期"
format="YYYY/MM/DD"
value-format="x">
</el-date-picker>
<!-- <el-date-picker v-model="form.onboardingDate" type="date" placeholder="选择入职日期"></el-date-picker> -->
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="登录密码" prop="password">
<el-input placeholder="请输入密码" v-model="form.password1" show-password></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="确认密码" prop="passwordTwo">
<el-input placeholder="请输入密码" v-model="form.passwordTwo" show-password></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="所属部门" prop="department">
<el-cascader
:options="options"
:props="{ checkStrictly: true }"
clearable></el-cascader>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="岗位" prop="past">
<el-select v-model="form.past" clearable placeholder="岗位">
<el-option value="1" label="a岗位">a岗位</el-option>
<el-option value="2" label="b岗位">b岗位</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="性别" prop="gender">
<el-select v-model="form.gender" clearable placeholder="性别">
<el-option value="1" label="a岗位"> </el-option>
<el-option value="2" label="b岗位"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="年龄" prop="age">
<el-input v-model="form.age" autocomplete="off" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="证件类型" prop="certificate">
<el-select v-model="form.certificate" clearable placeholder="证件类型">
<el-option value="1" label="身份证">身份证</el-option>
<el-option value="2" label="驾驶证">驾驶证</el-option>
<el-option value="3" label="军人证">军人证</el-option>
<el-option value="4" label="护照">居住证</el-option>
<el-option value="5" label="居住证">护照</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="证件号" prop="certificateNum">
<el-input v-model="form.certificateNum" autocomplete="off" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="联系方式" prop="phone">
<el-input v-model="form.phone" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="雇佣状态" prop="state">
<!-- <el-select v-model="from.state" clearable placeholder="雇佣状态">
<el-option value="1" label="在职">在职</el-option>
<el-option value="2" label="离职">离职</el-option>
</el-select> -->
<el-select v-model="form.state" clearable placeholder="请选择雇佣状态">
<el-option value="1" label="在职">在职</el-option>
<el-option value="2" label="离职">离职</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="企业微信ID" prop="phone">
<el-input v-model="form.wxId" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="金蝶ID" prop="state">
<el-input v-model="form.jdId" autocomplete="off" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button size="small" @click="closeDialog"> </el-button>
<el-button size="small" type="primary" @click="enterDialog"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
// mixins getTableData this.searchInfo
import {
getApiById,
getApiList,
createApi,
updateApi,
deleteApi,
deleteApisByIds
} from '@/api/api'
import infoList from '@/mixins/infoList'
import { toSQLLine } from '@/utils/stringFun'
import warningBar from '@/components/warningBar/warningBar.vue'
const methodOptions = [
{
value: 'POST',
label: '创建',
type: 'success'
},
{
value: 'GET',
label: '查看',
type: ''
},
{
value: 'PUT',
label: '更新',
type: 'warning'
},
{
value: 'DELETE',
label: '删除',
type: 'danger'
}
]
export default {
name: 'staff',
components: {
warningBar
},
mixins: [infoList],
data() {
return {
deleteVisible: false,
// listApi: getApiList,
dialogFormVisible: false,
dialogTitle: '新增',
apis: [],
form: {
wxId:'',
jdId:'',
num:'',
name:'',
type:'',
birthDate:'',
onboardingDate:'',
password:'',
passwordTwo:'',
department:'',
post: '',
gender: '',
age: '',
certificate: '',
certificateNum: '',
phone: '',
state: '',
},
methodOptions: methodOptions,
type: '',
rules: {
path: [{ required: true, message: '请输入api路径', trigger: 'blur' }],
apiGroup: [
{ required: true, message: '请输入组名称', trigger: 'blur' }
],
description: [
{ required: true, message: '请输入api介绍', trigger: 'blur' }
]
}
}
},
created() {
this.getTableData()
},
methods: {
methodFiletr(value) {
const target = methodOptions.filter(item => item.value === value)[0]
return target && `${target.label}`
},
tagTypeFiletr(value) {
const target = methodOptions.filter(item => item.value === value)[0]
return target && `${target.type}`
},
// api
handleSelectionChange(val) {
this.apis = val
},
async onDelete() {
const ids = this.apis.forEach(item => item.ID)
const res = await deleteApisByIds({ ids })
if (res.code === 0) {
this.$message({
type: 'success',
message: res.msg
})
if (this.tableData.length === ids.length && this.page > 1) {
this.page--
}
this.deleteVisible = false
this.getTableData()
}
},
//
sortChange({ prop, order }) {
if (prop) {
this.searchInfo.orderKey = toSQLLine(prop)
this.searchInfo.desc = order === 'descending'
}
this.getTableData()
},
onReset() {
this.searchInfo = {}
},
//
onSubmit() {
this.page = 1
this.pageSize = 10
this.getTableData()
},
initForm() {
this.$refs.apiForm.resetFields()
this.form = {
path: '',
apiGroup: '',
method: '',
description: ''
}
},
closeDialog() {
this.initForm()
this.dialogFormVisible = false
},
openDialog(type) {
switch (type) {
case 'addApi':
this.dialogTitle = '新增员工信息'
break
case 'edit':
this.dialogTitle = '编辑员工信息'
break
default:
break
}
this.type = type
this.dialogFormVisible = true
},
async editApi(row) {
const res = await getApiById({ id: row.ID })
this.form = res.data.api
this.openDialog('edit')
},
async deleteApi(row) {
this.$confirm('此操作将永久删除所有角色下该api, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async() => {
const res = await deleteApi(row)
if (res.code === 0) {
this.$message({
type: 'success',
message: '删除成功!'
})
if (this.tableData.length === 1 && this.page > 1) {
this.page--
}
this.getTableData()
}
})
},
async enterDialog() {
this.$refs.apiForm.validate(async valid => {
if (valid) {
switch (this.type) {
case 'addApi':
{
const res = await createApi(this.form)
if (res.code === 0) {
this.$message({
type: 'success',
message: '添加成功',
showClose: true
})
}
this.getTableData()
this.closeDialog()
}
break
case 'edit':
{
const res = await updateApi(this.form)
if (res.code === 0) {
this.$message({
type: 'success',
message: '编辑成功',
showClose: true
})
}
this.getTableData()
this.closeDialog()
}
break
default:
// eslint-disable-next-line no-lone-blocks
{
this.$message({
type: 'error',
message: '未知操作',
showClose: true
})
}
break
}
}
})
}
}
}
</script>
<style scoped lang="scss">
.el-input {
width: 220px;
}
.button-box {
padding: 10px 20px;
.el-button {
float: right;
}
}
.warning {
color: #dc143c;
}
</style>

17
web/src/view/healthy/index.vue

@ -0,0 +1,17 @@
<template>
<div>
<router-view v-slot="{ Component }">
<transition mode="out-in" name="el-fade-in-linear">
<keep-alive :include="$store.getters['router/keepAliveRouters']">
<component :is="Component" />
</keep-alive>
</transition>
</router-view>
</div>
</template>
<script>
export default {
name: 'healthy'
}
</script>

183
web/src/view/healthy/map/index.vue

@ -0,0 +1,183 @@
<template>
<div class="echarts">
<div id="main" style="width:100%; height:500px"></div>
<div :style="{height:'400px',width:'100%'}" ref="myEchart"></div>
</div>
</template>
<script>
import "../map/shandong.js";
import obj from "../map/shandong.json";
import echarts from "echarts";
// import '../../node_modules/echarts/map/js/world.js'
import '../../../utils/map/js/china' //
export default {
name: "echarts",
props: ["userJson"],
data() {
return {
listArr: [], //json
max: "", //value
min: "" ,// value
chart: null
};
},
created() {
this.getData();
},
mounted() {
this.DrawMap();
this.chinaConfigure();
},
beforeDestroy() {
if (!this.chart) {
return;
}
this.chart.dispose();
this.chart = null;
},
methods: {
chinaConfigure() {
console.log(this.userJson)
let myChart = echarts.init(this.$refs.myEchart); //
window.onresize = myChart.resize;
myChart.setOption({ //
backgroundColor: "#02AFDB",
tooltip: {}, //
dataRange: {
show: false,
min: 0,
max: 1000,
text: ['High', 'Low'],
realtime: true,
calculable: true,
color: ['orangered', 'yellow', 'lightskyblue']
},
geo: { //
map: 'china', //
roam: true,
label: {
normal: {
show: true, //
textStyle: {
color: 'rgba(0,0,0,0.4)'
}
}
},
itemStyle: {
normal: {
borderColor: 'rgba(0, 0, 0, 0.2)'
},
emphasis: {
areaColor: null,
shadowOffsetX: 0,
shadowOffsetY: 0,
shadowBlur: 20,
borderWidth: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
},
series: [{
type: 'scatter',
coordinateSystem: 'geo' //
},
{
name: '启动次数', //
type: 'map',
geoIndex: 0,
data: [{
"name": "北京",
"value": 599
}, {
"name": "上海",
"value": 142
}, {
"name": "黑龙江",
"value": 44
}, {
"name": "深圳",
"value": 92
}, {
"name": "湖北",
"value": 810
}, {
"name": "四川",
"value": 453
}]
}
]
})
},
getData() {
//
console.log("取到的山东省的json数据", obj);
if (obj) {
let arr = obj.features;
// value
for (var j = 0; j < arr.length; j++) {
this.max = arr[0].id;
this.min = arr[0].id;
if (arr[j].id > this.max) {
this.max = arr[j].id;
}
if (arr[j].id < this.min) {
this.min = arr[j].id;
}
this.listArr.push({
name: arr[j].properties.name,
value: arr[j].id
});
}
}
},
DrawMap() {
let _this = this;
let myChart8 = this.$echarts.init(document.getElementById("main"));
console.log(
"最大value值",
this.max,
"\n",
"最小value值",
this.min,
"\n",
"城市数据",
this.listArr
);
myChart8.setOption({
visualMap: {
min: _this.min,
max: _this.max,
show: false,
inRange: {
// color: ["lightskyblue", "yellow", "orangered"]
color: ["white"]
}
},
series: [
{
type: "map",
map: "山东",
itemStyle: {
normal: { label: { show: true } },
emphasis: { label: { show: true } },
emphasis: {
areaColor: "#67C23A" //
}
},
data: _this.listArr
}
]
});
},
}
}
</script>
<style scoped lang="scss">
.o-echarts {
min-width: 30px;
min-height: 30px;
width: 100%;
height: 100%;
}
</style>

28
web/src/view/healthy/map/shandong.js

File diff suppressed because one or more lines are too long

1
web/src/view/healthy/map/shandong.json

File diff suppressed because one or more lines are too long

95
web/src/view/healthy/table/index.vue

@ -0,0 +1,95 @@
<template>
<div class="upload">
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="searchInfo">
<el-form-item label="姓名">
<el-input clearable v-model="searchInfo.name" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="是否异常">
<el-select clearable v-model="searchInfo.value" placeholder="请选择">
<el-option label="正常" value="1"></el-option>
<el-option label="异常" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="选择日期">
<el-date-picker
v-model="searchInfo.date"
type="date"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button class="excel-btn" size="mini" type="primary" icon="el-icon-download" @click="handleExcelExport('ExcelExport.xlsx')">导出</el-button>
</div>
<el-table :data="tableData">
<el-table-column label="姓名" prop="ID" />
<el-table-column label="所在部门" prop="ID" />
<el-table-column label="工号" prop="ID" />
<el-table-column label="是否上传行程码" prop="ID" />
<el-table-column label="是否异常" prop="ID" />
<el-table-column label="上传日期" prop="ID" />
</el-table>
</div>
</div>
</template>
<script>
const path = import.meta.env.VITE_BASE_API
import { mapGetters } from 'vuex'
import infoList from '@/mixins/infoList'
import { exportExcel, loadExcelData, downloadTemplate } from '@/api/excel'
import { getMenuList } from '@/api/menu'
export default {
name: 'Excel',
mixins: [infoList],
data() {
return {
listApi: getMenuList,
path: path
}
},
computed: {
...mapGetters('user', ['userInfo', 'token'])
},
created() {
this.pageSize = 999
this.getTableData()
},
methods: {
handleExcelExport(fileName) {
if (!fileName || typeof fileName !== 'string') {
fileName = 'ExcelExport.xlsx'
}
exportExcel(this.tableData, fileName)
},
loadExcel() {
this.listApi = loadExcelData
this.getTableData()
},
downloadExcelTemplate() {
downloadTemplate('ExcelTemplate.xlsx')
}
}
}
</script>
<style lang="scss" scoped>
.btn-list{
display: flex;
margin-bottom: 12px;
justify-content: flex-end;
}
.excel-btn+.excel-btn{
margin-left: 10px;
}
</style>

350
web/src/view/news/index.vue

@ -0,0 +1,350 @@
<template>
<div>
<!-- 新闻管理 -->
<div class="gva-search-box">
<el-form ref="searchForm" :inline="true" :model="searchInfo">
<el-form-item label="名称">
<el-input v-model="searchInfo.path" placeholder="请输入新闻名称" />
</el-form-item>
<el-form-item label="选择发布日期">
<el-date-picker v-model="value2" align="right" type="date" placeholder="选择日期" :picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog('addApi')">新增</el-button>
<!-- <el-button size="mini" type="primary" icon="el-icon-upload" @click="openDialog('addApi')">导入员工数据</el-button> -->
<el-popover v-model:visible="deleteVisible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin-top: 8px;">
<el-button size="mini" type="text" @click="deleteVisible = false">取消</el-button>
<el-button size="mini" type="primary" @click="onDelete">确定</el-button>
</div>
<template #reference>
<el-button icon="el-icon-delete" size="mini" :disabled="!apis.length" style="margin-left: 10px;">删除</el-button>
</template>
</el-popover>
</div>
<el-table :data="tableData" @sort-change="sortChange" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"/>
<el-table-column align="left" label="新闻名称" prop="ID"/>
<el-table-column align="left" label="发布时间" prop="path"/>
<el-table-column align="left" label="阅读量" prop="apiGroup"/>
<el-table-column align="left" label="详细介绍" prop="description"/>
<el-table-column align="left" fixed="right" label="操作" width="200">
<template #default="scope">
<el-button
icon="el-icon-edit"
size="small"
type="text"
@click="editApi(scope.row)"
>编辑</el-button>
<el-button
icon="el-icon-delete"
size="small"
type="text"
@click="deleteApi(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="gva-pagination">
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="dialogTitle" width="40%">
<el-form ref="apiForm" :model="form" :rules="rules" label-width="100px">
<el-form-item label="新闻名称" prop="num">
<el-input v-model="form.num" autocomplete="off"/>
</el-form-item>
<el-form-item label="选择发布日期">
<el-date-picker
v-model="value2"
align="right"
type="date"
placeholder="选择日期"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label="阅读量" prop="num">
<el-input v-model="form.num" autocomplete="off"/>
</el-form-item>
<el-form-item label="详情" prop="num">
<!-- <editor-bar v-model="detail" :isClear="isClear" @change="change"></editor-bar> -->
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button size="small" @click="closeDialog"> </el-button>
<el-button size="small" type="primary" @click="enterDialog"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
// mixins getTableData this.searchInfo
import {
getApiById,
getApiList,
createApi,
updateApi,
deleteApi,
deleteApisByIds
} from '@/api/api'
import infoList from '@/mixins/infoList'
// import EditorBar from '../../components/wangEnduit/index.vue'
import { toSQLLine } from '@/utils/stringFun'
import warningBar from '@/components/warningBar/warningBar.vue'
const methodOptions = [
{
value: 'POST',
label: '创建',
type: 'success'
},
{
value: 'GET',
label: '查看',
type: ''
},
{
value: 'PUT',
label: '更新',
type: 'warning'
},
{
value: 'DELETE',
label: '删除',
type: 'danger'
}
]
export default {
name: 'Api',
components: {
// warningBar,EditorBar
warningBar
},
mixins: [infoList],
data() {
return {
deleteVisible: false,
// listApi: getApiList,
dialogFormVisible: false,
dialogTitle: '新增新闻',
apis: [],
form: {
wxId:'',
jdId:'',
num:'',
name:'',
type:'',
birthDate:'',
onboardingDate:'',
password:'',
passwordTwo:'',
department:'',
post: '',
gender: '',
age: '',
certificate: '',
certificateNum: '',
phone: '',
state: '',
},
methodOptions: methodOptions,
type: '',
rules: {
path: [{ required: true, message: '请输入api路径', trigger: 'blur' }],
apiGroup: [
{ required: true, message: '请输入组名称', trigger: 'blur' }
],
description: [
{ required: true, message: '请输入api介绍', trigger: 'blur' }
]
}
}
},
created() {
this.getTableData()
},
methods: {
methodFiletr(value) {
const target = methodOptions.filter(item => item.value === value)[0]
return target && `${target.label}`
},
tagTypeFiletr(value) {
const target = methodOptions.filter(item => item.value === value)[0]
return target && `${target.type}`
},
// api
handleSelectionChange(val) {
this.apis = val
},
async onDelete() {
const ids = this.apis.forEach(item => item.ID)
const res = await deleteApisByIds({ ids })
if (res.code === 0) {
this.$message({
type: 'success',
message: res.msg
})
if (this.tableData.length === ids.length && this.page > 1) {
this.page--
}
this.deleteVisible = false
this.getTableData()
}
},
//
sortChange({ prop, order }) {
if (prop) {
this.searchInfo.orderKey = toSQLLine(prop)
this.searchInfo.desc = order === 'descending'
}
this.getTableData()
},
onReset() {
this.searchInfo = {}
},
//
onSubmit() {
this.page = 1
this.pageSize = 10
this.getTableData()
},
initForm() {
this.$refs.apiForm.resetFields()
this.form = {
path: '',
apiGroup: '',
method: '',
description: ''
}
},
closeDialog() {
this.initForm()
this.dialogFormVisible = false
},
openDialog(type) {
switch (type) {
case 'addApi':
this.dialogTitle = '新增新闻'
break
case 'edit':
this.dialogTitle = '编辑新闻'
break
default:
break
}
this.type = type
this.dialogFormVisible = true
},
async editApi(row) {
const res = await getApiById({ id: row.ID })
this.form = res.data.api
this.openDialog('edit')
},
async deleteApi(row) {
this.$confirm('此操作将永久删除所有角色下该api, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async() => {
const res = await deleteApi(row)
if (res.code === 0) {
this.$message({
type: 'success',
message: '删除成功!'
})
if (this.tableData.length === 1 && this.page > 1) {
this.page--
}
this.getTableData()
}
})
},
async enterDialog() {
this.$refs.apiForm.validate(async valid => {
if (valid) {
switch (this.type) {
case 'addApi':
{
const res = await createApi(this.form)
if (res.code === 0) {
this.$message({
type: 'success',
message: '添加成功',
showClose: true
})
}
this.getTableData()
this.closeDialog()
}
break
case 'edit':
{
const res = await updateApi(this.form)
if (res.code === 0) {
this.$message({
type: 'success',
message: '编辑成功',
showClose: true
})
}
this.getTableData()
this.closeDialog()
}
break
default:
// eslint-disable-next-line no-lone-blocks
{
this.$message({
type: 'error',
message: '未知操作',
showClose: true
})
}
break
}
}
})
}
}
}
</script>
<style scoped lang="scss">
.el-input {
width: 220px;
}
.button-box {
padding: 10px 20px;
.el-button {
float: right;
}
}
.warning {
color: #dc143c;
}
</style>

5
web/src/view/superAdmin/authority/authority.vue

@ -4,6 +4,7 @@
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="addAuthority('0')">新增角色</el-button>
<el-button size="mini" type="primary" icon="el-icon-plus" @click="look">查看</el-button>
</div>
<el-table
:data="tableData"
@ -169,6 +170,10 @@ export default {
await this.getTableData()
},
methods: {
look(){
console.log("查看")
console.log(this.tableData)
},
changeRow(key, value) {
this.activeRow[key] = value
},

9
web/vue.config.js

@ -1,5 +1,12 @@
module.exports = {
configureWebpack: {
externals: {
"BMap": "BMap"
}
},
configureWebpack:config => {
config.entry.app = ["@babel/polyfill","./src/main.js"]
}
},
}

29
web/yarn.lock

@ -879,7 +879,15 @@
"@babel/types" "^7.4.4"
"esutils" "^2.0.2"
"@babel/runtime@^7.0.0", "@babel/runtime@^7.11.0", "@babel/runtime@^7.8.4":
"@babel/runtime-corejs3@^7.11.2":
"integrity" "sha512-Oi2qwQ21X7/d9gn3WiwkDTJmq3TQtYNz89lRnoFy8VeZpWlsyXvzSwiRrRZ8cXluvSwqKxqHJ6dBd9Rv+p0ZGQ=="
"resolved" "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.0.tgz"
"version" "7.16.0"
dependencies:
"core-js-pure" "^3.19.0"
"regenerator-runtime" "^0.13.4"
"@babel/runtime@^7.0.0", "@babel/runtime@^7.11.0", "@babel/runtime@^7.11.2", "@babel/runtime@^7.8.4":
"integrity" "sha1-LhwogMoRjlsvmYgyK9inZWoyUCs="
"resolved" "https://registry.nlark.com/@babel/runtime/download/@babel/runtime-7.15.3.tgz?cache=0&sync_timestamp=1628666503436&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fruntime%2Fdownload%2F%40babel%2Fruntime-7.15.3.tgz"
"version" "7.15.3"
@ -2945,6 +2953,11 @@
"browserslist" "^4.16.8"
"semver" "7.0.0"
"core-js-pure@^3.19.0":
"integrity" "sha512-Q0Knr8Es84vtv62ei6/6jXH/7izKmOrtrxH9WJTHLCMAVeU+8TF8z8Nr08CsH4Ot0oJKzBzJJL9SJBYIv7WlfQ=="
"resolved" "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.1.tgz"
"version" "3.19.1"
"core-js@^2.4.0":
"integrity" "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
"resolved" "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz"
@ -8486,6 +8499,11 @@
"resolved" "https://registry.nlark.com/tslib/download/tslib-1.14.1.tgz?cache=0&sync_timestamp=1628722580350&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-1.14.1.tgz"
"version" "1.14.1"
"tslib@^2.1.0":
"integrity" "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
"resolved" "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz"
"version" "2.3.1"
"tty-browserify@0.0.0":
"integrity" "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY="
"resolved" "https://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz"
@ -8904,6 +8922,15 @@
dependencies:
"@vue/devtools-api" "^6.0.0-beta.11"
"wangeditor@^4.7.9":
"integrity" "sha512-x8u/SJQ4pHLp597CzWm/0DrITUGpNaPk4jms03VYSaIt1mSoF5wd+dAxBsfPgmaYrYWx6CZtyGZA4Kv6s1vvlw=="
"resolved" "https://registry.npmjs.org/wangeditor/-/wangeditor-4.7.9.tgz"
"version" "4.7.9"
dependencies:
"@babel/runtime" "^7.11.2"
"@babel/runtime-corejs3" "^7.11.2"
"tslib" "^2.1.0"
"watchpack-chokidar2@^2.0.1":
"integrity" "sha1-OFAAcu5uzmbzdpk2lQ6hdxvhyVc="
"resolved" "https://registry.npm.taobao.org/watchpack-chokidar2/download/watchpack-chokidar2-2.0.1.tgz?cache=0&sync_timestamp=1604989085906&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwatchpack-chokidar2%2Fdownload%2Fwatchpack-chokidar2-2.0.1.tgz"

Loading…
Cancel
Save