This commit is contained in:
parent
d3bf33adbc
commit
a440859628
|
|
@ -7,6 +7,7 @@ VUE_APP_ENV = 'development'
|
|||
|
||||
# 实名制管理系统/开发环境
|
||||
VUE_APP_BASE_API = '/dev-api'
|
||||
VUE_APP_SHOW_PARAMETER = false
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ VUE_APP_TITLE = 实名制管理系统
|
|||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
VUE_APP_ENV = 'production'
|
||||
VUE_APP_SHOW_PARAMETER = true
|
||||
|
||||
# 实名制管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/hd-real-name'
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,19 @@
|
|||
import request from '@/utils/request'
|
||||
import requestFormData from '@/utils/request_formdata'
|
||||
|
||||
// 红绿灯统计 红名单列表查询接口
|
||||
export const getRedListAPI = (data) => {
|
||||
return request({
|
||||
url: '/bmw/workerBlack/getWorkerBlackList',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 红绿灯统计 红名单解除
|
||||
export const removeRedListAPI = (id) => {
|
||||
return request({
|
||||
url: `/bmw/workerBlack/remove/${id}`,
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
|
|
@ -61,6 +61,25 @@ export const constantRoutes = [
|
|||
component: () => import('@/views/error/401'),
|
||||
hidden: true,
|
||||
},
|
||||
|
||||
{
|
||||
path: '/parameter',
|
||||
component: Layout,
|
||||
redirect: 'index',
|
||||
|
||||
permissions: ['parameter:decryption:list'],
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'ParameterDecryption',
|
||||
component: () => import('@/views/parameter-decryption/index'),
|
||||
permissions: ['parameter:decryption:list'],
|
||||
meta: { title: '参数解密', icon: 'lock' },
|
||||
hidden:
|
||||
process.env.VUE_APP_SHOW_PARAMETER == 'true' ? true : false, // 从环境变量取值决定是否显示
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: Layout,
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ export const columnsList = [
|
|||
export const dialogConfig = {
|
||||
outerVisible: false,
|
||||
outerTitle: '新增失信人员',
|
||||
outerWidth: '50%',
|
||||
outerWidth: '60%',
|
||||
minHeight: '',
|
||||
maxHeight: '',
|
||||
maxHeight: '93vh',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -260,14 +260,17 @@
|
|||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<el-form-item>
|
||||
<!-- <el-form-item>
|
||||
|
||||
</el-form-item> -->
|
||||
|
||||
<el-checkbox
|
||||
style="margin-top: 10px"
|
||||
v-model="isForever"
|
||||
@change="handleChangeIsForever"
|
||||
>
|
||||
永久
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,81 @@
|
|||
export const formLabel = [
|
||||
{
|
||||
f_label: '姓名',
|
||||
f_model: 'name',
|
||||
f_type: 'ipt',
|
||||
f_width: '180px',
|
||||
isShow: false, // 是否展示label
|
||||
},
|
||||
{
|
||||
f_label: '身份证',
|
||||
f_model: 'idNumber',
|
||||
f_type: 'ipt',
|
||||
f_width: '180px',
|
||||
isShow: false, // 是否展示label
|
||||
},
|
||||
{
|
||||
f_label: '工程',
|
||||
f_model: 'proName',
|
||||
f_type: 'ipt',
|
||||
f_width: '180px',
|
||||
isShow: false, // 是否展示label
|
||||
},
|
||||
{
|
||||
f_label: '分包',
|
||||
f_model: 'subName',
|
||||
f_type: 'ipt',
|
||||
f_width: '180px',
|
||||
isShow: false, // 是否展示label
|
||||
},
|
||||
{
|
||||
f_label: '状态',
|
||||
f_model: 'isRemove',
|
||||
f_type: 'sel',
|
||||
f_width: '180px',
|
||||
isShow: false, // 是否展示label
|
||||
f_selList: [
|
||||
{
|
||||
label: '执行中',
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: '已解除',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '已到解除时间',
|
||||
value: 2,
|
||||
},
|
||||
], // 状态列表
|
||||
},
|
||||
]
|
||||
|
||||
export const columnsList = [
|
||||
{ t_props: 'name', t_label: '姓名' },
|
||||
{ t_label: '身份证', t_slot: 'idNumber' },
|
||||
{ t_props: 'postName', t_label: '工种/岗位' },
|
||||
{ t_props: 'proName', t_label: '工程名称' },
|
||||
{
|
||||
t_props: 'subName',
|
||||
t_label: '分包名称',
|
||||
},
|
||||
{ t_props: 'reason', t_label: '事件' },
|
||||
{ t_props: 'remark', t_label: '备注' },
|
||||
// { t_slot: 'file', t_label: '附件', t_width: '200px' },
|
||||
{
|
||||
t_label: '起止时间',
|
||||
t_slot: 'time',
|
||||
},
|
||||
{
|
||||
t_label: '状态',
|
||||
t_slot: 'isRemove',
|
||||
},
|
||||
]
|
||||
|
||||
export const dialogConfig = {
|
||||
outerVisible: false,
|
||||
outerTitle: '新增失信人员',
|
||||
outerWidth: '60%',
|
||||
minHeight: '',
|
||||
maxHeight: '93vh',
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
<template>
|
||||
<!-- 施工人员 ---- 红绿灯管理 ---- 红名单人员-->
|
||||
<div class="app-container">
|
||||
<TableModel
|
||||
:formLabel="formLabel"
|
||||
:showOperation="true"
|
||||
:showRightTools="true"
|
||||
:columnsList="columnsList"
|
||||
ref="dishonestyPersonTableRef"
|
||||
:request-api="getRedListAPI"
|
||||
>
|
||||
<template slot="btn" slot-scope="{ queryParams }">
|
||||
<el-button
|
||||
plain
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-download"
|
||||
@click="onHandleExportDishonestyPerson(queryParams)"
|
||||
>
|
||||
导出
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot="idNumber" slot-scope="{ data }">
|
||||
{{ desensitizeIdNumber(data.idNumber) }}
|
||||
</template>
|
||||
|
||||
<template slot="isRemove" slot-scope="{ data }">
|
||||
<el-tag size="mini" type="warning" v-if="data.isRemove === 0">
|
||||
执行中
|
||||
</el-tag>
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="success"
|
||||
v-else-if="data.isRemove === 1"
|
||||
>
|
||||
已解除
|
||||
</el-tag>
|
||||
<el-tag size="mini" type="primary" v-else>
|
||||
已到解除时间
|
||||
</el-tag>
|
||||
</template>
|
||||
<template slot="time" slot-scope="{ data }">
|
||||
{{ data.startTime }} ~ {{ data.endTime }}
|
||||
</template>
|
||||
|
||||
<template slot="handle" slot-scope="{ data }">
|
||||
<el-button
|
||||
plain
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-edit"
|
||||
v-if="data.isRemove !== 1"
|
||||
@click="onHandleRemove(data)"
|
||||
>
|
||||
解除
|
||||
</el-button>
|
||||
</template>
|
||||
</TableModel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableModel from '@/components/TableModel'
|
||||
import DialogModel from '@/components/DialogModel'
|
||||
import UploadFileFormData from '@/components/UploadFileFormData'
|
||||
import { formLabel, columnsList, dialogConfig } from './config'
|
||||
import {
|
||||
getSubSelectListCommonFun,
|
||||
getPostTypeSelectListCommonFun,
|
||||
getLotProjectSelectListCommonFun,
|
||||
} from '@/utils/getCommonData'
|
||||
|
||||
import {
|
||||
removeRedListAPI,
|
||||
getRedListAPI,
|
||||
} from '@/api/construction-person/red-green-light-mange/red-list'
|
||||
|
||||
export default {
|
||||
name: 'Red-list',
|
||||
components: {
|
||||
TableModel,
|
||||
DialogModel,
|
||||
UploadFileFormData,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
formLabel,
|
||||
columnsList,
|
||||
dialogConfig,
|
||||
isForever: false,
|
||||
getRedListAPI,
|
||||
|
||||
subSelectList: [], // 分包下拉列表
|
||||
postTypeSelectList: [], // 工种下拉列表
|
||||
lotProjectSelectList: [], // 工程下拉列表
|
||||
importFileList: [], // 导入文件列表
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 导出按钮
|
||||
onHandleExportDishonestyPerson(queryParams) {
|
||||
// this.download(
|
||||
// '/bmw/workerBlack/workerBlackExport',
|
||||
// {
|
||||
// ...queryParams,
|
||||
// },
|
||||
// '红名单列表.xlsx',
|
||||
// )
|
||||
},
|
||||
|
||||
// 解除
|
||||
onHandleRemove(data) {
|
||||
this.$confirm('确定解除该红名单人员吗?', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
const res = await removeRedListAPI(data.idNumber)
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess('解除成功')
|
||||
this.$refs.dishonestyPersonTableRef.getTableList()
|
||||
} else {
|
||||
this.$modal.msgError(res.msg)
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
},
|
||||
|
||||
async created() {
|
||||
const postTypeSelect = await getPostTypeSelectListCommonFun()
|
||||
const lotProjectSelect = await getLotProjectSelectListCommonFun()
|
||||
const subSelect = await getSubSelectListCommonFun()
|
||||
|
||||
this.postTypeSelectList = postTypeSelect.map((e) => ({
|
||||
value: e.postName,
|
||||
label: e.postName,
|
||||
}))
|
||||
this.lotProjectSelectList = lotProjectSelect.map((e) => ({
|
||||
value: e.proName,
|
||||
label: e.proName,
|
||||
}))
|
||||
this.subSelectList = subSelect.map((e) => ({
|
||||
value: e.subName,
|
||||
label: e.subName,
|
||||
}))
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
@ -51,9 +51,7 @@
|
|||
import ItemOne from './components/item-one.vue'
|
||||
import ItemTwo from './components/item-two.vue'
|
||||
import ItemThree from './components/item-three.vue'
|
||||
|
||||
import ProjectList from '../dataOverviewProject/components/item-two.vue'
|
||||
|
||||
import DialogModel from '@/components/DialogModel'
|
||||
|
||||
import { getProjectInfoAPI } from '@/api/home-index/index'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,157 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="card-title">参数解密工具</span>
|
||||
<span class="card-subtitle"
|
||||
>用于开发调试,解密生产环境的加密参数</span
|
||||
>
|
||||
</div>
|
||||
|
||||
<el-form :model="decryptForm" label-width="120px">
|
||||
<el-form-item label="加密参数">
|
||||
<el-input
|
||||
v-model="decryptForm.encryptedText"
|
||||
type="textarea"
|
||||
:rows="6"
|
||||
placeholder="请输入需要解密的加密字符串"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-unlock"
|
||||
@click="handleDecrypt"
|
||||
:loading="decrypting"
|
||||
>解密</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" @click="handleReset"
|
||||
>清空</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="解密结果">
|
||||
<el-input
|
||||
v-model="decryptForm.decryptedText"
|
||||
type="textarea"
|
||||
:rows="10"
|
||||
placeholder="解密后的结果将显示在这里"
|
||||
readonly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { decryptWithSM4 } from '@/utils/sm'
|
||||
import { Message } from 'element-ui'
|
||||
|
||||
export default {
|
||||
name: 'ParameterDecryption',
|
||||
data() {
|
||||
return {
|
||||
decryptForm: {
|
||||
encryptedText: '',
|
||||
decryptedText: '',
|
||||
},
|
||||
decrypting: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 解密处理
|
||||
handleDecrypt() {
|
||||
if (
|
||||
!this.decryptForm.encryptedText ||
|
||||
!this.decryptForm.encryptedText.trim()
|
||||
) {
|
||||
Message.warning('请输入需要解密的加密字符串')
|
||||
return
|
||||
}
|
||||
|
||||
this.decrypting = true
|
||||
try {
|
||||
// 调用解密方法
|
||||
const decryptedResult = decryptWithSM4(
|
||||
this.decryptForm.encryptedText.trim(),
|
||||
)
|
||||
|
||||
// 尝试解析为 JSON 并格式化显示
|
||||
try {
|
||||
const jsonResult = JSON.parse(decryptedResult)
|
||||
this.decryptForm.decryptedText = JSON.stringify(
|
||||
jsonResult,
|
||||
null,
|
||||
2,
|
||||
)
|
||||
} catch (e) {
|
||||
// 如果不是 JSON,直接显示原始解密结果
|
||||
this.decryptForm.decryptedText = decryptedResult
|
||||
}
|
||||
|
||||
Message.success('解密成功')
|
||||
} catch (error) {
|
||||
console.error('解密失败:', error)
|
||||
this.decryptForm.decryptedText = ''
|
||||
Message.error(
|
||||
'解密失败,请检查加密字符串是否正确。错误信息:' +
|
||||
(error.message || '未知错误'),
|
||||
)
|
||||
} finally {
|
||||
this.decrypting = false
|
||||
}
|
||||
},
|
||||
// 清空表单
|
||||
handleReset() {
|
||||
this.decryptForm = {
|
||||
encryptedText: '',
|
||||
decryptedText: '',
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-container {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
::v-deep .el-card {
|
||||
.el-card__header {
|
||||
padding: 18px 20px;
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.card-subtitle {
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
::v-deep .el-textarea {
|
||||
.el-textarea__inner {
|
||||
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-form-item {
|
||||
margin-bottom: 22px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -7,9 +7,9 @@ function resolve(dir) {
|
|||
|
||||
const CompressionPlugin = require('compression-webpack-plugin')
|
||||
|
||||
const name = process.env.VUE_APP_TITLE || '博诺思管理系统' // 网页标题
|
||||
const name = process.env.VUE_APP_TITLE || '实名制管理系统' // 网页标题
|
||||
|
||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||
const port = process.env.port || process.env.npm_config_port || 88 // 端口
|
||||
|
||||
// vue.config.js 配置说明
|
||||
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
||||
|
|
@ -18,7 +18,7 @@ module.exports = {
|
|||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.bonus.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.bonus.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
|
||||
publicPath: process.env.NODE_ENV === 'production' ? '/hd-realname' : '/',
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
|
|
@ -35,22 +35,14 @@ module.exports = {
|
|||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
// target: `http://192.168.2.209:38080`,
|
||||
target: `http://192.168.0.38:38080`,
|
||||
// target: `http://192.168.0.244:18877`,
|
||||
changeOrigin: true,
|
||||
// target: `http://192.168.0.234:38080/hd-real-name`, // 方亮
|
||||
// target: `http://192.168.0.60:38080//hd-real-name`, // 赵福海
|
||||
// target: `http://192.168.0.133:38080`, // 梁超
|
||||
target: `http://192.168.0.14:1999/hd-real-name/`, // 测试环境
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: '',
|
||||
},
|
||||
},
|
||||
'/api': {
|
||||
target: 'http://192.168.0.21:17861',
|
||||
//设置允许跨域——此处我经过测试发现可有可无
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/api': '',
|
||||
},
|
||||
},
|
||||
},
|
||||
disableHostCheck: true,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue